PageRenderTime 101ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 1ms

/aclocal.m4

https://bitbucket.org/mike_php_net/libmysqludf
m4 | 9557 lines | 6697 code | 959 blank | 1901 comment | 0 complexity | c3a04dbb2215820c0b858232a286c3ca MD5 | raw file
Possible License(s): BSD-2-Clause
  1. # generated automatically by aclocal 1.11.2 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  3. # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
  4. # Inc.
  5. # This file is free software; the Free Software Foundation
  6. # gives unlimited permission to copy and/or distribute it,
  7. # with or without modifications, as long as this notice is preserved.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  10. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11. # PARTICULAR PURPOSE.
  12. m4_ifndef([AC_AUTOCONF_VERSION],
  13. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  14. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
  15. [m4_warning([this file was generated for autoconf 2.68.
  16. You have another version of autoconf. It may work, but is not guaranteed to.
  17. If you have problems, you may need to regenerate the build system entirely.
  18. To do so, use the procedure documented by the package, typically `autoreconf'.])])
  19. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  20. #
  21. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  22. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  23. # Foundation, Inc.
  24. # Written by Gordon Matzigkeit, 1996
  25. #
  26. # This file is free software; the Free Software Foundation gives
  27. # unlimited permission to copy and/or distribute it, with or without
  28. # modifications, as long as this notice is preserved.
  29. m4_define([_LT_COPYING], [dnl
  30. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  31. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  32. # Foundation, Inc.
  33. # Written by Gordon Matzigkeit, 1996
  34. #
  35. # This file is part of GNU Libtool.
  36. #
  37. # GNU Libtool is free software; you can redistribute it and/or
  38. # modify it under the terms of the GNU General Public License as
  39. # published by the Free Software Foundation; either version 2 of
  40. # the License, or (at your option) any later version.
  41. #
  42. # As a special exception to the GNU General Public License,
  43. # if you distribute this file as part of a program or library that
  44. # is built using GNU Libtool, you may include this file under the
  45. # same distribution terms that you use for the rest of that program.
  46. #
  47. # GNU Libtool is distributed in the hope that it will be useful,
  48. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  49. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  50. # GNU General Public License for more details.
  51. #
  52. # You should have received a copy of the GNU General Public License
  53. # along with GNU Libtool; see the file COPYING. If not, a copy
  54. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  55. # obtained by writing to the Free Software Foundation, Inc.,
  56. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  57. ])
  58. # serial 57 LT_INIT
  59. # LT_PREREQ(VERSION)
  60. # ------------------
  61. # Complain and exit if this libtool version is less that VERSION.
  62. m4_defun([LT_PREREQ],
  63. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  64. [m4_default([$3],
  65. [m4_fatal([Libtool version $1 or higher is required],
  66. 63)])],
  67. [$2])])
  68. # _LT_CHECK_BUILDDIR
  69. # ------------------
  70. # Complain if the absolute build directory name contains unusual characters
  71. m4_defun([_LT_CHECK_BUILDDIR],
  72. [case `pwd` in
  73. *\ * | *\ *)
  74. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  75. esac
  76. ])
  77. # LT_INIT([OPTIONS])
  78. # ------------------
  79. AC_DEFUN([LT_INIT],
  80. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  81. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  82. AC_BEFORE([$0], [LT_LANG])dnl
  83. AC_BEFORE([$0], [LT_OUTPUT])dnl
  84. AC_BEFORE([$0], [LTDL_INIT])dnl
  85. m4_require([_LT_CHECK_BUILDDIR])dnl
  86. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  87. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  88. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  89. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  90. dnl unless we require an AC_DEFUNed macro:
  91. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  92. AC_REQUIRE([LTSUGAR_VERSION])dnl
  93. AC_REQUIRE([LTVERSION_VERSION])dnl
  94. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  95. m4_require([_LT_PROG_LTMAIN])dnl
  96. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  97. dnl Parse OPTIONS
  98. _LT_SET_OPTIONS([$0], [$1])
  99. # This can be used to rebuild libtool when needed
  100. LIBTOOL_DEPS="$ltmain"
  101. # Always use our own libtool.
  102. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  103. AC_SUBST(LIBTOOL)dnl
  104. _LT_SETUP
  105. # Only expand once:
  106. m4_define([LT_INIT])
  107. ])# LT_INIT
  108. # Old names:
  109. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  110. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  111. dnl aclocal-1.4 backwards compatibility:
  112. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  113. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  114. # _LT_CC_BASENAME(CC)
  115. # -------------------
  116. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  117. m4_defun([_LT_CC_BASENAME],
  118. [for cc_temp in $1""; do
  119. case $cc_temp in
  120. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  121. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  122. \-*) ;;
  123. *) break;;
  124. esac
  125. done
  126. cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  127. ])
  128. # _LT_FILEUTILS_DEFAULTS
  129. # ----------------------
  130. # It is okay to use these file commands and assume they have been set
  131. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  132. m4_defun([_LT_FILEUTILS_DEFAULTS],
  133. [: ${CP="cp -f"}
  134. : ${MV="mv -f"}
  135. : ${RM="rm -f"}
  136. ])# _LT_FILEUTILS_DEFAULTS
  137. # _LT_SETUP
  138. # ---------
  139. m4_defun([_LT_SETUP],
  140. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  141. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  142. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  143. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  144. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  145. dnl
  146. _LT_DECL([], [host_alias], [0], [The host system])dnl
  147. _LT_DECL([], [host], [0])dnl
  148. _LT_DECL([], [host_os], [0])dnl
  149. dnl
  150. _LT_DECL([], [build_alias], [0], [The build system])dnl
  151. _LT_DECL([], [build], [0])dnl
  152. _LT_DECL([], [build_os], [0])dnl
  153. dnl
  154. AC_REQUIRE([AC_PROG_CC])dnl
  155. AC_REQUIRE([LT_PATH_LD])dnl
  156. AC_REQUIRE([LT_PATH_NM])dnl
  157. dnl
  158. AC_REQUIRE([AC_PROG_LN_S])dnl
  159. test -z "$LN_S" && LN_S="ln -s"
  160. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  161. dnl
  162. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  163. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  164. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  165. dnl
  166. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  167. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  168. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  169. m4_require([_LT_CMD_RELOAD])dnl
  170. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  171. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  172. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  173. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  174. m4_require([_LT_WITH_SYSROOT])dnl
  175. _LT_CONFIG_LIBTOOL_INIT([
  176. # See if we are running on zsh, and set the options which allow our
  177. # commands through without removal of \ escapes INIT.
  178. if test -n "\${ZSH_VERSION+set}" ; then
  179. setopt NO_GLOB_SUBST
  180. fi
  181. ])
  182. if test -n "${ZSH_VERSION+set}" ; then
  183. setopt NO_GLOB_SUBST
  184. fi
  185. _LT_CHECK_OBJDIR
  186. m4_require([_LT_TAG_COMPILER])dnl
  187. case $host_os in
  188. aix3*)
  189. # AIX sometimes has problems with the GCC collect2 program. For some
  190. # reason, if we set the COLLECT_NAMES environment variable, the problems
  191. # vanish in a puff of smoke.
  192. if test "X${COLLECT_NAMES+set}" != Xset; then
  193. COLLECT_NAMES=
  194. export COLLECT_NAMES
  195. fi
  196. ;;
  197. esac
  198. # Global variables:
  199. ofile=libtool
  200. can_build_shared=yes
  201. # All known linkers require a `.a' archive for static linking (except MSVC,
  202. # which needs '.lib').
  203. libext=a
  204. with_gnu_ld="$lt_cv_prog_gnu_ld"
  205. old_CC="$CC"
  206. old_CFLAGS="$CFLAGS"
  207. # Set sane defaults for various variables
  208. test -z "$CC" && CC=cc
  209. test -z "$LTCC" && LTCC=$CC
  210. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  211. test -z "$LD" && LD=ld
  212. test -z "$ac_objext" && ac_objext=o
  213. _LT_CC_BASENAME([$compiler])
  214. # Only perform the check for file, if the check method requires it
  215. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  216. case $deplibs_check_method in
  217. file_magic*)
  218. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  219. _LT_PATH_MAGIC
  220. fi
  221. ;;
  222. esac
  223. # Use C for the default configuration in the libtool script
  224. LT_SUPPORTED_TAG([CC])
  225. _LT_LANG_C_CONFIG
  226. _LT_LANG_DEFAULT_CONFIG
  227. _LT_CONFIG_COMMANDS
  228. ])# _LT_SETUP
  229. # _LT_PREPARE_SED_QUOTE_VARS
  230. # --------------------------
  231. # Define a few sed substitution that help us do robust quoting.
  232. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  233. [# Backslashify metacharacters that are still active within
  234. # double-quoted strings.
  235. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  236. # Same as above, but do not quote variable references.
  237. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  238. # Sed substitution to delay expansion of an escaped shell variable in a
  239. # double_quote_subst'ed string.
  240. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  241. # Sed substitution to delay expansion of an escaped single quote.
  242. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  243. # Sed substitution to avoid accidental globbing in evaled expressions
  244. no_glob_subst='s/\*/\\\*/g'
  245. ])
  246. # _LT_PROG_LTMAIN
  247. # ---------------
  248. # Note that this code is called both from `configure', and `config.status'
  249. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  250. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  251. # so we pass a copy along to make sure it has a sensible value anyway.
  252. m4_defun([_LT_PROG_LTMAIN],
  253. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  254. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  255. ltmain="$ac_aux_dir/ltmain.sh"
  256. ])# _LT_PROG_LTMAIN
  257. # So that we can recreate a full libtool script including additional
  258. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  259. # in macros and then make a single call at the end using the `libtool'
  260. # label.
  261. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  262. # ----------------------------------------
  263. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  264. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  265. [m4_ifval([$1],
  266. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  267. [$1
  268. ])])])
  269. # Initialize.
  270. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  271. # _LT_CONFIG_LIBTOOL([COMMANDS])
  272. # ------------------------------
  273. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  274. m4_define([_LT_CONFIG_LIBTOOL],
  275. [m4_ifval([$1],
  276. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  277. [$1
  278. ])])])
  279. # Initialize.
  280. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  281. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  282. # -----------------------------------------------------
  283. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  284. [_LT_CONFIG_LIBTOOL([$1])
  285. _LT_CONFIG_LIBTOOL_INIT([$2])
  286. ])
  287. # _LT_FORMAT_COMMENT([COMMENT])
  288. # -----------------------------
  289. # Add leading comment marks to the start of each line, and a trailing
  290. # full-stop to the whole comment if one is not present already.
  291. m4_define([_LT_FORMAT_COMMENT],
  292. [m4_ifval([$1], [
  293. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  294. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  295. )])
  296. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  297. # -------------------------------------------------------------------
  298. # CONFIGNAME is the name given to the value in the libtool script.
  299. # VARNAME is the (base) name used in the configure script.
  300. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  301. # VARNAME. Any other value will be used directly.
  302. m4_define([_LT_DECL],
  303. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  304. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  305. [m4_ifval([$1], [$1], [$2])])
  306. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  307. m4_ifval([$4],
  308. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  309. lt_dict_add_subkey([lt_decl_dict], [$2],
  310. [tagged?], [m4_ifval([$5], [yes], [no])])])
  311. ])
  312. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  313. # --------------------------------------------------------
  314. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  315. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  316. # ------------------------------------------------
  317. m4_define([lt_decl_tag_varnames],
  318. [_lt_decl_filter([tagged?], [yes], $@)])
  319. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  320. # ---------------------------------------------------------
  321. m4_define([_lt_decl_filter],
  322. [m4_case([$#],
  323. [0], [m4_fatal([$0: too few arguments: $#])],
  324. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  325. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  326. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  327. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  328. ])
  329. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  330. # --------------------------------------------------
  331. m4_define([lt_decl_quote_varnames],
  332. [_lt_decl_filter([value], [1], $@)])
  333. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  334. # ---------------------------------------------------
  335. m4_define([lt_decl_dquote_varnames],
  336. [_lt_decl_filter([value], [2], $@)])
  337. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  338. # ---------------------------------------------------
  339. m4_define([lt_decl_varnames_tagged],
  340. [m4_assert([$# <= 2])dnl
  341. _$0(m4_quote(m4_default([$1], [[, ]])),
  342. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  343. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  344. m4_define([_lt_decl_varnames_tagged],
  345. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  346. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  347. # ------------------------------------------------
  348. m4_define([lt_decl_all_varnames],
  349. [_$0(m4_quote(m4_default([$1], [[, ]])),
  350. m4_if([$2], [],
  351. m4_quote(lt_decl_varnames),
  352. m4_quote(m4_shift($@))))[]dnl
  353. ])
  354. m4_define([_lt_decl_all_varnames],
  355. [lt_join($@, lt_decl_varnames_tagged([$1],
  356. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  357. ])
  358. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  359. # ------------------------------------
  360. # Quote a variable value, and forward it to `config.status' so that its
  361. # declaration there will have the same value as in `configure'. VARNAME
  362. # must have a single quote delimited value for this to work.
  363. m4_define([_LT_CONFIG_STATUS_DECLARE],
  364. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  365. # _LT_CONFIG_STATUS_DECLARATIONS
  366. # ------------------------------
  367. # We delimit libtool config variables with single quotes, so when
  368. # we write them to config.status, we have to be sure to quote all
  369. # embedded single quotes properly. In configure, this macro expands
  370. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  371. #
  372. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  373. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  374. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  375. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  376. # _LT_LIBTOOL_TAGS
  377. # ----------------
  378. # Output comment and list of tags supported by the script
  379. m4_defun([_LT_LIBTOOL_TAGS],
  380. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  381. available_tags="_LT_TAGS"dnl
  382. ])
  383. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  384. # -----------------------------------
  385. # Extract the dictionary values for VARNAME (optionally with TAG) and
  386. # expand to a commented shell variable setting:
  387. #
  388. # # Some comment about what VAR is for.
  389. # visible_name=$lt_internal_name
  390. m4_define([_LT_LIBTOOL_DECLARE],
  391. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  392. [description])))[]dnl
  393. m4_pushdef([_libtool_name],
  394. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  395. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  396. [0], [_libtool_name=[$]$1],
  397. [1], [_libtool_name=$lt_[]$1],
  398. [2], [_libtool_name=$lt_[]$1],
  399. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  400. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  401. ])
  402. # _LT_LIBTOOL_CONFIG_VARS
  403. # -----------------------
  404. # Produce commented declarations of non-tagged libtool config variables
  405. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  406. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  407. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  408. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  409. [m4_foreach([_lt_var],
  410. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  411. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  412. # _LT_LIBTOOL_TAG_VARS(TAG)
  413. # -------------------------
  414. m4_define([_LT_LIBTOOL_TAG_VARS],
  415. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  416. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  417. # _LT_TAGVAR(VARNAME, [TAGNAME])
  418. # ------------------------------
  419. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  420. # _LT_CONFIG_COMMANDS
  421. # -------------------
  422. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  423. # variables for single and double quote escaping we saved from calls
  424. # to _LT_DECL, we can put quote escaped variables declarations
  425. # into `config.status', and then the shell code to quote escape them in
  426. # for loops in `config.status'. Finally, any additional code accumulated
  427. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  428. m4_defun([_LT_CONFIG_COMMANDS],
  429. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  430. dnl If the libtool generation code has been placed in $CONFIG_LT,
  431. dnl instead of duplicating it all over again into config.status,
  432. dnl then we will have config.status run $CONFIG_LT later, so it
  433. dnl needs to know what name is stored there:
  434. [AC_CONFIG_COMMANDS([libtool],
  435. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  436. dnl If the libtool generation code is destined for config.status,
  437. dnl expand the accumulated commands and init code now:
  438. [AC_CONFIG_COMMANDS([libtool],
  439. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  440. ])#_LT_CONFIG_COMMANDS
  441. # Initialize.
  442. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  443. [
  444. # The HP-UX ksh and POSIX shell print the target directory to stdout
  445. # if CDPATH is set.
  446. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  447. sed_quote_subst='$sed_quote_subst'
  448. double_quote_subst='$double_quote_subst'
  449. delay_variable_subst='$delay_variable_subst'
  450. _LT_CONFIG_STATUS_DECLARATIONS
  451. LTCC='$LTCC'
  452. LTCFLAGS='$LTCFLAGS'
  453. compiler='$compiler_DEFAULT'
  454. # A function that is used when there is no print builtin or printf.
  455. func_fallback_echo ()
  456. {
  457. eval 'cat <<_LTECHO_EOF
  458. \$[]1
  459. _LTECHO_EOF'
  460. }
  461. # Quote evaled strings.
  462. for var in lt_decl_all_varnames([[ \
  463. ]], lt_decl_quote_varnames); do
  464. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  465. *[[\\\\\\\`\\"\\\$]]*)
  466. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  467. ;;
  468. *)
  469. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  470. ;;
  471. esac
  472. done
  473. # Double-quote double-evaled strings.
  474. for var in lt_decl_all_varnames([[ \
  475. ]], lt_decl_dquote_varnames); do
  476. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  477. *[[\\\\\\\`\\"\\\$]]*)
  478. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  479. ;;
  480. *)
  481. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  482. ;;
  483. esac
  484. done
  485. _LT_OUTPUT_LIBTOOL_INIT
  486. ])
  487. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  488. # ------------------------------------
  489. # Generate a child script FILE with all initialization necessary to
  490. # reuse the environment learned by the parent script, and make the
  491. # file executable. If COMMENT is supplied, it is inserted after the
  492. # `#!' sequence but before initialization text begins. After this
  493. # macro, additional text can be appended to FILE to form the body of
  494. # the child script. The macro ends with non-zero status if the
  495. # file could not be fully written (such as if the disk is full).
  496. m4_ifdef([AS_INIT_GENERATED],
  497. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  498. [m4_defun([_LT_GENERATED_FILE_INIT],
  499. [m4_require([AS_PREPARE])]dnl
  500. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  501. [lt_write_fail=0
  502. cat >$1 <<_ASEOF || lt_write_fail=1
  503. #! $SHELL
  504. # Generated by $as_me.
  505. $2
  506. SHELL=\${CONFIG_SHELL-$SHELL}
  507. export SHELL
  508. _ASEOF
  509. cat >>$1 <<\_ASEOF || lt_write_fail=1
  510. AS_SHELL_SANITIZE
  511. _AS_PREPARE
  512. exec AS_MESSAGE_FD>&1
  513. _ASEOF
  514. test $lt_write_fail = 0 && chmod +x $1[]dnl
  515. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  516. # LT_OUTPUT
  517. # ---------
  518. # This macro allows early generation of the libtool script (before
  519. # AC_OUTPUT is called), incase it is used in configure for compilation
  520. # tests.
  521. AC_DEFUN([LT_OUTPUT],
  522. [: ${CONFIG_LT=./config.lt}
  523. AC_MSG_NOTICE([creating $CONFIG_LT])
  524. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  525. [# Run this file to recreate a libtool stub with the current configuration.])
  526. cat >>"$CONFIG_LT" <<\_LTEOF
  527. lt_cl_silent=false
  528. exec AS_MESSAGE_LOG_FD>>config.log
  529. {
  530. echo
  531. AS_BOX([Running $as_me.])
  532. } >&AS_MESSAGE_LOG_FD
  533. lt_cl_help="\
  534. \`$as_me' creates a local libtool stub from the current configuration,
  535. for use in further configure time tests before the real libtool is
  536. generated.
  537. Usage: $[0] [[OPTIONS]]
  538. -h, --help print this help, then exit
  539. -V, --version print version number, then exit
  540. -q, --quiet do not print progress messages
  541. -d, --debug don't remove temporary files
  542. Report bugs to <bug-libtool@gnu.org>."
  543. lt_cl_version="\
  544. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  545. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  546. configured by $[0], generated by m4_PACKAGE_STRING.
  547. Copyright (C) 2011 Free Software Foundation, Inc.
  548. This config.lt script is free software; the Free Software Foundation
  549. gives unlimited permision to copy, distribute and modify it."
  550. while test $[#] != 0
  551. do
  552. case $[1] in
  553. --version | --v* | -V )
  554. echo "$lt_cl_version"; exit 0 ;;
  555. --help | --h* | -h )
  556. echo "$lt_cl_help"; exit 0 ;;
  557. --debug | --d* | -d )
  558. debug=: ;;
  559. --quiet | --q* | --silent | --s* | -q )
  560. lt_cl_silent=: ;;
  561. -*) AC_MSG_ERROR([unrecognized option: $[1]
  562. Try \`$[0] --help' for more information.]) ;;
  563. *) AC_MSG_ERROR([unrecognized argument: $[1]
  564. Try \`$[0] --help' for more information.]) ;;
  565. esac
  566. shift
  567. done
  568. if $lt_cl_silent; then
  569. exec AS_MESSAGE_FD>/dev/null
  570. fi
  571. _LTEOF
  572. cat >>"$CONFIG_LT" <<_LTEOF
  573. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  574. _LTEOF
  575. cat >>"$CONFIG_LT" <<\_LTEOF
  576. AC_MSG_NOTICE([creating $ofile])
  577. _LT_OUTPUT_LIBTOOL_COMMANDS
  578. AS_EXIT(0)
  579. _LTEOF
  580. chmod +x "$CONFIG_LT"
  581. # configure is writing to config.log, but config.lt does its own redirection,
  582. # appending to config.log, which fails on DOS, as config.log is still kept
  583. # open by configure. Here we exec the FD to /dev/null, effectively closing
  584. # config.log, so it can be properly (re)opened and appended to by config.lt.
  585. lt_cl_success=:
  586. test "$silent" = yes &&
  587. lt_config_lt_args="$lt_config_lt_args --quiet"
  588. exec AS_MESSAGE_LOG_FD>/dev/null
  589. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  590. exec AS_MESSAGE_LOG_FD>>config.log
  591. $lt_cl_success || AS_EXIT(1)
  592. ])# LT_OUTPUT
  593. # _LT_CONFIG(TAG)
  594. # ---------------
  595. # If TAG is the built-in tag, create an initial libtool script with a
  596. # default configuration from the untagged config vars. Otherwise add code
  597. # to config.status for appending the configuration named by TAG from the
  598. # matching tagged config vars.
  599. m4_defun([_LT_CONFIG],
  600. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  601. _LT_CONFIG_SAVE_COMMANDS([
  602. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  603. m4_if(_LT_TAG, [C], [
  604. # See if we are running on zsh, and set the options which allow our
  605. # commands through without removal of \ escapes.
  606. if test -n "${ZSH_VERSION+set}" ; then
  607. setopt NO_GLOB_SUBST
  608. fi
  609. cfgfile="${ofile}T"
  610. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  611. $RM "$cfgfile"
  612. cat <<_LT_EOF >> "$cfgfile"
  613. #! $SHELL
  614. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  615. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  616. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  617. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  618. #
  619. _LT_COPYING
  620. _LT_LIBTOOL_TAGS
  621. # ### BEGIN LIBTOOL CONFIG
  622. _LT_LIBTOOL_CONFIG_VARS
  623. _LT_LIBTOOL_TAG_VARS
  624. # ### END LIBTOOL CONFIG
  625. _LT_EOF
  626. case $host_os in
  627. aix3*)
  628. cat <<\_LT_EOF >> "$cfgfile"
  629. # AIX sometimes has problems with the GCC collect2 program. For some
  630. # reason, if we set the COLLECT_NAMES environment variable, the problems
  631. # vanish in a puff of smoke.
  632. if test "X${COLLECT_NAMES+set}" != Xset; then
  633. COLLECT_NAMES=
  634. export COLLECT_NAMES
  635. fi
  636. _LT_EOF
  637. ;;
  638. esac
  639. _LT_PROG_LTMAIN
  640. # We use sed instead of cat because bash on DJGPP gets confused if
  641. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  642. # text mode, it properly converts lines to CR/LF. This bash problem
  643. # is reportedly fixed, but why not run on old versions too?
  644. sed '$q' "$ltmain" >> "$cfgfile" \
  645. || (rm -f "$cfgfile"; exit 1)
  646. _LT_PROG_REPLACE_SHELLFNS
  647. mv -f "$cfgfile" "$ofile" ||
  648. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  649. chmod +x "$ofile"
  650. ],
  651. [cat <<_LT_EOF >> "$ofile"
  652. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  653. dnl in a comment (ie after a #).
  654. # ### BEGIN LIBTOOL TAG CONFIG: $1
  655. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  656. # ### END LIBTOOL TAG CONFIG: $1
  657. _LT_EOF
  658. ])dnl /m4_if
  659. ],
  660. [m4_if([$1], [], [
  661. PACKAGE='$PACKAGE'
  662. VERSION='$VERSION'
  663. TIMESTAMP='$TIMESTAMP'
  664. RM='$RM'
  665. ofile='$ofile'], [])
  666. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  667. ])# _LT_CONFIG
  668. # LT_SUPPORTED_TAG(TAG)
  669. # ---------------------
  670. # Trace this macro to discover what tags are supported by the libtool
  671. # --tag option, using:
  672. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  673. AC_DEFUN([LT_SUPPORTED_TAG], [])
  674. # C support is built-in for now
  675. m4_define([_LT_LANG_C_enabled], [])
  676. m4_define([_LT_TAGS], [])
  677. # LT_LANG(LANG)
  678. # -------------
  679. # Enable libtool support for the given language if not already enabled.
  680. AC_DEFUN([LT_LANG],
  681. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  682. m4_case([$1],
  683. [C], [_LT_LANG(C)],
  684. [C++], [_LT_LANG(CXX)],
  685. [Go], [_LT_LANG(GO)],
  686. [Java], [_LT_LANG(GCJ)],
  687. [Fortran 77], [_LT_LANG(F77)],
  688. [Fortran], [_LT_LANG(FC)],
  689. [Windows Resource], [_LT_LANG(RC)],
  690. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  691. [_LT_LANG($1)],
  692. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  693. ])# LT_LANG
  694. # _LT_LANG(LANGNAME)
  695. # ------------------
  696. m4_defun([_LT_LANG],
  697. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  698. [LT_SUPPORTED_TAG([$1])dnl
  699. m4_append([_LT_TAGS], [$1 ])dnl
  700. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  701. _LT_LANG_$1_CONFIG($1)])dnl
  702. ])# _LT_LANG
  703. m4_ifndef([AC_PROG_GO], [
  704. # NOTE: This macro has been submitted for inclusion into #
  705. # GNU Autoconf as AC_PROG_GO. When it is available in #
  706. # a released version of Autoconf we should remove this #
  707. # macro and use it instead. #
  708. m4_defun([AC_PROG_GO],
  709. [AC_LANG_PUSH(Go)dnl
  710. AC_ARG_VAR([GOC], [Go compiler command])dnl
  711. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  712. _AC_ARG_VAR_LDFLAGS()dnl
  713. AC_CHECK_TOOL(GOC, gccgo)
  714. if test -z "$GOC"; then
  715. if test -n "$ac_tool_prefix"; then
  716. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  717. fi
  718. fi
  719. if test -z "$GOC"; then
  720. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  721. fi
  722. ])#m4_defun
  723. ])#m4_ifndef
  724. # _LT_LANG_DEFAULT_CONFIG
  725. # -----------------------
  726. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  727. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  728. [LT_LANG(CXX)],
  729. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  730. AC_PROVIDE_IFELSE([AC_PROG_F77],
  731. [LT_LANG(F77)],
  732. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  733. AC_PROVIDE_IFELSE([AC_PROG_FC],
  734. [LT_LANG(FC)],
  735. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  736. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  737. dnl pulling things in needlessly.
  738. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  739. [LT_LANG(GCJ)],
  740. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  741. [LT_LANG(GCJ)],
  742. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  743. [LT_LANG(GCJ)],
  744. [m4_ifdef([AC_PROG_GCJ],
  745. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  746. m4_ifdef([A][M_PROG_GCJ],
  747. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  748. m4_ifdef([LT_PROG_GCJ],
  749. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  750. AC_PROVIDE_IFELSE([AC_PROG_GO],
  751. [LT_LANG(GO)],
  752. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  753. AC_PROVIDE_IFELSE([LT_PROG_RC],
  754. [LT_LANG(RC)],
  755. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  756. ])# _LT_LANG_DEFAULT_CONFIG
  757. # Obsolete macros:
  758. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  759. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  760. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  761. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  762. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  763. dnl aclocal-1.4 backwards compatibility:
  764. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  765. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  766. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  767. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  768. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  769. # _LT_TAG_COMPILER
  770. # ----------------
  771. m4_defun([_LT_TAG_COMPILER],
  772. [AC_REQUIRE([AC_PROG_CC])dnl
  773. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  774. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  775. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  776. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  777. # If no C compiler was specified, use CC.
  778. LTCC=${LTCC-"$CC"}
  779. # If no C compiler flags were specified, use CFLAGS.
  780. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  781. # Allow CC to be a program name with arguments.
  782. compiler=$CC
  783. ])# _LT_TAG_COMPILER
  784. # _LT_COMPILER_BOILERPLATE
  785. # ------------------------
  786. # Check for compiler boilerplate output or warnings with
  787. # the simple compiler test code.
  788. m4_defun([_LT_COMPILER_BOILERPLATE],
  789. [m4_require([_LT_DECL_SED])dnl
  790. ac_outfile=conftest.$ac_objext
  791. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  792. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  793. _lt_compiler_boilerplate=`cat conftest.err`
  794. $RM conftest*
  795. ])# _LT_COMPILER_BOILERPLATE
  796. # _LT_LINKER_BOILERPLATE
  797. # ----------------------
  798. # Check for linker boilerplate output or warnings with
  799. # the simple link test code.
  800. m4_defun([_LT_LINKER_BOILERPLATE],
  801. [m4_require([_LT_DECL_SED])dnl
  802. ac_outfile=conftest.$ac_objext
  803. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  804. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  805. _lt_linker_boilerplate=`cat conftest.err`
  806. $RM -r conftest*
  807. ])# _LT_LINKER_BOILERPLATE
  808. # _LT_REQUIRED_DARWIN_CHECKS
  809. # -------------------------
  810. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  811. case $host_os in
  812. rhapsody* | darwin*)
  813. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  814. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  815. AC_CHECK_TOOL([LIPO], [lipo], [:])
  816. AC_CHECK_TOOL([OTOOL], [otool], [:])
  817. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  818. _LT_DECL([], [DSYMUTIL], [1],
  819. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  820. _LT_DECL([], [NMEDIT], [1],
  821. [Tool to change global to local symbols on Mac OS X])
  822. _LT_DECL([], [LIPO], [1],
  823. [Tool to manipulate fat objects and archives on Mac OS X])
  824. _LT_DECL([], [OTOOL], [1],
  825. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  826. _LT_DECL([], [OTOOL64], [1],
  827. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  828. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  829. [lt_cv_apple_cc_single_mod=no
  830. if test -z "${LT_MULTI_MODULE}"; then
  831. # By default we will add the -single_module flag. You can override
  832. # by either setting the environment variable LT_MULTI_MODULE
  833. # non-empty at configure time, or by adding -multi_module to the
  834. # link flags.
  835. rm -rf libconftest.dylib*
  836. echo "int foo(void){return 1;}" > conftest.c
  837. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  838. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  839. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  840. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  841. _lt_result=$?
  842. # If there is a non-empty error log, and "single_module"
  843. # appears in it, assume the flag caused a linker warning
  844. if test -s conftest.err && $GREP single_module conftest.err; then
  845. cat conftest.err >&AS_MESSAGE_LOG_FD
  846. # Otherwise, if the output was created with a 0 exit code from
  847. # the compiler, it worked.
  848. elif test -f libconftest.dylib && test $_lt_result -eq 0; then
  849. lt_cv_apple_cc_single_mod=yes
  850. else
  851. cat conftest.err >&AS_MESSAGE_LOG_FD
  852. fi
  853. rm -rf libconftest.dylib*
  854. rm -f conftest.*
  855. fi])
  856. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  857. [lt_cv_ld_exported_symbols_list],
  858. [lt_cv_ld_exported_symbols_list=no
  859. save_LDFLAGS=$LDFLAGS
  860. echo "_main" > conftest.sym
  861. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  862. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  863. [lt_cv_ld_exported_symbols_list=yes],
  864. [lt_cv_ld_exported_symbols_list=no])
  865. LDFLAGS="$save_LDFLAGS"
  866. ])
  867. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  868. [lt_cv_ld_force_load=no
  869. cat > conftest.c << _LT_EOF
  870. int forced_loaded() { return 2;}
  871. _LT_EOF
  872. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  873. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  874. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  875. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  876. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  877. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  878. cat > conftest.c << _LT_EOF
  879. int main() { return 0;}
  880. _LT_EOF
  881. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  882. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  883. _lt_result=$?
  884. if test -s conftest.err && $GREP force_load conftest.err; then
  885. cat conftest.err >&AS_MESSAGE_LOG_FD
  886. elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
  887. lt_cv_ld_force_load=yes
  888. else
  889. cat conftest.err >&AS_MESSAGE_LOG_FD
  890. fi
  891. rm -f conftest.err libconftest.a conftest conftest.c
  892. rm -rf conftest.dSYM
  893. ])
  894. case $host_os in
  895. rhapsody* | darwin1.[[012]])
  896. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  897. darwin1.*)
  898. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  899. darwin*) # darwin 5.x on
  900. # if running on 10.5 or later, the deployment target defaults
  901. # to the OS version, if on x86, and 10.4, the deployment
  902. # target defaults to 10.4. Don't you love it?
  903. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  904. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  905. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  906. 10.[[012]]*)
  907. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  908. 10.*)
  909. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  910. esac
  911. ;;
  912. esac
  913. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  914. _lt_dar_single_mod='$single_module'
  915. fi
  916. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  917. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  918. else
  919. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  920. fi
  921. if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  922. _lt_dsymutil='~$DSYMUTIL $lib || :'
  923. else
  924. _lt_dsymutil=
  925. fi
  926. ;;
  927. esac
  928. ])
  929. # _LT_DARWIN_LINKER_FEATURES([TAG])
  930. # ---------------------------------
  931. # Checks for linker and compiler features on darwin
  932. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  933. [
  934. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  935. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  936. _LT_TAGVAR(hardcode_direct, $1)=no
  937. _LT_TAGVAR(hardcode_automatic, $1)=yes
  938. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  939. if test "$lt_cv_ld_force_load" = "yes"; then
  940. _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\"`'
  941. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  942. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  943. else
  944. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  945. fi
  946. _LT_TAGVAR(link_all_deplibs, $1)=yes
  947. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  948. case $cc_basename in
  949. ifort*) _lt_dar_can_shared=yes ;;
  950. *) _lt_dar_can_shared=$GCC ;;
  951. esac
  952. if test "$_lt_dar_can_shared" = "yes"; then
  953. output_verbose_link_cmd=func_echo_all
  954. _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}"
  955. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  956. _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}"
  957. _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}"
  958. m4_if([$1], [CXX],
  959. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  960. _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}"
  961. _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}"
  962. fi
  963. ],[])
  964. else
  965. _LT_TAGVAR(ld_shlibs, $1)=no
  966. fi
  967. ])
  968. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  969. # ----------------------------------
  970. # Links a minimal program and checks the executable
  971. # for the system default hardcoded library path. In most cases,
  972. # this is /usr/lib:/lib, but when the MPI compilers are used
  973. # the location of the communication and MPI libs are included too.
  974. # If we don't find anything, use the default library path according
  975. # to the aix ld manual.
  976. # Store the results from the different compilers for each TAGNAME.
  977. # Allow to override them for all tags through lt_cv_aix_libpath.
  978. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  979. [m4_require([_LT_DECL_SED])dnl
  980. if test "${lt_cv_aix_libpath+set}" = set; then
  981. aix_libpath=$lt_cv_aix_libpath
  982. else
  983. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  984. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  985. lt_aix_libpath_sed='[
  986. /Import File Strings/,/^$/ {
  987. /^0/ {
  988. s/^0 *\([^ ]*\) *$/\1/
  989. p
  990. }
  991. }]'
  992. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  993. # Check for a 64-bit object if we didn't find anything.
  994. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  995. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  996. fi],[])
  997. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  998. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
  999. fi
  1000. ])
  1001. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1002. fi
  1003. ])# _LT_SYS_MODULE_PATH_AIX
  1004. # _LT_SHELL_INIT(ARG)
  1005. # -------------------
  1006. m4_define([_LT_SHELL_INIT],
  1007. [m4_divert_text([M4SH-INIT], [$1
  1008. ])])# _LT_SHELL_INIT
  1009. # _LT_PROG_ECHO_BACKSLASH
  1010. # -----------------------
  1011. # Find how we can fake an echo command that does not interpret backslash.
  1012. # In particular, with Autoconf 2.60 or later we add some code to the start
  1013. # of the generated configure script which will find a shell with a builtin
  1014. # printf (which we can use as an echo command).
  1015. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1016. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1017. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1018. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1019. AC_MSG_CHECKING([how to print strings])
  1020. # Test print first, because it will be a builtin if present.
  1021. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1022. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1023. ECHO='print -r --'
  1024. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1025. ECHO='printf %s\n'
  1026. else
  1027. # Use this function as a fallback that always works.
  1028. func_fallback_echo ()
  1029. {
  1030. eval 'cat <<_LTECHO_EOF
  1031. $[]1
  1032. _LTECHO_EOF'
  1033. }
  1034. ECHO='func_fallback_echo'
  1035. fi
  1036. # func_echo_all arg...
  1037. # Invoke $ECHO with all args, space-separated.
  1038. func_echo_all ()
  1039. {
  1040. $ECHO "$*"
  1041. }
  1042. case "$ECHO" in
  1043. printf*) AC_MSG_RESULT([printf]) ;;
  1044. print*) AC_MSG_RESULT([print -r]) ;;
  1045. *) AC_MSG_RESULT([cat]) ;;
  1046. esac
  1047. m4_ifdef([_AS_DETECT_SUGGESTED],
  1048. [_AS_DETECT_SUGGESTED([
  1049. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1050. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1051. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1052. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1053. PATH=/empty FPATH=/empty; export PATH FPATH
  1054. test "X`printf %s $ECHO`" = "X$ECHO" \
  1055. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1056. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1057. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1058. ])# _LT_PROG_ECHO_BACKSLASH
  1059. # _LT_WITH_SYSROOT
  1060. # ----------------
  1061. AC_DEFUN([_LT_WITH_SYSROOT],
  1062. [AC_MSG_CHECKING([for sysroot])
  1063. AC_ARG_WITH([sysroot],
  1064. [ --with-sysroot[=DIR] Search for dependent libraries within DIR
  1065. (or the compiler's sysroot if not specified).],
  1066. [], [with_sysroot=no])
  1067. dnl lt_sysroot will always be passed unquoted. We quote it here
  1068. dnl in case the user passed a directory name.
  1069. lt_sysroot=
  1070. case ${with_sysroot} in #(
  1071. yes)
  1072. if test "$GCC" = yes; then
  1073. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1074. fi
  1075. ;; #(
  1076. /*)
  1077. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1078. ;; #(
  1079. no|'')
  1080. ;; #(
  1081. *)
  1082. AC_MSG_RESULT([${with_sysroot}])
  1083. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1084. ;;
  1085. esac
  1086. AC_MSG_RESULT([${lt_sysroot:-no}])
  1087. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1088. [dependent libraries, and in which our libraries should be installed.])])
  1089. # _LT_ENABLE_LOCK
  1090. # ---------------
  1091. m4_defun([_LT_ENABLE_LOCK],
  1092. [AC_ARG_ENABLE([libtool-lock],
  1093. [AS_HELP_STRING([--disable-libtool-lock],
  1094. [avoid locking (might break parallel builds)])])
  1095. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1096. # Some flags need to be propagated to the compiler or linker for good
  1097. # libtool support.
  1098. case $host in
  1099. ia64-*-hpux*)
  1100. # Find out which ABI we are using.
  1101. echo 'int i;' > conftest.$ac_ext
  1102. if AC_TRY_EVAL(ac_compile); then
  1103. case `/usr/bin/file conftest.$ac_objext` in
  1104. *ELF-32*)
  1105. HPUX_IA64_MODE="32"
  1106. ;;
  1107. *ELF-64*)
  1108. HPUX_IA64_MODE="64"
  1109. ;;
  1110. esac
  1111. fi
  1112. rm -rf conftest*
  1113. ;;
  1114. *-*-irix6*)
  1115. # Find out which ABI we are using.
  1116. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1117. if AC_TRY_EVAL(ac_compile); then
  1118. if test "$lt_cv_prog_gnu_ld" = yes; then
  1119. case `/usr/bin/file conftest.$ac_objext` in
  1120. *32-bit*)
  1121. LD="${LD-ld} -melf32bsmip"
  1122. ;;
  1123. *N32*)
  1124. LD="${LD-ld} -melf32bmipn32"
  1125. ;;
  1126. *64-bit*)
  1127. LD="${LD-ld} -melf64bmip"
  1128. ;;
  1129. esac
  1130. else
  1131. case `/usr/bin/file conftest.$ac_objext` in
  1132. *32-bit*)
  1133. LD="${LD-ld} -32"
  1134. ;;
  1135. *N32*)
  1136. LD="${LD-ld} -n32"
  1137. ;;
  1138. *64-bit*)
  1139. LD="${LD-ld} -64"
  1140. ;;
  1141. esac
  1142. fi
  1143. fi
  1144. rm -rf conftest*
  1145. ;;
  1146. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1147. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1148. # Find out which ABI we are using.
  1149. echo 'int i;' > conftest.$ac_ext
  1150. if AC_TRY_EVAL(ac_compile); then
  1151. case `/usr/bin/file conftest.o` in
  1152. *32-bit*)
  1153. case $host in
  1154. x86_64-*kfreebsd*-gnu)
  1155. LD="${LD-ld} -m elf_i386_fbsd"
  1156. ;;
  1157. x86_64-*linux*)
  1158. LD="${LD-ld} -m elf_i386"
  1159. ;;
  1160. ppc64-*linux*|powerpc64-*linux*)
  1161. LD="${LD-ld} -m elf32ppclinux"
  1162. ;;
  1163. s390x-*linux*)
  1164. LD="${LD-ld} -m elf_s390"
  1165. ;;
  1166. sparc64-*linux*)
  1167. LD="${LD-ld} -m elf32_sparc"
  1168. ;;
  1169. esac
  1170. ;;
  1171. *64-bit*)
  1172. case $host in
  1173. x86_64-*kfreebsd*-gnu)
  1174. LD="${LD-ld} -m elf_x86_64_fbsd"
  1175. ;;
  1176. x86_64-*linux*)
  1177. LD="${LD-ld} -m elf_x86_64"
  1178. ;;
  1179. ppc*-*linux*|powerpc*-*linux*)
  1180. LD="${LD-ld} -m elf64ppc"
  1181. ;;
  1182. s390*-*linux*|s390*-*tpf*)
  1183. LD="${LD-ld} -m elf64_s390"
  1184. ;;
  1185. sparc*-*linux*)
  1186. LD="${LD-ld} -m elf64_sparc"
  1187. ;;
  1188. esac
  1189. ;;
  1190. esac
  1191. fi
  1192. rm -rf conftest*
  1193. ;;
  1194. *-*-sco3.2v5*)
  1195. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1196. SAVE_CFLAGS="$CFLAGS"
  1197. CFLAGS="$CFLAGS -belf"
  1198. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1199. [AC_LANG_PUSH(C)
  1200. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1201. AC_LANG_POP])
  1202. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1203. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1204. CFLAGS="$SAVE_CFLAGS"
  1205. fi
  1206. ;;
  1207. *-*solaris*)
  1208. # Find out which ABI we are using.
  1209. echo 'int i;' > conftest.$ac_ext
  1210. if AC_TRY_EVAL(ac_compile); then
  1211. case `/usr/bin/file conftest.o` in
  1212. *64-bit*)
  1213. case $lt_cv_prog_gnu_ld in
  1214. yes*)
  1215. case $host in
  1216. i?86-*-solaris*)
  1217. LD="${LD-ld} -m elf_x86_64"
  1218. ;;
  1219. sparc*-*-solaris*)
  1220. LD="${LD-ld} -m elf64_sparc"
  1221. ;;
  1222. esac
  1223. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1224. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1225. LD="${LD-ld}_sol2"
  1226. fi
  1227. ;;
  1228. *)
  1229. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1230. LD="${LD-ld} -64"
  1231. fi
  1232. ;;
  1233. esac
  1234. ;;
  1235. esac
  1236. fi
  1237. rm -rf conftest*
  1238. ;;
  1239. esac
  1240. need_locks="$enable_libtool_lock"
  1241. ])# _LT_ENABLE_LOCK
  1242. # _LT_PROG_AR
  1243. # -----------
  1244. m4_defun([_LT_PROG_AR],
  1245. [AC_CHECK_TOOLS(AR, [ar], false)
  1246. : ${AR=ar}
  1247. : ${AR_FLAGS=cru}
  1248. _LT_DECL([], [AR], [1], [The archiver])
  1249. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1250. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1251. [lt_cv_ar_at_file=no
  1252. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1253. [echo conftest.$ac_objext > conftest.lst
  1254. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1255. AC_TRY_EVAL([lt_ar_try])
  1256. if test "$ac_status" -eq 0; then
  1257. # Ensure the archiver fails upon bogus file names.
  1258. rm -f conftest.$ac_objext libconftest.a
  1259. AC_TRY_EVAL([lt_ar_try])
  1260. if test "$ac_status" -ne 0; then
  1261. lt_cv_ar_at_file=@
  1262. fi
  1263. fi
  1264. rm -f conftest.* libconftest.a
  1265. ])
  1266. ])
  1267. if test "x$lt_cv_ar_at_file" = xno; then
  1268. archiver_list_spec=
  1269. else
  1270. archiver_list_spec=$lt_cv_ar_at_file
  1271. fi
  1272. _LT_DECL([], [archiver_list_spec], [1],
  1273. [How to feed a file listing to the archiver])
  1274. ])# _LT_PROG_AR
  1275. # _LT_CMD_OLD_ARCHIVE
  1276. # -------------------
  1277. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1278. [_LT_PROG_AR
  1279. AC_CHECK_TOOL(STRIP, strip, :)
  1280. test -z "$STRIP" && STRIP=:
  1281. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1282. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1283. test -z "$RANLIB" && RANLIB=:
  1284. _LT_DECL([], [RANLIB], [1],
  1285. [Commands used to install an old-style archive])
  1286. # Determine commands to create old-style static archives.
  1287. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1288. old_postinstall_cmds='chmod 644 $oldlib'
  1289. old_postuninstall_cmds=
  1290. if test -n "$RANLIB"; then
  1291. case $host_os in
  1292. openbsd*)
  1293. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1294. ;;
  1295. *)
  1296. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1297. ;;
  1298. esac
  1299. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1300. fi
  1301. case $host_os in
  1302. darwin*)
  1303. lock_old_archive_extraction=yes ;;
  1304. *)
  1305. lock_old_archive_extraction=no ;;
  1306. esac
  1307. _LT_DECL([], [old_postinstall_cmds], [2])
  1308. _LT_DECL([], [old_postuninstall_cmds], [2])
  1309. _LT_TAGDECL([], [old_archive_cmds], [2],
  1310. [Commands used to build an old-style archive])
  1311. _LT_DECL([], [lock_old_archive_extraction], [0],
  1312. [Whether to use a lock for old archive extraction])
  1313. ])# _LT_CMD_OLD_ARCHIVE
  1314. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1315. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1316. # ----------------------------------------------------------------
  1317. # Check whether the given compiler option works
  1318. AC_DEFUN([_LT_COMPILER_OPTION],
  1319. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1320. m4_require([_LT_DECL_SED])dnl
  1321. AC_CACHE_CHECK([$1], [$2],
  1322. [$2=no
  1323. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1324. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1325. lt_compiler_flag="$3"
  1326. # Insert the option either (1) after the last *FLAGS variable, or
  1327. # (2) before a word containing "conftest.", or (3) at the end.
  1328. # Note that $ac_compile itself does not contain backslashes and begins
  1329. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1330. # The option is referenced via a variable to avoid confusing sed.
  1331. lt_compile=`echo "$ac_compile" | $SED \
  1332. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1333. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1334. -e 's:$: $lt_compiler_flag:'`
  1335. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1336. (eval "$lt_compile" 2>conftest.err)
  1337. ac_status=$?
  1338. cat conftest.err >&AS_MESSAGE_LOG_FD
  1339. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1340. if (exit $ac_status) && test -s "$ac_outfile"; then
  1341. # The compiler can only warn and ignore the option if not recognized
  1342. # So say no if there are warnings other than the usual output.
  1343. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1344. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1345. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1346. $2=yes
  1347. fi
  1348. fi
  1349. $RM conftest*
  1350. ])
  1351. if test x"[$]$2" = xyes; then
  1352. m4_if([$5], , :, [$5])
  1353. else
  1354. m4_if([$6], , :, [$6])
  1355. fi
  1356. ])# _LT_COMPILER_OPTION
  1357. # Old name:
  1358. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1359. dnl aclocal-1.4 backwards compatibility:
  1360. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1361. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1362. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1363. # ----------------------------------------------------
  1364. # Check whether the given linker option works
  1365. AC_DEFUN([_LT_LINKER_OPTION],
  1366. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1367. m4_require([_LT_DECL_SED])dnl
  1368. AC_CACHE_CHECK([$1], [$2],
  1369. [$2=no
  1370. save_LDFLAGS="$LDFLAGS"
  1371. LDFLAGS="$LDFLAGS $3"
  1372. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1373. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1374. # The linker can only warn and ignore the option if not recognized
  1375. # So say no if there are warnings
  1376. if test -s conftest.err; then
  1377. # Append any errors to the config.log.
  1378. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1379. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1380. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1381. if diff conftest.exp conftest.er2 >/dev/null; then
  1382. $2=yes
  1383. fi
  1384. else
  1385. $2=yes
  1386. fi
  1387. fi
  1388. $RM -r conftest*
  1389. LDFLAGS="$save_LDFLAGS"
  1390. ])
  1391. if test x"[$]$2" = xyes; then
  1392. m4_if([$4], , :, [$4])
  1393. else
  1394. m4_if([$5], , :, [$5])
  1395. fi
  1396. ])# _LT_LINKER_OPTION
  1397. # Old name:
  1398. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1399. dnl aclocal-1.4 backwards compatibility:
  1400. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1401. # LT_CMD_MAX_LEN
  1402. #---------------
  1403. AC_DEFUN([LT_CMD_MAX_LEN],
  1404. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1405. # find the maximum length of command line arguments
  1406. AC_MSG_CHECKING([the maximum length of command line arguments])
  1407. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1408. i=0
  1409. teststring="ABCD"
  1410. case $build_os in
  1411. msdosdjgpp*)
  1412. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1413. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1414. # during glob expansion). Even if it were fixed, the result of this
  1415. # check would be larger than it should be.
  1416. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1417. ;;
  1418. gnu*)
  1419. # Under GNU Hurd, this test is not required because there is
  1420. # no limit to the length of command line arguments.
  1421. # Libtool will interpret -1 as no limit whatsoever
  1422. lt_cv_sys_max_cmd_len=-1;
  1423. ;;
  1424. cygwin* | mingw* | cegcc*)
  1425. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1426. # about 5 minutes as the teststring grows exponentially.
  1427. # Worse, since 9x/ME are not pre-emptively multitasking,
  1428. # you end up with a "frozen" computer, even though with patience
  1429. # the test eventually succeeds (with a max line length of 256k).
  1430. # Instead, let's just punt: use the minimum linelength reported by
  1431. # all of the supported platforms: 8192 (on NT/2K/XP).
  1432. lt_cv_sys_max_cmd_len=8192;
  1433. ;;
  1434. mint*)
  1435. # On MiNT this can take a long time and run out of memory.
  1436. lt_cv_sys_max_cmd_len=8192;
  1437. ;;
  1438. amigaos*)
  1439. # On AmigaOS with pdksh, this test takes hours, literally.
  1440. # So we just punt and use a minimum line length of 8192.
  1441. lt_cv_sys_max_cmd_len=8192;
  1442. ;;
  1443. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  1444. # This has been around since 386BSD, at least. Likely further.
  1445. if test -x /sbin/sysctl; then
  1446. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1447. elif test -x /usr/sbin/sysctl; then
  1448. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1449. else
  1450. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1451. fi
  1452. # And add a safety zone
  1453. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1454. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1455. ;;
  1456. interix*)
  1457. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1458. lt_cv_sys_max_cmd_len=196608
  1459. ;;
  1460. os2*)
  1461. # The test takes a long time on OS/2.
  1462. lt_cv_sys_max_cmd_len=8192
  1463. ;;
  1464. osf*)
  1465. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1466. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1467. # nice to cause kernel panics so lets avoid the loop below.
  1468. # First set a reasonable default.
  1469. lt_cv_sys_max_cmd_len=16384
  1470. #
  1471. if test -x /sbin/sysconfig; then
  1472. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1473. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1474. esac
  1475. fi
  1476. ;;
  1477. sco3.2v5*)
  1478. lt_cv_sys_max_cmd_len=102400
  1479. ;;
  1480. sysv5* | sco5v6* | sysv4.2uw2*)
  1481. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1482. if test -n "$kargmax"; then
  1483. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1484. else
  1485. lt_cv_sys_max_cmd_len=32768
  1486. fi
  1487. ;;
  1488. *)
  1489. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1490. if test -n "$lt_cv_sys_max_cmd_len"; then
  1491. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1492. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1493. else
  1494. # Make teststring a little bigger before we do anything with it.
  1495. # a 1K string should be a reasonable start.
  1496. for i in 1 2 3 4 5 6 7 8 ; do
  1497. teststring=$teststring$teststring
  1498. done
  1499. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1500. # If test is not a shell built-in, we'll probably end up computing a
  1501. # maximum length that is only half of the actual maximum length, but
  1502. # we can't tell.
  1503. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
  1504. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1505. test $i != 17 # 1/2 MB should be enough
  1506. do
  1507. i=`expr $i + 1`
  1508. teststring=$teststring$teststring
  1509. done
  1510. # Only check the string length outside the loop.
  1511. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1512. teststring=
  1513. # Add a significant safety factor because C++ compilers can tack on
  1514. # massive amounts of additional arguments before passing them to the
  1515. # linker. It appears as though 1/2 is a usable value.
  1516. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1517. fi
  1518. ;;
  1519. esac
  1520. ])
  1521. if test -n $lt_cv_sys_max_cmd_len ; then
  1522. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1523. else
  1524. AC_MSG_RESULT(none)
  1525. fi
  1526. max_cmd_len=$lt_cv_sys_max_cmd_len
  1527. _LT_DECL([], [max_cmd_len], [0],
  1528. [What is the maximum length of a command?])
  1529. ])# LT_CMD_MAX_LEN
  1530. # Old name:
  1531. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1532. dnl aclocal-1.4 backwards compatibility:
  1533. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1534. # _LT_HEADER_DLFCN
  1535. # ----------------
  1536. m4_defun([_LT_HEADER_DLFCN],
  1537. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1538. ])# _LT_HEADER_DLFCN
  1539. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1540. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1541. # ----------------------------------------------------------------
  1542. m4_defun([_LT_TRY_DLOPEN_SELF],
  1543. [m4_require([_LT_HEADER_DLFCN])dnl
  1544. if test "$cross_compiling" = yes; then :
  1545. [$4]
  1546. else
  1547. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1548. lt_status=$lt_dlunknown
  1549. cat > conftest.$ac_ext <<_LT_EOF
  1550. [#line $LINENO "configure"
  1551. #include "confdefs.h"
  1552. #if HAVE_DLFCN_H
  1553. #include <dlfcn.h>
  1554. #endif
  1555. #include <stdio.h>
  1556. #ifdef RTLD_GLOBAL
  1557. # define LT_DLGLOBAL RTLD_GLOBAL
  1558. #else
  1559. # ifdef DL_GLOBAL
  1560. # define LT_DLGLOBAL DL_GLOBAL
  1561. # else
  1562. # define LT_DLGLOBAL 0
  1563. # endif
  1564. #endif
  1565. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1566. find out it does not work in some platform. */
  1567. #ifndef LT_DLLAZY_OR_NOW
  1568. # ifdef RTLD_LAZY
  1569. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1570. # else
  1571. # ifdef DL_LAZY
  1572. # define LT_DLLAZY_OR_NOW DL_LAZY
  1573. # else
  1574. # ifdef RTLD_NOW
  1575. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1576. # else
  1577. # ifdef DL_NOW
  1578. # define LT_DLLAZY_OR_NOW DL_NOW
  1579. # else
  1580. # define LT_DLLAZY_OR_NOW 0
  1581. # endif
  1582. # endif
  1583. # endif
  1584. # endif
  1585. #endif
  1586. /* When -fvisbility=hidden is used, assume the code has been annotated
  1587. correspondingly for the symbols needed. */
  1588. #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1589. int fnord () __attribute__((visibility("default")));
  1590. #endif
  1591. int fnord () { return 42; }
  1592. int main ()
  1593. {
  1594. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1595. int status = $lt_dlunknown;
  1596. if (self)
  1597. {
  1598. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1599. else
  1600. {
  1601. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1602. else puts (dlerror ());
  1603. }
  1604. /* dlclose (self); */
  1605. }
  1606. else
  1607. puts (dlerror ());
  1608. return status;
  1609. }]
  1610. _LT_EOF
  1611. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  1612. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1613. lt_status=$?
  1614. case x$lt_status in
  1615. x$lt_dlno_uscore) $1 ;;
  1616. x$lt_dlneed_uscore) $2 ;;
  1617. x$lt_dlunknown|x*) $3 ;;
  1618. esac
  1619. else :
  1620. # compilation failed
  1621. $3
  1622. fi
  1623. fi
  1624. rm -fr conftest*
  1625. ])# _LT_TRY_DLOPEN_SELF
  1626. # LT_SYS_DLOPEN_SELF
  1627. # ------------------
  1628. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1629. [m4_require([_LT_HEADER_DLFCN])dnl
  1630. if test "x$enable_dlopen" != xyes; then
  1631. enable_dlopen=unknown
  1632. enable_dlopen_self=unknown
  1633. enable_dlopen_self_static=unknown
  1634. else
  1635. lt_cv_dlopen=no
  1636. lt_cv_dlopen_libs=
  1637. case $host_os in
  1638. beos*)
  1639. lt_cv_dlopen="load_add_on"
  1640. lt_cv_dlopen_libs=
  1641. lt_cv_dlopen_self=yes
  1642. ;;
  1643. mingw* | pw32* | cegcc*)
  1644. lt_cv_dlopen="LoadLibrary"
  1645. lt_cv_dlopen_libs=
  1646. ;;
  1647. cygwin*)
  1648. lt_cv_dlopen="dlopen"
  1649. lt_cv_dlopen_libs=
  1650. ;;
  1651. darwin*)
  1652. # if libdl is installed we need to link against it
  1653. AC_CHECK_LIB([dl], [dlopen],
  1654. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  1655. lt_cv_dlopen="dyld"
  1656. lt_cv_dlopen_libs=
  1657. lt_cv_dlopen_self=yes
  1658. ])
  1659. ;;
  1660. *)
  1661. AC_CHECK_FUNC([shl_load],
  1662. [lt_cv_dlopen="shl_load"],
  1663. [AC_CHECK_LIB([dld], [shl_load],
  1664. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  1665. [AC_CHECK_FUNC([dlopen],
  1666. [lt_cv_dlopen="dlopen"],
  1667. [AC_CHECK_LIB([dl], [dlopen],
  1668. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  1669. [AC_CHECK_LIB([svld], [dlopen],
  1670. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  1671. [AC_CHECK_LIB([dld], [dld_link],
  1672. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  1673. ])
  1674. ])
  1675. ])
  1676. ])
  1677. ])
  1678. ;;
  1679. esac
  1680. if test "x$lt_cv_dlopen" != xno; then
  1681. enable_dlopen=yes
  1682. else
  1683. enable_dlopen=no
  1684. fi
  1685. case $lt_cv_dlopen in
  1686. dlopen)
  1687. save_CPPFLAGS="$CPPFLAGS"
  1688. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1689. save_LDFLAGS="$LDFLAGS"
  1690. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1691. save_LIBS="$LIBS"
  1692. LIBS="$lt_cv_dlopen_libs $LIBS"
  1693. AC_CACHE_CHECK([whether a program can dlopen itself],
  1694. lt_cv_dlopen_self, [dnl
  1695. _LT_TRY_DLOPEN_SELF(
  1696. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1697. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1698. ])
  1699. if test "x$lt_cv_dlopen_self" = xyes; then
  1700. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1701. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1702. lt_cv_dlopen_self_static, [dnl
  1703. _LT_TRY_DLOPEN_SELF(
  1704. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1705. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1706. ])
  1707. fi
  1708. CPPFLAGS="$save_CPPFLAGS"
  1709. LDFLAGS="$save_LDFLAGS"
  1710. LIBS="$save_LIBS"
  1711. ;;
  1712. esac
  1713. case $lt_cv_dlopen_self in
  1714. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1715. *) enable_dlopen_self=unknown ;;
  1716. esac
  1717. case $lt_cv_dlopen_self_static in
  1718. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1719. *) enable_dlopen_self_static=unknown ;;
  1720. esac
  1721. fi
  1722. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1723. [Whether dlopen is supported])
  1724. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1725. [Whether dlopen of programs is supported])
  1726. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1727. [Whether dlopen of statically linked programs is supported])
  1728. ])# LT_SYS_DLOPEN_SELF
  1729. # Old name:
  1730. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1731. dnl aclocal-1.4 backwards compatibility:
  1732. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1733. # _LT_COMPILER_C_O([TAGNAME])
  1734. # ---------------------------
  1735. # Check to see if options -c and -o are simultaneously supported by compiler.
  1736. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1737. m4_defun([_LT_COMPILER_C_O],
  1738. [m4_require([_LT_DECL_SED])dnl
  1739. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1740. m4_require([_LT_TAG_COMPILER])dnl
  1741. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1742. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1743. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1744. $RM -r conftest 2>/dev/null
  1745. mkdir conftest
  1746. cd conftest
  1747. mkdir out
  1748. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1749. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1750. # Insert the option either (1) after the last *FLAGS variable, or
  1751. # (2) before a word containing "conftest.", or (3) at the end.
  1752. # Note that $ac_compile itself does not contain backslashes and begins
  1753. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1754. lt_compile=`echo "$ac_compile" | $SED \
  1755. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1756. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1757. -e 's:$: $lt_compiler_flag:'`
  1758. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1759. (eval "$lt_compile" 2>out/conftest.err)
  1760. ac_status=$?
  1761. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1762. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1763. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1764. then
  1765. # The compiler can only warn and ignore the option if not recognized
  1766. # So say no if there are warnings
  1767. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1768. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1769. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1770. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1771. fi
  1772. fi
  1773. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1774. $RM conftest*
  1775. # SGI C++ compiler will create directory out/ii_files/ for
  1776. # template instantiation
  1777. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1778. $RM out/* && rmdir out
  1779. cd ..
  1780. $RM -r conftest
  1781. $RM conftest*
  1782. ])
  1783. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1784. [Does compiler simultaneously support -c and -o options?])
  1785. ])# _LT_COMPILER_C_O
  1786. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1787. # ----------------------------------
  1788. # Check to see if we can do hard links to lock some files if needed
  1789. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1790. [m4_require([_LT_ENABLE_LOCK])dnl
  1791. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1792. _LT_COMPILER_C_O([$1])
  1793. hard_links="nottested"
  1794. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  1795. # do not overwrite the value of need_locks provided by the user
  1796. AC_MSG_CHECKING([if we can lock with hard links])
  1797. hard_links=yes
  1798. $RM conftest*
  1799. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1800. touch conftest.a
  1801. ln conftest.a conftest.b 2>&5 || hard_links=no
  1802. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1803. AC_MSG_RESULT([$hard_links])
  1804. if test "$hard_links" = no; then
  1805. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  1806. need_locks=warn
  1807. fi
  1808. else
  1809. need_locks=no
  1810. fi
  1811. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1812. ])# _LT_COMPILER_FILE_LOCKS
  1813. # _LT_CHECK_OBJDIR
  1814. # ----------------
  1815. m4_defun([_LT_CHECK_OBJDIR],
  1816. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1817. [rm -f .libs 2>/dev/null
  1818. mkdir .libs 2>/dev/null
  1819. if test -d .libs; then
  1820. lt_cv_objdir=.libs
  1821. else
  1822. # MS-DOS does not allow filenames that begin with a dot.
  1823. lt_cv_objdir=_libs
  1824. fi
  1825. rmdir .libs 2>/dev/null])
  1826. objdir=$lt_cv_objdir
  1827. _LT_DECL([], [objdir], [0],
  1828. [The name of the directory that contains temporary libtool files])dnl
  1829. m4_pattern_allow([LT_OBJDIR])dnl
  1830. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  1831. [Define to the sub-directory in which libtool stores uninstalled libraries.])
  1832. ])# _LT_CHECK_OBJDIR
  1833. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1834. # --------------------------------------
  1835. # Check hardcoding attributes.
  1836. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1837. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1838. _LT_TAGVAR(hardcode_action, $1)=
  1839. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1840. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1841. test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  1842. # We can hardcode non-existent directories.
  1843. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  1844. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1845. # have to relink, otherwise we might link with an installed library
  1846. # when we should be linking with a yet-to-be-installed one
  1847. ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1848. test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  1849. # Linking always hardcodes the temporary library directory.
  1850. _LT_TAGVAR(hardcode_action, $1)=relink
  1851. else
  1852. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1853. _LT_TAGVAR(hardcode_action, $1)=immediate
  1854. fi
  1855. else
  1856. # We cannot hardcode anything, or else we can only hardcode existing
  1857. # directories.
  1858. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1859. fi
  1860. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1861. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  1862. test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  1863. # Fast installation is not supported
  1864. enable_fast_install=no
  1865. elif test "$shlibpath_overrides_runpath" = yes ||
  1866. test "$enable_shared" = no; then
  1867. # Fast installation is not necessary
  1868. enable_fast_install=needless
  1869. fi
  1870. _LT_TAGDECL([], [hardcode_action], [0],
  1871. [How to hardcode a shared library path into an executable])
  1872. ])# _LT_LINKER_HARDCODE_LIBPATH
  1873. # _LT_CMD_STRIPLIB
  1874. # ----------------
  1875. m4_defun([_LT_CMD_STRIPLIB],
  1876. [m4_require([_LT_DECL_EGREP])
  1877. striplib=
  1878. old_striplib=
  1879. AC_MSG_CHECKING([whether stripping libraries is possible])
  1880. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1881. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1882. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1883. AC_MSG_RESULT([yes])
  1884. else
  1885. # FIXME - insert some real tests, host_os isn't really good enough
  1886. case $host_os in
  1887. darwin*)
  1888. if test -n "$STRIP" ; then
  1889. striplib="$STRIP -x"
  1890. old_striplib="$STRIP -S"
  1891. AC_MSG_RESULT([yes])
  1892. else
  1893. AC_MSG_RESULT([no])
  1894. fi
  1895. ;;
  1896. *)
  1897. AC_MSG_RESULT([no])
  1898. ;;
  1899. esac
  1900. fi
  1901. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1902. _LT_DECL([], [striplib], [1])
  1903. ])# _LT_CMD_STRIPLIB
  1904. # _LT_SYS_DYNAMIC_LINKER([TAG])
  1905. # -----------------------------
  1906. # PORTME Fill in your ld.so characteristics
  1907. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  1908. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1909. m4_require([_LT_DECL_EGREP])dnl
  1910. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1911. m4_require([_LT_DECL_OBJDUMP])dnl
  1912. m4_require([_LT_DECL_SED])dnl
  1913. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  1914. AC_MSG_CHECKING([dynamic linker characteristics])
  1915. m4_if([$1],
  1916. [], [
  1917. if test "$GCC" = yes; then
  1918. case $host_os in
  1919. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  1920. *) lt_awk_arg="/^libraries:/" ;;
  1921. esac
  1922. case $host_os in
  1923. mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
  1924. *) lt_sed_strip_eq="s,=/,/,g" ;;
  1925. esac
  1926. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  1927. case $lt_search_path_spec in
  1928. *\;*)
  1929. # if the path contains ";" then we assume it to be the separator
  1930. # otherwise default to the standard path separator (i.e. ":") - it is
  1931. # assumed that no part of a normal pathname contains ";" but that should
  1932. # okay in the real world where ";" in dirpaths is itself problematic.
  1933. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  1934. ;;
  1935. *)
  1936. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  1937. ;;
  1938. esac
  1939. # Ok, now we have the path, separated by spaces, we can step through it
  1940. # and add multilib dir if necessary.
  1941. lt_tmp_lt_search_path_spec=
  1942. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  1943. for lt_sys_path in $lt_search_path_spec; do
  1944. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  1945. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  1946. else
  1947. test -d "$lt_sys_path" && \
  1948. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  1949. fi
  1950. done
  1951. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  1952. BEGIN {RS=" "; FS="/|\n";} {
  1953. lt_foo="";
  1954. lt_count=0;
  1955. for (lt_i = NF; lt_i > 0; lt_i--) {
  1956. if ($lt_i != "" && $lt_i != ".") {
  1957. if ($lt_i == "..") {
  1958. lt_count++;
  1959. } else {
  1960. if (lt_count == 0) {
  1961. lt_foo="/" $lt_i lt_foo;
  1962. } else {
  1963. lt_count--;
  1964. }
  1965. }
  1966. }
  1967. }
  1968. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  1969. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  1970. }'`
  1971. # AWK program above erroneously prepends '/' to C:/dos/paths
  1972. # for these hosts.
  1973. case $host_os in
  1974. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  1975. $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
  1976. esac
  1977. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  1978. else
  1979. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1980. fi])
  1981. library_names_spec=
  1982. libname_spec='lib$name'
  1983. soname_spec=
  1984. shrext_cmds=".so"
  1985. postinstall_cmds=
  1986. postuninstall_cmds=
  1987. finish_cmds=
  1988. finish_eval=
  1989. shlibpath_var=
  1990. shlibpath_overrides_runpath=unknown
  1991. version_type=none
  1992. dynamic_linker="$host_os ld.so"
  1993. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1994. need_lib_prefix=unknown
  1995. hardcode_into_libs=no
  1996. # when you set need_version to no, make sure it does not cause -set_version
  1997. # flags to be left without arguments
  1998. need_version=unknown
  1999. case $host_os in
  2000. aix3*)
  2001. version_type=linux # correct to gnu/linux during the next big refactor
  2002. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  2003. shlibpath_var=LIBPATH
  2004. # AIX 3 has no versioning support, so we append a major version to the name.
  2005. soname_spec='${libname}${release}${shared_ext}$major'
  2006. ;;
  2007. aix[[4-9]]*)
  2008. version_type=linux # correct to gnu/linux during the next big refactor
  2009. need_lib_prefix=no
  2010. need_version=no
  2011. hardcode_into_libs=yes
  2012. if test "$host_cpu" = ia64; then
  2013. # AIX 5 supports IA64
  2014. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  2015. shlibpath_var=LD_LIBRARY_PATH
  2016. else
  2017. # With GCC up to 2.95.x, collect2 would create an import file
  2018. # for dependence libraries. The import file would start with
  2019. # the line `#! .'. This would cause the generated library to
  2020. # depend on `.', always an invalid library. This was fixed in
  2021. # development snapshots of GCC prior to 3.0.
  2022. case $host_os in
  2023. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2024. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2025. echo ' yes '
  2026. echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  2027. :
  2028. else
  2029. can_build_shared=no
  2030. fi
  2031. ;;
  2032. esac
  2033. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  2034. # soname into executable. Probably we can add versioning support to
  2035. # collect2, so additional links can be useful in future.
  2036. if test "$aix_use_runtimelinking" = yes; then
  2037. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2038. # instead of lib<name>.a to let people know that these are not
  2039. # typical AIX shared libraries.
  2040. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2041. else
  2042. # We preserve .a as extension for shared libraries through AIX4.2
  2043. # and later when we are not doing run time linking.
  2044. library_names_spec='${libname}${release}.a $libname.a'
  2045. soname_spec='${libname}${release}${shared_ext}$major'
  2046. fi
  2047. shlibpath_var=LIBPATH
  2048. fi
  2049. ;;
  2050. amigaos*)
  2051. case $host_cpu in
  2052. powerpc)
  2053. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2054. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2055. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2056. ;;
  2057. m68k)
  2058. library_names_spec='$libname.ixlibrary $libname.a'
  2059. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2060. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  2061. ;;
  2062. esac
  2063. ;;
  2064. beos*)
  2065. library_names_spec='${libname}${shared_ext}'
  2066. dynamic_linker="$host_os ld.so"
  2067. shlibpath_var=LIBRARY_PATH
  2068. ;;
  2069. bsdi[[45]]*)
  2070. version_type=linux # correct to gnu/linux during the next big refactor
  2071. need_version=no
  2072. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2073. soname_spec='${libname}${release}${shared_ext}$major'
  2074. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2075. shlibpath_var=LD_LIBRARY_PATH
  2076. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2077. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2078. # the default ld.so.conf also contains /usr/contrib/lib and
  2079. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2080. # libtool to hard-code these into programs
  2081. ;;
  2082. cygwin* | mingw* | pw32* | cegcc*)
  2083. version_type=windows
  2084. shrext_cmds=".dll"
  2085. need_version=no
  2086. need_lib_prefix=no
  2087. case $GCC,$cc_basename in
  2088. yes,*)
  2089. # gcc
  2090. library_names_spec='$libname.dll.a'
  2091. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2092. postinstall_cmds='base_file=`basename \${file}`~
  2093. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2094. dldir=$destdir/`dirname \$dlpath`~
  2095. test -d \$dldir || mkdir -p \$dldir~
  2096. $install_prog $dir/$dlname \$dldir/$dlname~
  2097. chmod a+x \$dldir/$dlname~
  2098. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2099. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2100. fi'
  2101. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2102. dlpath=$dir/\$dldll~
  2103. $RM \$dlpath'
  2104. shlibpath_overrides_runpath=yes
  2105. case $host_os in
  2106. cygwin*)
  2107. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2108. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2109. m4_if([$1], [],[
  2110. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2111. ;;
  2112. mingw* | cegcc*)
  2113. # MinGW DLLs use traditional 'lib' prefix
  2114. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2115. ;;
  2116. pw32*)
  2117. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2118. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2119. ;;
  2120. esac
  2121. dynamic_linker='Win32 ld.exe'
  2122. ;;
  2123. *,cl*)
  2124. # Native MSVC
  2125. libname_spec='$name'
  2126. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2127. library_names_spec='${libname}.dll.lib'
  2128. case $build_os in
  2129. mingw*)
  2130. sys_lib_search_path_spec=
  2131. lt_save_ifs=$IFS
  2132. IFS=';'
  2133. for lt_path in $LIB
  2134. do
  2135. IFS=$lt_save_ifs
  2136. # Let DOS variable expansion print the short 8.3 style file name.
  2137. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2138. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2139. done
  2140. IFS=$lt_save_ifs
  2141. # Convert to MSYS style.
  2142. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2143. ;;
  2144. cygwin*)
  2145. # Convert to unix form, then to dos form, then back to unix form
  2146. # but this time dos style (no spaces!) so that the unix form looks
  2147. # like /cygdrive/c/PROGRA~1:/cygdr...
  2148. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2149. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2150. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2151. ;;
  2152. *)
  2153. sys_lib_search_path_spec="$LIB"
  2154. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2155. # It is most probably a Windows format PATH.
  2156. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2157. else
  2158. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2159. fi
  2160. # FIXME: find the short name or the path components, as spaces are
  2161. # common. (e.g. "Program Files" -> "PROGRA~1")
  2162. ;;
  2163. esac
  2164. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2165. postinstall_cmds='base_file=`basename \${file}`~
  2166. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2167. dldir=$destdir/`dirname \$dlpath`~
  2168. test -d \$dldir || mkdir -p \$dldir~
  2169. $install_prog $dir/$dlname \$dldir/$dlname'
  2170. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2171. dlpath=$dir/\$dldll~
  2172. $RM \$dlpath'
  2173. shlibpath_overrides_runpath=yes
  2174. dynamic_linker='Win32 link.exe'
  2175. ;;
  2176. *)
  2177. # Assume MSVC wrapper
  2178. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  2179. dynamic_linker='Win32 ld.exe'
  2180. ;;
  2181. esac
  2182. # FIXME: first we should search . and the directory the executable is in
  2183. shlibpath_var=PATH
  2184. ;;
  2185. darwin* | rhapsody*)
  2186. dynamic_linker="$host_os dyld"
  2187. version_type=darwin
  2188. need_lib_prefix=no
  2189. need_version=no
  2190. library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  2191. soname_spec='${libname}${release}${major}$shared_ext'
  2192. shlibpath_overrides_runpath=yes
  2193. shlibpath_var=DYLD_LIBRARY_PATH
  2194. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2195. m4_if([$1], [],[
  2196. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2197. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2198. ;;
  2199. dgux*)
  2200. version_type=linux # correct to gnu/linux during the next big refactor
  2201. need_lib_prefix=no
  2202. need_version=no
  2203. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  2204. soname_spec='${libname}${release}${shared_ext}$major'
  2205. shlibpath_var=LD_LIBRARY_PATH
  2206. ;;
  2207. freebsd* | dragonfly*)
  2208. # DragonFly does not have aout. When/if they implement a new
  2209. # versioning mechanism, adjust this.
  2210. if test -x /usr/bin/objformat; then
  2211. objformat=`/usr/bin/objformat`
  2212. else
  2213. case $host_os in
  2214. freebsd[[23]].*) objformat=aout ;;
  2215. *) objformat=elf ;;
  2216. esac
  2217. fi
  2218. version_type=freebsd-$objformat
  2219. case $version_type in
  2220. freebsd-elf*)
  2221. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2222. need_version=no
  2223. need_lib_prefix=no
  2224. ;;
  2225. freebsd-*)
  2226. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  2227. need_version=yes
  2228. ;;
  2229. esac
  2230. shlibpath_var=LD_LIBRARY_PATH
  2231. case $host_os in
  2232. freebsd2.*)
  2233. shlibpath_overrides_runpath=yes
  2234. ;;
  2235. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2236. shlibpath_overrides_runpath=yes
  2237. hardcode_into_libs=yes
  2238. ;;
  2239. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2240. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2241. shlibpath_overrides_runpath=no
  2242. hardcode_into_libs=yes
  2243. ;;
  2244. *) # from 4.6 on, and DragonFly
  2245. shlibpath_overrides_runpath=yes
  2246. hardcode_into_libs=yes
  2247. ;;
  2248. esac
  2249. ;;
  2250. gnu*)
  2251. version_type=linux # correct to gnu/linux during the next big refactor
  2252. need_lib_prefix=no
  2253. need_version=no
  2254. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2255. soname_spec='${libname}${release}${shared_ext}$major'
  2256. shlibpath_var=LD_LIBRARY_PATH
  2257. shlibpath_overrides_runpath=no
  2258. hardcode_into_libs=yes
  2259. ;;
  2260. haiku*)
  2261. version_type=linux # correct to gnu/linux during the next big refactor
  2262. need_lib_prefix=no
  2263. need_version=no
  2264. dynamic_linker="$host_os runtime_loader"
  2265. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2266. soname_spec='${libname}${release}${shared_ext}$major'
  2267. shlibpath_var=LIBRARY_PATH
  2268. shlibpath_overrides_runpath=yes
  2269. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2270. hardcode_into_libs=yes
  2271. ;;
  2272. hpux9* | hpux10* | hpux11*)
  2273. # Give a soname corresponding to the major version so that dld.sl refuses to
  2274. # link against other versions.
  2275. version_type=sunos
  2276. need_lib_prefix=no
  2277. need_version=no
  2278. case $host_cpu in
  2279. ia64*)
  2280. shrext_cmds='.so'
  2281. hardcode_into_libs=yes
  2282. dynamic_linker="$host_os dld.so"
  2283. shlibpath_var=LD_LIBRARY_PATH
  2284. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2285. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2286. soname_spec='${libname}${release}${shared_ext}$major'
  2287. if test "X$HPUX_IA64_MODE" = X32; then
  2288. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2289. else
  2290. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2291. fi
  2292. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2293. ;;
  2294. hppa*64*)
  2295. shrext_cmds='.sl'
  2296. hardcode_into_libs=yes
  2297. dynamic_linker="$host_os dld.sl"
  2298. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2299. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2300. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2301. soname_spec='${libname}${release}${shared_ext}$major'
  2302. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2303. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2304. ;;
  2305. *)
  2306. shrext_cmds='.sl'
  2307. dynamic_linker="$host_os dld.sl"
  2308. shlibpath_var=SHLIB_PATH
  2309. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2310. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2311. soname_spec='${libname}${release}${shared_ext}$major'
  2312. ;;
  2313. esac
  2314. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2315. postinstall_cmds='chmod 555 $lib'
  2316. # or fails outright, so override atomically:
  2317. install_override_mode=555
  2318. ;;
  2319. interix[[3-9]]*)
  2320. version_type=linux # correct to gnu/linux during the next big refactor
  2321. need_lib_prefix=no
  2322. need_version=no
  2323. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2324. soname_spec='${libname}${release}${shared_ext}$major'
  2325. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2326. shlibpath_var=LD_LIBRARY_PATH
  2327. shlibpath_overrides_runpath=no
  2328. hardcode_into_libs=yes
  2329. ;;
  2330. irix5* | irix6* | nonstopux*)
  2331. case $host_os in
  2332. nonstopux*) version_type=nonstopux ;;
  2333. *)
  2334. if test "$lt_cv_prog_gnu_ld" = yes; then
  2335. version_type=linux # correct to gnu/linux during the next big refactor
  2336. else
  2337. version_type=irix
  2338. fi ;;
  2339. esac
  2340. need_lib_prefix=no
  2341. need_version=no
  2342. soname_spec='${libname}${release}${shared_ext}$major'
  2343. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  2344. case $host_os in
  2345. irix5* | nonstopux*)
  2346. libsuff= shlibsuff=
  2347. ;;
  2348. *)
  2349. case $LD in # libtool.m4 will add one of these switches to LD
  2350. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2351. libsuff= shlibsuff= libmagic=32-bit;;
  2352. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2353. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2354. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2355. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2356. *) libsuff= shlibsuff= libmagic=never-match;;
  2357. esac
  2358. ;;
  2359. esac
  2360. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2361. shlibpath_overrides_runpath=no
  2362. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2363. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2364. hardcode_into_libs=yes
  2365. ;;
  2366. # No shared lib support for Linux oldld, aout, or coff.
  2367. linux*oldld* | linux*aout* | linux*coff*)
  2368. dynamic_linker=no
  2369. ;;
  2370. # This must be glibc/ELF.
  2371. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  2372. version_type=linux # correct to gnu/linux during the next big refactor
  2373. need_lib_prefix=no
  2374. need_version=no
  2375. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2376. soname_spec='${libname}${release}${shared_ext}$major'
  2377. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2378. shlibpath_var=LD_LIBRARY_PATH
  2379. shlibpath_overrides_runpath=no
  2380. # Some binutils ld are patched to set DT_RUNPATH
  2381. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2382. [lt_cv_shlibpath_overrides_runpath=no
  2383. save_LDFLAGS=$LDFLAGS
  2384. save_libdir=$libdir
  2385. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2386. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2387. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2388. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2389. [lt_cv_shlibpath_overrides_runpath=yes])])
  2390. LDFLAGS=$save_LDFLAGS
  2391. libdir=$save_libdir
  2392. ])
  2393. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2394. # This implies no fast_install, which is unacceptable.
  2395. # Some rework will be needed to allow for fast_install
  2396. # before this can be enabled.
  2397. hardcode_into_libs=yes
  2398. # Append ld.so.conf contents to the search path
  2399. if test -f /etc/ld.so.conf; then
  2400. 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' ' '`
  2401. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2402. fi
  2403. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2404. # powerpc, because MkLinux only supported shared libraries with the
  2405. # GNU dynamic linker. Since this was broken with cross compilers,
  2406. # most powerpc-linux boxes support dynamic linking these days and
  2407. # people can always --disable-shared, the test was removed, and we
  2408. # assume the GNU/Linux dynamic linker is in use.
  2409. dynamic_linker='GNU/Linux ld.so'
  2410. ;;
  2411. netbsd*)
  2412. version_type=sunos
  2413. need_lib_prefix=no
  2414. need_version=no
  2415. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2416. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2417. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2418. dynamic_linker='NetBSD (a.out) ld.so'
  2419. else
  2420. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2421. soname_spec='${libname}${release}${shared_ext}$major'
  2422. dynamic_linker='NetBSD ld.elf_so'
  2423. fi
  2424. shlibpath_var=LD_LIBRARY_PATH
  2425. shlibpath_overrides_runpath=yes
  2426. hardcode_into_libs=yes
  2427. ;;
  2428. newsos6)
  2429. version_type=linux # correct to gnu/linux during the next big refactor
  2430. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2431. shlibpath_var=LD_LIBRARY_PATH
  2432. shlibpath_overrides_runpath=yes
  2433. ;;
  2434. *nto* | *qnx*)
  2435. version_type=qnx
  2436. need_lib_prefix=no
  2437. need_version=no
  2438. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2439. soname_spec='${libname}${release}${shared_ext}$major'
  2440. shlibpath_var=LD_LIBRARY_PATH
  2441. shlibpath_overrides_runpath=no
  2442. hardcode_into_libs=yes
  2443. dynamic_linker='ldqnx.so'
  2444. ;;
  2445. openbsd*)
  2446. version_type=sunos
  2447. sys_lib_dlsearch_path_spec="/usr/lib"
  2448. need_lib_prefix=no
  2449. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  2450. case $host_os in
  2451. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  2452. *) need_version=no ;;
  2453. esac
  2454. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2455. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2456. shlibpath_var=LD_LIBRARY_PATH
  2457. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2458. case $host_os in
  2459. openbsd2.[[89]] | openbsd2.[[89]].*)
  2460. shlibpath_overrides_runpath=no
  2461. ;;
  2462. *)
  2463. shlibpath_overrides_runpath=yes
  2464. ;;
  2465. esac
  2466. else
  2467. shlibpath_overrides_runpath=yes
  2468. fi
  2469. ;;
  2470. os2*)
  2471. libname_spec='$name'
  2472. shrext_cmds=".dll"
  2473. need_lib_prefix=no
  2474. library_names_spec='$libname${shared_ext} $libname.a'
  2475. dynamic_linker='OS/2 ld.exe'
  2476. shlibpath_var=LIBPATH
  2477. ;;
  2478. osf3* | osf4* | osf5*)
  2479. version_type=osf
  2480. need_lib_prefix=no
  2481. need_version=no
  2482. soname_spec='${libname}${release}${shared_ext}$major'
  2483. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2484. shlibpath_var=LD_LIBRARY_PATH
  2485. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2486. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2487. ;;
  2488. rdos*)
  2489. dynamic_linker=no
  2490. ;;
  2491. solaris*)
  2492. version_type=linux # correct to gnu/linux during the next big refactor
  2493. need_lib_prefix=no
  2494. need_version=no
  2495. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2496. soname_spec='${libname}${release}${shared_ext}$major'
  2497. shlibpath_var=LD_LIBRARY_PATH
  2498. shlibpath_overrides_runpath=yes
  2499. hardcode_into_libs=yes
  2500. # ldd complains unless libraries are executable
  2501. postinstall_cmds='chmod +x $lib'
  2502. ;;
  2503. sunos4*)
  2504. version_type=sunos
  2505. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2506. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2507. shlibpath_var=LD_LIBRARY_PATH
  2508. shlibpath_overrides_runpath=yes
  2509. if test "$with_gnu_ld" = yes; then
  2510. need_lib_prefix=no
  2511. fi
  2512. need_version=yes
  2513. ;;
  2514. sysv4 | sysv4.3*)
  2515. version_type=linux # correct to gnu/linux during the next big refactor
  2516. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2517. soname_spec='${libname}${release}${shared_ext}$major'
  2518. shlibpath_var=LD_LIBRARY_PATH
  2519. case $host_vendor in
  2520. sni)
  2521. shlibpath_overrides_runpath=no
  2522. need_lib_prefix=no
  2523. runpath_var=LD_RUN_PATH
  2524. ;;
  2525. siemens)
  2526. need_lib_prefix=no
  2527. ;;
  2528. motorola)
  2529. need_lib_prefix=no
  2530. need_version=no
  2531. shlibpath_overrides_runpath=no
  2532. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2533. ;;
  2534. esac
  2535. ;;
  2536. sysv4*MP*)
  2537. if test -d /usr/nec ;then
  2538. version_type=linux # correct to gnu/linux during the next big refactor
  2539. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  2540. soname_spec='$libname${shared_ext}.$major'
  2541. shlibpath_var=LD_LIBRARY_PATH
  2542. fi
  2543. ;;
  2544. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2545. version_type=freebsd-elf
  2546. need_lib_prefix=no
  2547. need_version=no
  2548. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2549. soname_spec='${libname}${release}${shared_ext}$major'
  2550. shlibpath_var=LD_LIBRARY_PATH
  2551. shlibpath_overrides_runpath=yes
  2552. hardcode_into_libs=yes
  2553. if test "$with_gnu_ld" = yes; then
  2554. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2555. else
  2556. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2557. case $host_os in
  2558. sco3.2v5*)
  2559. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2560. ;;
  2561. esac
  2562. fi
  2563. sys_lib_dlsearch_path_spec='/usr/lib'
  2564. ;;
  2565. tpf*)
  2566. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2567. version_type=linux # correct to gnu/linux during the next big refactor
  2568. need_lib_prefix=no
  2569. need_version=no
  2570. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2571. shlibpath_var=LD_LIBRARY_PATH
  2572. shlibpath_overrides_runpath=no
  2573. hardcode_into_libs=yes
  2574. ;;
  2575. uts4*)
  2576. version_type=linux # correct to gnu/linux during the next big refactor
  2577. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2578. soname_spec='${libname}${release}${shared_ext}$major'
  2579. shlibpath_var=LD_LIBRARY_PATH
  2580. ;;
  2581. *)
  2582. dynamic_linker=no
  2583. ;;
  2584. esac
  2585. AC_MSG_RESULT([$dynamic_linker])
  2586. test "$dynamic_linker" = no && can_build_shared=no
  2587. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2588. if test "$GCC" = yes; then
  2589. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2590. fi
  2591. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  2592. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  2593. fi
  2594. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  2595. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  2596. fi
  2597. _LT_DECL([], [variables_saved_for_relink], [1],
  2598. [Variables whose values should be saved in libtool wrapper scripts and
  2599. restored at link time])
  2600. _LT_DECL([], [need_lib_prefix], [0],
  2601. [Do we need the "lib" prefix for modules?])
  2602. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2603. _LT_DECL([], [version_type], [0], [Library versioning type])
  2604. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2605. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2606. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2607. [Is shlibpath searched before the hard-coded library search path?])
  2608. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2609. _LT_DECL([], [library_names_spec], [1],
  2610. [[List of archive names. First name is the real one, the rest are links.
  2611. The last name is the one that the linker finds with -lNAME]])
  2612. _LT_DECL([], [soname_spec], [1],
  2613. [[The coded name of the library, if different from the real name]])
  2614. _LT_DECL([], [install_override_mode], [1],
  2615. [Permission mode override for installation of shared libraries])
  2616. _LT_DECL([], [postinstall_cmds], [2],
  2617. [Command to use after installation of a shared archive])
  2618. _LT_DECL([], [postuninstall_cmds], [2],
  2619. [Command to use after uninstallation of a shared archive])
  2620. _LT_DECL([], [finish_cmds], [2],
  2621. [Commands used to finish a libtool library installation in a directory])
  2622. _LT_DECL([], [finish_eval], [1],
  2623. [[As "finish_cmds", except a single script fragment to be evaled but
  2624. not shown]])
  2625. _LT_DECL([], [hardcode_into_libs], [0],
  2626. [Whether we should hardcode library paths into libraries])
  2627. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2628. [Compile-time system search path for libraries])
  2629. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  2630. [Run-time system search path for libraries])
  2631. ])# _LT_SYS_DYNAMIC_LINKER
  2632. # _LT_PATH_TOOL_PREFIX(TOOL)
  2633. # --------------------------
  2634. # find a file program which can recognize shared library
  2635. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2636. [m4_require([_LT_DECL_EGREP])dnl
  2637. AC_MSG_CHECKING([for $1])
  2638. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2639. [case $MAGIC_CMD in
  2640. [[\\/*] | ?:[\\/]*])
  2641. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  2642. ;;
  2643. *)
  2644. lt_save_MAGIC_CMD="$MAGIC_CMD"
  2645. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2646. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2647. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2648. dnl not every word. This closes a longstanding sh security hole.
  2649. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2650. for ac_dir in $ac_dummy; do
  2651. IFS="$lt_save_ifs"
  2652. test -z "$ac_dir" && ac_dir=.
  2653. if test -f $ac_dir/$1; then
  2654. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  2655. if test -n "$file_magic_test_file"; then
  2656. case $deplibs_check_method in
  2657. "file_magic "*)
  2658. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2659. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2660. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2661. $EGREP "$file_magic_regex" > /dev/null; then
  2662. :
  2663. else
  2664. cat <<_LT_EOF 1>&2
  2665. *** Warning: the command libtool uses to detect shared libraries,
  2666. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2667. *** The result is that libtool may fail to recognize shared libraries
  2668. *** as such. This will affect the creation of libtool libraries that
  2669. *** depend on shared libraries, but programs linked with such libtool
  2670. *** libraries will work regardless of this problem. Nevertheless, you
  2671. *** may want to report the problem to your system manager and/or to
  2672. *** bug-libtool@gnu.org
  2673. _LT_EOF
  2674. fi ;;
  2675. esac
  2676. fi
  2677. break
  2678. fi
  2679. done
  2680. IFS="$lt_save_ifs"
  2681. MAGIC_CMD="$lt_save_MAGIC_CMD"
  2682. ;;
  2683. esac])
  2684. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2685. if test -n "$MAGIC_CMD"; then
  2686. AC_MSG_RESULT($MAGIC_CMD)
  2687. else
  2688. AC_MSG_RESULT(no)
  2689. fi
  2690. _LT_DECL([], [MAGIC_CMD], [0],
  2691. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2692. ])# _LT_PATH_TOOL_PREFIX
  2693. # Old name:
  2694. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2695. dnl aclocal-1.4 backwards compatibility:
  2696. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2697. # _LT_PATH_MAGIC
  2698. # --------------
  2699. # find a file program which can recognize a shared library
  2700. m4_defun([_LT_PATH_MAGIC],
  2701. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2702. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2703. if test -n "$ac_tool_prefix"; then
  2704. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2705. else
  2706. MAGIC_CMD=:
  2707. fi
  2708. fi
  2709. ])# _LT_PATH_MAGIC
  2710. # LT_PATH_LD
  2711. # ----------
  2712. # find the pathname to the GNU or non-GNU linker
  2713. AC_DEFUN([LT_PATH_LD],
  2714. [AC_REQUIRE([AC_PROG_CC])dnl
  2715. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2716. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2717. m4_require([_LT_DECL_SED])dnl
  2718. m4_require([_LT_DECL_EGREP])dnl
  2719. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2720. AC_ARG_WITH([gnu-ld],
  2721. [AS_HELP_STRING([--with-gnu-ld],
  2722. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2723. [test "$withval" = no || with_gnu_ld=yes],
  2724. [with_gnu_ld=no])dnl
  2725. ac_prog=ld
  2726. if test "$GCC" = yes; then
  2727. # Check if gcc -print-prog-name=ld gives a path.
  2728. AC_MSG_CHECKING([for ld used by $CC])
  2729. case $host in
  2730. *-*-mingw*)
  2731. # gcc leaves a trailing carriage return which upsets mingw
  2732. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2733. *)
  2734. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2735. esac
  2736. case $ac_prog in
  2737. # Accept absolute paths.
  2738. [[\\/]]* | ?:[[\\/]]*)
  2739. re_direlt='/[[^/]][[^/]]*/\.\./'
  2740. # Canonicalize the pathname of ld
  2741. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2742. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2743. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2744. done
  2745. test -z "$LD" && LD="$ac_prog"
  2746. ;;
  2747. "")
  2748. # If it fails, then pretend we aren't using GCC.
  2749. ac_prog=ld
  2750. ;;
  2751. *)
  2752. # If it is relative, then search for the first ld in PATH.
  2753. with_gnu_ld=unknown
  2754. ;;
  2755. esac
  2756. elif test "$with_gnu_ld" = yes; then
  2757. AC_MSG_CHECKING([for GNU ld])
  2758. else
  2759. AC_MSG_CHECKING([for non-GNU ld])
  2760. fi
  2761. AC_CACHE_VAL(lt_cv_path_LD,
  2762. [if test -z "$LD"; then
  2763. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2764. for ac_dir in $PATH; do
  2765. IFS="$lt_save_ifs"
  2766. test -z "$ac_dir" && ac_dir=.
  2767. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2768. lt_cv_path_LD="$ac_dir/$ac_prog"
  2769. # Check to see if the program is GNU ld. I'd rather use --version,
  2770. # but apparently some variants of GNU ld only accept -v.
  2771. # Break only if it was the GNU/non-GNU ld that we prefer.
  2772. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2773. *GNU* | *'with BFD'*)
  2774. test "$with_gnu_ld" != no && break
  2775. ;;
  2776. *)
  2777. test "$with_gnu_ld" != yes && break
  2778. ;;
  2779. esac
  2780. fi
  2781. done
  2782. IFS="$lt_save_ifs"
  2783. else
  2784. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  2785. fi])
  2786. LD="$lt_cv_path_LD"
  2787. if test -n "$LD"; then
  2788. AC_MSG_RESULT($LD)
  2789. else
  2790. AC_MSG_RESULT(no)
  2791. fi
  2792. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2793. _LT_PATH_LD_GNU
  2794. AC_SUBST([LD])
  2795. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  2796. ])# LT_PATH_LD
  2797. # Old names:
  2798. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  2799. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  2800. dnl aclocal-1.4 backwards compatibility:
  2801. dnl AC_DEFUN([AM_PROG_LD], [])
  2802. dnl AC_DEFUN([AC_PROG_LD], [])
  2803. # _LT_PATH_LD_GNU
  2804. #- --------------
  2805. m4_defun([_LT_PATH_LD_GNU],
  2806. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2807. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  2808. case `$LD -v 2>&1 </dev/null` in
  2809. *GNU* | *'with BFD'*)
  2810. lt_cv_prog_gnu_ld=yes
  2811. ;;
  2812. *)
  2813. lt_cv_prog_gnu_ld=no
  2814. ;;
  2815. esac])
  2816. with_gnu_ld=$lt_cv_prog_gnu_ld
  2817. ])# _LT_PATH_LD_GNU
  2818. # _LT_CMD_RELOAD
  2819. # --------------
  2820. # find reload flag for linker
  2821. # -- PORTME Some linkers may need a different reload flag.
  2822. m4_defun([_LT_CMD_RELOAD],
  2823. [AC_CACHE_CHECK([for $LD option to reload object files],
  2824. lt_cv_ld_reload_flag,
  2825. [lt_cv_ld_reload_flag='-r'])
  2826. reload_flag=$lt_cv_ld_reload_flag
  2827. case $reload_flag in
  2828. "" | " "*) ;;
  2829. *) reload_flag=" $reload_flag" ;;
  2830. esac
  2831. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2832. case $host_os in
  2833. cygwin* | mingw* | pw32* | cegcc*)
  2834. if test "$GCC" != yes; then
  2835. reload_cmds=false
  2836. fi
  2837. ;;
  2838. darwin*)
  2839. if test "$GCC" = yes; then
  2840. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  2841. else
  2842. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2843. fi
  2844. ;;
  2845. esac
  2846. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  2847. _LT_TAGDECL([], [reload_cmds], [2])dnl
  2848. ])# _LT_CMD_RELOAD
  2849. # _LT_CHECK_MAGIC_METHOD
  2850. # ----------------------
  2851. # how to check for library dependencies
  2852. # -- PORTME fill in with the dynamic library characteristics
  2853. m4_defun([_LT_CHECK_MAGIC_METHOD],
  2854. [m4_require([_LT_DECL_EGREP])
  2855. m4_require([_LT_DECL_OBJDUMP])
  2856. AC_CACHE_CHECK([how to recognize dependent libraries],
  2857. lt_cv_deplibs_check_method,
  2858. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2859. lt_cv_file_magic_test_file=
  2860. lt_cv_deplibs_check_method='unknown'
  2861. # Need to set the preceding variable on all platforms that support
  2862. # interlibrary dependencies.
  2863. # 'none' -- dependencies not supported.
  2864. # `unknown' -- same as none, but documents that we really don't know.
  2865. # 'pass_all' -- all dependencies passed with no checks.
  2866. # 'test_compile' -- check by making test program.
  2867. # 'file_magic [[regex]]' -- check by looking for files in library path
  2868. # which responds to the $file_magic_cmd with a given extended regex.
  2869. # If you have `file' or equivalent on your system and you're not sure
  2870. # whether `pass_all' will *always* work, you probably want this one.
  2871. case $host_os in
  2872. aix[[4-9]]*)
  2873. lt_cv_deplibs_check_method=pass_all
  2874. ;;
  2875. beos*)
  2876. lt_cv_deplibs_check_method=pass_all
  2877. ;;
  2878. bsdi[[45]]*)
  2879. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2880. lt_cv_file_magic_cmd='/usr/bin/file -L'
  2881. lt_cv_file_magic_test_file=/shlib/libc.so
  2882. ;;
  2883. cygwin*)
  2884. # func_win32_libid is a shell function defined in ltmain.sh
  2885. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2886. lt_cv_file_magic_cmd='func_win32_libid'
  2887. ;;
  2888. mingw* | pw32*)
  2889. # Base MSYS/MinGW do not provide the 'file' command needed by
  2890. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  2891. # unless we find 'file', for example because we are cross-compiling.
  2892. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  2893. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  2894. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2895. lt_cv_file_magic_cmd='func_win32_libid'
  2896. else
  2897. # Keep this pattern in sync with the one in func_win32_libid.
  2898. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  2899. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2900. fi
  2901. ;;
  2902. cegcc*)
  2903. # use the weaker test based on 'objdump'. See mingw*.
  2904. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  2905. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2906. ;;
  2907. darwin* | rhapsody*)
  2908. lt_cv_deplibs_check_method=pass_all
  2909. ;;
  2910. freebsd* | dragonfly*)
  2911. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2912. case $host_cpu in
  2913. i*86 )
  2914. # Not sure whether the presence of OpenBSD here was a mistake.
  2915. # Let's accept both of them until this is cleared up.
  2916. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2917. lt_cv_file_magic_cmd=/usr/bin/file
  2918. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2919. ;;
  2920. esac
  2921. else
  2922. lt_cv_deplibs_check_method=pass_all
  2923. fi
  2924. ;;
  2925. gnu*)
  2926. lt_cv_deplibs_check_method=pass_all
  2927. ;;
  2928. haiku*)
  2929. lt_cv_deplibs_check_method=pass_all
  2930. ;;
  2931. hpux10.20* | hpux11*)
  2932. lt_cv_file_magic_cmd=/usr/bin/file
  2933. case $host_cpu in
  2934. ia64*)
  2935. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2936. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2937. ;;
  2938. hppa*64*)
  2939. [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]']
  2940. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2941. ;;
  2942. *)
  2943. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  2944. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2945. ;;
  2946. esac
  2947. ;;
  2948. interix[[3-9]]*)
  2949. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  2950. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  2951. ;;
  2952. irix5* | irix6* | nonstopux*)
  2953. case $LD in
  2954. *-32|*"-32 ") libmagic=32-bit;;
  2955. *-n32|*"-n32 ") libmagic=N32;;
  2956. *-64|*"-64 ") libmagic=64-bit;;
  2957. *) libmagic=never-match;;
  2958. esac
  2959. lt_cv_deplibs_check_method=pass_all
  2960. ;;
  2961. # This must be glibc/ELF.
  2962. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  2963. lt_cv_deplibs_check_method=pass_all
  2964. ;;
  2965. netbsd*)
  2966. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2967. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2968. else
  2969. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2970. fi
  2971. ;;
  2972. newos6*)
  2973. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2974. lt_cv_file_magic_cmd=/usr/bin/file
  2975. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2976. ;;
  2977. *nto* | *qnx*)
  2978. lt_cv_deplibs_check_method=pass_all
  2979. ;;
  2980. openbsd*)
  2981. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2982. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2983. else
  2984. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2985. fi
  2986. ;;
  2987. osf3* | osf4* | osf5*)
  2988. lt_cv_deplibs_check_method=pass_all
  2989. ;;
  2990. rdos*)
  2991. lt_cv_deplibs_check_method=pass_all
  2992. ;;
  2993. solaris*)
  2994. lt_cv_deplibs_check_method=pass_all
  2995. ;;
  2996. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2997. lt_cv_deplibs_check_method=pass_all
  2998. ;;
  2999. sysv4 | sysv4.3*)
  3000. case $host_vendor in
  3001. motorola)
  3002. 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]]'
  3003. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3004. ;;
  3005. ncr)
  3006. lt_cv_deplibs_check_method=pass_all
  3007. ;;
  3008. sequent)
  3009. lt_cv_file_magic_cmd='/bin/file'
  3010. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3011. ;;
  3012. sni)
  3013. lt_cv_file_magic_cmd='/bin/file'
  3014. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3015. lt_cv_file_magic_test_file=/lib/libc.so
  3016. ;;
  3017. siemens)
  3018. lt_cv_deplibs_check_method=pass_all
  3019. ;;
  3020. pc)
  3021. lt_cv_deplibs_check_method=pass_all
  3022. ;;
  3023. esac
  3024. ;;
  3025. tpf*)
  3026. lt_cv_deplibs_check_method=pass_all
  3027. ;;
  3028. esac
  3029. ])
  3030. file_magic_glob=
  3031. want_nocaseglob=no
  3032. if test "$build" = "$host"; then
  3033. case $host_os in
  3034. mingw* | pw32*)
  3035. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3036. want_nocaseglob=yes
  3037. else
  3038. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3039. fi
  3040. ;;
  3041. esac
  3042. fi
  3043. file_magic_cmd=$lt_cv_file_magic_cmd
  3044. deplibs_check_method=$lt_cv_deplibs_check_method
  3045. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3046. _LT_DECL([], [deplibs_check_method], [1],
  3047. [Method to check whether dependent libraries are shared objects])
  3048. _LT_DECL([], [file_magic_cmd], [1],
  3049. [Command to use when deplibs_check_method = "file_magic"])
  3050. _LT_DECL([], [file_magic_glob], [1],
  3051. [How to find potential files when deplibs_check_method = "file_magic"])
  3052. _LT_DECL([], [want_nocaseglob], [1],
  3053. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3054. ])# _LT_CHECK_MAGIC_METHOD
  3055. # LT_PATH_NM
  3056. # ----------
  3057. # find the pathname to a BSD- or MS-compatible name lister
  3058. AC_DEFUN([LT_PATH_NM],
  3059. [AC_REQUIRE([AC_PROG_CC])dnl
  3060. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3061. [if test -n "$NM"; then
  3062. # Let the user override the test.
  3063. lt_cv_path_NM="$NM"
  3064. else
  3065. lt_nm_to_check="${ac_tool_prefix}nm"
  3066. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3067. lt_nm_to_check="$lt_nm_to_check nm"
  3068. fi
  3069. for lt_tmp_nm in $lt_nm_to_check; do
  3070. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3071. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3072. IFS="$lt_save_ifs"
  3073. test -z "$ac_dir" && ac_dir=.
  3074. tmp_nm="$ac_dir/$lt_tmp_nm"
  3075. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  3076. # Check to see if the nm accepts a BSD-compat flag.
  3077. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3078. # nm: unknown option "B" ignored
  3079. # Tru64's nm complains that /dev/null is an invalid object file
  3080. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  3081. */dev/null* | *'Invalid file or object type'*)
  3082. lt_cv_path_NM="$tmp_nm -B"
  3083. break
  3084. ;;
  3085. *)
  3086. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3087. */dev/null*)
  3088. lt_cv_path_NM="$tmp_nm -p"
  3089. break
  3090. ;;
  3091. *)
  3092. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3093. continue # so that we can try to find one that supports BSD flags
  3094. ;;
  3095. esac
  3096. ;;
  3097. esac
  3098. fi
  3099. done
  3100. IFS="$lt_save_ifs"
  3101. done
  3102. : ${lt_cv_path_NM=no}
  3103. fi])
  3104. if test "$lt_cv_path_NM" != "no"; then
  3105. NM="$lt_cv_path_NM"
  3106. else
  3107. # Didn't find any BSD compatible name lister, look for dumpbin.
  3108. if test -n "$DUMPBIN"; then :
  3109. # Let the user override the test.
  3110. else
  3111. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3112. case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
  3113. *COFF*)
  3114. DUMPBIN="$DUMPBIN -symbols"
  3115. ;;
  3116. *)
  3117. DUMPBIN=:
  3118. ;;
  3119. esac
  3120. fi
  3121. AC_SUBST([DUMPBIN])
  3122. if test "$DUMPBIN" != ":"; then
  3123. NM="$DUMPBIN"
  3124. fi
  3125. fi
  3126. test -z "$NM" && NM=nm
  3127. AC_SUBST([NM])
  3128. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3129. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3130. [lt_cv_nm_interface="BSD nm"
  3131. echo "int some_variable = 0;" > conftest.$ac_ext
  3132. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3133. (eval "$ac_compile" 2>conftest.err)
  3134. cat conftest.err >&AS_MESSAGE_LOG_FD
  3135. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3136. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3137. cat conftest.err >&AS_MESSAGE_LOG_FD
  3138. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3139. cat conftest.out >&AS_MESSAGE_LOG_FD
  3140. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3141. lt_cv_nm_interface="MS dumpbin"
  3142. fi
  3143. rm -f conftest*])
  3144. ])# LT_PATH_NM
  3145. # Old names:
  3146. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3147. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3148. dnl aclocal-1.4 backwards compatibility:
  3149. dnl AC_DEFUN([AM_PROG_NM], [])
  3150. dnl AC_DEFUN([AC_PROG_NM], [])
  3151. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3152. # --------------------------------
  3153. # how to determine the name of the shared library
  3154. # associated with a specific link library.
  3155. # -- PORTME fill in with the dynamic library characteristics
  3156. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3157. [m4_require([_LT_DECL_EGREP])
  3158. m4_require([_LT_DECL_OBJDUMP])
  3159. m4_require([_LT_DECL_DLLTOOL])
  3160. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3161. lt_cv_sharedlib_from_linklib_cmd,
  3162. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3163. case $host_os in
  3164. cygwin* | mingw* | pw32* | cegcc*)
  3165. # two different shell functions defined in ltmain.sh
  3166. # decide which to use based on capabilities of $DLLTOOL
  3167. case `$DLLTOOL --help 2>&1` in
  3168. *--identify-strict*)
  3169. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3170. ;;
  3171. *)
  3172. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3173. ;;
  3174. esac
  3175. ;;
  3176. *)
  3177. # fallback: assume linklib IS sharedlib
  3178. lt_cv_sharedlib_from_linklib_cmd="$ECHO"
  3179. ;;
  3180. esac
  3181. ])
  3182. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3183. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3184. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3185. [Command to associate shared and link libraries])
  3186. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3187. # _LT_PATH_MANIFEST_TOOL
  3188. # ----------------------
  3189. # locate the manifest tool
  3190. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3191. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3192. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3193. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3194. [lt_cv_path_mainfest_tool=no
  3195. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3196. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3197. cat conftest.err >&AS_MESSAGE_LOG_FD
  3198. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3199. lt_cv_path_mainfest_tool=yes
  3200. fi
  3201. rm -f conftest*])
  3202. if test "x$lt_cv_path_mainfest_tool" != xyes; then
  3203. MANIFEST_TOOL=:
  3204. fi
  3205. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3206. ])# _LT_PATH_MANIFEST_TOOL
  3207. # LT_LIB_M
  3208. # --------
  3209. # check for math library
  3210. AC_DEFUN([LT_LIB_M],
  3211. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3212. LIBM=
  3213. case $host in
  3214. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3215. # These system don't have libm, or don't need it
  3216. ;;
  3217. *-ncr-sysv4.3*)
  3218. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3219. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3220. ;;
  3221. *)
  3222. AC_CHECK_LIB(m, cos, LIBM="-lm")
  3223. ;;
  3224. esac
  3225. AC_SUBST([LIBM])
  3226. ])# LT_LIB_M
  3227. # Old name:
  3228. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3229. dnl aclocal-1.4 backwards compatibility:
  3230. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3231. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3232. # -------------------------------
  3233. m4_defun([_LT_COMPILER_NO_RTTI],
  3234. [m4_require([_LT_TAG_COMPILER])dnl
  3235. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3236. if test "$GCC" = yes; then
  3237. case $cc_basename in
  3238. nvcc*)
  3239. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3240. *)
  3241. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3242. esac
  3243. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3244. lt_cv_prog_compiler_rtti_exceptions,
  3245. [-fno-rtti -fno-exceptions], [],
  3246. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3247. fi
  3248. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3249. [Compiler flag to turn off builtin functions])
  3250. ])# _LT_COMPILER_NO_RTTI
  3251. # _LT_CMD_GLOBAL_SYMBOLS
  3252. # ----------------------
  3253. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3254. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3255. AC_REQUIRE([AC_PROG_CC])dnl
  3256. AC_REQUIRE([AC_PROG_AWK])dnl
  3257. AC_REQUIRE([LT_PATH_NM])dnl
  3258. AC_REQUIRE([LT_PATH_LD])dnl
  3259. m4_require([_LT_DECL_SED])dnl
  3260. m4_require([_LT_DECL_EGREP])dnl
  3261. m4_require([_LT_TAG_COMPILER])dnl
  3262. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3263. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3264. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3265. [
  3266. # These are sane defaults that work on at least a few old systems.
  3267. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3268. # Character class describing NM global symbol codes.
  3269. symcode='[[BCDEGRST]]'
  3270. # Regexp to match symbols that can be accessed directly from C.
  3271. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3272. # Define system-specific variables.
  3273. case $host_os in
  3274. aix*)
  3275. symcode='[[BCDT]]'
  3276. ;;
  3277. cygwin* | mingw* | pw32* | cegcc*)
  3278. symcode='[[ABCDGISTW]]'
  3279. ;;
  3280. hpux*)
  3281. if test "$host_cpu" = ia64; then
  3282. symcode='[[ABCDEGRST]]'
  3283. fi
  3284. ;;
  3285. irix* | nonstopux*)
  3286. symcode='[[BCDEGRST]]'
  3287. ;;
  3288. osf*)
  3289. symcode='[[BCDEGQRST]]'
  3290. ;;
  3291. solaris*)
  3292. symcode='[[BDRT]]'
  3293. ;;
  3294. sco3.2v5*)
  3295. symcode='[[DT]]'
  3296. ;;
  3297. sysv4.2uw2*)
  3298. symcode='[[DT]]'
  3299. ;;
  3300. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3301. symcode='[[ABDT]]'
  3302. ;;
  3303. sysv4)
  3304. symcode='[[DFNSTU]]'
  3305. ;;
  3306. esac
  3307. # If we're using GNU nm, then use its standard symbol codes.
  3308. case `$NM -V 2>&1` in
  3309. *GNU* | *'with BFD'*)
  3310. symcode='[[ABCDGIRSTW]]' ;;
  3311. esac
  3312. # Transform an extracted symbol line into a proper C declaration.
  3313. # Some systems (esp. on ia64) link data and code symbols differently,
  3314. # so use this general approach.
  3315. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3316. # Transform an extracted symbol line into symbol name and symbol address
  3317. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  3318. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
  3319. # Handle CRLF in mingw tool chain
  3320. opt_cr=
  3321. case $build_os in
  3322. mingw*)
  3323. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3324. ;;
  3325. esac
  3326. # Try without a prefix underscore, then with it.
  3327. for ac_symprfx in "" "_"; do
  3328. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3329. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3330. # Write the raw and C identifiers.
  3331. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3332. # Fake it for dumpbin and say T for any non-static function
  3333. # and D for any global variable.
  3334. # Also find C++ and __fastcall symbols from MSVC++,
  3335. # which start with @ or ?.
  3336. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3337. " {last_section=section; section=\$ 3};"\
  3338. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3339. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3340. " \$ 0!~/External *\|/{next};"\
  3341. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3342. " {if(hide[section]) next};"\
  3343. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  3344. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  3345. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  3346. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  3347. " ' prfx=^$ac_symprfx]"
  3348. else
  3349. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3350. fi
  3351. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3352. # Check to see that the pipe works correctly.
  3353. pipe_works=no
  3354. rm -f conftest*
  3355. cat > conftest.$ac_ext <<_LT_EOF
  3356. #ifdef __cplusplus
  3357. extern "C" {
  3358. #endif
  3359. char nm_test_var;
  3360. void nm_test_func(void);
  3361. void nm_test_func(void){}
  3362. #ifdef __cplusplus
  3363. }
  3364. #endif
  3365. int main(){nm_test_var='a';nm_test_func();return(0);}
  3366. _LT_EOF
  3367. if AC_TRY_EVAL(ac_compile); then
  3368. # Now try to grab the symbols.
  3369. nlist=conftest.nm
  3370. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  3371. # Try sorting and uniquifying the output.
  3372. if sort "$nlist" | uniq > "$nlist"T; then
  3373. mv -f "$nlist"T "$nlist"
  3374. else
  3375. rm -f "$nlist"T
  3376. fi
  3377. # Make sure that we snagged all the symbols we need.
  3378. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3379. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3380. cat <<_LT_EOF > conftest.$ac_ext
  3381. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3382. #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
  3383. /* DATA imports from DLLs on WIN32 con't be const, because runtime
  3384. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3385. # define LT@&t@_DLSYM_CONST
  3386. #elif defined(__osf__)
  3387. /* This system does not cope well with relocations in const data. */
  3388. # define LT@&t@_DLSYM_CONST
  3389. #else
  3390. # define LT@&t@_DLSYM_CONST const
  3391. #endif
  3392. #ifdef __cplusplus
  3393. extern "C" {
  3394. #endif
  3395. _LT_EOF
  3396. # Now generate the symbol file.
  3397. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3398. cat <<_LT_EOF >> conftest.$ac_ext
  3399. /* The mapping between symbol names and symbols. */
  3400. LT@&t@_DLSYM_CONST struct {
  3401. const char *name;
  3402. void *address;
  3403. }
  3404. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3405. {
  3406. { "@PROGRAM@", (void *) 0 },
  3407. _LT_EOF
  3408. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3409. cat <<\_LT_EOF >> conftest.$ac_ext
  3410. {0, (void *) 0}
  3411. };
  3412. /* This works around a problem in FreeBSD linker */
  3413. #ifdef FREEBSD_WORKAROUND
  3414. static const void *lt_preloaded_setup() {
  3415. return lt__PROGRAM__LTX_preloaded_symbols;
  3416. }
  3417. #endif
  3418. #ifdef __cplusplus
  3419. }
  3420. #endif
  3421. _LT_EOF
  3422. # Now try linking the two files.
  3423. mv conftest.$ac_objext conftstm.$ac_objext
  3424. lt_globsym_save_LIBS=$LIBS
  3425. lt_globsym_save_CFLAGS=$CFLAGS
  3426. LIBS="conftstm.$ac_objext"
  3427. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3428. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3429. pipe_works=yes
  3430. fi
  3431. LIBS=$lt_globsym_save_LIBS
  3432. CFLAGS=$lt_globsym_save_CFLAGS
  3433. else
  3434. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3435. fi
  3436. else
  3437. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3438. fi
  3439. else
  3440. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3441. fi
  3442. else
  3443. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3444. cat conftest.$ac_ext >&5
  3445. fi
  3446. rm -rf conftest* conftst*
  3447. # Do not use the global_symbol_pipe unless it works.
  3448. if test "$pipe_works" = yes; then
  3449. break
  3450. else
  3451. lt_cv_sys_global_symbol_pipe=
  3452. fi
  3453. done
  3454. ])
  3455. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3456. lt_cv_sys_global_symbol_to_cdecl=
  3457. fi
  3458. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3459. AC_MSG_RESULT(failed)
  3460. else
  3461. AC_MSG_RESULT(ok)
  3462. fi
  3463. # Response file support.
  3464. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3465. nm_file_list_spec='@'
  3466. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3467. nm_file_list_spec='@'
  3468. fi
  3469. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3470. [Take the output of nm and produce a listing of raw symbols and C names])
  3471. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3472. [Transform the output of nm in a proper C declaration])
  3473. _LT_DECL([global_symbol_to_c_name_address],
  3474. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3475. [Transform the output of nm in a C name address pair])
  3476. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3477. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3478. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3479. _LT_DECL([], [nm_file_list_spec], [1],
  3480. [Specify filename containing input files for $NM])
  3481. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3482. # _LT_COMPILER_PIC([TAGNAME])
  3483. # ---------------------------
  3484. m4_defun([_LT_COMPILER_PIC],
  3485. [m4_require([_LT_TAG_COMPILER])dnl
  3486. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3487. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3488. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3489. m4_if([$1], [CXX], [
  3490. # C++ specific cases for pic, static, wl, etc.
  3491. if test "$GXX" = yes; then
  3492. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3493. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3494. case $host_os in
  3495. aix*)
  3496. # All AIX code is PIC.
  3497. if test "$host_cpu" = ia64; then
  3498. # AIX 5 now supports IA64 processor
  3499. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3500. fi
  3501. ;;
  3502. amigaos*)
  3503. case $host_cpu in
  3504. powerpc)
  3505. # see comment about AmigaOS4 .so support
  3506. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3507. ;;
  3508. m68k)
  3509. # FIXME: we need at least 68020 code to build shared libraries, but
  3510. # adding the `-m68020' flag to GCC prevents building anything better,
  3511. # like `-m68040'.
  3512. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3513. ;;
  3514. esac
  3515. ;;
  3516. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3517. # PIC is the default for these OSes.
  3518. ;;
  3519. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3520. # This hack is so that the source file can tell whether it is being
  3521. # built for inclusion in a dll (and should export symbols for example).
  3522. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3523. # (--disable-auto-import) libraries
  3524. m4_if([$1], [GCJ], [],
  3525. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3526. ;;
  3527. darwin* | rhapsody*)
  3528. # PIC is the default on this platform
  3529. # Common symbols not allowed in MH_DYLIB files
  3530. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3531. ;;
  3532. *djgpp*)
  3533. # DJGPP does not support shared libraries at all
  3534. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3535. ;;
  3536. haiku*)
  3537. # PIC is the default for Haiku.
  3538. # The "-static" flag exists, but is broken.
  3539. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3540. ;;
  3541. interix[[3-9]]*)
  3542. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3543. # Instead, we relocate shared libraries at runtime.
  3544. ;;
  3545. sysv4*MP*)
  3546. if test -d /usr/nec; then
  3547. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3548. fi
  3549. ;;
  3550. hpux*)
  3551. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3552. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3553. # sets the default TLS model and affects inlining.
  3554. case $host_cpu in
  3555. hppa*64*)
  3556. ;;
  3557. *)
  3558. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3559. ;;
  3560. esac
  3561. ;;
  3562. *qnx* | *nto*)
  3563. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3564. # it will coredump.
  3565. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3566. ;;
  3567. *)
  3568. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3569. ;;
  3570. esac
  3571. else
  3572. case $host_os in
  3573. aix[[4-9]]*)
  3574. # All AIX code is PIC.
  3575. if test "$host_cpu" = ia64; then
  3576. # AIX 5 now supports IA64 processor
  3577. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3578. else
  3579. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3580. fi
  3581. ;;
  3582. chorus*)
  3583. case $cc_basename in
  3584. cxch68*)
  3585. # Green Hills C++ Compiler
  3586. # _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"
  3587. ;;
  3588. esac
  3589. ;;
  3590. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3591. # This hack is so that the source file can tell whether it is being
  3592. # built for inclusion in a dll (and should export symbols for example).
  3593. m4_if([$1], [GCJ], [],
  3594. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3595. ;;
  3596. dgux*)
  3597. case $cc_basename in
  3598. ec++*)
  3599. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3600. ;;
  3601. ghcx*)
  3602. # Green Hills C++ Compiler
  3603. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3604. ;;
  3605. *)
  3606. ;;
  3607. esac
  3608. ;;
  3609. freebsd* | dragonfly*)
  3610. # FreeBSD uses GNU C++
  3611. ;;
  3612. hpux9* | hpux10* | hpux11*)
  3613. case $cc_basename in
  3614. CC*)
  3615. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3616. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3617. if test "$host_cpu" != ia64; then
  3618. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3619. fi
  3620. ;;
  3621. aCC*)
  3622. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3623. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3624. case $host_cpu in
  3625. hppa*64*|ia64*)
  3626. # +Z the default
  3627. ;;
  3628. *)
  3629. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3630. ;;
  3631. esac
  3632. ;;
  3633. *)
  3634. ;;
  3635. esac
  3636. ;;
  3637. interix*)
  3638. # This is c89, which is MS Visual C++ (no shared libs)
  3639. # Anyone wants to do a port?
  3640. ;;
  3641. irix5* | irix6* | nonstopux*)
  3642. case $cc_basename in
  3643. CC*)
  3644. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3645. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3646. # CC pic flag -KPIC is the default.
  3647. ;;
  3648. *)
  3649. ;;
  3650. esac
  3651. ;;
  3652. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3653. case $cc_basename in
  3654. KCC*)
  3655. # KAI C++ Compiler
  3656. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3657. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3658. ;;
  3659. ecpc* )
  3660. # old Intel C++ for x86_64 which still supported -KPIC.
  3661. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3662. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3663. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3664. ;;
  3665. icpc* )
  3666. # Intel C++, used to be incompatible with GCC.
  3667. # ICC 10 doesn't accept -KPIC any more.
  3668. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3669. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3670. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3671. ;;
  3672. pgCC* | pgcpp*)
  3673. # Portland Group C++ compiler
  3674. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3675. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3676. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3677. ;;
  3678. cxx*)
  3679. # Compaq C++
  3680. # Make sure the PIC flag is empty. It appears that all Alpha
  3681. # Linux and Compaq Tru64 Unix objects are PIC.
  3682. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3683. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3684. ;;
  3685. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3686. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3687. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3688. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3689. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3690. ;;
  3691. *)
  3692. case `$CC -V 2>&1 | sed 5q` in
  3693. *Sun\ C*)
  3694. # Sun C++ 5.9
  3695. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3696. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3697. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3698. ;;
  3699. esac
  3700. ;;
  3701. esac
  3702. ;;
  3703. lynxos*)
  3704. ;;
  3705. m88k*)
  3706. ;;
  3707. mvs*)
  3708. case $cc_basename in
  3709. cxx*)
  3710. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  3711. ;;
  3712. *)
  3713. ;;
  3714. esac
  3715. ;;
  3716. netbsd*)
  3717. ;;
  3718. *qnx* | *nto*)
  3719. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3720. # it will coredump.
  3721. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3722. ;;
  3723. osf3* | osf4* | osf5*)
  3724. case $cc_basename in
  3725. KCC*)
  3726. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3727. ;;
  3728. RCC*)
  3729. # Rational C++ 2.4.1
  3730. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3731. ;;
  3732. cxx*)
  3733. # Digital/Compaq C++
  3734. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3735. # Make sure the PIC flag is empty. It appears that all Alpha
  3736. # Linux and Compaq Tru64 Unix objects are PIC.
  3737. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3738. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3739. ;;
  3740. *)
  3741. ;;
  3742. esac
  3743. ;;
  3744. psos*)
  3745. ;;
  3746. solaris*)
  3747. case $cc_basename in
  3748. CC* | sunCC*)
  3749. # Sun C++ 4.2, 5.x and Centerline C++
  3750. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3751. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3752. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3753. ;;
  3754. gcx*)
  3755. # Green Hills C++ Compiler
  3756. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3757. ;;
  3758. *)
  3759. ;;
  3760. esac
  3761. ;;
  3762. sunos4*)
  3763. case $cc_basename in
  3764. CC*)
  3765. # Sun C++ 4.x
  3766. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3767. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3768. ;;
  3769. lcc*)
  3770. # Lucid
  3771. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3772. ;;
  3773. *)
  3774. ;;
  3775. esac
  3776. ;;
  3777. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  3778. case $cc_basename in
  3779. CC*)
  3780. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3781. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3782. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3783. ;;
  3784. esac
  3785. ;;
  3786. tandem*)
  3787. case $cc_basename in
  3788. NCC*)
  3789. # NonStop-UX NCC 3.20
  3790. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3791. ;;
  3792. *)
  3793. ;;
  3794. esac
  3795. ;;
  3796. vxworks*)
  3797. ;;
  3798. *)
  3799. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3800. ;;
  3801. esac
  3802. fi
  3803. ],
  3804. [
  3805. if test "$GCC" = yes; then
  3806. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3807. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3808. case $host_os in
  3809. aix*)
  3810. # All AIX code is PIC.
  3811. if test "$host_cpu" = ia64; then
  3812. # AIX 5 now supports IA64 processor
  3813. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3814. fi
  3815. ;;
  3816. amigaos*)
  3817. case $host_cpu in
  3818. powerpc)
  3819. # see comment about AmigaOS4 .so support
  3820. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3821. ;;
  3822. m68k)
  3823. # FIXME: we need at least 68020 code to build shared libraries, but
  3824. # adding the `-m68020' flag to GCC prevents building anything better,
  3825. # like `-m68040'.
  3826. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3827. ;;
  3828. esac
  3829. ;;
  3830. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3831. # PIC is the default for these OSes.
  3832. ;;
  3833. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3834. # This hack is so that the source file can tell whether it is being
  3835. # built for inclusion in a dll (and should export symbols for example).
  3836. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3837. # (--disable-auto-import) libraries
  3838. m4_if([$1], [GCJ], [],
  3839. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3840. ;;
  3841. darwin* | rhapsody*)
  3842. # PIC is the default on this platform
  3843. # Common symbols not allowed in MH_DYLIB files
  3844. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3845. ;;
  3846. haiku*)
  3847. # PIC is the default for Haiku.
  3848. # The "-static" flag exists, but is broken.
  3849. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3850. ;;
  3851. hpux*)
  3852. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3853. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3854. # sets the default TLS model and affects inlining.
  3855. case $host_cpu in
  3856. hppa*64*)
  3857. # +Z the default
  3858. ;;
  3859. *)
  3860. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3861. ;;
  3862. esac
  3863. ;;
  3864. interix[[3-9]]*)
  3865. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3866. # Instead, we relocate shared libraries at runtime.
  3867. ;;
  3868. msdosdjgpp*)
  3869. # Just because we use GCC doesn't mean we suddenly get shared libraries
  3870. # on systems that don't support them.
  3871. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3872. enable_shared=no
  3873. ;;
  3874. *nto* | *qnx*)
  3875. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3876. # it will coredump.
  3877. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3878. ;;
  3879. sysv4*MP*)
  3880. if test -d /usr/nec; then
  3881. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3882. fi
  3883. ;;
  3884. *)
  3885. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3886. ;;
  3887. esac
  3888. case $cc_basename in
  3889. nvcc*) # Cuda Compiler Driver 2.2
  3890. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  3891. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  3892. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  3893. fi
  3894. ;;
  3895. esac
  3896. else
  3897. # PORTME Check for flag to pass linker flags through the system compiler.
  3898. case $host_os in
  3899. aix*)
  3900. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3901. if test "$host_cpu" = ia64; then
  3902. # AIX 5 now supports IA64 processor
  3903. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3904. else
  3905. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3906. fi
  3907. ;;
  3908. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3909. # This hack is so that the source file can tell whether it is being
  3910. # built for inclusion in a dll (and should export symbols for example).
  3911. m4_if([$1], [GCJ], [],
  3912. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3913. ;;
  3914. hpux9* | hpux10* | hpux11*)
  3915. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3916. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  3917. # not for PA HP-UX.
  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. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  3927. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3928. ;;
  3929. irix5* | irix6* | nonstopux*)
  3930. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3931. # PIC (with -KPIC) is the default.
  3932. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3933. ;;
  3934. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3935. case $cc_basename in
  3936. # old Intel for x86_64 which still supported -KPIC.
  3937. ecc*)
  3938. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3939. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3940. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3941. ;;
  3942. # icc used to be incompatible with GCC.
  3943. # ICC 10 doesn't accept -KPIC any more.
  3944. icc* | ifort*)
  3945. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3946. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3947. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3948. ;;
  3949. # Lahey Fortran 8.1.
  3950. lf95*)
  3951. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3952. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  3953. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  3954. ;;
  3955. nagfor*)
  3956. # NAG Fortran compiler
  3957. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  3958. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3959. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3960. ;;
  3961. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  3962. # Portland Group compilers (*not* the Pentium gcc compiler,
  3963. # which looks to be a dead project)
  3964. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3965. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3966. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3967. ;;
  3968. ccc*)
  3969. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3970. # All Alpha code is PIC.
  3971. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3972. ;;
  3973. xl* | bgxl* | bgf* | mpixl*)
  3974. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  3975. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3976. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3977. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3978. ;;
  3979. *)
  3980. case `$CC -V 2>&1 | sed 5q` in
  3981. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  3982. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  3983. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3984. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3985. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  3986. ;;
  3987. *Sun\ F* | *Sun*Fortran*)
  3988. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3989. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3990. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3991. ;;
  3992. *Sun\ C*)
  3993. # Sun C 5.9
  3994. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3995. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3996. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3997. ;;
  3998. *Intel*\ [[CF]]*Compiler*)
  3999. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4000. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4001. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4002. ;;
  4003. *Portland\ Group*)
  4004. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4005. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4006. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4007. ;;
  4008. esac
  4009. ;;
  4010. esac
  4011. ;;
  4012. newsos6)
  4013. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4014. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4015. ;;
  4016. *nto* | *qnx*)
  4017. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4018. # it will coredump.
  4019. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4020. ;;
  4021. osf3* | osf4* | osf5*)
  4022. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4023. # All OSF/1 code is PIC.
  4024. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4025. ;;
  4026. rdos*)
  4027. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4028. ;;
  4029. solaris*)
  4030. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4031. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4032. case $cc_basename in
  4033. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4034. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4035. *)
  4036. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4037. esac
  4038. ;;
  4039. sunos4*)
  4040. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4041. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4042. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4043. ;;
  4044. sysv4 | sysv4.2uw2* | sysv4.3*)
  4045. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4046. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4047. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4048. ;;
  4049. sysv4*MP*)
  4050. if test -d /usr/nec ;then
  4051. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4052. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4053. fi
  4054. ;;
  4055. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4056. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4057. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4058. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4059. ;;
  4060. unicos*)
  4061. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4062. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4063. ;;
  4064. uts4*)
  4065. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4066. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4067. ;;
  4068. *)
  4069. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4070. ;;
  4071. esac
  4072. fi
  4073. ])
  4074. case $host_os in
  4075. # For platforms which do not support PIC, -DPIC is meaningless:
  4076. *djgpp*)
  4077. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4078. ;;
  4079. *)
  4080. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4081. ;;
  4082. esac
  4083. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4084. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4085. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4086. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4087. #
  4088. # Check to make sure the PIC flag actually works.
  4089. #
  4090. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4091. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4092. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4093. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4094. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4095. "" | " "*) ;;
  4096. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4097. esac],
  4098. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4099. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4100. fi
  4101. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4102. [Additional compiler flags for building library objects])
  4103. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4104. [How to pass a linker flag through the compiler])
  4105. #
  4106. # Check to make sure the static flag actually works.
  4107. #
  4108. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4109. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4110. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4111. $lt_tmp_static_flag,
  4112. [],
  4113. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4114. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4115. [Compiler flag to prevent dynamic linking])
  4116. ])# _LT_COMPILER_PIC
  4117. # _LT_LINKER_SHLIBS([TAGNAME])
  4118. # ----------------------------
  4119. # See if the linker supports building shared libraries.
  4120. m4_defun([_LT_LINKER_SHLIBS],
  4121. [AC_REQUIRE([LT_PATH_LD])dnl
  4122. AC_REQUIRE([LT_PATH_NM])dnl
  4123. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4124. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4125. m4_require([_LT_DECL_EGREP])dnl
  4126. m4_require([_LT_DECL_SED])dnl
  4127. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4128. m4_require([_LT_TAG_COMPILER])dnl
  4129. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4130. m4_if([$1], [CXX], [
  4131. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4132. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4133. case $host_os in
  4134. aix[[4-9]]*)
  4135. # If we're using GNU nm, then we don't want the "-C" option.
  4136. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4137. # Also, AIX nm treats weak defined symbols like other global defined
  4138. # symbols, whereas GNU nm marks them as "W".
  4139. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4140. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4141. else
  4142. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4143. fi
  4144. ;;
  4145. pw32*)
  4146. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4147. ;;
  4148. cygwin* | mingw* | cegcc*)
  4149. case $cc_basename in
  4150. cl*)
  4151. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4152. ;;
  4153. *)
  4154. _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'
  4155. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4156. ;;
  4157. esac
  4158. ;;
  4159. *)
  4160. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4161. ;;
  4162. esac
  4163. ], [
  4164. runpath_var=
  4165. _LT_TAGVAR(allow_undefined_flag, $1)=
  4166. _LT_TAGVAR(always_export_symbols, $1)=no
  4167. _LT_TAGVAR(archive_cmds, $1)=
  4168. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4169. _LT_TAGVAR(compiler_needs_object, $1)=no
  4170. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4171. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4172. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4173. _LT_TAGVAR(hardcode_automatic, $1)=no
  4174. _LT_TAGVAR(hardcode_direct, $1)=no
  4175. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4176. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4177. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4178. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4179. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4180. _LT_TAGVAR(inherit_rpath, $1)=no
  4181. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4182. _LT_TAGVAR(module_cmds, $1)=
  4183. _LT_TAGVAR(module_expsym_cmds, $1)=
  4184. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4185. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4186. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4187. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4188. # include_expsyms should be a list of space-separated symbols to be *always*
  4189. # included in the symbol list
  4190. _LT_TAGVAR(include_expsyms, $1)=
  4191. # exclude_expsyms can be an extended regexp of symbols to exclude
  4192. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4193. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4194. # as well as any symbol that contains `d'.
  4195. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4196. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4197. # platforms (ab)use it in PIC code, but their linkers get confused if
  4198. # the symbol is explicitly referenced. Since portable code cannot
  4199. # rely on this symbol name, it's probably fine to never include it in
  4200. # preloaded symbol tables.
  4201. # Exclude shared library initialization/finalization symbols.
  4202. dnl Note also adjust exclude_expsyms for C++ above.
  4203. extract_expsyms_cmds=
  4204. case $host_os in
  4205. cygwin* | mingw* | pw32* | cegcc*)
  4206. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4207. # When not using gcc, we currently assume that we are using
  4208. # Microsoft Visual C++.
  4209. if test "$GCC" != yes; then
  4210. with_gnu_ld=no
  4211. fi
  4212. ;;
  4213. interix*)
  4214. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4215. with_gnu_ld=yes
  4216. ;;
  4217. openbsd*)
  4218. with_gnu_ld=no
  4219. ;;
  4220. esac
  4221. _LT_TAGVAR(ld_shlibs, $1)=yes
  4222. # On some targets, GNU ld is compatible enough with the native linker
  4223. # that we're better off using the native interface for both.
  4224. lt_use_gnu_ld_interface=no
  4225. if test "$with_gnu_ld" = yes; then
  4226. case $host_os in
  4227. aix*)
  4228. # The AIX port of GNU ld has always aspired to compatibility
  4229. # with the native linker. However, as the warning in the GNU ld
  4230. # block says, versions before 2.19.5* couldn't really create working
  4231. # shared libraries, regardless of the interface used.
  4232. case `$LD -v 2>&1` in
  4233. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4234. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4235. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4236. *)
  4237. lt_use_gnu_ld_interface=yes
  4238. ;;
  4239. esac
  4240. ;;
  4241. *)
  4242. lt_use_gnu_ld_interface=yes
  4243. ;;
  4244. esac
  4245. fi
  4246. if test "$lt_use_gnu_ld_interface" = yes; then
  4247. # If archive_cmds runs LD, not CC, wlarc should be empty
  4248. wlarc='${wl}'
  4249. # Set some defaults for GNU ld with shared library support. These
  4250. # are reset later if shared libraries are not supported. Putting them
  4251. # here allows them to be overridden if necessary.
  4252. runpath_var=LD_RUN_PATH
  4253. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4254. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4255. # ancient GNU ld didn't support --whole-archive et. al.
  4256. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4257. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4258. else
  4259. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4260. fi
  4261. supports_anon_versioning=no
  4262. case `$LD -v 2>&1` in
  4263. *GNU\ gold*) supports_anon_versioning=yes ;;
  4264. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4265. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4266. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4267. *\ 2.11.*) ;; # other 2.11 versions
  4268. *) supports_anon_versioning=yes ;;
  4269. esac
  4270. # See if GNU ld supports shared libraries.
  4271. case $host_os in
  4272. aix[[3-9]]*)
  4273. # On AIX/PPC, the GNU linker is very broken
  4274. if test "$host_cpu" != ia64; then
  4275. _LT_TAGVAR(ld_shlibs, $1)=no
  4276. cat <<_LT_EOF 1>&2
  4277. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4278. *** to be unable to reliably create shared libraries on AIX.
  4279. *** Therefore, libtool is disabling shared libraries support. If you
  4280. *** really care for shared libraries, you may want to install binutils
  4281. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4282. *** You will then need to restart the configuration process.
  4283. _LT_EOF
  4284. fi
  4285. ;;
  4286. amigaos*)
  4287. case $host_cpu in
  4288. powerpc)
  4289. # see comment about AmigaOS4 .so support
  4290. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4291. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4292. ;;
  4293. m68k)
  4294. _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)'
  4295. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4296. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4297. ;;
  4298. esac
  4299. ;;
  4300. beos*)
  4301. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4302. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4303. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4304. # support --undefined. This deserves some investigation. FIXME
  4305. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4306. else
  4307. _LT_TAGVAR(ld_shlibs, $1)=no
  4308. fi
  4309. ;;
  4310. cygwin* | mingw* | pw32* | cegcc*)
  4311. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4312. # as there is no search path for DLLs.
  4313. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4314. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  4315. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4316. _LT_TAGVAR(always_export_symbols, $1)=no
  4317. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4318. _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'
  4319. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4320. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4321. _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'
  4322. # If the export-symbols file already is a .def file (1st line
  4323. # is EXPORTS), use it as is; otherwise, prepend...
  4324. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4325. cp $export_symbols $output_objdir/$soname.def;
  4326. else
  4327. echo EXPORTS > $output_objdir/$soname.def;
  4328. cat $export_symbols >> $output_objdir/$soname.def;
  4329. fi~
  4330. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4331. else
  4332. _LT_TAGVAR(ld_shlibs, $1)=no
  4333. fi
  4334. ;;
  4335. haiku*)
  4336. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4337. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4338. ;;
  4339. interix[[3-9]]*)
  4340. _LT_TAGVAR(hardcode_direct, $1)=no
  4341. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4342. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4343. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4344. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4345. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4346. # default) and relocated if they conflict, which is a slow very memory
  4347. # consuming and fragmenting process. To avoid this, we pick a random,
  4348. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4349. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4350. _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'
  4351. _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'
  4352. ;;
  4353. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4354. tmp_diet=no
  4355. if test "$host_os" = linux-dietlibc; then
  4356. case $cc_basename in
  4357. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4358. esac
  4359. fi
  4360. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4361. && test "$tmp_diet" = no
  4362. then
  4363. tmp_addflag=' $pic_flag'
  4364. tmp_sharedflag='-shared'
  4365. case $cc_basename,$host_cpu in
  4366. pgcc*) # Portland Group C compiler
  4367. _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'
  4368. tmp_addflag=' $pic_flag'
  4369. ;;
  4370. pgf77* | pgf90* | pgf95* | pgfortran*)
  4371. # Portland Group f77 and f90 compilers
  4372. _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'
  4373. tmp_addflag=' $pic_flag -Mnomain' ;;
  4374. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4375. tmp_addflag=' -i_dynamic' ;;
  4376. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4377. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4378. ifc* | ifort*) # Intel Fortran compiler
  4379. tmp_addflag=' -nofor_main' ;;
  4380. lf95*) # Lahey Fortran 8.1
  4381. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4382. tmp_sharedflag='--shared' ;;
  4383. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4384. tmp_sharedflag='-qmkshrobj'
  4385. tmp_addflag= ;;
  4386. nvcc*) # Cuda Compiler Driver 2.2
  4387. _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'
  4388. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4389. ;;
  4390. esac
  4391. case `$CC -V 2>&1 | sed 5q` in
  4392. *Sun\ C*) # Sun C 5.9
  4393. _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'
  4394. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4395. tmp_sharedflag='-G' ;;
  4396. *Sun\ F*) # Sun Fortran 8.3
  4397. tmp_sharedflag='-G' ;;
  4398. esac
  4399. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4400. if test "x$supports_anon_versioning" = xyes; then
  4401. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4402. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4403. echo "local: *; };" >> $output_objdir/$libname.ver~
  4404. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4405. fi
  4406. case $cc_basename in
  4407. xlf* | bgf* | bgxlf* | mpixlf*)
  4408. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4409. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4410. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4411. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4412. if test "x$supports_anon_versioning" = xyes; then
  4413. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4414. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4415. echo "local: *; };" >> $output_objdir/$libname.ver~
  4416. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4417. fi
  4418. ;;
  4419. esac
  4420. else
  4421. _LT_TAGVAR(ld_shlibs, $1)=no
  4422. fi
  4423. ;;
  4424. netbsd*)
  4425. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4426. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4427. wlarc=
  4428. else
  4429. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4430. _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'
  4431. fi
  4432. ;;
  4433. solaris*)
  4434. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4435. _LT_TAGVAR(ld_shlibs, $1)=no
  4436. cat <<_LT_EOF 1>&2
  4437. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4438. *** create shared libraries on Solaris systems. Therefore, libtool
  4439. *** is disabling shared libraries support. We urge you to upgrade GNU
  4440. *** binutils to release 2.9.1 or newer. Another option is to modify
  4441. *** your PATH or compiler configuration so that the native linker is
  4442. *** used, and then restart.
  4443. _LT_EOF
  4444. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4445. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4446. _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'
  4447. else
  4448. _LT_TAGVAR(ld_shlibs, $1)=no
  4449. fi
  4450. ;;
  4451. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4452. case `$LD -v 2>&1` in
  4453. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4454. _LT_TAGVAR(ld_shlibs, $1)=no
  4455. cat <<_LT_EOF 1>&2
  4456. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4457. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4458. *** is disabling shared libraries support. We urge you to upgrade GNU
  4459. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4460. *** your PATH or compiler configuration so that the native linker is
  4461. *** used, and then restart.
  4462. _LT_EOF
  4463. ;;
  4464. *)
  4465. # For security reasons, it is highly recommended that you always
  4466. # use absolute paths for naming shared libraries, and exclude the
  4467. # DT_RUNPATH tag from executables and libraries. But doing so
  4468. # requires that you compile everything twice, which is a pain.
  4469. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4470. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4471. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4472. _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'
  4473. else
  4474. _LT_TAGVAR(ld_shlibs, $1)=no
  4475. fi
  4476. ;;
  4477. esac
  4478. ;;
  4479. sunos4*)
  4480. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4481. wlarc=
  4482. _LT_TAGVAR(hardcode_direct, $1)=yes
  4483. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4484. ;;
  4485. *)
  4486. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4487. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4488. _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'
  4489. else
  4490. _LT_TAGVAR(ld_shlibs, $1)=no
  4491. fi
  4492. ;;
  4493. esac
  4494. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  4495. runpath_var=
  4496. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4497. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4498. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4499. fi
  4500. else
  4501. # PORTME fill in a description of your system's linker (not GNU ld)
  4502. case $host_os in
  4503. aix3*)
  4504. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4505. _LT_TAGVAR(always_export_symbols, $1)=yes
  4506. _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'
  4507. # Note: this linker hardcodes the directories in LIBPATH if there
  4508. # are no directories specified by -L.
  4509. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4510. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  4511. # Neither direct hardcoding nor static linking is supported with a
  4512. # broken collect2.
  4513. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4514. fi
  4515. ;;
  4516. aix[[4-9]]*)
  4517. if test "$host_cpu" = ia64; then
  4518. # On IA64, the linker does run time linking by default, so we don't
  4519. # have to do anything special.
  4520. aix_use_runtimelinking=no
  4521. exp_sym_flag='-Bexport'
  4522. no_entry_flag=""
  4523. else
  4524. # If we're using GNU nm, then we don't want the "-C" option.
  4525. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4526. # Also, AIX nm treats weak defined symbols like other global
  4527. # defined symbols, whereas GNU nm marks them as "W".
  4528. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4529. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4530. else
  4531. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4532. fi
  4533. aix_use_runtimelinking=no
  4534. # Test if we are trying to use run time linking or normal
  4535. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4536. # need to do runtime linking.
  4537. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4538. for ld_flag in $LDFLAGS; do
  4539. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4540. aix_use_runtimelinking=yes
  4541. break
  4542. fi
  4543. done
  4544. ;;
  4545. esac
  4546. exp_sym_flag='-bexport'
  4547. no_entry_flag='-bnoentry'
  4548. fi
  4549. # When large executables or shared objects are built, AIX ld can
  4550. # have problems creating the table of contents. If linking a library
  4551. # or program results in "error TOC overflow" add -mminimal-toc to
  4552. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4553. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4554. _LT_TAGVAR(archive_cmds, $1)=''
  4555. _LT_TAGVAR(hardcode_direct, $1)=yes
  4556. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4557. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4558. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4559. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  4560. if test "$GCC" = yes; then
  4561. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4562. # We only want to do this on AIX 4.2 and lower, the check
  4563. # below for broken collect2 doesn't work under 4.3+
  4564. collect2name=`${CC} -print-prog-name=collect2`
  4565. if test -f "$collect2name" &&
  4566. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4567. then
  4568. # We have reworked collect2
  4569. :
  4570. else
  4571. # We have old collect2
  4572. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4573. # It fails to find uninstalled libraries when the uninstalled
  4574. # path is not listed in the libpath. Setting hardcode_minus_L
  4575. # to unsupported forces relinking
  4576. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4577. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4578. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4579. fi
  4580. ;;
  4581. esac
  4582. shared_flag='-shared'
  4583. if test "$aix_use_runtimelinking" = yes; then
  4584. shared_flag="$shared_flag "'${wl}-G'
  4585. fi
  4586. else
  4587. # not using gcc
  4588. if test "$host_cpu" = ia64; then
  4589. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4590. # chokes on -Wl,-G. The following line is correct:
  4591. shared_flag='-G'
  4592. else
  4593. if test "$aix_use_runtimelinking" = yes; then
  4594. shared_flag='${wl}-G'
  4595. else
  4596. shared_flag='${wl}-bM:SRE'
  4597. fi
  4598. fi
  4599. fi
  4600. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  4601. # It seems that -bexpall does not export symbols beginning with
  4602. # underscore (_), so it is better to generate a list of symbols to export.
  4603. _LT_TAGVAR(always_export_symbols, $1)=yes
  4604. if test "$aix_use_runtimelinking" = yes; then
  4605. # Warning - without using the other runtime loading flags (-brtl),
  4606. # -berok will link without error, but may produce a broken library.
  4607. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4608. # Determine the default libpath from the value encoded in an
  4609. # empty executable.
  4610. _LT_SYS_MODULE_PATH_AIX([$1])
  4611. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4612. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  4613. else
  4614. if test "$host_cpu" = ia64; then
  4615. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4616. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4617. _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"
  4618. else
  4619. # Determine the default libpath from the value encoded in an
  4620. # empty executable.
  4621. _LT_SYS_MODULE_PATH_AIX([$1])
  4622. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4623. # Warning - without using the other run time loading flags,
  4624. # -berok will link without error, but may produce a broken library.
  4625. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4626. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4627. if test "$with_gnu_ld" = yes; then
  4628. # We only use this code for GNU lds that support --whole-archive.
  4629. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  4630. else
  4631. # Exported symbols can be pulled into shared objects from archives
  4632. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  4633. fi
  4634. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4635. # This is similar to how AIX traditionally builds its shared libraries.
  4636. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  4637. fi
  4638. fi
  4639. ;;
  4640. amigaos*)
  4641. case $host_cpu in
  4642. powerpc)
  4643. # see comment about AmigaOS4 .so support
  4644. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4645. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4646. ;;
  4647. m68k)
  4648. _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)'
  4649. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4650. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4651. ;;
  4652. esac
  4653. ;;
  4654. bsdi[[45]]*)
  4655. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4656. ;;
  4657. cygwin* | mingw* | pw32* | cegcc*)
  4658. # When not using gcc, we currently assume that we are using
  4659. # Microsoft Visual C++.
  4660. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4661. # no search path for DLLs.
  4662. case $cc_basename in
  4663. cl*)
  4664. # Native MSVC
  4665. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4666. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4667. _LT_TAGVAR(always_export_symbols, $1)=yes
  4668. _LT_TAGVAR(file_list_spec, $1)='@'
  4669. # Tell ltmain to make .lib files, not .a files.
  4670. libext=lib
  4671. # Tell ltmain to make .dll files, not .so files.
  4672. shrext_cmds=".dll"
  4673. # FIXME: Setting linknames here is a bad hack.
  4674. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  4675. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4676. sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  4677. else
  4678. sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  4679. fi~
  4680. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  4681. linknames='
  4682. # The linker will not automatically build a static lib if we build a DLL.
  4683. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4684. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4685. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4686. _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'
  4687. # Don't use ranlib
  4688. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  4689. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  4690. lt_tool_outputfile="@TOOL_OUTPUT@"~
  4691. case $lt_outputfile in
  4692. *.exe|*.EXE) ;;
  4693. *)
  4694. lt_outputfile="$lt_outputfile.exe"
  4695. lt_tool_outputfile="$lt_tool_outputfile.exe"
  4696. ;;
  4697. esac~
  4698. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  4699. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  4700. $RM "$lt_outputfile.manifest";
  4701. fi'
  4702. ;;
  4703. *)
  4704. # Assume MSVC wrapper
  4705. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4706. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4707. # Tell ltmain to make .lib files, not .a files.
  4708. libext=lib
  4709. # Tell ltmain to make .dll files, not .so files.
  4710. shrext_cmds=".dll"
  4711. # FIXME: Setting linknames here is a bad hack.
  4712. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  4713. # The linker will automatically build a .lib file if we build a DLL.
  4714. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4715. # FIXME: Should let the user specify the lib program.
  4716. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  4717. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4718. ;;
  4719. esac
  4720. ;;
  4721. darwin* | rhapsody*)
  4722. _LT_DARWIN_LINKER_FEATURES($1)
  4723. ;;
  4724. dgux*)
  4725. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4726. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4727. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4728. ;;
  4729. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4730. # support. Future versions do this automatically, but an explicit c++rt0.o
  4731. # does not break anything, and helps significantly (at the cost of a little
  4732. # extra space).
  4733. freebsd2.2*)
  4734. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  4735. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4736. _LT_TAGVAR(hardcode_direct, $1)=yes
  4737. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4738. ;;
  4739. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  4740. freebsd2.*)
  4741. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4742. _LT_TAGVAR(hardcode_direct, $1)=yes
  4743. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4744. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4745. ;;
  4746. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  4747. freebsd* | dragonfly*)
  4748. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4749. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4750. _LT_TAGVAR(hardcode_direct, $1)=yes
  4751. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4752. ;;
  4753. hpux9*)
  4754. if test "$GCC" = yes; then
  4755. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  4756. else
  4757. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  4758. fi
  4759. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4760. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4761. _LT_TAGVAR(hardcode_direct, $1)=yes
  4762. # hardcode_minus_L: Not really in the search PATH,
  4763. # but as the default location of the library.
  4764. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4765. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4766. ;;
  4767. hpux10*)
  4768. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4769. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4770. else
  4771. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  4772. fi
  4773. if test "$with_gnu_ld" = no; then
  4774. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4775. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4776. _LT_TAGVAR(hardcode_direct, $1)=yes
  4777. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4778. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4779. # hardcode_minus_L: Not really in the search PATH,
  4780. # but as the default location of the library.
  4781. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4782. fi
  4783. ;;
  4784. hpux11*)
  4785. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4786. case $host_cpu in
  4787. hppa*64*)
  4788. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4789. ;;
  4790. ia64*)
  4791. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4792. ;;
  4793. *)
  4794. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4795. ;;
  4796. esac
  4797. else
  4798. case $host_cpu in
  4799. hppa*64*)
  4800. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4801. ;;
  4802. ia64*)
  4803. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4804. ;;
  4805. *)
  4806. m4_if($1, [], [
  4807. # Older versions of the 11.00 compiler do not understand -b yet
  4808. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  4809. _LT_LINKER_OPTION([if $CC understands -b],
  4810. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  4811. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  4812. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  4813. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  4814. ;;
  4815. esac
  4816. fi
  4817. if test "$with_gnu_ld" = no; then
  4818. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4819. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4820. case $host_cpu in
  4821. hppa*64*|ia64*)
  4822. _LT_TAGVAR(hardcode_direct, $1)=no
  4823. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4824. ;;
  4825. *)
  4826. _LT_TAGVAR(hardcode_direct, $1)=yes
  4827. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4828. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4829. # hardcode_minus_L: Not really in the search PATH,
  4830. # but as the default location of the library.
  4831. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4832. ;;
  4833. esac
  4834. fi
  4835. ;;
  4836. irix5* | irix6* | nonstopux*)
  4837. if test "$GCC" = yes; then
  4838. _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'
  4839. # Try to use the -exported_symbol ld option, if it does not
  4840. # work, assume that -exports_file does not work either and
  4841. # implicitly export all symbols.
  4842. # This should be the same for all languages, so no per-tag cache variable.
  4843. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  4844. [lt_cv_irix_exported_symbol],
  4845. [save_LDFLAGS="$LDFLAGS"
  4846. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  4847. AC_LINK_IFELSE(
  4848. [AC_LANG_SOURCE(
  4849. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  4850. [C++], [[int foo (void) { return 0; }]],
  4851. [Fortran 77], [[
  4852. subroutine foo
  4853. end]],
  4854. [Fortran], [[
  4855. subroutine foo
  4856. end]])])],
  4857. [lt_cv_irix_exported_symbol=yes],
  4858. [lt_cv_irix_exported_symbol=no])
  4859. LDFLAGS="$save_LDFLAGS"])
  4860. if test "$lt_cv_irix_exported_symbol" = yes; then
  4861. _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'
  4862. fi
  4863. else
  4864. _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'
  4865. _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'
  4866. fi
  4867. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4868. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4869. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4870. _LT_TAGVAR(inherit_rpath, $1)=yes
  4871. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4872. ;;
  4873. netbsd*)
  4874. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4875. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  4876. else
  4877. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  4878. fi
  4879. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4880. _LT_TAGVAR(hardcode_direct, $1)=yes
  4881. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4882. ;;
  4883. newsos6)
  4884. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4885. _LT_TAGVAR(hardcode_direct, $1)=yes
  4886. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4887. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4888. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4889. ;;
  4890. *nto* | *qnx*)
  4891. ;;
  4892. openbsd*)
  4893. if test -f /usr/libexec/ld.so; then
  4894. _LT_TAGVAR(hardcode_direct, $1)=yes
  4895. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4896. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4897. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4898. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4899. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  4900. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4901. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4902. else
  4903. case $host_os in
  4904. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  4905. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4906. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4907. ;;
  4908. *)
  4909. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4910. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4911. ;;
  4912. esac
  4913. fi
  4914. else
  4915. _LT_TAGVAR(ld_shlibs, $1)=no
  4916. fi
  4917. ;;
  4918. os2*)
  4919. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4920. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4921. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4922. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  4923. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  4924. ;;
  4925. osf3*)
  4926. if test "$GCC" = yes; then
  4927. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4928. _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'
  4929. else
  4930. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4931. _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'
  4932. fi
  4933. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4934. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4935. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4936. ;;
  4937. osf4* | osf5*) # as osf3* with the addition of -msym flag
  4938. if test "$GCC" = yes; then
  4939. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4940. _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'
  4941. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4942. else
  4943. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4944. _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'
  4945. _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~
  4946. $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'
  4947. # Both c and cxx compiler support -rpath directly
  4948. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  4949. fi
  4950. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4951. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4952. ;;
  4953. solaris*)
  4954. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  4955. if test "$GCC" = yes; then
  4956. wlarc='${wl}'
  4957. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4958. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4959. $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'
  4960. else
  4961. case `$CC -V 2>&1` in
  4962. *"Compilers 5.0"*)
  4963. wlarc=''
  4964. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4965. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4966. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  4967. ;;
  4968. *)
  4969. wlarc='${wl}'
  4970. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4971. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4972. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4973. ;;
  4974. esac
  4975. fi
  4976. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4977. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4978. case $host_os in
  4979. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  4980. *)
  4981. # The compiler driver will combine and reorder linker options,
  4982. # but understands `-z linker_flag'. GCC discards it without `$wl',
  4983. # but is careful enough not to reorder.
  4984. # Supported since Solaris 2.6 (maybe 2.5.1?)
  4985. if test "$GCC" = yes; then
  4986. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  4987. else
  4988. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  4989. fi
  4990. ;;
  4991. esac
  4992. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4993. ;;
  4994. sunos4*)
  4995. if test "x$host_vendor" = xsequent; then
  4996. # Use $CC to link under sequent, because it throws in some extra .o
  4997. # files that make .init and .fini sections work.
  4998. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4999. else
  5000. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5001. fi
  5002. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5003. _LT_TAGVAR(hardcode_direct, $1)=yes
  5004. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5005. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5006. ;;
  5007. sysv4)
  5008. case $host_vendor in
  5009. sni)
  5010. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5011. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5012. ;;
  5013. siemens)
  5014. ## LD is ld it makes a PLAMLIB
  5015. ## CC just makes a GrossModule.
  5016. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5017. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5018. _LT_TAGVAR(hardcode_direct, $1)=no
  5019. ;;
  5020. motorola)
  5021. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5022. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5023. ;;
  5024. esac
  5025. runpath_var='LD_RUN_PATH'
  5026. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5027. ;;
  5028. sysv4.3*)
  5029. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5030. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5031. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5032. ;;
  5033. sysv4*MP*)
  5034. if test -d /usr/nec; then
  5035. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5036. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5037. runpath_var=LD_RUN_PATH
  5038. hardcode_runpath_var=yes
  5039. _LT_TAGVAR(ld_shlibs, $1)=yes
  5040. fi
  5041. ;;
  5042. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5043. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5044. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5045. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5046. runpath_var='LD_RUN_PATH'
  5047. if test "$GCC" = yes; then
  5048. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5049. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5050. else
  5051. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5052. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5053. fi
  5054. ;;
  5055. sysv5* | sco3.2v5* | sco5v6*)
  5056. # Note: We can NOT use -z defs as we might desire, because we do not
  5057. # link with -lc, and that would cause any symbols used from libc to
  5058. # always be unresolved, which means just about no library would
  5059. # ever link correctly. If we're not using GNU ld we use -z text
  5060. # though, which does catch some bad symbols but isn't as heavy-handed
  5061. # as -z defs.
  5062. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5063. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5064. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5065. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5066. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5067. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5068. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5069. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5070. runpath_var='LD_RUN_PATH'
  5071. if test "$GCC" = yes; then
  5072. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5073. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5074. else
  5075. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5076. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5077. fi
  5078. ;;
  5079. uts4*)
  5080. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5081. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5082. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5083. ;;
  5084. *)
  5085. _LT_TAGVAR(ld_shlibs, $1)=no
  5086. ;;
  5087. esac
  5088. if test x$host_vendor = xsni; then
  5089. case $host in
  5090. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5091. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  5092. ;;
  5093. esac
  5094. fi
  5095. fi
  5096. ])
  5097. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5098. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5099. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5100. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5101. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5102. _LT_DECL([], [extract_expsyms_cmds], [2],
  5103. [The commands to extract the exported symbol list from a shared archive])
  5104. #
  5105. # Do we need to explicitly link libc?
  5106. #
  5107. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5108. x|xyes)
  5109. # Assume -lc should be added
  5110. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5111. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5112. case $_LT_TAGVAR(archive_cmds, $1) in
  5113. *'~'*)
  5114. # FIXME: we may have to deal with multi-command sequences.
  5115. ;;
  5116. '$CC '*)
  5117. # Test whether the compiler implicitly links with -lc since on some
  5118. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5119. # to ld, don't add -lc before -lgcc.
  5120. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5121. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5122. [$RM conftest*
  5123. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5124. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5125. soname=conftest
  5126. lib=conftest
  5127. libobjs=conftest.$ac_objext
  5128. deplibs=
  5129. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5130. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5131. compiler_flags=-v
  5132. linker_flags=-v
  5133. verstring=
  5134. output_objdir=.
  5135. libname=conftest
  5136. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5137. _LT_TAGVAR(allow_undefined_flag, $1)=
  5138. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5139. then
  5140. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5141. else
  5142. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5143. fi
  5144. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5145. else
  5146. cat conftest.err 1>&5
  5147. fi
  5148. $RM conftest*
  5149. ])
  5150. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5151. ;;
  5152. esac
  5153. fi
  5154. ;;
  5155. esac
  5156. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5157. [Whether or not to add -lc for building shared libraries])
  5158. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5159. [enable_shared_with_static_runtimes], [0],
  5160. [Whether or not to disallow shared libs when runtime libs are static])
  5161. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5162. [Compiler flag to allow reflexive dlopens])
  5163. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5164. [Compiler flag to generate shared objects directly from archives])
  5165. _LT_TAGDECL([], [compiler_needs_object], [1],
  5166. [Whether the compiler copes with passing no objects directly])
  5167. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5168. [Create an old-style archive from a shared archive])
  5169. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5170. [Create a temporary old-style archive to link instead of a shared archive])
  5171. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5172. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5173. _LT_TAGDECL([], [module_cmds], [2],
  5174. [Commands used to build a loadable module if different from building
  5175. a shared archive.])
  5176. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5177. _LT_TAGDECL([], [with_gnu_ld], [1],
  5178. [Whether we are building with GNU ld or not])
  5179. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5180. [Flag that allows shared libraries with undefined symbols to be built])
  5181. _LT_TAGDECL([], [no_undefined_flag], [1],
  5182. [Flag that enforces no undefined symbols])
  5183. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5184. [Flag to hardcode $libdir into a binary during linking.
  5185. This must work even if $libdir does not exist])
  5186. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5187. [Whether we need a single "-rpath" flag with a separated argument])
  5188. _LT_TAGDECL([], [hardcode_direct], [0],
  5189. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5190. DIR into the resulting binary])
  5191. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5192. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5193. DIR into the resulting binary and the resulting library dependency is
  5194. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  5195. library is relocated])
  5196. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5197. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5198. into the resulting binary])
  5199. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5200. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5201. into the resulting binary])
  5202. _LT_TAGDECL([], [hardcode_automatic], [0],
  5203. [Set to "yes" if building a shared library automatically hardcodes DIR
  5204. into the library and all subsequent libraries and executables linked
  5205. against it])
  5206. _LT_TAGDECL([], [inherit_rpath], [0],
  5207. [Set to yes if linker adds runtime paths of dependent libraries
  5208. to runtime path list])
  5209. _LT_TAGDECL([], [link_all_deplibs], [0],
  5210. [Whether libtool must link a program against all its dependency libraries])
  5211. _LT_TAGDECL([], [always_export_symbols], [0],
  5212. [Set to "yes" if exported symbols are required])
  5213. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5214. [The commands to list exported symbols])
  5215. _LT_TAGDECL([], [exclude_expsyms], [1],
  5216. [Symbols that should not be listed in the preloaded symbols])
  5217. _LT_TAGDECL([], [include_expsyms], [1],
  5218. [Symbols that must always be exported])
  5219. _LT_TAGDECL([], [prelink_cmds], [2],
  5220. [Commands necessary for linking programs (against libraries) with templates])
  5221. _LT_TAGDECL([], [postlink_cmds], [2],
  5222. [Commands necessary for finishing linking programs])
  5223. _LT_TAGDECL([], [file_list_spec], [1],
  5224. [Specify filename containing input files])
  5225. dnl FIXME: Not yet implemented
  5226. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5227. dnl [Compiler flag to generate thread safe objects])
  5228. ])# _LT_LINKER_SHLIBS
  5229. # _LT_LANG_C_CONFIG([TAG])
  5230. # ------------------------
  5231. # Ensure that the configuration variables for a C compiler are suitably
  5232. # defined. These variables are subsequently used by _LT_CONFIG to write
  5233. # the compiler configuration to `libtool'.
  5234. m4_defun([_LT_LANG_C_CONFIG],
  5235. [m4_require([_LT_DECL_EGREP])dnl
  5236. lt_save_CC="$CC"
  5237. AC_LANG_PUSH(C)
  5238. # Source file extension for C test sources.
  5239. ac_ext=c
  5240. # Object file extension for compiled C test sources.
  5241. objext=o
  5242. _LT_TAGVAR(objext, $1)=$objext
  5243. # Code to be used in simple compile tests
  5244. lt_simple_compile_test_code="int some_variable = 0;"
  5245. # Code to be used in simple link tests
  5246. lt_simple_link_test_code='int main(){return(0);}'
  5247. _LT_TAG_COMPILER
  5248. # Save the default compiler, since it gets overwritten when the other
  5249. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5250. compiler_DEFAULT=$CC
  5251. # save warnings/boilerplate of simple test code
  5252. _LT_COMPILER_BOILERPLATE
  5253. _LT_LINKER_BOILERPLATE
  5254. if test -n "$compiler"; then
  5255. _LT_COMPILER_NO_RTTI($1)
  5256. _LT_COMPILER_PIC($1)
  5257. _LT_COMPILER_C_O($1)
  5258. _LT_COMPILER_FILE_LOCKS($1)
  5259. _LT_LINKER_SHLIBS($1)
  5260. _LT_SYS_DYNAMIC_LINKER($1)
  5261. _LT_LINKER_HARDCODE_LIBPATH($1)
  5262. LT_SYS_DLOPEN_SELF
  5263. _LT_CMD_STRIPLIB
  5264. # Report which library types will actually be built
  5265. AC_MSG_CHECKING([if libtool supports shared libraries])
  5266. AC_MSG_RESULT([$can_build_shared])
  5267. AC_MSG_CHECKING([whether to build shared libraries])
  5268. test "$can_build_shared" = "no" && enable_shared=no
  5269. # On AIX, shared libraries and static libraries use the same namespace, and
  5270. # are all built from PIC.
  5271. case $host_os in
  5272. aix3*)
  5273. test "$enable_shared" = yes && enable_static=no
  5274. if test -n "$RANLIB"; then
  5275. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5276. postinstall_cmds='$RANLIB $lib'
  5277. fi
  5278. ;;
  5279. aix[[4-9]]*)
  5280. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  5281. test "$enable_shared" = yes && enable_static=no
  5282. fi
  5283. ;;
  5284. esac
  5285. AC_MSG_RESULT([$enable_shared])
  5286. AC_MSG_CHECKING([whether to build static libraries])
  5287. # Make sure either enable_shared or enable_static is yes.
  5288. test "$enable_shared" = yes || enable_static=yes
  5289. AC_MSG_RESULT([$enable_static])
  5290. _LT_CONFIG($1)
  5291. fi
  5292. AC_LANG_POP
  5293. CC="$lt_save_CC"
  5294. ])# _LT_LANG_C_CONFIG
  5295. # _LT_LANG_CXX_CONFIG([TAG])
  5296. # --------------------------
  5297. # Ensure that the configuration variables for a C++ compiler are suitably
  5298. # defined. These variables are subsequently used by _LT_CONFIG to write
  5299. # the compiler configuration to `libtool'.
  5300. m4_defun([_LT_LANG_CXX_CONFIG],
  5301. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5302. m4_require([_LT_DECL_EGREP])dnl
  5303. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5304. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  5305. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  5306. (test "X$CXX" != "Xg++"))) ; then
  5307. AC_PROG_CXXCPP
  5308. else
  5309. _lt_caught_CXX_error=yes
  5310. fi
  5311. AC_LANG_PUSH(C++)
  5312. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5313. _LT_TAGVAR(allow_undefined_flag, $1)=
  5314. _LT_TAGVAR(always_export_symbols, $1)=no
  5315. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5316. _LT_TAGVAR(compiler_needs_object, $1)=no
  5317. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5318. _LT_TAGVAR(hardcode_direct, $1)=no
  5319. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5320. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5321. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5322. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5323. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5324. _LT_TAGVAR(hardcode_automatic, $1)=no
  5325. _LT_TAGVAR(inherit_rpath, $1)=no
  5326. _LT_TAGVAR(module_cmds, $1)=
  5327. _LT_TAGVAR(module_expsym_cmds, $1)=
  5328. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5329. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5330. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5331. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5332. _LT_TAGVAR(no_undefined_flag, $1)=
  5333. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5334. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5335. # Source file extension for C++ test sources.
  5336. ac_ext=cpp
  5337. # Object file extension for compiled C++ test sources.
  5338. objext=o
  5339. _LT_TAGVAR(objext, $1)=$objext
  5340. # No sense in running all these tests if we already determined that
  5341. # the CXX compiler isn't working. Some variables (like enable_shared)
  5342. # are currently assumed to apply to all compilers on this platform,
  5343. # and will be corrupted by setting them based on a non-working compiler.
  5344. if test "$_lt_caught_CXX_error" != yes; then
  5345. # Code to be used in simple compile tests
  5346. lt_simple_compile_test_code="int some_variable = 0;"
  5347. # Code to be used in simple link tests
  5348. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5349. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5350. _LT_TAG_COMPILER
  5351. # save warnings/boilerplate of simple test code
  5352. _LT_COMPILER_BOILERPLATE
  5353. _LT_LINKER_BOILERPLATE
  5354. # Allow CC to be a program name with arguments.
  5355. lt_save_CC=$CC
  5356. lt_save_CFLAGS=$CFLAGS
  5357. lt_save_LD=$LD
  5358. lt_save_GCC=$GCC
  5359. GCC=$GXX
  5360. lt_save_with_gnu_ld=$with_gnu_ld
  5361. lt_save_path_LD=$lt_cv_path_LD
  5362. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5363. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5364. else
  5365. $as_unset lt_cv_prog_gnu_ld
  5366. fi
  5367. if test -n "${lt_cv_path_LDCXX+set}"; then
  5368. lt_cv_path_LD=$lt_cv_path_LDCXX
  5369. else
  5370. $as_unset lt_cv_path_LD
  5371. fi
  5372. test -z "${LDCXX+set}" || LD=$LDCXX
  5373. CC=${CXX-"c++"}
  5374. CFLAGS=$CXXFLAGS
  5375. compiler=$CC
  5376. _LT_TAGVAR(compiler, $1)=$CC
  5377. _LT_CC_BASENAME([$compiler])
  5378. if test -n "$compiler"; then
  5379. # We don't want -fno-exception when compiling C++ code, so set the
  5380. # no_builtin_flag separately
  5381. if test "$GXX" = yes; then
  5382. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5383. else
  5384. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5385. fi
  5386. if test "$GXX" = yes; then
  5387. # Set up default GNU C++ configuration
  5388. LT_PATH_LD
  5389. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5390. # archiving commands below assume that GNU ld is being used.
  5391. if test "$with_gnu_ld" = yes; then
  5392. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5393. _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'
  5394. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5395. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5396. # If archive_cmds runs LD, not CC, wlarc should be empty
  5397. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5398. # investigate it a little bit more. (MM)
  5399. wlarc='${wl}'
  5400. # ancient GNU ld didn't support --whole-archive et. al.
  5401. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5402. $GREP 'no-whole-archive' > /dev/null; then
  5403. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5404. else
  5405. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5406. fi
  5407. else
  5408. with_gnu_ld=no
  5409. wlarc=
  5410. # A generic and very simple default shared library creation
  5411. # command for GNU C++ for the case where it uses the native
  5412. # linker, instead of GNU ld. If possible, this setting should
  5413. # overridden to take advantage of the native linker features on
  5414. # the platform it is being used on.
  5415. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5416. fi
  5417. # Commands to make compiler produce verbose output that lists
  5418. # what "hidden" libraries, object files and flags are used when
  5419. # linking a shared library.
  5420. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  5421. else
  5422. GXX=no
  5423. with_gnu_ld=no
  5424. wlarc=
  5425. fi
  5426. # PORTME: fill in a description of your system's C++ link characteristics
  5427. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5428. _LT_TAGVAR(ld_shlibs, $1)=yes
  5429. case $host_os in
  5430. aix3*)
  5431. # FIXME: insert proper C++ library support
  5432. _LT_TAGVAR(ld_shlibs, $1)=no
  5433. ;;
  5434. aix[[4-9]]*)
  5435. if test "$host_cpu" = ia64; then
  5436. # On IA64, the linker does run time linking by default, so we don't
  5437. # have to do anything special.
  5438. aix_use_runtimelinking=no
  5439. exp_sym_flag='-Bexport'
  5440. no_entry_flag=""
  5441. else
  5442. aix_use_runtimelinking=no
  5443. # Test if we are trying to use run time linking or normal
  5444. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5445. # need to do runtime linking.
  5446. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5447. for ld_flag in $LDFLAGS; do
  5448. case $ld_flag in
  5449. *-brtl*)
  5450. aix_use_runtimelinking=yes
  5451. break
  5452. ;;
  5453. esac
  5454. done
  5455. ;;
  5456. esac
  5457. exp_sym_flag='-bexport'
  5458. no_entry_flag='-bnoentry'
  5459. fi
  5460. # When large executables or shared objects are built, AIX ld can
  5461. # have problems creating the table of contents. If linking a library
  5462. # or program results in "error TOC overflow" add -mminimal-toc to
  5463. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5464. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5465. _LT_TAGVAR(archive_cmds, $1)=''
  5466. _LT_TAGVAR(hardcode_direct, $1)=yes
  5467. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5468. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5469. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5470. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5471. if test "$GXX" = yes; then
  5472. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5473. # We only want to do this on AIX 4.2 and lower, the check
  5474. # below for broken collect2 doesn't work under 4.3+
  5475. collect2name=`${CC} -print-prog-name=collect2`
  5476. if test -f "$collect2name" &&
  5477. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5478. then
  5479. # We have reworked collect2
  5480. :
  5481. else
  5482. # We have old collect2
  5483. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5484. # It fails to find uninstalled libraries when the uninstalled
  5485. # path is not listed in the libpath. Setting hardcode_minus_L
  5486. # to unsupported forces relinking
  5487. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5488. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5489. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5490. fi
  5491. esac
  5492. shared_flag='-shared'
  5493. if test "$aix_use_runtimelinking" = yes; then
  5494. shared_flag="$shared_flag "'${wl}-G'
  5495. fi
  5496. else
  5497. # not using gcc
  5498. if test "$host_cpu" = ia64; then
  5499. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5500. # chokes on -Wl,-G. The following line is correct:
  5501. shared_flag='-G'
  5502. else
  5503. if test "$aix_use_runtimelinking" = yes; then
  5504. shared_flag='${wl}-G'
  5505. else
  5506. shared_flag='${wl}-bM:SRE'
  5507. fi
  5508. fi
  5509. fi
  5510. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5511. # It seems that -bexpall does not export symbols beginning with
  5512. # underscore (_), so it is better to generate a list of symbols to
  5513. # export.
  5514. _LT_TAGVAR(always_export_symbols, $1)=yes
  5515. if test "$aix_use_runtimelinking" = yes; then
  5516. # Warning - without using the other runtime loading flags (-brtl),
  5517. # -berok will link without error, but may produce a broken library.
  5518. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5519. # Determine the default libpath from the value encoded in an empty
  5520. # executable.
  5521. _LT_SYS_MODULE_PATH_AIX([$1])
  5522. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5523. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  5524. else
  5525. if test "$host_cpu" = ia64; then
  5526. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5527. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5528. _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"
  5529. else
  5530. # Determine the default libpath from the value encoded in an
  5531. # empty executable.
  5532. _LT_SYS_MODULE_PATH_AIX([$1])
  5533. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5534. # Warning - without using the other run time loading flags,
  5535. # -berok will link without error, but may produce a broken library.
  5536. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5537. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5538. if test "$with_gnu_ld" = yes; then
  5539. # We only use this code for GNU lds that support --whole-archive.
  5540. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5541. else
  5542. # Exported symbols can be pulled into shared objects from archives
  5543. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5544. fi
  5545. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5546. # This is similar to how AIX traditionally builds its shared
  5547. # libraries.
  5548. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  5549. fi
  5550. fi
  5551. ;;
  5552. beos*)
  5553. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5554. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5555. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5556. # support --undefined. This deserves some investigation. FIXME
  5557. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5558. else
  5559. _LT_TAGVAR(ld_shlibs, $1)=no
  5560. fi
  5561. ;;
  5562. chorus*)
  5563. case $cc_basename in
  5564. *)
  5565. # FIXME: insert proper C++ library support
  5566. _LT_TAGVAR(ld_shlibs, $1)=no
  5567. ;;
  5568. esac
  5569. ;;
  5570. cygwin* | mingw* | pw32* | cegcc*)
  5571. case $GXX,$cc_basename in
  5572. ,cl* | no,cl*)
  5573. # Native MSVC
  5574. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5575. # no search path for DLLs.
  5576. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5577. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5578. _LT_TAGVAR(always_export_symbols, $1)=yes
  5579. _LT_TAGVAR(file_list_spec, $1)='@'
  5580. # Tell ltmain to make .lib files, not .a files.
  5581. libext=lib
  5582. # Tell ltmain to make .dll files, not .so files.
  5583. shrext_cmds=".dll"
  5584. # FIXME: Setting linknames here is a bad hack.
  5585. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  5586. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5587. $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  5588. else
  5589. $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  5590. fi~
  5591. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5592. linknames='
  5593. # The linker will not automatically build a static lib if we build a DLL.
  5594. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5595. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5596. # Don't use ranlib
  5597. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5598. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5599. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5600. case $lt_outputfile in
  5601. *.exe|*.EXE) ;;
  5602. *)
  5603. lt_outputfile="$lt_outputfile.exe"
  5604. lt_tool_outputfile="$lt_tool_outputfile.exe"
  5605. ;;
  5606. esac~
  5607. func_to_tool_file "$lt_outputfile"~
  5608. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  5609. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5610. $RM "$lt_outputfile.manifest";
  5611. fi'
  5612. ;;
  5613. *)
  5614. # g++
  5615. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5616. # as there is no search path for DLLs.
  5617. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5618. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  5619. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5620. _LT_TAGVAR(always_export_symbols, $1)=no
  5621. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5622. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5623. _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'
  5624. # If the export-symbols file already is a .def file (1st line
  5625. # is EXPORTS), use it as is; otherwise, prepend...
  5626. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5627. cp $export_symbols $output_objdir/$soname.def;
  5628. else
  5629. echo EXPORTS > $output_objdir/$soname.def;
  5630. cat $export_symbols >> $output_objdir/$soname.def;
  5631. fi~
  5632. $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'
  5633. else
  5634. _LT_TAGVAR(ld_shlibs, $1)=no
  5635. fi
  5636. ;;
  5637. esac
  5638. ;;
  5639. darwin* | rhapsody*)
  5640. _LT_DARWIN_LINKER_FEATURES($1)
  5641. ;;
  5642. dgux*)
  5643. case $cc_basename in
  5644. ec++*)
  5645. # FIXME: insert proper C++ library support
  5646. _LT_TAGVAR(ld_shlibs, $1)=no
  5647. ;;
  5648. ghcx*)
  5649. # Green Hills C++ Compiler
  5650. # FIXME: insert proper C++ library support
  5651. _LT_TAGVAR(ld_shlibs, $1)=no
  5652. ;;
  5653. *)
  5654. # FIXME: insert proper C++ library support
  5655. _LT_TAGVAR(ld_shlibs, $1)=no
  5656. ;;
  5657. esac
  5658. ;;
  5659. freebsd2.*)
  5660. # C++ shared libraries reported to be fairly broken before
  5661. # switch to ELF
  5662. _LT_TAGVAR(ld_shlibs, $1)=no
  5663. ;;
  5664. freebsd-elf*)
  5665. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5666. ;;
  5667. freebsd* | dragonfly*)
  5668. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  5669. # conventions
  5670. _LT_TAGVAR(ld_shlibs, $1)=yes
  5671. ;;
  5672. gnu*)
  5673. ;;
  5674. haiku*)
  5675. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5676. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5677. ;;
  5678. hpux9*)
  5679. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5680. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5681. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5682. _LT_TAGVAR(hardcode_direct, $1)=yes
  5683. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5684. # but as the default
  5685. # location of the library.
  5686. case $cc_basename in
  5687. CC*)
  5688. # FIXME: insert proper C++ library support
  5689. _LT_TAGVAR(ld_shlibs, $1)=no
  5690. ;;
  5691. aCC*)
  5692. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5693. # Commands to make compiler produce verbose output that lists
  5694. # what "hidden" libraries, object files and flags are used when
  5695. # linking a shared library.
  5696. #
  5697. # There doesn't appear to be a way to prevent this compiler from
  5698. # explicitly linking system object files so we need to strip them
  5699. # from the output so that they don't get included in the library
  5700. # dependencies.
  5701. 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"'
  5702. ;;
  5703. *)
  5704. if test "$GXX" = yes; then
  5705. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5706. else
  5707. # FIXME: insert proper C++ library support
  5708. _LT_TAGVAR(ld_shlibs, $1)=no
  5709. fi
  5710. ;;
  5711. esac
  5712. ;;
  5713. hpux10*|hpux11*)
  5714. if test $with_gnu_ld = no; then
  5715. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5716. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5717. case $host_cpu in
  5718. hppa*64*|ia64*)
  5719. ;;
  5720. *)
  5721. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5722. ;;
  5723. esac
  5724. fi
  5725. case $host_cpu in
  5726. hppa*64*|ia64*)
  5727. _LT_TAGVAR(hardcode_direct, $1)=no
  5728. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5729. ;;
  5730. *)
  5731. _LT_TAGVAR(hardcode_direct, $1)=yes
  5732. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5733. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5734. # but as the default
  5735. # location of the library.
  5736. ;;
  5737. esac
  5738. case $cc_basename in
  5739. CC*)
  5740. # FIXME: insert proper C++ library support
  5741. _LT_TAGVAR(ld_shlibs, $1)=no
  5742. ;;
  5743. aCC*)
  5744. case $host_cpu in
  5745. hppa*64*)
  5746. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5747. ;;
  5748. ia64*)
  5749. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5750. ;;
  5751. *)
  5752. _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'
  5753. ;;
  5754. esac
  5755. # Commands to make compiler produce verbose output that lists
  5756. # what "hidden" libraries, object files and flags are used when
  5757. # linking a shared library.
  5758. #
  5759. # There doesn't appear to be a way to prevent this compiler from
  5760. # explicitly linking system object files so we need to strip them
  5761. # from the output so that they don't get included in the library
  5762. # dependencies.
  5763. 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"'
  5764. ;;
  5765. *)
  5766. if test "$GXX" = yes; then
  5767. if test $with_gnu_ld = no; then
  5768. case $host_cpu in
  5769. hppa*64*)
  5770. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5771. ;;
  5772. ia64*)
  5773. _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'
  5774. ;;
  5775. *)
  5776. _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'
  5777. ;;
  5778. esac
  5779. fi
  5780. else
  5781. # FIXME: insert proper C++ library support
  5782. _LT_TAGVAR(ld_shlibs, $1)=no
  5783. fi
  5784. ;;
  5785. esac
  5786. ;;
  5787. interix[[3-9]]*)
  5788. _LT_TAGVAR(hardcode_direct, $1)=no
  5789. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5790. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5791. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5792. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5793. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5794. # default) and relocated if they conflict, which is a slow very memory
  5795. # consuming and fragmenting process. To avoid this, we pick a random,
  5796. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5797. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5798. _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'
  5799. _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'
  5800. ;;
  5801. irix5* | irix6*)
  5802. case $cc_basename in
  5803. CC*)
  5804. # SGI C++
  5805. _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'
  5806. # Archives containing C++ object files must be created using
  5807. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  5808. # necessary to make sure instantiated templates are included
  5809. # in the archive.
  5810. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  5811. ;;
  5812. *)
  5813. if test "$GXX" = yes; then
  5814. if test "$with_gnu_ld" = no; then
  5815. _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'
  5816. else
  5817. _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'
  5818. fi
  5819. fi
  5820. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5821. ;;
  5822. esac
  5823. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5824. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5825. _LT_TAGVAR(inherit_rpath, $1)=yes
  5826. ;;
  5827. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  5828. case $cc_basename in
  5829. KCC*)
  5830. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5831. # KCC will only create a shared library if the output file
  5832. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5833. # to its proper name (with version) after linking.
  5834. _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'
  5835. _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'
  5836. # Commands to make compiler produce verbose output that lists
  5837. # what "hidden" libraries, object files and flags are used when
  5838. # linking a shared library.
  5839. #
  5840. # There doesn't appear to be a way to prevent this compiler from
  5841. # explicitly linking system object files so we need to strip them
  5842. # from the output so that they don't get included in the library
  5843. # dependencies.
  5844. 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"'
  5845. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5846. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5847. # Archives containing C++ object files must be created using
  5848. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5849. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5850. ;;
  5851. icpc* | ecpc* )
  5852. # Intel C++
  5853. with_gnu_ld=yes
  5854. # version 8.0 and above of icpc choke on multiply defined symbols
  5855. # if we add $predep_objects and $postdep_objects, however 7.1 and
  5856. # earlier do not add the objects themselves.
  5857. case `$CC -V 2>&1` in
  5858. *"Version 7."*)
  5859. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5860. _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'
  5861. ;;
  5862. *) # Version 8.0 or newer
  5863. tmp_idyn=
  5864. case $host_cpu in
  5865. ia64*) tmp_idyn=' -i_dynamic';;
  5866. esac
  5867. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5868. _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'
  5869. ;;
  5870. esac
  5871. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5872. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5873. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5874. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5875. ;;
  5876. pgCC* | pgcpp*)
  5877. # Portland Group C++ compiler
  5878. case `$CC -V` in
  5879. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  5880. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  5881. rm -rf $tpldir~
  5882. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  5883. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  5884. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  5885. rm -rf $tpldir~
  5886. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  5887. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  5888. $RANLIB $oldlib'
  5889. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  5890. rm -rf $tpldir~
  5891. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5892. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5893. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  5894. rm -rf $tpldir~
  5895. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5896. $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'
  5897. ;;
  5898. *) # Version 6 and above use weak symbols
  5899. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5900. _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'
  5901. ;;
  5902. esac
  5903. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5904. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5905. _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'
  5906. ;;
  5907. cxx*)
  5908. # Compaq C++
  5909. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5910. _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'
  5911. runpath_var=LD_RUN_PATH
  5912. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5913. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5914. # Commands to make compiler produce verbose output that lists
  5915. # what "hidden" libraries, object files and flags are used when
  5916. # linking a shared library.
  5917. #
  5918. # There doesn't appear to be a way to prevent this compiler from
  5919. # explicitly linking system object files so we need to strip them
  5920. # from the output so that they don't get included in the library
  5921. # dependencies.
  5922. 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'
  5923. ;;
  5924. xl* | mpixl* | bgxl*)
  5925. # IBM XL 8.0 on PPC, with GNU ld
  5926. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5927. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5928. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5929. if test "x$supports_anon_versioning" = xyes; then
  5930. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5931. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5932. echo "local: *; };" >> $output_objdir/$libname.ver~
  5933. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5934. fi
  5935. ;;
  5936. *)
  5937. case `$CC -V 2>&1 | sed 5q` in
  5938. *Sun\ C*)
  5939. # Sun C++ 5.9
  5940. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5941. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5942. _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'
  5943. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5944. _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'
  5945. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5946. # Not sure whether something based on
  5947. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  5948. # would be better.
  5949. output_verbose_link_cmd='func_echo_all'
  5950. # Archives containing C++ object files must be created using
  5951. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5952. # necessary to make sure instantiated templates are included
  5953. # in the archive.
  5954. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5955. ;;
  5956. esac
  5957. ;;
  5958. esac
  5959. ;;
  5960. lynxos*)
  5961. # FIXME: insert proper C++ library support
  5962. _LT_TAGVAR(ld_shlibs, $1)=no
  5963. ;;
  5964. m88k*)
  5965. # FIXME: insert proper C++ library support
  5966. _LT_TAGVAR(ld_shlibs, $1)=no
  5967. ;;
  5968. mvs*)
  5969. case $cc_basename in
  5970. cxx*)
  5971. # FIXME: insert proper C++ library support
  5972. _LT_TAGVAR(ld_shlibs, $1)=no
  5973. ;;
  5974. *)
  5975. # FIXME: insert proper C++ library support
  5976. _LT_TAGVAR(ld_shlibs, $1)=no
  5977. ;;
  5978. esac
  5979. ;;
  5980. netbsd*)
  5981. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5982. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  5983. wlarc=
  5984. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5985. _LT_TAGVAR(hardcode_direct, $1)=yes
  5986. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5987. fi
  5988. # Workaround some broken pre-1.5 toolchains
  5989. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  5990. ;;
  5991. *nto* | *qnx*)
  5992. _LT_TAGVAR(ld_shlibs, $1)=yes
  5993. ;;
  5994. openbsd2*)
  5995. # C++ shared libraries are fairly broken
  5996. _LT_TAGVAR(ld_shlibs, $1)=no
  5997. ;;
  5998. openbsd*)
  5999. if test -f /usr/libexec/ld.so; then
  6000. _LT_TAGVAR(hardcode_direct, $1)=yes
  6001. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6002. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6003. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6004. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6005. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6006. _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'
  6007. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6008. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6009. fi
  6010. output_verbose_link_cmd=func_echo_all
  6011. else
  6012. _LT_TAGVAR(ld_shlibs, $1)=no
  6013. fi
  6014. ;;
  6015. osf3* | osf4* | osf5*)
  6016. case $cc_basename in
  6017. KCC*)
  6018. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6019. # KCC will only create a shared library if the output file
  6020. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6021. # to its proper name (with version) after linking.
  6022. _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'
  6023. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6024. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6025. # Archives containing C++ object files must be created using
  6026. # the KAI C++ compiler.
  6027. case $host in
  6028. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6029. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6030. esac
  6031. ;;
  6032. RCC*)
  6033. # Rational C++ 2.4.1
  6034. # FIXME: insert proper C++ library support
  6035. _LT_TAGVAR(ld_shlibs, $1)=no
  6036. ;;
  6037. cxx*)
  6038. case $host in
  6039. osf3*)
  6040. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6041. _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'
  6042. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6043. ;;
  6044. *)
  6045. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6046. _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'
  6047. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6048. echo "-hidden">> $lib.exp~
  6049. $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~
  6050. $RM $lib.exp'
  6051. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6052. ;;
  6053. esac
  6054. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6055. # Commands to make compiler produce verbose output that lists
  6056. # what "hidden" libraries, object files and flags are used when
  6057. # linking a shared library.
  6058. #
  6059. # There doesn't appear to be a way to prevent this compiler from
  6060. # explicitly linking system object files so we need to strip them
  6061. # from the output so that they don't get included in the library
  6062. # dependencies.
  6063. 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"'
  6064. ;;
  6065. *)
  6066. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6067. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6068. case $host in
  6069. osf3*)
  6070. _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'
  6071. ;;
  6072. *)
  6073. _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'
  6074. ;;
  6075. esac
  6076. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6077. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6078. # Commands to make compiler produce verbose output that lists
  6079. # what "hidden" libraries, object files and flags are used when
  6080. # linking a shared library.
  6081. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6082. else
  6083. # FIXME: insert proper C++ library support
  6084. _LT_TAGVAR(ld_shlibs, $1)=no
  6085. fi
  6086. ;;
  6087. esac
  6088. ;;
  6089. psos*)
  6090. # FIXME: insert proper C++ library support
  6091. _LT_TAGVAR(ld_shlibs, $1)=no
  6092. ;;
  6093. sunos4*)
  6094. case $cc_basename in
  6095. CC*)
  6096. # Sun C++ 4.x
  6097. # FIXME: insert proper C++ library support
  6098. _LT_TAGVAR(ld_shlibs, $1)=no
  6099. ;;
  6100. lcc*)
  6101. # Lucid
  6102. # FIXME: insert proper C++ library support
  6103. _LT_TAGVAR(ld_shlibs, $1)=no
  6104. ;;
  6105. *)
  6106. # FIXME: insert proper C++ library support
  6107. _LT_TAGVAR(ld_shlibs, $1)=no
  6108. ;;
  6109. esac
  6110. ;;
  6111. solaris*)
  6112. case $cc_basename in
  6113. CC* | sunCC*)
  6114. # Sun C++ 4.2, 5.x and Centerline C++
  6115. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6116. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6117. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6118. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6119. $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'
  6120. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6121. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6122. case $host_os in
  6123. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6124. *)
  6125. # The compiler driver will combine and reorder linker options,
  6126. # but understands `-z linker_flag'.
  6127. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6128. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6129. ;;
  6130. esac
  6131. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6132. output_verbose_link_cmd='func_echo_all'
  6133. # Archives containing C++ object files must be created using
  6134. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6135. # necessary to make sure instantiated templates are included
  6136. # in the archive.
  6137. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6138. ;;
  6139. gcx*)
  6140. # Green Hills C++ Compiler
  6141. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6142. # The C++ compiler must be used to create the archive.
  6143. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6144. ;;
  6145. *)
  6146. # GNU C++ compiler with Solaris linker
  6147. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6148. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  6149. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6150. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6151. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6152. $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6153. # Commands to make compiler produce verbose output that lists
  6154. # what "hidden" libraries, object files and flags are used when
  6155. # linking a shared library.
  6156. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6157. else
  6158. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  6159. # platform.
  6160. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6161. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6162. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6163. # Commands to make compiler produce verbose output that lists
  6164. # what "hidden" libraries, object files and flags are used when
  6165. # linking a shared library.
  6166. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6167. fi
  6168. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  6169. case $host_os in
  6170. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6171. *)
  6172. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6173. ;;
  6174. esac
  6175. fi
  6176. ;;
  6177. esac
  6178. ;;
  6179. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6180. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6181. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6182. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6183. runpath_var='LD_RUN_PATH'
  6184. case $cc_basename in
  6185. CC*)
  6186. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6187. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6188. ;;
  6189. *)
  6190. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6191. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6192. ;;
  6193. esac
  6194. ;;
  6195. sysv5* | sco3.2v5* | sco5v6*)
  6196. # Note: We can NOT use -z defs as we might desire, because we do not
  6197. # link with -lc, and that would cause any symbols used from libc to
  6198. # always be unresolved, which means just about no library would
  6199. # ever link correctly. If we're not using GNU ld we use -z text
  6200. # though, which does catch some bad symbols but isn't as heavy-handed
  6201. # as -z defs.
  6202. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6203. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  6204. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6205. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6206. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  6207. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6208. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6209. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6210. runpath_var='LD_RUN_PATH'
  6211. case $cc_basename in
  6212. CC*)
  6213. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6214. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6215. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6216. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6217. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6218. '"$_LT_TAGVAR(reload_cmds, $1)"
  6219. ;;
  6220. *)
  6221. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6222. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6223. ;;
  6224. esac
  6225. ;;
  6226. tandem*)
  6227. case $cc_basename in
  6228. NCC*)
  6229. # NonStop-UX NCC 3.20
  6230. # FIXME: insert proper C++ library support
  6231. _LT_TAGVAR(ld_shlibs, $1)=no
  6232. ;;
  6233. *)
  6234. # FIXME: insert proper C++ library support
  6235. _LT_TAGVAR(ld_shlibs, $1)=no
  6236. ;;
  6237. esac
  6238. ;;
  6239. vxworks*)
  6240. # FIXME: insert proper C++ library support
  6241. _LT_TAGVAR(ld_shlibs, $1)=no
  6242. ;;
  6243. *)
  6244. # FIXME: insert proper C++ library support
  6245. _LT_TAGVAR(ld_shlibs, $1)=no
  6246. ;;
  6247. esac
  6248. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6249. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6250. _LT_TAGVAR(GCC, $1)="$GXX"
  6251. _LT_TAGVAR(LD, $1)="$LD"
  6252. ## CAVEAT EMPTOR:
  6253. ## There is no encapsulation within the following macros, do not change
  6254. ## the running order or otherwise move them around unless you know exactly
  6255. ## what you are doing...
  6256. _LT_SYS_HIDDEN_LIBDEPS($1)
  6257. _LT_COMPILER_PIC($1)
  6258. _LT_COMPILER_C_O($1)
  6259. _LT_COMPILER_FILE_LOCKS($1)
  6260. _LT_LINKER_SHLIBS($1)
  6261. _LT_SYS_DYNAMIC_LINKER($1)
  6262. _LT_LINKER_HARDCODE_LIBPATH($1)
  6263. _LT_CONFIG($1)
  6264. fi # test -n "$compiler"
  6265. CC=$lt_save_CC
  6266. CFLAGS=$lt_save_CFLAGS
  6267. LDCXX=$LD
  6268. LD=$lt_save_LD
  6269. GCC=$lt_save_GCC
  6270. with_gnu_ld=$lt_save_with_gnu_ld
  6271. lt_cv_path_LDCXX=$lt_cv_path_LD
  6272. lt_cv_path_LD=$lt_save_path_LD
  6273. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6274. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6275. fi # test "$_lt_caught_CXX_error" != yes
  6276. AC_LANG_POP
  6277. ])# _LT_LANG_CXX_CONFIG
  6278. # _LT_FUNC_STRIPNAME_CNF
  6279. # ----------------------
  6280. # func_stripname_cnf prefix suffix name
  6281. # strip PREFIX and SUFFIX off of NAME.
  6282. # PREFIX and SUFFIX must not contain globbing or regex special
  6283. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6284. # dot (in which case that matches only a dot).
  6285. #
  6286. # This function is identical to the (non-XSI) version of func_stripname,
  6287. # except this one can be used by m4 code that may be executed by configure,
  6288. # rather than the libtool script.
  6289. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6290. AC_REQUIRE([_LT_DECL_SED])
  6291. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6292. func_stripname_cnf ()
  6293. {
  6294. case ${2} in
  6295. .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
  6296. *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
  6297. esac
  6298. } # func_stripname_cnf
  6299. ])# _LT_FUNC_STRIPNAME_CNF
  6300. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6301. # ---------------------------------
  6302. # Figure out "hidden" library dependencies from verbose
  6303. # compiler output when linking a shared library.
  6304. # Parse the compiler output and extract the necessary
  6305. # objects, libraries and library flags.
  6306. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6307. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6308. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6309. # Dependencies to place before and after the object being linked:
  6310. _LT_TAGVAR(predep_objects, $1)=
  6311. _LT_TAGVAR(postdep_objects, $1)=
  6312. _LT_TAGVAR(predeps, $1)=
  6313. _LT_TAGVAR(postdeps, $1)=
  6314. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6315. dnl we can't use the lt_simple_compile_test_code here,
  6316. dnl because it contains code intended for an executable,
  6317. dnl not a library. It's possible we should let each
  6318. dnl tag define a new lt_????_link_test_code variable,
  6319. dnl but it's only used here...
  6320. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6321. int a;
  6322. void foo (void) { a = 0; }
  6323. _LT_EOF
  6324. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6325. class Foo
  6326. {
  6327. public:
  6328. Foo (void) { a = 0; }
  6329. private:
  6330. int a;
  6331. };
  6332. _LT_EOF
  6333. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6334. subroutine foo
  6335. implicit none
  6336. integer*4 a
  6337. a=0
  6338. return
  6339. end
  6340. _LT_EOF
  6341. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6342. subroutine foo
  6343. implicit none
  6344. integer a
  6345. a=0
  6346. return
  6347. end
  6348. _LT_EOF
  6349. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6350. public class foo {
  6351. private int a;
  6352. public void bar (void) {
  6353. a = 0;
  6354. }
  6355. };
  6356. _LT_EOF
  6357. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6358. package foo
  6359. func foo() {
  6360. }
  6361. _LT_EOF
  6362. ])
  6363. _lt_libdeps_save_CFLAGS=$CFLAGS
  6364. case "$CC $CFLAGS " in #(
  6365. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6366. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6367. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6368. esac
  6369. dnl Parse the compiler output and extract the necessary
  6370. dnl objects, libraries and library flags.
  6371. if AC_TRY_EVAL(ac_compile); then
  6372. # Parse the compiler output and extract the necessary
  6373. # objects, libraries and library flags.
  6374. # Sentinel used to keep track of whether or not we are before
  6375. # the conftest object file.
  6376. pre_test_object_deps_done=no
  6377. for p in `eval "$output_verbose_link_cmd"`; do
  6378. case ${prev}${p} in
  6379. -L* | -R* | -l*)
  6380. # Some compilers place space between "-{L,R}" and the path.
  6381. # Remove the space.
  6382. if test $p = "-L" ||
  6383. test $p = "-R"; then
  6384. prev=$p
  6385. continue
  6386. fi
  6387. # Expand the sysroot to ease extracting the directories later.
  6388. if test -z "$prev"; then
  6389. case $p in
  6390. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6391. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6392. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6393. esac
  6394. fi
  6395. case $p in
  6396. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6397. esac
  6398. if test "$pre_test_object_deps_done" = no; then
  6399. case ${prev} in
  6400. -L | -R)
  6401. # Internal compiler library paths should come after those
  6402. # provided the user. The postdeps already come after the
  6403. # user supplied libs so there is no need to process them.
  6404. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6405. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  6406. else
  6407. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  6408. fi
  6409. ;;
  6410. # The "-l" case would never come before the object being
  6411. # linked, so don't bother handling this case.
  6412. esac
  6413. else
  6414. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6415. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  6416. else
  6417. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  6418. fi
  6419. fi
  6420. prev=
  6421. ;;
  6422. *.lto.$objext) ;; # Ignore GCC LTO objects
  6423. *.$objext)
  6424. # This assumes that the test object file only shows up
  6425. # once in the compiler output.
  6426. if test "$p" = "conftest.$objext"; then
  6427. pre_test_object_deps_done=yes
  6428. continue
  6429. fi
  6430. if test "$pre_test_object_deps_done" = no; then
  6431. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6432. _LT_TAGVAR(predep_objects, $1)="$p"
  6433. else
  6434. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6435. fi
  6436. else
  6437. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6438. _LT_TAGVAR(postdep_objects, $1)="$p"
  6439. else
  6440. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6441. fi
  6442. fi
  6443. ;;
  6444. *) ;; # Ignore the rest.
  6445. esac
  6446. done
  6447. # Clean up.
  6448. rm -f a.out a.exe
  6449. else
  6450. echo "libtool.m4: error: problem compiling $1 test program"
  6451. fi
  6452. $RM -f confest.$objext
  6453. CFLAGS=$_lt_libdeps_save_CFLAGS
  6454. # PORTME: override above test on systems where it is broken
  6455. m4_if([$1], [CXX],
  6456. [case $host_os in
  6457. interix[[3-9]]*)
  6458. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6459. # hack all around it, let's just trust "g++" to DTRT.
  6460. _LT_TAGVAR(predep_objects,$1)=
  6461. _LT_TAGVAR(postdep_objects,$1)=
  6462. _LT_TAGVAR(postdeps,$1)=
  6463. ;;
  6464. linux*)
  6465. case `$CC -V 2>&1 | sed 5q` in
  6466. *Sun\ C*)
  6467. # Sun C++ 5.9
  6468. # The more standards-conforming stlport4 library is
  6469. # incompatible with the Cstd library. Avoid specifying
  6470. # it if it's in CXXFLAGS. Ignore libCrun as
  6471. # -library=stlport4 depends on it.
  6472. case " $CXX $CXXFLAGS " in
  6473. *" -library=stlport4 "*)
  6474. solaris_use_stlport4=yes
  6475. ;;
  6476. esac
  6477. if test "$solaris_use_stlport4" != yes; then
  6478. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6479. fi
  6480. ;;
  6481. esac
  6482. ;;
  6483. solaris*)
  6484. case $cc_basename in
  6485. CC* | sunCC*)
  6486. # The more standards-conforming stlport4 library is
  6487. # incompatible with the Cstd library. Avoid specifying
  6488. # it if it's in CXXFLAGS. Ignore libCrun as
  6489. # -library=stlport4 depends on it.
  6490. case " $CXX $CXXFLAGS " in
  6491. *" -library=stlport4 "*)
  6492. solaris_use_stlport4=yes
  6493. ;;
  6494. esac
  6495. # Adding this requires a known-good setup of shared libraries for
  6496. # Sun compiler versions before 5.6, else PIC objects from an old
  6497. # archive will be linked into the output, leading to subtle bugs.
  6498. if test "$solaris_use_stlport4" != yes; then
  6499. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6500. fi
  6501. ;;
  6502. esac
  6503. ;;
  6504. esac
  6505. ])
  6506. case " $_LT_TAGVAR(postdeps, $1) " in
  6507. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6508. esac
  6509. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6510. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6511. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  6512. fi
  6513. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  6514. [The directories searched by this compiler when creating a shared library])
  6515. _LT_TAGDECL([], [predep_objects], [1],
  6516. [Dependencies to place before and after the objects being linked to
  6517. create a shared library])
  6518. _LT_TAGDECL([], [postdep_objects], [1])
  6519. _LT_TAGDECL([], [predeps], [1])
  6520. _LT_TAGDECL([], [postdeps], [1])
  6521. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  6522. [The library search path used internally by the compiler when linking
  6523. a shared library])
  6524. ])# _LT_SYS_HIDDEN_LIBDEPS
  6525. # _LT_LANG_F77_CONFIG([TAG])
  6526. # --------------------------
  6527. # Ensure that the configuration variables for a Fortran 77 compiler are
  6528. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6529. # to write the compiler configuration to `libtool'.
  6530. m4_defun([_LT_LANG_F77_CONFIG],
  6531. [AC_LANG_PUSH(Fortran 77)
  6532. if test -z "$F77" || test "X$F77" = "Xno"; then
  6533. _lt_disable_F77=yes
  6534. fi
  6535. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6536. _LT_TAGVAR(allow_undefined_flag, $1)=
  6537. _LT_TAGVAR(always_export_symbols, $1)=no
  6538. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6539. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6540. _LT_TAGVAR(hardcode_direct, $1)=no
  6541. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6542. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6543. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6544. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6545. _LT_TAGVAR(hardcode_automatic, $1)=no
  6546. _LT_TAGVAR(inherit_rpath, $1)=no
  6547. _LT_TAGVAR(module_cmds, $1)=
  6548. _LT_TAGVAR(module_expsym_cmds, $1)=
  6549. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6550. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6551. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6552. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6553. _LT_TAGVAR(no_undefined_flag, $1)=
  6554. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6555. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6556. # Source file extension for f77 test sources.
  6557. ac_ext=f
  6558. # Object file extension for compiled f77 test sources.
  6559. objext=o
  6560. _LT_TAGVAR(objext, $1)=$objext
  6561. # No sense in running all these tests if we already determined that
  6562. # the F77 compiler isn't working. Some variables (like enable_shared)
  6563. # are currently assumed to apply to all compilers on this platform,
  6564. # and will be corrupted by setting them based on a non-working compiler.
  6565. if test "$_lt_disable_F77" != yes; then
  6566. # Code to be used in simple compile tests
  6567. lt_simple_compile_test_code="\
  6568. subroutine t
  6569. return
  6570. end
  6571. "
  6572. # Code to be used in simple link tests
  6573. lt_simple_link_test_code="\
  6574. program t
  6575. end
  6576. "
  6577. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6578. _LT_TAG_COMPILER
  6579. # save warnings/boilerplate of simple test code
  6580. _LT_COMPILER_BOILERPLATE
  6581. _LT_LINKER_BOILERPLATE
  6582. # Allow CC to be a program name with arguments.
  6583. lt_save_CC="$CC"
  6584. lt_save_GCC=$GCC
  6585. lt_save_CFLAGS=$CFLAGS
  6586. CC=${F77-"f77"}
  6587. CFLAGS=$FFLAGS
  6588. compiler=$CC
  6589. _LT_TAGVAR(compiler, $1)=$CC
  6590. _LT_CC_BASENAME([$compiler])
  6591. GCC=$G77
  6592. if test -n "$compiler"; then
  6593. AC_MSG_CHECKING([if libtool supports shared libraries])
  6594. AC_MSG_RESULT([$can_build_shared])
  6595. AC_MSG_CHECKING([whether to build shared libraries])
  6596. test "$can_build_shared" = "no" && enable_shared=no
  6597. # On AIX, shared libraries and static libraries use the same namespace, and
  6598. # are all built from PIC.
  6599. case $host_os in
  6600. aix3*)
  6601. test "$enable_shared" = yes && enable_static=no
  6602. if test -n "$RANLIB"; then
  6603. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6604. postinstall_cmds='$RANLIB $lib'
  6605. fi
  6606. ;;
  6607. aix[[4-9]]*)
  6608. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6609. test "$enable_shared" = yes && enable_static=no
  6610. fi
  6611. ;;
  6612. esac
  6613. AC_MSG_RESULT([$enable_shared])
  6614. AC_MSG_CHECKING([whether to build static libraries])
  6615. # Make sure either enable_shared or enable_static is yes.
  6616. test "$enable_shared" = yes || enable_static=yes
  6617. AC_MSG_RESULT([$enable_static])
  6618. _LT_TAGVAR(GCC, $1)="$G77"
  6619. _LT_TAGVAR(LD, $1)="$LD"
  6620. ## CAVEAT EMPTOR:
  6621. ## There is no encapsulation within the following macros, do not change
  6622. ## the running order or otherwise move them around unless you know exactly
  6623. ## what you are doing...
  6624. _LT_COMPILER_PIC($1)
  6625. _LT_COMPILER_C_O($1)
  6626. _LT_COMPILER_FILE_LOCKS($1)
  6627. _LT_LINKER_SHLIBS($1)
  6628. _LT_SYS_DYNAMIC_LINKER($1)
  6629. _LT_LINKER_HARDCODE_LIBPATH($1)
  6630. _LT_CONFIG($1)
  6631. fi # test -n "$compiler"
  6632. GCC=$lt_save_GCC
  6633. CC="$lt_save_CC"
  6634. CFLAGS="$lt_save_CFLAGS"
  6635. fi # test "$_lt_disable_F77" != yes
  6636. AC_LANG_POP
  6637. ])# _LT_LANG_F77_CONFIG
  6638. # _LT_LANG_FC_CONFIG([TAG])
  6639. # -------------------------
  6640. # Ensure that the configuration variables for a Fortran compiler are
  6641. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6642. # to write the compiler configuration to `libtool'.
  6643. m4_defun([_LT_LANG_FC_CONFIG],
  6644. [AC_LANG_PUSH(Fortran)
  6645. if test -z "$FC" || test "X$FC" = "Xno"; then
  6646. _lt_disable_FC=yes
  6647. fi
  6648. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6649. _LT_TAGVAR(allow_undefined_flag, $1)=
  6650. _LT_TAGVAR(always_export_symbols, $1)=no
  6651. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6652. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6653. _LT_TAGVAR(hardcode_direct, $1)=no
  6654. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6655. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6656. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6657. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6658. _LT_TAGVAR(hardcode_automatic, $1)=no
  6659. _LT_TAGVAR(inherit_rpath, $1)=no
  6660. _LT_TAGVAR(module_cmds, $1)=
  6661. _LT_TAGVAR(module_expsym_cmds, $1)=
  6662. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6663. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6664. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6665. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6666. _LT_TAGVAR(no_undefined_flag, $1)=
  6667. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6668. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6669. # Source file extension for fc test sources.
  6670. ac_ext=${ac_fc_srcext-f}
  6671. # Object file extension for compiled fc test sources.
  6672. objext=o
  6673. _LT_TAGVAR(objext, $1)=$objext
  6674. # No sense in running all these tests if we already determined that
  6675. # the FC compiler isn't working. Some variables (like enable_shared)
  6676. # are currently assumed to apply to all compilers on this platform,
  6677. # and will be corrupted by setting them based on a non-working compiler.
  6678. if test "$_lt_disable_FC" != yes; then
  6679. # Code to be used in simple compile tests
  6680. lt_simple_compile_test_code="\
  6681. subroutine t
  6682. return
  6683. end
  6684. "
  6685. # Code to be used in simple link tests
  6686. lt_simple_link_test_code="\
  6687. program t
  6688. end
  6689. "
  6690. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6691. _LT_TAG_COMPILER
  6692. # save warnings/boilerplate of simple test code
  6693. _LT_COMPILER_BOILERPLATE
  6694. _LT_LINKER_BOILERPLATE
  6695. # Allow CC to be a program name with arguments.
  6696. lt_save_CC="$CC"
  6697. lt_save_GCC=$GCC
  6698. lt_save_CFLAGS=$CFLAGS
  6699. CC=${FC-"f95"}
  6700. CFLAGS=$FCFLAGS
  6701. compiler=$CC
  6702. GCC=$ac_cv_fc_compiler_gnu
  6703. _LT_TAGVAR(compiler, $1)=$CC
  6704. _LT_CC_BASENAME([$compiler])
  6705. if test -n "$compiler"; then
  6706. AC_MSG_CHECKING([if libtool supports shared libraries])
  6707. AC_MSG_RESULT([$can_build_shared])
  6708. AC_MSG_CHECKING([whether to build shared libraries])
  6709. test "$can_build_shared" = "no" && enable_shared=no
  6710. # On AIX, shared libraries and static libraries use the same namespace, and
  6711. # are all built from PIC.
  6712. case $host_os in
  6713. aix3*)
  6714. test "$enable_shared" = yes && enable_static=no
  6715. if test -n "$RANLIB"; then
  6716. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6717. postinstall_cmds='$RANLIB $lib'
  6718. fi
  6719. ;;
  6720. aix[[4-9]]*)
  6721. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6722. test "$enable_shared" = yes && enable_static=no
  6723. fi
  6724. ;;
  6725. esac
  6726. AC_MSG_RESULT([$enable_shared])
  6727. AC_MSG_CHECKING([whether to build static libraries])
  6728. # Make sure either enable_shared or enable_static is yes.
  6729. test "$enable_shared" = yes || enable_static=yes
  6730. AC_MSG_RESULT([$enable_static])
  6731. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  6732. _LT_TAGVAR(LD, $1)="$LD"
  6733. ## CAVEAT EMPTOR:
  6734. ## There is no encapsulation within the following macros, do not change
  6735. ## the running order or otherwise move them around unless you know exactly
  6736. ## what you are doing...
  6737. _LT_SYS_HIDDEN_LIBDEPS($1)
  6738. _LT_COMPILER_PIC($1)
  6739. _LT_COMPILER_C_O($1)
  6740. _LT_COMPILER_FILE_LOCKS($1)
  6741. _LT_LINKER_SHLIBS($1)
  6742. _LT_SYS_DYNAMIC_LINKER($1)
  6743. _LT_LINKER_HARDCODE_LIBPATH($1)
  6744. _LT_CONFIG($1)
  6745. fi # test -n "$compiler"
  6746. GCC=$lt_save_GCC
  6747. CC=$lt_save_CC
  6748. CFLAGS=$lt_save_CFLAGS
  6749. fi # test "$_lt_disable_FC" != yes
  6750. AC_LANG_POP
  6751. ])# _LT_LANG_FC_CONFIG
  6752. # _LT_LANG_GCJ_CONFIG([TAG])
  6753. # --------------------------
  6754. # Ensure that the configuration variables for the GNU Java Compiler compiler
  6755. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6756. # to write the compiler configuration to `libtool'.
  6757. m4_defun([_LT_LANG_GCJ_CONFIG],
  6758. [AC_REQUIRE([LT_PROG_GCJ])dnl
  6759. AC_LANG_SAVE
  6760. # Source file extension for Java test sources.
  6761. ac_ext=java
  6762. # Object file extension for compiled Java test sources.
  6763. objext=o
  6764. _LT_TAGVAR(objext, $1)=$objext
  6765. # Code to be used in simple compile tests
  6766. lt_simple_compile_test_code="class foo {}"
  6767. # Code to be used in simple link tests
  6768. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  6769. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6770. _LT_TAG_COMPILER
  6771. # save warnings/boilerplate of simple test code
  6772. _LT_COMPILER_BOILERPLATE
  6773. _LT_LINKER_BOILERPLATE
  6774. # Allow CC to be a program name with arguments.
  6775. lt_save_CC=$CC
  6776. lt_save_CFLAGS=$CFLAGS
  6777. lt_save_GCC=$GCC
  6778. GCC=yes
  6779. CC=${GCJ-"gcj"}
  6780. CFLAGS=$GCJFLAGS
  6781. compiler=$CC
  6782. _LT_TAGVAR(compiler, $1)=$CC
  6783. _LT_TAGVAR(LD, $1)="$LD"
  6784. _LT_CC_BASENAME([$compiler])
  6785. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  6786. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6787. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6788. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6789. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6790. if test -n "$compiler"; then
  6791. _LT_COMPILER_NO_RTTI($1)
  6792. _LT_COMPILER_PIC($1)
  6793. _LT_COMPILER_C_O($1)
  6794. _LT_COMPILER_FILE_LOCKS($1)
  6795. _LT_LINKER_SHLIBS($1)
  6796. _LT_LINKER_HARDCODE_LIBPATH($1)
  6797. _LT_CONFIG($1)
  6798. fi
  6799. AC_LANG_RESTORE
  6800. GCC=$lt_save_GCC
  6801. CC=$lt_save_CC
  6802. CFLAGS=$lt_save_CFLAGS
  6803. ])# _LT_LANG_GCJ_CONFIG
  6804. # _LT_LANG_GO_CONFIG([TAG])
  6805. # --------------------------
  6806. # Ensure that the configuration variables for the GNU Go compiler
  6807. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6808. # to write the compiler configuration to `libtool'.
  6809. m4_defun([_LT_LANG_GO_CONFIG],
  6810. [AC_REQUIRE([LT_PROG_GO])dnl
  6811. AC_LANG_SAVE
  6812. # Source file extension for Go test sources.
  6813. ac_ext=go
  6814. # Object file extension for compiled Go test sources.
  6815. objext=o
  6816. _LT_TAGVAR(objext, $1)=$objext
  6817. # Code to be used in simple compile tests
  6818. lt_simple_compile_test_code="package main; func main() { }"
  6819. # Code to be used in simple link tests
  6820. lt_simple_link_test_code='package main; func main() { }'
  6821. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6822. _LT_TAG_COMPILER
  6823. # save warnings/boilerplate of simple test code
  6824. _LT_COMPILER_BOILERPLATE
  6825. _LT_LINKER_BOILERPLATE
  6826. # Allow CC to be a program name with arguments.
  6827. lt_save_CC=$CC
  6828. lt_save_CFLAGS=$CFLAGS
  6829. lt_save_GCC=$GCC
  6830. GCC=yes
  6831. CC=${GOC-"gccgo"}
  6832. CFLAGS=$GOFLAGS
  6833. compiler=$CC
  6834. _LT_TAGVAR(compiler, $1)=$CC
  6835. _LT_TAGVAR(LD, $1)="$LD"
  6836. _LT_CC_BASENAME([$compiler])
  6837. # Go did not exist at the time GCC didn't implicitly link libc in.
  6838. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6839. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6840. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6841. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6842. if test -n "$compiler"; then
  6843. _LT_COMPILER_NO_RTTI($1)
  6844. _LT_COMPILER_PIC($1)
  6845. _LT_COMPILER_C_O($1)
  6846. _LT_COMPILER_FILE_LOCKS($1)
  6847. _LT_LINKER_SHLIBS($1)
  6848. _LT_LINKER_HARDCODE_LIBPATH($1)
  6849. _LT_CONFIG($1)
  6850. fi
  6851. AC_LANG_RESTORE
  6852. GCC=$lt_save_GCC
  6853. CC=$lt_save_CC
  6854. CFLAGS=$lt_save_CFLAGS
  6855. ])# _LT_LANG_GO_CONFIG
  6856. # _LT_LANG_RC_CONFIG([TAG])
  6857. # -------------------------
  6858. # Ensure that the configuration variables for the Windows resource compiler
  6859. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6860. # to write the compiler configuration to `libtool'.
  6861. m4_defun([_LT_LANG_RC_CONFIG],
  6862. [AC_REQUIRE([LT_PROG_RC])dnl
  6863. AC_LANG_SAVE
  6864. # Source file extension for RC test sources.
  6865. ac_ext=rc
  6866. # Object file extension for compiled RC test sources.
  6867. objext=o
  6868. _LT_TAGVAR(objext, $1)=$objext
  6869. # Code to be used in simple compile tests
  6870. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  6871. # Code to be used in simple link tests
  6872. lt_simple_link_test_code="$lt_simple_compile_test_code"
  6873. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6874. _LT_TAG_COMPILER
  6875. # save warnings/boilerplate of simple test code
  6876. _LT_COMPILER_BOILERPLATE
  6877. _LT_LINKER_BOILERPLATE
  6878. # Allow CC to be a program name with arguments.
  6879. lt_save_CC="$CC"
  6880. lt_save_CFLAGS=$CFLAGS
  6881. lt_save_GCC=$GCC
  6882. GCC=
  6883. CC=${RC-"windres"}
  6884. CFLAGS=
  6885. compiler=$CC
  6886. _LT_TAGVAR(compiler, $1)=$CC
  6887. _LT_CC_BASENAME([$compiler])
  6888. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  6889. if test -n "$compiler"; then
  6890. :
  6891. _LT_CONFIG($1)
  6892. fi
  6893. GCC=$lt_save_GCC
  6894. AC_LANG_RESTORE
  6895. CC=$lt_save_CC
  6896. CFLAGS=$lt_save_CFLAGS
  6897. ])# _LT_LANG_RC_CONFIG
  6898. # LT_PROG_GCJ
  6899. # -----------
  6900. AC_DEFUN([LT_PROG_GCJ],
  6901. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  6902. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  6903. [AC_CHECK_TOOL(GCJ, gcj,)
  6904. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  6905. AC_SUBST(GCJFLAGS)])])[]dnl
  6906. ])
  6907. # Old name:
  6908. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  6909. dnl aclocal-1.4 backwards compatibility:
  6910. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  6911. # LT_PROG_GO
  6912. # ----------
  6913. AC_DEFUN([LT_PROG_GO],
  6914. [AC_CHECK_TOOL(GOC, gccgo,)
  6915. ])
  6916. # LT_PROG_RC
  6917. # ----------
  6918. AC_DEFUN([LT_PROG_RC],
  6919. [AC_CHECK_TOOL(RC, windres,)
  6920. ])
  6921. # Old name:
  6922. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  6923. dnl aclocal-1.4 backwards compatibility:
  6924. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  6925. # _LT_DECL_EGREP
  6926. # --------------
  6927. # If we don't have a new enough Autoconf to choose the best grep
  6928. # available, choose the one first in the user's PATH.
  6929. m4_defun([_LT_DECL_EGREP],
  6930. [AC_REQUIRE([AC_PROG_EGREP])dnl
  6931. AC_REQUIRE([AC_PROG_FGREP])dnl
  6932. test -z "$GREP" && GREP=grep
  6933. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  6934. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  6935. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  6936. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  6937. AC_SUBST([GREP])
  6938. ])
  6939. # _LT_DECL_OBJDUMP
  6940. # --------------
  6941. # If we don't have a new enough Autoconf to choose the best objdump
  6942. # available, choose the one first in the user's PATH.
  6943. m4_defun([_LT_DECL_OBJDUMP],
  6944. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  6945. test -z "$OBJDUMP" && OBJDUMP=objdump
  6946. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  6947. AC_SUBST([OBJDUMP])
  6948. ])
  6949. # _LT_DECL_DLLTOOL
  6950. # ----------------
  6951. # Ensure DLLTOOL variable is set.
  6952. m4_defun([_LT_DECL_DLLTOOL],
  6953. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  6954. test -z "$DLLTOOL" && DLLTOOL=dlltool
  6955. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  6956. AC_SUBST([DLLTOOL])
  6957. ])
  6958. # _LT_DECL_SED
  6959. # ------------
  6960. # Check for a fully-functional sed program, that truncates
  6961. # as few characters as possible. Prefer GNU sed if found.
  6962. m4_defun([_LT_DECL_SED],
  6963. [AC_PROG_SED
  6964. test -z "$SED" && SED=sed
  6965. Xsed="$SED -e 1s/^X//"
  6966. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  6967. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  6968. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  6969. ])# _LT_DECL_SED
  6970. m4_ifndef([AC_PROG_SED], [
  6971. # NOTE: This macro has been submitted for inclusion into #
  6972. # GNU Autoconf as AC_PROG_SED. When it is available in #
  6973. # a released version of Autoconf we should remove this #
  6974. # macro and use it instead. #
  6975. m4_defun([AC_PROG_SED],
  6976. [AC_MSG_CHECKING([for a sed that does not truncate output])
  6977. AC_CACHE_VAL(lt_cv_path_SED,
  6978. [# Loop through the user's path and test for sed and gsed.
  6979. # Then use that list of sed's as ones to test for truncation.
  6980. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6981. for as_dir in $PATH
  6982. do
  6983. IFS=$as_save_IFS
  6984. test -z "$as_dir" && as_dir=.
  6985. for lt_ac_prog in sed gsed; do
  6986. for ac_exec_ext in '' $ac_executable_extensions; do
  6987. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  6988. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  6989. fi
  6990. done
  6991. done
  6992. done
  6993. IFS=$as_save_IFS
  6994. lt_ac_max=0
  6995. lt_ac_count=0
  6996. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  6997. # along with /bin/sed that truncates output.
  6998. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  6999. test ! -f $lt_ac_sed && continue
  7000. cat /dev/null > conftest.in
  7001. lt_ac_count=0
  7002. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7003. # Check for GNU sed and select it if it is found.
  7004. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7005. lt_cv_path_SED=$lt_ac_sed
  7006. break
  7007. fi
  7008. while true; do
  7009. cat conftest.in conftest.in >conftest.tmp
  7010. mv conftest.tmp conftest.in
  7011. cp conftest.in conftest.nl
  7012. echo >>conftest.nl
  7013. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7014. cmp -s conftest.out conftest.nl || break
  7015. # 10000 chars as input seems more than enough
  7016. test $lt_ac_count -gt 10 && break
  7017. lt_ac_count=`expr $lt_ac_count + 1`
  7018. if test $lt_ac_count -gt $lt_ac_max; then
  7019. lt_ac_max=$lt_ac_count
  7020. lt_cv_path_SED=$lt_ac_sed
  7021. fi
  7022. done
  7023. done
  7024. ])
  7025. SED=$lt_cv_path_SED
  7026. AC_SUBST([SED])
  7027. AC_MSG_RESULT([$SED])
  7028. ])#AC_PROG_SED
  7029. ])#m4_ifndef
  7030. # Old name:
  7031. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7032. dnl aclocal-1.4 backwards compatibility:
  7033. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7034. # _LT_CHECK_SHELL_FEATURES
  7035. # ------------------------
  7036. # Find out whether the shell is Bourne or XSI compatible,
  7037. # or has some other useful features.
  7038. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7039. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  7040. # Try some XSI features
  7041. xsi_shell=no
  7042. ( _lt_dummy="a/b/c"
  7043. test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
  7044. = c,a/b,b/c, \
  7045. && eval 'test $(( 1 + 1 )) -eq 2 \
  7046. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  7047. && xsi_shell=yes
  7048. AC_MSG_RESULT([$xsi_shell])
  7049. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  7050. AC_MSG_CHECKING([whether the shell understands "+="])
  7051. lt_shell_append=no
  7052. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  7053. >/dev/null 2>&1 \
  7054. && lt_shell_append=yes
  7055. AC_MSG_RESULT([$lt_shell_append])
  7056. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  7057. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7058. lt_unset=unset
  7059. else
  7060. lt_unset=false
  7061. fi
  7062. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7063. # test EBCDIC or ASCII
  7064. case `echo X|tr X '\101'` in
  7065. A) # ASCII based system
  7066. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7067. lt_SP2NL='tr \040 \012'
  7068. lt_NL2SP='tr \015\012 \040\040'
  7069. ;;
  7070. *) # EBCDIC based system
  7071. lt_SP2NL='tr \100 \n'
  7072. lt_NL2SP='tr \r\n \100\100'
  7073. ;;
  7074. esac
  7075. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7076. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7077. ])# _LT_CHECK_SHELL_FEATURES
  7078. # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
  7079. # ------------------------------------------------------
  7080. # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
  7081. # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
  7082. m4_defun([_LT_PROG_FUNCTION_REPLACE],
  7083. [dnl {
  7084. sed -e '/^$1 ()$/,/^} # $1 /c\
  7085. $1 ()\
  7086. {\
  7087. m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
  7088. } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
  7089. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7090. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7091. test 0 -eq $? || _lt_function_replace_fail=:
  7092. ])
  7093. # _LT_PROG_REPLACE_SHELLFNS
  7094. # -------------------------
  7095. # Replace existing portable implementations of several shell functions with
  7096. # equivalent extended shell implementations where those features are available..
  7097. m4_defun([_LT_PROG_REPLACE_SHELLFNS],
  7098. [if test x"$xsi_shell" = xyes; then
  7099. _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
  7100. case ${1} in
  7101. */*) func_dirname_result="${1%/*}${2}" ;;
  7102. * ) func_dirname_result="${3}" ;;
  7103. esac])
  7104. _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
  7105. func_basename_result="${1##*/}"])
  7106. _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
  7107. case ${1} in
  7108. */*) func_dirname_result="${1%/*}${2}" ;;
  7109. * ) func_dirname_result="${3}" ;;
  7110. esac
  7111. func_basename_result="${1##*/}"])
  7112. _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
  7113. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  7114. # positional parameters, so assign one to ordinary parameter first.
  7115. func_stripname_result=${3}
  7116. func_stripname_result=${func_stripname_result#"${1}"}
  7117. func_stripname_result=${func_stripname_result%"${2}"}])
  7118. _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
  7119. func_split_long_opt_name=${1%%=*}
  7120. func_split_long_opt_arg=${1#*=}])
  7121. _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
  7122. func_split_short_opt_arg=${1#??}
  7123. func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
  7124. _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
  7125. case ${1} in
  7126. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  7127. *) func_lo2o_result=${1} ;;
  7128. esac])
  7129. _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
  7130. _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
  7131. _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
  7132. fi
  7133. if test x"$lt_shell_append" = xyes; then
  7134. _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
  7135. _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
  7136. func_quote_for_eval "${2}"
  7137. dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
  7138. eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
  7139. # Save a `func_append' function call where possible by direct use of '+='
  7140. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
  7141. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7142. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7143. test 0 -eq $? || _lt_function_replace_fail=:
  7144. else
  7145. # Save a `func_append' function call even when '+=' is not available
  7146. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
  7147. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7148. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7149. test 0 -eq $? || _lt_function_replace_fail=:
  7150. fi
  7151. if test x"$_lt_function_replace_fail" = x":"; then
  7152. AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
  7153. fi
  7154. ])
  7155. # _LT_PATH_CONVERSION_FUNCTIONS
  7156. # -----------------------------
  7157. # Determine which file name conversion functions should be used by
  7158. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7159. # for certain cross-compile configurations and native mingw.
  7160. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7161. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7162. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7163. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7164. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7165. [case $host in
  7166. *-*-mingw* )
  7167. case $build in
  7168. *-*-mingw* ) # actually msys
  7169. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7170. ;;
  7171. *-*-cygwin* )
  7172. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7173. ;;
  7174. * ) # otherwise, assume *nix
  7175. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7176. ;;
  7177. esac
  7178. ;;
  7179. *-*-cygwin* )
  7180. case $build in
  7181. *-*-mingw* ) # actually msys
  7182. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7183. ;;
  7184. *-*-cygwin* )
  7185. lt_cv_to_host_file_cmd=func_convert_file_noop
  7186. ;;
  7187. * ) # otherwise, assume *nix
  7188. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7189. ;;
  7190. esac
  7191. ;;
  7192. * ) # unhandled hosts (and "normal" native builds)
  7193. lt_cv_to_host_file_cmd=func_convert_file_noop
  7194. ;;
  7195. esac
  7196. ])
  7197. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7198. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7199. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7200. [0], [convert $build file names to $host format])dnl
  7201. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7202. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7203. [#assume ordinary cross tools, or native build.
  7204. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7205. case $host in
  7206. *-*-mingw* )
  7207. case $build in
  7208. *-*-mingw* ) # actually msys
  7209. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7210. ;;
  7211. esac
  7212. ;;
  7213. esac
  7214. ])
  7215. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7216. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7217. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7218. [0], [convert $build files to toolchain format])dnl
  7219. ])# _LT_PATH_CONVERSION_FUNCTIONS
  7220. # Helper functions for option handling. -*- Autoconf -*-
  7221. #
  7222. # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
  7223. # Inc.
  7224. # Written by Gary V. Vaughan, 2004
  7225. #
  7226. # This file is free software; the Free Software Foundation gives
  7227. # unlimited permission to copy and/or distribute it, with or without
  7228. # modifications, as long as this notice is preserved.
  7229. # serial 7 ltoptions.m4
  7230. # This is to help aclocal find these macros, as it can't see m4_define.
  7231. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  7232. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  7233. # ------------------------------------------
  7234. m4_define([_LT_MANGLE_OPTION],
  7235. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  7236. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  7237. # ---------------------------------------
  7238. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  7239. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  7240. # saved as a flag.
  7241. m4_define([_LT_SET_OPTION],
  7242. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  7243. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  7244. _LT_MANGLE_DEFUN([$1], [$2]),
  7245. [m4_warning([Unknown $1 option `$2'])])[]dnl
  7246. ])
  7247. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  7248. # ------------------------------------------------------------
  7249. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  7250. m4_define([_LT_IF_OPTION],
  7251. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  7252. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  7253. # -------------------------------------------------------
  7254. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  7255. # are set.
  7256. m4_define([_LT_UNLESS_OPTIONS],
  7257. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7258. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  7259. [m4_define([$0_found])])])[]dnl
  7260. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  7261. ])[]dnl
  7262. ])
  7263. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  7264. # ----------------------------------------
  7265. # OPTION-LIST is a space-separated list of Libtool options associated
  7266. # with MACRO-NAME. If any OPTION has a matching handler declared with
  7267. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  7268. # the unknown option and exit.
  7269. m4_defun([_LT_SET_OPTIONS],
  7270. [# Set options
  7271. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7272. [_LT_SET_OPTION([$1], _LT_Option)])
  7273. m4_if([$1],[LT_INIT],[
  7274. dnl
  7275. dnl Simply set some default values (i.e off) if boolean options were not
  7276. dnl specified:
  7277. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  7278. ])
  7279. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  7280. ])
  7281. dnl
  7282. dnl If no reference was made to various pairs of opposing options, then
  7283. dnl we run the default mode handler for the pair. For example, if neither
  7284. dnl `shared' nor `disable-shared' was passed, we enable building of shared
  7285. dnl archives by default:
  7286. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  7287. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  7288. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  7289. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  7290. [_LT_ENABLE_FAST_INSTALL])
  7291. ])
  7292. ])# _LT_SET_OPTIONS
  7293. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  7294. # -----------------------------------------
  7295. m4_define([_LT_MANGLE_DEFUN],
  7296. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  7297. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  7298. # -----------------------------------------------
  7299. m4_define([LT_OPTION_DEFINE],
  7300. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  7301. ])# LT_OPTION_DEFINE
  7302. # dlopen
  7303. # ------
  7304. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  7305. ])
  7306. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  7307. [_LT_SET_OPTION([LT_INIT], [dlopen])
  7308. AC_DIAGNOSE([obsolete],
  7309. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7310. put the `dlopen' option into LT_INIT's first parameter.])
  7311. ])
  7312. dnl aclocal-1.4 backwards compatibility:
  7313. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  7314. # win32-dll
  7315. # ---------
  7316. # Declare package support for building win32 dll's.
  7317. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  7318. [enable_win32_dll=yes
  7319. case $host in
  7320. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  7321. AC_CHECK_TOOL(AS, as, false)
  7322. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7323. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7324. ;;
  7325. esac
  7326. test -z "$AS" && AS=as
  7327. _LT_DECL([], [AS], [1], [Assembler program])dnl
  7328. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7329. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  7330. test -z "$OBJDUMP" && OBJDUMP=objdump
  7331. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  7332. ])# win32-dll
  7333. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  7334. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7335. _LT_SET_OPTION([LT_INIT], [win32-dll])
  7336. AC_DIAGNOSE([obsolete],
  7337. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7338. put the `win32-dll' option into LT_INIT's first parameter.])
  7339. ])
  7340. dnl aclocal-1.4 backwards compatibility:
  7341. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  7342. # _LT_ENABLE_SHARED([DEFAULT])
  7343. # ----------------------------
  7344. # implement the --enable-shared flag, and supports the `shared' and
  7345. # `disable-shared' LT_INIT options.
  7346. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7347. m4_define([_LT_ENABLE_SHARED],
  7348. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7349. AC_ARG_ENABLE([shared],
  7350. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  7351. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  7352. [p=${PACKAGE-default}
  7353. case $enableval in
  7354. yes) enable_shared=yes ;;
  7355. no) enable_shared=no ;;
  7356. *)
  7357. enable_shared=no
  7358. # Look at the argument we got. We use all the common list separators.
  7359. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7360. for pkg in $enableval; do
  7361. IFS="$lt_save_ifs"
  7362. if test "X$pkg" = "X$p"; then
  7363. enable_shared=yes
  7364. fi
  7365. done
  7366. IFS="$lt_save_ifs"
  7367. ;;
  7368. esac],
  7369. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  7370. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  7371. [Whether or not to build shared libraries])
  7372. ])# _LT_ENABLE_SHARED
  7373. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  7374. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  7375. # Old names:
  7376. AC_DEFUN([AC_ENABLE_SHARED],
  7377. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  7378. ])
  7379. AC_DEFUN([AC_DISABLE_SHARED],
  7380. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  7381. ])
  7382. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  7383. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  7384. dnl aclocal-1.4 backwards compatibility:
  7385. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  7386. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  7387. # _LT_ENABLE_STATIC([DEFAULT])
  7388. # ----------------------------
  7389. # implement the --enable-static flag, and support the `static' and
  7390. # `disable-static' LT_INIT options.
  7391. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7392. m4_define([_LT_ENABLE_STATIC],
  7393. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7394. AC_ARG_ENABLE([static],
  7395. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  7396. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  7397. [p=${PACKAGE-default}
  7398. case $enableval in
  7399. yes) enable_static=yes ;;
  7400. no) enable_static=no ;;
  7401. *)
  7402. enable_static=no
  7403. # Look at the argument we got. We use all the common list separators.
  7404. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7405. for pkg in $enableval; do
  7406. IFS="$lt_save_ifs"
  7407. if test "X$pkg" = "X$p"; then
  7408. enable_static=yes
  7409. fi
  7410. done
  7411. IFS="$lt_save_ifs"
  7412. ;;
  7413. esac],
  7414. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  7415. _LT_DECL([build_old_libs], [enable_static], [0],
  7416. [Whether or not to build static libraries])
  7417. ])# _LT_ENABLE_STATIC
  7418. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  7419. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  7420. # Old names:
  7421. AC_DEFUN([AC_ENABLE_STATIC],
  7422. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  7423. ])
  7424. AC_DEFUN([AC_DISABLE_STATIC],
  7425. [_LT_SET_OPTION([LT_INIT], [disable-static])
  7426. ])
  7427. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  7428. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  7429. dnl aclocal-1.4 backwards compatibility:
  7430. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  7431. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  7432. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  7433. # ----------------------------------
  7434. # implement the --enable-fast-install flag, and support the `fast-install'
  7435. # and `disable-fast-install' LT_INIT options.
  7436. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7437. m4_define([_LT_ENABLE_FAST_INSTALL],
  7438. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7439. AC_ARG_ENABLE([fast-install],
  7440. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  7441. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  7442. [p=${PACKAGE-default}
  7443. case $enableval in
  7444. yes) enable_fast_install=yes ;;
  7445. no) enable_fast_install=no ;;
  7446. *)
  7447. enable_fast_install=no
  7448. # Look at the argument we got. We use all the common list separators.
  7449. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7450. for pkg in $enableval; do
  7451. IFS="$lt_save_ifs"
  7452. if test "X$pkg" = "X$p"; then
  7453. enable_fast_install=yes
  7454. fi
  7455. done
  7456. IFS="$lt_save_ifs"
  7457. ;;
  7458. esac],
  7459. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  7460. _LT_DECL([fast_install], [enable_fast_install], [0],
  7461. [Whether or not to optimize for fast installation])dnl
  7462. ])# _LT_ENABLE_FAST_INSTALL
  7463. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  7464. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  7465. # Old names:
  7466. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  7467. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  7468. AC_DIAGNOSE([obsolete],
  7469. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7470. the `fast-install' option into LT_INIT's first parameter.])
  7471. ])
  7472. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  7473. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  7474. AC_DIAGNOSE([obsolete],
  7475. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7476. the `disable-fast-install' option into LT_INIT's first parameter.])
  7477. ])
  7478. dnl aclocal-1.4 backwards compatibility:
  7479. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  7480. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  7481. # _LT_WITH_PIC([MODE])
  7482. # --------------------
  7483. # implement the --with-pic flag, and support the `pic-only' and `no-pic'
  7484. # LT_INIT options.
  7485. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  7486. m4_define([_LT_WITH_PIC],
  7487. [AC_ARG_WITH([pic],
  7488. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  7489. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  7490. [lt_p=${PACKAGE-default}
  7491. case $withval in
  7492. yes|no) pic_mode=$withval ;;
  7493. *)
  7494. pic_mode=default
  7495. # Look at the argument we got. We use all the common list separators.
  7496. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7497. for lt_pkg in $withval; do
  7498. IFS="$lt_save_ifs"
  7499. if test "X$lt_pkg" = "X$lt_p"; then
  7500. pic_mode=yes
  7501. fi
  7502. done
  7503. IFS="$lt_save_ifs"
  7504. ;;
  7505. esac],
  7506. [pic_mode=default])
  7507. test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
  7508. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  7509. ])# _LT_WITH_PIC
  7510. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  7511. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  7512. # Old name:
  7513. AU_DEFUN([AC_LIBTOOL_PICMODE],
  7514. [_LT_SET_OPTION([LT_INIT], [pic-only])
  7515. AC_DIAGNOSE([obsolete],
  7516. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7517. put the `pic-only' option into LT_INIT's first parameter.])
  7518. ])
  7519. dnl aclocal-1.4 backwards compatibility:
  7520. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  7521. m4_define([_LTDL_MODE], [])
  7522. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  7523. [m4_define([_LTDL_MODE], [nonrecursive])])
  7524. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  7525. [m4_define([_LTDL_MODE], [recursive])])
  7526. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  7527. [m4_define([_LTDL_MODE], [subproject])])
  7528. m4_define([_LTDL_TYPE], [])
  7529. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  7530. [m4_define([_LTDL_TYPE], [installable])])
  7531. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  7532. [m4_define([_LTDL_TYPE], [convenience])])
  7533. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  7534. #
  7535. # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
  7536. # Written by Gary V. Vaughan, 2004
  7537. #
  7538. # This file is free software; the Free Software Foundation gives
  7539. # unlimited permission to copy and/or distribute it, with or without
  7540. # modifications, as long as this notice is preserved.
  7541. # serial 6 ltsugar.m4
  7542. # This is to help aclocal find these macros, as it can't see m4_define.
  7543. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  7544. # lt_join(SEP, ARG1, [ARG2...])
  7545. # -----------------------------
  7546. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  7547. # associated separator.
  7548. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  7549. # versions in m4sugar had bugs.
  7550. m4_define([lt_join],
  7551. [m4_if([$#], [1], [],
  7552. [$#], [2], [[$2]],
  7553. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  7554. m4_define([_lt_join],
  7555. [m4_if([$#$2], [2], [],
  7556. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  7557. # lt_car(LIST)
  7558. # lt_cdr(LIST)
  7559. # ------------
  7560. # Manipulate m4 lists.
  7561. # These macros are necessary as long as will still need to support
  7562. # Autoconf-2.59 which quotes differently.
  7563. m4_define([lt_car], [[$1]])
  7564. m4_define([lt_cdr],
  7565. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  7566. [$#], 1, [],
  7567. [m4_dquote(m4_shift($@))])])
  7568. m4_define([lt_unquote], $1)
  7569. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  7570. # ------------------------------------------
  7571. # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
  7572. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  7573. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  7574. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  7575. # than defined and empty).
  7576. #
  7577. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  7578. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  7579. m4_define([lt_append],
  7580. [m4_define([$1],
  7581. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  7582. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  7583. # ----------------------------------------------------------
  7584. # Produce a SEP delimited list of all paired combinations of elements of
  7585. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  7586. # has the form PREFIXmINFIXSUFFIXn.
  7587. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  7588. m4_define([lt_combine],
  7589. [m4_if(m4_eval([$# > 3]), [1],
  7590. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  7591. [[m4_foreach([_Lt_prefix], [$2],
  7592. [m4_foreach([_Lt_suffix],
  7593. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  7594. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  7595. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  7596. # -----------------------------------------------------------------------
  7597. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  7598. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  7599. m4_define([lt_if_append_uniq],
  7600. [m4_ifdef([$1],
  7601. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  7602. [lt_append([$1], [$2], [$3])$4],
  7603. [$5])],
  7604. [lt_append([$1], [$2], [$3])$4])])
  7605. # lt_dict_add(DICT, KEY, VALUE)
  7606. # -----------------------------
  7607. m4_define([lt_dict_add],
  7608. [m4_define([$1($2)], [$3])])
  7609. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  7610. # --------------------------------------------
  7611. m4_define([lt_dict_add_subkey],
  7612. [m4_define([$1($2:$3)], [$4])])
  7613. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  7614. # ----------------------------------
  7615. m4_define([lt_dict_fetch],
  7616. [m4_ifval([$3],
  7617. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  7618. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  7619. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  7620. # -----------------------------------------------------------------
  7621. m4_define([lt_if_dict_fetch],
  7622. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  7623. [$5],
  7624. [$6])])
  7625. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  7626. # --------------------------------------------------------------
  7627. m4_define([lt_dict_filter],
  7628. [m4_if([$5], [], [],
  7629. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  7630. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  7631. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  7632. ])
  7633. # ltversion.m4 -- version numbers -*- Autoconf -*-
  7634. #
  7635. # Copyright (C) 2004 Free Software Foundation, Inc.
  7636. # Written by Scott James Remnant, 2004
  7637. #
  7638. # This file is free software; the Free Software Foundation gives
  7639. # unlimited permission to copy and/or distribute it, with or without
  7640. # modifications, as long as this notice is preserved.
  7641. # @configure_input@
  7642. # serial 3337 ltversion.m4
  7643. # This file is part of GNU Libtool
  7644. m4_define([LT_PACKAGE_VERSION], [2.4.2])
  7645. m4_define([LT_PACKAGE_REVISION], [1.3337])
  7646. AC_DEFUN([LTVERSION_VERSION],
  7647. [macro_version='2.4.2'
  7648. macro_revision='1.3337'
  7649. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  7650. _LT_DECL(, macro_revision, 0)
  7651. ])
  7652. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  7653. #
  7654. # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
  7655. # Written by Scott James Remnant, 2004.
  7656. #
  7657. # This file is free software; the Free Software Foundation gives
  7658. # unlimited permission to copy and/or distribute it, with or without
  7659. # modifications, as long as this notice is preserved.
  7660. # serial 5 lt~obsolete.m4
  7661. # These exist entirely to fool aclocal when bootstrapping libtool.
  7662. #
  7663. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
  7664. # which have later been changed to m4_define as they aren't part of the
  7665. # exported API, or moved to Autoconf or Automake where they belong.
  7666. #
  7667. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  7668. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  7669. # using a macro with the same name in our local m4/libtool.m4 it'll
  7670. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  7671. # and doesn't know about Autoconf macros at all.)
  7672. #
  7673. # So we provide this file, which has a silly filename so it's always
  7674. # included after everything else. This provides aclocal with the
  7675. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  7676. # because those macros already exist, or will be overwritten later.
  7677. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  7678. #
  7679. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  7680. # Yes, that means every name once taken will need to remain here until
  7681. # we give up compatibility with versions before 1.7, at which point
  7682. # we need to keep only those names which we still refer to.
  7683. # This is to help aclocal find these macros, as it can't see m4_define.
  7684. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  7685. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  7686. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  7687. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  7688. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  7689. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  7690. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  7691. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  7692. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  7693. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  7694. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  7695. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  7696. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  7697. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  7698. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  7699. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  7700. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  7701. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  7702. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  7703. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  7704. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  7705. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  7706. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  7707. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  7708. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  7709. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  7710. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  7711. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  7712. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  7713. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  7714. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  7715. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  7716. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  7717. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  7718. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  7719. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  7720. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  7721. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  7722. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  7723. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  7724. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  7725. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  7726. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  7727. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  7728. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  7729. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  7730. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  7731. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  7732. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  7733. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  7734. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  7735. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  7736. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  7737. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  7738. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  7739. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  7740. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  7741. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  7742. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  7743. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  7744. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  7745. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
  7746. # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
  7747. # Foundation, Inc.
  7748. #
  7749. # This file is free software; the Free Software Foundation
  7750. # gives unlimited permission to copy and/or distribute it,
  7751. # with or without modifications, as long as this notice is preserved.
  7752. # serial 1
  7753. # AM_AUTOMAKE_VERSION(VERSION)
  7754. # ----------------------------
  7755. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  7756. # generated from the m4 files accompanying Automake X.Y.
  7757. # (This private macro should not be called outside this file.)
  7758. AC_DEFUN([AM_AUTOMAKE_VERSION],
  7759. [am__api_version='1.11'
  7760. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  7761. dnl require some minimum version. Point them to the right macro.
  7762. m4_if([$1], [1.11.2], [],
  7763. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  7764. ])
  7765. # _AM_AUTOCONF_VERSION(VERSION)
  7766. # -----------------------------
  7767. # aclocal traces this macro to find the Autoconf version.
  7768. # This is a private macro too. Using m4_define simplifies
  7769. # the logic in aclocal, which can simply ignore this definition.
  7770. m4_define([_AM_AUTOCONF_VERSION], [])
  7771. # AM_SET_CURRENT_AUTOMAKE_VERSION
  7772. # -------------------------------
  7773. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  7774. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  7775. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  7776. [AM_AUTOMAKE_VERSION([1.11.2])dnl
  7777. m4_ifndef([AC_AUTOCONF_VERSION],
  7778. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  7779. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  7780. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  7781. # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
  7782. #
  7783. # This file is free software; the Free Software Foundation
  7784. # gives unlimited permission to copy and/or distribute it,
  7785. # with or without modifications, as long as this notice is preserved.
  7786. # serial 1
  7787. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  7788. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  7789. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  7790. #
  7791. # Of course, Automake must honor this variable whenever it calls a
  7792. # tool from the auxiliary directory. The problem is that $srcdir (and
  7793. # therefore $ac_aux_dir as well) can be either absolute or relative,
  7794. # depending on how configure is run. This is pretty annoying, since
  7795. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  7796. # source directory, any form will work fine, but in subdirectories a
  7797. # relative path needs to be adjusted first.
  7798. #
  7799. # $ac_aux_dir/missing
  7800. # fails when called from a subdirectory if $ac_aux_dir is relative
  7801. # $top_srcdir/$ac_aux_dir/missing
  7802. # fails if $ac_aux_dir is absolute,
  7803. # fails when called from a subdirectory in a VPATH build with
  7804. # a relative $ac_aux_dir
  7805. #
  7806. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  7807. # are both prefixed by $srcdir. In an in-source build this is usually
  7808. # harmless because $srcdir is `.', but things will broke when you
  7809. # start a VPATH build or use an absolute $srcdir.
  7810. #
  7811. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  7812. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  7813. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  7814. # and then we would define $MISSING as
  7815. # MISSING="\${SHELL} $am_aux_dir/missing"
  7816. # This will work as long as MISSING is not called from configure, because
  7817. # unfortunately $(top_srcdir) has no meaning in configure.
  7818. # However there are other variables, like CC, which are often used in
  7819. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  7820. #
  7821. # Another solution, used here, is to always expand $ac_aux_dir to an
  7822. # absolute PATH. The drawback is that using absolute paths prevent a
  7823. # configured tree to be moved without reconfiguration.
  7824. AC_DEFUN([AM_AUX_DIR_EXPAND],
  7825. [dnl Rely on autoconf to set up CDPATH properly.
  7826. AC_PREREQ([2.50])dnl
  7827. # expand $ac_aux_dir to an absolute path
  7828. am_aux_dir=`cd $ac_aux_dir && pwd`
  7829. ])
  7830. # AM_CONDITIONAL -*- Autoconf -*-
  7831. # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
  7832. # Free Software Foundation, Inc.
  7833. #
  7834. # This file is free software; the Free Software Foundation
  7835. # gives unlimited permission to copy and/or distribute it,
  7836. # with or without modifications, as long as this notice is preserved.
  7837. # serial 9
  7838. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  7839. # -------------------------------------
  7840. # Define a conditional.
  7841. AC_DEFUN([AM_CONDITIONAL],
  7842. [AC_PREREQ(2.52)dnl
  7843. ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  7844. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  7845. AC_SUBST([$1_TRUE])dnl
  7846. AC_SUBST([$1_FALSE])dnl
  7847. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  7848. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  7849. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  7850. if $2; then
  7851. $1_TRUE=
  7852. $1_FALSE='#'
  7853. else
  7854. $1_TRUE='#'
  7855. $1_FALSE=
  7856. fi
  7857. AC_CONFIG_COMMANDS_PRE(
  7858. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  7859. AC_MSG_ERROR([[conditional "$1" was never defined.
  7860. Usually this means the macro was only invoked conditionally.]])
  7861. fi])])
  7862. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
  7863. # 2010, 2011 Free Software Foundation, Inc.
  7864. #
  7865. # This file is free software; the Free Software Foundation
  7866. # gives unlimited permission to copy and/or distribute it,
  7867. # with or without modifications, as long as this notice is preserved.
  7868. # serial 12
  7869. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  7870. # written in clear, in which case automake, when reading aclocal.m4,
  7871. # will think it sees a *use*, and therefore will trigger all it's
  7872. # C support machinery. Also note that it means that autoscan, seeing
  7873. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  7874. # _AM_DEPENDENCIES(NAME)
  7875. # ----------------------
  7876. # See how the compiler implements dependency checking.
  7877. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  7878. # We try a few techniques and use that to set a single cache variable.
  7879. #
  7880. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  7881. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  7882. # dependency, and given that the user is not expected to run this macro,
  7883. # just rely on AC_PROG_CC.
  7884. AC_DEFUN([_AM_DEPENDENCIES],
  7885. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  7886. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  7887. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  7888. AC_REQUIRE([AM_DEP_TRACK])dnl
  7889. ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  7890. [$1], CXX, [depcc="$CXX" am_compiler_list=],
  7891. [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  7892. [$1], UPC, [depcc="$UPC" am_compiler_list=],
  7893. [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  7894. [depcc="$$1" am_compiler_list=])
  7895. AC_CACHE_CHECK([dependency style of $depcc],
  7896. [am_cv_$1_dependencies_compiler_type],
  7897. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  7898. # We make a subdir and do the tests there. Otherwise we can end up
  7899. # making bogus files that we don't know about and never remove. For
  7900. # instance it was reported that on HP-UX the gcc test will end up
  7901. # making a dummy file named `D' -- because `-MD' means `put the output
  7902. # in D'.
  7903. rm -rf conftest.dir
  7904. mkdir conftest.dir
  7905. # Copy depcomp to subdir because otherwise we won't find it if we're
  7906. # using a relative directory.
  7907. cp "$am_depcomp" conftest.dir
  7908. cd conftest.dir
  7909. # We will build objects and dependencies in a subdirectory because
  7910. # it helps to detect inapplicable dependency modes. For instance
  7911. # both Tru64's cc and ICC support -MD to output dependencies as a
  7912. # side effect of compilation, but ICC will put the dependencies in
  7913. # the current directory while Tru64 will put them in the object
  7914. # directory.
  7915. mkdir sub
  7916. am_cv_$1_dependencies_compiler_type=none
  7917. if test "$am_compiler_list" = ""; then
  7918. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  7919. fi
  7920. am__universal=false
  7921. m4_case([$1], [CC],
  7922. [case " $depcc " in #(
  7923. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  7924. esac],
  7925. [CXX],
  7926. [case " $depcc " in #(
  7927. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  7928. esac])
  7929. for depmode in $am_compiler_list; do
  7930. # Setup a source with many dependencies, because some compilers
  7931. # like to wrap large dependency lists on column 80 (with \), and
  7932. # we should not choose a depcomp mode which is confused by this.
  7933. #
  7934. # We need to recreate these files for each test, as the compiler may
  7935. # overwrite some of them when testing with obscure command lines.
  7936. # This happens at least with the AIX C compiler.
  7937. : > sub/conftest.c
  7938. for i in 1 2 3 4 5 6; do
  7939. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  7940. # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  7941. # Solaris 8's {/usr,}/bin/sh.
  7942. touch sub/conftst$i.h
  7943. done
  7944. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  7945. # We check with `-c' and `-o' for the sake of the "dashmstdout"
  7946. # mode. It turns out that the SunPro C++ compiler does not properly
  7947. # handle `-M -o', and we need to detect this. Also, some Intel
  7948. # versions had trouble with output in subdirs
  7949. am__obj=sub/conftest.${OBJEXT-o}
  7950. am__minus_obj="-o $am__obj"
  7951. case $depmode in
  7952. gcc)
  7953. # This depmode causes a compiler race in universal mode.
  7954. test "$am__universal" = false || continue
  7955. ;;
  7956. nosideeffect)
  7957. # after this tag, mechanisms are not by side-effect, so they'll
  7958. # only be used when explicitly requested
  7959. if test "x$enable_dependency_tracking" = xyes; then
  7960. continue
  7961. else
  7962. break
  7963. fi
  7964. ;;
  7965. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  7966. # This compiler won't grok `-c -o', but also, the minuso test has
  7967. # not run yet. These depmodes are late enough in the game, and
  7968. # so weak that their functioning should not be impacted.
  7969. am__obj=conftest.${OBJEXT-o}
  7970. am__minus_obj=
  7971. ;;
  7972. none) break ;;
  7973. esac
  7974. if depmode=$depmode \
  7975. source=sub/conftest.c object=$am__obj \
  7976. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  7977. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  7978. >/dev/null 2>conftest.err &&
  7979. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  7980. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  7981. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  7982. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  7983. # icc doesn't choke on unknown options, it will just issue warnings
  7984. # or remarks (even with -Werror). So we grep stderr for any message
  7985. # that says an option was ignored or not supported.
  7986. # When given -MP, icc 7.0 and 7.1 complain thusly:
  7987. # icc: Command line warning: ignoring option '-M'; no argument required
  7988. # The diagnosis changed in icc 8.0:
  7989. # icc: Command line remark: option '-MP' not supported
  7990. if (grep 'ignoring option' conftest.err ||
  7991. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  7992. am_cv_$1_dependencies_compiler_type=$depmode
  7993. break
  7994. fi
  7995. fi
  7996. done
  7997. cd ..
  7998. rm -rf conftest.dir
  7999. else
  8000. am_cv_$1_dependencies_compiler_type=none
  8001. fi
  8002. ])
  8003. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  8004. AM_CONDITIONAL([am__fastdep$1], [
  8005. test "x$enable_dependency_tracking" != xno \
  8006. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  8007. ])
  8008. # AM_SET_DEPDIR
  8009. # -------------
  8010. # Choose a directory name for dependency files.
  8011. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  8012. AC_DEFUN([AM_SET_DEPDIR],
  8013. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8014. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  8015. ])
  8016. # AM_DEP_TRACK
  8017. # ------------
  8018. AC_DEFUN([AM_DEP_TRACK],
  8019. [AC_ARG_ENABLE(dependency-tracking,
  8020. [ --disable-dependency-tracking speeds up one-time build
  8021. --enable-dependency-tracking do not reject slow dependency extractors])
  8022. if test "x$enable_dependency_tracking" != xno; then
  8023. am_depcomp="$ac_aux_dir/depcomp"
  8024. AMDEPBACKSLASH='\'
  8025. am__nodep='_no'
  8026. fi
  8027. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  8028. AC_SUBST([AMDEPBACKSLASH])dnl
  8029. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  8030. AC_SUBST([am__nodep])dnl
  8031. _AM_SUBST_NOTMAKE([am__nodep])dnl
  8032. ])
  8033. # Generate code to set up dependency tracking. -*- Autoconf -*-
  8034. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
  8035. # Free Software Foundation, Inc.
  8036. #
  8037. # This file is free software; the Free Software Foundation
  8038. # gives unlimited permission to copy and/or distribute it,
  8039. # with or without modifications, as long as this notice is preserved.
  8040. #serial 5
  8041. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  8042. # ------------------------------
  8043. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  8044. [{
  8045. # Autoconf 2.62 quotes --file arguments for eval, but not when files
  8046. # are listed without --file. Let's play safe and only enable the eval
  8047. # if we detect the quoting.
  8048. case $CONFIG_FILES in
  8049. *\'*) eval set x "$CONFIG_FILES" ;;
  8050. *) set x $CONFIG_FILES ;;
  8051. esac
  8052. shift
  8053. for mf
  8054. do
  8055. # Strip MF so we end up with the name of the file.
  8056. mf=`echo "$mf" | sed -e 's/:.*$//'`
  8057. # Check whether this is an Automake generated Makefile or not.
  8058. # We used to match only the files named `Makefile.in', but
  8059. # some people rename them; so instead we look at the file content.
  8060. # Grep'ing the first line is not enough: some people post-process
  8061. # each Makefile.in and add a new line on top of each file to say so.
  8062. # Grep'ing the whole file is not good either: AIX grep has a line
  8063. # limit of 2048, but all sed's we know have understand at least 4000.
  8064. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  8065. dirpart=`AS_DIRNAME("$mf")`
  8066. else
  8067. continue
  8068. fi
  8069. # Extract the definition of DEPDIR, am__include, and am__quote
  8070. # from the Makefile without running `make'.
  8071. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  8072. test -z "$DEPDIR" && continue
  8073. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  8074. test -z "am__include" && continue
  8075. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  8076. # When using ansi2knr, U may be empty or an underscore; expand it
  8077. U=`sed -n 's/^U = //p' < "$mf"`
  8078. # Find all dependency output files, they are included files with
  8079. # $(DEPDIR) in their names. We invoke sed twice because it is the
  8080. # simplest approach to changing $(DEPDIR) to its actual value in the
  8081. # expansion.
  8082. for file in `sed -n "
  8083. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  8084. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  8085. # Make sure the directory exists.
  8086. test -f "$dirpart/$file" && continue
  8087. fdir=`AS_DIRNAME(["$file"])`
  8088. AS_MKDIR_P([$dirpart/$fdir])
  8089. # echo "creating $dirpart/$file"
  8090. echo '# dummy' > "$dirpart/$file"
  8091. done
  8092. done
  8093. }
  8094. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  8095. # AM_OUTPUT_DEPENDENCY_COMMANDS
  8096. # -----------------------------
  8097. # This macro should only be invoked once -- use via AC_REQUIRE.
  8098. #
  8099. # This code is only required when automatic dependency tracking
  8100. # is enabled. FIXME. This creates each `.P' file that we will
  8101. # need in order to bootstrap the dependency handling code.
  8102. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  8103. [AC_CONFIG_COMMANDS([depfiles],
  8104. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  8105. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  8106. ])
  8107. # Do all the work for Automake. -*- Autoconf -*-
  8108. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  8109. # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
  8110. #
  8111. # This file is free software; the Free Software Foundation
  8112. # gives unlimited permission to copy and/or distribute it,
  8113. # with or without modifications, as long as this notice is preserved.
  8114. # serial 16
  8115. # This macro actually does too much. Some checks are only needed if
  8116. # your package does certain things. But this isn't really a big deal.
  8117. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  8118. # AM_INIT_AUTOMAKE([OPTIONS])
  8119. # -----------------------------------------------
  8120. # The call with PACKAGE and VERSION arguments is the old style
  8121. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  8122. # and VERSION should now be passed to AC_INIT and removed from
  8123. # the call to AM_INIT_AUTOMAKE.
  8124. # We support both call styles for the transition. After
  8125. # the next Automake release, Autoconf can make the AC_INIT
  8126. # arguments mandatory, and then we can depend on a new Autoconf
  8127. # release and drop the old call support.
  8128. AC_DEFUN([AM_INIT_AUTOMAKE],
  8129. [AC_PREREQ([2.62])dnl
  8130. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  8131. dnl the ones we care about.
  8132. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  8133. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  8134. AC_REQUIRE([AC_PROG_INSTALL])dnl
  8135. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  8136. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  8137. # is not polluted with repeated "-I."
  8138. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  8139. # test to see if srcdir already configured
  8140. if test -f $srcdir/config.status; then
  8141. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  8142. fi
  8143. fi
  8144. # test whether we have cygpath
  8145. if test -z "$CYGPATH_W"; then
  8146. if (cygpath --version) >/dev/null 2>/dev/null; then
  8147. CYGPATH_W='cygpath -w'
  8148. else
  8149. CYGPATH_W=echo
  8150. fi
  8151. fi
  8152. AC_SUBST([CYGPATH_W])
  8153. # Define the identity of the package.
  8154. dnl Distinguish between old-style and new-style calls.
  8155. m4_ifval([$2],
  8156. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  8157. AC_SUBST([PACKAGE], [$1])dnl
  8158. AC_SUBST([VERSION], [$2])],
  8159. [_AM_SET_OPTIONS([$1])dnl
  8160. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  8161. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
  8162. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  8163. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  8164. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  8165. _AM_IF_OPTION([no-define],,
  8166. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  8167. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  8168. # Some tools Automake needs.
  8169. AC_REQUIRE([AM_SANITY_CHECK])dnl
  8170. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  8171. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  8172. AM_MISSING_PROG(AUTOCONF, autoconf)
  8173. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  8174. AM_MISSING_PROG(AUTOHEADER, autoheader)
  8175. AM_MISSING_PROG(MAKEINFO, makeinfo)
  8176. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8177. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  8178. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  8179. # We need awk for the "check" target. The system "awk" is bad on
  8180. # some platforms.
  8181. AC_REQUIRE([AC_PROG_AWK])dnl
  8182. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  8183. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8184. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  8185. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  8186. [_AM_PROG_TAR([v7])])])
  8187. _AM_IF_OPTION([no-dependencies],,
  8188. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  8189. [_AM_DEPENDENCIES(CC)],
  8190. [define([AC_PROG_CC],
  8191. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  8192. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  8193. [_AM_DEPENDENCIES(CXX)],
  8194. [define([AC_PROG_CXX],
  8195. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  8196. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  8197. [_AM_DEPENDENCIES(OBJC)],
  8198. [define([AC_PROG_OBJC],
  8199. defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
  8200. ])
  8201. _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
  8202. dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
  8203. dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
  8204. dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
  8205. AC_CONFIG_COMMANDS_PRE(dnl
  8206. [m4_provide_if([_AM_COMPILER_EXEEXT],
  8207. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  8208. ])
  8209. dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  8210. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  8211. dnl mangled by Autoconf and run in a shell conditional statement.
  8212. m4_define([_AC_COMPILER_EXEEXT],
  8213. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  8214. # When config.status generates a header, we must update the stamp-h file.
  8215. # This file resides in the same directory as the config header
  8216. # that is generated. The stamp files are numbered to have different names.
  8217. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  8218. # loop where config.status creates the headers, so we can generate
  8219. # our stamp files there.
  8220. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  8221. [# Compute $1's index in $config_headers.
  8222. _am_arg=$1
  8223. _am_stamp_count=1
  8224. for _am_header in $config_headers :; do
  8225. case $_am_header in
  8226. $_am_arg | $_am_arg:* )
  8227. break ;;
  8228. * )
  8229. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  8230. esac
  8231. done
  8232. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  8233. # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
  8234. # Inc.
  8235. #
  8236. # This file is free software; the Free Software Foundation
  8237. # gives unlimited permission to copy and/or distribute it,
  8238. # with or without modifications, as long as this notice is preserved.
  8239. # serial 1
  8240. # AM_PROG_INSTALL_SH
  8241. # ------------------
  8242. # Define $install_sh.
  8243. AC_DEFUN([AM_PROG_INSTALL_SH],
  8244. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8245. if test x"${install_sh}" != xset; then
  8246. case $am_aux_dir in
  8247. *\ * | *\ *)
  8248. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  8249. *)
  8250. install_sh="\${SHELL} $am_aux_dir/install-sh"
  8251. esac
  8252. fi
  8253. AC_SUBST(install_sh)])
  8254. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  8255. #
  8256. # This file is free software; the Free Software Foundation
  8257. # gives unlimited permission to copy and/or distribute it,
  8258. # with or without modifications, as long as this notice is preserved.
  8259. # serial 2
  8260. # Check whether the underlying file-system supports filenames
  8261. # with a leading dot. For instance MS-DOS doesn't.
  8262. AC_DEFUN([AM_SET_LEADING_DOT],
  8263. [rm -rf .tst 2>/dev/null
  8264. mkdir .tst 2>/dev/null
  8265. if test -d .tst; then
  8266. am__leading_dot=.
  8267. else
  8268. am__leading_dot=_
  8269. fi
  8270. rmdir .tst 2>/dev/null
  8271. AC_SUBST([am__leading_dot])])
  8272. # Check to see how 'make' treats includes. -*- Autoconf -*-
  8273. # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
  8274. #
  8275. # This file is free software; the Free Software Foundation
  8276. # gives unlimited permission to copy and/or distribute it,
  8277. # with or without modifications, as long as this notice is preserved.
  8278. # serial 4
  8279. # AM_MAKE_INCLUDE()
  8280. # -----------------
  8281. # Check to see how make treats includes.
  8282. AC_DEFUN([AM_MAKE_INCLUDE],
  8283. [am_make=${MAKE-make}
  8284. cat > confinc << 'END'
  8285. am__doit:
  8286. @echo this is the am__doit target
  8287. .PHONY: am__doit
  8288. END
  8289. # If we don't find an include directive, just comment out the code.
  8290. AC_MSG_CHECKING([for style of include used by $am_make])
  8291. am__include="#"
  8292. am__quote=
  8293. _am_result=none
  8294. # First try GNU make style include.
  8295. echo "include confinc" > confmf
  8296. # Ignore all kinds of additional output from `make'.
  8297. case `$am_make -s -f confmf 2> /dev/null` in #(
  8298. *the\ am__doit\ target*)
  8299. am__include=include
  8300. am__quote=
  8301. _am_result=GNU
  8302. ;;
  8303. esac
  8304. # Now try BSD make style include.
  8305. if test "$am__include" = "#"; then
  8306. echo '.include "confinc"' > confmf
  8307. case `$am_make -s -f confmf 2> /dev/null` in #(
  8308. *the\ am__doit\ target*)
  8309. am__include=.include
  8310. am__quote="\""
  8311. _am_result=BSD
  8312. ;;
  8313. esac
  8314. fi
  8315. AC_SUBST([am__include])
  8316. AC_SUBST([am__quote])
  8317. AC_MSG_RESULT([$_am_result])
  8318. rm -f confinc confmf
  8319. ])
  8320. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  8321. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
  8322. # Free Software Foundation, Inc.
  8323. #
  8324. # This file is free software; the Free Software Foundation
  8325. # gives unlimited permission to copy and/or distribute it,
  8326. # with or without modifications, as long as this notice is preserved.
  8327. # serial 6
  8328. # AM_MISSING_PROG(NAME, PROGRAM)
  8329. # ------------------------------
  8330. AC_DEFUN([AM_MISSING_PROG],
  8331. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  8332. $1=${$1-"${am_missing_run}$2"}
  8333. AC_SUBST($1)])
  8334. # AM_MISSING_HAS_RUN
  8335. # ------------------
  8336. # Define MISSING if not defined so far and test if it supports --run.
  8337. # If it does, set am_missing_run to use it, otherwise, to nothing.
  8338. AC_DEFUN([AM_MISSING_HAS_RUN],
  8339. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8340. AC_REQUIRE_AUX_FILE([missing])dnl
  8341. if test x"${MISSING+set}" != xset; then
  8342. case $am_aux_dir in
  8343. *\ * | *\ *)
  8344. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  8345. *)
  8346. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  8347. esac
  8348. fi
  8349. # Use eval to expand $SHELL
  8350. if eval "$MISSING --run true"; then
  8351. am_missing_run="$MISSING --run "
  8352. else
  8353. am_missing_run=
  8354. AC_MSG_WARN([`missing' script is too old or missing])
  8355. fi
  8356. ])
  8357. # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
  8358. # Inc.
  8359. #
  8360. # This file is free software; the Free Software Foundation
  8361. # gives unlimited permission to copy and/or distribute it,
  8362. # with or without modifications, as long as this notice is preserved.
  8363. # serial 1
  8364. # AM_PROG_MKDIR_P
  8365. # ---------------
  8366. # Check for `mkdir -p'.
  8367. AC_DEFUN([AM_PROG_MKDIR_P],
  8368. [AC_PREREQ([2.60])dnl
  8369. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  8370. dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
  8371. dnl while keeping a definition of mkdir_p for backward compatibility.
  8372. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
  8373. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
  8374. dnl Makefile.ins that do not define MKDIR_P, so we do our own
  8375. dnl adjustment using top_builddir (which is defined more often than
  8376. dnl MKDIR_P).
  8377. AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
  8378. case $mkdir_p in
  8379. [[\\/$]]* | ?:[[\\/]]*) ;;
  8380. */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
  8381. esac
  8382. ])
  8383. # Helper functions for option handling. -*- Autoconf -*-
  8384. # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
  8385. # Foundation, Inc.
  8386. #
  8387. # This file is free software; the Free Software Foundation
  8388. # gives unlimited permission to copy and/or distribute it,
  8389. # with or without modifications, as long as this notice is preserved.
  8390. # serial 5
  8391. # _AM_MANGLE_OPTION(NAME)
  8392. # -----------------------
  8393. AC_DEFUN([_AM_MANGLE_OPTION],
  8394. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  8395. # _AM_SET_OPTION(NAME)
  8396. # --------------------
  8397. # Set option NAME. Presently that only means defining a flag for this option.
  8398. AC_DEFUN([_AM_SET_OPTION],
  8399. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  8400. # _AM_SET_OPTIONS(OPTIONS)
  8401. # ------------------------
  8402. # OPTIONS is a space-separated list of Automake options.
  8403. AC_DEFUN([_AM_SET_OPTIONS],
  8404. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  8405. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  8406. # -------------------------------------------
  8407. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  8408. AC_DEFUN([_AM_IF_OPTION],
  8409. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  8410. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  8411. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
  8412. # Free Software Foundation, Inc.
  8413. #
  8414. # This file is free software; the Free Software Foundation
  8415. # gives unlimited permission to copy and/or distribute it,
  8416. # with or without modifications, as long as this notice is preserved.
  8417. # serial 5
  8418. # AM_SANITY_CHECK
  8419. # ---------------
  8420. AC_DEFUN([AM_SANITY_CHECK],
  8421. [AC_MSG_CHECKING([whether build environment is sane])
  8422. # Just in case
  8423. sleep 1
  8424. echo timestamp > conftest.file
  8425. # Reject unsafe characters in $srcdir or the absolute working directory
  8426. # name. Accept space and tab only in the latter.
  8427. am_lf='
  8428. '
  8429. case `pwd` in
  8430. *[[\\\"\#\$\&\'\`$am_lf]]*)
  8431. AC_MSG_ERROR([unsafe absolute working directory name]);;
  8432. esac
  8433. case $srcdir in
  8434. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  8435. AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
  8436. esac
  8437. # Do `set' in a subshell so we don't clobber the current shell's
  8438. # arguments. Must try -L first in case configure is actually a
  8439. # symlink; some systems play weird games with the mod time of symlinks
  8440. # (eg FreeBSD returns the mod time of the symlink's containing
  8441. # directory).
  8442. if (
  8443. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  8444. if test "$[*]" = "X"; then
  8445. # -L didn't work.
  8446. set X `ls -t "$srcdir/configure" conftest.file`
  8447. fi
  8448. rm -f conftest.file
  8449. if test "$[*]" != "X $srcdir/configure conftest.file" \
  8450. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  8451. # If neither matched, then we have a broken ls. This can happen
  8452. # if, for instance, CONFIG_SHELL is bash and it inherits a
  8453. # broken ls alias from the environment. This has actually
  8454. # happened. Such a system could not be considered "sane".
  8455. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  8456. alias in your environment])
  8457. fi
  8458. test "$[2]" = conftest.file
  8459. )
  8460. then
  8461. # Ok.
  8462. :
  8463. else
  8464. AC_MSG_ERROR([newly created file is older than distributed files!
  8465. Check your system clock])
  8466. fi
  8467. AC_MSG_RESULT(yes)])
  8468. # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
  8469. #
  8470. # This file is free software; the Free Software Foundation
  8471. # gives unlimited permission to copy and/or distribute it,
  8472. # with or without modifications, as long as this notice is preserved.
  8473. # serial 1
  8474. # AM_PROG_INSTALL_STRIP
  8475. # ---------------------
  8476. # One issue with vendor `install' (even GNU) is that you can't
  8477. # specify the program used to strip binaries. This is especially
  8478. # annoying in cross-compiling environments, where the build's strip
  8479. # is unlikely to handle the host's binaries.
  8480. # Fortunately install-sh will honor a STRIPPROG variable, so we
  8481. # always use install-sh in `make install-strip', and initialize
  8482. # STRIPPROG with the value of the STRIP variable (set by the user).
  8483. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  8484. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8485. # Installed binaries are usually stripped using `strip' when the user
  8486. # run `make install-strip'. However `strip' might not be the right
  8487. # tool to use in cross-compilation environments, therefore Automake
  8488. # will honor the `STRIP' environment variable to overrule this program.
  8489. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  8490. if test "$cross_compiling" != no; then
  8491. AC_CHECK_TOOL([STRIP], [strip], :)
  8492. fi
  8493. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  8494. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  8495. # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
  8496. #
  8497. # This file is free software; the Free Software Foundation
  8498. # gives unlimited permission to copy and/or distribute it,
  8499. # with or without modifications, as long as this notice is preserved.
  8500. # serial 3
  8501. # _AM_SUBST_NOTMAKE(VARIABLE)
  8502. # ---------------------------
  8503. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  8504. # This macro is traced by Automake.
  8505. AC_DEFUN([_AM_SUBST_NOTMAKE])
  8506. # AM_SUBST_NOTMAKE(VARIABLE)
  8507. # --------------------------
  8508. # Public sister of _AM_SUBST_NOTMAKE.
  8509. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  8510. # Check how to create a tarball. -*- Autoconf -*-
  8511. # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  8512. #
  8513. # This file is free software; the Free Software Foundation
  8514. # gives unlimited permission to copy and/or distribute it,
  8515. # with or without modifications, as long as this notice is preserved.
  8516. # serial 2
  8517. # _AM_PROG_TAR(FORMAT)
  8518. # --------------------
  8519. # Check how to create a tarball in format FORMAT.
  8520. # FORMAT should be one of `v7', `ustar', or `pax'.
  8521. #
  8522. # Substitute a variable $(am__tar) that is a command
  8523. # writing to stdout a FORMAT-tarball containing the directory
  8524. # $tardir.
  8525. # tardir=directory && $(am__tar) > result.tar
  8526. #
  8527. # Substitute a variable $(am__untar) that extract such
  8528. # a tarball read from stdin.
  8529. # $(am__untar) < result.tar
  8530. AC_DEFUN([_AM_PROG_TAR],
  8531. [# Always define AMTAR for backward compatibility.
  8532. AM_MISSING_PROG([AMTAR], [tar])
  8533. m4_if([$1], [v7],
  8534. [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  8535. [m4_case([$1], [ustar],, [pax],,
  8536. [m4_fatal([Unknown tar format])])
  8537. AC_MSG_CHECKING([how to create a $1 tar archive])
  8538. # Loop over all known methods to create a tar archive until one works.
  8539. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  8540. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  8541. # Do not fold the above two line into one, because Tru64 sh and
  8542. # Solaris sh will not grok spaces in the rhs of `-'.
  8543. for _am_tool in $_am_tools
  8544. do
  8545. case $_am_tool in
  8546. gnutar)
  8547. for _am_tar in tar gnutar gtar;
  8548. do
  8549. AM_RUN_LOG([$_am_tar --version]) && break
  8550. done
  8551. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  8552. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  8553. am__untar="$_am_tar -xf -"
  8554. ;;
  8555. plaintar)
  8556. # Must skip GNU tar: if it does not support --format= it doesn't create
  8557. # ustar tarball either.
  8558. (tar --version) >/dev/null 2>&1 && continue
  8559. am__tar='tar chf - "$$tardir"'
  8560. am__tar_='tar chf - "$tardir"'
  8561. am__untar='tar xf -'
  8562. ;;
  8563. pax)
  8564. am__tar='pax -L -x $1 -w "$$tardir"'
  8565. am__tar_='pax -L -x $1 -w "$tardir"'
  8566. am__untar='pax -r'
  8567. ;;
  8568. cpio)
  8569. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  8570. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  8571. am__untar='cpio -i -H $1 -d'
  8572. ;;
  8573. none)
  8574. am__tar=false
  8575. am__tar_=false
  8576. am__untar=false
  8577. ;;
  8578. esac
  8579. # If the value was cached, stop now. We just wanted to have am__tar
  8580. # and am__untar set.
  8581. test -n "${am_cv_prog_tar_$1}" && break
  8582. # tar/untar a dummy directory, and stop if the command works
  8583. rm -rf conftest.dir
  8584. mkdir conftest.dir
  8585. echo GrepMe > conftest.dir/file
  8586. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  8587. rm -rf conftest.dir
  8588. if test -s conftest.tar; then
  8589. AM_RUN_LOG([$am__untar <conftest.tar])
  8590. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  8591. fi
  8592. done
  8593. rm -rf conftest.dir
  8594. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  8595. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  8596. AC_SUBST([am__tar])
  8597. AC_SUBST([am__untar])
  8598. ]) # _AM_PROG_TAR