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.

10296 lines
368KB

  1. # generated automatically by aclocal 1.15 -*- Autoconf -*-
  2. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
  3. # This file is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. # PARTICULAR PURPOSE.
  10. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
  11. m4_ifndef([AC_AUTOCONF_VERSION],
  12. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  13. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
  14. [m4_warning([this file was generated for autoconf 2.69.
  15. You have another version of autoconf. It may work, but is not guaranteed to.
  16. If you have problems, you may need to regenerate the build system entirely.
  17. To do so, use the procedure documented by the package, typically 'autoreconf'.])])
  18. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  19. #
  20. # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
  21. # Written by Gordon Matzigkeit, 1996
  22. #
  23. # This file is free software; the Free Software Foundation gives
  24. # unlimited permission to copy and/or distribute it, with or without
  25. # modifications, as long as this notice is preserved.
  26. m4_define([_LT_COPYING], [dnl
  27. # Copyright (C) 2014 Free Software Foundation, Inc.
  28. # This is free software; see the source for copying conditions. There is NO
  29. # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  30. # GNU Libtool is free software; you can redistribute it and/or modify
  31. # it under the terms of the GNU General Public License as published by
  32. # the Free Software Foundation; either version 2 of of the License, or
  33. # (at your option) any later version.
  34. #
  35. # As a special exception to the GNU General Public License, if you
  36. # distribute this file as part of a program or library that is built
  37. # using GNU Libtool, you may include this file under the same
  38. # distribution terms that you use for the rest of that program.
  39. #
  40. # GNU Libtool is distributed in the hope that it will be useful, but
  41. # WITHOUT ANY WARRANTY; without even the implied warranty of
  42. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  43. # GNU General Public License for more details.
  44. #
  45. # You should have received a copy of the GNU General Public License
  46. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  47. ])
  48. # serial 58 LT_INIT
  49. # LT_PREREQ(VERSION)
  50. # ------------------
  51. # Complain and exit if this libtool version is less that VERSION.
  52. m4_defun([LT_PREREQ],
  53. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  54. [m4_default([$3],
  55. [m4_fatal([Libtool version $1 or higher is required],
  56. 63)])],
  57. [$2])])
  58. # _LT_CHECK_BUILDDIR
  59. # ------------------
  60. # Complain if the absolute build directory name contains unusual characters
  61. m4_defun([_LT_CHECK_BUILDDIR],
  62. [case `pwd` in
  63. *\ * | *\ *)
  64. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  65. esac
  66. ])
  67. # LT_INIT([OPTIONS])
  68. # ------------------
  69. AC_DEFUN([LT_INIT],
  70. [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
  71. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  72. AC_BEFORE([$0], [LT_LANG])dnl
  73. AC_BEFORE([$0], [LT_OUTPUT])dnl
  74. AC_BEFORE([$0], [LTDL_INIT])dnl
  75. m4_require([_LT_CHECK_BUILDDIR])dnl
  76. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  77. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  78. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  79. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  80. dnl unless we require an AC_DEFUNed macro:
  81. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  82. AC_REQUIRE([LTSUGAR_VERSION])dnl
  83. AC_REQUIRE([LTVERSION_VERSION])dnl
  84. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  85. m4_require([_LT_PROG_LTMAIN])dnl
  86. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  87. dnl Parse OPTIONS
  88. _LT_SET_OPTIONS([$0], [$1])
  89. # This can be used to rebuild libtool when needed
  90. LIBTOOL_DEPS=$ltmain
  91. # Always use our own libtool.
  92. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  93. AC_SUBST(LIBTOOL)dnl
  94. _LT_SETUP
  95. # Only expand once:
  96. m4_define([LT_INIT])
  97. ])# LT_INIT
  98. # Old names:
  99. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  100. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  101. dnl aclocal-1.4 backwards compatibility:
  102. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  103. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  104. # _LT_PREPARE_CC_BASENAME
  105. # -----------------------
  106. m4_defun([_LT_PREPARE_CC_BASENAME], [
  107. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  108. func_cc_basename ()
  109. {
  110. for cc_temp in @S|@*""; do
  111. case $cc_temp in
  112. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  113. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  114. \-*) ;;
  115. *) break;;
  116. esac
  117. done
  118. func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  119. }
  120. ])# _LT_PREPARE_CC_BASENAME
  121. # _LT_CC_BASENAME(CC)
  122. # -------------------
  123. # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
  124. # but that macro is also expanded into generated libtool script, which
  125. # arranges for $SED and $ECHO to be set by different means.
  126. m4_defun([_LT_CC_BASENAME],
  127. [m4_require([_LT_PREPARE_CC_BASENAME])dnl
  128. AC_REQUIRE([_LT_DECL_SED])dnl
  129. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  130. func_cc_basename $1
  131. cc_basename=$func_cc_basename_result
  132. ])
  133. # _LT_FILEUTILS_DEFAULTS
  134. # ----------------------
  135. # It is okay to use these file commands and assume they have been set
  136. # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
  137. m4_defun([_LT_FILEUTILS_DEFAULTS],
  138. [: ${CP="cp -f"}
  139. : ${MV="mv -f"}
  140. : ${RM="rm -f"}
  141. ])# _LT_FILEUTILS_DEFAULTS
  142. # _LT_SETUP
  143. # ---------
  144. m4_defun([_LT_SETUP],
  145. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  146. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  147. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  148. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  149. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  150. dnl
  151. _LT_DECL([], [host_alias], [0], [The host system])dnl
  152. _LT_DECL([], [host], [0])dnl
  153. _LT_DECL([], [host_os], [0])dnl
  154. dnl
  155. _LT_DECL([], [build_alias], [0], [The build system])dnl
  156. _LT_DECL([], [build], [0])dnl
  157. _LT_DECL([], [build_os], [0])dnl
  158. dnl
  159. AC_REQUIRE([AC_PROG_CC])dnl
  160. AC_REQUIRE([LT_PATH_LD])dnl
  161. AC_REQUIRE([LT_PATH_NM])dnl
  162. dnl
  163. AC_REQUIRE([AC_PROG_LN_S])dnl
  164. test -z "$LN_S" && LN_S="ln -s"
  165. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  166. dnl
  167. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  168. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  169. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  170. dnl
  171. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  172. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  173. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  174. m4_require([_LT_CMD_RELOAD])dnl
  175. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  176. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  177. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  178. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  179. m4_require([_LT_WITH_SYSROOT])dnl
  180. m4_require([_LT_CMD_TRUNCATE])dnl
  181. _LT_CONFIG_LIBTOOL_INIT([
  182. # See if we are running on zsh, and set the options that allow our
  183. # commands through without removal of \ escapes INIT.
  184. if test -n "\${ZSH_VERSION+set}"; then
  185. setopt NO_GLOB_SUBST
  186. fi
  187. ])
  188. if test -n "${ZSH_VERSION+set}"; then
  189. setopt NO_GLOB_SUBST
  190. fi
  191. _LT_CHECK_OBJDIR
  192. m4_require([_LT_TAG_COMPILER])dnl
  193. case $host_os in
  194. aix3*)
  195. # AIX sometimes has problems with the GCC collect2 program. For some
  196. # reason, if we set the COLLECT_NAMES environment variable, the problems
  197. # vanish in a puff of smoke.
  198. if test set != "${COLLECT_NAMES+set}"; then
  199. COLLECT_NAMES=
  200. export COLLECT_NAMES
  201. fi
  202. ;;
  203. esac
  204. # Global variables:
  205. ofile=libtool
  206. can_build_shared=yes
  207. # All known linkers require a '.a' archive for static linking (except MSVC,
  208. # which needs '.lib').
  209. libext=a
  210. with_gnu_ld=$lt_cv_prog_gnu_ld
  211. old_CC=$CC
  212. old_CFLAGS=$CFLAGS
  213. # Set sane defaults for various variables
  214. test -z "$CC" && CC=cc
  215. test -z "$LTCC" && LTCC=$CC
  216. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  217. test -z "$LD" && LD=ld
  218. test -z "$ac_objext" && ac_objext=o
  219. _LT_CC_BASENAME([$compiler])
  220. # Only perform the check for file, if the check method requires it
  221. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  222. case $deplibs_check_method in
  223. file_magic*)
  224. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  225. _LT_PATH_MAGIC
  226. fi
  227. ;;
  228. esac
  229. # Use C for the default configuration in the libtool script
  230. LT_SUPPORTED_TAG([CC])
  231. _LT_LANG_C_CONFIG
  232. _LT_LANG_DEFAULT_CONFIG
  233. _LT_CONFIG_COMMANDS
  234. ])# _LT_SETUP
  235. # _LT_PREPARE_SED_QUOTE_VARS
  236. # --------------------------
  237. # Define a few sed substitution that help us do robust quoting.
  238. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  239. [# Backslashify metacharacters that are still active within
  240. # double-quoted strings.
  241. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  242. # Same as above, but do not quote variable references.
  243. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  244. # Sed substitution to delay expansion of an escaped shell variable in a
  245. # double_quote_subst'ed string.
  246. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  247. # Sed substitution to delay expansion of an escaped single quote.
  248. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  249. # Sed substitution to avoid accidental globbing in evaled expressions
  250. no_glob_subst='s/\*/\\\*/g'
  251. ])
  252. # _LT_PROG_LTMAIN
  253. # ---------------
  254. # Note that this code is called both from 'configure', and 'config.status'
  255. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  256. # 'config.status' has no value for ac_aux_dir unless we are using Automake,
  257. # so we pass a copy along to make sure it has a sensible value anyway.
  258. m4_defun([_LT_PROG_LTMAIN],
  259. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  260. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  261. ltmain=$ac_aux_dir/ltmain.sh
  262. ])# _LT_PROG_LTMAIN
  263. # So that we can recreate a full libtool script including additional
  264. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  265. # in macros and then make a single call at the end using the 'libtool'
  266. # label.
  267. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  268. # ----------------------------------------
  269. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  270. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  271. [m4_ifval([$1],
  272. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  273. [$1
  274. ])])])
  275. # Initialize.
  276. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  277. # _LT_CONFIG_LIBTOOL([COMMANDS])
  278. # ------------------------------
  279. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  280. m4_define([_LT_CONFIG_LIBTOOL],
  281. [m4_ifval([$1],
  282. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  283. [$1
  284. ])])])
  285. # Initialize.
  286. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  287. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  288. # -----------------------------------------------------
  289. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  290. [_LT_CONFIG_LIBTOOL([$1])
  291. _LT_CONFIG_LIBTOOL_INIT([$2])
  292. ])
  293. # _LT_FORMAT_COMMENT([COMMENT])
  294. # -----------------------------
  295. # Add leading comment marks to the start of each line, and a trailing
  296. # full-stop to the whole comment if one is not present already.
  297. m4_define([_LT_FORMAT_COMMENT],
  298. [m4_ifval([$1], [
  299. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  300. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  301. )])
  302. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  303. # -------------------------------------------------------------------
  304. # CONFIGNAME is the name given to the value in the libtool script.
  305. # VARNAME is the (base) name used in the configure script.
  306. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  307. # VARNAME. Any other value will be used directly.
  308. m4_define([_LT_DECL],
  309. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  310. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  311. [m4_ifval([$1], [$1], [$2])])
  312. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  313. m4_ifval([$4],
  314. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  315. lt_dict_add_subkey([lt_decl_dict], [$2],
  316. [tagged?], [m4_ifval([$5], [yes], [no])])])
  317. ])
  318. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  319. # --------------------------------------------------------
  320. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  321. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  322. # ------------------------------------------------
  323. m4_define([lt_decl_tag_varnames],
  324. [_lt_decl_filter([tagged?], [yes], $@)])
  325. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  326. # ---------------------------------------------------------
  327. m4_define([_lt_decl_filter],
  328. [m4_case([$#],
  329. [0], [m4_fatal([$0: too few arguments: $#])],
  330. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  331. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  332. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  333. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  334. ])
  335. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  336. # --------------------------------------------------
  337. m4_define([lt_decl_quote_varnames],
  338. [_lt_decl_filter([value], [1], $@)])
  339. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  340. # ---------------------------------------------------
  341. m4_define([lt_decl_dquote_varnames],
  342. [_lt_decl_filter([value], [2], $@)])
  343. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  344. # ---------------------------------------------------
  345. m4_define([lt_decl_varnames_tagged],
  346. [m4_assert([$# <= 2])dnl
  347. _$0(m4_quote(m4_default([$1], [[, ]])),
  348. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  349. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  350. m4_define([_lt_decl_varnames_tagged],
  351. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  352. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  353. # ------------------------------------------------
  354. m4_define([lt_decl_all_varnames],
  355. [_$0(m4_quote(m4_default([$1], [[, ]])),
  356. m4_if([$2], [],
  357. m4_quote(lt_decl_varnames),
  358. m4_quote(m4_shift($@))))[]dnl
  359. ])
  360. m4_define([_lt_decl_all_varnames],
  361. [lt_join($@, lt_decl_varnames_tagged([$1],
  362. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  363. ])
  364. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  365. # ------------------------------------
  366. # Quote a variable value, and forward it to 'config.status' so that its
  367. # declaration there will have the same value as in 'configure'. VARNAME
  368. # must have a single quote delimited value for this to work.
  369. m4_define([_LT_CONFIG_STATUS_DECLARE],
  370. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  371. # _LT_CONFIG_STATUS_DECLARATIONS
  372. # ------------------------------
  373. # We delimit libtool config variables with single quotes, so when
  374. # we write them to config.status, we have to be sure to quote all
  375. # embedded single quotes properly. In configure, this macro expands
  376. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  377. #
  378. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  379. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  380. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  381. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  382. # _LT_LIBTOOL_TAGS
  383. # ----------------
  384. # Output comment and list of tags supported by the script
  385. m4_defun([_LT_LIBTOOL_TAGS],
  386. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  387. available_tags='_LT_TAGS'dnl
  388. ])
  389. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  390. # -----------------------------------
  391. # Extract the dictionary values for VARNAME (optionally with TAG) and
  392. # expand to a commented shell variable setting:
  393. #
  394. # # Some comment about what VAR is for.
  395. # visible_name=$lt_internal_name
  396. m4_define([_LT_LIBTOOL_DECLARE],
  397. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  398. [description])))[]dnl
  399. m4_pushdef([_libtool_name],
  400. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  401. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  402. [0], [_libtool_name=[$]$1],
  403. [1], [_libtool_name=$lt_[]$1],
  404. [2], [_libtool_name=$lt_[]$1],
  405. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  406. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  407. ])
  408. # _LT_LIBTOOL_CONFIG_VARS
  409. # -----------------------
  410. # Produce commented declarations of non-tagged libtool config variables
  411. # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
  412. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  413. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  414. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  415. [m4_foreach([_lt_var],
  416. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  417. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  418. # _LT_LIBTOOL_TAG_VARS(TAG)
  419. # -------------------------
  420. m4_define([_LT_LIBTOOL_TAG_VARS],
  421. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  422. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  423. # _LT_TAGVAR(VARNAME, [TAGNAME])
  424. # ------------------------------
  425. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  426. # _LT_CONFIG_COMMANDS
  427. # -------------------
  428. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  429. # variables for single and double quote escaping we saved from calls
  430. # to _LT_DECL, we can put quote escaped variables declarations
  431. # into 'config.status', and then the shell code to quote escape them in
  432. # for loops in 'config.status'. Finally, any additional code accumulated
  433. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  434. m4_defun([_LT_CONFIG_COMMANDS],
  435. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  436. dnl If the libtool generation code has been placed in $CONFIG_LT,
  437. dnl instead of duplicating it all over again into config.status,
  438. dnl then we will have config.status run $CONFIG_LT later, so it
  439. dnl needs to know what name is stored there:
  440. [AC_CONFIG_COMMANDS([libtool],
  441. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  442. dnl If the libtool generation code is destined for config.status,
  443. dnl expand the accumulated commands and init code now:
  444. [AC_CONFIG_COMMANDS([libtool],
  445. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  446. ])#_LT_CONFIG_COMMANDS
  447. # Initialize.
  448. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  449. [
  450. # The HP-UX ksh and POSIX shell print the target directory to stdout
  451. # if CDPATH is set.
  452. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  453. sed_quote_subst='$sed_quote_subst'
  454. double_quote_subst='$double_quote_subst'
  455. delay_variable_subst='$delay_variable_subst'
  456. _LT_CONFIG_STATUS_DECLARATIONS
  457. LTCC='$LTCC'
  458. LTCFLAGS='$LTCFLAGS'
  459. compiler='$compiler_DEFAULT'
  460. # A function that is used when there is no print builtin or printf.
  461. func_fallback_echo ()
  462. {
  463. eval 'cat <<_LTECHO_EOF
  464. \$[]1
  465. _LTECHO_EOF'
  466. }
  467. # Quote evaled strings.
  468. for var in lt_decl_all_varnames([[ \
  469. ]], lt_decl_quote_varnames); do
  470. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  471. *[[\\\\\\\`\\"\\\$]]*)
  472. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  473. ;;
  474. *)
  475. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  476. ;;
  477. esac
  478. done
  479. # Double-quote double-evaled strings.
  480. for var in lt_decl_all_varnames([[ \
  481. ]], lt_decl_dquote_varnames); do
  482. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  483. *[[\\\\\\\`\\"\\\$]]*)
  484. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
  485. ;;
  486. *)
  487. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  488. ;;
  489. esac
  490. done
  491. _LT_OUTPUT_LIBTOOL_INIT
  492. ])
  493. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  494. # ------------------------------------
  495. # Generate a child script FILE with all initialization necessary to
  496. # reuse the environment learned by the parent script, and make the
  497. # file executable. If COMMENT is supplied, it is inserted after the
  498. # '#!' sequence but before initialization text begins. After this
  499. # macro, additional text can be appended to FILE to form the body of
  500. # the child script. The macro ends with non-zero status if the
  501. # file could not be fully written (such as if the disk is full).
  502. m4_ifdef([AS_INIT_GENERATED],
  503. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  504. [m4_defun([_LT_GENERATED_FILE_INIT],
  505. [m4_require([AS_PREPARE])]dnl
  506. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  507. [lt_write_fail=0
  508. cat >$1 <<_ASEOF || lt_write_fail=1
  509. #! $SHELL
  510. # Generated by $as_me.
  511. $2
  512. SHELL=\${CONFIG_SHELL-$SHELL}
  513. export SHELL
  514. _ASEOF
  515. cat >>$1 <<\_ASEOF || lt_write_fail=1
  516. AS_SHELL_SANITIZE
  517. _AS_PREPARE
  518. exec AS_MESSAGE_FD>&1
  519. _ASEOF
  520. test 0 = "$lt_write_fail" && chmod +x $1[]dnl
  521. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  522. # LT_OUTPUT
  523. # ---------
  524. # This macro allows early generation of the libtool script (before
  525. # AC_OUTPUT is called), incase it is used in configure for compilation
  526. # tests.
  527. AC_DEFUN([LT_OUTPUT],
  528. [: ${CONFIG_LT=./config.lt}
  529. AC_MSG_NOTICE([creating $CONFIG_LT])
  530. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  531. [# Run this file to recreate a libtool stub with the current configuration.])
  532. cat >>"$CONFIG_LT" <<\_LTEOF
  533. lt_cl_silent=false
  534. exec AS_MESSAGE_LOG_FD>>config.log
  535. {
  536. echo
  537. AS_BOX([Running $as_me.])
  538. } >&AS_MESSAGE_LOG_FD
  539. lt_cl_help="\
  540. '$as_me' creates a local libtool stub from the current configuration,
  541. for use in further configure time tests before the real libtool is
  542. generated.
  543. Usage: $[0] [[OPTIONS]]
  544. -h, --help print this help, then exit
  545. -V, --version print version number, then exit
  546. -q, --quiet do not print progress messages
  547. -d, --debug don't remove temporary files
  548. Report bugs to <bug-libtool@gnu.org>."
  549. lt_cl_version="\
  550. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  551. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  552. configured by $[0], generated by m4_PACKAGE_STRING.
  553. Copyright (C) 2011 Free Software Foundation, Inc.
  554. This config.lt script is free software; the Free Software Foundation
  555. gives unlimited permision to copy, distribute and modify it."
  556. while test 0 != $[#]
  557. do
  558. case $[1] in
  559. --version | --v* | -V )
  560. echo "$lt_cl_version"; exit 0 ;;
  561. --help | --h* | -h )
  562. echo "$lt_cl_help"; exit 0 ;;
  563. --debug | --d* | -d )
  564. debug=: ;;
  565. --quiet | --q* | --silent | --s* | -q )
  566. lt_cl_silent=: ;;
  567. -*) AC_MSG_ERROR([unrecognized option: $[1]
  568. Try '$[0] --help' for more information.]) ;;
  569. *) AC_MSG_ERROR([unrecognized argument: $[1]
  570. Try '$[0] --help' for more information.]) ;;
  571. esac
  572. shift
  573. done
  574. if $lt_cl_silent; then
  575. exec AS_MESSAGE_FD>/dev/null
  576. fi
  577. _LTEOF
  578. cat >>"$CONFIG_LT" <<_LTEOF
  579. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  580. _LTEOF
  581. cat >>"$CONFIG_LT" <<\_LTEOF
  582. AC_MSG_NOTICE([creating $ofile])
  583. _LT_OUTPUT_LIBTOOL_COMMANDS
  584. AS_EXIT(0)
  585. _LTEOF
  586. chmod +x "$CONFIG_LT"
  587. # configure is writing to config.log, but config.lt does its own redirection,
  588. # appending to config.log, which fails on DOS, as config.log is still kept
  589. # open by configure. Here we exec the FD to /dev/null, effectively closing
  590. # config.log, so it can be properly (re)opened and appended to by config.lt.
  591. lt_cl_success=:
  592. test yes = "$silent" &&
  593. lt_config_lt_args="$lt_config_lt_args --quiet"
  594. exec AS_MESSAGE_LOG_FD>/dev/null
  595. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  596. exec AS_MESSAGE_LOG_FD>>config.log
  597. $lt_cl_success || AS_EXIT(1)
  598. ])# LT_OUTPUT
  599. # _LT_CONFIG(TAG)
  600. # ---------------
  601. # If TAG is the built-in tag, create an initial libtool script with a
  602. # default configuration from the untagged config vars. Otherwise add code
  603. # to config.status for appending the configuration named by TAG from the
  604. # matching tagged config vars.
  605. m4_defun([_LT_CONFIG],
  606. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  607. _LT_CONFIG_SAVE_COMMANDS([
  608. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  609. m4_if(_LT_TAG, [C], [
  610. # See if we are running on zsh, and set the options that allow our
  611. # commands through without removal of \ escapes.
  612. if test -n "${ZSH_VERSION+set}"; then
  613. setopt NO_GLOB_SUBST
  614. fi
  615. cfgfile=${ofile}T
  616. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  617. $RM "$cfgfile"
  618. cat <<_LT_EOF >> "$cfgfile"
  619. #! $SHELL
  620. # Generated automatically by $as_me ($PACKAGE) $VERSION
  621. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  622. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  623. # Provide generalized library-building support services.
  624. # Written by Gordon Matzigkeit, 1996
  625. _LT_COPYING
  626. _LT_LIBTOOL_TAGS
  627. # Configured defaults for sys_lib_dlsearch_path munging.
  628. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
  629. # ### BEGIN LIBTOOL CONFIG
  630. _LT_LIBTOOL_CONFIG_VARS
  631. _LT_LIBTOOL_TAG_VARS
  632. # ### END LIBTOOL CONFIG
  633. _LT_EOF
  634. cat <<'_LT_EOF' >> "$cfgfile"
  635. # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
  636. _LT_PREPARE_MUNGE_PATH_LIST
  637. _LT_PREPARE_CC_BASENAME
  638. # ### END FUNCTIONS SHARED WITH CONFIGURE
  639. _LT_EOF
  640. case $host_os in
  641. aix3*)
  642. cat <<\_LT_EOF >> "$cfgfile"
  643. # AIX sometimes has problems with the GCC collect2 program. For some
  644. # reason, if we set the COLLECT_NAMES environment variable, the problems
  645. # vanish in a puff of smoke.
  646. if test set != "${COLLECT_NAMES+set}"; then
  647. COLLECT_NAMES=
  648. export COLLECT_NAMES
  649. fi
  650. _LT_EOF
  651. ;;
  652. esac
  653. _LT_PROG_LTMAIN
  654. # We use sed instead of cat because bash on DJGPP gets confused if
  655. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  656. # text mode, it properly converts lines to CR/LF. This bash problem
  657. # is reportedly fixed, but why not run on old versions too?
  658. sed '$q' "$ltmain" >> "$cfgfile" \
  659. || (rm -f "$cfgfile"; exit 1)
  660. mv -f "$cfgfile" "$ofile" ||
  661. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  662. chmod +x "$ofile"
  663. ],
  664. [cat <<_LT_EOF >> "$ofile"
  665. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  666. dnl in a comment (ie after a #).
  667. # ### BEGIN LIBTOOL TAG CONFIG: $1
  668. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  669. # ### END LIBTOOL TAG CONFIG: $1
  670. _LT_EOF
  671. ])dnl /m4_if
  672. ],
  673. [m4_if([$1], [], [
  674. PACKAGE='$PACKAGE'
  675. VERSION='$VERSION'
  676. RM='$RM'
  677. ofile='$ofile'], [])
  678. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  679. ])# _LT_CONFIG
  680. # LT_SUPPORTED_TAG(TAG)
  681. # ---------------------
  682. # Trace this macro to discover what tags are supported by the libtool
  683. # --tag option, using:
  684. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  685. AC_DEFUN([LT_SUPPORTED_TAG], [])
  686. # C support is built-in for now
  687. m4_define([_LT_LANG_C_enabled], [])
  688. m4_define([_LT_TAGS], [])
  689. # LT_LANG(LANG)
  690. # -------------
  691. # Enable libtool support for the given language if not already enabled.
  692. AC_DEFUN([LT_LANG],
  693. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  694. m4_case([$1],
  695. [C], [_LT_LANG(C)],
  696. [C++], [_LT_LANG(CXX)],
  697. [Go], [_LT_LANG(GO)],
  698. [Java], [_LT_LANG(GCJ)],
  699. [Fortran 77], [_LT_LANG(F77)],
  700. [Fortran], [_LT_LANG(FC)],
  701. [Windows Resource], [_LT_LANG(RC)],
  702. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  703. [_LT_LANG($1)],
  704. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  705. ])# LT_LANG
  706. # _LT_LANG(LANGNAME)
  707. # ------------------
  708. m4_defun([_LT_LANG],
  709. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  710. [LT_SUPPORTED_TAG([$1])dnl
  711. m4_append([_LT_TAGS], [$1 ])dnl
  712. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  713. _LT_LANG_$1_CONFIG($1)])dnl
  714. ])# _LT_LANG
  715. m4_ifndef([AC_PROG_GO], [
  716. # NOTE: This macro has been submitted for inclusion into #
  717. # GNU Autoconf as AC_PROG_GO. When it is available in #
  718. # a released version of Autoconf we should remove this #
  719. # macro and use it instead. #
  720. m4_defun([AC_PROG_GO],
  721. [AC_LANG_PUSH(Go)dnl
  722. AC_ARG_VAR([GOC], [Go compiler command])dnl
  723. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  724. _AC_ARG_VAR_LDFLAGS()dnl
  725. AC_CHECK_TOOL(GOC, gccgo)
  726. if test -z "$GOC"; then
  727. if test -n "$ac_tool_prefix"; then
  728. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  729. fi
  730. fi
  731. if test -z "$GOC"; then
  732. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  733. fi
  734. ])#m4_defun
  735. ])#m4_ifndef
  736. # _LT_LANG_DEFAULT_CONFIG
  737. # -----------------------
  738. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  739. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  740. [LT_LANG(CXX)],
  741. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  742. AC_PROVIDE_IFELSE([AC_PROG_F77],
  743. [LT_LANG(F77)],
  744. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  745. AC_PROVIDE_IFELSE([AC_PROG_FC],
  746. [LT_LANG(FC)],
  747. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  748. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  749. dnl pulling things in needlessly.
  750. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  751. [LT_LANG(GCJ)],
  752. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  753. [LT_LANG(GCJ)],
  754. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  755. [LT_LANG(GCJ)],
  756. [m4_ifdef([AC_PROG_GCJ],
  757. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  758. m4_ifdef([A][M_PROG_GCJ],
  759. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  760. m4_ifdef([LT_PROG_GCJ],
  761. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  762. AC_PROVIDE_IFELSE([AC_PROG_GO],
  763. [LT_LANG(GO)],
  764. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  765. AC_PROVIDE_IFELSE([LT_PROG_RC],
  766. [LT_LANG(RC)],
  767. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  768. ])# _LT_LANG_DEFAULT_CONFIG
  769. # Obsolete macros:
  770. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  771. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  772. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  773. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  774. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  775. dnl aclocal-1.4 backwards compatibility:
  776. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  777. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  778. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  779. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  780. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  781. # _LT_TAG_COMPILER
  782. # ----------------
  783. m4_defun([_LT_TAG_COMPILER],
  784. [AC_REQUIRE([AC_PROG_CC])dnl
  785. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  786. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  787. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  788. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  789. # If no C compiler was specified, use CC.
  790. LTCC=${LTCC-"$CC"}
  791. # If no C compiler flags were specified, use CFLAGS.
  792. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  793. # Allow CC to be a program name with arguments.
  794. compiler=$CC
  795. ])# _LT_TAG_COMPILER
  796. # _LT_COMPILER_BOILERPLATE
  797. # ------------------------
  798. # Check for compiler boilerplate output or warnings with
  799. # the simple compiler test code.
  800. m4_defun([_LT_COMPILER_BOILERPLATE],
  801. [m4_require([_LT_DECL_SED])dnl
  802. ac_outfile=conftest.$ac_objext
  803. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  804. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  805. _lt_compiler_boilerplate=`cat conftest.err`
  806. $RM conftest*
  807. ])# _LT_COMPILER_BOILERPLATE
  808. # _LT_LINKER_BOILERPLATE
  809. # ----------------------
  810. # Check for linker boilerplate output or warnings with
  811. # the simple link test code.
  812. m4_defun([_LT_LINKER_BOILERPLATE],
  813. [m4_require([_LT_DECL_SED])dnl
  814. ac_outfile=conftest.$ac_objext
  815. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  816. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  817. _lt_linker_boilerplate=`cat conftest.err`
  818. $RM -r conftest*
  819. ])# _LT_LINKER_BOILERPLATE
  820. # _LT_REQUIRED_DARWIN_CHECKS
  821. # -------------------------
  822. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  823. case $host_os in
  824. rhapsody* | darwin*)
  825. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  826. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  827. AC_CHECK_TOOL([LIPO], [lipo], [:])
  828. AC_CHECK_TOOL([OTOOL], [otool], [:])
  829. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  830. _LT_DECL([], [DSYMUTIL], [1],
  831. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  832. _LT_DECL([], [NMEDIT], [1],
  833. [Tool to change global to local symbols on Mac OS X])
  834. _LT_DECL([], [LIPO], [1],
  835. [Tool to manipulate fat objects and archives on Mac OS X])
  836. _LT_DECL([], [OTOOL], [1],
  837. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  838. _LT_DECL([], [OTOOL64], [1],
  839. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  840. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  841. [lt_cv_apple_cc_single_mod=no
  842. if test -z "$LT_MULTI_MODULE"; then
  843. # By default we will add the -single_module flag. You can override
  844. # by either setting the environment variable LT_MULTI_MODULE
  845. # non-empty at configure time, or by adding -multi_module to the
  846. # link flags.
  847. rm -rf libconftest.dylib*
  848. echo "int foo(void){return 1;}" > conftest.c
  849. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  850. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  851. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  852. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  853. _lt_result=$?
  854. # If there is a non-empty error log, and "single_module"
  855. # appears in it, assume the flag caused a linker warning
  856. if test -s conftest.err && $GREP single_module conftest.err; then
  857. cat conftest.err >&AS_MESSAGE_LOG_FD
  858. # Otherwise, if the output was created with a 0 exit code from
  859. # the compiler, it worked.
  860. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
  861. lt_cv_apple_cc_single_mod=yes
  862. else
  863. cat conftest.err >&AS_MESSAGE_LOG_FD
  864. fi
  865. rm -rf libconftest.dylib*
  866. rm -f conftest.*
  867. fi])
  868. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  869. [lt_cv_ld_exported_symbols_list],
  870. [lt_cv_ld_exported_symbols_list=no
  871. save_LDFLAGS=$LDFLAGS
  872. echo "_main" > conftest.sym
  873. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  874. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  875. [lt_cv_ld_exported_symbols_list=yes],
  876. [lt_cv_ld_exported_symbols_list=no])
  877. LDFLAGS=$save_LDFLAGS
  878. ])
  879. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  880. [lt_cv_ld_force_load=no
  881. cat > conftest.c << _LT_EOF
  882. int forced_loaded() { return 2;}
  883. _LT_EOF
  884. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  885. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  886. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  887. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  888. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  889. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  890. cat > conftest.c << _LT_EOF
  891. int main() { return 0;}
  892. _LT_EOF
  893. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  894. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  895. _lt_result=$?
  896. if test -s conftest.err && $GREP force_load conftest.err; then
  897. cat conftest.err >&AS_MESSAGE_LOG_FD
  898. elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
  899. lt_cv_ld_force_load=yes
  900. else
  901. cat conftest.err >&AS_MESSAGE_LOG_FD
  902. fi
  903. rm -f conftest.err libconftest.a conftest conftest.c
  904. rm -rf conftest.dSYM
  905. ])
  906. case $host_os in
  907. rhapsody* | darwin1.[[012]])
  908. _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
  909. darwin1.*)
  910. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  911. darwin*) # darwin 5.x on
  912. # if running on 10.5 or later, the deployment target defaults
  913. # to the OS version, if on x86, and 10.4, the deployment
  914. # target defaults to 10.4. Don't you love it?
  915. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  916. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  917. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  918. 10.[[012]][[,.]]*)
  919. _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
  920. 10.*)
  921. _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
  922. esac
  923. ;;
  924. esac
  925. if test yes = "$lt_cv_apple_cc_single_mod"; then
  926. _lt_dar_single_mod='$single_module'
  927. fi
  928. if test yes = "$lt_cv_ld_exported_symbols_list"; then
  929. _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
  930. else
  931. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
  932. fi
  933. if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
  934. _lt_dsymutil='~$DSYMUTIL $lib || :'
  935. else
  936. _lt_dsymutil=
  937. fi
  938. ;;
  939. esac
  940. ])
  941. # _LT_DARWIN_LINKER_FEATURES([TAG])
  942. # ---------------------------------
  943. # Checks for linker and compiler features on darwin
  944. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  945. [
  946. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  947. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  948. _LT_TAGVAR(hardcode_direct, $1)=no
  949. _LT_TAGVAR(hardcode_automatic, $1)=yes
  950. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  951. if test yes = "$lt_cv_ld_force_load"; then
  952. _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
  953. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  954. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  955. else
  956. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  957. fi
  958. _LT_TAGVAR(link_all_deplibs, $1)=yes
  959. _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
  960. case $cc_basename in
  961. ifort*|nagfor*) _lt_dar_can_shared=yes ;;
  962. *) _lt_dar_can_shared=$GCC ;;
  963. esac
  964. if test yes = "$_lt_dar_can_shared"; then
  965. output_verbose_link_cmd=func_echo_all
  966. _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"
  967. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
  968. _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"
  969. _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"
  970. m4_if([$1], [CXX],
  971. [ if test yes != "$lt_cv_apple_cc_single_mod"; then
  972. _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"
  973. _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"
  974. fi
  975. ],[])
  976. else
  977. _LT_TAGVAR(ld_shlibs, $1)=no
  978. fi
  979. ])
  980. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  981. # ----------------------------------
  982. # Links a minimal program and checks the executable
  983. # for the system default hardcoded library path. In most cases,
  984. # this is /usr/lib:/lib, but when the MPI compilers are used
  985. # the location of the communication and MPI libs are included too.
  986. # If we don't find anything, use the default library path according
  987. # to the aix ld manual.
  988. # Store the results from the different compilers for each TAGNAME.
  989. # Allow to override them for all tags through lt_cv_aix_libpath.
  990. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  991. [m4_require([_LT_DECL_SED])dnl
  992. if test set = "${lt_cv_aix_libpath+set}"; then
  993. aix_libpath=$lt_cv_aix_libpath
  994. else
  995. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  996. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  997. lt_aix_libpath_sed='[
  998. /Import File Strings/,/^$/ {
  999. /^0/ {
  1000. s/^0 *\([^ ]*\) *$/\1/
  1001. p
  1002. }
  1003. }]'
  1004. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1005. # Check for a 64-bit object if we didn't find anything.
  1006. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1007. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1008. fi],[])
  1009. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1010. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
  1011. fi
  1012. ])
  1013. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1014. fi
  1015. ])# _LT_SYS_MODULE_PATH_AIX
  1016. # _LT_SHELL_INIT(ARG)
  1017. # -------------------
  1018. m4_define([_LT_SHELL_INIT],
  1019. [m4_divert_text([M4SH-INIT], [$1
  1020. ])])# _LT_SHELL_INIT
  1021. # _LT_PROG_ECHO_BACKSLASH
  1022. # -----------------------
  1023. # Find how we can fake an echo command that does not interpret backslash.
  1024. # In particular, with Autoconf 2.60 or later we add some code to the start
  1025. # of the generated configure script that will find a shell with a builtin
  1026. # printf (that we can use as an echo command).
  1027. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1028. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1029. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1030. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1031. AC_MSG_CHECKING([how to print strings])
  1032. # Test print first, because it will be a builtin if present.
  1033. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1034. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1035. ECHO='print -r --'
  1036. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1037. ECHO='printf %s\n'
  1038. else
  1039. # Use this function as a fallback that always works.
  1040. func_fallback_echo ()
  1041. {
  1042. eval 'cat <<_LTECHO_EOF
  1043. $[]1
  1044. _LTECHO_EOF'
  1045. }
  1046. ECHO='func_fallback_echo'
  1047. fi
  1048. # func_echo_all arg...
  1049. # Invoke $ECHO with all args, space-separated.
  1050. func_echo_all ()
  1051. {
  1052. $ECHO "$*"
  1053. }
  1054. case $ECHO in
  1055. printf*) AC_MSG_RESULT([printf]) ;;
  1056. print*) AC_MSG_RESULT([print -r]) ;;
  1057. *) AC_MSG_RESULT([cat]) ;;
  1058. esac
  1059. m4_ifdef([_AS_DETECT_SUGGESTED],
  1060. [_AS_DETECT_SUGGESTED([
  1061. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1062. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1063. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1064. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1065. PATH=/empty FPATH=/empty; export PATH FPATH
  1066. test "X`printf %s $ECHO`" = "X$ECHO" \
  1067. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1068. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1069. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1070. ])# _LT_PROG_ECHO_BACKSLASH
  1071. # _LT_WITH_SYSROOT
  1072. # ----------------
  1073. AC_DEFUN([_LT_WITH_SYSROOT],
  1074. [AC_MSG_CHECKING([for sysroot])
  1075. AC_ARG_WITH([sysroot],
  1076. [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
  1077. [Search for dependent libraries within DIR (or the compiler's sysroot
  1078. if not specified).])],
  1079. [], [with_sysroot=no])
  1080. dnl lt_sysroot will always be passed unquoted. We quote it here
  1081. dnl in case the user passed a directory name.
  1082. lt_sysroot=
  1083. case $with_sysroot in #(
  1084. yes)
  1085. if test yes = "$GCC"; then
  1086. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1087. fi
  1088. ;; #(
  1089. /*)
  1090. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1091. ;; #(
  1092. no|'')
  1093. ;; #(
  1094. *)
  1095. AC_MSG_RESULT([$with_sysroot])
  1096. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1097. ;;
  1098. esac
  1099. AC_MSG_RESULT([${lt_sysroot:-no}])
  1100. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1101. [dependent libraries, and where our libraries should be installed.])])
  1102. # _LT_ENABLE_LOCK
  1103. # ---------------
  1104. m4_defun([_LT_ENABLE_LOCK],
  1105. [AC_ARG_ENABLE([libtool-lock],
  1106. [AS_HELP_STRING([--disable-libtool-lock],
  1107. [avoid locking (might break parallel builds)])])
  1108. test no = "$enable_libtool_lock" || enable_libtool_lock=yes
  1109. # Some flags need to be propagated to the compiler or linker for good
  1110. # libtool support.
  1111. case $host in
  1112. ia64-*-hpux*)
  1113. # Find out what ABI is being produced by ac_compile, and set mode
  1114. # options accordingly.
  1115. echo 'int i;' > conftest.$ac_ext
  1116. if AC_TRY_EVAL(ac_compile); then
  1117. case `/usr/bin/file conftest.$ac_objext` in
  1118. *ELF-32*)
  1119. HPUX_IA64_MODE=32
  1120. ;;
  1121. *ELF-64*)
  1122. HPUX_IA64_MODE=64
  1123. ;;
  1124. esac
  1125. fi
  1126. rm -rf conftest*
  1127. ;;
  1128. *-*-irix6*)
  1129. # Find out what ABI is being produced by ac_compile, and set linker
  1130. # options accordingly.
  1131. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1132. if AC_TRY_EVAL(ac_compile); then
  1133. if test yes = "$lt_cv_prog_gnu_ld"; then
  1134. case `/usr/bin/file conftest.$ac_objext` in
  1135. *32-bit*)
  1136. LD="${LD-ld} -melf32bsmip"
  1137. ;;
  1138. *N32*)
  1139. LD="${LD-ld} -melf32bmipn32"
  1140. ;;
  1141. *64-bit*)
  1142. LD="${LD-ld} -melf64bmip"
  1143. ;;
  1144. esac
  1145. else
  1146. case `/usr/bin/file conftest.$ac_objext` in
  1147. *32-bit*)
  1148. LD="${LD-ld} -32"
  1149. ;;
  1150. *N32*)
  1151. LD="${LD-ld} -n32"
  1152. ;;
  1153. *64-bit*)
  1154. LD="${LD-ld} -64"
  1155. ;;
  1156. esac
  1157. fi
  1158. fi
  1159. rm -rf conftest*
  1160. ;;
  1161. mips64*-*linux*)
  1162. # Find out what ABI is being produced by ac_compile, and set linker
  1163. # options accordingly.
  1164. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1165. if AC_TRY_EVAL(ac_compile); then
  1166. emul=elf
  1167. case `/usr/bin/file conftest.$ac_objext` in
  1168. *32-bit*)
  1169. emul="${emul}32"
  1170. ;;
  1171. *64-bit*)
  1172. emul="${emul}64"
  1173. ;;
  1174. esac
  1175. case `/usr/bin/file conftest.$ac_objext` in
  1176. *MSB*)
  1177. emul="${emul}btsmip"
  1178. ;;
  1179. *LSB*)
  1180. emul="${emul}ltsmip"
  1181. ;;
  1182. esac
  1183. case `/usr/bin/file conftest.$ac_objext` in
  1184. *N32*)
  1185. emul="${emul}n32"
  1186. ;;
  1187. esac
  1188. LD="${LD-ld} -m $emul"
  1189. fi
  1190. rm -rf conftest*
  1191. ;;
  1192. x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
  1193. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1194. # Find out what ABI is being produced by ac_compile, and set linker
  1195. # options accordingly. Note that the listed cases only cover the
  1196. # situations where additional linker options are needed (such as when
  1197. # doing 32-bit compilation for a host where ld defaults to 64-bit, or
  1198. # vice versa); the common cases where no linker options are needed do
  1199. # not appear in the list.
  1200. echo 'int i;' > conftest.$ac_ext
  1201. if AC_TRY_EVAL(ac_compile); then
  1202. case `/usr/bin/file conftest.o` in
  1203. *32-bit*)
  1204. case $host in
  1205. x86_64-*kfreebsd*-gnu)
  1206. LD="${LD-ld} -m elf_i386_fbsd"
  1207. ;;
  1208. x86_64-*linux*)
  1209. case `/usr/bin/file conftest.o` in
  1210. *x86-64*)
  1211. LD="${LD-ld} -m elf32_x86_64"
  1212. ;;
  1213. *)
  1214. LD="${LD-ld} -m elf_i386"
  1215. ;;
  1216. esac
  1217. ;;
  1218. powerpc64le-*linux*)
  1219. LD="${LD-ld} -m elf32lppclinux"
  1220. ;;
  1221. powerpc64-*linux*)
  1222. LD="${LD-ld} -m elf32ppclinux"
  1223. ;;
  1224. s390x-*linux*)
  1225. LD="${LD-ld} -m elf_s390"
  1226. ;;
  1227. sparc64-*linux*)
  1228. LD="${LD-ld} -m elf32_sparc"
  1229. ;;
  1230. esac
  1231. ;;
  1232. *64-bit*)
  1233. case $host in
  1234. x86_64-*kfreebsd*-gnu)
  1235. LD="${LD-ld} -m elf_x86_64_fbsd"
  1236. ;;
  1237. x86_64-*linux*)
  1238. LD="${LD-ld} -m elf_x86_64"
  1239. ;;
  1240. powerpcle-*linux*)
  1241. LD="${LD-ld} -m elf64lppc"
  1242. ;;
  1243. powerpc-*linux*)
  1244. LD="${LD-ld} -m elf64ppc"
  1245. ;;
  1246. s390*-*linux*|s390*-*tpf*)
  1247. LD="${LD-ld} -m elf64_s390"
  1248. ;;
  1249. sparc*-*linux*)
  1250. LD="${LD-ld} -m elf64_sparc"
  1251. ;;
  1252. esac
  1253. ;;
  1254. esac
  1255. fi
  1256. rm -rf conftest*
  1257. ;;
  1258. *-*-sco3.2v5*)
  1259. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1260. SAVE_CFLAGS=$CFLAGS
  1261. CFLAGS="$CFLAGS -belf"
  1262. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1263. [AC_LANG_PUSH(C)
  1264. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1265. AC_LANG_POP])
  1266. if test yes != "$lt_cv_cc_needs_belf"; then
  1267. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1268. CFLAGS=$SAVE_CFLAGS
  1269. fi
  1270. ;;
  1271. *-*solaris*)
  1272. # Find out what ABI is being produced by ac_compile, and set linker
  1273. # options accordingly.
  1274. echo 'int i;' > conftest.$ac_ext
  1275. if AC_TRY_EVAL(ac_compile); then
  1276. case `/usr/bin/file conftest.o` in
  1277. *64-bit*)
  1278. case $lt_cv_prog_gnu_ld in
  1279. yes*)
  1280. case $host in
  1281. i?86-*-solaris*|x86_64-*-solaris*)
  1282. LD="${LD-ld} -m elf_x86_64"
  1283. ;;
  1284. sparc*-*-solaris*)
  1285. LD="${LD-ld} -m elf64_sparc"
  1286. ;;
  1287. esac
  1288. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1289. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1290. LD=${LD-ld}_sol2
  1291. fi
  1292. ;;
  1293. *)
  1294. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1295. LD="${LD-ld} -64"
  1296. fi
  1297. ;;
  1298. esac
  1299. ;;
  1300. esac
  1301. fi
  1302. rm -rf conftest*
  1303. ;;
  1304. esac
  1305. need_locks=$enable_libtool_lock
  1306. ])# _LT_ENABLE_LOCK
  1307. # _LT_PROG_AR
  1308. # -----------
  1309. m4_defun([_LT_PROG_AR],
  1310. [AC_CHECK_TOOLS(AR, [ar], false)
  1311. : ${AR=ar}
  1312. : ${AR_FLAGS=cru}
  1313. _LT_DECL([], [AR], [1], [The archiver])
  1314. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1315. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1316. [lt_cv_ar_at_file=no
  1317. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1318. [echo conftest.$ac_objext > conftest.lst
  1319. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1320. AC_TRY_EVAL([lt_ar_try])
  1321. if test 0 -eq "$ac_status"; then
  1322. # Ensure the archiver fails upon bogus file names.
  1323. rm -f conftest.$ac_objext libconftest.a
  1324. AC_TRY_EVAL([lt_ar_try])
  1325. if test 0 -ne "$ac_status"; then
  1326. lt_cv_ar_at_file=@
  1327. fi
  1328. fi
  1329. rm -f conftest.* libconftest.a
  1330. ])
  1331. ])
  1332. if test no = "$lt_cv_ar_at_file"; then
  1333. archiver_list_spec=
  1334. else
  1335. archiver_list_spec=$lt_cv_ar_at_file
  1336. fi
  1337. _LT_DECL([], [archiver_list_spec], [1],
  1338. [How to feed a file listing to the archiver])
  1339. ])# _LT_PROG_AR
  1340. # _LT_CMD_OLD_ARCHIVE
  1341. # -------------------
  1342. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1343. [_LT_PROG_AR
  1344. AC_CHECK_TOOL(STRIP, strip, :)
  1345. test -z "$STRIP" && STRIP=:
  1346. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1347. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1348. test -z "$RANLIB" && RANLIB=:
  1349. _LT_DECL([], [RANLIB], [1],
  1350. [Commands used to install an old-style archive])
  1351. # Determine commands to create old-style static archives.
  1352. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1353. old_postinstall_cmds='chmod 644 $oldlib'
  1354. old_postuninstall_cmds=
  1355. if test -n "$RANLIB"; then
  1356. case $host_os in
  1357. bitrig* | openbsd*)
  1358. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1359. ;;
  1360. *)
  1361. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1362. ;;
  1363. esac
  1364. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1365. fi
  1366. case $host_os in
  1367. darwin*)
  1368. lock_old_archive_extraction=yes ;;
  1369. *)
  1370. lock_old_archive_extraction=no ;;
  1371. esac
  1372. _LT_DECL([], [old_postinstall_cmds], [2])
  1373. _LT_DECL([], [old_postuninstall_cmds], [2])
  1374. _LT_TAGDECL([], [old_archive_cmds], [2],
  1375. [Commands used to build an old-style archive])
  1376. _LT_DECL([], [lock_old_archive_extraction], [0],
  1377. [Whether to use a lock for old archive extraction])
  1378. ])# _LT_CMD_OLD_ARCHIVE
  1379. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1380. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1381. # ----------------------------------------------------------------
  1382. # Check whether the given compiler option works
  1383. AC_DEFUN([_LT_COMPILER_OPTION],
  1384. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1385. m4_require([_LT_DECL_SED])dnl
  1386. AC_CACHE_CHECK([$1], [$2],
  1387. [$2=no
  1388. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1389. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1390. lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
  1391. # Insert the option either (1) after the last *FLAGS variable, or
  1392. # (2) before a word containing "conftest.", or (3) at the end.
  1393. # Note that $ac_compile itself does not contain backslashes and begins
  1394. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1395. # The option is referenced via a variable to avoid confusing sed.
  1396. lt_compile=`echo "$ac_compile" | $SED \
  1397. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1398. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1399. -e 's:$: $lt_compiler_flag:'`
  1400. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1401. (eval "$lt_compile" 2>conftest.err)
  1402. ac_status=$?
  1403. cat conftest.err >&AS_MESSAGE_LOG_FD
  1404. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1405. if (exit $ac_status) && test -s "$ac_outfile"; then
  1406. # The compiler can only warn and ignore the option if not recognized
  1407. # So say no if there are warnings other than the usual output.
  1408. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1409. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1410. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1411. $2=yes
  1412. fi
  1413. fi
  1414. $RM conftest*
  1415. ])
  1416. if test yes = "[$]$2"; then
  1417. m4_if([$5], , :, [$5])
  1418. else
  1419. m4_if([$6], , :, [$6])
  1420. fi
  1421. ])# _LT_COMPILER_OPTION
  1422. # Old name:
  1423. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1424. dnl aclocal-1.4 backwards compatibility:
  1425. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1426. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1427. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1428. # ----------------------------------------------------
  1429. # Check whether the given linker option works
  1430. AC_DEFUN([_LT_LINKER_OPTION],
  1431. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1432. m4_require([_LT_DECL_SED])dnl
  1433. AC_CACHE_CHECK([$1], [$2],
  1434. [$2=no
  1435. save_LDFLAGS=$LDFLAGS
  1436. LDFLAGS="$LDFLAGS $3"
  1437. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1438. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1439. # The linker can only warn and ignore the option if not recognized
  1440. # So say no if there are warnings
  1441. if test -s conftest.err; then
  1442. # Append any errors to the config.log.
  1443. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1444. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1445. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1446. if diff conftest.exp conftest.er2 >/dev/null; then
  1447. $2=yes
  1448. fi
  1449. else
  1450. $2=yes
  1451. fi
  1452. fi
  1453. $RM -r conftest*
  1454. LDFLAGS=$save_LDFLAGS
  1455. ])
  1456. if test yes = "[$]$2"; then
  1457. m4_if([$4], , :, [$4])
  1458. else
  1459. m4_if([$5], , :, [$5])
  1460. fi
  1461. ])# _LT_LINKER_OPTION
  1462. # Old name:
  1463. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1464. dnl aclocal-1.4 backwards compatibility:
  1465. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1466. # LT_CMD_MAX_LEN
  1467. #---------------
  1468. AC_DEFUN([LT_CMD_MAX_LEN],
  1469. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1470. # find the maximum length of command line arguments
  1471. AC_MSG_CHECKING([the maximum length of command line arguments])
  1472. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1473. i=0
  1474. teststring=ABCD
  1475. case $build_os in
  1476. msdosdjgpp*)
  1477. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1478. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1479. # during glob expansion). Even if it were fixed, the result of this
  1480. # check would be larger than it should be.
  1481. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1482. ;;
  1483. gnu*)
  1484. # Under GNU Hurd, this test is not required because there is
  1485. # no limit to the length of command line arguments.
  1486. # Libtool will interpret -1 as no limit whatsoever
  1487. lt_cv_sys_max_cmd_len=-1;
  1488. ;;
  1489. cygwin* | mingw* | cegcc*)
  1490. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1491. # about 5 minutes as the teststring grows exponentially.
  1492. # Worse, since 9x/ME are not pre-emptively multitasking,
  1493. # you end up with a "frozen" computer, even though with patience
  1494. # the test eventually succeeds (with a max line length of 256k).
  1495. # Instead, let's just punt: use the minimum linelength reported by
  1496. # all of the supported platforms: 8192 (on NT/2K/XP).
  1497. lt_cv_sys_max_cmd_len=8192;
  1498. ;;
  1499. mint*)
  1500. # On MiNT this can take a long time and run out of memory.
  1501. lt_cv_sys_max_cmd_len=8192;
  1502. ;;
  1503. amigaos*)
  1504. # On AmigaOS with pdksh, this test takes hours, literally.
  1505. # So we just punt and use a minimum line length of 8192.
  1506. lt_cv_sys_max_cmd_len=8192;
  1507. ;;
  1508. bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
  1509. # This has been around since 386BSD, at least. Likely further.
  1510. if test -x /sbin/sysctl; then
  1511. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1512. elif test -x /usr/sbin/sysctl; then
  1513. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1514. else
  1515. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1516. fi
  1517. # And add a safety zone
  1518. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1519. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1520. ;;
  1521. interix*)
  1522. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1523. lt_cv_sys_max_cmd_len=196608
  1524. ;;
  1525. os2*)
  1526. # The test takes a long time on OS/2.
  1527. lt_cv_sys_max_cmd_len=8192
  1528. ;;
  1529. osf*)
  1530. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1531. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1532. # nice to cause kernel panics so lets avoid the loop below.
  1533. # First set a reasonable default.
  1534. lt_cv_sys_max_cmd_len=16384
  1535. #
  1536. if test -x /sbin/sysconfig; then
  1537. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1538. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1539. esac
  1540. fi
  1541. ;;
  1542. sco3.2v5*)
  1543. lt_cv_sys_max_cmd_len=102400
  1544. ;;
  1545. sysv5* | sco5v6* | sysv4.2uw2*)
  1546. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1547. if test -n "$kargmax"; then
  1548. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1549. else
  1550. lt_cv_sys_max_cmd_len=32768
  1551. fi
  1552. ;;
  1553. *)
  1554. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1555. if test -n "$lt_cv_sys_max_cmd_len" && \
  1556. test undefined != "$lt_cv_sys_max_cmd_len"; then
  1557. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1558. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1559. else
  1560. # Make teststring a little bigger before we do anything with it.
  1561. # a 1K string should be a reasonable start.
  1562. for i in 1 2 3 4 5 6 7 8; do
  1563. teststring=$teststring$teststring
  1564. done
  1565. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1566. # If test is not a shell built-in, we'll probably end up computing a
  1567. # maximum length that is only half of the actual maximum length, but
  1568. # we can't tell.
  1569. while { test X`env echo "$teststring$teststring" 2>/dev/null` \
  1570. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1571. test 17 != "$i" # 1/2 MB should be enough
  1572. do
  1573. i=`expr $i + 1`
  1574. teststring=$teststring$teststring
  1575. done
  1576. # Only check the string length outside the loop.
  1577. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1578. teststring=
  1579. # Add a significant safety factor because C++ compilers can tack on
  1580. # massive amounts of additional arguments before passing them to the
  1581. # linker. It appears as though 1/2 is a usable value.
  1582. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1583. fi
  1584. ;;
  1585. esac
  1586. ])
  1587. if test -n "$lt_cv_sys_max_cmd_len"; then
  1588. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1589. else
  1590. AC_MSG_RESULT(none)
  1591. fi
  1592. max_cmd_len=$lt_cv_sys_max_cmd_len
  1593. _LT_DECL([], [max_cmd_len], [0],
  1594. [What is the maximum length of a command?])
  1595. ])# LT_CMD_MAX_LEN
  1596. # Old name:
  1597. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1598. dnl aclocal-1.4 backwards compatibility:
  1599. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1600. # _LT_HEADER_DLFCN
  1601. # ----------------
  1602. m4_defun([_LT_HEADER_DLFCN],
  1603. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1604. ])# _LT_HEADER_DLFCN
  1605. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1606. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1607. # ----------------------------------------------------------------
  1608. m4_defun([_LT_TRY_DLOPEN_SELF],
  1609. [m4_require([_LT_HEADER_DLFCN])dnl
  1610. if test yes = "$cross_compiling"; then :
  1611. [$4]
  1612. else
  1613. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1614. lt_status=$lt_dlunknown
  1615. cat > conftest.$ac_ext <<_LT_EOF
  1616. [#line $LINENO "configure"
  1617. #include "confdefs.h"
  1618. #if HAVE_DLFCN_H
  1619. #include <dlfcn.h>
  1620. #endif
  1621. #include <stdio.h>
  1622. #ifdef RTLD_GLOBAL
  1623. # define LT_DLGLOBAL RTLD_GLOBAL
  1624. #else
  1625. # ifdef DL_GLOBAL
  1626. # define LT_DLGLOBAL DL_GLOBAL
  1627. # else
  1628. # define LT_DLGLOBAL 0
  1629. # endif
  1630. #endif
  1631. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1632. find out it does not work in some platform. */
  1633. #ifndef LT_DLLAZY_OR_NOW
  1634. # ifdef RTLD_LAZY
  1635. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1636. # else
  1637. # ifdef DL_LAZY
  1638. # define LT_DLLAZY_OR_NOW DL_LAZY
  1639. # else
  1640. # ifdef RTLD_NOW
  1641. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1642. # else
  1643. # ifdef DL_NOW
  1644. # define LT_DLLAZY_OR_NOW DL_NOW
  1645. # else
  1646. # define LT_DLLAZY_OR_NOW 0
  1647. # endif
  1648. # endif
  1649. # endif
  1650. # endif
  1651. #endif
  1652. /* When -fvisibility=hidden is used, assume the code has been annotated
  1653. correspondingly for the symbols needed. */
  1654. #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1655. int fnord () __attribute__((visibility("default")));
  1656. #endif
  1657. int fnord () { return 42; }
  1658. int main ()
  1659. {
  1660. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1661. int status = $lt_dlunknown;
  1662. if (self)
  1663. {
  1664. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1665. else
  1666. {
  1667. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1668. else puts (dlerror ());
  1669. }
  1670. /* dlclose (self); */
  1671. }
  1672. else
  1673. puts (dlerror ());
  1674. return status;
  1675. }]
  1676. _LT_EOF
  1677. if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
  1678. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1679. lt_status=$?
  1680. case x$lt_status in
  1681. x$lt_dlno_uscore) $1 ;;
  1682. x$lt_dlneed_uscore) $2 ;;
  1683. x$lt_dlunknown|x*) $3 ;;
  1684. esac
  1685. else :
  1686. # compilation failed
  1687. $3
  1688. fi
  1689. fi
  1690. rm -fr conftest*
  1691. ])# _LT_TRY_DLOPEN_SELF
  1692. # LT_SYS_DLOPEN_SELF
  1693. # ------------------
  1694. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1695. [m4_require([_LT_HEADER_DLFCN])dnl
  1696. if test yes != "$enable_dlopen"; then
  1697. enable_dlopen=unknown
  1698. enable_dlopen_self=unknown
  1699. enable_dlopen_self_static=unknown
  1700. else
  1701. lt_cv_dlopen=no
  1702. lt_cv_dlopen_libs=
  1703. case $host_os in
  1704. beos*)
  1705. lt_cv_dlopen=load_add_on
  1706. lt_cv_dlopen_libs=
  1707. lt_cv_dlopen_self=yes
  1708. ;;
  1709. mingw* | pw32* | cegcc*)
  1710. lt_cv_dlopen=LoadLibrary
  1711. lt_cv_dlopen_libs=
  1712. ;;
  1713. cygwin*)
  1714. lt_cv_dlopen=dlopen
  1715. lt_cv_dlopen_libs=
  1716. ;;
  1717. darwin*)
  1718. # if libdl is installed we need to link against it
  1719. AC_CHECK_LIB([dl], [dlopen],
  1720. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
  1721. lt_cv_dlopen=dyld
  1722. lt_cv_dlopen_libs=
  1723. lt_cv_dlopen_self=yes
  1724. ])
  1725. ;;
  1726. tpf*)
  1727. # Don't try to run any link tests for TPF. We know it's impossible
  1728. # because TPF is a cross-compiler, and we know how we open DSOs.
  1729. lt_cv_dlopen=dlopen
  1730. lt_cv_dlopen_libs=
  1731. lt_cv_dlopen_self=no
  1732. ;;
  1733. *)
  1734. AC_CHECK_FUNC([shl_load],
  1735. [lt_cv_dlopen=shl_load],
  1736. [AC_CHECK_LIB([dld], [shl_load],
  1737. [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
  1738. [AC_CHECK_FUNC([dlopen],
  1739. [lt_cv_dlopen=dlopen],
  1740. [AC_CHECK_LIB([dl], [dlopen],
  1741. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
  1742. [AC_CHECK_LIB([svld], [dlopen],
  1743. [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
  1744. [AC_CHECK_LIB([dld], [dld_link],
  1745. [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
  1746. ])
  1747. ])
  1748. ])
  1749. ])
  1750. ])
  1751. ;;
  1752. esac
  1753. if test no = "$lt_cv_dlopen"; then
  1754. enable_dlopen=no
  1755. else
  1756. enable_dlopen=yes
  1757. fi
  1758. case $lt_cv_dlopen in
  1759. dlopen)
  1760. save_CPPFLAGS=$CPPFLAGS
  1761. test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1762. save_LDFLAGS=$LDFLAGS
  1763. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1764. save_LIBS=$LIBS
  1765. LIBS="$lt_cv_dlopen_libs $LIBS"
  1766. AC_CACHE_CHECK([whether a program can dlopen itself],
  1767. lt_cv_dlopen_self, [dnl
  1768. _LT_TRY_DLOPEN_SELF(
  1769. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1770. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1771. ])
  1772. if test yes = "$lt_cv_dlopen_self"; then
  1773. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1774. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1775. lt_cv_dlopen_self_static, [dnl
  1776. _LT_TRY_DLOPEN_SELF(
  1777. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1778. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1779. ])
  1780. fi
  1781. CPPFLAGS=$save_CPPFLAGS
  1782. LDFLAGS=$save_LDFLAGS
  1783. LIBS=$save_LIBS
  1784. ;;
  1785. esac
  1786. case $lt_cv_dlopen_self in
  1787. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1788. *) enable_dlopen_self=unknown ;;
  1789. esac
  1790. case $lt_cv_dlopen_self_static in
  1791. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1792. *) enable_dlopen_self_static=unknown ;;
  1793. esac
  1794. fi
  1795. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1796. [Whether dlopen is supported])
  1797. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1798. [Whether dlopen of programs is supported])
  1799. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1800. [Whether dlopen of statically linked programs is supported])
  1801. ])# LT_SYS_DLOPEN_SELF
  1802. # Old name:
  1803. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1804. dnl aclocal-1.4 backwards compatibility:
  1805. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1806. # _LT_COMPILER_C_O([TAGNAME])
  1807. # ---------------------------
  1808. # Check to see if options -c and -o are simultaneously supported by compiler.
  1809. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1810. m4_defun([_LT_COMPILER_C_O],
  1811. [m4_require([_LT_DECL_SED])dnl
  1812. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1813. m4_require([_LT_TAG_COMPILER])dnl
  1814. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1815. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1816. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1817. $RM -r conftest 2>/dev/null
  1818. mkdir conftest
  1819. cd conftest
  1820. mkdir out
  1821. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1822. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1823. # Insert the option either (1) after the last *FLAGS variable, or
  1824. # (2) before a word containing "conftest.", or (3) at the end.
  1825. # Note that $ac_compile itself does not contain backslashes and begins
  1826. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1827. lt_compile=`echo "$ac_compile" | $SED \
  1828. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1829. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1830. -e 's:$: $lt_compiler_flag:'`
  1831. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1832. (eval "$lt_compile" 2>out/conftest.err)
  1833. ac_status=$?
  1834. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1835. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1836. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1837. then
  1838. # The compiler can only warn and ignore the option if not recognized
  1839. # So say no if there are warnings
  1840. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1841. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1842. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1843. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1844. fi
  1845. fi
  1846. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1847. $RM conftest*
  1848. # SGI C++ compiler will create directory out/ii_files/ for
  1849. # template instantiation
  1850. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1851. $RM out/* && rmdir out
  1852. cd ..
  1853. $RM -r conftest
  1854. $RM conftest*
  1855. ])
  1856. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1857. [Does compiler simultaneously support -c and -o options?])
  1858. ])# _LT_COMPILER_C_O
  1859. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1860. # ----------------------------------
  1861. # Check to see if we can do hard links to lock some files if needed
  1862. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1863. [m4_require([_LT_ENABLE_LOCK])dnl
  1864. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1865. _LT_COMPILER_C_O([$1])
  1866. hard_links=nottested
  1867. if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
  1868. # do not overwrite the value of need_locks provided by the user
  1869. AC_MSG_CHECKING([if we can lock with hard links])
  1870. hard_links=yes
  1871. $RM conftest*
  1872. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1873. touch conftest.a
  1874. ln conftest.a conftest.b 2>&5 || hard_links=no
  1875. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1876. AC_MSG_RESULT([$hard_links])
  1877. if test no = "$hard_links"; then
  1878. AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
  1879. need_locks=warn
  1880. fi
  1881. else
  1882. need_locks=no
  1883. fi
  1884. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1885. ])# _LT_COMPILER_FILE_LOCKS
  1886. # _LT_CHECK_OBJDIR
  1887. # ----------------
  1888. m4_defun([_LT_CHECK_OBJDIR],
  1889. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1890. [rm -f .libs 2>/dev/null
  1891. mkdir .libs 2>/dev/null
  1892. if test -d .libs; then
  1893. lt_cv_objdir=.libs
  1894. else
  1895. # MS-DOS does not allow filenames that begin with a dot.
  1896. lt_cv_objdir=_libs
  1897. fi
  1898. rmdir .libs 2>/dev/null])
  1899. objdir=$lt_cv_objdir
  1900. _LT_DECL([], [objdir], [0],
  1901. [The name of the directory that contains temporary libtool files])dnl
  1902. m4_pattern_allow([LT_OBJDIR])dnl
  1903. AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
  1904. [Define to the sub-directory where libtool stores uninstalled libraries.])
  1905. ])# _LT_CHECK_OBJDIR
  1906. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1907. # --------------------------------------
  1908. # Check hardcoding attributes.
  1909. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1910. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1911. _LT_TAGVAR(hardcode_action, $1)=
  1912. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1913. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1914. test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
  1915. # We can hardcode non-existent directories.
  1916. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
  1917. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1918. # have to relink, otherwise we might link with an installed library
  1919. # when we should be linking with a yet-to-be-installed one
  1920. ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
  1921. test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
  1922. # Linking always hardcodes the temporary library directory.
  1923. _LT_TAGVAR(hardcode_action, $1)=relink
  1924. else
  1925. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1926. _LT_TAGVAR(hardcode_action, $1)=immediate
  1927. fi
  1928. else
  1929. # We cannot hardcode anything, or else we can only hardcode existing
  1930. # directories.
  1931. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1932. fi
  1933. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1934. if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
  1935. test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
  1936. # Fast installation is not supported
  1937. enable_fast_install=no
  1938. elif test yes = "$shlibpath_overrides_runpath" ||
  1939. test no = "$enable_shared"; then
  1940. # Fast installation is not necessary
  1941. enable_fast_install=needless
  1942. fi
  1943. _LT_TAGDECL([], [hardcode_action], [0],
  1944. [How to hardcode a shared library path into an executable])
  1945. ])# _LT_LINKER_HARDCODE_LIBPATH
  1946. # _LT_CMD_STRIPLIB
  1947. # ----------------
  1948. m4_defun([_LT_CMD_STRIPLIB],
  1949. [m4_require([_LT_DECL_EGREP])
  1950. striplib=
  1951. old_striplib=
  1952. AC_MSG_CHECKING([whether stripping libraries is possible])
  1953. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1954. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1955. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1956. AC_MSG_RESULT([yes])
  1957. else
  1958. # FIXME - insert some real tests, host_os isn't really good enough
  1959. case $host_os in
  1960. darwin*)
  1961. if test -n "$STRIP"; then
  1962. striplib="$STRIP -x"
  1963. old_striplib="$STRIP -S"
  1964. AC_MSG_RESULT([yes])
  1965. else
  1966. AC_MSG_RESULT([no])
  1967. fi
  1968. ;;
  1969. *)
  1970. AC_MSG_RESULT([no])
  1971. ;;
  1972. esac
  1973. fi
  1974. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1975. _LT_DECL([], [striplib], [1])
  1976. ])# _LT_CMD_STRIPLIB
  1977. # _LT_PREPARE_MUNGE_PATH_LIST
  1978. # ---------------------------
  1979. # Make sure func_munge_path_list() is defined correctly.
  1980. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
  1981. [[# func_munge_path_list VARIABLE PATH
  1982. # -----------------------------------
  1983. # VARIABLE is name of variable containing _space_ separated list of
  1984. # directories to be munged by the contents of PATH, which is string
  1985. # having a format:
  1986. # "DIR[:DIR]:"
  1987. # string "DIR[ DIR]" will be prepended to VARIABLE
  1988. # ":DIR[:DIR]"
  1989. # string "DIR[ DIR]" will be appended to VARIABLE
  1990. # "DIRP[:DIRP]::[DIRA:]DIRA"
  1991. # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
  1992. # "DIRA[ DIRA]" will be appended to VARIABLE
  1993. # "DIR[:DIR]"
  1994. # VARIABLE will be replaced by "DIR[ DIR]"
  1995. func_munge_path_list ()
  1996. {
  1997. case x@S|@2 in
  1998. x)
  1999. ;;
  2000. *:)
  2001. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
  2002. ;;
  2003. x:*)
  2004. eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2005. ;;
  2006. *::*)
  2007. eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
  2008. eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
  2009. ;;
  2010. *)
  2011. eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
  2012. ;;
  2013. esac
  2014. }
  2015. ]])# _LT_PREPARE_PATH_LIST
  2016. # _LT_SYS_DYNAMIC_LINKER([TAG])
  2017. # -----------------------------
  2018. # PORTME Fill in your ld.so characteristics
  2019. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  2020. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2021. m4_require([_LT_DECL_EGREP])dnl
  2022. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2023. m4_require([_LT_DECL_OBJDUMP])dnl
  2024. m4_require([_LT_DECL_SED])dnl
  2025. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2026. m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
  2027. AC_MSG_CHECKING([dynamic linker characteristics])
  2028. m4_if([$1],
  2029. [], [
  2030. if test yes = "$GCC"; then
  2031. case $host_os in
  2032. darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
  2033. *) lt_awk_arg='/^libraries:/' ;;
  2034. esac
  2035. case $host_os in
  2036. mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
  2037. *) lt_sed_strip_eq='s|=/|/|g' ;;
  2038. esac
  2039. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  2040. case $lt_search_path_spec in
  2041. *\;*)
  2042. # if the path contains ";" then we assume it to be the separator
  2043. # otherwise default to the standard path separator (i.e. ":") - it is
  2044. # assumed that no part of a normal pathname contains ";" but that should
  2045. # okay in the real world where ";" in dirpaths is itself problematic.
  2046. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  2047. ;;
  2048. *)
  2049. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  2050. ;;
  2051. esac
  2052. # Ok, now we have the path, separated by spaces, we can step through it
  2053. # and add multilib dir if necessary...
  2054. lt_tmp_lt_search_path_spec=
  2055. lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  2056. # ...but if some path component already ends with the multilib dir we assume
  2057. # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
  2058. case "$lt_multi_os_dir; $lt_search_path_spec " in
  2059. "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
  2060. lt_multi_os_dir=
  2061. ;;
  2062. esac
  2063. for lt_sys_path in $lt_search_path_spec; do
  2064. if test -d "$lt_sys_path$lt_multi_os_dir"; then
  2065. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
  2066. elif test -n "$lt_multi_os_dir"; then
  2067. test -d "$lt_sys_path" && \
  2068. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  2069. fi
  2070. done
  2071. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  2072. BEGIN {RS = " "; FS = "/|\n";} {
  2073. lt_foo = "";
  2074. lt_count = 0;
  2075. for (lt_i = NF; lt_i > 0; lt_i--) {
  2076. if ($lt_i != "" && $lt_i != ".") {
  2077. if ($lt_i == "..") {
  2078. lt_count++;
  2079. } else {
  2080. if (lt_count == 0) {
  2081. lt_foo = "/" $lt_i lt_foo;
  2082. } else {
  2083. lt_count--;
  2084. }
  2085. }
  2086. }
  2087. }
  2088. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  2089. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  2090. }'`
  2091. # AWK program above erroneously prepends '/' to C:/dos/paths
  2092. # for these hosts.
  2093. case $host_os in
  2094. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  2095. $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
  2096. esac
  2097. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  2098. else
  2099. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2100. fi])
  2101. library_names_spec=
  2102. libname_spec='lib$name'
  2103. soname_spec=
  2104. shrext_cmds=.so
  2105. postinstall_cmds=
  2106. postuninstall_cmds=
  2107. finish_cmds=
  2108. finish_eval=
  2109. shlibpath_var=
  2110. shlibpath_overrides_runpath=unknown
  2111. version_type=none
  2112. dynamic_linker="$host_os ld.so"
  2113. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2114. need_lib_prefix=unknown
  2115. hardcode_into_libs=no
  2116. # when you set need_version to no, make sure it does not cause -set_version
  2117. # flags to be left without arguments
  2118. need_version=unknown
  2119. AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
  2120. [User-defined run-time library search path.])
  2121. case $host_os in
  2122. aix3*)
  2123. version_type=linux # correct to gnu/linux during the next big refactor
  2124. library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
  2125. shlibpath_var=LIBPATH
  2126. # AIX 3 has no versioning support, so we append a major version to the name.
  2127. soname_spec='$libname$release$shared_ext$major'
  2128. ;;
  2129. aix[[4-9]]*)
  2130. version_type=linux # correct to gnu/linux during the next big refactor
  2131. need_lib_prefix=no
  2132. need_version=no
  2133. hardcode_into_libs=yes
  2134. if test ia64 = "$host_cpu"; then
  2135. # AIX 5 supports IA64
  2136. library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
  2137. shlibpath_var=LD_LIBRARY_PATH
  2138. else
  2139. # With GCC up to 2.95.x, collect2 would create an import file
  2140. # for dependence libraries. The import file would start with
  2141. # the line '#! .'. This would cause the generated library to
  2142. # depend on '.', always an invalid library. This was fixed in
  2143. # development snapshots of GCC prior to 3.0.
  2144. case $host_os in
  2145. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2146. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2147. echo ' yes '
  2148. echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
  2149. :
  2150. else
  2151. can_build_shared=no
  2152. fi
  2153. ;;
  2154. esac
  2155. # Using Import Files as archive members, it is possible to support
  2156. # filename-based versioning of shared library archives on AIX. While
  2157. # this would work for both with and without runtime linking, it will
  2158. # prevent static linking of such archives. So we do filename-based
  2159. # shared library versioning with .so extension only, which is used
  2160. # when both runtime linking and shared linking is enabled.
  2161. # Unfortunately, runtime linking may impact performance, so we do
  2162. # not want this to be the default eventually. Also, we use the
  2163. # versioned .so libs for executables only if there is the -brtl
  2164. # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
  2165. # To allow for filename-based versioning support, we need to create
  2166. # libNAME.so.V as an archive file, containing:
  2167. # *) an Import File, referring to the versioned filename of the
  2168. # archive as well as the shared archive member, telling the
  2169. # bitwidth (32 or 64) of that shared object, and providing the
  2170. # list of exported symbols of that shared object, eventually
  2171. # decorated with the 'weak' keyword
  2172. # *) the shared object with the F_LOADONLY flag set, to really avoid
  2173. # it being seen by the linker.
  2174. # At run time we better use the real file rather than another symlink,
  2175. # but for link time we create the symlink libNAME.so -> libNAME.so.V
  2176. case $with_aix_soname,$aix_use_runtimelinking in
  2177. # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
  2178. # soname into executable. Probably we can add versioning support to
  2179. # collect2, so additional links can be useful in future.
  2180. aix,yes) # traditional libtool
  2181. dynamic_linker='AIX unversionable lib.so'
  2182. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2183. # instead of lib<name>.a to let people know that these are not
  2184. # typical AIX shared libraries.
  2185. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2186. ;;
  2187. aix,no) # traditional AIX only
  2188. dynamic_linker='AIX lib.a[(]lib.so.V[)]'
  2189. # We preserve .a as extension for shared libraries through AIX4.2
  2190. # and later when we are not doing run time linking.
  2191. library_names_spec='$libname$release.a $libname.a'
  2192. soname_spec='$libname$release$shared_ext$major'
  2193. ;;
  2194. svr4,*) # full svr4 only
  2195. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
  2196. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2197. # We do not specify a path in Import Files, so LIBPATH fires.
  2198. shlibpath_overrides_runpath=yes
  2199. ;;
  2200. *,yes) # both, prefer svr4
  2201. dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
  2202. library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
  2203. # unpreferred sharedlib libNAME.a needs extra handling
  2204. postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
  2205. postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
  2206. # We do not specify a path in Import Files, so LIBPATH fires.
  2207. shlibpath_overrides_runpath=yes
  2208. ;;
  2209. *,no) # both, prefer aix
  2210. dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
  2211. library_names_spec='$libname$release.a $libname.a'
  2212. soname_spec='$libname$release$shared_ext$major'
  2213. # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
  2214. postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
  2215. postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
  2216. ;;
  2217. esac
  2218. shlibpath_var=LIBPATH
  2219. fi
  2220. ;;
  2221. amigaos*)
  2222. case $host_cpu in
  2223. powerpc)
  2224. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2225. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2226. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2227. ;;
  2228. m68k)
  2229. library_names_spec='$libname.ixlibrary $libname.a'
  2230. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2231. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  2232. ;;
  2233. esac
  2234. ;;
  2235. beos*)
  2236. library_names_spec='$libname$shared_ext'
  2237. dynamic_linker="$host_os ld.so"
  2238. shlibpath_var=LIBRARY_PATH
  2239. ;;
  2240. bsdi[[45]]*)
  2241. version_type=linux # correct to gnu/linux during the next big refactor
  2242. need_version=no
  2243. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2244. soname_spec='$libname$release$shared_ext$major'
  2245. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2246. shlibpath_var=LD_LIBRARY_PATH
  2247. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2248. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2249. # the default ld.so.conf also contains /usr/contrib/lib and
  2250. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2251. # libtool to hard-code these into programs
  2252. ;;
  2253. cygwin* | mingw* | pw32* | cegcc*)
  2254. version_type=windows
  2255. shrext_cmds=.dll
  2256. need_version=no
  2257. need_lib_prefix=no
  2258. case $GCC,$cc_basename in
  2259. yes,*)
  2260. # gcc
  2261. library_names_spec='$libname.dll.a'
  2262. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2263. postinstall_cmds='base_file=`basename \$file`~
  2264. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2265. dldir=$destdir/`dirname \$dlpath`~
  2266. test -d \$dldir || mkdir -p \$dldir~
  2267. $install_prog $dir/$dlname \$dldir/$dlname~
  2268. chmod a+x \$dldir/$dlname~
  2269. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2270. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2271. fi'
  2272. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2273. dlpath=$dir/\$dldll~
  2274. $RM \$dlpath'
  2275. shlibpath_overrides_runpath=yes
  2276. case $host_os in
  2277. cygwin*)
  2278. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2279. soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2280. m4_if([$1], [],[
  2281. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2282. ;;
  2283. mingw* | cegcc*)
  2284. # MinGW DLLs use traditional 'lib' prefix
  2285. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2286. ;;
  2287. pw32*)
  2288. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2289. library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2290. ;;
  2291. esac
  2292. dynamic_linker='Win32 ld.exe'
  2293. ;;
  2294. *,cl*)
  2295. # Native MSVC
  2296. libname_spec='$name'
  2297. soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
  2298. library_names_spec='$libname.dll.lib'
  2299. case $build_os in
  2300. mingw*)
  2301. sys_lib_search_path_spec=
  2302. lt_save_ifs=$IFS
  2303. IFS=';'
  2304. for lt_path in $LIB
  2305. do
  2306. IFS=$lt_save_ifs
  2307. # Let DOS variable expansion print the short 8.3 style file name.
  2308. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2309. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2310. done
  2311. IFS=$lt_save_ifs
  2312. # Convert to MSYS style.
  2313. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2314. ;;
  2315. cygwin*)
  2316. # Convert to unix form, then to dos form, then back to unix form
  2317. # but this time dos style (no spaces!) so that the unix form looks
  2318. # like /cygdrive/c/PROGRA~1:/cygdr...
  2319. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2320. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2321. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2322. ;;
  2323. *)
  2324. sys_lib_search_path_spec=$LIB
  2325. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2326. # It is most probably a Windows format PATH.
  2327. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2328. else
  2329. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2330. fi
  2331. # FIXME: find the short name or the path components, as spaces are
  2332. # common. (e.g. "Program Files" -> "PROGRA~1")
  2333. ;;
  2334. esac
  2335. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2336. postinstall_cmds='base_file=`basename \$file`~
  2337. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
  2338. dldir=$destdir/`dirname \$dlpath`~
  2339. test -d \$dldir || mkdir -p \$dldir~
  2340. $install_prog $dir/$dlname \$dldir/$dlname'
  2341. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2342. dlpath=$dir/\$dldll~
  2343. $RM \$dlpath'
  2344. shlibpath_overrides_runpath=yes
  2345. dynamic_linker='Win32 link.exe'
  2346. ;;
  2347. *)
  2348. # Assume MSVC wrapper
  2349. library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
  2350. dynamic_linker='Win32 ld.exe'
  2351. ;;
  2352. esac
  2353. # FIXME: first we should search . and the directory the executable is in
  2354. shlibpath_var=PATH
  2355. ;;
  2356. darwin* | rhapsody*)
  2357. dynamic_linker="$host_os dyld"
  2358. version_type=darwin
  2359. need_lib_prefix=no
  2360. need_version=no
  2361. library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
  2362. soname_spec='$libname$release$major$shared_ext'
  2363. shlibpath_overrides_runpath=yes
  2364. shlibpath_var=DYLD_LIBRARY_PATH
  2365. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2366. m4_if([$1], [],[
  2367. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2368. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2369. ;;
  2370. dgux*)
  2371. version_type=linux # correct to gnu/linux during the next big refactor
  2372. need_lib_prefix=no
  2373. need_version=no
  2374. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2375. soname_spec='$libname$release$shared_ext$major'
  2376. shlibpath_var=LD_LIBRARY_PATH
  2377. ;;
  2378. freebsd* | dragonfly*)
  2379. # DragonFly does not have aout. When/if they implement a new
  2380. # versioning mechanism, adjust this.
  2381. if test -x /usr/bin/objformat; then
  2382. objformat=`/usr/bin/objformat`
  2383. else
  2384. case $host_os in
  2385. freebsd[[23]].*) objformat=aout ;;
  2386. *) objformat=elf ;;
  2387. esac
  2388. fi
  2389. version_type=freebsd-$objformat
  2390. case $version_type in
  2391. freebsd-elf*)
  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. need_version=no
  2395. need_lib_prefix=no
  2396. ;;
  2397. freebsd-*)
  2398. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2399. need_version=yes
  2400. ;;
  2401. esac
  2402. shlibpath_var=LD_LIBRARY_PATH
  2403. case $host_os in
  2404. freebsd2.*)
  2405. shlibpath_overrides_runpath=yes
  2406. ;;
  2407. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2408. shlibpath_overrides_runpath=yes
  2409. hardcode_into_libs=yes
  2410. ;;
  2411. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2412. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2413. shlibpath_overrides_runpath=no
  2414. hardcode_into_libs=yes
  2415. ;;
  2416. *) # from 4.6 on, and DragonFly
  2417. shlibpath_overrides_runpath=yes
  2418. hardcode_into_libs=yes
  2419. ;;
  2420. esac
  2421. ;;
  2422. haiku*)
  2423. version_type=linux # correct to gnu/linux during the next big refactor
  2424. need_lib_prefix=no
  2425. need_version=no
  2426. dynamic_linker="$host_os runtime_loader"
  2427. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2428. soname_spec='$libname$release$shared_ext$major'
  2429. shlibpath_var=LIBRARY_PATH
  2430. shlibpath_overrides_runpath=no
  2431. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2432. hardcode_into_libs=yes
  2433. ;;
  2434. hpux9* | hpux10* | hpux11*)
  2435. # Give a soname corresponding to the major version so that dld.sl refuses to
  2436. # link against other versions.
  2437. version_type=sunos
  2438. need_lib_prefix=no
  2439. need_version=no
  2440. case $host_cpu in
  2441. ia64*)
  2442. shrext_cmds='.so'
  2443. hardcode_into_libs=yes
  2444. dynamic_linker="$host_os dld.so"
  2445. shlibpath_var=LD_LIBRARY_PATH
  2446. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2447. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2448. soname_spec='$libname$release$shared_ext$major'
  2449. if test 32 = "$HPUX_IA64_MODE"; then
  2450. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2451. sys_lib_dlsearch_path_spec=/usr/lib/hpux32
  2452. else
  2453. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2454. sys_lib_dlsearch_path_spec=/usr/lib/hpux64
  2455. fi
  2456. ;;
  2457. hppa*64*)
  2458. shrext_cmds='.sl'
  2459. hardcode_into_libs=yes
  2460. dynamic_linker="$host_os dld.sl"
  2461. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2462. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2463. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2464. soname_spec='$libname$release$shared_ext$major'
  2465. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2466. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2467. ;;
  2468. *)
  2469. shrext_cmds='.sl'
  2470. dynamic_linker="$host_os dld.sl"
  2471. shlibpath_var=SHLIB_PATH
  2472. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2473. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2474. soname_spec='$libname$release$shared_ext$major'
  2475. ;;
  2476. esac
  2477. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2478. postinstall_cmds='chmod 555 $lib'
  2479. # or fails outright, so override atomically:
  2480. install_override_mode=555
  2481. ;;
  2482. interix[[3-9]]*)
  2483. version_type=linux # correct to gnu/linux during the next big refactor
  2484. need_lib_prefix=no
  2485. need_version=no
  2486. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2487. soname_spec='$libname$release$shared_ext$major'
  2488. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2489. shlibpath_var=LD_LIBRARY_PATH
  2490. shlibpath_overrides_runpath=no
  2491. hardcode_into_libs=yes
  2492. ;;
  2493. irix5* | irix6* | nonstopux*)
  2494. case $host_os in
  2495. nonstopux*) version_type=nonstopux ;;
  2496. *)
  2497. if test yes = "$lt_cv_prog_gnu_ld"; then
  2498. version_type=linux # correct to gnu/linux during the next big refactor
  2499. else
  2500. version_type=irix
  2501. fi ;;
  2502. esac
  2503. need_lib_prefix=no
  2504. need_version=no
  2505. soname_spec='$libname$release$shared_ext$major'
  2506. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
  2507. case $host_os in
  2508. irix5* | nonstopux*)
  2509. libsuff= shlibsuff=
  2510. ;;
  2511. *)
  2512. case $LD in # libtool.m4 will add one of these switches to LD
  2513. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2514. libsuff= shlibsuff= libmagic=32-bit;;
  2515. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2516. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2517. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2518. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2519. *) libsuff= shlibsuff= libmagic=never-match;;
  2520. esac
  2521. ;;
  2522. esac
  2523. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2524. shlibpath_overrides_runpath=no
  2525. sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
  2526. sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
  2527. hardcode_into_libs=yes
  2528. ;;
  2529. # No shared lib support for Linux oldld, aout, or coff.
  2530. linux*oldld* | linux*aout* | linux*coff*)
  2531. dynamic_linker=no
  2532. ;;
  2533. linux*android*)
  2534. version_type=none # Android doesn't support versioned libraries.
  2535. need_lib_prefix=no
  2536. need_version=no
  2537. library_names_spec='$libname$release$shared_ext'
  2538. soname_spec='$libname$release$shared_ext'
  2539. finish_cmds=
  2540. shlibpath_var=LD_LIBRARY_PATH
  2541. shlibpath_overrides_runpath=yes
  2542. # This implies no fast_install, which is unacceptable.
  2543. # Some rework will be needed to allow for fast_install
  2544. # before this can be enabled.
  2545. hardcode_into_libs=yes
  2546. dynamic_linker='Android linker'
  2547. # Don't embed -rpath directories since the linker doesn't support them.
  2548. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2549. ;;
  2550. # This must be glibc/ELF.
  2551. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2552. version_type=linux # correct to gnu/linux during the next big refactor
  2553. need_lib_prefix=no
  2554. need_version=no
  2555. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2556. soname_spec='$libname$release$shared_ext$major'
  2557. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2558. shlibpath_var=LD_LIBRARY_PATH
  2559. shlibpath_overrides_runpath=no
  2560. # Some binutils ld are patched to set DT_RUNPATH
  2561. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2562. [lt_cv_shlibpath_overrides_runpath=no
  2563. save_LDFLAGS=$LDFLAGS
  2564. save_libdir=$libdir
  2565. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2566. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2567. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2568. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2569. [lt_cv_shlibpath_overrides_runpath=yes])])
  2570. LDFLAGS=$save_LDFLAGS
  2571. libdir=$save_libdir
  2572. ])
  2573. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2574. # This implies no fast_install, which is unacceptable.
  2575. # Some rework will be needed to allow for fast_install
  2576. # before this can be enabled.
  2577. hardcode_into_libs=yes
  2578. # Ideally, we could use ldconfig to report *all* directores which are
  2579. # searched for libraries, however this is still not possible. Aside from not
  2580. # being certain /sbin/ldconfig is available, command
  2581. # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
  2582. # even though it is searched at run-time. Try to do the best guess by
  2583. # appending ld.so.conf contents (and includes) to the search path.
  2584. if test -f /etc/ld.so.conf; then
  2585. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
  2586. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2587. fi
  2588. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2589. # powerpc, because MkLinux only supported shared libraries with the
  2590. # GNU dynamic linker. Since this was broken with cross compilers,
  2591. # most powerpc-linux boxes support dynamic linking these days and
  2592. # people can always --disable-shared, the test was removed, and we
  2593. # assume the GNU/Linux dynamic linker is in use.
  2594. dynamic_linker='GNU/Linux ld.so'
  2595. ;;
  2596. netbsd*)
  2597. version_type=sunos
  2598. need_lib_prefix=no
  2599. need_version=no
  2600. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2601. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2602. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2603. dynamic_linker='NetBSD (a.out) ld.so'
  2604. else
  2605. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2606. soname_spec='$libname$release$shared_ext$major'
  2607. dynamic_linker='NetBSD ld.elf_so'
  2608. fi
  2609. shlibpath_var=LD_LIBRARY_PATH
  2610. shlibpath_overrides_runpath=yes
  2611. hardcode_into_libs=yes
  2612. ;;
  2613. newsos6)
  2614. version_type=linux # correct to gnu/linux during the next big refactor
  2615. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2616. shlibpath_var=LD_LIBRARY_PATH
  2617. shlibpath_overrides_runpath=yes
  2618. ;;
  2619. *nto* | *qnx*)
  2620. version_type=qnx
  2621. need_lib_prefix=no
  2622. need_version=no
  2623. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2624. soname_spec='$libname$release$shared_ext$major'
  2625. shlibpath_var=LD_LIBRARY_PATH
  2626. shlibpath_overrides_runpath=no
  2627. hardcode_into_libs=yes
  2628. dynamic_linker='ldqnx.so'
  2629. ;;
  2630. openbsd* | bitrig*)
  2631. version_type=sunos
  2632. sys_lib_dlsearch_path_spec=/usr/lib
  2633. need_lib_prefix=no
  2634. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  2635. need_version=no
  2636. else
  2637. need_version=yes
  2638. fi
  2639. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2640. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2641. shlibpath_var=LD_LIBRARY_PATH
  2642. shlibpath_overrides_runpath=yes
  2643. ;;
  2644. os2*)
  2645. libname_spec='$name'
  2646. version_type=windows
  2647. shrext_cmds=.dll
  2648. need_version=no
  2649. need_lib_prefix=no
  2650. # OS/2 can only load a DLL with a base name of 8 characters or less.
  2651. soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
  2652. v=$($ECHO $release$versuffix | tr -d .-);
  2653. n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
  2654. $ECHO $n$v`$shared_ext'
  2655. library_names_spec='${libname}_dll.$libext'
  2656. dynamic_linker='OS/2 ld.exe'
  2657. shlibpath_var=BEGINLIBPATH
  2658. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2659. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2660. postinstall_cmds='base_file=`basename \$file`~
  2661. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
  2662. dldir=$destdir/`dirname \$dlpath`~
  2663. test -d \$dldir || mkdir -p \$dldir~
  2664. $install_prog $dir/$dlname \$dldir/$dlname~
  2665. chmod a+x \$dldir/$dlname~
  2666. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2667. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2668. fi'
  2669. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
  2670. dlpath=$dir/\$dldll~
  2671. $RM \$dlpath'
  2672. ;;
  2673. osf3* | osf4* | osf5*)
  2674. version_type=osf
  2675. need_lib_prefix=no
  2676. need_version=no
  2677. soname_spec='$libname$release$shared_ext$major'
  2678. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2679. shlibpath_var=LD_LIBRARY_PATH
  2680. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2681. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2682. ;;
  2683. rdos*)
  2684. dynamic_linker=no
  2685. ;;
  2686. solaris*)
  2687. version_type=linux # correct to gnu/linux during the next big refactor
  2688. need_lib_prefix=no
  2689. need_version=no
  2690. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2691. soname_spec='$libname$release$shared_ext$major'
  2692. shlibpath_var=LD_LIBRARY_PATH
  2693. shlibpath_overrides_runpath=yes
  2694. hardcode_into_libs=yes
  2695. # ldd complains unless libraries are executable
  2696. postinstall_cmds='chmod +x $lib'
  2697. ;;
  2698. sunos4*)
  2699. version_type=sunos
  2700. library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
  2701. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2702. shlibpath_var=LD_LIBRARY_PATH
  2703. shlibpath_overrides_runpath=yes
  2704. if test yes = "$with_gnu_ld"; then
  2705. need_lib_prefix=no
  2706. fi
  2707. need_version=yes
  2708. ;;
  2709. sysv4 | sysv4.3*)
  2710. version_type=linux # correct to gnu/linux during the next big refactor
  2711. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2712. soname_spec='$libname$release$shared_ext$major'
  2713. shlibpath_var=LD_LIBRARY_PATH
  2714. case $host_vendor in
  2715. sni)
  2716. shlibpath_overrides_runpath=no
  2717. need_lib_prefix=no
  2718. runpath_var=LD_RUN_PATH
  2719. ;;
  2720. siemens)
  2721. need_lib_prefix=no
  2722. ;;
  2723. motorola)
  2724. need_lib_prefix=no
  2725. need_version=no
  2726. shlibpath_overrides_runpath=no
  2727. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2728. ;;
  2729. esac
  2730. ;;
  2731. sysv4*MP*)
  2732. if test -d /usr/nec; then
  2733. version_type=linux # correct to gnu/linux during the next big refactor
  2734. library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
  2735. soname_spec='$libname$shared_ext.$major'
  2736. shlibpath_var=LD_LIBRARY_PATH
  2737. fi
  2738. ;;
  2739. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2740. version_type=sco
  2741. need_lib_prefix=no
  2742. need_version=no
  2743. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
  2744. soname_spec='$libname$release$shared_ext$major'
  2745. shlibpath_var=LD_LIBRARY_PATH
  2746. shlibpath_overrides_runpath=yes
  2747. hardcode_into_libs=yes
  2748. if test yes = "$with_gnu_ld"; then
  2749. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2750. else
  2751. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2752. case $host_os in
  2753. sco3.2v5*)
  2754. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2755. ;;
  2756. esac
  2757. fi
  2758. sys_lib_dlsearch_path_spec='/usr/lib'
  2759. ;;
  2760. tpf*)
  2761. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2762. version_type=linux # correct to gnu/linux during the next big refactor
  2763. need_lib_prefix=no
  2764. need_version=no
  2765. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2766. shlibpath_var=LD_LIBRARY_PATH
  2767. shlibpath_overrides_runpath=no
  2768. hardcode_into_libs=yes
  2769. ;;
  2770. uts4*)
  2771. version_type=linux # correct to gnu/linux during the next big refactor
  2772. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
  2773. soname_spec='$libname$release$shared_ext$major'
  2774. shlibpath_var=LD_LIBRARY_PATH
  2775. ;;
  2776. *)
  2777. dynamic_linker=no
  2778. ;;
  2779. esac
  2780. AC_MSG_RESULT([$dynamic_linker])
  2781. test no = "$dynamic_linker" && can_build_shared=no
  2782. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2783. if test yes = "$GCC"; then
  2784. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2785. fi
  2786. if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
  2787. sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
  2788. fi
  2789. if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
  2790. sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
  2791. fi
  2792. # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
  2793. configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
  2794. # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
  2795. func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
  2796. # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
  2797. configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
  2798. _LT_DECL([], [variables_saved_for_relink], [1],
  2799. [Variables whose values should be saved in libtool wrapper scripts and
  2800. restored at link time])
  2801. _LT_DECL([], [need_lib_prefix], [0],
  2802. [Do we need the "lib" prefix for modules?])
  2803. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2804. _LT_DECL([], [version_type], [0], [Library versioning type])
  2805. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2806. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2807. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2808. [Is shlibpath searched before the hard-coded library search path?])
  2809. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2810. _LT_DECL([], [library_names_spec], [1],
  2811. [[List of archive names. First name is the real one, the rest are links.
  2812. The last name is the one that the linker finds with -lNAME]])
  2813. _LT_DECL([], [soname_spec], [1],
  2814. [[The coded name of the library, if different from the real name]])
  2815. _LT_DECL([], [install_override_mode], [1],
  2816. [Permission mode override for installation of shared libraries])
  2817. _LT_DECL([], [postinstall_cmds], [2],
  2818. [Command to use after installation of a shared archive])
  2819. _LT_DECL([], [postuninstall_cmds], [2],
  2820. [Command to use after uninstallation of a shared archive])
  2821. _LT_DECL([], [finish_cmds], [2],
  2822. [Commands used to finish a libtool library installation in a directory])
  2823. _LT_DECL([], [finish_eval], [1],
  2824. [[As "finish_cmds", except a single script fragment to be evaled but
  2825. not shown]])
  2826. _LT_DECL([], [hardcode_into_libs], [0],
  2827. [Whether we should hardcode library paths into libraries])
  2828. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2829. [Compile-time system search path for libraries])
  2830. _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
  2831. [Detected run-time system search path for libraries])
  2832. _LT_DECL([], [configure_time_lt_sys_library_path], [2],
  2833. [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
  2834. ])# _LT_SYS_DYNAMIC_LINKER
  2835. # _LT_PATH_TOOL_PREFIX(TOOL)
  2836. # --------------------------
  2837. # find a file program that can recognize shared library
  2838. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2839. [m4_require([_LT_DECL_EGREP])dnl
  2840. AC_MSG_CHECKING([for $1])
  2841. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2842. [case $MAGIC_CMD in
  2843. [[\\/*] | ?:[\\/]*])
  2844. lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
  2845. ;;
  2846. *)
  2847. lt_save_MAGIC_CMD=$MAGIC_CMD
  2848. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2849. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2850. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2851. dnl not every word. This closes a longstanding sh security hole.
  2852. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2853. for ac_dir in $ac_dummy; do
  2854. IFS=$lt_save_ifs
  2855. test -z "$ac_dir" && ac_dir=.
  2856. if test -f "$ac_dir/$1"; then
  2857. lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
  2858. if test -n "$file_magic_test_file"; then
  2859. case $deplibs_check_method in
  2860. "file_magic "*)
  2861. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2862. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2863. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2864. $EGREP "$file_magic_regex" > /dev/null; then
  2865. :
  2866. else
  2867. cat <<_LT_EOF 1>&2
  2868. *** Warning: the command libtool uses to detect shared libraries,
  2869. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2870. *** The result is that libtool may fail to recognize shared libraries
  2871. *** as such. This will affect the creation of libtool libraries that
  2872. *** depend on shared libraries, but programs linked with such libtool
  2873. *** libraries will work regardless of this problem. Nevertheless, you
  2874. *** may want to report the problem to your system manager and/or to
  2875. *** bug-libtool@gnu.org
  2876. _LT_EOF
  2877. fi ;;
  2878. esac
  2879. fi
  2880. break
  2881. fi
  2882. done
  2883. IFS=$lt_save_ifs
  2884. MAGIC_CMD=$lt_save_MAGIC_CMD
  2885. ;;
  2886. esac])
  2887. MAGIC_CMD=$lt_cv_path_MAGIC_CMD
  2888. if test -n "$MAGIC_CMD"; then
  2889. AC_MSG_RESULT($MAGIC_CMD)
  2890. else
  2891. AC_MSG_RESULT(no)
  2892. fi
  2893. _LT_DECL([], [MAGIC_CMD], [0],
  2894. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2895. ])# _LT_PATH_TOOL_PREFIX
  2896. # Old name:
  2897. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2898. dnl aclocal-1.4 backwards compatibility:
  2899. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2900. # _LT_PATH_MAGIC
  2901. # --------------
  2902. # find a file program that can recognize a shared library
  2903. m4_defun([_LT_PATH_MAGIC],
  2904. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2905. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2906. if test -n "$ac_tool_prefix"; then
  2907. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2908. else
  2909. MAGIC_CMD=:
  2910. fi
  2911. fi
  2912. ])# _LT_PATH_MAGIC
  2913. # LT_PATH_LD
  2914. # ----------
  2915. # find the pathname to the GNU or non-GNU linker
  2916. AC_DEFUN([LT_PATH_LD],
  2917. [AC_REQUIRE([AC_PROG_CC])dnl
  2918. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2919. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2920. m4_require([_LT_DECL_SED])dnl
  2921. m4_require([_LT_DECL_EGREP])dnl
  2922. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2923. AC_ARG_WITH([gnu-ld],
  2924. [AS_HELP_STRING([--with-gnu-ld],
  2925. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2926. [test no = "$withval" || with_gnu_ld=yes],
  2927. [with_gnu_ld=no])dnl
  2928. ac_prog=ld
  2929. if test yes = "$GCC"; then
  2930. # Check if gcc -print-prog-name=ld gives a path.
  2931. AC_MSG_CHECKING([for ld used by $CC])
  2932. case $host in
  2933. *-*-mingw*)
  2934. # gcc leaves a trailing carriage return, which upsets mingw
  2935. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2936. *)
  2937. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2938. esac
  2939. case $ac_prog in
  2940. # Accept absolute paths.
  2941. [[\\/]]* | ?:[[\\/]]*)
  2942. re_direlt='/[[^/]][[^/]]*/\.\./'
  2943. # Canonicalize the pathname of ld
  2944. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2945. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2946. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2947. done
  2948. test -z "$LD" && LD=$ac_prog
  2949. ;;
  2950. "")
  2951. # If it fails, then pretend we aren't using GCC.
  2952. ac_prog=ld
  2953. ;;
  2954. *)
  2955. # If it is relative, then search for the first ld in PATH.
  2956. with_gnu_ld=unknown
  2957. ;;
  2958. esac
  2959. elif test yes = "$with_gnu_ld"; then
  2960. AC_MSG_CHECKING([for GNU ld])
  2961. else
  2962. AC_MSG_CHECKING([for non-GNU ld])
  2963. fi
  2964. AC_CACHE_VAL(lt_cv_path_LD,
  2965. [if test -z "$LD"; then
  2966. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  2967. for ac_dir in $PATH; do
  2968. IFS=$lt_save_ifs
  2969. test -z "$ac_dir" && ac_dir=.
  2970. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2971. lt_cv_path_LD=$ac_dir/$ac_prog
  2972. # Check to see if the program is GNU ld. I'd rather use --version,
  2973. # but apparently some variants of GNU ld only accept -v.
  2974. # Break only if it was the GNU/non-GNU ld that we prefer.
  2975. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2976. *GNU* | *'with BFD'*)
  2977. test no != "$with_gnu_ld" && break
  2978. ;;
  2979. *)
  2980. test yes != "$with_gnu_ld" && break
  2981. ;;
  2982. esac
  2983. fi
  2984. done
  2985. IFS=$lt_save_ifs
  2986. else
  2987. lt_cv_path_LD=$LD # Let the user override the test with a path.
  2988. fi])
  2989. LD=$lt_cv_path_LD
  2990. if test -n "$LD"; then
  2991. AC_MSG_RESULT($LD)
  2992. else
  2993. AC_MSG_RESULT(no)
  2994. fi
  2995. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2996. _LT_PATH_LD_GNU
  2997. AC_SUBST([LD])
  2998. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  2999. ])# LT_PATH_LD
  3000. # Old names:
  3001. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  3002. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  3003. dnl aclocal-1.4 backwards compatibility:
  3004. dnl AC_DEFUN([AM_PROG_LD], [])
  3005. dnl AC_DEFUN([AC_PROG_LD], [])
  3006. # _LT_PATH_LD_GNU
  3007. #- --------------
  3008. m4_defun([_LT_PATH_LD_GNU],
  3009. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3010. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3011. case `$LD -v 2>&1 </dev/null` in
  3012. *GNU* | *'with BFD'*)
  3013. lt_cv_prog_gnu_ld=yes
  3014. ;;
  3015. *)
  3016. lt_cv_prog_gnu_ld=no
  3017. ;;
  3018. esac])
  3019. with_gnu_ld=$lt_cv_prog_gnu_ld
  3020. ])# _LT_PATH_LD_GNU
  3021. # _LT_CMD_RELOAD
  3022. # --------------
  3023. # find reload flag for linker
  3024. # -- PORTME Some linkers may need a different reload flag.
  3025. m4_defun([_LT_CMD_RELOAD],
  3026. [AC_CACHE_CHECK([for $LD option to reload object files],
  3027. lt_cv_ld_reload_flag,
  3028. [lt_cv_ld_reload_flag='-r'])
  3029. reload_flag=$lt_cv_ld_reload_flag
  3030. case $reload_flag in
  3031. "" | " "*) ;;
  3032. *) reload_flag=" $reload_flag" ;;
  3033. esac
  3034. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3035. case $host_os in
  3036. cygwin* | mingw* | pw32* | cegcc*)
  3037. if test yes != "$GCC"; then
  3038. reload_cmds=false
  3039. fi
  3040. ;;
  3041. darwin*)
  3042. if test yes = "$GCC"; then
  3043. reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
  3044. else
  3045. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3046. fi
  3047. ;;
  3048. esac
  3049. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3050. _LT_TAGDECL([], [reload_cmds], [2])dnl
  3051. ])# _LT_CMD_RELOAD
  3052. # _LT_PATH_DD
  3053. # -----------
  3054. # find a working dd
  3055. m4_defun([_LT_PATH_DD],
  3056. [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
  3057. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3058. cat conftest.i conftest.i >conftest2.i
  3059. : ${lt_DD:=$DD}
  3060. AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
  3061. [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3062. cmp -s conftest.i conftest.out \
  3063. && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
  3064. fi])
  3065. rm -f conftest.i conftest2.i conftest.out])
  3066. ])# _LT_PATH_DD
  3067. # _LT_CMD_TRUNCATE
  3068. # ----------------
  3069. # find command to truncate a binary pipe
  3070. m4_defun([_LT_CMD_TRUNCATE],
  3071. [m4_require([_LT_PATH_DD])
  3072. AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
  3073. [printf 0123456789abcdef0123456789abcdef >conftest.i
  3074. cat conftest.i conftest.i >conftest2.i
  3075. lt_cv_truncate_bin=
  3076. if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
  3077. cmp -s conftest.i conftest.out \
  3078. && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
  3079. fi
  3080. rm -f conftest.i conftest2.i conftest.out
  3081. test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
  3082. _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
  3083. [Command to truncate a binary pipe])
  3084. ])# _LT_CMD_TRUNCATE
  3085. # _LT_CHECK_MAGIC_METHOD
  3086. # ----------------------
  3087. # how to check for library dependencies
  3088. # -- PORTME fill in with the dynamic library characteristics
  3089. m4_defun([_LT_CHECK_MAGIC_METHOD],
  3090. [m4_require([_LT_DECL_EGREP])
  3091. m4_require([_LT_DECL_OBJDUMP])
  3092. AC_CACHE_CHECK([how to recognize dependent libraries],
  3093. lt_cv_deplibs_check_method,
  3094. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3095. lt_cv_file_magic_test_file=
  3096. lt_cv_deplibs_check_method='unknown'
  3097. # Need to set the preceding variable on all platforms that support
  3098. # interlibrary dependencies.
  3099. # 'none' -- dependencies not supported.
  3100. # 'unknown' -- same as none, but documents that we really don't know.
  3101. # 'pass_all' -- all dependencies passed with no checks.
  3102. # 'test_compile' -- check by making test program.
  3103. # 'file_magic [[regex]]' -- check by looking for files in library path
  3104. # that responds to the $file_magic_cmd with a given extended regex.
  3105. # If you have 'file' or equivalent on your system and you're not sure
  3106. # whether 'pass_all' will *always* work, you probably want this one.
  3107. case $host_os in
  3108. aix[[4-9]]*)
  3109. lt_cv_deplibs_check_method=pass_all
  3110. ;;
  3111. beos*)
  3112. lt_cv_deplibs_check_method=pass_all
  3113. ;;
  3114. bsdi[[45]]*)
  3115. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3116. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3117. lt_cv_file_magic_test_file=/shlib/libc.so
  3118. ;;
  3119. cygwin*)
  3120. # func_win32_libid is a shell function defined in ltmain.sh
  3121. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3122. lt_cv_file_magic_cmd='func_win32_libid'
  3123. ;;
  3124. mingw* | pw32*)
  3125. # Base MSYS/MinGW do not provide the 'file' command needed by
  3126. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3127. # unless we find 'file', for example because we are cross-compiling.
  3128. if ( file / ) >/dev/null 2>&1; then
  3129. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3130. lt_cv_file_magic_cmd='func_win32_libid'
  3131. else
  3132. # Keep this pattern in sync with the one in func_win32_libid.
  3133. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  3134. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3135. fi
  3136. ;;
  3137. cegcc*)
  3138. # use the weaker test based on 'objdump'. See mingw*.
  3139. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3140. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3141. ;;
  3142. darwin* | rhapsody*)
  3143. lt_cv_deplibs_check_method=pass_all
  3144. ;;
  3145. freebsd* | dragonfly*)
  3146. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3147. case $host_cpu in
  3148. i*86 )
  3149. # Not sure whether the presence of OpenBSD here was a mistake.
  3150. # Let's accept both of them until this is cleared up.
  3151. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3152. lt_cv_file_magic_cmd=/usr/bin/file
  3153. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3154. ;;
  3155. esac
  3156. else
  3157. lt_cv_deplibs_check_method=pass_all
  3158. fi
  3159. ;;
  3160. haiku*)
  3161. lt_cv_deplibs_check_method=pass_all
  3162. ;;
  3163. hpux10.20* | hpux11*)
  3164. lt_cv_file_magic_cmd=/usr/bin/file
  3165. case $host_cpu in
  3166. ia64*)
  3167. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3168. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3169. ;;
  3170. hppa*64*)
  3171. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
  3172. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3173. ;;
  3174. *)
  3175. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3176. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3177. ;;
  3178. esac
  3179. ;;
  3180. interix[[3-9]]*)
  3181. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3182. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3183. ;;
  3184. irix5* | irix6* | nonstopux*)
  3185. case $LD in
  3186. *-32|*"-32 ") libmagic=32-bit;;
  3187. *-n32|*"-n32 ") libmagic=N32;;
  3188. *-64|*"-64 ") libmagic=64-bit;;
  3189. *) libmagic=never-match;;
  3190. esac
  3191. lt_cv_deplibs_check_method=pass_all
  3192. ;;
  3193. # This must be glibc/ELF.
  3194. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3195. lt_cv_deplibs_check_method=pass_all
  3196. ;;
  3197. netbsd*)
  3198. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3199. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3200. else
  3201. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3202. fi
  3203. ;;
  3204. newos6*)
  3205. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3206. lt_cv_file_magic_cmd=/usr/bin/file
  3207. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3208. ;;
  3209. *nto* | *qnx*)
  3210. lt_cv_deplibs_check_method=pass_all
  3211. ;;
  3212. openbsd* | bitrig*)
  3213. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  3214. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3215. else
  3216. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3217. fi
  3218. ;;
  3219. osf3* | osf4* | osf5*)
  3220. lt_cv_deplibs_check_method=pass_all
  3221. ;;
  3222. rdos*)
  3223. lt_cv_deplibs_check_method=pass_all
  3224. ;;
  3225. solaris*)
  3226. lt_cv_deplibs_check_method=pass_all
  3227. ;;
  3228. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3229. lt_cv_deplibs_check_method=pass_all
  3230. ;;
  3231. sysv4 | sysv4.3*)
  3232. case $host_vendor in
  3233. motorola)
  3234. 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]]'
  3235. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3236. ;;
  3237. ncr)
  3238. lt_cv_deplibs_check_method=pass_all
  3239. ;;
  3240. sequent)
  3241. lt_cv_file_magic_cmd='/bin/file'
  3242. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3243. ;;
  3244. sni)
  3245. lt_cv_file_magic_cmd='/bin/file'
  3246. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3247. lt_cv_file_magic_test_file=/lib/libc.so
  3248. ;;
  3249. siemens)
  3250. lt_cv_deplibs_check_method=pass_all
  3251. ;;
  3252. pc)
  3253. lt_cv_deplibs_check_method=pass_all
  3254. ;;
  3255. esac
  3256. ;;
  3257. tpf*)
  3258. lt_cv_deplibs_check_method=pass_all
  3259. ;;
  3260. os2*)
  3261. lt_cv_deplibs_check_method=pass_all
  3262. ;;
  3263. esac
  3264. ])
  3265. file_magic_glob=
  3266. want_nocaseglob=no
  3267. if test "$build" = "$host"; then
  3268. case $host_os in
  3269. mingw* | pw32*)
  3270. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3271. want_nocaseglob=yes
  3272. else
  3273. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3274. fi
  3275. ;;
  3276. esac
  3277. fi
  3278. file_magic_cmd=$lt_cv_file_magic_cmd
  3279. deplibs_check_method=$lt_cv_deplibs_check_method
  3280. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3281. _LT_DECL([], [deplibs_check_method], [1],
  3282. [Method to check whether dependent libraries are shared objects])
  3283. _LT_DECL([], [file_magic_cmd], [1],
  3284. [Command to use when deplibs_check_method = "file_magic"])
  3285. _LT_DECL([], [file_magic_glob], [1],
  3286. [How to find potential files when deplibs_check_method = "file_magic"])
  3287. _LT_DECL([], [want_nocaseglob], [1],
  3288. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3289. ])# _LT_CHECK_MAGIC_METHOD
  3290. # LT_PATH_NM
  3291. # ----------
  3292. # find the pathname to a BSD- or MS-compatible name lister
  3293. AC_DEFUN([LT_PATH_NM],
  3294. [AC_REQUIRE([AC_PROG_CC])dnl
  3295. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3296. [if test -n "$NM"; then
  3297. # Let the user override the test.
  3298. lt_cv_path_NM=$NM
  3299. else
  3300. lt_nm_to_check=${ac_tool_prefix}nm
  3301. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3302. lt_nm_to_check="$lt_nm_to_check nm"
  3303. fi
  3304. for lt_tmp_nm in $lt_nm_to_check; do
  3305. lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
  3306. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3307. IFS=$lt_save_ifs
  3308. test -z "$ac_dir" && ac_dir=.
  3309. tmp_nm=$ac_dir/$lt_tmp_nm
  3310. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
  3311. # Check to see if the nm accepts a BSD-compat flag.
  3312. # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
  3313. # nm: unknown option "B" ignored
  3314. # Tru64's nm complains that /dev/null is an invalid object file
  3315. # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
  3316. case $build_os in
  3317. mingw*) lt_bad_file=conftest.nm/nofile ;;
  3318. *) lt_bad_file=/dev/null ;;
  3319. esac
  3320. case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
  3321. *$lt_bad_file* | *'Invalid file or object type'*)
  3322. lt_cv_path_NM="$tmp_nm -B"
  3323. break 2
  3324. ;;
  3325. *)
  3326. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3327. */dev/null*)
  3328. lt_cv_path_NM="$tmp_nm -p"
  3329. break 2
  3330. ;;
  3331. *)
  3332. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3333. continue # so that we can try to find one that supports BSD flags
  3334. ;;
  3335. esac
  3336. ;;
  3337. esac
  3338. fi
  3339. done
  3340. IFS=$lt_save_ifs
  3341. done
  3342. : ${lt_cv_path_NM=no}
  3343. fi])
  3344. if test no != "$lt_cv_path_NM"; then
  3345. NM=$lt_cv_path_NM
  3346. else
  3347. # Didn't find any BSD compatible name lister, look for dumpbin.
  3348. if test -n "$DUMPBIN"; then :
  3349. # Let the user override the test.
  3350. else
  3351. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3352. case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
  3353. *COFF*)
  3354. DUMPBIN="$DUMPBIN -symbols -headers"
  3355. ;;
  3356. *)
  3357. DUMPBIN=:
  3358. ;;
  3359. esac
  3360. fi
  3361. AC_SUBST([DUMPBIN])
  3362. if test : != "$DUMPBIN"; then
  3363. NM=$DUMPBIN
  3364. fi
  3365. fi
  3366. test -z "$NM" && NM=nm
  3367. AC_SUBST([NM])
  3368. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3369. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3370. [lt_cv_nm_interface="BSD nm"
  3371. echo "int some_variable = 0;" > conftest.$ac_ext
  3372. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3373. (eval "$ac_compile" 2>conftest.err)
  3374. cat conftest.err >&AS_MESSAGE_LOG_FD
  3375. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3376. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3377. cat conftest.err >&AS_MESSAGE_LOG_FD
  3378. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3379. cat conftest.out >&AS_MESSAGE_LOG_FD
  3380. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3381. lt_cv_nm_interface="MS dumpbin"
  3382. fi
  3383. rm -f conftest*])
  3384. ])# LT_PATH_NM
  3385. # Old names:
  3386. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3387. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3388. dnl aclocal-1.4 backwards compatibility:
  3389. dnl AC_DEFUN([AM_PROG_NM], [])
  3390. dnl AC_DEFUN([AC_PROG_NM], [])
  3391. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3392. # --------------------------------
  3393. # how to determine the name of the shared library
  3394. # associated with a specific link library.
  3395. # -- PORTME fill in with the dynamic library characteristics
  3396. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3397. [m4_require([_LT_DECL_EGREP])
  3398. m4_require([_LT_DECL_OBJDUMP])
  3399. m4_require([_LT_DECL_DLLTOOL])
  3400. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3401. lt_cv_sharedlib_from_linklib_cmd,
  3402. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3403. case $host_os in
  3404. cygwin* | mingw* | pw32* | cegcc*)
  3405. # two different shell functions defined in ltmain.sh;
  3406. # decide which one to use based on capabilities of $DLLTOOL
  3407. case `$DLLTOOL --help 2>&1` in
  3408. *--identify-strict*)
  3409. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3410. ;;
  3411. *)
  3412. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3413. ;;
  3414. esac
  3415. ;;
  3416. *)
  3417. # fallback: assume linklib IS sharedlib
  3418. lt_cv_sharedlib_from_linklib_cmd=$ECHO
  3419. ;;
  3420. esac
  3421. ])
  3422. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3423. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3424. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3425. [Command to associate shared and link libraries])
  3426. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3427. # _LT_PATH_MANIFEST_TOOL
  3428. # ----------------------
  3429. # locate the manifest tool
  3430. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3431. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3432. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3433. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3434. [lt_cv_path_mainfest_tool=no
  3435. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3436. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3437. cat conftest.err >&AS_MESSAGE_LOG_FD
  3438. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3439. lt_cv_path_mainfest_tool=yes
  3440. fi
  3441. rm -f conftest*])
  3442. if test yes != "$lt_cv_path_mainfest_tool"; then
  3443. MANIFEST_TOOL=:
  3444. fi
  3445. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3446. ])# _LT_PATH_MANIFEST_TOOL
  3447. # _LT_DLL_DEF_P([FILE])
  3448. # ---------------------
  3449. # True iff FILE is a Windows DLL '.def' file.
  3450. # Keep in sync with func_dll_def_p in the libtool script
  3451. AC_DEFUN([_LT_DLL_DEF_P],
  3452. [dnl
  3453. test DEF = "`$SED -n dnl
  3454. -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
  3455. -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
  3456. -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
  3457. -e q dnl Only consider the first "real" line
  3458. $1`" dnl
  3459. ])# _LT_DLL_DEF_P
  3460. # LT_LIB_M
  3461. # --------
  3462. # check for math library
  3463. AC_DEFUN([LT_LIB_M],
  3464. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3465. LIBM=
  3466. case $host in
  3467. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3468. # These system don't have libm, or don't need it
  3469. ;;
  3470. *-ncr-sysv4.3*)
  3471. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
  3472. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3473. ;;
  3474. *)
  3475. AC_CHECK_LIB(m, cos, LIBM=-lm)
  3476. ;;
  3477. esac
  3478. AC_SUBST([LIBM])
  3479. ])# LT_LIB_M
  3480. # Old name:
  3481. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3482. dnl aclocal-1.4 backwards compatibility:
  3483. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3484. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3485. # -------------------------------
  3486. m4_defun([_LT_COMPILER_NO_RTTI],
  3487. [m4_require([_LT_TAG_COMPILER])dnl
  3488. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3489. if test yes = "$GCC"; then
  3490. case $cc_basename in
  3491. nvcc*)
  3492. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3493. *)
  3494. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3495. esac
  3496. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3497. lt_cv_prog_compiler_rtti_exceptions,
  3498. [-fno-rtti -fno-exceptions], [],
  3499. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3500. fi
  3501. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3502. [Compiler flag to turn off builtin functions])
  3503. ])# _LT_COMPILER_NO_RTTI
  3504. # _LT_CMD_GLOBAL_SYMBOLS
  3505. # ----------------------
  3506. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3507. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3508. AC_REQUIRE([AC_PROG_CC])dnl
  3509. AC_REQUIRE([AC_PROG_AWK])dnl
  3510. AC_REQUIRE([LT_PATH_NM])dnl
  3511. AC_REQUIRE([LT_PATH_LD])dnl
  3512. m4_require([_LT_DECL_SED])dnl
  3513. m4_require([_LT_DECL_EGREP])dnl
  3514. m4_require([_LT_TAG_COMPILER])dnl
  3515. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3516. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3517. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3518. [
  3519. # These are sane defaults that work on at least a few old systems.
  3520. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3521. # Character class describing NM global symbol codes.
  3522. symcode='[[BCDEGRST]]'
  3523. # Regexp to match symbols that can be accessed directly from C.
  3524. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3525. # Define system-specific variables.
  3526. case $host_os in
  3527. aix*)
  3528. symcode='[[BCDT]]'
  3529. ;;
  3530. cygwin* | mingw* | pw32* | cegcc*)
  3531. symcode='[[ABCDGISTW]]'
  3532. ;;
  3533. hpux*)
  3534. if test ia64 = "$host_cpu"; then
  3535. symcode='[[ABCDEGRST]]'
  3536. fi
  3537. ;;
  3538. irix* | nonstopux*)
  3539. symcode='[[BCDEGRST]]'
  3540. ;;
  3541. osf*)
  3542. symcode='[[BCDEGQRST]]'
  3543. ;;
  3544. solaris*)
  3545. symcode='[[BDRT]]'
  3546. ;;
  3547. sco3.2v5*)
  3548. symcode='[[DT]]'
  3549. ;;
  3550. sysv4.2uw2*)
  3551. symcode='[[DT]]'
  3552. ;;
  3553. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3554. symcode='[[ABDT]]'
  3555. ;;
  3556. sysv4)
  3557. symcode='[[DFNSTU]]'
  3558. ;;
  3559. esac
  3560. # If we're using GNU nm, then use its standard symbol codes.
  3561. case `$NM -V 2>&1` in
  3562. *GNU* | *'with BFD'*)
  3563. symcode='[[ABCDGIRSTW]]' ;;
  3564. esac
  3565. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3566. # Gets list of data symbols to import.
  3567. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
  3568. # Adjust the below global symbol transforms to fixup imported variables.
  3569. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
  3570. lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
  3571. lt_c_name_lib_hook="\
  3572. -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
  3573. -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
  3574. else
  3575. # Disable hooks by default.
  3576. lt_cv_sys_global_symbol_to_import=
  3577. lt_cdecl_hook=
  3578. lt_c_name_hook=
  3579. lt_c_name_lib_hook=
  3580. fi
  3581. # Transform an extracted symbol line into a proper C declaration.
  3582. # Some systems (esp. on ia64) link data and code symbols differently,
  3583. # so use this general approach.
  3584. lt_cv_sys_global_symbol_to_cdecl="sed -n"\
  3585. $lt_cdecl_hook\
  3586. " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
  3587. " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
  3588. # Transform an extracted symbol line into symbol name and symbol address
  3589. lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
  3590. $lt_c_name_hook\
  3591. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3592. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
  3593. # Transform an extracted symbol line into symbol name with lib prefix and
  3594. # symbol address.
  3595. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
  3596. $lt_c_name_lib_hook\
  3597. " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
  3598. " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
  3599. " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
  3600. # Handle CRLF in mingw tool chain
  3601. opt_cr=
  3602. case $build_os in
  3603. mingw*)
  3604. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3605. ;;
  3606. esac
  3607. # Try without a prefix underscore, then with it.
  3608. for ac_symprfx in "" "_"; do
  3609. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3610. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3611. # Write the raw and C identifiers.
  3612. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3613. # Fake it for dumpbin and say T for any non-static function,
  3614. # D for any global variable and I for any imported variable.
  3615. # Also find C++ and __fastcall symbols from MSVC++,
  3616. # which start with @ or ?.
  3617. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3618. " {last_section=section; section=\$ 3};"\
  3619. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3620. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3621. " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
  3622. " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
  3623. " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
  3624. " \$ 0!~/External *\|/{next};"\
  3625. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3626. " {if(hide[section]) next};"\
  3627. " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
  3628. " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
  3629. " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
  3630. " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
  3631. " ' prfx=^$ac_symprfx]"
  3632. else
  3633. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3634. fi
  3635. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3636. # Check to see that the pipe works correctly.
  3637. pipe_works=no
  3638. rm -f conftest*
  3639. cat > conftest.$ac_ext <<_LT_EOF
  3640. #ifdef __cplusplus
  3641. extern "C" {
  3642. #endif
  3643. char nm_test_var;
  3644. void nm_test_func(void);
  3645. void nm_test_func(void){}
  3646. #ifdef __cplusplus
  3647. }
  3648. #endif
  3649. int main(){nm_test_var='a';nm_test_func();return(0);}
  3650. _LT_EOF
  3651. if AC_TRY_EVAL(ac_compile); then
  3652. # Now try to grab the symbols.
  3653. nlist=conftest.nm
  3654. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  3655. # Try sorting and uniquifying the output.
  3656. if sort "$nlist" | uniq > "$nlist"T; then
  3657. mv -f "$nlist"T "$nlist"
  3658. else
  3659. rm -f "$nlist"T
  3660. fi
  3661. # Make sure that we snagged all the symbols we need.
  3662. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3663. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3664. cat <<_LT_EOF > conftest.$ac_ext
  3665. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3666. #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
  3667. /* DATA imports from DLLs on WIN32 can't be const, because runtime
  3668. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3669. # define LT@&t@_DLSYM_CONST
  3670. #elif defined __osf__
  3671. /* This system does not cope well with relocations in const data. */
  3672. # define LT@&t@_DLSYM_CONST
  3673. #else
  3674. # define LT@&t@_DLSYM_CONST const
  3675. #endif
  3676. #ifdef __cplusplus
  3677. extern "C" {
  3678. #endif
  3679. _LT_EOF
  3680. # Now generate the symbol file.
  3681. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3682. cat <<_LT_EOF >> conftest.$ac_ext
  3683. /* The mapping between symbol names and symbols. */
  3684. LT@&t@_DLSYM_CONST struct {
  3685. const char *name;
  3686. void *address;
  3687. }
  3688. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3689. {
  3690. { "@PROGRAM@", (void *) 0 },
  3691. _LT_EOF
  3692. $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3693. cat <<\_LT_EOF >> conftest.$ac_ext
  3694. {0, (void *) 0}
  3695. };
  3696. /* This works around a problem in FreeBSD linker */
  3697. #ifdef FREEBSD_WORKAROUND
  3698. static const void *lt_preloaded_setup() {
  3699. return lt__PROGRAM__LTX_preloaded_symbols;
  3700. }
  3701. #endif
  3702. #ifdef __cplusplus
  3703. }
  3704. #endif
  3705. _LT_EOF
  3706. # Now try linking the two files.
  3707. mv conftest.$ac_objext conftstm.$ac_objext
  3708. lt_globsym_save_LIBS=$LIBS
  3709. lt_globsym_save_CFLAGS=$CFLAGS
  3710. LIBS=conftstm.$ac_objext
  3711. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3712. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  3713. pipe_works=yes
  3714. fi
  3715. LIBS=$lt_globsym_save_LIBS
  3716. CFLAGS=$lt_globsym_save_CFLAGS
  3717. else
  3718. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3719. fi
  3720. else
  3721. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3722. fi
  3723. else
  3724. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3725. fi
  3726. else
  3727. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3728. cat conftest.$ac_ext >&5
  3729. fi
  3730. rm -rf conftest* conftst*
  3731. # Do not use the global_symbol_pipe unless it works.
  3732. if test yes = "$pipe_works"; then
  3733. break
  3734. else
  3735. lt_cv_sys_global_symbol_pipe=
  3736. fi
  3737. done
  3738. ])
  3739. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3740. lt_cv_sys_global_symbol_to_cdecl=
  3741. fi
  3742. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3743. AC_MSG_RESULT(failed)
  3744. else
  3745. AC_MSG_RESULT(ok)
  3746. fi
  3747. # Response file support.
  3748. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3749. nm_file_list_spec='@'
  3750. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3751. nm_file_list_spec='@'
  3752. fi
  3753. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3754. [Take the output of nm and produce a listing of raw symbols and C names])
  3755. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3756. [Transform the output of nm in a proper C declaration])
  3757. _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
  3758. [Transform the output of nm into a list of symbols to manually relocate])
  3759. _LT_DECL([global_symbol_to_c_name_address],
  3760. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3761. [Transform the output of nm in a C name address pair])
  3762. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3763. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3764. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3765. _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
  3766. [The name lister interface])
  3767. _LT_DECL([], [nm_file_list_spec], [1],
  3768. [Specify filename containing input files for $NM])
  3769. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3770. # _LT_COMPILER_PIC([TAGNAME])
  3771. # ---------------------------
  3772. m4_defun([_LT_COMPILER_PIC],
  3773. [m4_require([_LT_TAG_COMPILER])dnl
  3774. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3775. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3776. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3777. m4_if([$1], [CXX], [
  3778. # C++ specific cases for pic, static, wl, etc.
  3779. if test yes = "$GXX"; then
  3780. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3781. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3782. case $host_os in
  3783. aix*)
  3784. # All AIX code is PIC.
  3785. if test ia64 = "$host_cpu"; then
  3786. # AIX 5 now supports IA64 processor
  3787. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3788. fi
  3789. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3790. ;;
  3791. amigaos*)
  3792. case $host_cpu in
  3793. powerpc)
  3794. # see comment about AmigaOS4 .so support
  3795. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3796. ;;
  3797. m68k)
  3798. # FIXME: we need at least 68020 code to build shared libraries, but
  3799. # adding the '-m68020' flag to GCC prevents building anything better,
  3800. # like '-m68040'.
  3801. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3802. ;;
  3803. esac
  3804. ;;
  3805. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3806. # PIC is the default for these OSes.
  3807. ;;
  3808. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3809. # This hack is so that the source file can tell whether it is being
  3810. # built for inclusion in a dll (and should export symbols for example).
  3811. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3812. # (--disable-auto-import) libraries
  3813. m4_if([$1], [GCJ], [],
  3814. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3815. case $host_os in
  3816. os2*)
  3817. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  3818. ;;
  3819. esac
  3820. ;;
  3821. darwin* | rhapsody*)
  3822. # PIC is the default on this platform
  3823. # Common symbols not allowed in MH_DYLIB files
  3824. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3825. ;;
  3826. *djgpp*)
  3827. # DJGPP does not support shared libraries at all
  3828. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3829. ;;
  3830. haiku*)
  3831. # PIC is the default for Haiku.
  3832. # The "-static" flag exists, but is broken.
  3833. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3834. ;;
  3835. interix[[3-9]]*)
  3836. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3837. # Instead, we relocate shared libraries at runtime.
  3838. ;;
  3839. sysv4*MP*)
  3840. if test -d /usr/nec; then
  3841. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3842. fi
  3843. ;;
  3844. hpux*)
  3845. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3846. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3847. # sets the default TLS model and affects inlining.
  3848. case $host_cpu in
  3849. hppa*64*)
  3850. ;;
  3851. *)
  3852. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3853. ;;
  3854. esac
  3855. ;;
  3856. *qnx* | *nto*)
  3857. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3858. # it will coredump.
  3859. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3860. ;;
  3861. *)
  3862. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3863. ;;
  3864. esac
  3865. else
  3866. case $host_os in
  3867. aix[[4-9]]*)
  3868. # All AIX code is PIC.
  3869. if test ia64 = "$host_cpu"; then
  3870. # AIX 5 now supports IA64 processor
  3871. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3872. else
  3873. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3874. fi
  3875. ;;
  3876. chorus*)
  3877. case $cc_basename in
  3878. cxch68*)
  3879. # Green Hills C++ Compiler
  3880. # _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"
  3881. ;;
  3882. esac
  3883. ;;
  3884. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3885. # This hack is so that the source file can tell whether it is being
  3886. # built for inclusion in a dll (and should export symbols for example).
  3887. m4_if([$1], [GCJ], [],
  3888. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3889. ;;
  3890. dgux*)
  3891. case $cc_basename in
  3892. ec++*)
  3893. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3894. ;;
  3895. ghcx*)
  3896. # Green Hills C++ Compiler
  3897. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3898. ;;
  3899. *)
  3900. ;;
  3901. esac
  3902. ;;
  3903. freebsd* | dragonfly*)
  3904. # FreeBSD uses GNU C++
  3905. ;;
  3906. hpux9* | hpux10* | hpux11*)
  3907. case $cc_basename in
  3908. CC*)
  3909. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3910. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3911. if test ia64 != "$host_cpu"; then
  3912. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3913. fi
  3914. ;;
  3915. aCC*)
  3916. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3917. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  3918. case $host_cpu in
  3919. hppa*64*|ia64*)
  3920. # +Z the default
  3921. ;;
  3922. *)
  3923. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3924. ;;
  3925. esac
  3926. ;;
  3927. *)
  3928. ;;
  3929. esac
  3930. ;;
  3931. interix*)
  3932. # This is c89, which is MS Visual C++ (no shared libs)
  3933. # Anyone wants to do a port?
  3934. ;;
  3935. irix5* | irix6* | nonstopux*)
  3936. case $cc_basename in
  3937. CC*)
  3938. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3939. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3940. # CC pic flag -KPIC is the default.
  3941. ;;
  3942. *)
  3943. ;;
  3944. esac
  3945. ;;
  3946. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3947. case $cc_basename in
  3948. KCC*)
  3949. # KAI C++ Compiler
  3950. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3951. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3952. ;;
  3953. ecpc* )
  3954. # old Intel C++ for x86_64, which still supported -KPIC.
  3955. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3956. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3957. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3958. ;;
  3959. icpc* )
  3960. # Intel C++, used to be incompatible with GCC.
  3961. # ICC 10 doesn't accept -KPIC any more.
  3962. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3963. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3964. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3965. ;;
  3966. pgCC* | pgcpp*)
  3967. # Portland Group C++ compiler
  3968. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3969. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3970. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3971. ;;
  3972. cxx*)
  3973. # Compaq C++
  3974. # Make sure the PIC flag is empty. It appears that all Alpha
  3975. # Linux and Compaq Tru64 Unix objects are PIC.
  3976. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3977. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3978. ;;
  3979. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3980. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3981. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3982. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3983. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3984. ;;
  3985. *)
  3986. case `$CC -V 2>&1 | sed 5q` in
  3987. *Sun\ C*)
  3988. # Sun C++ 5.9
  3989. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3990. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3991. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3992. ;;
  3993. esac
  3994. ;;
  3995. esac
  3996. ;;
  3997. lynxos*)
  3998. ;;
  3999. m88k*)
  4000. ;;
  4001. mvs*)
  4002. case $cc_basename in
  4003. cxx*)
  4004. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4005. ;;
  4006. *)
  4007. ;;
  4008. esac
  4009. ;;
  4010. netbsd*)
  4011. ;;
  4012. *qnx* | *nto*)
  4013. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4014. # it will coredump.
  4015. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4016. ;;
  4017. osf3* | osf4* | osf5*)
  4018. case $cc_basename in
  4019. KCC*)
  4020. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4021. ;;
  4022. RCC*)
  4023. # Rational C++ 2.4.1
  4024. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4025. ;;
  4026. cxx*)
  4027. # Digital/Compaq C++
  4028. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4029. # Make sure the PIC flag is empty. It appears that all Alpha
  4030. # Linux and Compaq Tru64 Unix objects are PIC.
  4031. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4032. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4033. ;;
  4034. *)
  4035. ;;
  4036. esac
  4037. ;;
  4038. psos*)
  4039. ;;
  4040. solaris*)
  4041. case $cc_basename in
  4042. CC* | sunCC*)
  4043. # Sun C++ 4.2, 5.x and Centerline C++
  4044. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4045. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4046. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4047. ;;
  4048. gcx*)
  4049. # Green Hills C++ Compiler
  4050. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4051. ;;
  4052. *)
  4053. ;;
  4054. esac
  4055. ;;
  4056. sunos4*)
  4057. case $cc_basename in
  4058. CC*)
  4059. # Sun C++ 4.x
  4060. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4061. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4062. ;;
  4063. lcc*)
  4064. # Lucid
  4065. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4066. ;;
  4067. *)
  4068. ;;
  4069. esac
  4070. ;;
  4071. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4072. case $cc_basename in
  4073. CC*)
  4074. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4075. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4076. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4077. ;;
  4078. esac
  4079. ;;
  4080. tandem*)
  4081. case $cc_basename in
  4082. NCC*)
  4083. # NonStop-UX NCC 3.20
  4084. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4085. ;;
  4086. *)
  4087. ;;
  4088. esac
  4089. ;;
  4090. vxworks*)
  4091. ;;
  4092. *)
  4093. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4094. ;;
  4095. esac
  4096. fi
  4097. ],
  4098. [
  4099. if test yes = "$GCC"; then
  4100. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4101. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4102. case $host_os in
  4103. aix*)
  4104. # All AIX code is PIC.
  4105. if test ia64 = "$host_cpu"; then
  4106. # AIX 5 now supports IA64 processor
  4107. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4108. fi
  4109. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4110. ;;
  4111. amigaos*)
  4112. case $host_cpu in
  4113. powerpc)
  4114. # see comment about AmigaOS4 .so support
  4115. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4116. ;;
  4117. m68k)
  4118. # FIXME: we need at least 68020 code to build shared libraries, but
  4119. # adding the '-m68020' flag to GCC prevents building anything better,
  4120. # like '-m68040'.
  4121. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4122. ;;
  4123. esac
  4124. ;;
  4125. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4126. # PIC is the default for these OSes.
  4127. ;;
  4128. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4129. # This hack is so that the source file can tell whether it is being
  4130. # built for inclusion in a dll (and should export symbols for example).
  4131. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4132. # (--disable-auto-import) libraries
  4133. m4_if([$1], [GCJ], [],
  4134. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4135. case $host_os in
  4136. os2*)
  4137. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4138. ;;
  4139. esac
  4140. ;;
  4141. darwin* | rhapsody*)
  4142. # PIC is the default on this platform
  4143. # Common symbols not allowed in MH_DYLIB files
  4144. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4145. ;;
  4146. haiku*)
  4147. # PIC is the default for Haiku.
  4148. # The "-static" flag exists, but is broken.
  4149. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4150. ;;
  4151. hpux*)
  4152. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4153. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4154. # sets the default TLS model and affects inlining.
  4155. case $host_cpu in
  4156. hppa*64*)
  4157. # +Z the default
  4158. ;;
  4159. *)
  4160. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4161. ;;
  4162. esac
  4163. ;;
  4164. interix[[3-9]]*)
  4165. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4166. # Instead, we relocate shared libraries at runtime.
  4167. ;;
  4168. msdosdjgpp*)
  4169. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4170. # on systems that don't support them.
  4171. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4172. enable_shared=no
  4173. ;;
  4174. *nto* | *qnx*)
  4175. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4176. # it will coredump.
  4177. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4178. ;;
  4179. sysv4*MP*)
  4180. if test -d /usr/nec; then
  4181. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4182. fi
  4183. ;;
  4184. *)
  4185. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4186. ;;
  4187. esac
  4188. case $cc_basename in
  4189. nvcc*) # Cuda Compiler Driver 2.2
  4190. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4191. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4192. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4193. fi
  4194. ;;
  4195. esac
  4196. else
  4197. # PORTME Check for flag to pass linker flags through the system compiler.
  4198. case $host_os in
  4199. aix*)
  4200. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4201. if test ia64 = "$host_cpu"; then
  4202. # AIX 5 now supports IA64 processor
  4203. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4204. else
  4205. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4206. fi
  4207. ;;
  4208. darwin* | rhapsody*)
  4209. # PIC is the default on this platform
  4210. # Common symbols not allowed in MH_DYLIB files
  4211. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4212. case $cc_basename in
  4213. nagfor*)
  4214. # NAG Fortran compiler
  4215. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4216. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4217. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4218. ;;
  4219. esac
  4220. ;;
  4221. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4222. # This hack is so that the source file can tell whether it is being
  4223. # built for inclusion in a dll (and should export symbols for example).
  4224. m4_if([$1], [GCJ], [],
  4225. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4226. case $host_os in
  4227. os2*)
  4228. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
  4229. ;;
  4230. esac
  4231. ;;
  4232. hpux9* | hpux10* | hpux11*)
  4233. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4234. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4235. # not for PA HP-UX.
  4236. case $host_cpu in
  4237. hppa*64*|ia64*)
  4238. # +Z the default
  4239. ;;
  4240. *)
  4241. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4242. ;;
  4243. esac
  4244. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4245. _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
  4246. ;;
  4247. irix5* | irix6* | nonstopux*)
  4248. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4249. # PIC (with -KPIC) is the default.
  4250. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4251. ;;
  4252. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  4253. case $cc_basename in
  4254. # old Intel for x86_64, which still supported -KPIC.
  4255. ecc*)
  4256. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4257. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4258. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4259. ;;
  4260. # icc used to be incompatible with GCC.
  4261. # ICC 10 doesn't accept -KPIC any more.
  4262. icc* | ifort*)
  4263. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4264. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4265. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4266. ;;
  4267. # Lahey Fortran 8.1.
  4268. lf95*)
  4269. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4270. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4271. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4272. ;;
  4273. nagfor*)
  4274. # NAG Fortran compiler
  4275. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4276. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4277. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4278. ;;
  4279. tcc*)
  4280. # Fabrice Bellard et al's Tiny C Compiler
  4281. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4282. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4283. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4284. ;;
  4285. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  4286. # Portland Group compilers (*not* the Pentium gcc compiler,
  4287. # which looks to be a dead project)
  4288. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4289. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4290. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4291. ;;
  4292. ccc*)
  4293. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4294. # All Alpha code is PIC.
  4295. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4296. ;;
  4297. xl* | bgxl* | bgf* | mpixl*)
  4298. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  4299. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4300. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4301. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4302. ;;
  4303. *)
  4304. case `$CC -V 2>&1 | sed 5q` in
  4305. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  4306. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4307. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4308. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4309. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4310. ;;
  4311. *Sun\ F* | *Sun*Fortran*)
  4312. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4313. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4314. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4315. ;;
  4316. *Sun\ C*)
  4317. # Sun C 5.9
  4318. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4319. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4320. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4321. ;;
  4322. *Intel*\ [[CF]]*Compiler*)
  4323. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4324. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4325. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4326. ;;
  4327. *Portland\ Group*)
  4328. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4329. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4330. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4331. ;;
  4332. esac
  4333. ;;
  4334. esac
  4335. ;;
  4336. newsos6)
  4337. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4338. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4339. ;;
  4340. *nto* | *qnx*)
  4341. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4342. # it will coredump.
  4343. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4344. ;;
  4345. osf3* | osf4* | osf5*)
  4346. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4347. # All OSF/1 code is PIC.
  4348. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4349. ;;
  4350. rdos*)
  4351. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4352. ;;
  4353. solaris*)
  4354. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4355. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4356. case $cc_basename in
  4357. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4358. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4359. *)
  4360. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4361. esac
  4362. ;;
  4363. sunos4*)
  4364. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4365. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4366. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4367. ;;
  4368. sysv4 | sysv4.2uw2* | sysv4.3*)
  4369. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4370. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4371. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4372. ;;
  4373. sysv4*MP*)
  4374. if test -d /usr/nec; then
  4375. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4376. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4377. fi
  4378. ;;
  4379. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4380. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4381. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4382. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4383. ;;
  4384. unicos*)
  4385. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4386. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4387. ;;
  4388. uts4*)
  4389. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4390. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4391. ;;
  4392. *)
  4393. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4394. ;;
  4395. esac
  4396. fi
  4397. ])
  4398. case $host_os in
  4399. # For platforms that do not support PIC, -DPIC is meaningless:
  4400. *djgpp*)
  4401. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4402. ;;
  4403. *)
  4404. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4405. ;;
  4406. esac
  4407. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4408. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4409. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4410. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4411. #
  4412. # Check to make sure the PIC flag actually works.
  4413. #
  4414. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4415. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4416. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4417. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4418. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4419. "" | " "*) ;;
  4420. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4421. esac],
  4422. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4423. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4424. fi
  4425. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4426. [Additional compiler flags for building library objects])
  4427. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4428. [How to pass a linker flag through the compiler])
  4429. #
  4430. # Check to make sure the static flag actually works.
  4431. #
  4432. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4433. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4434. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4435. $lt_tmp_static_flag,
  4436. [],
  4437. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4438. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4439. [Compiler flag to prevent dynamic linking])
  4440. ])# _LT_COMPILER_PIC
  4441. # _LT_LINKER_SHLIBS([TAGNAME])
  4442. # ----------------------------
  4443. # See if the linker supports building shared libraries.
  4444. m4_defun([_LT_LINKER_SHLIBS],
  4445. [AC_REQUIRE([LT_PATH_LD])dnl
  4446. AC_REQUIRE([LT_PATH_NM])dnl
  4447. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4448. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4449. m4_require([_LT_DECL_EGREP])dnl
  4450. m4_require([_LT_DECL_SED])dnl
  4451. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4452. m4_require([_LT_TAG_COMPILER])dnl
  4453. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4454. m4_if([$1], [CXX], [
  4455. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4456. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4457. case $host_os in
  4458. aix[[4-9]]*)
  4459. # If we're using GNU nm, then we don't want the "-C" option.
  4460. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4461. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4462. # weak defined symbols like other global defined symbols, whereas
  4463. # GNU nm marks them as "W".
  4464. # While the 'weak' keyword is ignored in the Export File, we need
  4465. # it in the Import File for the 'aix-soname' feature, so we have
  4466. # to replace the "-B" option with "-P" for AIX nm.
  4467. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4468. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  4469. else
  4470. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  4471. fi
  4472. ;;
  4473. pw32*)
  4474. _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
  4475. ;;
  4476. cygwin* | mingw* | cegcc*)
  4477. case $cc_basename in
  4478. cl*)
  4479. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4480. ;;
  4481. *)
  4482. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4483. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4484. ;;
  4485. esac
  4486. ;;
  4487. *)
  4488. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4489. ;;
  4490. esac
  4491. ], [
  4492. runpath_var=
  4493. _LT_TAGVAR(allow_undefined_flag, $1)=
  4494. _LT_TAGVAR(always_export_symbols, $1)=no
  4495. _LT_TAGVAR(archive_cmds, $1)=
  4496. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4497. _LT_TAGVAR(compiler_needs_object, $1)=no
  4498. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4499. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4500. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4501. _LT_TAGVAR(hardcode_automatic, $1)=no
  4502. _LT_TAGVAR(hardcode_direct, $1)=no
  4503. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4504. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4505. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4506. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4507. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4508. _LT_TAGVAR(inherit_rpath, $1)=no
  4509. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4510. _LT_TAGVAR(module_cmds, $1)=
  4511. _LT_TAGVAR(module_expsym_cmds, $1)=
  4512. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4513. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4514. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4515. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4516. # include_expsyms should be a list of space-separated symbols to be *always*
  4517. # included in the symbol list
  4518. _LT_TAGVAR(include_expsyms, $1)=
  4519. # exclude_expsyms can be an extended regexp of symbols to exclude
  4520. # it will be wrapped by ' (' and ')$', so one must not match beginning or
  4521. # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
  4522. # as well as any symbol that contains 'd'.
  4523. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4524. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4525. # platforms (ab)use it in PIC code, but their linkers get confused if
  4526. # the symbol is explicitly referenced. Since portable code cannot
  4527. # rely on this symbol name, it's probably fine to never include it in
  4528. # preloaded symbol tables.
  4529. # Exclude shared library initialization/finalization symbols.
  4530. dnl Note also adjust exclude_expsyms for C++ above.
  4531. extract_expsyms_cmds=
  4532. case $host_os in
  4533. cygwin* | mingw* | pw32* | cegcc*)
  4534. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4535. # When not using gcc, we currently assume that we are using
  4536. # Microsoft Visual C++.
  4537. if test yes != "$GCC"; then
  4538. with_gnu_ld=no
  4539. fi
  4540. ;;
  4541. interix*)
  4542. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4543. with_gnu_ld=yes
  4544. ;;
  4545. openbsd* | bitrig*)
  4546. with_gnu_ld=no
  4547. ;;
  4548. esac
  4549. _LT_TAGVAR(ld_shlibs, $1)=yes
  4550. # On some targets, GNU ld is compatible enough with the native linker
  4551. # that we're better off using the native interface for both.
  4552. lt_use_gnu_ld_interface=no
  4553. if test yes = "$with_gnu_ld"; then
  4554. case $host_os in
  4555. aix*)
  4556. # The AIX port of GNU ld has always aspired to compatibility
  4557. # with the native linker. However, as the warning in the GNU ld
  4558. # block says, versions before 2.19.5* couldn't really create working
  4559. # shared libraries, regardless of the interface used.
  4560. case `$LD -v 2>&1` in
  4561. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4562. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4563. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4564. *)
  4565. lt_use_gnu_ld_interface=yes
  4566. ;;
  4567. esac
  4568. ;;
  4569. *)
  4570. lt_use_gnu_ld_interface=yes
  4571. ;;
  4572. esac
  4573. fi
  4574. if test yes = "$lt_use_gnu_ld_interface"; then
  4575. # If archive_cmds runs LD, not CC, wlarc should be empty
  4576. wlarc='$wl'
  4577. # Set some defaults for GNU ld with shared library support. These
  4578. # are reset later if shared libraries are not supported. Putting them
  4579. # here allows them to be overridden if necessary.
  4580. runpath_var=LD_RUN_PATH
  4581. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4582. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  4583. # ancient GNU ld didn't support --whole-archive et. al.
  4584. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4585. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  4586. else
  4587. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4588. fi
  4589. supports_anon_versioning=no
  4590. case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
  4591. *GNU\ gold*) supports_anon_versioning=yes ;;
  4592. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4593. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4594. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4595. *\ 2.11.*) ;; # other 2.11 versions
  4596. *) supports_anon_versioning=yes ;;
  4597. esac
  4598. # See if GNU ld supports shared libraries.
  4599. case $host_os in
  4600. aix[[3-9]]*)
  4601. # On AIX/PPC, the GNU linker is very broken
  4602. if test ia64 != "$host_cpu"; then
  4603. _LT_TAGVAR(ld_shlibs, $1)=no
  4604. cat <<_LT_EOF 1>&2
  4605. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4606. *** to be unable to reliably create shared libraries on AIX.
  4607. *** Therefore, libtool is disabling shared libraries support. If you
  4608. *** really care for shared libraries, you may want to install binutils
  4609. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4610. *** You will then need to restart the configuration process.
  4611. _LT_EOF
  4612. fi
  4613. ;;
  4614. amigaos*)
  4615. case $host_cpu in
  4616. powerpc)
  4617. # see comment about AmigaOS4 .so support
  4618. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4619. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4620. ;;
  4621. m68k)
  4622. _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)'
  4623. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4624. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4625. ;;
  4626. esac
  4627. ;;
  4628. beos*)
  4629. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4630. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4631. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4632. # support --undefined. This deserves some investigation. FIXME
  4633. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4634. else
  4635. _LT_TAGVAR(ld_shlibs, $1)=no
  4636. fi
  4637. ;;
  4638. cygwin* | mingw* | pw32* | cegcc*)
  4639. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4640. # as there is no search path for DLLs.
  4641. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4642. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  4643. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4644. _LT_TAGVAR(always_export_symbols, $1)=no
  4645. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4646. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4647. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4648. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4649. _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'
  4650. # If the export-symbols file already is a .def file, use it as
  4651. # is; otherwise, prepend EXPORTS...
  4652. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  4653. cp $export_symbols $output_objdir/$soname.def;
  4654. else
  4655. echo EXPORTS > $output_objdir/$soname.def;
  4656. cat $export_symbols >> $output_objdir/$soname.def;
  4657. fi~
  4658. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4659. else
  4660. _LT_TAGVAR(ld_shlibs, $1)=no
  4661. fi
  4662. ;;
  4663. haiku*)
  4664. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4665. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4666. ;;
  4667. os2*)
  4668. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4669. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4670. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4671. shrext_cmds=.dll
  4672. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4673. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4674. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4675. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4676. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  4677. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4678. emximp -o $lib $output_objdir/$libname.def'
  4679. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  4680. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  4681. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  4682. $ECHO EXPORTS >> $output_objdir/$libname.def~
  4683. prefix_cmds="$SED"~
  4684. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  4685. prefix_cmds="$prefix_cmds -e 1d";
  4686. fi~
  4687. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  4688. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  4689. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  4690. emximp -o $lib $output_objdir/$libname.def'
  4691. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  4692. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4693. ;;
  4694. interix[[3-9]]*)
  4695. _LT_TAGVAR(hardcode_direct, $1)=no
  4696. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4697. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  4698. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  4699. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4700. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4701. # default) and relocated if they conflict, which is a slow very memory
  4702. # consuming and fragmenting process. To avoid this, we pick a random,
  4703. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4704. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4705. _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'
  4706. _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'
  4707. ;;
  4708. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4709. tmp_diet=no
  4710. if test linux-dietlibc = "$host_os"; then
  4711. case $cc_basename in
  4712. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4713. esac
  4714. fi
  4715. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4716. && test no = "$tmp_diet"
  4717. then
  4718. tmp_addflag=' $pic_flag'
  4719. tmp_sharedflag='-shared'
  4720. case $cc_basename,$host_cpu in
  4721. pgcc*) # Portland Group C compiler
  4722. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4723. tmp_addflag=' $pic_flag'
  4724. ;;
  4725. pgf77* | pgf90* | pgf95* | pgfortran*)
  4726. # Portland Group f77 and f90 compilers
  4727. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4728. tmp_addflag=' $pic_flag -Mnomain' ;;
  4729. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4730. tmp_addflag=' -i_dynamic' ;;
  4731. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4732. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4733. ifc* | ifort*) # Intel Fortran compiler
  4734. tmp_addflag=' -nofor_main' ;;
  4735. lf95*) # Lahey Fortran 8.1
  4736. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4737. tmp_sharedflag='--shared' ;;
  4738. nagfor*) # NAGFOR 5.3
  4739. tmp_sharedflag='-Wl,-shared' ;;
  4740. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4741. tmp_sharedflag='-qmkshrobj'
  4742. tmp_addflag= ;;
  4743. nvcc*) # Cuda Compiler Driver 2.2
  4744. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4745. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4746. ;;
  4747. esac
  4748. case `$CC -V 2>&1 | sed 5q` in
  4749. *Sun\ C*) # Sun C 5.9
  4750. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  4751. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4752. tmp_sharedflag='-G' ;;
  4753. *Sun\ F*) # Sun Fortran 8.3
  4754. tmp_sharedflag='-G' ;;
  4755. esac
  4756. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4757. if test yes = "$supports_anon_versioning"; then
  4758. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4759. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4760. echo "local: *; };" >> $output_objdir/$libname.ver~
  4761. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  4762. fi
  4763. case $cc_basename in
  4764. tcc*)
  4765. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
  4766. ;;
  4767. xlf* | bgf* | bgxlf* | mpixlf*)
  4768. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4769. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4770. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4771. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4772. if test yes = "$supports_anon_versioning"; then
  4773. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4774. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4775. echo "local: *; };" >> $output_objdir/$libname.ver~
  4776. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4777. fi
  4778. ;;
  4779. esac
  4780. else
  4781. _LT_TAGVAR(ld_shlibs, $1)=no
  4782. fi
  4783. ;;
  4784. netbsd*)
  4785. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4786. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4787. wlarc=
  4788. else
  4789. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4790. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4791. fi
  4792. ;;
  4793. solaris*)
  4794. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4795. _LT_TAGVAR(ld_shlibs, $1)=no
  4796. cat <<_LT_EOF 1>&2
  4797. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4798. *** create shared libraries on Solaris systems. Therefore, libtool
  4799. *** is disabling shared libraries support. We urge you to upgrade GNU
  4800. *** binutils to release 2.9.1 or newer. Another option is to modify
  4801. *** your PATH or compiler configuration so that the native linker is
  4802. *** used, and then restart.
  4803. _LT_EOF
  4804. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4805. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4806. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4807. else
  4808. _LT_TAGVAR(ld_shlibs, $1)=no
  4809. fi
  4810. ;;
  4811. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4812. case `$LD -v 2>&1` in
  4813. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4814. _LT_TAGVAR(ld_shlibs, $1)=no
  4815. cat <<_LT_EOF 1>&2
  4816. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
  4817. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4818. *** is disabling shared libraries support. We urge you to upgrade GNU
  4819. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4820. *** your PATH or compiler configuration so that the native linker is
  4821. *** used, and then restart.
  4822. _LT_EOF
  4823. ;;
  4824. *)
  4825. # For security reasons, it is highly recommended that you always
  4826. # use absolute paths for naming shared libraries, and exclude the
  4827. # DT_RUNPATH tag from executables and libraries. But doing so
  4828. # requires that you compile everything twice, which is a pain.
  4829. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4830. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  4831. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4832. _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'
  4833. else
  4834. _LT_TAGVAR(ld_shlibs, $1)=no
  4835. fi
  4836. ;;
  4837. esac
  4838. ;;
  4839. sunos4*)
  4840. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4841. wlarc=
  4842. _LT_TAGVAR(hardcode_direct, $1)=yes
  4843. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4844. ;;
  4845. *)
  4846. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4847. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  4848. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  4849. else
  4850. _LT_TAGVAR(ld_shlibs, $1)=no
  4851. fi
  4852. ;;
  4853. esac
  4854. if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
  4855. runpath_var=
  4856. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4857. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4858. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4859. fi
  4860. else
  4861. # PORTME fill in a description of your system's linker (not GNU ld)
  4862. case $host_os in
  4863. aix3*)
  4864. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4865. _LT_TAGVAR(always_export_symbols, $1)=yes
  4866. _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'
  4867. # Note: this linker hardcodes the directories in LIBPATH if there
  4868. # are no directories specified by -L.
  4869. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4870. if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
  4871. # Neither direct hardcoding nor static linking is supported with a
  4872. # broken collect2.
  4873. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4874. fi
  4875. ;;
  4876. aix[[4-9]]*)
  4877. if test ia64 = "$host_cpu"; then
  4878. # On IA64, the linker does run time linking by default, so we don't
  4879. # have to do anything special.
  4880. aix_use_runtimelinking=no
  4881. exp_sym_flag='-Bexport'
  4882. no_entry_flag=
  4883. else
  4884. # If we're using GNU nm, then we don't want the "-C" option.
  4885. # -C means demangle to GNU nm, but means don't demangle to AIX nm.
  4886. # Without the "-l" option, or with the "-B" option, AIX nm treats
  4887. # weak defined symbols like other global defined symbols, whereas
  4888. # GNU nm marks them as "W".
  4889. # While the 'weak' keyword is ignored in the Export File, we need
  4890. # it in the Import File for the 'aix-soname' feature, so we have
  4891. # to replace the "-B" option with "-P" for AIX nm.
  4892. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4893. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
  4894. else
  4895. _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
  4896. fi
  4897. aix_use_runtimelinking=no
  4898. # Test if we are trying to use run time linking or normal
  4899. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4900. # have runtime linking enabled, and use it for executables.
  4901. # For shared libraries, we enable/disable runtime linking
  4902. # depending on the kind of the shared library created -
  4903. # when "with_aix_soname,aix_use_runtimelinking" is:
  4904. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  4905. # "aix,yes" lib.so shared, rtl:yes, for executables
  4906. # lib.a static archive
  4907. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  4908. # lib.a(lib.so.V) shared, rtl:no, for executables
  4909. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  4910. # lib.a(lib.so.V) shared, rtl:no
  4911. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  4912. # lib.a static archive
  4913. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4914. for ld_flag in $LDFLAGS; do
  4915. if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
  4916. aix_use_runtimelinking=yes
  4917. break
  4918. fi
  4919. done
  4920. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  4921. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  4922. # so we don't have lib.a shared libs to link our executables.
  4923. # We have to force runtime linking in this case.
  4924. aix_use_runtimelinking=yes
  4925. LDFLAGS="$LDFLAGS -Wl,-brtl"
  4926. fi
  4927. ;;
  4928. esac
  4929. exp_sym_flag='-bexport'
  4930. no_entry_flag='-bnoentry'
  4931. fi
  4932. # When large executables or shared objects are built, AIX ld can
  4933. # have problems creating the table of contents. If linking a library
  4934. # or program results in "error TOC overflow" add -mminimal-toc to
  4935. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4936. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4937. _LT_TAGVAR(archive_cmds, $1)=''
  4938. _LT_TAGVAR(hardcode_direct, $1)=yes
  4939. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4940. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4941. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4942. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  4943. case $with_aix_soname,$aix_use_runtimelinking in
  4944. aix,*) ;; # traditional, no import file
  4945. svr4,* | *,yes) # use import file
  4946. # The Import File defines what to hardcode.
  4947. _LT_TAGVAR(hardcode_direct, $1)=no
  4948. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4949. ;;
  4950. esac
  4951. if test yes = "$GCC"; then
  4952. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4953. # We only want to do this on AIX 4.2 and lower, the check
  4954. # below for broken collect2 doesn't work under 4.3+
  4955. collect2name=`$CC -print-prog-name=collect2`
  4956. if test -f "$collect2name" &&
  4957. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4958. then
  4959. # We have reworked collect2
  4960. :
  4961. else
  4962. # We have old collect2
  4963. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4964. # It fails to find uninstalled libraries when the uninstalled
  4965. # path is not listed in the libpath. Setting hardcode_minus_L
  4966. # to unsupported forces relinking
  4967. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4968. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4969. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4970. fi
  4971. ;;
  4972. esac
  4973. shared_flag='-shared'
  4974. if test yes = "$aix_use_runtimelinking"; then
  4975. shared_flag="$shared_flag "'$wl-G'
  4976. fi
  4977. # Need to ensure runtime linking is disabled for the traditional
  4978. # shared library, or the linker may eventually find shared libraries
  4979. # /with/ Import File - we do not want to mix them.
  4980. shared_flag_aix='-shared'
  4981. shared_flag_svr4='-shared $wl-G'
  4982. else
  4983. # not using gcc
  4984. if test ia64 = "$host_cpu"; then
  4985. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4986. # chokes on -Wl,-G. The following line is correct:
  4987. shared_flag='-G'
  4988. else
  4989. if test yes = "$aix_use_runtimelinking"; then
  4990. shared_flag='$wl-G'
  4991. else
  4992. shared_flag='$wl-bM:SRE'
  4993. fi
  4994. shared_flag_aix='$wl-bM:SRE'
  4995. shared_flag_svr4='$wl-G'
  4996. fi
  4997. fi
  4998. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  4999. # It seems that -bexpall does not export symbols beginning with
  5000. # underscore (_), so it is better to generate a list of symbols to export.
  5001. _LT_TAGVAR(always_export_symbols, $1)=yes
  5002. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  5003. # Warning - without using the other runtime loading flags (-brtl),
  5004. # -berok will link without error, but may produce a broken library.
  5005. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5006. # Determine the default libpath from the value encoded in an
  5007. # empty executable.
  5008. _LT_SYS_MODULE_PATH_AIX([$1])
  5009. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5010. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  5011. else
  5012. if test ia64 = "$host_cpu"; then
  5013. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  5014. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5015. _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"
  5016. else
  5017. # Determine the default libpath from the value encoded in an
  5018. # empty executable.
  5019. _LT_SYS_MODULE_PATH_AIX([$1])
  5020. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5021. # Warning - without using the other run time loading flags,
  5022. # -berok will link without error, but may produce a broken library.
  5023. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  5024. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  5025. if test yes = "$with_gnu_ld"; then
  5026. # We only use this code for GNU lds that support --whole-archive.
  5027. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  5028. else
  5029. # Exported symbols can be pulled into shared objects from archives
  5030. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5031. fi
  5032. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5033. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  5034. # -brtl affects multiple linker settings, -berok does not and is overridden later
  5035. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  5036. if test svr4 != "$with_aix_soname"; then
  5037. # This is similar to how AIX traditionally builds its shared libraries.
  5038. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  5039. fi
  5040. if test aix != "$with_aix_soname"; then
  5041. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  5042. else
  5043. # used by -dlpreopen to get the symbols
  5044. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  5045. fi
  5046. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  5047. fi
  5048. fi
  5049. ;;
  5050. amigaos*)
  5051. case $host_cpu in
  5052. powerpc)
  5053. # see comment about AmigaOS4 .so support
  5054. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  5055. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5056. ;;
  5057. m68k)
  5058. _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)'
  5059. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5060. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5061. ;;
  5062. esac
  5063. ;;
  5064. bsdi[[45]]*)
  5065. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5066. ;;
  5067. cygwin* | mingw* | pw32* | cegcc*)
  5068. # When not using gcc, we currently assume that we are using
  5069. # Microsoft Visual C++.
  5070. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5071. # no search path for DLLs.
  5072. case $cc_basename in
  5073. cl*)
  5074. # Native MSVC
  5075. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5076. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5077. _LT_TAGVAR(always_export_symbols, $1)=yes
  5078. _LT_TAGVAR(file_list_spec, $1)='@'
  5079. # Tell ltmain to make .lib files, not .a files.
  5080. libext=lib
  5081. # Tell ltmain to make .dll files, not .so files.
  5082. shrext_cmds=.dll
  5083. # FIXME: Setting linknames here is a bad hack.
  5084. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  5085. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  5086. cp "$export_symbols" "$output_objdir/$soname.def";
  5087. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  5088. else
  5089. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  5090. fi~
  5091. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5092. linknames='
  5093. # The linker will not automatically build a static lib if we build a DLL.
  5094. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5095. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5096. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5097. _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'
  5098. # Don't use ranlib
  5099. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5100. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5101. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5102. case $lt_outputfile in
  5103. *.exe|*.EXE) ;;
  5104. *)
  5105. lt_outputfile=$lt_outputfile.exe
  5106. lt_tool_outputfile=$lt_tool_outputfile.exe
  5107. ;;
  5108. esac~
  5109. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  5110. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5111. $RM "$lt_outputfile.manifest";
  5112. fi'
  5113. ;;
  5114. *)
  5115. # Assume MSVC wrapper
  5116. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5117. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5118. # Tell ltmain to make .lib files, not .a files.
  5119. libext=lib
  5120. # Tell ltmain to make .dll files, not .so files.
  5121. shrext_cmds=.dll
  5122. # FIXME: Setting linknames here is a bad hack.
  5123. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  5124. # The linker will automatically build a .lib file if we build a DLL.
  5125. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5126. # FIXME: Should let the user specify the lib program.
  5127. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5128. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5129. ;;
  5130. esac
  5131. ;;
  5132. darwin* | rhapsody*)
  5133. _LT_DARWIN_LINKER_FEATURES($1)
  5134. ;;
  5135. dgux*)
  5136. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5137. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5138. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5139. ;;
  5140. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5141. # support. Future versions do this automatically, but an explicit c++rt0.o
  5142. # does not break anything, and helps significantly (at the cost of a little
  5143. # extra space).
  5144. freebsd2.2*)
  5145. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5146. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5147. _LT_TAGVAR(hardcode_direct, $1)=yes
  5148. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5149. ;;
  5150. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5151. freebsd2.*)
  5152. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5153. _LT_TAGVAR(hardcode_direct, $1)=yes
  5154. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5155. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5156. ;;
  5157. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5158. freebsd* | dragonfly*)
  5159. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5160. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5161. _LT_TAGVAR(hardcode_direct, $1)=yes
  5162. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5163. ;;
  5164. hpux9*)
  5165. if test yes = "$GCC"; then
  5166. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  5167. else
  5168. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  5169. fi
  5170. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5171. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5172. _LT_TAGVAR(hardcode_direct, $1)=yes
  5173. # hardcode_minus_L: Not really in the search PATH,
  5174. # but as the default location of the library.
  5175. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5176. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5177. ;;
  5178. hpux10*)
  5179. if test yes,no = "$GCC,$with_gnu_ld"; then
  5180. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5181. else
  5182. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5183. fi
  5184. if test no = "$with_gnu_ld"; then
  5185. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5186. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5187. _LT_TAGVAR(hardcode_direct, $1)=yes
  5188. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5189. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5190. # hardcode_minus_L: Not really in the search PATH,
  5191. # but as the default location of the library.
  5192. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5193. fi
  5194. ;;
  5195. hpux11*)
  5196. if test yes,no = "$GCC,$with_gnu_ld"; then
  5197. case $host_cpu in
  5198. hppa*64*)
  5199. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5200. ;;
  5201. ia64*)
  5202. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5203. ;;
  5204. *)
  5205. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5206. ;;
  5207. esac
  5208. else
  5209. case $host_cpu in
  5210. hppa*64*)
  5211. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5212. ;;
  5213. ia64*)
  5214. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5215. ;;
  5216. *)
  5217. m4_if($1, [], [
  5218. # Older versions of the 11.00 compiler do not understand -b yet
  5219. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  5220. _LT_LINKER_OPTION([if $CC understands -b],
  5221. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  5222. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  5223. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  5224. [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  5225. ;;
  5226. esac
  5227. fi
  5228. if test no = "$with_gnu_ld"; then
  5229. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  5230. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5231. case $host_cpu in
  5232. hppa*64*|ia64*)
  5233. _LT_TAGVAR(hardcode_direct, $1)=no
  5234. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5235. ;;
  5236. *)
  5237. _LT_TAGVAR(hardcode_direct, $1)=yes
  5238. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5239. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5240. # hardcode_minus_L: Not really in the search PATH,
  5241. # but as the default location of the library.
  5242. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5243. ;;
  5244. esac
  5245. fi
  5246. ;;
  5247. irix5* | irix6* | nonstopux*)
  5248. if test yes = "$GCC"; then
  5249. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  5250. # Try to use the -exported_symbol ld option, if it does not
  5251. # work, assume that -exports_file does not work either and
  5252. # implicitly export all symbols.
  5253. # This should be the same for all languages, so no per-tag cache variable.
  5254. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  5255. [lt_cv_irix_exported_symbol],
  5256. [save_LDFLAGS=$LDFLAGS
  5257. LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
  5258. AC_LINK_IFELSE(
  5259. [AC_LANG_SOURCE(
  5260. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  5261. [C++], [[int foo (void) { return 0; }]],
  5262. [Fortran 77], [[
  5263. subroutine foo
  5264. end]],
  5265. [Fortran], [[
  5266. subroutine foo
  5267. end]])])],
  5268. [lt_cv_irix_exported_symbol=yes],
  5269. [lt_cv_irix_exported_symbol=no])
  5270. LDFLAGS=$save_LDFLAGS])
  5271. if test yes = "$lt_cv_irix_exported_symbol"; then
  5272. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
  5273. fi
  5274. else
  5275. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  5276. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
  5277. fi
  5278. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5279. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5280. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5281. _LT_TAGVAR(inherit_rpath, $1)=yes
  5282. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5283. ;;
  5284. linux*)
  5285. case $cc_basename in
  5286. tcc*)
  5287. # Fabrice Bellard et al's Tiny C Compiler
  5288. _LT_TAGVAR(ld_shlibs, $1)=yes
  5289. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5290. ;;
  5291. esac
  5292. ;;
  5293. netbsd*)
  5294. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5295. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5296. else
  5297. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5298. fi
  5299. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5300. _LT_TAGVAR(hardcode_direct, $1)=yes
  5301. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5302. ;;
  5303. newsos6)
  5304. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5305. _LT_TAGVAR(hardcode_direct, $1)=yes
  5306. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5307. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5308. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5309. ;;
  5310. *nto* | *qnx*)
  5311. ;;
  5312. openbsd* | bitrig*)
  5313. if test -f /usr/libexec/ld.so; then
  5314. _LT_TAGVAR(hardcode_direct, $1)=yes
  5315. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5316. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5317. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
  5318. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5319. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
  5320. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5321. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  5322. else
  5323. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5324. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  5325. fi
  5326. else
  5327. _LT_TAGVAR(ld_shlibs, $1)=no
  5328. fi
  5329. ;;
  5330. os2*)
  5331. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5332. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5333. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5334. shrext_cmds=.dll
  5335. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5336. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5337. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5338. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5339. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  5340. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5341. emximp -o $lib $output_objdir/$libname.def'
  5342. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  5343. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  5344. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  5345. $ECHO EXPORTS >> $output_objdir/$libname.def~
  5346. prefix_cmds="$SED"~
  5347. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  5348. prefix_cmds="$prefix_cmds -e 1d";
  5349. fi~
  5350. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  5351. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  5352. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  5353. emximp -o $lib $output_objdir/$libname.def'
  5354. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  5355. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5356. ;;
  5357. osf3*)
  5358. if test yes = "$GCC"; then
  5359. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5360. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  5361. else
  5362. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5363. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  5364. fi
  5365. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5366. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5367. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5368. ;;
  5369. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5370. if test yes = "$GCC"; then
  5371. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  5372. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  5373. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5374. else
  5375. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5376. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  5377. _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~
  5378. $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
  5379. # Both c and cxx compiler support -rpath directly
  5380. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5381. fi
  5382. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5383. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5384. ;;
  5385. solaris*)
  5386. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5387. if test yes = "$GCC"; then
  5388. wlarc='$wl'
  5389. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
  5390. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5391. $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5392. else
  5393. case `$CC -V 2>&1` in
  5394. *"Compilers 5.0"*)
  5395. wlarc=''
  5396. _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5397. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5398. $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5399. ;;
  5400. *)
  5401. wlarc='$wl'
  5402. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5403. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5404. $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5405. ;;
  5406. esac
  5407. fi
  5408. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5409. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5410. case $host_os in
  5411. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5412. *)
  5413. # The compiler driver will combine and reorder linker options,
  5414. # but understands '-z linker_flag'. GCC discards it without '$wl',
  5415. # but is careful enough not to reorder.
  5416. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5417. if test yes = "$GCC"; then
  5418. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  5419. else
  5420. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5421. fi
  5422. ;;
  5423. esac
  5424. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5425. ;;
  5426. sunos4*)
  5427. if test sequent = "$host_vendor"; then
  5428. # Use $CC to link under sequent, because it throws in some extra .o
  5429. # files that make .init and .fini sections work.
  5430. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5431. else
  5432. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5433. fi
  5434. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5435. _LT_TAGVAR(hardcode_direct, $1)=yes
  5436. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5437. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5438. ;;
  5439. sysv4)
  5440. case $host_vendor in
  5441. sni)
  5442. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5443. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5444. ;;
  5445. siemens)
  5446. ## LD is ld it makes a PLAMLIB
  5447. ## CC just makes a GrossModule.
  5448. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5449. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5450. _LT_TAGVAR(hardcode_direct, $1)=no
  5451. ;;
  5452. motorola)
  5453. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5454. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5455. ;;
  5456. esac
  5457. runpath_var='LD_RUN_PATH'
  5458. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5459. ;;
  5460. sysv4.3*)
  5461. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5462. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5463. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5464. ;;
  5465. sysv4*MP*)
  5466. if test -d /usr/nec; then
  5467. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5468. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5469. runpath_var=LD_RUN_PATH
  5470. hardcode_runpath_var=yes
  5471. _LT_TAGVAR(ld_shlibs, $1)=yes
  5472. fi
  5473. ;;
  5474. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5475. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5476. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5477. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5478. runpath_var='LD_RUN_PATH'
  5479. if test yes = "$GCC"; then
  5480. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5481. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5482. else
  5483. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5484. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5485. fi
  5486. ;;
  5487. sysv5* | sco3.2v5* | sco5v6*)
  5488. # Note: We CANNOT use -z defs as we might desire, because we do not
  5489. # link with -lc, and that would cause any symbols used from libc to
  5490. # always be unresolved, which means just about no library would
  5491. # ever link correctly. If we're not using GNU ld we use -z text
  5492. # though, which does catch some bad symbols but isn't as heavy-handed
  5493. # as -z defs.
  5494. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  5495. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  5496. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5497. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5498. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  5499. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5500. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5501. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  5502. runpath_var='LD_RUN_PATH'
  5503. if test yes = "$GCC"; then
  5504. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5505. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5506. else
  5507. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5508. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5509. fi
  5510. ;;
  5511. uts4*)
  5512. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5513. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5514. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5515. ;;
  5516. *)
  5517. _LT_TAGVAR(ld_shlibs, $1)=no
  5518. ;;
  5519. esac
  5520. if test sni = "$host_vendor"; then
  5521. case $host in
  5522. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5523. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
  5524. ;;
  5525. esac
  5526. fi
  5527. fi
  5528. ])
  5529. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5530. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  5531. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5532. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5533. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5534. _LT_DECL([], [extract_expsyms_cmds], [2],
  5535. [The commands to extract the exported symbol list from a shared archive])
  5536. #
  5537. # Do we need to explicitly link libc?
  5538. #
  5539. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5540. x|xyes)
  5541. # Assume -lc should be added
  5542. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5543. if test yes,yes = "$GCC,$enable_shared"; then
  5544. case $_LT_TAGVAR(archive_cmds, $1) in
  5545. *'~'*)
  5546. # FIXME: we may have to deal with multi-command sequences.
  5547. ;;
  5548. '$CC '*)
  5549. # Test whether the compiler implicitly links with -lc since on some
  5550. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5551. # to ld, don't add -lc before -lgcc.
  5552. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5553. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5554. [$RM conftest*
  5555. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5556. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5557. soname=conftest
  5558. lib=conftest
  5559. libobjs=conftest.$ac_objext
  5560. deplibs=
  5561. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5562. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5563. compiler_flags=-v
  5564. linker_flags=-v
  5565. verstring=
  5566. output_objdir=.
  5567. libname=conftest
  5568. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5569. _LT_TAGVAR(allow_undefined_flag, $1)=
  5570. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5571. then
  5572. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5573. else
  5574. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5575. fi
  5576. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5577. else
  5578. cat conftest.err 1>&5
  5579. fi
  5580. $RM conftest*
  5581. ])
  5582. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5583. ;;
  5584. esac
  5585. fi
  5586. ;;
  5587. esac
  5588. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5589. [Whether or not to add -lc for building shared libraries])
  5590. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5591. [enable_shared_with_static_runtimes], [0],
  5592. [Whether or not to disallow shared libs when runtime libs are static])
  5593. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5594. [Compiler flag to allow reflexive dlopens])
  5595. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5596. [Compiler flag to generate shared objects directly from archives])
  5597. _LT_TAGDECL([], [compiler_needs_object], [1],
  5598. [Whether the compiler copes with passing no objects directly])
  5599. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5600. [Create an old-style archive from a shared archive])
  5601. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5602. [Create a temporary old-style archive to link instead of a shared archive])
  5603. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5604. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5605. _LT_TAGDECL([], [module_cmds], [2],
  5606. [Commands used to build a loadable module if different from building
  5607. a shared archive.])
  5608. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5609. _LT_TAGDECL([], [with_gnu_ld], [1],
  5610. [Whether we are building with GNU ld or not])
  5611. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5612. [Flag that allows shared libraries with undefined symbols to be built])
  5613. _LT_TAGDECL([], [no_undefined_flag], [1],
  5614. [Flag that enforces no undefined symbols])
  5615. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5616. [Flag to hardcode $libdir into a binary during linking.
  5617. This must work even if $libdir does not exist])
  5618. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5619. [Whether we need a single "-rpath" flag with a separated argument])
  5620. _LT_TAGDECL([], [hardcode_direct], [0],
  5621. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5622. DIR into the resulting binary])
  5623. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5624. [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
  5625. DIR into the resulting binary and the resulting library dependency is
  5626. "absolute", i.e impossible to change by setting $shlibpath_var if the
  5627. library is relocated])
  5628. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5629. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5630. into the resulting binary])
  5631. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5632. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5633. into the resulting binary])
  5634. _LT_TAGDECL([], [hardcode_automatic], [0],
  5635. [Set to "yes" if building a shared library automatically hardcodes DIR
  5636. into the library and all subsequent libraries and executables linked
  5637. against it])
  5638. _LT_TAGDECL([], [inherit_rpath], [0],
  5639. [Set to yes if linker adds runtime paths of dependent libraries
  5640. to runtime path list])
  5641. _LT_TAGDECL([], [link_all_deplibs], [0],
  5642. [Whether libtool must link a program against all its dependency libraries])
  5643. _LT_TAGDECL([], [always_export_symbols], [0],
  5644. [Set to "yes" if exported symbols are required])
  5645. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5646. [The commands to list exported symbols])
  5647. _LT_TAGDECL([], [exclude_expsyms], [1],
  5648. [Symbols that should not be listed in the preloaded symbols])
  5649. _LT_TAGDECL([], [include_expsyms], [1],
  5650. [Symbols that must always be exported])
  5651. _LT_TAGDECL([], [prelink_cmds], [2],
  5652. [Commands necessary for linking programs (against libraries) with templates])
  5653. _LT_TAGDECL([], [postlink_cmds], [2],
  5654. [Commands necessary for finishing linking programs])
  5655. _LT_TAGDECL([], [file_list_spec], [1],
  5656. [Specify filename containing input files])
  5657. dnl FIXME: Not yet implemented
  5658. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5659. dnl [Compiler flag to generate thread safe objects])
  5660. ])# _LT_LINKER_SHLIBS
  5661. # _LT_LANG_C_CONFIG([TAG])
  5662. # ------------------------
  5663. # Ensure that the configuration variables for a C compiler are suitably
  5664. # defined. These variables are subsequently used by _LT_CONFIG to write
  5665. # the compiler configuration to 'libtool'.
  5666. m4_defun([_LT_LANG_C_CONFIG],
  5667. [m4_require([_LT_DECL_EGREP])dnl
  5668. lt_save_CC=$CC
  5669. AC_LANG_PUSH(C)
  5670. # Source file extension for C test sources.
  5671. ac_ext=c
  5672. # Object file extension for compiled C test sources.
  5673. objext=o
  5674. _LT_TAGVAR(objext, $1)=$objext
  5675. # Code to be used in simple compile tests
  5676. lt_simple_compile_test_code="int some_variable = 0;"
  5677. # Code to be used in simple link tests
  5678. lt_simple_link_test_code='int main(){return(0);}'
  5679. _LT_TAG_COMPILER
  5680. # Save the default compiler, since it gets overwritten when the other
  5681. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5682. compiler_DEFAULT=$CC
  5683. # save warnings/boilerplate of simple test code
  5684. _LT_COMPILER_BOILERPLATE
  5685. _LT_LINKER_BOILERPLATE
  5686. if test -n "$compiler"; then
  5687. _LT_COMPILER_NO_RTTI($1)
  5688. _LT_COMPILER_PIC($1)
  5689. _LT_COMPILER_C_O($1)
  5690. _LT_COMPILER_FILE_LOCKS($1)
  5691. _LT_LINKER_SHLIBS($1)
  5692. _LT_SYS_DYNAMIC_LINKER($1)
  5693. _LT_LINKER_HARDCODE_LIBPATH($1)
  5694. LT_SYS_DLOPEN_SELF
  5695. _LT_CMD_STRIPLIB
  5696. # Report what library types will actually be built
  5697. AC_MSG_CHECKING([if libtool supports shared libraries])
  5698. AC_MSG_RESULT([$can_build_shared])
  5699. AC_MSG_CHECKING([whether to build shared libraries])
  5700. test no = "$can_build_shared" && enable_shared=no
  5701. # On AIX, shared libraries and static libraries use the same namespace, and
  5702. # are all built from PIC.
  5703. case $host_os in
  5704. aix3*)
  5705. test yes = "$enable_shared" && enable_static=no
  5706. if test -n "$RANLIB"; then
  5707. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5708. postinstall_cmds='$RANLIB $lib'
  5709. fi
  5710. ;;
  5711. aix[[4-9]]*)
  5712. if test ia64 != "$host_cpu"; then
  5713. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  5714. yes,aix,yes) ;; # shared object as lib.so file only
  5715. yes,svr4,*) ;; # shared object as lib.so archive member only
  5716. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  5717. esac
  5718. fi
  5719. ;;
  5720. esac
  5721. AC_MSG_RESULT([$enable_shared])
  5722. AC_MSG_CHECKING([whether to build static libraries])
  5723. # Make sure either enable_shared or enable_static is yes.
  5724. test yes = "$enable_shared" || enable_static=yes
  5725. AC_MSG_RESULT([$enable_static])
  5726. _LT_CONFIG($1)
  5727. fi
  5728. AC_LANG_POP
  5729. CC=$lt_save_CC
  5730. ])# _LT_LANG_C_CONFIG
  5731. # _LT_LANG_CXX_CONFIG([TAG])
  5732. # --------------------------
  5733. # Ensure that the configuration variables for a C++ compiler are suitably
  5734. # defined. These variables are subsequently used by _LT_CONFIG to write
  5735. # the compiler configuration to 'libtool'.
  5736. m4_defun([_LT_LANG_CXX_CONFIG],
  5737. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5738. m4_require([_LT_DECL_EGREP])dnl
  5739. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5740. if test -n "$CXX" && ( test no != "$CXX" &&
  5741. ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
  5742. (test g++ != "$CXX"))); then
  5743. AC_PROG_CXXCPP
  5744. else
  5745. _lt_caught_CXX_error=yes
  5746. fi
  5747. AC_LANG_PUSH(C++)
  5748. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5749. _LT_TAGVAR(allow_undefined_flag, $1)=
  5750. _LT_TAGVAR(always_export_symbols, $1)=no
  5751. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5752. _LT_TAGVAR(compiler_needs_object, $1)=no
  5753. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5754. _LT_TAGVAR(hardcode_direct, $1)=no
  5755. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5756. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5757. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5758. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5759. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5760. _LT_TAGVAR(hardcode_automatic, $1)=no
  5761. _LT_TAGVAR(inherit_rpath, $1)=no
  5762. _LT_TAGVAR(module_cmds, $1)=
  5763. _LT_TAGVAR(module_expsym_cmds, $1)=
  5764. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5765. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5766. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5767. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5768. _LT_TAGVAR(no_undefined_flag, $1)=
  5769. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5770. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5771. # Source file extension for C++ test sources.
  5772. ac_ext=cpp
  5773. # Object file extension for compiled C++ test sources.
  5774. objext=o
  5775. _LT_TAGVAR(objext, $1)=$objext
  5776. # No sense in running all these tests if we already determined that
  5777. # the CXX compiler isn't working. Some variables (like enable_shared)
  5778. # are currently assumed to apply to all compilers on this platform,
  5779. # and will be corrupted by setting them based on a non-working compiler.
  5780. if test yes != "$_lt_caught_CXX_error"; then
  5781. # Code to be used in simple compile tests
  5782. lt_simple_compile_test_code="int some_variable = 0;"
  5783. # Code to be used in simple link tests
  5784. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5785. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5786. _LT_TAG_COMPILER
  5787. # save warnings/boilerplate of simple test code
  5788. _LT_COMPILER_BOILERPLATE
  5789. _LT_LINKER_BOILERPLATE
  5790. # Allow CC to be a program name with arguments.
  5791. lt_save_CC=$CC
  5792. lt_save_CFLAGS=$CFLAGS
  5793. lt_save_LD=$LD
  5794. lt_save_GCC=$GCC
  5795. GCC=$GXX
  5796. lt_save_with_gnu_ld=$with_gnu_ld
  5797. lt_save_path_LD=$lt_cv_path_LD
  5798. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5799. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5800. else
  5801. $as_unset lt_cv_prog_gnu_ld
  5802. fi
  5803. if test -n "${lt_cv_path_LDCXX+set}"; then
  5804. lt_cv_path_LD=$lt_cv_path_LDCXX
  5805. else
  5806. $as_unset lt_cv_path_LD
  5807. fi
  5808. test -z "${LDCXX+set}" || LD=$LDCXX
  5809. CC=${CXX-"c++"}
  5810. CFLAGS=$CXXFLAGS
  5811. compiler=$CC
  5812. _LT_TAGVAR(compiler, $1)=$CC
  5813. _LT_CC_BASENAME([$compiler])
  5814. if test -n "$compiler"; then
  5815. # We don't want -fno-exception when compiling C++ code, so set the
  5816. # no_builtin_flag separately
  5817. if test yes = "$GXX"; then
  5818. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5819. else
  5820. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5821. fi
  5822. if test yes = "$GXX"; then
  5823. # Set up default GNU C++ configuration
  5824. LT_PATH_LD
  5825. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5826. # archiving commands below assume that GNU ld is being used.
  5827. if test yes = "$with_gnu_ld"; then
  5828. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  5829. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  5830. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  5831. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  5832. # If archive_cmds runs LD, not CC, wlarc should be empty
  5833. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5834. # investigate it a little bit more. (MM)
  5835. wlarc='$wl'
  5836. # ancient GNU ld didn't support --whole-archive et. al.
  5837. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5838. $GREP 'no-whole-archive' > /dev/null; then
  5839. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  5840. else
  5841. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5842. fi
  5843. else
  5844. with_gnu_ld=no
  5845. wlarc=
  5846. # A generic and very simple default shared library creation
  5847. # command for GNU C++ for the case where it uses the native
  5848. # linker, instead of GNU ld. If possible, this setting should
  5849. # overridden to take advantage of the native linker features on
  5850. # the platform it is being used on.
  5851. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5852. fi
  5853. # Commands to make compiler produce verbose output that lists
  5854. # what "hidden" libraries, object files and flags are used when
  5855. # linking a shared library.
  5856. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  5857. else
  5858. GXX=no
  5859. with_gnu_ld=no
  5860. wlarc=
  5861. fi
  5862. # PORTME: fill in a description of your system's C++ link characteristics
  5863. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5864. _LT_TAGVAR(ld_shlibs, $1)=yes
  5865. case $host_os in
  5866. aix3*)
  5867. # FIXME: insert proper C++ library support
  5868. _LT_TAGVAR(ld_shlibs, $1)=no
  5869. ;;
  5870. aix[[4-9]]*)
  5871. if test ia64 = "$host_cpu"; then
  5872. # On IA64, the linker does run time linking by default, so we don't
  5873. # have to do anything special.
  5874. aix_use_runtimelinking=no
  5875. exp_sym_flag='-Bexport'
  5876. no_entry_flag=
  5877. else
  5878. aix_use_runtimelinking=no
  5879. # Test if we are trying to use run time linking or normal
  5880. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5881. # have runtime linking enabled, and use it for executables.
  5882. # For shared libraries, we enable/disable runtime linking
  5883. # depending on the kind of the shared library created -
  5884. # when "with_aix_soname,aix_use_runtimelinking" is:
  5885. # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
  5886. # "aix,yes" lib.so shared, rtl:yes, for executables
  5887. # lib.a static archive
  5888. # "both,no" lib.so.V(shr.o) shared, rtl:yes
  5889. # lib.a(lib.so.V) shared, rtl:no, for executables
  5890. # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
  5891. # lib.a(lib.so.V) shared, rtl:no
  5892. # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
  5893. # lib.a static archive
  5894. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5895. for ld_flag in $LDFLAGS; do
  5896. case $ld_flag in
  5897. *-brtl*)
  5898. aix_use_runtimelinking=yes
  5899. break
  5900. ;;
  5901. esac
  5902. done
  5903. if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
  5904. # With aix-soname=svr4, we create the lib.so.V shared archives only,
  5905. # so we don't have lib.a shared libs to link our executables.
  5906. # We have to force runtime linking in this case.
  5907. aix_use_runtimelinking=yes
  5908. LDFLAGS="$LDFLAGS -Wl,-brtl"
  5909. fi
  5910. ;;
  5911. esac
  5912. exp_sym_flag='-bexport'
  5913. no_entry_flag='-bnoentry'
  5914. fi
  5915. # When large executables or shared objects are built, AIX ld can
  5916. # have problems creating the table of contents. If linking a library
  5917. # or program results in "error TOC overflow" add -mminimal-toc to
  5918. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5919. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5920. _LT_TAGVAR(archive_cmds, $1)=''
  5921. _LT_TAGVAR(hardcode_direct, $1)=yes
  5922. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5923. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5924. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5925. _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
  5926. case $with_aix_soname,$aix_use_runtimelinking in
  5927. aix,*) ;; # no import file
  5928. svr4,* | *,yes) # use import file
  5929. # The Import File defines what to hardcode.
  5930. _LT_TAGVAR(hardcode_direct, $1)=no
  5931. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5932. ;;
  5933. esac
  5934. if test yes = "$GXX"; then
  5935. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5936. # We only want to do this on AIX 4.2 and lower, the check
  5937. # below for broken collect2 doesn't work under 4.3+
  5938. collect2name=`$CC -print-prog-name=collect2`
  5939. if test -f "$collect2name" &&
  5940. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5941. then
  5942. # We have reworked collect2
  5943. :
  5944. else
  5945. # We have old collect2
  5946. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5947. # It fails to find uninstalled libraries when the uninstalled
  5948. # path is not listed in the libpath. Setting hardcode_minus_L
  5949. # to unsupported forces relinking
  5950. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5951. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5952. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5953. fi
  5954. esac
  5955. shared_flag='-shared'
  5956. if test yes = "$aix_use_runtimelinking"; then
  5957. shared_flag=$shared_flag' $wl-G'
  5958. fi
  5959. # Need to ensure runtime linking is disabled for the traditional
  5960. # shared library, or the linker may eventually find shared libraries
  5961. # /with/ Import File - we do not want to mix them.
  5962. shared_flag_aix='-shared'
  5963. shared_flag_svr4='-shared $wl-G'
  5964. else
  5965. # not using gcc
  5966. if test ia64 = "$host_cpu"; then
  5967. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5968. # chokes on -Wl,-G. The following line is correct:
  5969. shared_flag='-G'
  5970. else
  5971. if test yes = "$aix_use_runtimelinking"; then
  5972. shared_flag='$wl-G'
  5973. else
  5974. shared_flag='$wl-bM:SRE'
  5975. fi
  5976. shared_flag_aix='$wl-bM:SRE'
  5977. shared_flag_svr4='$wl-G'
  5978. fi
  5979. fi
  5980. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
  5981. # It seems that -bexpall does not export symbols beginning with
  5982. # underscore (_), so it is better to generate a list of symbols to
  5983. # export.
  5984. _LT_TAGVAR(always_export_symbols, $1)=yes
  5985. if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
  5986. # Warning - without using the other runtime loading flags (-brtl),
  5987. # -berok will link without error, but may produce a broken library.
  5988. # The "-G" linker flag allows undefined symbols.
  5989. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
  5990. # Determine the default libpath from the value encoded in an empty
  5991. # executable.
  5992. _LT_SYS_MODULE_PATH_AIX([$1])
  5993. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  5994. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
  5995. else
  5996. if test ia64 = "$host_cpu"; then
  5997. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
  5998. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5999. _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"
  6000. else
  6001. # Determine the default libpath from the value encoded in an
  6002. # empty executable.
  6003. _LT_SYS_MODULE_PATH_AIX([$1])
  6004. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
  6005. # Warning - without using the other run time loading flags,
  6006. # -berok will link without error, but may produce a broken library.
  6007. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
  6008. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
  6009. if test yes = "$with_gnu_ld"; then
  6010. # We only use this code for GNU lds that support --whole-archive.
  6011. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6012. else
  6013. # Exported symbols can be pulled into shared objects from archives
  6014. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6015. fi
  6016. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6017. _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
  6018. # -brtl affects multiple linker settings, -berok does not and is overridden later
  6019. compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
  6020. if test svr4 != "$with_aix_soname"; then
  6021. # This is similar to how AIX traditionally builds its shared
  6022. # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
  6023. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
  6024. fi
  6025. if test aix != "$with_aix_soname"; then
  6026. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
  6027. else
  6028. # used by -dlpreopen to get the symbols
  6029. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
  6030. fi
  6031. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
  6032. fi
  6033. fi
  6034. ;;
  6035. beos*)
  6036. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6037. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6038. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  6039. # support --undefined. This deserves some investigation. FIXME
  6040. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6041. else
  6042. _LT_TAGVAR(ld_shlibs, $1)=no
  6043. fi
  6044. ;;
  6045. chorus*)
  6046. case $cc_basename in
  6047. *)
  6048. # FIXME: insert proper C++ library support
  6049. _LT_TAGVAR(ld_shlibs, $1)=no
  6050. ;;
  6051. esac
  6052. ;;
  6053. cygwin* | mingw* | pw32* | cegcc*)
  6054. case $GXX,$cc_basename in
  6055. ,cl* | no,cl*)
  6056. # Native MSVC
  6057. # hardcode_libdir_flag_spec is actually meaningless, as there is
  6058. # no search path for DLLs.
  6059. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6060. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6061. _LT_TAGVAR(always_export_symbols, $1)=yes
  6062. _LT_TAGVAR(file_list_spec, $1)='@'
  6063. # Tell ltmain to make .lib files, not .a files.
  6064. libext=lib
  6065. # Tell ltmain to make .dll files, not .so files.
  6066. shrext_cmds=.dll
  6067. # FIXME: Setting linknames here is a bad hack.
  6068. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
  6069. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6070. cp "$export_symbols" "$output_objdir/$soname.def";
  6071. echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
  6072. else
  6073. $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
  6074. fi~
  6075. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  6076. linknames='
  6077. # The linker will not automatically build a static lib if we build a DLL.
  6078. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6079. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6080. # Don't use ranlib
  6081. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  6082. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  6083. lt_tool_outputfile="@TOOL_OUTPUT@"~
  6084. case $lt_outputfile in
  6085. *.exe|*.EXE) ;;
  6086. *)
  6087. lt_outputfile=$lt_outputfile.exe
  6088. lt_tool_outputfile=$lt_tool_outputfile.exe
  6089. ;;
  6090. esac~
  6091. func_to_tool_file "$lt_outputfile"~
  6092. if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
  6093. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  6094. $RM "$lt_outputfile.manifest";
  6095. fi'
  6096. ;;
  6097. *)
  6098. # g++
  6099. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  6100. # as there is no search path for DLLs.
  6101. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6102. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
  6103. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6104. _LT_TAGVAR(always_export_symbols, $1)=no
  6105. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6106. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6107. _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'
  6108. # If the export-symbols file already is a .def file, use it as
  6109. # is; otherwise, prepend EXPORTS...
  6110. _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
  6111. cp $export_symbols $output_objdir/$soname.def;
  6112. else
  6113. echo EXPORTS > $output_objdir/$soname.def;
  6114. cat $export_symbols >> $output_objdir/$soname.def;
  6115. fi~
  6116. $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'
  6117. else
  6118. _LT_TAGVAR(ld_shlibs, $1)=no
  6119. fi
  6120. ;;
  6121. esac
  6122. ;;
  6123. darwin* | rhapsody*)
  6124. _LT_DARWIN_LINKER_FEATURES($1)
  6125. ;;
  6126. os2*)
  6127. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6128. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6129. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6130. shrext_cmds=.dll
  6131. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6132. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6133. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6134. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6135. emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
  6136. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6137. emximp -o $lib $output_objdir/$libname.def'
  6138. _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
  6139. $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
  6140. $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
  6141. $ECHO EXPORTS >> $output_objdir/$libname.def~
  6142. prefix_cmds="$SED"~
  6143. if test EXPORTS = "`$SED 1q $export_symbols`"; then
  6144. prefix_cmds="$prefix_cmds -e 1d";
  6145. fi~
  6146. prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
  6147. cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
  6148. $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
  6149. emximp -o $lib $output_objdir/$libname.def'
  6150. _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
  6151. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6152. ;;
  6153. dgux*)
  6154. case $cc_basename in
  6155. ec++*)
  6156. # FIXME: insert proper C++ library support
  6157. _LT_TAGVAR(ld_shlibs, $1)=no
  6158. ;;
  6159. ghcx*)
  6160. # Green Hills C++ Compiler
  6161. # FIXME: insert proper C++ library support
  6162. _LT_TAGVAR(ld_shlibs, $1)=no
  6163. ;;
  6164. *)
  6165. # FIXME: insert proper C++ library support
  6166. _LT_TAGVAR(ld_shlibs, $1)=no
  6167. ;;
  6168. esac
  6169. ;;
  6170. freebsd2.*)
  6171. # C++ shared libraries reported to be fairly broken before
  6172. # switch to ELF
  6173. _LT_TAGVAR(ld_shlibs, $1)=no
  6174. ;;
  6175. freebsd-elf*)
  6176. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6177. ;;
  6178. freebsd* | dragonfly*)
  6179. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  6180. # conventions
  6181. _LT_TAGVAR(ld_shlibs, $1)=yes
  6182. ;;
  6183. haiku*)
  6184. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6185. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6186. ;;
  6187. hpux9*)
  6188. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6189. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6190. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6191. _LT_TAGVAR(hardcode_direct, $1)=yes
  6192. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6193. # but as the default
  6194. # location of the library.
  6195. case $cc_basename in
  6196. CC*)
  6197. # FIXME: insert proper C++ library support
  6198. _LT_TAGVAR(ld_shlibs, $1)=no
  6199. ;;
  6200. aCC*)
  6201. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  6202. # Commands to make compiler produce verbose output that lists
  6203. # what "hidden" libraries, object files and flags are used when
  6204. # linking a shared library.
  6205. #
  6206. # There doesn't appear to be a way to prevent this compiler from
  6207. # explicitly linking system object files so we need to strip them
  6208. # from the output so that they don't get included in the library
  6209. # dependencies.
  6210. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6211. ;;
  6212. *)
  6213. if test yes = "$GXX"; then
  6214. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
  6215. else
  6216. # FIXME: insert proper C++ library support
  6217. _LT_TAGVAR(ld_shlibs, $1)=no
  6218. fi
  6219. ;;
  6220. esac
  6221. ;;
  6222. hpux10*|hpux11*)
  6223. if test no = "$with_gnu_ld"; then
  6224. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
  6225. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6226. case $host_cpu in
  6227. hppa*64*|ia64*)
  6228. ;;
  6229. *)
  6230. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6231. ;;
  6232. esac
  6233. fi
  6234. case $host_cpu in
  6235. hppa*64*|ia64*)
  6236. _LT_TAGVAR(hardcode_direct, $1)=no
  6237. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6238. ;;
  6239. *)
  6240. _LT_TAGVAR(hardcode_direct, $1)=yes
  6241. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6242. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6243. # but as the default
  6244. # location of the library.
  6245. ;;
  6246. esac
  6247. case $cc_basename in
  6248. CC*)
  6249. # FIXME: insert proper C++ library support
  6250. _LT_TAGVAR(ld_shlibs, $1)=no
  6251. ;;
  6252. aCC*)
  6253. case $host_cpu in
  6254. hppa*64*)
  6255. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6256. ;;
  6257. ia64*)
  6258. _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6259. ;;
  6260. *)
  6261. _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'
  6262. ;;
  6263. esac
  6264. # Commands to make compiler produce verbose output that lists
  6265. # what "hidden" libraries, object files and flags are used when
  6266. # linking a shared library.
  6267. #
  6268. # There doesn't appear to be a way to prevent this compiler from
  6269. # explicitly linking system object files so we need to strip them
  6270. # from the output so that they don't get included in the library
  6271. # dependencies.
  6272. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6273. ;;
  6274. *)
  6275. if test yes = "$GXX"; then
  6276. if test no = "$with_gnu_ld"; then
  6277. case $host_cpu in
  6278. hppa*64*)
  6279. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6280. ;;
  6281. ia64*)
  6282. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6283. ;;
  6284. *)
  6285. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6286. ;;
  6287. esac
  6288. fi
  6289. else
  6290. # FIXME: insert proper C++ library support
  6291. _LT_TAGVAR(ld_shlibs, $1)=no
  6292. fi
  6293. ;;
  6294. esac
  6295. ;;
  6296. interix[[3-9]]*)
  6297. _LT_TAGVAR(hardcode_direct, $1)=no
  6298. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6299. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6300. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6301. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6302. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6303. # default) and relocated if they conflict, which is a slow very memory
  6304. # consuming and fragmenting process. To avoid this, we pick a random,
  6305. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6306. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6307. _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'
  6308. _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'
  6309. ;;
  6310. irix5* | irix6*)
  6311. case $cc_basename in
  6312. CC*)
  6313. # SGI C++
  6314. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6315. # Archives containing C++ object files must be created using
  6316. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  6317. # necessary to make sure instantiated templates are included
  6318. # in the archive.
  6319. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  6320. ;;
  6321. *)
  6322. if test yes = "$GXX"; then
  6323. if test no = "$with_gnu_ld"; then
  6324. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  6325. else
  6326. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
  6327. fi
  6328. fi
  6329. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6330. ;;
  6331. esac
  6332. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6333. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6334. _LT_TAGVAR(inherit_rpath, $1)=yes
  6335. ;;
  6336. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  6337. case $cc_basename in
  6338. KCC*)
  6339. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6340. # KCC will only create a shared library if the output file
  6341. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6342. # to its proper name (with version) after linking.
  6343. _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'
  6344. _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'
  6345. # Commands to make compiler produce verbose output that lists
  6346. # what "hidden" libraries, object files and flags are used when
  6347. # linking a shared library.
  6348. #
  6349. # There doesn't appear to be a way to prevent this compiler from
  6350. # explicitly linking system object files so we need to strip them
  6351. # from the output so that they don't get included in the library
  6352. # dependencies.
  6353. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6354. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6355. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6356. # Archives containing C++ object files must be created using
  6357. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  6358. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  6359. ;;
  6360. icpc* | ecpc* )
  6361. # Intel C++
  6362. with_gnu_ld=yes
  6363. # version 8.0 and above of icpc choke on multiply defined symbols
  6364. # if we add $predep_objects and $postdep_objects, however 7.1 and
  6365. # earlier do not add the objects themselves.
  6366. case `$CC -V 2>&1` in
  6367. *"Version 7."*)
  6368. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6369. _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'
  6370. ;;
  6371. *) # Version 8.0 or newer
  6372. tmp_idyn=
  6373. case $host_cpu in
  6374. ia64*) tmp_idyn=' -i_dynamic';;
  6375. esac
  6376. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6377. _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'
  6378. ;;
  6379. esac
  6380. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6381. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6382. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6383. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
  6384. ;;
  6385. pgCC* | pgcpp*)
  6386. # Portland Group C++ compiler
  6387. case `$CC -V` in
  6388. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  6389. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  6390. rm -rf $tpldir~
  6391. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  6392. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  6393. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  6394. rm -rf $tpldir~
  6395. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  6396. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  6397. $RANLIB $oldlib'
  6398. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  6399. rm -rf $tpldir~
  6400. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6401. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6402. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  6403. rm -rf $tpldir~
  6404. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6405. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
  6406. ;;
  6407. *) # Version 6 and above use weak symbols
  6408. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6409. _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'
  6410. ;;
  6411. esac
  6412. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
  6413. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6414. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  6415. ;;
  6416. cxx*)
  6417. # Compaq C++
  6418. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
  6419. _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'
  6420. runpath_var=LD_RUN_PATH
  6421. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6422. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6423. # Commands to make compiler produce verbose output that lists
  6424. # what "hidden" libraries, object files and flags are used when
  6425. # linking a shared library.
  6426. #
  6427. # There doesn't appear to be a way to prevent this compiler from
  6428. # explicitly linking system object files so we need to strip them
  6429. # from the output so that they don't get included in the library
  6430. # dependencies.
  6431. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
  6432. ;;
  6433. xl* | mpixl* | bgxl*)
  6434. # IBM XL 8.0 on PPC, with GNU ld
  6435. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6436. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
  6437. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
  6438. if test yes = "$supports_anon_versioning"; then
  6439. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6440. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6441. echo "local: *; };" >> $output_objdir/$libname.ver~
  6442. $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  6443. fi
  6444. ;;
  6445. *)
  6446. case `$CC -V 2>&1 | sed 5q` in
  6447. *Sun\ C*)
  6448. # Sun C++ 5.9
  6449. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6450. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6451. _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'
  6452. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6453. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
  6454. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6455. # Not sure whether something based on
  6456. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  6457. # would be better.
  6458. output_verbose_link_cmd='func_echo_all'
  6459. # Archives containing C++ object files must be created using
  6460. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6461. # necessary to make sure instantiated templates are included
  6462. # in the archive.
  6463. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6464. ;;
  6465. esac
  6466. ;;
  6467. esac
  6468. ;;
  6469. lynxos*)
  6470. # FIXME: insert proper C++ library support
  6471. _LT_TAGVAR(ld_shlibs, $1)=no
  6472. ;;
  6473. m88k*)
  6474. # FIXME: insert proper C++ library support
  6475. _LT_TAGVAR(ld_shlibs, $1)=no
  6476. ;;
  6477. mvs*)
  6478. case $cc_basename in
  6479. cxx*)
  6480. # FIXME: insert proper C++ library support
  6481. _LT_TAGVAR(ld_shlibs, $1)=no
  6482. ;;
  6483. *)
  6484. # FIXME: insert proper C++ library support
  6485. _LT_TAGVAR(ld_shlibs, $1)=no
  6486. ;;
  6487. esac
  6488. ;;
  6489. netbsd*)
  6490. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6491. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  6492. wlarc=
  6493. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6494. _LT_TAGVAR(hardcode_direct, $1)=yes
  6495. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6496. fi
  6497. # Workaround some broken pre-1.5 toolchains
  6498. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  6499. ;;
  6500. *nto* | *qnx*)
  6501. _LT_TAGVAR(ld_shlibs, $1)=yes
  6502. ;;
  6503. openbsd* | bitrig*)
  6504. if test -f /usr/libexec/ld.so; then
  6505. _LT_TAGVAR(hardcode_direct, $1)=yes
  6506. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6507. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6508. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6509. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6510. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
  6511. _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'
  6512. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
  6513. _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
  6514. fi
  6515. output_verbose_link_cmd=func_echo_all
  6516. else
  6517. _LT_TAGVAR(ld_shlibs, $1)=no
  6518. fi
  6519. ;;
  6520. osf3* | osf4* | osf5*)
  6521. case $cc_basename in
  6522. KCC*)
  6523. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6524. # KCC will only create a shared library if the output file
  6525. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6526. # to its proper name (with version) after linking.
  6527. _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'
  6528. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
  6529. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6530. # Archives containing C++ object files must be created using
  6531. # the KAI C++ compiler.
  6532. case $host in
  6533. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6534. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6535. esac
  6536. ;;
  6537. RCC*)
  6538. # Rational C++ 2.4.1
  6539. # FIXME: insert proper C++ library support
  6540. _LT_TAGVAR(ld_shlibs, $1)=no
  6541. ;;
  6542. cxx*)
  6543. case $host in
  6544. osf3*)
  6545. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6546. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6547. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6548. ;;
  6549. *)
  6550. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6551. _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
  6552. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6553. echo "-hidden">> $lib.exp~
  6554. $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
  6555. $RM $lib.exp'
  6556. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6557. ;;
  6558. esac
  6559. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6560. # Commands to make compiler produce verbose output that lists
  6561. # what "hidden" libraries, object files and flags are used when
  6562. # linking a shared library.
  6563. #
  6564. # There doesn't appear to be a way to prevent this compiler from
  6565. # explicitly linking system object files so we need to strip them
  6566. # from the output so that they don't get included in the library
  6567. # dependencies.
  6568. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6569. ;;
  6570. *)
  6571. if test yes,no = "$GXX,$with_gnu_ld"; then
  6572. _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
  6573. case $host in
  6574. osf3*)
  6575. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  6576. ;;
  6577. *)
  6578. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
  6579. ;;
  6580. esac
  6581. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
  6582. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6583. # Commands to make compiler produce verbose output that lists
  6584. # what "hidden" libraries, object files and flags are used when
  6585. # linking a shared library.
  6586. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6587. else
  6588. # FIXME: insert proper C++ library support
  6589. _LT_TAGVAR(ld_shlibs, $1)=no
  6590. fi
  6591. ;;
  6592. esac
  6593. ;;
  6594. psos*)
  6595. # FIXME: insert proper C++ library support
  6596. _LT_TAGVAR(ld_shlibs, $1)=no
  6597. ;;
  6598. sunos4*)
  6599. case $cc_basename in
  6600. CC*)
  6601. # Sun C++ 4.x
  6602. # FIXME: insert proper C++ library support
  6603. _LT_TAGVAR(ld_shlibs, $1)=no
  6604. ;;
  6605. lcc*)
  6606. # Lucid
  6607. # FIXME: insert proper C++ library support
  6608. _LT_TAGVAR(ld_shlibs, $1)=no
  6609. ;;
  6610. *)
  6611. # FIXME: insert proper C++ library support
  6612. _LT_TAGVAR(ld_shlibs, $1)=no
  6613. ;;
  6614. esac
  6615. ;;
  6616. solaris*)
  6617. case $cc_basename in
  6618. CC* | sunCC*)
  6619. # Sun C++ 4.2, 5.x and Centerline C++
  6620. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6621. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6622. _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6623. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6624. $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'
  6625. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6626. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6627. case $host_os in
  6628. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6629. *)
  6630. # The compiler driver will combine and reorder linker options,
  6631. # but understands '-z linker_flag'.
  6632. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6633. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6634. ;;
  6635. esac
  6636. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6637. output_verbose_link_cmd='func_echo_all'
  6638. # Archives containing C++ object files must be created using
  6639. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6640. # necessary to make sure instantiated templates are included
  6641. # in the archive.
  6642. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6643. ;;
  6644. gcx*)
  6645. # Green Hills C++ Compiler
  6646. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6647. # The C++ compiler must be used to create the archive.
  6648. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6649. ;;
  6650. *)
  6651. # GNU C++ compiler with Solaris linker
  6652. if test yes,no = "$GXX,$with_gnu_ld"; then
  6653. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
  6654. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6655. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6656. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6657. $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6658. # Commands to make compiler produce verbose output that lists
  6659. # what "hidden" libraries, object files and flags are used when
  6660. # linking a shared library.
  6661. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6662. else
  6663. # g++ 2.7 appears to require '-G' NOT '-shared' on this
  6664. # platform.
  6665. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
  6666. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6667. $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6668. # Commands to make compiler produce verbose output that lists
  6669. # what "hidden" libraries, object files and flags are used when
  6670. # linking a shared library.
  6671. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6672. fi
  6673. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
  6674. case $host_os in
  6675. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6676. *)
  6677. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
  6678. ;;
  6679. esac
  6680. fi
  6681. ;;
  6682. esac
  6683. ;;
  6684. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6685. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6686. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6687. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6688. runpath_var='LD_RUN_PATH'
  6689. case $cc_basename in
  6690. CC*)
  6691. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6692. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6693. ;;
  6694. *)
  6695. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6696. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6697. ;;
  6698. esac
  6699. ;;
  6700. sysv5* | sco3.2v5* | sco5v6*)
  6701. # Note: We CANNOT use -z defs as we might desire, because we do not
  6702. # link with -lc, and that would cause any symbols used from libc to
  6703. # always be unresolved, which means just about no library would
  6704. # ever link correctly. If we're not using GNU ld we use -z text
  6705. # though, which does catch some bad symbols but isn't as heavy-handed
  6706. # as -z defs.
  6707. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
  6708. _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
  6709. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6710. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6711. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
  6712. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6713. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6714. _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
  6715. runpath_var='LD_RUN_PATH'
  6716. case $cc_basename in
  6717. CC*)
  6718. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6719. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6720. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6721. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6722. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6723. '"$_LT_TAGVAR(reload_cmds, $1)"
  6724. ;;
  6725. *)
  6726. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6727. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6728. ;;
  6729. esac
  6730. ;;
  6731. tandem*)
  6732. case $cc_basename in
  6733. NCC*)
  6734. # NonStop-UX NCC 3.20
  6735. # FIXME: insert proper C++ library support
  6736. _LT_TAGVAR(ld_shlibs, $1)=no
  6737. ;;
  6738. *)
  6739. # FIXME: insert proper C++ library support
  6740. _LT_TAGVAR(ld_shlibs, $1)=no
  6741. ;;
  6742. esac
  6743. ;;
  6744. vxworks*)
  6745. # FIXME: insert proper C++ library support
  6746. _LT_TAGVAR(ld_shlibs, $1)=no
  6747. ;;
  6748. *)
  6749. # FIXME: insert proper C++ library support
  6750. _LT_TAGVAR(ld_shlibs, $1)=no
  6751. ;;
  6752. esac
  6753. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6754. test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
  6755. _LT_TAGVAR(GCC, $1)=$GXX
  6756. _LT_TAGVAR(LD, $1)=$LD
  6757. ## CAVEAT EMPTOR:
  6758. ## There is no encapsulation within the following macros, do not change
  6759. ## the running order or otherwise move them around unless you know exactly
  6760. ## what you are doing...
  6761. _LT_SYS_HIDDEN_LIBDEPS($1)
  6762. _LT_COMPILER_PIC($1)
  6763. _LT_COMPILER_C_O($1)
  6764. _LT_COMPILER_FILE_LOCKS($1)
  6765. _LT_LINKER_SHLIBS($1)
  6766. _LT_SYS_DYNAMIC_LINKER($1)
  6767. _LT_LINKER_HARDCODE_LIBPATH($1)
  6768. _LT_CONFIG($1)
  6769. fi # test -n "$compiler"
  6770. CC=$lt_save_CC
  6771. CFLAGS=$lt_save_CFLAGS
  6772. LDCXX=$LD
  6773. LD=$lt_save_LD
  6774. GCC=$lt_save_GCC
  6775. with_gnu_ld=$lt_save_with_gnu_ld
  6776. lt_cv_path_LDCXX=$lt_cv_path_LD
  6777. lt_cv_path_LD=$lt_save_path_LD
  6778. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6779. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6780. fi # test yes != "$_lt_caught_CXX_error"
  6781. AC_LANG_POP
  6782. ])# _LT_LANG_CXX_CONFIG
  6783. # _LT_FUNC_STRIPNAME_CNF
  6784. # ----------------------
  6785. # func_stripname_cnf prefix suffix name
  6786. # strip PREFIX and SUFFIX off of NAME.
  6787. # PREFIX and SUFFIX must not contain globbing or regex special
  6788. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6789. # dot (in which case that matches only a dot).
  6790. #
  6791. # This function is identical to the (non-XSI) version of func_stripname,
  6792. # except this one can be used by m4 code that may be executed by configure,
  6793. # rather than the libtool script.
  6794. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6795. AC_REQUIRE([_LT_DECL_SED])
  6796. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6797. func_stripname_cnf ()
  6798. {
  6799. case @S|@2 in
  6800. .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
  6801. *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
  6802. esac
  6803. } # func_stripname_cnf
  6804. ])# _LT_FUNC_STRIPNAME_CNF
  6805. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6806. # ---------------------------------
  6807. # Figure out "hidden" library dependencies from verbose
  6808. # compiler output when linking a shared library.
  6809. # Parse the compiler output and extract the necessary
  6810. # objects, libraries and library flags.
  6811. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6812. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6813. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6814. # Dependencies to place before and after the object being linked:
  6815. _LT_TAGVAR(predep_objects, $1)=
  6816. _LT_TAGVAR(postdep_objects, $1)=
  6817. _LT_TAGVAR(predeps, $1)=
  6818. _LT_TAGVAR(postdeps, $1)=
  6819. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6820. dnl we can't use the lt_simple_compile_test_code here,
  6821. dnl because it contains code intended for an executable,
  6822. dnl not a library. It's possible we should let each
  6823. dnl tag define a new lt_????_link_test_code variable,
  6824. dnl but it's only used here...
  6825. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6826. int a;
  6827. void foo (void) { a = 0; }
  6828. _LT_EOF
  6829. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6830. class Foo
  6831. {
  6832. public:
  6833. Foo (void) { a = 0; }
  6834. private:
  6835. int a;
  6836. };
  6837. _LT_EOF
  6838. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6839. subroutine foo
  6840. implicit none
  6841. integer*4 a
  6842. a=0
  6843. return
  6844. end
  6845. _LT_EOF
  6846. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6847. subroutine foo
  6848. implicit none
  6849. integer a
  6850. a=0
  6851. return
  6852. end
  6853. _LT_EOF
  6854. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6855. public class foo {
  6856. private int a;
  6857. public void bar (void) {
  6858. a = 0;
  6859. }
  6860. };
  6861. _LT_EOF
  6862. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6863. package foo
  6864. func foo() {
  6865. }
  6866. _LT_EOF
  6867. ])
  6868. _lt_libdeps_save_CFLAGS=$CFLAGS
  6869. case "$CC $CFLAGS " in #(
  6870. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6871. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6872. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6873. esac
  6874. dnl Parse the compiler output and extract the necessary
  6875. dnl objects, libraries and library flags.
  6876. if AC_TRY_EVAL(ac_compile); then
  6877. # Parse the compiler output and extract the necessary
  6878. # objects, libraries and library flags.
  6879. # Sentinel used to keep track of whether or not we are before
  6880. # the conftest object file.
  6881. pre_test_object_deps_done=no
  6882. for p in `eval "$output_verbose_link_cmd"`; do
  6883. case $prev$p in
  6884. -L* | -R* | -l*)
  6885. # Some compilers place space between "-{L,R}" and the path.
  6886. # Remove the space.
  6887. if test x-L = "$p" ||
  6888. test x-R = "$p"; then
  6889. prev=$p
  6890. continue
  6891. fi
  6892. # Expand the sysroot to ease extracting the directories later.
  6893. if test -z "$prev"; then
  6894. case $p in
  6895. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6896. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6897. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6898. esac
  6899. fi
  6900. case $p in
  6901. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6902. esac
  6903. if test no = "$pre_test_object_deps_done"; then
  6904. case $prev in
  6905. -L | -R)
  6906. # Internal compiler library paths should come after those
  6907. # provided the user. The postdeps already come after the
  6908. # user supplied libs so there is no need to process them.
  6909. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6910. _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
  6911. else
  6912. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
  6913. fi
  6914. ;;
  6915. # The "-l" case would never come before the object being
  6916. # linked, so don't bother handling this case.
  6917. esac
  6918. else
  6919. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6920. _LT_TAGVAR(postdeps, $1)=$prev$p
  6921. else
  6922. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
  6923. fi
  6924. fi
  6925. prev=
  6926. ;;
  6927. *.lto.$objext) ;; # Ignore GCC LTO objects
  6928. *.$objext)
  6929. # This assumes that the test object file only shows up
  6930. # once in the compiler output.
  6931. if test "$p" = "conftest.$objext"; then
  6932. pre_test_object_deps_done=yes
  6933. continue
  6934. fi
  6935. if test no = "$pre_test_object_deps_done"; then
  6936. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6937. _LT_TAGVAR(predep_objects, $1)=$p
  6938. else
  6939. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6940. fi
  6941. else
  6942. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6943. _LT_TAGVAR(postdep_objects, $1)=$p
  6944. else
  6945. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6946. fi
  6947. fi
  6948. ;;
  6949. *) ;; # Ignore the rest.
  6950. esac
  6951. done
  6952. # Clean up.
  6953. rm -f a.out a.exe
  6954. else
  6955. echo "libtool.m4: error: problem compiling $1 test program"
  6956. fi
  6957. $RM -f confest.$objext
  6958. CFLAGS=$_lt_libdeps_save_CFLAGS
  6959. # PORTME: override above test on systems where it is broken
  6960. m4_if([$1], [CXX],
  6961. [case $host_os in
  6962. interix[[3-9]]*)
  6963. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6964. # hack all around it, let's just trust "g++" to DTRT.
  6965. _LT_TAGVAR(predep_objects,$1)=
  6966. _LT_TAGVAR(postdep_objects,$1)=
  6967. _LT_TAGVAR(postdeps,$1)=
  6968. ;;
  6969. esac
  6970. ])
  6971. case " $_LT_TAGVAR(postdeps, $1) " in
  6972. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6973. esac
  6974. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6975. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6976. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
  6977. fi
  6978. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  6979. [The directories searched by this compiler when creating a shared library])
  6980. _LT_TAGDECL([], [predep_objects], [1],
  6981. [Dependencies to place before and after the objects being linked to
  6982. create a shared library])
  6983. _LT_TAGDECL([], [postdep_objects], [1])
  6984. _LT_TAGDECL([], [predeps], [1])
  6985. _LT_TAGDECL([], [postdeps], [1])
  6986. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  6987. [The library search path used internally by the compiler when linking
  6988. a shared library])
  6989. ])# _LT_SYS_HIDDEN_LIBDEPS
  6990. # _LT_LANG_F77_CONFIG([TAG])
  6991. # --------------------------
  6992. # Ensure that the configuration variables for a Fortran 77 compiler are
  6993. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6994. # to write the compiler configuration to 'libtool'.
  6995. m4_defun([_LT_LANG_F77_CONFIG],
  6996. [AC_LANG_PUSH(Fortran 77)
  6997. if test -z "$F77" || test no = "$F77"; then
  6998. _lt_disable_F77=yes
  6999. fi
  7000. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7001. _LT_TAGVAR(allow_undefined_flag, $1)=
  7002. _LT_TAGVAR(always_export_symbols, $1)=no
  7003. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7004. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7005. _LT_TAGVAR(hardcode_direct, $1)=no
  7006. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7007. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7008. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7009. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7010. _LT_TAGVAR(hardcode_automatic, $1)=no
  7011. _LT_TAGVAR(inherit_rpath, $1)=no
  7012. _LT_TAGVAR(module_cmds, $1)=
  7013. _LT_TAGVAR(module_expsym_cmds, $1)=
  7014. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7015. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7016. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7017. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7018. _LT_TAGVAR(no_undefined_flag, $1)=
  7019. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7020. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7021. # Source file extension for f77 test sources.
  7022. ac_ext=f
  7023. # Object file extension for compiled f77 test sources.
  7024. objext=o
  7025. _LT_TAGVAR(objext, $1)=$objext
  7026. # No sense in running all these tests if we already determined that
  7027. # the F77 compiler isn't working. Some variables (like enable_shared)
  7028. # are currently assumed to apply to all compilers on this platform,
  7029. # and will be corrupted by setting them based on a non-working compiler.
  7030. if test yes != "$_lt_disable_F77"; then
  7031. # Code to be used in simple compile tests
  7032. lt_simple_compile_test_code="\
  7033. subroutine t
  7034. return
  7035. end
  7036. "
  7037. # Code to be used in simple link tests
  7038. lt_simple_link_test_code="\
  7039. program t
  7040. end
  7041. "
  7042. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7043. _LT_TAG_COMPILER
  7044. # save warnings/boilerplate of simple test code
  7045. _LT_COMPILER_BOILERPLATE
  7046. _LT_LINKER_BOILERPLATE
  7047. # Allow CC to be a program name with arguments.
  7048. lt_save_CC=$CC
  7049. lt_save_GCC=$GCC
  7050. lt_save_CFLAGS=$CFLAGS
  7051. CC=${F77-"f77"}
  7052. CFLAGS=$FFLAGS
  7053. compiler=$CC
  7054. _LT_TAGVAR(compiler, $1)=$CC
  7055. _LT_CC_BASENAME([$compiler])
  7056. GCC=$G77
  7057. if test -n "$compiler"; then
  7058. AC_MSG_CHECKING([if libtool supports shared libraries])
  7059. AC_MSG_RESULT([$can_build_shared])
  7060. AC_MSG_CHECKING([whether to build shared libraries])
  7061. test no = "$can_build_shared" && enable_shared=no
  7062. # On AIX, shared libraries and static libraries use the same namespace, and
  7063. # are all built from PIC.
  7064. case $host_os in
  7065. aix3*)
  7066. test yes = "$enable_shared" && enable_static=no
  7067. if test -n "$RANLIB"; then
  7068. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7069. postinstall_cmds='$RANLIB $lib'
  7070. fi
  7071. ;;
  7072. aix[[4-9]]*)
  7073. if test ia64 != "$host_cpu"; then
  7074. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7075. yes,aix,yes) ;; # shared object as lib.so file only
  7076. yes,svr4,*) ;; # shared object as lib.so archive member only
  7077. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7078. esac
  7079. fi
  7080. ;;
  7081. esac
  7082. AC_MSG_RESULT([$enable_shared])
  7083. AC_MSG_CHECKING([whether to build static libraries])
  7084. # Make sure either enable_shared or enable_static is yes.
  7085. test yes = "$enable_shared" || enable_static=yes
  7086. AC_MSG_RESULT([$enable_static])
  7087. _LT_TAGVAR(GCC, $1)=$G77
  7088. _LT_TAGVAR(LD, $1)=$LD
  7089. ## CAVEAT EMPTOR:
  7090. ## There is no encapsulation within the following macros, do not change
  7091. ## the running order or otherwise move them around unless you know exactly
  7092. ## what you are doing...
  7093. _LT_COMPILER_PIC($1)
  7094. _LT_COMPILER_C_O($1)
  7095. _LT_COMPILER_FILE_LOCKS($1)
  7096. _LT_LINKER_SHLIBS($1)
  7097. _LT_SYS_DYNAMIC_LINKER($1)
  7098. _LT_LINKER_HARDCODE_LIBPATH($1)
  7099. _LT_CONFIG($1)
  7100. fi # test -n "$compiler"
  7101. GCC=$lt_save_GCC
  7102. CC=$lt_save_CC
  7103. CFLAGS=$lt_save_CFLAGS
  7104. fi # test yes != "$_lt_disable_F77"
  7105. AC_LANG_POP
  7106. ])# _LT_LANG_F77_CONFIG
  7107. # _LT_LANG_FC_CONFIG([TAG])
  7108. # -------------------------
  7109. # Ensure that the configuration variables for a Fortran compiler are
  7110. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7111. # to write the compiler configuration to 'libtool'.
  7112. m4_defun([_LT_LANG_FC_CONFIG],
  7113. [AC_LANG_PUSH(Fortran)
  7114. if test -z "$FC" || test no = "$FC"; then
  7115. _lt_disable_FC=yes
  7116. fi
  7117. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7118. _LT_TAGVAR(allow_undefined_flag, $1)=
  7119. _LT_TAGVAR(always_export_symbols, $1)=no
  7120. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7121. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7122. _LT_TAGVAR(hardcode_direct, $1)=no
  7123. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7124. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7125. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7126. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7127. _LT_TAGVAR(hardcode_automatic, $1)=no
  7128. _LT_TAGVAR(inherit_rpath, $1)=no
  7129. _LT_TAGVAR(module_cmds, $1)=
  7130. _LT_TAGVAR(module_expsym_cmds, $1)=
  7131. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7132. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7133. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7134. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7135. _LT_TAGVAR(no_undefined_flag, $1)=
  7136. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7137. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7138. # Source file extension for fc test sources.
  7139. ac_ext=${ac_fc_srcext-f}
  7140. # Object file extension for compiled fc test sources.
  7141. objext=o
  7142. _LT_TAGVAR(objext, $1)=$objext
  7143. # No sense in running all these tests if we already determined that
  7144. # the FC compiler isn't working. Some variables (like enable_shared)
  7145. # are currently assumed to apply to all compilers on this platform,
  7146. # and will be corrupted by setting them based on a non-working compiler.
  7147. if test yes != "$_lt_disable_FC"; then
  7148. # Code to be used in simple compile tests
  7149. lt_simple_compile_test_code="\
  7150. subroutine t
  7151. return
  7152. end
  7153. "
  7154. # Code to be used in simple link tests
  7155. lt_simple_link_test_code="\
  7156. program t
  7157. end
  7158. "
  7159. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7160. _LT_TAG_COMPILER
  7161. # save warnings/boilerplate of simple test code
  7162. _LT_COMPILER_BOILERPLATE
  7163. _LT_LINKER_BOILERPLATE
  7164. # Allow CC to be a program name with arguments.
  7165. lt_save_CC=$CC
  7166. lt_save_GCC=$GCC
  7167. lt_save_CFLAGS=$CFLAGS
  7168. CC=${FC-"f95"}
  7169. CFLAGS=$FCFLAGS
  7170. compiler=$CC
  7171. GCC=$ac_cv_fc_compiler_gnu
  7172. _LT_TAGVAR(compiler, $1)=$CC
  7173. _LT_CC_BASENAME([$compiler])
  7174. if test -n "$compiler"; then
  7175. AC_MSG_CHECKING([if libtool supports shared libraries])
  7176. AC_MSG_RESULT([$can_build_shared])
  7177. AC_MSG_CHECKING([whether to build shared libraries])
  7178. test no = "$can_build_shared" && enable_shared=no
  7179. # On AIX, shared libraries and static libraries use the same namespace, and
  7180. # are all built from PIC.
  7181. case $host_os in
  7182. aix3*)
  7183. test yes = "$enable_shared" && enable_static=no
  7184. if test -n "$RANLIB"; then
  7185. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7186. postinstall_cmds='$RANLIB $lib'
  7187. fi
  7188. ;;
  7189. aix[[4-9]]*)
  7190. if test ia64 != "$host_cpu"; then
  7191. case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
  7192. yes,aix,yes) ;; # shared object as lib.so file only
  7193. yes,svr4,*) ;; # shared object as lib.so archive member only
  7194. yes,*) enable_static=no ;; # shared object in lib.a archive as well
  7195. esac
  7196. fi
  7197. ;;
  7198. esac
  7199. AC_MSG_RESULT([$enable_shared])
  7200. AC_MSG_CHECKING([whether to build static libraries])
  7201. # Make sure either enable_shared or enable_static is yes.
  7202. test yes = "$enable_shared" || enable_static=yes
  7203. AC_MSG_RESULT([$enable_static])
  7204. _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
  7205. _LT_TAGVAR(LD, $1)=$LD
  7206. ## CAVEAT EMPTOR:
  7207. ## There is no encapsulation within the following macros, do not change
  7208. ## the running order or otherwise move them around unless you know exactly
  7209. ## what you are doing...
  7210. _LT_SYS_HIDDEN_LIBDEPS($1)
  7211. _LT_COMPILER_PIC($1)
  7212. _LT_COMPILER_C_O($1)
  7213. _LT_COMPILER_FILE_LOCKS($1)
  7214. _LT_LINKER_SHLIBS($1)
  7215. _LT_SYS_DYNAMIC_LINKER($1)
  7216. _LT_LINKER_HARDCODE_LIBPATH($1)
  7217. _LT_CONFIG($1)
  7218. fi # test -n "$compiler"
  7219. GCC=$lt_save_GCC
  7220. CC=$lt_save_CC
  7221. CFLAGS=$lt_save_CFLAGS
  7222. fi # test yes != "$_lt_disable_FC"
  7223. AC_LANG_POP
  7224. ])# _LT_LANG_FC_CONFIG
  7225. # _LT_LANG_GCJ_CONFIG([TAG])
  7226. # --------------------------
  7227. # Ensure that the configuration variables for the GNU Java Compiler compiler
  7228. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7229. # to write the compiler configuration to 'libtool'.
  7230. m4_defun([_LT_LANG_GCJ_CONFIG],
  7231. [AC_REQUIRE([LT_PROG_GCJ])dnl
  7232. AC_LANG_SAVE
  7233. # Source file extension for Java test sources.
  7234. ac_ext=java
  7235. # Object file extension for compiled Java test sources.
  7236. objext=o
  7237. _LT_TAGVAR(objext, $1)=$objext
  7238. # Code to be used in simple compile tests
  7239. lt_simple_compile_test_code="class foo {}"
  7240. # Code to be used in simple link tests
  7241. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  7242. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7243. _LT_TAG_COMPILER
  7244. # save warnings/boilerplate of simple test code
  7245. _LT_COMPILER_BOILERPLATE
  7246. _LT_LINKER_BOILERPLATE
  7247. # Allow CC to be a program name with arguments.
  7248. lt_save_CC=$CC
  7249. lt_save_CFLAGS=$CFLAGS
  7250. lt_save_GCC=$GCC
  7251. GCC=yes
  7252. CC=${GCJ-"gcj"}
  7253. CFLAGS=$GCJFLAGS
  7254. compiler=$CC
  7255. _LT_TAGVAR(compiler, $1)=$CC
  7256. _LT_TAGVAR(LD, $1)=$LD
  7257. _LT_CC_BASENAME([$compiler])
  7258. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  7259. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7260. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7261. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7262. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7263. if test -n "$compiler"; then
  7264. _LT_COMPILER_NO_RTTI($1)
  7265. _LT_COMPILER_PIC($1)
  7266. _LT_COMPILER_C_O($1)
  7267. _LT_COMPILER_FILE_LOCKS($1)
  7268. _LT_LINKER_SHLIBS($1)
  7269. _LT_LINKER_HARDCODE_LIBPATH($1)
  7270. _LT_CONFIG($1)
  7271. fi
  7272. AC_LANG_RESTORE
  7273. GCC=$lt_save_GCC
  7274. CC=$lt_save_CC
  7275. CFLAGS=$lt_save_CFLAGS
  7276. ])# _LT_LANG_GCJ_CONFIG
  7277. # _LT_LANG_GO_CONFIG([TAG])
  7278. # --------------------------
  7279. # Ensure that the configuration variables for the GNU Go compiler
  7280. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7281. # to write the compiler configuration to 'libtool'.
  7282. m4_defun([_LT_LANG_GO_CONFIG],
  7283. [AC_REQUIRE([LT_PROG_GO])dnl
  7284. AC_LANG_SAVE
  7285. # Source file extension for Go test sources.
  7286. ac_ext=go
  7287. # Object file extension for compiled Go test sources.
  7288. objext=o
  7289. _LT_TAGVAR(objext, $1)=$objext
  7290. # Code to be used in simple compile tests
  7291. lt_simple_compile_test_code="package main; func main() { }"
  7292. # Code to be used in simple link tests
  7293. lt_simple_link_test_code='package main; func main() { }'
  7294. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7295. _LT_TAG_COMPILER
  7296. # save warnings/boilerplate of simple test code
  7297. _LT_COMPILER_BOILERPLATE
  7298. _LT_LINKER_BOILERPLATE
  7299. # Allow CC to be a program name with arguments.
  7300. lt_save_CC=$CC
  7301. lt_save_CFLAGS=$CFLAGS
  7302. lt_save_GCC=$GCC
  7303. GCC=yes
  7304. CC=${GOC-"gccgo"}
  7305. CFLAGS=$GOFLAGS
  7306. compiler=$CC
  7307. _LT_TAGVAR(compiler, $1)=$CC
  7308. _LT_TAGVAR(LD, $1)=$LD
  7309. _LT_CC_BASENAME([$compiler])
  7310. # Go did not exist at the time GCC didn't implicitly link libc in.
  7311. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7312. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7313. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7314. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7315. if test -n "$compiler"; then
  7316. _LT_COMPILER_NO_RTTI($1)
  7317. _LT_COMPILER_PIC($1)
  7318. _LT_COMPILER_C_O($1)
  7319. _LT_COMPILER_FILE_LOCKS($1)
  7320. _LT_LINKER_SHLIBS($1)
  7321. _LT_LINKER_HARDCODE_LIBPATH($1)
  7322. _LT_CONFIG($1)
  7323. fi
  7324. AC_LANG_RESTORE
  7325. GCC=$lt_save_GCC
  7326. CC=$lt_save_CC
  7327. CFLAGS=$lt_save_CFLAGS
  7328. ])# _LT_LANG_GO_CONFIG
  7329. # _LT_LANG_RC_CONFIG([TAG])
  7330. # -------------------------
  7331. # Ensure that the configuration variables for the Windows resource compiler
  7332. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7333. # to write the compiler configuration to 'libtool'.
  7334. m4_defun([_LT_LANG_RC_CONFIG],
  7335. [AC_REQUIRE([LT_PROG_RC])dnl
  7336. AC_LANG_SAVE
  7337. # Source file extension for RC test sources.
  7338. ac_ext=rc
  7339. # Object file extension for compiled RC test sources.
  7340. objext=o
  7341. _LT_TAGVAR(objext, $1)=$objext
  7342. # Code to be used in simple compile tests
  7343. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  7344. # Code to be used in simple link tests
  7345. lt_simple_link_test_code=$lt_simple_compile_test_code
  7346. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7347. _LT_TAG_COMPILER
  7348. # save warnings/boilerplate of simple test code
  7349. _LT_COMPILER_BOILERPLATE
  7350. _LT_LINKER_BOILERPLATE
  7351. # Allow CC to be a program name with arguments.
  7352. lt_save_CC=$CC
  7353. lt_save_CFLAGS=$CFLAGS
  7354. lt_save_GCC=$GCC
  7355. GCC=
  7356. CC=${RC-"windres"}
  7357. CFLAGS=
  7358. compiler=$CC
  7359. _LT_TAGVAR(compiler, $1)=$CC
  7360. _LT_CC_BASENAME([$compiler])
  7361. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  7362. if test -n "$compiler"; then
  7363. :
  7364. _LT_CONFIG($1)
  7365. fi
  7366. GCC=$lt_save_GCC
  7367. AC_LANG_RESTORE
  7368. CC=$lt_save_CC
  7369. CFLAGS=$lt_save_CFLAGS
  7370. ])# _LT_LANG_RC_CONFIG
  7371. # LT_PROG_GCJ
  7372. # -----------
  7373. AC_DEFUN([LT_PROG_GCJ],
  7374. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  7375. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  7376. [AC_CHECK_TOOL(GCJ, gcj,)
  7377. test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
  7378. AC_SUBST(GCJFLAGS)])])[]dnl
  7379. ])
  7380. # Old name:
  7381. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  7382. dnl aclocal-1.4 backwards compatibility:
  7383. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  7384. # LT_PROG_GO
  7385. # ----------
  7386. AC_DEFUN([LT_PROG_GO],
  7387. [AC_CHECK_TOOL(GOC, gccgo,)
  7388. ])
  7389. # LT_PROG_RC
  7390. # ----------
  7391. AC_DEFUN([LT_PROG_RC],
  7392. [AC_CHECK_TOOL(RC, windres,)
  7393. ])
  7394. # Old name:
  7395. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  7396. dnl aclocal-1.4 backwards compatibility:
  7397. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  7398. # _LT_DECL_EGREP
  7399. # --------------
  7400. # If we don't have a new enough Autoconf to choose the best grep
  7401. # available, choose the one first in the user's PATH.
  7402. m4_defun([_LT_DECL_EGREP],
  7403. [AC_REQUIRE([AC_PROG_EGREP])dnl
  7404. AC_REQUIRE([AC_PROG_FGREP])dnl
  7405. test -z "$GREP" && GREP=grep
  7406. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  7407. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  7408. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  7409. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  7410. AC_SUBST([GREP])
  7411. ])
  7412. # _LT_DECL_OBJDUMP
  7413. # --------------
  7414. # If we don't have a new enough Autoconf to choose the best objdump
  7415. # available, choose the one first in the user's PATH.
  7416. m4_defun([_LT_DECL_OBJDUMP],
  7417. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7418. test -z "$OBJDUMP" && OBJDUMP=objdump
  7419. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  7420. AC_SUBST([OBJDUMP])
  7421. ])
  7422. # _LT_DECL_DLLTOOL
  7423. # ----------------
  7424. # Ensure DLLTOOL variable is set.
  7425. m4_defun([_LT_DECL_DLLTOOL],
  7426. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7427. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7428. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  7429. AC_SUBST([DLLTOOL])
  7430. ])
  7431. # _LT_DECL_SED
  7432. # ------------
  7433. # Check for a fully-functional sed program, that truncates
  7434. # as few characters as possible. Prefer GNU sed if found.
  7435. m4_defun([_LT_DECL_SED],
  7436. [AC_PROG_SED
  7437. test -z "$SED" && SED=sed
  7438. Xsed="$SED -e 1s/^X//"
  7439. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  7440. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  7441. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  7442. ])# _LT_DECL_SED
  7443. m4_ifndef([AC_PROG_SED], [
  7444. # NOTE: This macro has been submitted for inclusion into #
  7445. # GNU Autoconf as AC_PROG_SED. When it is available in #
  7446. # a released version of Autoconf we should remove this #
  7447. # macro and use it instead. #
  7448. m4_defun([AC_PROG_SED],
  7449. [AC_MSG_CHECKING([for a sed that does not truncate output])
  7450. AC_CACHE_VAL(lt_cv_path_SED,
  7451. [# Loop through the user's path and test for sed and gsed.
  7452. # Then use that list of sed's as ones to test for truncation.
  7453. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7454. for as_dir in $PATH
  7455. do
  7456. IFS=$as_save_IFS
  7457. test -z "$as_dir" && as_dir=.
  7458. for lt_ac_prog in sed gsed; do
  7459. for ac_exec_ext in '' $ac_executable_extensions; do
  7460. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  7461. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  7462. fi
  7463. done
  7464. done
  7465. done
  7466. IFS=$as_save_IFS
  7467. lt_ac_max=0
  7468. lt_ac_count=0
  7469. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7470. # along with /bin/sed that truncates output.
  7471. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7472. test ! -f "$lt_ac_sed" && continue
  7473. cat /dev/null > conftest.in
  7474. lt_ac_count=0
  7475. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7476. # Check for GNU sed and select it if it is found.
  7477. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7478. lt_cv_path_SED=$lt_ac_sed
  7479. break
  7480. fi
  7481. while true; do
  7482. cat conftest.in conftest.in >conftest.tmp
  7483. mv conftest.tmp conftest.in
  7484. cp conftest.in conftest.nl
  7485. echo >>conftest.nl
  7486. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7487. cmp -s conftest.out conftest.nl || break
  7488. # 10000 chars as input seems more than enough
  7489. test 10 -lt "$lt_ac_count" && break
  7490. lt_ac_count=`expr $lt_ac_count + 1`
  7491. if test "$lt_ac_count" -gt "$lt_ac_max"; then
  7492. lt_ac_max=$lt_ac_count
  7493. lt_cv_path_SED=$lt_ac_sed
  7494. fi
  7495. done
  7496. done
  7497. ])
  7498. SED=$lt_cv_path_SED
  7499. AC_SUBST([SED])
  7500. AC_MSG_RESULT([$SED])
  7501. ])#AC_PROG_SED
  7502. ])#m4_ifndef
  7503. # Old name:
  7504. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7505. dnl aclocal-1.4 backwards compatibility:
  7506. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7507. # _LT_CHECK_SHELL_FEATURES
  7508. # ------------------------
  7509. # Find out whether the shell is Bourne or XSI compatible,
  7510. # or has some other useful features.
  7511. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7512. [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7513. lt_unset=unset
  7514. else
  7515. lt_unset=false
  7516. fi
  7517. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7518. # test EBCDIC or ASCII
  7519. case `echo X|tr X '\101'` in
  7520. A) # ASCII based system
  7521. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7522. lt_SP2NL='tr \040 \012'
  7523. lt_NL2SP='tr \015\012 \040\040'
  7524. ;;
  7525. *) # EBCDIC based system
  7526. lt_SP2NL='tr \100 \n'
  7527. lt_NL2SP='tr \r\n \100\100'
  7528. ;;
  7529. esac
  7530. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7531. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7532. ])# _LT_CHECK_SHELL_FEATURES
  7533. # _LT_PATH_CONVERSION_FUNCTIONS
  7534. # -----------------------------
  7535. # Determine what file name conversion functions should be used by
  7536. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7537. # for certain cross-compile configurations and native mingw.
  7538. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7539. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7540. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7541. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7542. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7543. [case $host in
  7544. *-*-mingw* )
  7545. case $build in
  7546. *-*-mingw* ) # actually msys
  7547. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7548. ;;
  7549. *-*-cygwin* )
  7550. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7551. ;;
  7552. * ) # otherwise, assume *nix
  7553. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7554. ;;
  7555. esac
  7556. ;;
  7557. *-*-cygwin* )
  7558. case $build in
  7559. *-*-mingw* ) # actually msys
  7560. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7561. ;;
  7562. *-*-cygwin* )
  7563. lt_cv_to_host_file_cmd=func_convert_file_noop
  7564. ;;
  7565. * ) # otherwise, assume *nix
  7566. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7567. ;;
  7568. esac
  7569. ;;
  7570. * ) # unhandled hosts (and "normal" native builds)
  7571. lt_cv_to_host_file_cmd=func_convert_file_noop
  7572. ;;
  7573. esac
  7574. ])
  7575. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7576. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7577. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7578. [0], [convert $build file names to $host format])dnl
  7579. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7580. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7581. [#assume ordinary cross tools, or native build.
  7582. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7583. case $host in
  7584. *-*-mingw* )
  7585. case $build in
  7586. *-*-mingw* ) # actually msys
  7587. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7588. ;;
  7589. esac
  7590. ;;
  7591. esac
  7592. ])
  7593. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7594. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7595. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7596. [0], [convert $build files to toolchain format])dnl
  7597. ])# _LT_PATH_CONVERSION_FUNCTIONS
  7598. # longlong.m4 serial 17
  7599. dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
  7600. dnl This file is free software; the Free Software Foundation
  7601. dnl gives unlimited permission to copy and/or distribute it,
  7602. dnl with or without modifications, as long as this notice is preserved.
  7603. dnl From Paul Eggert.
  7604. # Define HAVE_LONG_LONG_INT if 'long long int' works.
  7605. # This fixes a bug in Autoconf 2.61, and can be faster
  7606. # than what's in Autoconf 2.62 through 2.68.
  7607. # Note: If the type 'long long int' exists but is only 32 bits large
  7608. # (as on some very old compilers), HAVE_LONG_LONG_INT will not be
  7609. # defined. In this case you can treat 'long long int' like 'long int'.
  7610. AC_DEFUN([AC_TYPE_LONG_LONG_INT],
  7611. [
  7612. AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
  7613. AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
  7614. [ac_cv_type_long_long_int=yes
  7615. if test "x${ac_cv_prog_cc_c99-no}" = xno; then
  7616. ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
  7617. if test $ac_cv_type_long_long_int = yes; then
  7618. dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
  7619. dnl If cross compiling, assume the bug is not important, since
  7620. dnl nobody cross compiles for this platform as far as we know.
  7621. AC_RUN_IFELSE(
  7622. [AC_LANG_PROGRAM(
  7623. [[@%:@include <limits.h>
  7624. @%:@ifndef LLONG_MAX
  7625. @%:@ define HALF \
  7626. (1LL << (sizeof (long long int) * CHAR_BIT - 2))
  7627. @%:@ define LLONG_MAX (HALF - 1 + HALF)
  7628. @%:@endif]],
  7629. [[long long int n = 1;
  7630. int i;
  7631. for (i = 0; ; i++)
  7632. {
  7633. long long int m = n << i;
  7634. if (m >> i != n)
  7635. return 1;
  7636. if (LLONG_MAX / 2 < m)
  7637. break;
  7638. }
  7639. return 0;]])],
  7640. [],
  7641. [ac_cv_type_long_long_int=no],
  7642. [:])
  7643. fi
  7644. fi])
  7645. if test $ac_cv_type_long_long_int = yes; then
  7646. AC_DEFINE([HAVE_LONG_LONG_INT], [1],
  7647. [Define to 1 if the system has the type 'long long int'.])
  7648. fi
  7649. ])
  7650. # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
  7651. # This fixes a bug in Autoconf 2.61, and can be faster
  7652. # than what's in Autoconf 2.62 through 2.68.
  7653. # Note: If the type 'unsigned long long int' exists but is only 32 bits
  7654. # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
  7655. # will not be defined. In this case you can treat 'unsigned long long int'
  7656. # like 'unsigned long int'.
  7657. AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
  7658. [
  7659. AC_CACHE_CHECK([for unsigned long long int],
  7660. [ac_cv_type_unsigned_long_long_int],
  7661. [ac_cv_type_unsigned_long_long_int=yes
  7662. if test "x${ac_cv_prog_cc_c99-no}" = xno; then
  7663. AC_LINK_IFELSE(
  7664. [_AC_TYPE_LONG_LONG_SNIPPET],
  7665. [],
  7666. [ac_cv_type_unsigned_long_long_int=no])
  7667. fi])
  7668. if test $ac_cv_type_unsigned_long_long_int = yes; then
  7669. AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
  7670. [Define to 1 if the system has the type 'unsigned long long int'.])
  7671. fi
  7672. ])
  7673. # Expands to a C program that can be used to test for simultaneous support
  7674. # of 'long long' and 'unsigned long long'. We don't want to say that
  7675. # 'long long' is available if 'unsigned long long' is not, or vice versa,
  7676. # because too many programs rely on the symmetry between signed and unsigned
  7677. # integer types (excluding 'bool').
  7678. AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
  7679. [
  7680. AC_LANG_PROGRAM(
  7681. [[/* For now, do not test the preprocessor; as of 2007 there are too many
  7682. implementations with broken preprocessors. Perhaps this can
  7683. be revisited in 2012. In the meantime, code should not expect
  7684. #if to work with literals wider than 32 bits. */
  7685. /* Test literals. */
  7686. long long int ll = 9223372036854775807ll;
  7687. long long int nll = -9223372036854775807LL;
  7688. unsigned long long int ull = 18446744073709551615ULL;
  7689. /* Test constant expressions. */
  7690. typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
  7691. ? 1 : -1)];
  7692. typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
  7693. ? 1 : -1)];
  7694. int i = 63;]],
  7695. [[/* Test availability of runtime routines for shift and division. */
  7696. long long int llmax = 9223372036854775807ll;
  7697. unsigned long long int ullmax = 18446744073709551615ull;
  7698. return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
  7699. | (llmax / ll) | (llmax % ll)
  7700. | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
  7701. | (ullmax / ull) | (ullmax % ull));]])
  7702. ])
  7703. # Helper functions for option handling. -*- Autoconf -*-
  7704. #
  7705. # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
  7706. # Foundation, Inc.
  7707. # Written by Gary V. Vaughan, 2004
  7708. #
  7709. # This file is free software; the Free Software Foundation gives
  7710. # unlimited permission to copy and/or distribute it, with or without
  7711. # modifications, as long as this notice is preserved.
  7712. # serial 8 ltoptions.m4
  7713. # This is to help aclocal find these macros, as it can't see m4_define.
  7714. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  7715. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  7716. # ------------------------------------------
  7717. m4_define([_LT_MANGLE_OPTION],
  7718. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  7719. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  7720. # ---------------------------------------
  7721. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  7722. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  7723. # saved as a flag.
  7724. m4_define([_LT_SET_OPTION],
  7725. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  7726. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  7727. _LT_MANGLE_DEFUN([$1], [$2]),
  7728. [m4_warning([Unknown $1 option '$2'])])[]dnl
  7729. ])
  7730. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  7731. # ------------------------------------------------------------
  7732. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  7733. m4_define([_LT_IF_OPTION],
  7734. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  7735. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  7736. # -------------------------------------------------------
  7737. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  7738. # are set.
  7739. m4_define([_LT_UNLESS_OPTIONS],
  7740. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7741. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  7742. [m4_define([$0_found])])])[]dnl
  7743. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  7744. ])[]dnl
  7745. ])
  7746. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  7747. # ----------------------------------------
  7748. # OPTION-LIST is a space-separated list of Libtool options associated
  7749. # with MACRO-NAME. If any OPTION has a matching handler declared with
  7750. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  7751. # the unknown option and exit.
  7752. m4_defun([_LT_SET_OPTIONS],
  7753. [# Set options
  7754. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7755. [_LT_SET_OPTION([$1], _LT_Option)])
  7756. m4_if([$1],[LT_INIT],[
  7757. dnl
  7758. dnl Simply set some default values (i.e off) if boolean options were not
  7759. dnl specified:
  7760. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  7761. ])
  7762. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  7763. ])
  7764. dnl
  7765. dnl If no reference was made to various pairs of opposing options, then
  7766. dnl we run the default mode handler for the pair. For example, if neither
  7767. dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
  7768. dnl archives by default:
  7769. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  7770. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  7771. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  7772. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  7773. [_LT_ENABLE_FAST_INSTALL])
  7774. _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
  7775. [_LT_WITH_AIX_SONAME([aix])])
  7776. ])
  7777. ])# _LT_SET_OPTIONS
  7778. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  7779. # -----------------------------------------
  7780. m4_define([_LT_MANGLE_DEFUN],
  7781. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  7782. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  7783. # -----------------------------------------------
  7784. m4_define([LT_OPTION_DEFINE],
  7785. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  7786. ])# LT_OPTION_DEFINE
  7787. # dlopen
  7788. # ------
  7789. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  7790. ])
  7791. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  7792. [_LT_SET_OPTION([LT_INIT], [dlopen])
  7793. AC_DIAGNOSE([obsolete],
  7794. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7795. put the 'dlopen' option into LT_INIT's first parameter.])
  7796. ])
  7797. dnl aclocal-1.4 backwards compatibility:
  7798. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  7799. # win32-dll
  7800. # ---------
  7801. # Declare package support for building win32 dll's.
  7802. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  7803. [enable_win32_dll=yes
  7804. case $host in
  7805. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  7806. AC_CHECK_TOOL(AS, as, false)
  7807. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7808. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7809. ;;
  7810. esac
  7811. test -z "$AS" && AS=as
  7812. _LT_DECL([], [AS], [1], [Assembler program])dnl
  7813. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7814. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  7815. test -z "$OBJDUMP" && OBJDUMP=objdump
  7816. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  7817. ])# win32-dll
  7818. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  7819. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7820. _LT_SET_OPTION([LT_INIT], [win32-dll])
  7821. AC_DIAGNOSE([obsolete],
  7822. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7823. put the 'win32-dll' option into LT_INIT's first parameter.])
  7824. ])
  7825. dnl aclocal-1.4 backwards compatibility:
  7826. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  7827. # _LT_ENABLE_SHARED([DEFAULT])
  7828. # ----------------------------
  7829. # implement the --enable-shared flag, and supports the 'shared' and
  7830. # 'disable-shared' LT_INIT options.
  7831. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7832. m4_define([_LT_ENABLE_SHARED],
  7833. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7834. AC_ARG_ENABLE([shared],
  7835. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  7836. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  7837. [p=${PACKAGE-default}
  7838. case $enableval in
  7839. yes) enable_shared=yes ;;
  7840. no) enable_shared=no ;;
  7841. *)
  7842. enable_shared=no
  7843. # Look at the argument we got. We use all the common list separators.
  7844. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7845. for pkg in $enableval; do
  7846. IFS=$lt_save_ifs
  7847. if test "X$pkg" = "X$p"; then
  7848. enable_shared=yes
  7849. fi
  7850. done
  7851. IFS=$lt_save_ifs
  7852. ;;
  7853. esac],
  7854. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  7855. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  7856. [Whether or not to build shared libraries])
  7857. ])# _LT_ENABLE_SHARED
  7858. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  7859. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  7860. # Old names:
  7861. AC_DEFUN([AC_ENABLE_SHARED],
  7862. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  7863. ])
  7864. AC_DEFUN([AC_DISABLE_SHARED],
  7865. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  7866. ])
  7867. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  7868. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  7869. dnl aclocal-1.4 backwards compatibility:
  7870. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  7871. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  7872. # _LT_ENABLE_STATIC([DEFAULT])
  7873. # ----------------------------
  7874. # implement the --enable-static flag, and support the 'static' and
  7875. # 'disable-static' LT_INIT options.
  7876. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7877. m4_define([_LT_ENABLE_STATIC],
  7878. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7879. AC_ARG_ENABLE([static],
  7880. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  7881. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  7882. [p=${PACKAGE-default}
  7883. case $enableval in
  7884. yes) enable_static=yes ;;
  7885. no) enable_static=no ;;
  7886. *)
  7887. enable_static=no
  7888. # Look at the argument we got. We use all the common list separators.
  7889. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7890. for pkg in $enableval; do
  7891. IFS=$lt_save_ifs
  7892. if test "X$pkg" = "X$p"; then
  7893. enable_static=yes
  7894. fi
  7895. done
  7896. IFS=$lt_save_ifs
  7897. ;;
  7898. esac],
  7899. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  7900. _LT_DECL([build_old_libs], [enable_static], [0],
  7901. [Whether or not to build static libraries])
  7902. ])# _LT_ENABLE_STATIC
  7903. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  7904. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  7905. # Old names:
  7906. AC_DEFUN([AC_ENABLE_STATIC],
  7907. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  7908. ])
  7909. AC_DEFUN([AC_DISABLE_STATIC],
  7910. [_LT_SET_OPTION([LT_INIT], [disable-static])
  7911. ])
  7912. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  7913. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  7914. dnl aclocal-1.4 backwards compatibility:
  7915. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  7916. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  7917. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  7918. # ----------------------------------
  7919. # implement the --enable-fast-install flag, and support the 'fast-install'
  7920. # and 'disable-fast-install' LT_INIT options.
  7921. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
  7922. m4_define([_LT_ENABLE_FAST_INSTALL],
  7923. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7924. AC_ARG_ENABLE([fast-install],
  7925. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  7926. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  7927. [p=${PACKAGE-default}
  7928. case $enableval in
  7929. yes) enable_fast_install=yes ;;
  7930. no) enable_fast_install=no ;;
  7931. *)
  7932. enable_fast_install=no
  7933. # Look at the argument we got. We use all the common list separators.
  7934. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  7935. for pkg in $enableval; do
  7936. IFS=$lt_save_ifs
  7937. if test "X$pkg" = "X$p"; then
  7938. enable_fast_install=yes
  7939. fi
  7940. done
  7941. IFS=$lt_save_ifs
  7942. ;;
  7943. esac],
  7944. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  7945. _LT_DECL([fast_install], [enable_fast_install], [0],
  7946. [Whether or not to optimize for fast installation])dnl
  7947. ])# _LT_ENABLE_FAST_INSTALL
  7948. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  7949. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  7950. # Old names:
  7951. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  7952. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  7953. AC_DIAGNOSE([obsolete],
  7954. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7955. the 'fast-install' option into LT_INIT's first parameter.])
  7956. ])
  7957. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  7958. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  7959. AC_DIAGNOSE([obsolete],
  7960. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7961. the 'disable-fast-install' option into LT_INIT's first parameter.])
  7962. ])
  7963. dnl aclocal-1.4 backwards compatibility:
  7964. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  7965. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  7966. # _LT_WITH_AIX_SONAME([DEFAULT])
  7967. # ----------------------------------
  7968. # implement the --with-aix-soname flag, and support the `aix-soname=aix'
  7969. # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
  7970. # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
  7971. m4_define([_LT_WITH_AIX_SONAME],
  7972. [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
  7973. shared_archive_member_spec=
  7974. case $host,$enable_shared in
  7975. power*-*-aix[[5-9]]*,yes)
  7976. AC_MSG_CHECKING([which variant of shared library versioning to provide])
  7977. AC_ARG_WITH([aix-soname],
  7978. [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
  7979. [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
  7980. [case $withval in
  7981. aix|svr4|both)
  7982. ;;
  7983. *)
  7984. AC_MSG_ERROR([Unknown argument to --with-aix-soname])
  7985. ;;
  7986. esac
  7987. lt_cv_with_aix_soname=$with_aix_soname],
  7988. [AC_CACHE_VAL([lt_cv_with_aix_soname],
  7989. [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
  7990. with_aix_soname=$lt_cv_with_aix_soname])
  7991. AC_MSG_RESULT([$with_aix_soname])
  7992. if test aix != "$with_aix_soname"; then
  7993. # For the AIX way of multilib, we name the shared archive member
  7994. # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
  7995. # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
  7996. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
  7997. # the AIX toolchain works better with OBJECT_MODE set (default 32).
  7998. if test 64 = "${OBJECT_MODE-32}"; then
  7999. shared_archive_member_spec=shr_64
  8000. else
  8001. shared_archive_member_spec=shr
  8002. fi
  8003. fi
  8004. ;;
  8005. *)
  8006. with_aix_soname=aix
  8007. ;;
  8008. esac
  8009. _LT_DECL([], [shared_archive_member_spec], [0],
  8010. [Shared archive member basename, for filename based shared library versioning on AIX])dnl
  8011. ])# _LT_WITH_AIX_SONAME
  8012. LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
  8013. LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
  8014. LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
  8015. # _LT_WITH_PIC([MODE])
  8016. # --------------------
  8017. # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
  8018. # LT_INIT options.
  8019. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
  8020. m4_define([_LT_WITH_PIC],
  8021. [AC_ARG_WITH([pic],
  8022. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  8023. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  8024. [lt_p=${PACKAGE-default}
  8025. case $withval in
  8026. yes|no) pic_mode=$withval ;;
  8027. *)
  8028. pic_mode=default
  8029. # Look at the argument we got. We use all the common list separators.
  8030. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
  8031. for lt_pkg in $withval; do
  8032. IFS=$lt_save_ifs
  8033. if test "X$lt_pkg" = "X$lt_p"; then
  8034. pic_mode=yes
  8035. fi
  8036. done
  8037. IFS=$lt_save_ifs
  8038. ;;
  8039. esac],
  8040. [pic_mode=m4_default([$1], [default])])
  8041. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  8042. ])# _LT_WITH_PIC
  8043. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  8044. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  8045. # Old name:
  8046. AU_DEFUN([AC_LIBTOOL_PICMODE],
  8047. [_LT_SET_OPTION([LT_INIT], [pic-only])
  8048. AC_DIAGNOSE([obsolete],
  8049. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  8050. put the 'pic-only' option into LT_INIT's first parameter.])
  8051. ])
  8052. dnl aclocal-1.4 backwards compatibility:
  8053. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  8054. m4_define([_LTDL_MODE], [])
  8055. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  8056. [m4_define([_LTDL_MODE], [nonrecursive])])
  8057. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  8058. [m4_define([_LTDL_MODE], [recursive])])
  8059. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  8060. [m4_define([_LTDL_MODE], [subproject])])
  8061. m4_define([_LTDL_TYPE], [])
  8062. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  8063. [m4_define([_LTDL_TYPE], [installable])])
  8064. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  8065. [m4_define([_LTDL_TYPE], [convenience])])
  8066. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  8067. #
  8068. # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
  8069. # Foundation, Inc.
  8070. # Written by Gary V. Vaughan, 2004
  8071. #
  8072. # This file is free software; the Free Software Foundation gives
  8073. # unlimited permission to copy and/or distribute it, with or without
  8074. # modifications, as long as this notice is preserved.
  8075. # serial 6 ltsugar.m4
  8076. # This is to help aclocal find these macros, as it can't see m4_define.
  8077. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  8078. # lt_join(SEP, ARG1, [ARG2...])
  8079. # -----------------------------
  8080. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  8081. # associated separator.
  8082. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  8083. # versions in m4sugar had bugs.
  8084. m4_define([lt_join],
  8085. [m4_if([$#], [1], [],
  8086. [$#], [2], [[$2]],
  8087. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  8088. m4_define([_lt_join],
  8089. [m4_if([$#$2], [2], [],
  8090. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  8091. # lt_car(LIST)
  8092. # lt_cdr(LIST)
  8093. # ------------
  8094. # Manipulate m4 lists.
  8095. # These macros are necessary as long as will still need to support
  8096. # Autoconf-2.59, which quotes differently.
  8097. m4_define([lt_car], [[$1]])
  8098. m4_define([lt_cdr],
  8099. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  8100. [$#], 1, [],
  8101. [m4_dquote(m4_shift($@))])])
  8102. m4_define([lt_unquote], $1)
  8103. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  8104. # ------------------------------------------
  8105. # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
  8106. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  8107. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  8108. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  8109. # than defined and empty).
  8110. #
  8111. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  8112. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  8113. m4_define([lt_append],
  8114. [m4_define([$1],
  8115. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  8116. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  8117. # ----------------------------------------------------------
  8118. # Produce a SEP delimited list of all paired combinations of elements of
  8119. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  8120. # has the form PREFIXmINFIXSUFFIXn.
  8121. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  8122. m4_define([lt_combine],
  8123. [m4_if(m4_eval([$# > 3]), [1],
  8124. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  8125. [[m4_foreach([_Lt_prefix], [$2],
  8126. [m4_foreach([_Lt_suffix],
  8127. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  8128. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  8129. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  8130. # -----------------------------------------------------------------------
  8131. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  8132. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  8133. m4_define([lt_if_append_uniq],
  8134. [m4_ifdef([$1],
  8135. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  8136. [lt_append([$1], [$2], [$3])$4],
  8137. [$5])],
  8138. [lt_append([$1], [$2], [$3])$4])])
  8139. # lt_dict_add(DICT, KEY, VALUE)
  8140. # -----------------------------
  8141. m4_define([lt_dict_add],
  8142. [m4_define([$1($2)], [$3])])
  8143. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  8144. # --------------------------------------------
  8145. m4_define([lt_dict_add_subkey],
  8146. [m4_define([$1($2:$3)], [$4])])
  8147. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  8148. # ----------------------------------
  8149. m4_define([lt_dict_fetch],
  8150. [m4_ifval([$3],
  8151. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  8152. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  8153. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  8154. # -----------------------------------------------------------------
  8155. m4_define([lt_if_dict_fetch],
  8156. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  8157. [$5],
  8158. [$6])])
  8159. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  8160. # --------------------------------------------------------------
  8161. m4_define([lt_dict_filter],
  8162. [m4_if([$5], [], [],
  8163. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  8164. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  8165. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  8166. ])
  8167. # ltversion.m4 -- version numbers -*- Autoconf -*-
  8168. #
  8169. # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
  8170. # Written by Scott James Remnant, 2004
  8171. #
  8172. # This file is free software; the Free Software Foundation gives
  8173. # unlimited permission to copy and/or distribute it, with or without
  8174. # modifications, as long as this notice is preserved.
  8175. # @configure_input@
  8176. # serial 4179 ltversion.m4
  8177. # This file is part of GNU Libtool
  8178. m4_define([LT_PACKAGE_VERSION], [2.4.6])
  8179. m4_define([LT_PACKAGE_REVISION], [2.4.6])
  8180. AC_DEFUN([LTVERSION_VERSION],
  8181. [macro_version='2.4.6'
  8182. macro_revision='2.4.6'
  8183. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  8184. _LT_DECL(, macro_revision, 0)
  8185. ])
  8186. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  8187. #
  8188. # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
  8189. # Foundation, Inc.
  8190. # Written by Scott James Remnant, 2004.
  8191. #
  8192. # This file is free software; the Free Software Foundation gives
  8193. # unlimited permission to copy and/or distribute it, with or without
  8194. # modifications, as long as this notice is preserved.
  8195. # serial 5 lt~obsolete.m4
  8196. # These exist entirely to fool aclocal when bootstrapping libtool.
  8197. #
  8198. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
  8199. # which have later been changed to m4_define as they aren't part of the
  8200. # exported API, or moved to Autoconf or Automake where they belong.
  8201. #
  8202. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  8203. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  8204. # using a macro with the same name in our local m4/libtool.m4 it'll
  8205. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  8206. # and doesn't know about Autoconf macros at all.)
  8207. #
  8208. # So we provide this file, which has a silly filename so it's always
  8209. # included after everything else. This provides aclocal with the
  8210. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  8211. # because those macros already exist, or will be overwritten later.
  8212. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  8213. #
  8214. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  8215. # Yes, that means every name once taken will need to remain here until
  8216. # we give up compatibility with versions before 1.7, at which point
  8217. # we need to keep only those names which we still refer to.
  8218. # This is to help aclocal find these macros, as it can't see m4_define.
  8219. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  8220. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  8221. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  8222. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  8223. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  8224. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  8225. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  8226. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  8227. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  8228. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  8229. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  8230. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  8231. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  8232. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  8233. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  8234. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  8235. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  8236. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  8237. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  8238. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  8239. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  8240. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  8241. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  8242. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  8243. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  8244. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  8245. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  8246. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  8247. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  8248. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  8249. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  8250. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  8251. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  8252. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  8253. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  8254. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  8255. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  8256. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  8257. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  8258. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  8259. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  8260. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  8261. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  8262. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  8263. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  8264. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  8265. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  8266. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  8267. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  8268. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  8269. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  8270. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  8271. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  8272. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  8273. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  8274. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  8275. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  8276. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  8277. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  8278. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  8279. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  8280. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
  8281. # Copyright (C) 2002-2014 Free Software Foundation, Inc.
  8282. #
  8283. # This file is free software; the Free Software Foundation
  8284. # gives unlimited permission to copy and/or distribute it,
  8285. # with or without modifications, as long as this notice is preserved.
  8286. # AM_AUTOMAKE_VERSION(VERSION)
  8287. # ----------------------------
  8288. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  8289. # generated from the m4 files accompanying Automake X.Y.
  8290. # (This private macro should not be called outside this file.)
  8291. AC_DEFUN([AM_AUTOMAKE_VERSION],
  8292. [am__api_version='1.15'
  8293. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  8294. dnl require some minimum version. Point them to the right macro.
  8295. m4_if([$1], [1.15], [],
  8296. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  8297. ])
  8298. # _AM_AUTOCONF_VERSION(VERSION)
  8299. # -----------------------------
  8300. # aclocal traces this macro to find the Autoconf version.
  8301. # This is a private macro too. Using m4_define simplifies
  8302. # the logic in aclocal, which can simply ignore this definition.
  8303. m4_define([_AM_AUTOCONF_VERSION], [])
  8304. # AM_SET_CURRENT_AUTOMAKE_VERSION
  8305. # -------------------------------
  8306. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  8307. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  8308. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  8309. [AM_AUTOMAKE_VERSION([1.15])dnl
  8310. m4_ifndef([AC_AUTOCONF_VERSION],
  8311. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  8312. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  8313. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  8314. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  8315. #
  8316. # This file is free software; the Free Software Foundation
  8317. # gives unlimited permission to copy and/or distribute it,
  8318. # with or without modifications, as long as this notice is preserved.
  8319. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  8320. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  8321. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  8322. #
  8323. # Of course, Automake must honor this variable whenever it calls a
  8324. # tool from the auxiliary directory. The problem is that $srcdir (and
  8325. # therefore $ac_aux_dir as well) can be either absolute or relative,
  8326. # depending on how configure is run. This is pretty annoying, since
  8327. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  8328. # source directory, any form will work fine, but in subdirectories a
  8329. # relative path needs to be adjusted first.
  8330. #
  8331. # $ac_aux_dir/missing
  8332. # fails when called from a subdirectory if $ac_aux_dir is relative
  8333. # $top_srcdir/$ac_aux_dir/missing
  8334. # fails if $ac_aux_dir is absolute,
  8335. # fails when called from a subdirectory in a VPATH build with
  8336. # a relative $ac_aux_dir
  8337. #
  8338. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  8339. # are both prefixed by $srcdir. In an in-source build this is usually
  8340. # harmless because $srcdir is '.', but things will broke when you
  8341. # start a VPATH build or use an absolute $srcdir.
  8342. #
  8343. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  8344. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  8345. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  8346. # and then we would define $MISSING as
  8347. # MISSING="\${SHELL} $am_aux_dir/missing"
  8348. # This will work as long as MISSING is not called from configure, because
  8349. # unfortunately $(top_srcdir) has no meaning in configure.
  8350. # However there are other variables, like CC, which are often used in
  8351. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  8352. #
  8353. # Another solution, used here, is to always expand $ac_aux_dir to an
  8354. # absolute PATH. The drawback is that using absolute paths prevent a
  8355. # configured tree to be moved without reconfiguration.
  8356. AC_DEFUN([AM_AUX_DIR_EXPAND],
  8357. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  8358. # Expand $ac_aux_dir to an absolute path.
  8359. am_aux_dir=`cd "$ac_aux_dir" && pwd`
  8360. ])
  8361. # AM_CONDITIONAL -*- Autoconf -*-
  8362. # Copyright (C) 1997-2014 Free Software Foundation, Inc.
  8363. #
  8364. # This file is free software; the Free Software Foundation
  8365. # gives unlimited permission to copy and/or distribute it,
  8366. # with or without modifications, as long as this notice is preserved.
  8367. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  8368. # -------------------------------------
  8369. # Define a conditional.
  8370. AC_DEFUN([AM_CONDITIONAL],
  8371. [AC_PREREQ([2.52])dnl
  8372. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  8373. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  8374. AC_SUBST([$1_TRUE])dnl
  8375. AC_SUBST([$1_FALSE])dnl
  8376. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  8377. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  8378. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  8379. if $2; then
  8380. $1_TRUE=
  8381. $1_FALSE='#'
  8382. else
  8383. $1_TRUE='#'
  8384. $1_FALSE=
  8385. fi
  8386. AC_CONFIG_COMMANDS_PRE(
  8387. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  8388. AC_MSG_ERROR([[conditional "$1" was never defined.
  8389. Usually this means the macro was only invoked conditionally.]])
  8390. fi])])
  8391. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
  8392. #
  8393. # This file is free software; the Free Software Foundation
  8394. # gives unlimited permission to copy and/or distribute it,
  8395. # with or without modifications, as long as this notice is preserved.
  8396. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  8397. # written in clear, in which case automake, when reading aclocal.m4,
  8398. # will think it sees a *use*, and therefore will trigger all it's
  8399. # C support machinery. Also note that it means that autoscan, seeing
  8400. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  8401. # _AM_DEPENDENCIES(NAME)
  8402. # ----------------------
  8403. # See how the compiler implements dependency checking.
  8404. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  8405. # We try a few techniques and use that to set a single cache variable.
  8406. #
  8407. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  8408. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  8409. # dependency, and given that the user is not expected to run this macro,
  8410. # just rely on AC_PROG_CC.
  8411. AC_DEFUN([_AM_DEPENDENCIES],
  8412. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  8413. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  8414. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  8415. AC_REQUIRE([AM_DEP_TRACK])dnl
  8416. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  8417. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  8418. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  8419. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  8420. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  8421. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  8422. [depcc="$$1" am_compiler_list=])
  8423. AC_CACHE_CHECK([dependency style of $depcc],
  8424. [am_cv_$1_dependencies_compiler_type],
  8425. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  8426. # We make a subdir and do the tests there. Otherwise we can end up
  8427. # making bogus files that we don't know about and never remove. For
  8428. # instance it was reported that on HP-UX the gcc test will end up
  8429. # making a dummy file named 'D' -- because '-MD' means "put the output
  8430. # in D".
  8431. rm -rf conftest.dir
  8432. mkdir conftest.dir
  8433. # Copy depcomp to subdir because otherwise we won't find it if we're
  8434. # using a relative directory.
  8435. cp "$am_depcomp" conftest.dir
  8436. cd conftest.dir
  8437. # We will build objects and dependencies in a subdirectory because
  8438. # it helps to detect inapplicable dependency modes. For instance
  8439. # both Tru64's cc and ICC support -MD to output dependencies as a
  8440. # side effect of compilation, but ICC will put the dependencies in
  8441. # the current directory while Tru64 will put them in the object
  8442. # directory.
  8443. mkdir sub
  8444. am_cv_$1_dependencies_compiler_type=none
  8445. if test "$am_compiler_list" = ""; then
  8446. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  8447. fi
  8448. am__universal=false
  8449. m4_case([$1], [CC],
  8450. [case " $depcc " in #(
  8451. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8452. esac],
  8453. [CXX],
  8454. [case " $depcc " in #(
  8455. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  8456. esac])
  8457. for depmode in $am_compiler_list; do
  8458. # Setup a source with many dependencies, because some compilers
  8459. # like to wrap large dependency lists on column 80 (with \), and
  8460. # we should not choose a depcomp mode which is confused by this.
  8461. #
  8462. # We need to recreate these files for each test, as the compiler may
  8463. # overwrite some of them when testing with obscure command lines.
  8464. # This happens at least with the AIX C compiler.
  8465. : > sub/conftest.c
  8466. for i in 1 2 3 4 5 6; do
  8467. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  8468. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  8469. # Solaris 10 /bin/sh.
  8470. echo '/* dummy */' > sub/conftst$i.h
  8471. done
  8472. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  8473. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  8474. # mode. It turns out that the SunPro C++ compiler does not properly
  8475. # handle '-M -o', and we need to detect this. Also, some Intel
  8476. # versions had trouble with output in subdirs.
  8477. am__obj=sub/conftest.${OBJEXT-o}
  8478. am__minus_obj="-o $am__obj"
  8479. case $depmode in
  8480. gcc)
  8481. # This depmode causes a compiler race in universal mode.
  8482. test "$am__universal" = false || continue
  8483. ;;
  8484. nosideeffect)
  8485. # After this tag, mechanisms are not by side-effect, so they'll
  8486. # only be used when explicitly requested.
  8487. if test "x$enable_dependency_tracking" = xyes; then
  8488. continue
  8489. else
  8490. break
  8491. fi
  8492. ;;
  8493. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  8494. # This compiler won't grok '-c -o', but also, the minuso test has
  8495. # not run yet. These depmodes are late enough in the game, and
  8496. # so weak that their functioning should not be impacted.
  8497. am__obj=conftest.${OBJEXT-o}
  8498. am__minus_obj=
  8499. ;;
  8500. none) break ;;
  8501. esac
  8502. if depmode=$depmode \
  8503. source=sub/conftest.c object=$am__obj \
  8504. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  8505. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  8506. >/dev/null 2>conftest.err &&
  8507. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  8508. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  8509. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  8510. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  8511. # icc doesn't choke on unknown options, it will just issue warnings
  8512. # or remarks (even with -Werror). So we grep stderr for any message
  8513. # that says an option was ignored or not supported.
  8514. # When given -MP, icc 7.0 and 7.1 complain thusly:
  8515. # icc: Command line warning: ignoring option '-M'; no argument required
  8516. # The diagnosis changed in icc 8.0:
  8517. # icc: Command line remark: option '-MP' not supported
  8518. if (grep 'ignoring option' conftest.err ||
  8519. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  8520. am_cv_$1_dependencies_compiler_type=$depmode
  8521. break
  8522. fi
  8523. fi
  8524. done
  8525. cd ..
  8526. rm -rf conftest.dir
  8527. else
  8528. am_cv_$1_dependencies_compiler_type=none
  8529. fi
  8530. ])
  8531. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  8532. AM_CONDITIONAL([am__fastdep$1], [
  8533. test "x$enable_dependency_tracking" != xno \
  8534. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  8535. ])
  8536. # AM_SET_DEPDIR
  8537. # -------------
  8538. # Choose a directory name for dependency files.
  8539. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  8540. AC_DEFUN([AM_SET_DEPDIR],
  8541. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8542. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  8543. ])
  8544. # AM_DEP_TRACK
  8545. # ------------
  8546. AC_DEFUN([AM_DEP_TRACK],
  8547. [AC_ARG_ENABLE([dependency-tracking], [dnl
  8548. AS_HELP_STRING(
  8549. [--enable-dependency-tracking],
  8550. [do not reject slow dependency extractors])
  8551. AS_HELP_STRING(
  8552. [--disable-dependency-tracking],
  8553. [speeds up one-time build])])
  8554. if test "x$enable_dependency_tracking" != xno; then
  8555. am_depcomp="$ac_aux_dir/depcomp"
  8556. AMDEPBACKSLASH='\'
  8557. am__nodep='_no'
  8558. fi
  8559. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  8560. AC_SUBST([AMDEPBACKSLASH])dnl
  8561. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  8562. AC_SUBST([am__nodep])dnl
  8563. _AM_SUBST_NOTMAKE([am__nodep])dnl
  8564. ])
  8565. # Generate code to set up dependency tracking. -*- Autoconf -*-
  8566. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
  8567. #
  8568. # This file is free software; the Free Software Foundation
  8569. # gives unlimited permission to copy and/or distribute it,
  8570. # with or without modifications, as long as this notice is preserved.
  8571. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  8572. # ------------------------------
  8573. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  8574. [{
  8575. # Older Autoconf quotes --file arguments for eval, but not when files
  8576. # are listed without --file. Let's play safe and only enable the eval
  8577. # if we detect the quoting.
  8578. case $CONFIG_FILES in
  8579. *\'*) eval set x "$CONFIG_FILES" ;;
  8580. *) set x $CONFIG_FILES ;;
  8581. esac
  8582. shift
  8583. for mf
  8584. do
  8585. # Strip MF so we end up with the name of the file.
  8586. mf=`echo "$mf" | sed -e 's/:.*$//'`
  8587. # Check whether this is an Automake generated Makefile or not.
  8588. # We used to match only the files named 'Makefile.in', but
  8589. # some people rename them; so instead we look at the file content.
  8590. # Grep'ing the first line is not enough: some people post-process
  8591. # each Makefile.in and add a new line on top of each file to say so.
  8592. # Grep'ing the whole file is not good either: AIX grep has a line
  8593. # limit of 2048, but all sed's we know have understand at least 4000.
  8594. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  8595. dirpart=`AS_DIRNAME("$mf")`
  8596. else
  8597. continue
  8598. fi
  8599. # Extract the definition of DEPDIR, am__include, and am__quote
  8600. # from the Makefile without running 'make'.
  8601. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  8602. test -z "$DEPDIR" && continue
  8603. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  8604. test -z "$am__include" && continue
  8605. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  8606. # Find all dependency output files, they are included files with
  8607. # $(DEPDIR) in their names. We invoke sed twice because it is the
  8608. # simplest approach to changing $(DEPDIR) to its actual value in the
  8609. # expansion.
  8610. for file in `sed -n "
  8611. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  8612. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  8613. # Make sure the directory exists.
  8614. test -f "$dirpart/$file" && continue
  8615. fdir=`AS_DIRNAME(["$file"])`
  8616. AS_MKDIR_P([$dirpart/$fdir])
  8617. # echo "creating $dirpart/$file"
  8618. echo '# dummy' > "$dirpart/$file"
  8619. done
  8620. done
  8621. }
  8622. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  8623. # AM_OUTPUT_DEPENDENCY_COMMANDS
  8624. # -----------------------------
  8625. # This macro should only be invoked once -- use via AC_REQUIRE.
  8626. #
  8627. # This code is only required when automatic dependency tracking
  8628. # is enabled. FIXME. This creates each '.P' file that we will
  8629. # need in order to bootstrap the dependency handling code.
  8630. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  8631. [AC_CONFIG_COMMANDS([depfiles],
  8632. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  8633. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  8634. ])
  8635. # Do all the work for Automake. -*- Autoconf -*-
  8636. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
  8637. #
  8638. # This file is free software; the Free Software Foundation
  8639. # gives unlimited permission to copy and/or distribute it,
  8640. # with or without modifications, as long as this notice is preserved.
  8641. # This macro actually does too much. Some checks are only needed if
  8642. # your package does certain things. But this isn't really a big deal.
  8643. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
  8644. m4_define([AC_PROG_CC],
  8645. m4_defn([AC_PROG_CC])
  8646. [_AM_PROG_CC_C_O
  8647. ])
  8648. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  8649. # AM_INIT_AUTOMAKE([OPTIONS])
  8650. # -----------------------------------------------
  8651. # The call with PACKAGE and VERSION arguments is the old style
  8652. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  8653. # and VERSION should now be passed to AC_INIT and removed from
  8654. # the call to AM_INIT_AUTOMAKE.
  8655. # We support both call styles for the transition. After
  8656. # the next Automake release, Autoconf can make the AC_INIT
  8657. # arguments mandatory, and then we can depend on a new Autoconf
  8658. # release and drop the old call support.
  8659. AC_DEFUN([AM_INIT_AUTOMAKE],
  8660. [AC_PREREQ([2.65])dnl
  8661. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  8662. dnl the ones we care about.
  8663. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  8664. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  8665. AC_REQUIRE([AC_PROG_INSTALL])dnl
  8666. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  8667. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  8668. # is not polluted with repeated "-I."
  8669. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  8670. # test to see if srcdir already configured
  8671. if test -f $srcdir/config.status; then
  8672. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  8673. fi
  8674. fi
  8675. # test whether we have cygpath
  8676. if test -z "$CYGPATH_W"; then
  8677. if (cygpath --version) >/dev/null 2>/dev/null; then
  8678. CYGPATH_W='cygpath -w'
  8679. else
  8680. CYGPATH_W=echo
  8681. fi
  8682. fi
  8683. AC_SUBST([CYGPATH_W])
  8684. # Define the identity of the package.
  8685. dnl Distinguish between old-style and new-style calls.
  8686. m4_ifval([$2],
  8687. [AC_DIAGNOSE([obsolete],
  8688. [$0: two- and three-arguments forms are deprecated.])
  8689. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  8690. AC_SUBST([PACKAGE], [$1])dnl
  8691. AC_SUBST([VERSION], [$2])],
  8692. [_AM_SET_OPTIONS([$1])dnl
  8693. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  8694. m4_if(
  8695. m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  8696. [ok:ok],,
  8697. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  8698. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  8699. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  8700. _AM_IF_OPTION([no-define],,
  8701. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  8702. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  8703. # Some tools Automake needs.
  8704. AC_REQUIRE([AM_SANITY_CHECK])dnl
  8705. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  8706. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  8707. AM_MISSING_PROG([AUTOCONF], [autoconf])
  8708. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  8709. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  8710. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  8711. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8712. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  8713. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  8714. # For better backward compatibility. To be removed once Automake 1.9.x
  8715. # dies out for good. For more background, see:
  8716. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  8717. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  8718. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  8719. # We need awk for the "check" target (and possibly the TAP driver). The
  8720. # system "awk" is bad on some platforms.
  8721. AC_REQUIRE([AC_PROG_AWK])dnl
  8722. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  8723. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8724. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  8725. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  8726. [_AM_PROG_TAR([v7])])])
  8727. _AM_IF_OPTION([no-dependencies],,
  8728. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  8729. [_AM_DEPENDENCIES([CC])],
  8730. [m4_define([AC_PROG_CC],
  8731. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  8732. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  8733. [_AM_DEPENDENCIES([CXX])],
  8734. [m4_define([AC_PROG_CXX],
  8735. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  8736. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  8737. [_AM_DEPENDENCIES([OBJC])],
  8738. [m4_define([AC_PROG_OBJC],
  8739. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  8740. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  8741. [_AM_DEPENDENCIES([OBJCXX])],
  8742. [m4_define([AC_PROG_OBJCXX],
  8743. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  8744. ])
  8745. AC_REQUIRE([AM_SILENT_RULES])dnl
  8746. dnl The testsuite driver may need to know about EXEEXT, so add the
  8747. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  8748. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  8749. AC_CONFIG_COMMANDS_PRE(dnl
  8750. [m4_provide_if([_AM_COMPILER_EXEEXT],
  8751. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  8752. # POSIX will say in a future version that running "rm -f" with no argument
  8753. # is OK; and we want to be able to make that assumption in our Makefile
  8754. # recipes. So use an aggressive probe to check that the usage we want is
  8755. # actually supported "in the wild" to an acceptable degree.
  8756. # See automake bug#10828.
  8757. # To make any issue more visible, cause the running configure to be aborted
  8758. # by default if the 'rm' program in use doesn't match our expectations; the
  8759. # user can still override this though.
  8760. if rm -f && rm -fr && rm -rf; then : OK; else
  8761. cat >&2 <<'END'
  8762. Oops!
  8763. Your 'rm' program seems unable to run without file operands specified
  8764. on the command line, even when the '-f' option is present. This is contrary
  8765. to the behaviour of most rm programs out there, and not conforming with
  8766. the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
  8767. Please tell bug-automake@gnu.org about your system, including the value
  8768. of your $PATH and any error possibly output before this message. This
  8769. can help us improve future automake versions.
  8770. END
  8771. if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
  8772. echo 'Configuration will proceed anyway, since you have set the' >&2
  8773. echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
  8774. echo >&2
  8775. else
  8776. cat >&2 <<'END'
  8777. Aborting the configuration process, to ensure you take notice of the issue.
  8778. You can download and install GNU coreutils to get an 'rm' implementation
  8779. that behaves properly: <http://www.gnu.org/software/coreutils/>.
  8780. If you want to complete the configuration process using your problematic
  8781. 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
  8782. to "yes", and re-run configure.
  8783. END
  8784. AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
  8785. fi
  8786. fi
  8787. dnl The trailing newline in this macro's definition is deliberate, for
  8788. dnl backward compatibility and to allow trailing 'dnl'-style comments
  8789. dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
  8790. ])
  8791. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  8792. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  8793. dnl mangled by Autoconf and run in a shell conditional statement.
  8794. m4_define([_AC_COMPILER_EXEEXT],
  8795. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  8796. # When config.status generates a header, we must update the stamp-h file.
  8797. # This file resides in the same directory as the config header
  8798. # that is generated. The stamp files are numbered to have different names.
  8799. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  8800. # loop where config.status creates the headers, so we can generate
  8801. # our stamp files there.
  8802. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  8803. [# Compute $1's index in $config_headers.
  8804. _am_arg=$1
  8805. _am_stamp_count=1
  8806. for _am_header in $config_headers :; do
  8807. case $_am_header in
  8808. $_am_arg | $_am_arg:* )
  8809. break ;;
  8810. * )
  8811. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  8812. esac
  8813. done
  8814. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  8815. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  8816. #
  8817. # This file is free software; the Free Software Foundation
  8818. # gives unlimited permission to copy and/or distribute it,
  8819. # with or without modifications, as long as this notice is preserved.
  8820. # AM_PROG_INSTALL_SH
  8821. # ------------------
  8822. # Define $install_sh.
  8823. AC_DEFUN([AM_PROG_INSTALL_SH],
  8824. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8825. if test x"${install_sh+set}" != xset; then
  8826. case $am_aux_dir in
  8827. *\ * | *\ *)
  8828. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  8829. *)
  8830. install_sh="\${SHELL} $am_aux_dir/install-sh"
  8831. esac
  8832. fi
  8833. AC_SUBST([install_sh])])
  8834. # Copyright (C) 2003-2014 Free Software Foundation, Inc.
  8835. #
  8836. # This file is free software; the Free Software Foundation
  8837. # gives unlimited permission to copy and/or distribute it,
  8838. # with or without modifications, as long as this notice is preserved.
  8839. # Check whether the underlying file-system supports filenames
  8840. # with a leading dot. For instance MS-DOS doesn't.
  8841. AC_DEFUN([AM_SET_LEADING_DOT],
  8842. [rm -rf .tst 2>/dev/null
  8843. mkdir .tst 2>/dev/null
  8844. if test -d .tst; then
  8845. am__leading_dot=.
  8846. else
  8847. am__leading_dot=_
  8848. fi
  8849. rmdir .tst 2>/dev/null
  8850. AC_SUBST([am__leading_dot])])
  8851. # Check to see how 'make' treats includes. -*- Autoconf -*-
  8852. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  8853. #
  8854. # This file is free software; the Free Software Foundation
  8855. # gives unlimited permission to copy and/or distribute it,
  8856. # with or without modifications, as long as this notice is preserved.
  8857. # AM_MAKE_INCLUDE()
  8858. # -----------------
  8859. # Check to see how make treats includes.
  8860. AC_DEFUN([AM_MAKE_INCLUDE],
  8861. [am_make=${MAKE-make}
  8862. cat > confinc << 'END'
  8863. am__doit:
  8864. @echo this is the am__doit target
  8865. .PHONY: am__doit
  8866. END
  8867. # If we don't find an include directive, just comment out the code.
  8868. AC_MSG_CHECKING([for style of include used by $am_make])
  8869. am__include="#"
  8870. am__quote=
  8871. _am_result=none
  8872. # First try GNU make style include.
  8873. echo "include confinc" > confmf
  8874. # Ignore all kinds of additional output from 'make'.
  8875. case `$am_make -s -f confmf 2> /dev/null` in #(
  8876. *the\ am__doit\ target*)
  8877. am__include=include
  8878. am__quote=
  8879. _am_result=GNU
  8880. ;;
  8881. esac
  8882. # Now try BSD make style include.
  8883. if test "$am__include" = "#"; then
  8884. echo '.include "confinc"' > confmf
  8885. case `$am_make -s -f confmf 2> /dev/null` in #(
  8886. *the\ am__doit\ target*)
  8887. am__include=.include
  8888. am__quote="\""
  8889. _am_result=BSD
  8890. ;;
  8891. esac
  8892. fi
  8893. AC_SUBST([am__include])
  8894. AC_SUBST([am__quote])
  8895. AC_MSG_RESULT([$_am_result])
  8896. rm -f confinc confmf
  8897. ])
  8898. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  8899. # Copyright (C) 1997-2014 Free Software Foundation, Inc.
  8900. #
  8901. # This file is free software; the Free Software Foundation
  8902. # gives unlimited permission to copy and/or distribute it,
  8903. # with or without modifications, as long as this notice is preserved.
  8904. # AM_MISSING_PROG(NAME, PROGRAM)
  8905. # ------------------------------
  8906. AC_DEFUN([AM_MISSING_PROG],
  8907. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  8908. $1=${$1-"${am_missing_run}$2"}
  8909. AC_SUBST($1)])
  8910. # AM_MISSING_HAS_RUN
  8911. # ------------------
  8912. # Define MISSING if not defined so far and test if it is modern enough.
  8913. # If it is, set am_missing_run to use it, otherwise, to nothing.
  8914. AC_DEFUN([AM_MISSING_HAS_RUN],
  8915. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8916. AC_REQUIRE_AUX_FILE([missing])dnl
  8917. if test x"${MISSING+set}" != xset; then
  8918. case $am_aux_dir in
  8919. *\ * | *\ *)
  8920. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  8921. *)
  8922. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  8923. esac
  8924. fi
  8925. # Use eval to expand $SHELL
  8926. if eval "$MISSING --is-lightweight"; then
  8927. am_missing_run="$MISSING "
  8928. else
  8929. am_missing_run=
  8930. AC_MSG_WARN(['missing' script is too old or missing])
  8931. fi
  8932. ])
  8933. # Helper functions for option handling. -*- Autoconf -*-
  8934. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  8935. #
  8936. # This file is free software; the Free Software Foundation
  8937. # gives unlimited permission to copy and/or distribute it,
  8938. # with or without modifications, as long as this notice is preserved.
  8939. # _AM_MANGLE_OPTION(NAME)
  8940. # -----------------------
  8941. AC_DEFUN([_AM_MANGLE_OPTION],
  8942. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  8943. # _AM_SET_OPTION(NAME)
  8944. # --------------------
  8945. # Set option NAME. Presently that only means defining a flag for this option.
  8946. AC_DEFUN([_AM_SET_OPTION],
  8947. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  8948. # _AM_SET_OPTIONS(OPTIONS)
  8949. # ------------------------
  8950. # OPTIONS is a space-separated list of Automake options.
  8951. AC_DEFUN([_AM_SET_OPTIONS],
  8952. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  8953. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  8954. # -------------------------------------------
  8955. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  8956. AC_DEFUN([_AM_IF_OPTION],
  8957. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  8958. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
  8959. #
  8960. # This file is free software; the Free Software Foundation
  8961. # gives unlimited permission to copy and/or distribute it,
  8962. # with or without modifications, as long as this notice is preserved.
  8963. # _AM_PROG_CC_C_O
  8964. # ---------------
  8965. # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
  8966. # to automatically call this.
  8967. AC_DEFUN([_AM_PROG_CC_C_O],
  8968. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8969. AC_REQUIRE_AUX_FILE([compile])dnl
  8970. AC_LANG_PUSH([C])dnl
  8971. AC_CACHE_CHECK(
  8972. [whether $CC understands -c and -o together],
  8973. [am_cv_prog_cc_c_o],
  8974. [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
  8975. # Make sure it works both with $CC and with simple cc.
  8976. # Following AC_PROG_CC_C_O, we do the test twice because some
  8977. # compilers refuse to overwrite an existing .o file with -o,
  8978. # though they will create one.
  8979. am_cv_prog_cc_c_o=yes
  8980. for am_i in 1 2; do
  8981. if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
  8982. && test -f conftest2.$ac_objext; then
  8983. : OK
  8984. else
  8985. am_cv_prog_cc_c_o=no
  8986. break
  8987. fi
  8988. done
  8989. rm -f core conftest*
  8990. unset am_i])
  8991. if test "$am_cv_prog_cc_c_o" != yes; then
  8992. # Losing compiler, so override with the script.
  8993. # FIXME: It is wrong to rewrite CC.
  8994. # But if we don't then we get into trouble of one sort or another.
  8995. # A longer-term fix would be to have automake use am__CC in this case,
  8996. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  8997. CC="$am_aux_dir/compile $CC"
  8998. fi
  8999. AC_LANG_POP([C])])
  9000. # For backward compatibility.
  9001. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
  9002. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  9003. #
  9004. # This file is free software; the Free Software Foundation
  9005. # gives unlimited permission to copy and/or distribute it,
  9006. # with or without modifications, as long as this notice is preserved.
  9007. # AM_RUN_LOG(COMMAND)
  9008. # -------------------
  9009. # Run COMMAND, save the exit status in ac_status, and log it.
  9010. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
  9011. AC_DEFUN([AM_RUN_LOG],
  9012. [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
  9013. ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
  9014. ac_status=$?
  9015. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  9016. (exit $ac_status); }])
  9017. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  9018. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
  9019. #
  9020. # This file is free software; the Free Software Foundation
  9021. # gives unlimited permission to copy and/or distribute it,
  9022. # with or without modifications, as long as this notice is preserved.
  9023. # AM_SANITY_CHECK
  9024. # ---------------
  9025. AC_DEFUN([AM_SANITY_CHECK],
  9026. [AC_MSG_CHECKING([whether build environment is sane])
  9027. # Reject unsafe characters in $srcdir or the absolute working directory
  9028. # name. Accept space and tab only in the latter.
  9029. am_lf='
  9030. '
  9031. case `pwd` in
  9032. *[[\\\"\#\$\&\'\`$am_lf]]*)
  9033. AC_MSG_ERROR([unsafe absolute working directory name]);;
  9034. esac
  9035. case $srcdir in
  9036. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  9037. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  9038. esac
  9039. # Do 'set' in a subshell so we don't clobber the current shell's
  9040. # arguments. Must try -L first in case configure is actually a
  9041. # symlink; some systems play weird games with the mod time of symlinks
  9042. # (eg FreeBSD returns the mod time of the symlink's containing
  9043. # directory).
  9044. if (
  9045. am_has_slept=no
  9046. for am_try in 1 2; do
  9047. echo "timestamp, slept: $am_has_slept" > conftest.file
  9048. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  9049. if test "$[*]" = "X"; then
  9050. # -L didn't work.
  9051. set X `ls -t "$srcdir/configure" conftest.file`
  9052. fi
  9053. if test "$[*]" != "X $srcdir/configure conftest.file" \
  9054. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  9055. # If neither matched, then we have a broken ls. This can happen
  9056. # if, for instance, CONFIG_SHELL is bash and it inherits a
  9057. # broken ls alias from the environment. This has actually
  9058. # happened. Such a system could not be considered "sane".
  9059. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  9060. alias in your environment])
  9061. fi
  9062. if test "$[2]" = conftest.file || test $am_try -eq 2; then
  9063. break
  9064. fi
  9065. # Just in case.
  9066. sleep 1
  9067. am_has_slept=yes
  9068. done
  9069. test "$[2]" = conftest.file
  9070. )
  9071. then
  9072. # Ok.
  9073. :
  9074. else
  9075. AC_MSG_ERROR([newly created file is older than distributed files!
  9076. Check your system clock])
  9077. fi
  9078. AC_MSG_RESULT([yes])
  9079. # If we didn't sleep, we still need to ensure time stamps of config.status and
  9080. # generated files are strictly newer.
  9081. am_sleep_pid=
  9082. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  9083. ( sleep 1 ) &
  9084. am_sleep_pid=$!
  9085. fi
  9086. AC_CONFIG_COMMANDS_PRE(
  9087. [AC_MSG_CHECKING([that generated files are newer than configure])
  9088. if test -n "$am_sleep_pid"; then
  9089. # Hide warnings about reused PIDs.
  9090. wait $am_sleep_pid 2>/dev/null
  9091. fi
  9092. AC_MSG_RESULT([done])])
  9093. rm -f conftest.file
  9094. ])
  9095. # Copyright (C) 2009-2014 Free Software Foundation, Inc.
  9096. #
  9097. # This file is free software; the Free Software Foundation
  9098. # gives unlimited permission to copy and/or distribute it,
  9099. # with or without modifications, as long as this notice is preserved.
  9100. # AM_SILENT_RULES([DEFAULT])
  9101. # --------------------------
  9102. # Enable less verbose build rules; with the default set to DEFAULT
  9103. # ("yes" being less verbose, "no" or empty being verbose).
  9104. AC_DEFUN([AM_SILENT_RULES],
  9105. [AC_ARG_ENABLE([silent-rules], [dnl
  9106. AS_HELP_STRING(
  9107. [--enable-silent-rules],
  9108. [less verbose build output (undo: "make V=1")])
  9109. AS_HELP_STRING(
  9110. [--disable-silent-rules],
  9111. [verbose build output (undo: "make V=0")])dnl
  9112. ])
  9113. case $enable_silent_rules in @%:@ (((
  9114. yes) AM_DEFAULT_VERBOSITY=0;;
  9115. no) AM_DEFAULT_VERBOSITY=1;;
  9116. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  9117. esac
  9118. dnl
  9119. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  9120. dnl do not support nested variable expansions.
  9121. dnl See automake bug#9928 and bug#10237.
  9122. am_make=${MAKE-make}
  9123. AC_CACHE_CHECK([whether $am_make supports nested variables],
  9124. [am_cv_make_support_nested_variables],
  9125. [if AS_ECHO([['TRUE=$(BAR$(V))
  9126. BAR0=false
  9127. BAR1=true
  9128. V=1
  9129. am__doit:
  9130. @$(TRUE)
  9131. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  9132. am_cv_make_support_nested_variables=yes
  9133. else
  9134. am_cv_make_support_nested_variables=no
  9135. fi])
  9136. if test $am_cv_make_support_nested_variables = yes; then
  9137. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  9138. AM_V='$(V)'
  9139. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  9140. else
  9141. AM_V=$AM_DEFAULT_VERBOSITY
  9142. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  9143. fi
  9144. AC_SUBST([AM_V])dnl
  9145. AM_SUBST_NOTMAKE([AM_V])dnl
  9146. AC_SUBST([AM_DEFAULT_V])dnl
  9147. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  9148. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  9149. AM_BACKSLASH='\'
  9150. AC_SUBST([AM_BACKSLASH])dnl
  9151. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  9152. ])
  9153. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  9154. #
  9155. # This file is free software; the Free Software Foundation
  9156. # gives unlimited permission to copy and/or distribute it,
  9157. # with or without modifications, as long as this notice is preserved.
  9158. # AM_PROG_INSTALL_STRIP
  9159. # ---------------------
  9160. # One issue with vendor 'install' (even GNU) is that you can't
  9161. # specify the program used to strip binaries. This is especially
  9162. # annoying in cross-compiling environments, where the build's strip
  9163. # is unlikely to handle the host's binaries.
  9164. # Fortunately install-sh will honor a STRIPPROG variable, so we
  9165. # always use install-sh in "make install-strip", and initialize
  9166. # STRIPPROG with the value of the STRIP variable (set by the user).
  9167. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  9168. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  9169. # Installed binaries are usually stripped using 'strip' when the user
  9170. # run "make install-strip". However 'strip' might not be the right
  9171. # tool to use in cross-compilation environments, therefore Automake
  9172. # will honor the 'STRIP' environment variable to overrule this program.
  9173. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  9174. if test "$cross_compiling" != no; then
  9175. AC_CHECK_TOOL([STRIP], [strip], :)
  9176. fi
  9177. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  9178. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  9179. # Copyright (C) 2006-2014 Free Software Foundation, Inc.
  9180. #
  9181. # This file is free software; the Free Software Foundation
  9182. # gives unlimited permission to copy and/or distribute it,
  9183. # with or without modifications, as long as this notice is preserved.
  9184. # _AM_SUBST_NOTMAKE(VARIABLE)
  9185. # ---------------------------
  9186. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  9187. # This macro is traced by Automake.
  9188. AC_DEFUN([_AM_SUBST_NOTMAKE])
  9189. # AM_SUBST_NOTMAKE(VARIABLE)
  9190. # --------------------------
  9191. # Public sister of _AM_SUBST_NOTMAKE.
  9192. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  9193. # Check how to create a tarball. -*- Autoconf -*-
  9194. # Copyright (C) 2004-2014 Free Software Foundation, Inc.
  9195. #
  9196. # This file is free software; the Free Software Foundation
  9197. # gives unlimited permission to copy and/or distribute it,
  9198. # with or without modifications, as long as this notice is preserved.
  9199. # _AM_PROG_TAR(FORMAT)
  9200. # --------------------
  9201. # Check how to create a tarball in format FORMAT.
  9202. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  9203. #
  9204. # Substitute a variable $(am__tar) that is a command
  9205. # writing to stdout a FORMAT-tarball containing the directory
  9206. # $tardir.
  9207. # tardir=directory && $(am__tar) > result.tar
  9208. #
  9209. # Substitute a variable $(am__untar) that extract such
  9210. # a tarball read from stdin.
  9211. # $(am__untar) < result.tar
  9212. #
  9213. AC_DEFUN([_AM_PROG_TAR],
  9214. [# Always define AMTAR for backward compatibility. Yes, it's still used
  9215. # in the wild :-( We should find a proper way to deprecate it ...
  9216. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  9217. # We'll loop over all known methods to create a tar archive until one works.
  9218. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  9219. m4_if([$1], [v7],
  9220. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  9221. [m4_case([$1],
  9222. [ustar],
  9223. [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  9224. # There is notably a 21 bits limit for the UID and the GID. In fact,
  9225. # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  9226. # and bug#13588).
  9227. am_max_uid=2097151 # 2^21 - 1
  9228. am_max_gid=$am_max_uid
  9229. # The $UID and $GID variables are not portable, so we need to resort
  9230. # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
  9231. # below are definitely unexpected, so allow the users to see them
  9232. # (that is, avoid stderr redirection).
  9233. am_uid=`id -u || echo unknown`
  9234. am_gid=`id -g || echo unknown`
  9235. AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  9236. if test $am_uid -le $am_max_uid; then
  9237. AC_MSG_RESULT([yes])
  9238. else
  9239. AC_MSG_RESULT([no])
  9240. _am_tools=none
  9241. fi
  9242. AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  9243. if test $am_gid -le $am_max_gid; then
  9244. AC_MSG_RESULT([yes])
  9245. else
  9246. AC_MSG_RESULT([no])
  9247. _am_tools=none
  9248. fi],
  9249. [pax],
  9250. [],
  9251. [m4_fatal([Unknown tar format])])
  9252. AC_MSG_CHECKING([how to create a $1 tar archive])
  9253. # Go ahead even if we have the value already cached. We do so because we
  9254. # need to set the values for the 'am__tar' and 'am__untar' variables.
  9255. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  9256. for _am_tool in $_am_tools; do
  9257. case $_am_tool in
  9258. gnutar)
  9259. for _am_tar in tar gnutar gtar; do
  9260. AM_RUN_LOG([$_am_tar --version]) && break
  9261. done
  9262. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  9263. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  9264. am__untar="$_am_tar -xf -"
  9265. ;;
  9266. plaintar)
  9267. # Must skip GNU tar: if it does not support --format= it doesn't create
  9268. # ustar tarball either.
  9269. (tar --version) >/dev/null 2>&1 && continue
  9270. am__tar='tar chf - "$$tardir"'
  9271. am__tar_='tar chf - "$tardir"'
  9272. am__untar='tar xf -'
  9273. ;;
  9274. pax)
  9275. am__tar='pax -L -x $1 -w "$$tardir"'
  9276. am__tar_='pax -L -x $1 -w "$tardir"'
  9277. am__untar='pax -r'
  9278. ;;
  9279. cpio)
  9280. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  9281. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  9282. am__untar='cpio -i -H $1 -d'
  9283. ;;
  9284. none)
  9285. am__tar=false
  9286. am__tar_=false
  9287. am__untar=false
  9288. ;;
  9289. esac
  9290. # If the value was cached, stop now. We just wanted to have am__tar
  9291. # and am__untar set.
  9292. test -n "${am_cv_prog_tar_$1}" && break
  9293. # tar/untar a dummy directory, and stop if the command works.
  9294. rm -rf conftest.dir
  9295. mkdir conftest.dir
  9296. echo GrepMe > conftest.dir/file
  9297. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  9298. rm -rf conftest.dir
  9299. if test -s conftest.tar; then
  9300. AM_RUN_LOG([$am__untar <conftest.tar])
  9301. AM_RUN_LOG([cat conftest.dir/file])
  9302. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  9303. fi
  9304. done
  9305. rm -rf conftest.dir
  9306. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  9307. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  9308. AC_SUBST([am__tar])
  9309. AC_SUBST([am__untar])
  9310. ]) # _AM_PROG_TAR