You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9774 lines
344 KiB

10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
  1. # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
  2. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  3. # This file is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. # PARTICULAR PURPOSE.
  10. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
  11. m4_ifndef([AC_AUTOCONF_VERSION],
  12. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  13. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
  14. [m4_warning([this file was generated for autoconf 2.69.
  15. You have another version of autoconf. It may work, but is not guaranteed to.
  16. If you have problems, you may need to regenerate the build system entirely.
  17. To do so, use the procedure documented by the package, typically 'autoreconf'.])])
  18. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  19. #
  20. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  21. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  22. # Foundation, Inc.
  23. # Written by Gordon Matzigkeit, 1996
  24. #
  25. # This file is free software; the Free Software Foundation gives
  26. # unlimited permission to copy and/or distribute it, with or without
  27. # modifications, as long as this notice is preserved.
  28. m4_define([_LT_COPYING], [dnl
  29. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  30. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  31. # Foundation, Inc.
  32. # Written by Gordon Matzigkeit, 1996
  33. #
  34. # This file is part of GNU Libtool.
  35. #
  36. # GNU Libtool is free software; you can redistribute it and/or
  37. # modify it under the terms of the GNU General Public License as
  38. # published by the Free Software Foundation; either version 2 of
  39. # the License, or (at your option) any later version.
  40. #
  41. # As a special exception to the GNU General Public License,
  42. # if you distribute this file as part of a program or library that
  43. # is built using GNU Libtool, you may include this file under the
  44. # same distribution terms that you use for the rest of that program.
  45. #
  46. # GNU Libtool is distributed in the hope that it will be useful,
  47. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  48. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  49. # GNU General Public License for more details.
  50. #
  51. # You should have received a copy of the GNU General Public License
  52. # along with GNU Libtool; see the file COPYING. If not, a copy
  53. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  54. # obtained by writing to the Free Software Foundation, Inc.,
  55. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  56. ])
  57. # serial 57 LT_INIT
  58. # LT_PREREQ(VERSION)
  59. # ------------------
  60. # Complain and exit if this libtool version is less that VERSION.
  61. m4_defun([LT_PREREQ],
  62. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  63. [m4_default([$3],
  64. [m4_fatal([Libtool version $1 or higher is required],
  65. 63)])],
  66. [$2])])
  67. # _LT_CHECK_BUILDDIR
  68. # ------------------
  69. # Complain if the absolute build directory name contains unusual characters
  70. m4_defun([_LT_CHECK_BUILDDIR],
  71. [case `pwd` in
  72. *\ * | *\ *)
  73. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  74. esac
  75. ])
  76. # LT_INIT([OPTIONS])
  77. # ------------------
  78. AC_DEFUN([LT_INIT],
  79. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  80. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  81. AC_BEFORE([$0], [LT_LANG])dnl
  82. AC_BEFORE([$0], [LT_OUTPUT])dnl
  83. AC_BEFORE([$0], [LTDL_INIT])dnl
  84. m4_require([_LT_CHECK_BUILDDIR])dnl
  85. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  86. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  87. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  88. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  89. dnl unless we require an AC_DEFUNed macro:
  90. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  91. AC_REQUIRE([LTSUGAR_VERSION])dnl
  92. AC_REQUIRE([LTVERSION_VERSION])dnl
  93. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  94. m4_require([_LT_PROG_LTMAIN])dnl
  95. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  96. dnl Parse OPTIONS
  97. _LT_SET_OPTIONS([$0], [$1])
  98. # This can be used to rebuild libtool when needed
  99. LIBTOOL_DEPS="$ltmain"
  100. # Always use our own libtool.
  101. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  102. AC_SUBST(LIBTOOL)dnl
  103. _LT_SETUP
  104. # Only expand once:
  105. m4_define([LT_INIT])
  106. ])# LT_INIT
  107. # Old names:
  108. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  109. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  110. dnl aclocal-1.4 backwards compatibility:
  111. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  112. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  113. # _LT_CC_BASENAME(CC)
  114. # -------------------
  115. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  116. m4_defun([_LT_CC_BASENAME],
  117. [for cc_temp in $1""; do
  118. case $cc_temp in
  119. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  120. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  121. \-*) ;;
  122. *) break;;
  123. esac
  124. done
  125. cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  126. ])
  127. # _LT_FILEUTILS_DEFAULTS
  128. # ----------------------
  129. # It is okay to use these file commands and assume they have been set
  130. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  131. m4_defun([_LT_FILEUTILS_DEFAULTS],
  132. [: ${CP="cp -f"}
  133. : ${MV="mv -f"}
  134. : ${RM="rm -f"}
  135. ])# _LT_FILEUTILS_DEFAULTS
  136. # _LT_SETUP
  137. # ---------
  138. m4_defun([_LT_SETUP],
  139. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  140. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  141. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  142. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  143. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  144. dnl
  145. _LT_DECL([], [host_alias], [0], [The host system])dnl
  146. _LT_DECL([], [host], [0])dnl
  147. _LT_DECL([], [host_os], [0])dnl
  148. dnl
  149. _LT_DECL([], [build_alias], [0], [The build system])dnl
  150. _LT_DECL([], [build], [0])dnl
  151. _LT_DECL([], [build_os], [0])dnl
  152. dnl
  153. AC_REQUIRE([AC_PROG_CC])dnl
  154. AC_REQUIRE([LT_PATH_LD])dnl
  155. AC_REQUIRE([LT_PATH_NM])dnl
  156. dnl
  157. AC_REQUIRE([AC_PROG_LN_S])dnl
  158. test -z "$LN_S" && LN_S="ln -s"
  159. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  160. dnl
  161. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  162. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  163. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  164. dnl
  165. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  166. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  167. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  168. m4_require([_LT_CMD_RELOAD])dnl
  169. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  170. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  171. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  172. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  173. m4_require([_LT_WITH_SYSROOT])dnl
  174. _LT_CONFIG_LIBTOOL_INIT([
  175. # See if we are running on zsh, and set the options which allow our
  176. # commands through without removal of \ escapes INIT.
  177. if test -n "\${ZSH_VERSION+set}" ; then
  178. setopt NO_GLOB_SUBST
  179. fi
  180. ])
  181. if test -n "${ZSH_VERSION+set}" ; then
  182. setopt NO_GLOB_SUBST
  183. fi
  184. _LT_CHECK_OBJDIR
  185. m4_require([_LT_TAG_COMPILER])dnl
  186. case $host_os in
  187. aix3*)
  188. # AIX sometimes has problems with the GCC collect2 program. For some
  189. # reason, if we set the COLLECT_NAMES environment variable, the problems
  190. # vanish in a puff of smoke.
  191. if test "X${COLLECT_NAMES+set}" != Xset; then
  192. COLLECT_NAMES=
  193. export COLLECT_NAMES
  194. fi
  195. ;;
  196. esac
  197. # Global variables:
  198. ofile=libtool
  199. can_build_shared=yes
  200. # All known linkers require a `.a' archive for static linking (except MSVC,
  201. # which needs '.lib').
  202. libext=a
  203. with_gnu_ld="$lt_cv_prog_gnu_ld"
  204. old_CC="$CC"
  205. old_CFLAGS="$CFLAGS"
  206. # Set sane defaults for various variables
  207. test -z "$CC" && CC=cc
  208. test -z "$LTCC" && LTCC=$CC
  209. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  210. test -z "$LD" && LD=ld
  211. test -z "$ac_objext" && ac_objext=o
  212. _LT_CC_BASENAME([$compiler])
  213. # Only perform the check for file, if the check method requires it
  214. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  215. case $deplibs_check_method in
  216. file_magic*)
  217. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  218. _LT_PATH_MAGIC
  219. fi
  220. ;;
  221. esac
  222. # Use C for the default configuration in the libtool script
  223. LT_SUPPORTED_TAG([CC])
  224. _LT_LANG_C_CONFIG
  225. _LT_LANG_DEFAULT_CONFIG
  226. _LT_CONFIG_COMMANDS
  227. ])# _LT_SETUP
  228. # _LT_PREPARE_SED_QUOTE_VARS
  229. # --------------------------
  230. # Define a few sed substitution that help us do robust quoting.
  231. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  232. [# Backslashify metacharacters that are still active within
  233. # double-quoted strings.
  234. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  235. # Same as above, but do not quote variable references.
  236. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  237. # Sed substitution to delay expansion of an escaped shell variable in a
  238. # double_quote_subst'ed string.
  239. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  240. # Sed substitution to delay expansion of an escaped single quote.
  241. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  242. # Sed substitution to avoid accidental globbing in evaled expressions
  243. no_glob_subst='s/\*/\\\*/g'
  244. ])
  245. # _LT_PROG_LTMAIN
  246. # ---------------
  247. # Note that this code is called both from `configure', and `config.status'
  248. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  249. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  250. # so we pass a copy along to make sure it has a sensible value anyway.
  251. m4_defun([_LT_PROG_LTMAIN],
  252. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  253. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  254. ltmain="$ac_aux_dir/ltmain.sh"
  255. ])# _LT_PROG_LTMAIN
  256. # So that we can recreate a full libtool script including additional
  257. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  258. # in macros and then make a single call at the end using the `libtool'
  259. # label.
  260. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  261. # ----------------------------------------
  262. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  263. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  264. [m4_ifval([$1],
  265. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  266. [$1
  267. ])])])
  268. # Initialize.
  269. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  270. # _LT_CONFIG_LIBTOOL([COMMANDS])
  271. # ------------------------------
  272. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  273. m4_define([_LT_CONFIG_LIBTOOL],
  274. [m4_ifval([$1],
  275. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  276. [$1
  277. ])])])
  278. # Initialize.
  279. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  280. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  281. # -----------------------------------------------------
  282. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  283. [_LT_CONFIG_LIBTOOL([$1])
  284. _LT_CONFIG_LIBTOOL_INIT([$2])
  285. ])
  286. # _LT_FORMAT_COMMENT([COMMENT])
  287. # -----------------------------
  288. # Add leading comment marks to the start of each line, and a trailing
  289. # full-stop to the whole comment if one is not present already.
  290. m4_define([_LT_FORMAT_COMMENT],
  291. [m4_ifval([$1], [
  292. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  293. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  294. )])
  295. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  296. # -------------------------------------------------------------------
  297. # CONFIGNAME is the name given to the value in the libtool script.
  298. # VARNAME is the (base) name used in the configure script.
  299. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  300. # VARNAME. Any other value will be used directly.
  301. m4_define([_LT_DECL],
  302. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  303. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  304. [m4_ifval([$1], [$1], [$2])])
  305. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  306. m4_ifval([$4],
  307. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  308. lt_dict_add_subkey([lt_decl_dict], [$2],
  309. [tagged?], [m4_ifval([$5], [yes], [no])])])
  310. ])
  311. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  312. # --------------------------------------------------------
  313. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  314. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  315. # ------------------------------------------------
  316. m4_define([lt_decl_tag_varnames],
  317. [_lt_decl_filter([tagged?], [yes], $@)])
  318. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  319. # ---------------------------------------------------------
  320. m4_define([_lt_decl_filter],
  321. [m4_case([$#],
  322. [0], [m4_fatal([$0: too few arguments: $#])],
  323. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  324. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  325. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  326. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  327. ])
  328. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  329. # --------------------------------------------------
  330. m4_define([lt_decl_quote_varnames],
  331. [_lt_decl_filter([value], [1], $@)])
  332. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  333. # ---------------------------------------------------
  334. m4_define([lt_decl_dquote_varnames],
  335. [_lt_decl_filter([value], [2], $@)])
  336. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  337. # ---------------------------------------------------
  338. m4_define([lt_decl_varnames_tagged],
  339. [m4_assert([$# <= 2])dnl
  340. _$0(m4_quote(m4_default([$1], [[, ]])),
  341. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  342. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  343. m4_define([_lt_decl_varnames_tagged],
  344. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  345. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  346. # ------------------------------------------------
  347. m4_define([lt_decl_all_varnames],
  348. [_$0(m4_quote(m4_default([$1], [[, ]])),
  349. m4_if([$2], [],
  350. m4_quote(lt_decl_varnames),
  351. m4_quote(m4_shift($@))))[]dnl
  352. ])
  353. m4_define([_lt_decl_all_varnames],
  354. [lt_join($@, lt_decl_varnames_tagged([$1],
  355. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  356. ])
  357. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  358. # ------------------------------------
  359. # Quote a variable value, and forward it to `config.status' so that its
  360. # declaration there will have the same value as in `configure'. VARNAME
  361. # must have a single quote delimited value for this to work.
  362. m4_define([_LT_CONFIG_STATUS_DECLARE],
  363. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  364. # _LT_CONFIG_STATUS_DECLARATIONS
  365. # ------------------------------
  366. # We delimit libtool config variables with single quotes, so when
  367. # we write them to config.status, we have to be sure to quote all
  368. # embedded single quotes properly. In configure, this macro expands
  369. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  370. #
  371. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  372. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  373. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  374. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  375. # _LT_LIBTOOL_TAGS
  376. # ----------------
  377. # Output comment and list of tags supported by the script
  378. m4_defun([_LT_LIBTOOL_TAGS],
  379. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  380. available_tags="_LT_TAGS"dnl
  381. ])
  382. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  383. # -----------------------------------
  384. # Extract the dictionary values for VARNAME (optionally with TAG) and
  385. # expand to a commented shell variable setting:
  386. #
  387. # # Some comment about what VAR is for.
  388. # visible_name=$lt_internal_name
  389. m4_define([_LT_LIBTOOL_DECLARE],
  390. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  391. [description])))[]dnl
  392. m4_pushdef([_libtool_name],
  393. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  394. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  395. [0], [_libtool_name=[$]$1],
  396. [1], [_libtool_name=$lt_[]$1],
  397. [2], [_libtool_name=$lt_[]$1],
  398. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  399. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  400. ])
  401. # _LT_LIBTOOL_CONFIG_VARS
  402. # -----------------------
  403. # Produce commented declarations of non-tagged libtool config variables
  404. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  405. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  406. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  407. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  408. [m4_foreach([_lt_var],
  409. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  410. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  411. # _LT_LIBTOOL_TAG_VARS(TAG)
  412. # -------------------------
  413. m4_define([_LT_LIBTOOL_TAG_VARS],
  414. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  415. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  416. # _LT_TAGVAR(VARNAME, [TAGNAME])
  417. # ------------------------------
  418. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  419. # _LT_CONFIG_COMMANDS
  420. # -------------------
  421. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  422. # variables for single and double quote escaping we saved from calls
  423. # to _LT_DECL, we can put quote escaped variables declarations
  424. # into `config.status', and then the shell code to quote escape them in
  425. # for loops in `config.status'. Finally, any additional code accumulated
  426. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  427. m4_defun([_LT_CONFIG_COMMANDS],
  428. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  429. dnl If the libtool generation code has been placed in $CONFIG_LT,
  430. dnl instead of duplicating it all over again into config.status,
  431. dnl then we will have config.status run $CONFIG_LT later, so it
  432. dnl needs to know what name is stored there:
  433. [AC_CONFIG_COMMANDS([libtool],
  434. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  435. dnl If the libtool generation code is destined for config.status,
  436. dnl expand the accumulated commands and init code now:
  437. [AC_CONFIG_COMMANDS([libtool],
  438. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  439. ])#_LT_CONFIG_COMMANDS
  440. # Initialize.
  441. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  442. [
  443. # The HP-UX ksh and POSIX shell print the target directory to stdout
  444. # if CDPATH is set.
  445. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  446. sed_quote_subst='$sed_quote_subst'
  447. double_quote_subst='$double_quote_subst'
  448. delay_variable_subst='$delay_variable_subst'
  449. _LT_CONFIG_STATUS_DECLARATIONS
  450. LTCC='$LTCC'
  451. LTCFLAGS='$LTCFLAGS'
  452. compiler='$compiler_DEFAULT'
  453. # A function that is used when there is no print builtin or printf.
  454. func_fallback_echo ()
  455. {
  456. eval 'cat <<_LTECHO_EOF
  457. \$[]1
  458. _LTECHO_EOF'
  459. }
  460. # Quote evaled strings.
  461. for var in lt_decl_all_varnames([[ \
  462. ]], lt_decl_quote_varnames); do
  463. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  464. *[[\\\\\\\`\\"\\\$]]*)
  465. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  466. ;;
  467. *)
  468. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  469. ;;
  470. esac
  471. done
  472. # Double-quote double-evaled strings.
  473. for var in lt_decl_all_varnames([[ \
  474. ]], lt_decl_dquote_varnames); do
  475. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  476. *[[\\\\\\\`\\"\\\$]]*)
  477. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  478. ;;
  479. *)
  480. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  481. ;;
  482. esac
  483. done
  484. _LT_OUTPUT_LIBTOOL_INIT
  485. ])
  486. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  487. # ------------------------------------
  488. # Generate a child script FILE with all initialization necessary to
  489. # reuse the environment learned by the parent script, and make the
  490. # file executable. If COMMENT is supplied, it is inserted after the
  491. # `#!' sequence but before initialization text begins. After this
  492. # macro, additional text can be appended to FILE to form the body of
  493. # the child script. The macro ends with non-zero status if the
  494. # file could not be fully written (such as if the disk is full).
  495. m4_ifdef([AS_INIT_GENERATED],
  496. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  497. [m4_defun([_LT_GENERATED_FILE_INIT],
  498. [m4_require([AS_PREPARE])]dnl
  499. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  500. [lt_write_fail=0
  501. cat >$1 <<_ASEOF || lt_write_fail=1
  502. #! $SHELL
  503. # Generated by $as_me.
  504. $2
  505. SHELL=\${CONFIG_SHELL-$SHELL}
  506. export SHELL
  507. _ASEOF
  508. cat >>$1 <<\_ASEOF || lt_write_fail=1
  509. AS_SHELL_SANITIZE
  510. _AS_PREPARE
  511. exec AS_MESSAGE_FD>&1
  512. _ASEOF
  513. test $lt_write_fail = 0 && chmod +x $1[]dnl
  514. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  515. # LT_OUTPUT
  516. # ---------
  517. # This macro allows early generation of the libtool script (before
  518. # AC_OUTPUT is called), incase it is used in configure for compilation
  519. # tests.
  520. AC_DEFUN([LT_OUTPUT],
  521. [: ${CONFIG_LT=./config.lt}
  522. AC_MSG_NOTICE([creating $CONFIG_LT])
  523. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  524. [# Run this file to recreate a libtool stub with the current configuration.])
  525. cat >>"$CONFIG_LT" <<\_LTEOF
  526. lt_cl_silent=false
  527. exec AS_MESSAGE_LOG_FD>>config.log
  528. {
  529. echo
  530. AS_BOX([Running $as_me.])
  531. } >&AS_MESSAGE_LOG_FD
  532. lt_cl_help="\
  533. \`$as_me' creates a local libtool stub from the current configuration,
  534. for use in further configure time tests before the real libtool is
  535. generated.
  536. Usage: $[0] [[OPTIONS]]
  537. -h, --help print this help, then exit
  538. -V, --version print version number, then exit
  539. -q, --quiet do not print progress messages
  540. -d, --debug don't remove temporary files
  541. Report bugs to <bug-libtool@gnu.org>."
  542. lt_cl_version="\
  543. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  544. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  545. configured by $[0], generated by m4_PACKAGE_STRING.
  546. Copyright (C) 2011 Free Software Foundation, Inc.
  547. This config.lt script is free software; the Free Software Foundation
  548. gives unlimited permision to copy, distribute and modify it."
  549. while test $[#] != 0
  550. do
  551. case $[1] in
  552. --version | --v* | -V )
  553. echo "$lt_cl_version"; exit 0 ;;
  554. --help | --h* | -h )
  555. echo "$lt_cl_help"; exit 0 ;;
  556. --debug | --d* | -d )
  557. debug=: ;;
  558. --quiet | --q* | --silent | --s* | -q )
  559. lt_cl_silent=: ;;
  560. -*) AC_MSG_ERROR([unrecognized option: $[1]
  561. Try \`$[0] --help' for more information.]) ;;
  562. *) AC_MSG_ERROR([unrecognized argument: $[1]
  563. Try \`$[0] --help' for more information.]) ;;
  564. esac
  565. shift
  566. done
  567. if $lt_cl_silent; then
  568. exec AS_MESSAGE_FD>/dev/null
  569. fi
  570. _LTEOF
  571. cat >>"$CONFIG_LT" <<_LTEOF
  572. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  573. _LTEOF
  574. cat >>"$CONFIG_LT" <<\_LTEOF
  575. AC_MSG_NOTICE([creating $ofile])
  576. _LT_OUTPUT_LIBTOOL_COMMANDS
  577. AS_EXIT(0)
  578. _LTEOF
  579. chmod +x "$CONFIG_LT"
  580. # configure is writing to config.log, but config.lt does its own redirection,
  581. # appending to config.log, which fails on DOS, as config.log is still kept
  582. # open by configure. Here we exec the FD to /dev/null, effectively closing
  583. # config.log, so it can be properly (re)opened and appended to by config.lt.
  584. lt_cl_success=:
  585. test "$silent" = yes &&
  586. lt_config_lt_args="$lt_config_lt_args --quiet"
  587. exec AS_MESSAGE_LOG_FD>/dev/null
  588. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  589. exec AS_MESSAGE_LOG_FD>>config.log
  590. $lt_cl_success || AS_EXIT(1)
  591. ])# LT_OUTPUT
  592. # _LT_CONFIG(TAG)
  593. # ---------------
  594. # If TAG is the built-in tag, create an initial libtool script with a
  595. # default configuration from the untagged config vars. Otherwise add code
  596. # to config.status for appending the configuration named by TAG from the
  597. # matching tagged config vars.
  598. m4_defun([_LT_CONFIG],
  599. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  600. _LT_CONFIG_SAVE_COMMANDS([
  601. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  602. m4_if(_LT_TAG, [C], [
  603. # See if we are running on zsh, and set the options which allow our
  604. # commands through without removal of \ escapes.
  605. if test -n "${ZSH_VERSION+set}" ; then
  606. setopt NO_GLOB_SUBST
  607. fi
  608. cfgfile="${ofile}T"
  609. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  610. $RM "$cfgfile"
  611. cat <<_LT_EOF >> "$cfgfile"
  612. #! $SHELL
  613. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  614. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  615. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  616. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  617. #
  618. _LT_COPYING
  619. _LT_LIBTOOL_TAGS
  620. # ### BEGIN LIBTOOL CONFIG
  621. _LT_LIBTOOL_CONFIG_VARS
  622. _LT_LIBTOOL_TAG_VARS
  623. # ### END LIBTOOL CONFIG
  624. _LT_EOF
  625. case $host_os in
  626. aix3*)
  627. cat <<\_LT_EOF >> "$cfgfile"
  628. # AIX sometimes has problems with the GCC collect2 program. For some
  629. # reason, if we set the COLLECT_NAMES environment variable, the problems
  630. # vanish in a puff of smoke.
  631. if test "X${COLLECT_NAMES+set}" != Xset; then
  632. COLLECT_NAMES=
  633. export COLLECT_NAMES
  634. fi
  635. _LT_EOF
  636. ;;
  637. esac
  638. _LT_PROG_LTMAIN
  639. # We use sed instead of cat because bash on DJGPP gets confused if
  640. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  641. # text mode, it properly converts lines to CR/LF. This bash problem
  642. # is reportedly fixed, but why not run on old versions too?
  643. sed '$q' "$ltmain" >> "$cfgfile" \
  644. || (rm -f "$cfgfile"; exit 1)
  645. _LT_PROG_REPLACE_SHELLFNS
  646. mv -f "$cfgfile" "$ofile" ||
  647. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  648. chmod +x "$ofile"
  649. ],
  650. [cat <<_LT_EOF >> "$ofile"
  651. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  652. dnl in a comment (ie after a #).
  653. # ### BEGIN LIBTOOL TAG CONFIG: $1
  654. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  655. # ### END LIBTOOL TAG CONFIG: $1
  656. _LT_EOF
  657. ])dnl /m4_if
  658. ],
  659. [m4_if([$1], [], [
  660. PACKAGE='$PACKAGE'
  661. VERSION='$VERSION'
  662. TIMESTAMP='$TIMESTAMP'
  663. RM='$RM'
  664. ofile='$ofile'], [])
  665. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  666. ])# _LT_CONFIG
  667. # LT_SUPPORTED_TAG(TAG)
  668. # ---------------------
  669. # Trace this macro to discover what tags are supported by the libtool
  670. # --tag option, using:
  671. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  672. AC_DEFUN([LT_SUPPORTED_TAG], [])
  673. # C support is built-in for now
  674. m4_define([_LT_LANG_C_enabled], [])
  675. m4_define([_LT_TAGS], [])
  676. # LT_LANG(LANG)
  677. # -------------
  678. # Enable libtool support for the given language if not already enabled.
  679. AC_DEFUN([LT_LANG],
  680. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  681. m4_case([$1],
  682. [C], [_LT_LANG(C)],
  683. [C++], [_LT_LANG(CXX)],
  684. [Go], [_LT_LANG(GO)],
  685. [Java], [_LT_LANG(GCJ)],
  686. [Fortran 77], [_LT_LANG(F77)],
  687. [Fortran], [_LT_LANG(FC)],
  688. [Windows Resource], [_LT_LANG(RC)],
  689. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  690. [_LT_LANG($1)],
  691. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  692. ])# LT_LANG
  693. # _LT_LANG(LANGNAME)
  694. # ------------------
  695. m4_defun([_LT_LANG],
  696. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  697. [LT_SUPPORTED_TAG([$1])dnl
  698. m4_append([_LT_TAGS], [$1 ])dnl
  699. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  700. _LT_LANG_$1_CONFIG($1)])dnl
  701. ])# _LT_LANG
  702. m4_ifndef([AC_PROG_GO], [
  703. # NOTE: This macro has been submitted for inclusion into #
  704. # GNU Autoconf as AC_PROG_GO. When it is available in #
  705. # a released version of Autoconf we should remove this #
  706. # macro and use it instead. #
  707. m4_defun([AC_PROG_GO],
  708. [AC_LANG_PUSH(Go)dnl
  709. AC_ARG_VAR([GOC], [Go compiler command])dnl
  710. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  711. _AC_ARG_VAR_LDFLAGS()dnl
  712. AC_CHECK_TOOL(GOC, gccgo)
  713. if test -z "$GOC"; then
  714. if test -n "$ac_tool_prefix"; then
  715. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  716. fi
  717. fi
  718. if test -z "$GOC"; then
  719. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  720. fi
  721. ])#m4_defun
  722. ])#m4_ifndef
  723. # _LT_LANG_DEFAULT_CONFIG
  724. # -----------------------
  725. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  726. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  727. [LT_LANG(CXX)],
  728. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  729. AC_PROVIDE_IFELSE([AC_PROG_F77],
  730. [LT_LANG(F77)],
  731. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  732. AC_PROVIDE_IFELSE([AC_PROG_FC],
  733. [LT_LANG(FC)],
  734. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  735. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  736. dnl pulling things in needlessly.
  737. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  738. [LT_LANG(GCJ)],
  739. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  740. [LT_LANG(GCJ)],
  741. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  742. [LT_LANG(GCJ)],
  743. [m4_ifdef([AC_PROG_GCJ],
  744. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  745. m4_ifdef([A][M_PROG_GCJ],
  746. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  747. m4_ifdef([LT_PROG_GCJ],
  748. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  749. AC_PROVIDE_IFELSE([AC_PROG_GO],
  750. [LT_LANG(GO)],
  751. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  752. AC_PROVIDE_IFELSE([LT_PROG_RC],
  753. [LT_LANG(RC)],
  754. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  755. ])# _LT_LANG_DEFAULT_CONFIG
  756. # Obsolete macros:
  757. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  758. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  759. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  760. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  761. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  762. dnl aclocal-1.4 backwards compatibility:
  763. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  764. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  765. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  766. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  767. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  768. # _LT_TAG_COMPILER
  769. # ----------------
  770. m4_defun([_LT_TAG_COMPILER],
  771. [AC_REQUIRE([AC_PROG_CC])dnl
  772. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  773. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  774. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  775. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  776. # If no C compiler was specified, use CC.
  777. LTCC=${LTCC-"$CC"}
  778. # If no C compiler flags were specified, use CFLAGS.
  779. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  780. # Allow CC to be a program name with arguments.
  781. compiler=$CC
  782. ])# _LT_TAG_COMPILER
  783. # _LT_COMPILER_BOILERPLATE
  784. # ------------------------
  785. # Check for compiler boilerplate output or warnings with
  786. # the simple compiler test code.
  787. m4_defun([_LT_COMPILER_BOILERPLATE],
  788. [m4_require([_LT_DECL_SED])dnl
  789. ac_outfile=conftest.$ac_objext
  790. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  791. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  792. _lt_compiler_boilerplate=`cat conftest.err`
  793. $RM conftest*
  794. ])# _LT_COMPILER_BOILERPLATE
  795. # _LT_LINKER_BOILERPLATE
  796. # ----------------------
  797. # Check for linker boilerplate output or warnings with
  798. # the simple link test code.
  799. m4_defun([_LT_LINKER_BOILERPLATE],
  800. [m4_require([_LT_DECL_SED])dnl
  801. ac_outfile=conftest.$ac_objext
  802. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  803. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  804. _lt_linker_boilerplate=`cat conftest.err`
  805. $RM -r conftest*
  806. ])# _LT_LINKER_BOILERPLATE
  807. # _LT_REQUIRED_DARWIN_CHECKS
  808. # -------------------------
  809. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  810. case $host_os in
  811. rhapsody* | darwin*)
  812. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  813. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  814. AC_CHECK_TOOL([LIPO], [lipo], [:])
  815. AC_CHECK_TOOL([OTOOL], [otool], [:])
  816. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  817. _LT_DECL([], [DSYMUTIL], [1],
  818. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  819. _LT_DECL([], [NMEDIT], [1],
  820. [Tool to change global to local symbols on Mac OS X])
  821. _LT_DECL([], [LIPO], [1],
  822. [Tool to manipulate fat objects and archives on Mac OS X])
  823. _LT_DECL([], [OTOOL], [1],
  824. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  825. _LT_DECL([], [OTOOL64], [1],
  826. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  827. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  828. [lt_cv_apple_cc_single_mod=no
  829. if test -z "${LT_MULTI_MODULE}"; then
  830. # By default we will add the -single_module flag. You can override
  831. # by either setting the environment variable LT_MULTI_MODULE
  832. # non-empty at configure time, or by adding -multi_module to the
  833. # link flags.
  834. rm -rf libconftest.dylib*
  835. echo "int foo(void){return 1;}" > conftest.c
  836. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  837. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  838. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  839. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  840. _lt_result=$?
  841. # If there is a non-empty error log, and "single_module"
  842. # appears in it, assume the flag caused a linker warning
  843. if test -s conftest.err && $GREP single_module conftest.err; then
  844. cat conftest.err >&AS_MESSAGE_LOG_FD
  845. # Otherwise, if the output was created with a 0 exit code from
  846. # the compiler, it worked.
  847. elif test -f libconftest.dylib && test $_lt_result -eq 0; then
  848. lt_cv_apple_cc_single_mod=yes
  849. else
  850. cat conftest.err >&AS_MESSAGE_LOG_FD
  851. fi
  852. rm -rf libconftest.dylib*
  853. rm -f conftest.*
  854. fi])
  855. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  856. [lt_cv_ld_exported_symbols_list],
  857. [lt_cv_ld_exported_symbols_list=no
  858. save_LDFLAGS=$LDFLAGS
  859. echo "_main" > conftest.sym
  860. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  861. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  862. [lt_cv_ld_exported_symbols_list=yes],
  863. [lt_cv_ld_exported_symbols_list=no])
  864. LDFLAGS="$save_LDFLAGS"
  865. ])
  866. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  867. [lt_cv_ld_force_load=no
  868. cat > conftest.c << _LT_EOF
  869. int forced_loaded() { return 2;}
  870. _LT_EOF
  871. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  872. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  873. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  874. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  875. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  876. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  877. cat > conftest.c << _LT_EOF
  878. int main() { return 0;}
  879. _LT_EOF
  880. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  881. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  882. _lt_result=$?
  883. if test -s conftest.err && $GREP force_load conftest.err; then
  884. cat conftest.err >&AS_MESSAGE_LOG_FD
  885. elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
  886. lt_cv_ld_force_load=yes
  887. else
  888. cat conftest.err >&AS_MESSAGE_LOG_FD
  889. fi
  890. rm -f conftest.err libconftest.a conftest conftest.c
  891. rm -rf conftest.dSYM
  892. ])
  893. case $host_os in
  894. rhapsody* | darwin1.[[012]])
  895. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  896. darwin1.*)
  897. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  898. darwin*) # darwin 5.x on
  899. # if running on 10.5 or later, the deployment target defaults
  900. # to the OS version, if on x86, and 10.4, the deployment
  901. # target defaults to 10.4. Don't you love it?
  902. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  903. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  904. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  905. 10.[[012]]*)
  906. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  907. 10.*)
  908. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  909. esac
  910. ;;
  911. esac
  912. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  913. _lt_dar_single_mod='$single_module'
  914. fi
  915. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  916. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  917. else
  918. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  919. fi
  920. if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  921. _lt_dsymutil='~$DSYMUTIL $lib || :'
  922. else
  923. _lt_dsymutil=
  924. fi
  925. ;;
  926. esac
  927. ])
  928. # _LT_DARWIN_LINKER_FEATURES([TAG])
  929. # ---------------------------------
  930. # Checks for linker and compiler features on darwin
  931. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  932. [
  933. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  934. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  935. _LT_TAGVAR(hardcode_direct, $1)=no
  936. _LT_TAGVAR(hardcode_automatic, $1)=yes
  937. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  938. if test "$lt_cv_ld_force_load" = "yes"; then
  939. _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\"`'
  940. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  941. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  942. else
  943. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  944. fi
  945. _LT_TAGVAR(link_all_deplibs, $1)=yes
  946. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  947. case $cc_basename in
  948. ifort*) _lt_dar_can_shared=yes ;;
  949. *) _lt_dar_can_shared=$GCC ;;
  950. esac
  951. if test "$_lt_dar_can_shared" = "yes"; then
  952. output_verbose_link_cmd=func_echo_all
  953. _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}"
  954. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  955. _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}"
  956. _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}"
  957. m4_if([$1], [CXX],
  958. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  959. _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}"
  960. _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}"
  961. fi
  962. ],[])
  963. else
  964. _LT_TAGVAR(ld_shlibs, $1)=no
  965. fi
  966. ])
  967. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  968. # ----------------------------------
  969. # Links a minimal program and checks the executable
  970. # for the system default hardcoded library path. In most cases,
  971. # this is /usr/lib:/lib, but when the MPI compilers are used
  972. # the location of the communication and MPI libs are included too.
  973. # If we don't find anything, use the default library path according
  974. # to the aix ld manual.
  975. # Store the results from the different compilers for each TAGNAME.
  976. # Allow to override them for all tags through lt_cv_aix_libpath.
  977. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  978. [m4_require([_LT_DECL_SED])dnl
  979. if test "${lt_cv_aix_libpath+set}" = set; then
  980. aix_libpath=$lt_cv_aix_libpath
  981. else
  982. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  983. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  984. lt_aix_libpath_sed='[
  985. /Import File Strings/,/^$/ {
  986. /^0/ {
  987. s/^0 *\([^ ]*\) *$/\1/
  988. p
  989. }
  990. }]'
  991. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  992. # Check for a 64-bit object if we didn't find anything.
  993. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  994. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  995. fi],[])
  996. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  997. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
  998. fi
  999. ])
  1000. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1001. fi
  1002. ])# _LT_SYS_MODULE_PATH_AIX
  1003. # _LT_SHELL_INIT(ARG)
  1004. # -------------------
  1005. m4_define([_LT_SHELL_INIT],
  1006. [m4_divert_text([M4SH-INIT], [$1
  1007. ])])# _LT_SHELL_INIT
  1008. # _LT_PROG_ECHO_BACKSLASH
  1009. # -----------------------
  1010. # Find how we can fake an echo command that does not interpret backslash.
  1011. # In particular, with Autoconf 2.60 or later we add some code to the start
  1012. # of the generated configure script which will find a shell with a builtin
  1013. # printf (which we can use as an echo command).
  1014. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1015. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1016. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1017. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1018. AC_MSG_CHECKING([how to print strings])
  1019. # Test print first, because it will be a builtin if present.
  1020. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1021. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1022. ECHO='print -r --'
  1023. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1024. ECHO='printf %s\n'
  1025. else
  1026. # Use this function as a fallback that always works.
  1027. func_fallback_echo ()
  1028. {
  1029. eval 'cat <<_LTECHO_EOF
  1030. $[]1
  1031. _LTECHO_EOF'
  1032. }
  1033. ECHO='func_fallback_echo'
  1034. fi
  1035. # func_echo_all arg...
  1036. # Invoke $ECHO with all args, space-separated.
  1037. func_echo_all ()
  1038. {
  1039. $ECHO "$*"
  1040. }
  1041. case "$ECHO" in
  1042. printf*) AC_MSG_RESULT([printf]) ;;
  1043. print*) AC_MSG_RESULT([print -r]) ;;
  1044. *) AC_MSG_RESULT([cat]) ;;
  1045. esac
  1046. m4_ifdef([_AS_DETECT_SUGGESTED],
  1047. [_AS_DETECT_SUGGESTED([
  1048. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1049. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1050. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1051. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1052. PATH=/empty FPATH=/empty; export PATH FPATH
  1053. test "X`printf %s $ECHO`" = "X$ECHO" \
  1054. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1055. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1056. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1057. ])# _LT_PROG_ECHO_BACKSLASH
  1058. # _LT_WITH_SYSROOT
  1059. # ----------------
  1060. AC_DEFUN([_LT_WITH_SYSROOT],
  1061. [AC_MSG_CHECKING([for sysroot])
  1062. AC_ARG_WITH([sysroot],
  1063. [ --with-sysroot[=DIR] Search for dependent libraries within DIR
  1064. (or the compiler's sysroot if not specified).],
  1065. [], [with_sysroot=no])
  1066. dnl lt_sysroot will always be passed unquoted. We quote it here
  1067. dnl in case the user passed a directory name.
  1068. lt_sysroot=
  1069. case ${with_sysroot} in #(
  1070. yes)
  1071. if test "$GCC" = yes; then
  1072. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1073. fi
  1074. ;; #(
  1075. /*)
  1076. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1077. ;; #(
  1078. no|'')
  1079. ;; #(
  1080. *)
  1081. AC_MSG_RESULT([${with_sysroot}])
  1082. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1083. ;;
  1084. esac
  1085. AC_MSG_RESULT([${lt_sysroot:-no}])
  1086. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1087. [dependent libraries, and in which our libraries should be installed.])])
  1088. # _LT_ENABLE_LOCK
  1089. # ---------------
  1090. m4_defun([_LT_ENABLE_LOCK],
  1091. [AC_ARG_ENABLE([libtool-lock],
  1092. [AS_HELP_STRING([--disable-libtool-lock],
  1093. [avoid locking (might break parallel builds)])])
  1094. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1095. # Some flags need to be propagated to the compiler or linker for good
  1096. # libtool support.
  1097. case $host in
  1098. ia64-*-hpux*)
  1099. # Find out which ABI we are using.
  1100. echo 'int i;' > conftest.$ac_ext
  1101. if AC_TRY_EVAL(ac_compile); then
  1102. case `/usr/bin/file conftest.$ac_objext` in
  1103. *ELF-32*)
  1104. HPUX_IA64_MODE="32"
  1105. ;;
  1106. *ELF-64*)
  1107. HPUX_IA64_MODE="64"
  1108. ;;
  1109. esac
  1110. fi
  1111. rm -rf conftest*
  1112. ;;
  1113. *-*-irix6*)
  1114. # Find out which ABI we are using.
  1115. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1116. if AC_TRY_EVAL(ac_compile); then
  1117. if test "$lt_cv_prog_gnu_ld" = yes; then
  1118. case `/usr/bin/file conftest.$ac_objext` in
  1119. *32-bit*)
  1120. LD="${LD-ld} -melf32bsmip"
  1121. ;;
  1122. *N32*)
  1123. LD="${LD-ld} -melf32bmipn32"
  1124. ;;
  1125. *64-bit*)
  1126. LD="${LD-ld} -melf64bmip"
  1127. ;;
  1128. esac
  1129. else
  1130. case `/usr/bin/file conftest.$ac_objext` in
  1131. *32-bit*)
  1132. LD="${LD-ld} -32"
  1133. ;;
  1134. *N32*)
  1135. LD="${LD-ld} -n32"
  1136. ;;
  1137. *64-bit*)
  1138. LD="${LD-ld} -64"
  1139. ;;
  1140. esac
  1141. fi
  1142. fi
  1143. rm -rf conftest*
  1144. ;;
  1145. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1146. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1147. # Find out which ABI we are using.
  1148. echo 'int i;' > conftest.$ac_ext
  1149. if AC_TRY_EVAL(ac_compile); then
  1150. case `/usr/bin/file conftest.o` in
  1151. *32-bit*)
  1152. case $host in
  1153. x86_64-*kfreebsd*-gnu)
  1154. LD="${LD-ld} -m elf_i386_fbsd"
  1155. ;;
  1156. x86_64-*linux*)
  1157. LD="${LD-ld} -m elf_i386"
  1158. ;;
  1159. ppc64-*linux*|powerpc64-*linux*)
  1160. LD="${LD-ld} -m elf32ppclinux"
  1161. ;;
  1162. s390x-*linux*)
  1163. LD="${LD-ld} -m elf_s390"
  1164. ;;
  1165. sparc64-*linux*)
  1166. LD="${LD-ld} -m elf32_sparc"
  1167. ;;
  1168. esac
  1169. ;;
  1170. *64-bit*)
  1171. case $host in
  1172. x86_64-*kfreebsd*-gnu)
  1173. LD="${LD-ld} -m elf_x86_64_fbsd"
  1174. ;;
  1175. x86_64-*linux*)
  1176. LD="${LD-ld} -m elf_x86_64"
  1177. ;;
  1178. ppc*-*linux*|powerpc*-*linux*)
  1179. LD="${LD-ld} -m elf64ppc"
  1180. ;;
  1181. s390*-*linux*|s390*-*tpf*)
  1182. LD="${LD-ld} -m elf64_s390"
  1183. ;;
  1184. sparc*-*linux*)
  1185. LD="${LD-ld} -m elf64_sparc"
  1186. ;;
  1187. esac
  1188. ;;
  1189. esac
  1190. fi
  1191. rm -rf conftest*
  1192. ;;
  1193. *-*-sco3.2v5*)
  1194. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1195. SAVE_CFLAGS="$CFLAGS"
  1196. CFLAGS="$CFLAGS -belf"
  1197. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1198. [AC_LANG_PUSH(C)
  1199. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1200. AC_LANG_POP])
  1201. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1202. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1203. CFLAGS="$SAVE_CFLAGS"
  1204. fi
  1205. ;;
  1206. *-*solaris*)
  1207. # Find out which ABI we are using.
  1208. echo 'int i;' > conftest.$ac_ext
  1209. if AC_TRY_EVAL(ac_compile); then
  1210. case `/usr/bin/file conftest.o` in
  1211. *64-bit*)
  1212. case $lt_cv_prog_gnu_ld in
  1213. yes*)
  1214. case $host in
  1215. i?86-*-solaris*)
  1216. LD="${LD-ld} -m elf_x86_64"
  1217. ;;
  1218. sparc*-*-solaris*)
  1219. LD="${LD-ld} -m elf64_sparc"
  1220. ;;
  1221. esac
  1222. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1223. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1224. LD="${LD-ld}_sol2"
  1225. fi
  1226. ;;
  1227. *)
  1228. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1229. LD="${LD-ld} -64"
  1230. fi
  1231. ;;
  1232. esac
  1233. ;;
  1234. esac
  1235. fi
  1236. rm -rf conftest*
  1237. ;;
  1238. esac
  1239. need_locks="$enable_libtool_lock"
  1240. ])# _LT_ENABLE_LOCK
  1241. # _LT_PROG_AR
  1242. # -----------
  1243. m4_defun([_LT_PROG_AR],
  1244. [AC_CHECK_TOOLS(AR, [ar], false)
  1245. : ${AR=ar}
  1246. : ${AR_FLAGS=cru}
  1247. _LT_DECL([], [AR], [1], [The archiver])
  1248. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1249. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1250. [lt_cv_ar_at_file=no
  1251. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1252. [echo conftest.$ac_objext > conftest.lst
  1253. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1254. AC_TRY_EVAL([lt_ar_try])
  1255. if test "$ac_status" -eq 0; then
  1256. # Ensure the archiver fails upon bogus file names.
  1257. rm -f conftest.$ac_objext libconftest.a
  1258. AC_TRY_EVAL([lt_ar_try])
  1259. if test "$ac_status" -ne 0; then
  1260. lt_cv_ar_at_file=@
  1261. fi
  1262. fi
  1263. rm -f conftest.* libconftest.a
  1264. ])
  1265. ])
  1266. if test "x$lt_cv_ar_at_file" = xno; then
  1267. archiver_list_spec=
  1268. else
  1269. archiver_list_spec=$lt_cv_ar_at_file
  1270. fi
  1271. _LT_DECL([], [archiver_list_spec], [1],
  1272. [How to feed a file listing to the archiver])
  1273. ])# _LT_PROG_AR
  1274. # _LT_CMD_OLD_ARCHIVE
  1275. # -------------------
  1276. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1277. [_LT_PROG_AR
  1278. AC_CHECK_TOOL(STRIP, strip, :)
  1279. test -z "$STRIP" && STRIP=:
  1280. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1281. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1282. test -z "$RANLIB" && RANLIB=:
  1283. _LT_DECL([], [RANLIB], [1],
  1284. [Commands used to install an old-style archive])
  1285. # Determine commands to create old-style static archives.
  1286. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1287. old_postinstall_cmds='chmod 644 $oldlib'
  1288. old_postuninstall_cmds=
  1289. if test -n "$RANLIB"; then
  1290. case $host_os in
  1291. openbsd*)
  1292. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1293. ;;
  1294. *)
  1295. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1296. ;;
  1297. esac
  1298. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1299. fi
  1300. case $host_os in
  1301. darwin*)
  1302. lock_old_archive_extraction=yes ;;
  1303. *)
  1304. lock_old_archive_extraction=no ;;
  1305. esac
  1306. _LT_DECL([], [old_postinstall_cmds], [2])
  1307. _LT_DECL([], [old_postuninstall_cmds], [2])
  1308. _LT_TAGDECL([], [old_archive_cmds], [2],
  1309. [Commands used to build an old-style archive])
  1310. _LT_DECL([], [lock_old_archive_extraction], [0],
  1311. [Whether to use a lock for old archive extraction])
  1312. ])# _LT_CMD_OLD_ARCHIVE
  1313. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1314. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1315. # ----------------------------------------------------------------
  1316. # Check whether the given compiler option works
  1317. AC_DEFUN([_LT_COMPILER_OPTION],
  1318. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1319. m4_require([_LT_DECL_SED])dnl
  1320. AC_CACHE_CHECK([$1], [$2],
  1321. [$2=no
  1322. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1323. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1324. lt_compiler_flag="$3"
  1325. # Insert the option either (1) after the last *FLAGS variable, or
  1326. # (2) before a word containing "conftest.", or (3) at the end.
  1327. # Note that $ac_compile itself does not contain backslashes and begins
  1328. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1329. # The option is referenced via a variable to avoid confusing sed.
  1330. lt_compile=`echo "$ac_compile" | $SED \
  1331. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1332. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1333. -e 's:$: $lt_compiler_flag:'`
  1334. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1335. (eval "$lt_compile" 2>conftest.err)
  1336. ac_status=$?
  1337. cat conftest.err >&AS_MESSAGE_LOG_FD
  1338. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1339. if (exit $ac_status) && test -s "$ac_outfile"; then
  1340. # The compiler can only warn and ignore the option if not recognized
  1341. # So say no if there are warnings other than the usual output.
  1342. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1343. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1344. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1345. $2=yes
  1346. fi
  1347. fi
  1348. $RM conftest*
  1349. ])
  1350. if test x"[$]$2" = xyes; then
  1351. m4_if([$5], , :, [$5])
  1352. else
  1353. m4_if([$6], , :, [$6])
  1354. fi
  1355. ])# _LT_COMPILER_OPTION
  1356. # Old name:
  1357. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1358. dnl aclocal-1.4 backwards compatibility:
  1359. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1360. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1361. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1362. # ----------------------------------------------------
  1363. # Check whether the given linker option works
  1364. AC_DEFUN([_LT_LINKER_OPTION],
  1365. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1366. m4_require([_LT_DECL_SED])dnl
  1367. AC_CACHE_CHECK([$1], [$2],
  1368. [$2=no
  1369. save_LDFLAGS="$LDFLAGS"
  1370. LDFLAGS="$LDFLAGS $3"
  1371. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1372. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1373. # The linker can only warn and ignore the option if not recognized
  1374. # So say no if there are warnings
  1375. if test -s conftest.err; then
  1376. # Append any errors to the config.log.
  1377. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1378. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1379. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1380. if diff conftest.exp conftest.er2 >/dev/null; then
  1381. $2=yes
  1382. fi
  1383. else
  1384. $2=yes
  1385. fi
  1386. fi
  1387. $RM -r conftest*
  1388. LDFLAGS="$save_LDFLAGS"
  1389. ])
  1390. if test x"[$]$2" = xyes; then
  1391. m4_if([$4], , :, [$4])
  1392. else
  1393. m4_if([$5], , :, [$5])
  1394. fi
  1395. ])# _LT_LINKER_OPTION
  1396. # Old name:
  1397. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1398. dnl aclocal-1.4 backwards compatibility:
  1399. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1400. # LT_CMD_MAX_LEN
  1401. #---------------
  1402. AC_DEFUN([LT_CMD_MAX_LEN],
  1403. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1404. # find the maximum length of command line arguments
  1405. AC_MSG_CHECKING([the maximum length of command line arguments])
  1406. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1407. i=0
  1408. teststring="ABCD"
  1409. case $build_os in
  1410. msdosdjgpp*)
  1411. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1412. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1413. # during glob expansion). Even if it were fixed, the result of this
  1414. # check would be larger than it should be.
  1415. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1416. ;;
  1417. gnu*)
  1418. # Under GNU Hurd, this test is not required because there is
  1419. # no limit to the length of command line arguments.
  1420. # Libtool will interpret -1 as no limit whatsoever
  1421. lt_cv_sys_max_cmd_len=-1;
  1422. ;;
  1423. cygwin* | mingw* | cegcc*)
  1424. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1425. # about 5 minutes as the teststring grows exponentially.
  1426. # Worse, since 9x/ME are not pre-emptively multitasking,
  1427. # you end up with a "frozen" computer, even though with patience
  1428. # the test eventually succeeds (with a max line length of 256k).
  1429. # Instead, let's just punt: use the minimum linelength reported by
  1430. # all of the supported platforms: 8192 (on NT/2K/XP).
  1431. lt_cv_sys_max_cmd_len=8192;
  1432. ;;
  1433. mint*)
  1434. # On MiNT this can take a long time and run out of memory.
  1435. lt_cv_sys_max_cmd_len=8192;
  1436. ;;
  1437. amigaos*)
  1438. # On AmigaOS with pdksh, this test takes hours, literally.
  1439. # So we just punt and use a minimum line length of 8192.
  1440. lt_cv_sys_max_cmd_len=8192;
  1441. ;;
  1442. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  1443. # This has been around since 386BSD, at least. Likely further.
  1444. if test -x /sbin/sysctl; then
  1445. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1446. elif test -x /usr/sbin/sysctl; then
  1447. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1448. else
  1449. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1450. fi
  1451. # And add a safety zone
  1452. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1453. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1454. ;;
  1455. interix*)
  1456. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1457. lt_cv_sys_max_cmd_len=196608
  1458. ;;
  1459. os2*)
  1460. # The test takes a long time on OS/2.
  1461. lt_cv_sys_max_cmd_len=8192
  1462. ;;
  1463. osf*)
  1464. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1465. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1466. # nice to cause kernel panics so lets avoid the loop below.
  1467. # First set a reasonable default.
  1468. lt_cv_sys_max_cmd_len=16384
  1469. #
  1470. if test -x /sbin/sysconfig; then
  1471. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1472. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1473. esac
  1474. fi
  1475. ;;
  1476. sco3.2v5*)
  1477. lt_cv_sys_max_cmd_len=102400
  1478. ;;
  1479. sysv5* | sco5v6* | sysv4.2uw2*)
  1480. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1481. if test -n "$kargmax"; then
  1482. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1483. else
  1484. lt_cv_sys_max_cmd_len=32768
  1485. fi
  1486. ;;
  1487. *)
  1488. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1489. if test -n "$lt_cv_sys_max_cmd_len"; then
  1490. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1491. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1492. else
  1493. # Make teststring a little bigger before we do anything with it.
  1494. # a 1K string should be a reasonable start.
  1495. for i in 1 2 3 4 5 6 7 8 ; do
  1496. teststring=$teststring$teststring
  1497. done
  1498. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1499. # If test is not a shell built-in, we'll probably end up computing a
  1500. # maximum length that is only half of the actual maximum length, but
  1501. # we can't tell.
  1502. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
  1503. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1504. test $i != 17 # 1/2 MB should be enough
  1505. do
  1506. i=`expr $i + 1`
  1507. teststring=$teststring$teststring
  1508. done
  1509. # Only check the string length outside the loop.
  1510. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1511. teststring=
  1512. # Add a significant safety factor because C++ compilers can tack on
  1513. # massive amounts of additional arguments before passing them to the
  1514. # linker. It appears as though 1/2 is a usable value.
  1515. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1516. fi
  1517. ;;
  1518. esac
  1519. ])
  1520. if test -n $lt_cv_sys_max_cmd_len ; then
  1521. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1522. else
  1523. AC_MSG_RESULT(none)
  1524. fi
  1525. max_cmd_len=$lt_cv_sys_max_cmd_len
  1526. _LT_DECL([], [max_cmd_len], [0],
  1527. [What is the maximum length of a command?])
  1528. ])# LT_CMD_MAX_LEN
  1529. # Old name:
  1530. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1531. dnl aclocal-1.4 backwards compatibility:
  1532. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1533. # _LT_HEADER_DLFCN
  1534. # ----------------
  1535. m4_defun([_LT_HEADER_DLFCN],
  1536. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1537. ])# _LT_HEADER_DLFCN
  1538. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1539. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1540. # ----------------------------------------------------------------
  1541. m4_defun([_LT_TRY_DLOPEN_SELF],
  1542. [m4_require([_LT_HEADER_DLFCN])dnl
  1543. if test "$cross_compiling" = yes; then :
  1544. [$4]
  1545. else
  1546. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1547. lt_status=$lt_dlunknown
  1548. cat > conftest.$ac_ext <<_LT_EOF
  1549. [#line $LINENO "configure"
  1550. #include "confdefs.h"
  1551. #if HAVE_DLFCN_H
  1552. #include <dlfcn.h>
  1553. #endif
  1554. #include <stdio.h>
  1555. #ifdef RTLD_GLOBAL
  1556. # define LT_DLGLOBAL RTLD_GLOBAL
  1557. #else
  1558. # ifdef DL_GLOBAL
  1559. # define LT_DLGLOBAL DL_GLOBAL
  1560. # else
  1561. # define LT_DLGLOBAL 0
  1562. # endif
  1563. #endif
  1564. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1565. find out it does not work in some platform. */
  1566. #ifndef LT_DLLAZY_OR_NOW
  1567. # ifdef RTLD_LAZY
  1568. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1569. # else
  1570. # ifdef DL_LAZY
  1571. # define LT_DLLAZY_OR_NOW DL_LAZY
  1572. # else
  1573. # ifdef RTLD_NOW
  1574. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1575. # else
  1576. # ifdef DL_NOW
  1577. # define LT_DLLAZY_OR_NOW DL_NOW
  1578. # else
  1579. # define LT_DLLAZY_OR_NOW 0
  1580. # endif
  1581. # endif
  1582. # endif
  1583. # endif
  1584. #endif
  1585. /* When -fvisbility=hidden is used, assume the code has been annotated
  1586. correspondingly for the symbols needed. */
  1587. #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1588. int fnord () __attribute__((visibility("default")));
  1589. #endif
  1590. int fnord () { return 42; }
  1591. int main ()
  1592. {
  1593. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1594. int status = $lt_dlunknown;
  1595. if (self)
  1596. {
  1597. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1598. else
  1599. {
  1600. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1601. else puts (dlerror ());
  1602. }
  1603. /* dlclose (self); */
  1604. }
  1605. else
  1606. puts (dlerror ());
  1607. return status;
  1608. }]
  1609. _LT_EOF
  1610. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  1611. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1612. lt_status=$?
  1613. case x$lt_status in
  1614. x$lt_dlno_uscore) $1 ;;
  1615. x$lt_dlneed_uscore) $2 ;;
  1616. x$lt_dlunknown|x*) $3 ;;
  1617. esac
  1618. else :
  1619. # compilation failed
  1620. $3
  1621. fi
  1622. fi
  1623. rm -fr conftest*
  1624. ])# _LT_TRY_DLOPEN_SELF
  1625. # LT_SYS_DLOPEN_SELF
  1626. # ------------------
  1627. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1628. [m4_require([_LT_HEADER_DLFCN])dnl
  1629. if test "x$enable_dlopen" != xyes; then
  1630. enable_dlopen=unknown
  1631. enable_dlopen_self=unknown
  1632. enable_dlopen_self_static=unknown
  1633. else
  1634. lt_cv_dlopen=no
  1635. lt_cv_dlopen_libs=
  1636. case $host_os in
  1637. beos*)
  1638. lt_cv_dlopen="load_add_on"
  1639. lt_cv_dlopen_libs=
  1640. lt_cv_dlopen_self=yes
  1641. ;;
  1642. mingw* | pw32* | cegcc*)
  1643. lt_cv_dlopen="LoadLibrary"
  1644. lt_cv_dlopen_libs=
  1645. ;;
  1646. cygwin*)
  1647. lt_cv_dlopen="dlopen"
  1648. lt_cv_dlopen_libs=
  1649. ;;
  1650. darwin*)
  1651. # if libdl is installed we need to link against it
  1652. AC_CHECK_LIB([dl], [dlopen],
  1653. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  1654. lt_cv_dlopen="dyld"
  1655. lt_cv_dlopen_libs=
  1656. lt_cv_dlopen_self=yes
  1657. ])
  1658. ;;
  1659. *)
  1660. AC_CHECK_FUNC([shl_load],
  1661. [lt_cv_dlopen="shl_load"],
  1662. [AC_CHECK_LIB([dld], [shl_load],
  1663. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  1664. [AC_CHECK_FUNC([dlopen],
  1665. [lt_cv_dlopen="dlopen"],
  1666. [AC_CHECK_LIB([dl], [dlopen],
  1667. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  1668. [AC_CHECK_LIB([svld], [dlopen],
  1669. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  1670. [AC_CHECK_LIB([dld], [dld_link],
  1671. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  1672. ])
  1673. ])
  1674. ])
  1675. ])
  1676. ])
  1677. ;;
  1678. esac
  1679. if test "x$lt_cv_dlopen" != xno; then
  1680. enable_dlopen=yes
  1681. else
  1682. enable_dlopen=no
  1683. fi
  1684. case $lt_cv_dlopen in
  1685. dlopen)
  1686. save_CPPFLAGS="$CPPFLAGS"
  1687. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1688. save_LDFLAGS="$LDFLAGS"
  1689. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1690. save_LIBS="$LIBS"
  1691. LIBS="$lt_cv_dlopen_libs $LIBS"
  1692. AC_CACHE_CHECK([whether a program can dlopen itself],
  1693. lt_cv_dlopen_self, [dnl
  1694. _LT_TRY_DLOPEN_SELF(
  1695. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1696. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1697. ])
  1698. if test "x$lt_cv_dlopen_self" = xyes; then
  1699. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1700. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1701. lt_cv_dlopen_self_static, [dnl
  1702. _LT_TRY_DLOPEN_SELF(
  1703. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1704. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1705. ])
  1706. fi
  1707. CPPFLAGS="$save_CPPFLAGS"
  1708. LDFLAGS="$save_LDFLAGS"
  1709. LIBS="$save_LIBS"
  1710. ;;
  1711. esac
  1712. case $lt_cv_dlopen_self in
  1713. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1714. *) enable_dlopen_self=unknown ;;
  1715. esac
  1716. case $lt_cv_dlopen_self_static in
  1717. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1718. *) enable_dlopen_self_static=unknown ;;
  1719. esac
  1720. fi
  1721. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1722. [Whether dlopen is supported])
  1723. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1724. [Whether dlopen of programs is supported])
  1725. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1726. [Whether dlopen of statically linked programs is supported])
  1727. ])# LT_SYS_DLOPEN_SELF
  1728. # Old name:
  1729. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1730. dnl aclocal-1.4 backwards compatibility:
  1731. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1732. # _LT_COMPILER_C_O([TAGNAME])
  1733. # ---------------------------
  1734. # Check to see if options -c and -o are simultaneously supported by compiler.
  1735. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1736. m4_defun([_LT_COMPILER_C_O],
  1737. [m4_require([_LT_DECL_SED])dnl
  1738. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1739. m4_require([_LT_TAG_COMPILER])dnl
  1740. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1741. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1742. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1743. $RM -r conftest 2>/dev/null
  1744. mkdir conftest
  1745. cd conftest
  1746. mkdir out
  1747. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1748. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1749. # Insert the option either (1) after the last *FLAGS variable, or
  1750. # (2) before a word containing "conftest.", or (3) at the end.
  1751. # Note that $ac_compile itself does not contain backslashes and begins
  1752. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1753. lt_compile=`echo "$ac_compile" | $SED \
  1754. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1755. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1756. -e 's:$: $lt_compiler_flag:'`
  1757. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1758. (eval "$lt_compile" 2>out/conftest.err)
  1759. ac_status=$?
  1760. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1761. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1762. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1763. then
  1764. # The compiler can only warn and ignore the option if not recognized
  1765. # So say no if there are warnings
  1766. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1767. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1768. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1769. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1770. fi
  1771. fi
  1772. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1773. $RM conftest*
  1774. # SGI C++ compiler will create directory out/ii_files/ for
  1775. # template instantiation
  1776. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1777. $RM out/* && rmdir out
  1778. cd ..
  1779. $RM -r conftest
  1780. $RM conftest*
  1781. ])
  1782. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1783. [Does compiler simultaneously support -c and -o options?])
  1784. ])# _LT_COMPILER_C_O
  1785. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1786. # ----------------------------------
  1787. # Check to see if we can do hard links to lock some files if needed
  1788. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1789. [m4_require([_LT_ENABLE_LOCK])dnl
  1790. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1791. _LT_COMPILER_C_O([$1])
  1792. hard_links="nottested"
  1793. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  1794. # do not overwrite the value of need_locks provided by the user
  1795. AC_MSG_CHECKING([if we can lock with hard links])
  1796. hard_links=yes
  1797. $RM conftest*
  1798. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1799. touch conftest.a
  1800. ln conftest.a conftest.b 2>&5 || hard_links=no
  1801. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1802. AC_MSG_RESULT([$hard_links])
  1803. if test "$hard_links" = no; then
  1804. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  1805. need_locks=warn
  1806. fi
  1807. else
  1808. need_locks=no
  1809. fi
  1810. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1811. ])# _LT_COMPILER_FILE_LOCKS
  1812. # _LT_CHECK_OBJDIR
  1813. # ----------------
  1814. m4_defun([_LT_CHECK_OBJDIR],
  1815. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1816. [rm -f .libs 2>/dev/null
  1817. mkdir .libs 2>/dev/null
  1818. if test -d .libs; then
  1819. lt_cv_objdir=.libs
  1820. else
  1821. # MS-DOS does not allow filenames that begin with a dot.
  1822. lt_cv_objdir=_libs
  1823. fi
  1824. rmdir .libs 2>/dev/null])
  1825. objdir=$lt_cv_objdir
  1826. _LT_DECL([], [objdir], [0],
  1827. [The name of the directory that contains temporary libtool files])dnl
  1828. m4_pattern_allow([LT_OBJDIR])dnl
  1829. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  1830. [Define to the sub-directory in which libtool stores uninstalled libraries.])
  1831. ])# _LT_CHECK_OBJDIR
  1832. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1833. # --------------------------------------
  1834. # Check hardcoding attributes.
  1835. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1836. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1837. _LT_TAGVAR(hardcode_action, $1)=
  1838. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1839. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1840. test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  1841. # We can hardcode non-existent directories.
  1842. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  1843. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1844. # have to relink, otherwise we might link with an installed library
  1845. # when we should be linking with a yet-to-be-installed one
  1846. ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1847. test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  1848. # Linking always hardcodes the temporary library directory.
  1849. _LT_TAGVAR(hardcode_action, $1)=relink
  1850. else
  1851. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1852. _LT_TAGVAR(hardcode_action, $1)=immediate
  1853. fi
  1854. else
  1855. # We cannot hardcode anything, or else we can only hardcode existing
  1856. # directories.
  1857. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1858. fi
  1859. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1860. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  1861. test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  1862. # Fast installation is not supported
  1863. enable_fast_install=no
  1864. elif test "$shlibpath_overrides_runpath" = yes ||
  1865. test "$enable_shared" = no; then
  1866. # Fast installation is not necessary
  1867. enable_fast_install=needless
  1868. fi
  1869. _LT_TAGDECL([], [hardcode_action], [0],
  1870. [How to hardcode a shared library path into an executable])
  1871. ])# _LT_LINKER_HARDCODE_LIBPATH
  1872. # _LT_CMD_STRIPLIB
  1873. # ----------------
  1874. m4_defun([_LT_CMD_STRIPLIB],
  1875. [m4_require([_LT_DECL_EGREP])
  1876. striplib=
  1877. old_striplib=
  1878. AC_MSG_CHECKING([whether stripping libraries is possible])
  1879. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1880. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1881. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1882. AC_MSG_RESULT([yes])
  1883. else
  1884. # FIXME - insert some real tests, host_os isn't really good enough
  1885. case $host_os in
  1886. darwin*)
  1887. if test -n "$STRIP" ; then
  1888. striplib="$STRIP -x"
  1889. old_striplib="$STRIP -S"
  1890. AC_MSG_RESULT([yes])
  1891. else
  1892. AC_MSG_RESULT([no])
  1893. fi
  1894. ;;
  1895. *)
  1896. AC_MSG_RESULT([no])
  1897. ;;
  1898. esac
  1899. fi
  1900. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1901. _LT_DECL([], [striplib], [1])
  1902. ])# _LT_CMD_STRIPLIB
  1903. # _LT_SYS_DYNAMIC_LINKER([TAG])
  1904. # -----------------------------
  1905. # PORTME Fill in your ld.so characteristics
  1906. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  1907. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1908. m4_require([_LT_DECL_EGREP])dnl
  1909. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1910. m4_require([_LT_DECL_OBJDUMP])dnl
  1911. m4_require([_LT_DECL_SED])dnl
  1912. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  1913. AC_MSG_CHECKING([dynamic linker characteristics])
  1914. m4_if([$1],
  1915. [], [
  1916. if test "$GCC" = yes; then
  1917. case $host_os in
  1918. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  1919. *) lt_awk_arg="/^libraries:/" ;;
  1920. esac
  1921. case $host_os in
  1922. mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
  1923. *) lt_sed_strip_eq="s,=/,/,g" ;;
  1924. esac
  1925. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  1926. case $lt_search_path_spec in
  1927. *\;*)
  1928. # if the path contains ";" then we assume it to be the separator
  1929. # otherwise default to the standard path separator (i.e. ":") - it is
  1930. # assumed that no part of a normal pathname contains ";" but that should
  1931. # okay in the real world where ";" in dirpaths is itself problematic.
  1932. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  1933. ;;
  1934. *)
  1935. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  1936. ;;
  1937. esac
  1938. # Ok, now we have the path, separated by spaces, we can step through it
  1939. # and add multilib dir if necessary.
  1940. lt_tmp_lt_search_path_spec=
  1941. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  1942. for lt_sys_path in $lt_search_path_spec; do
  1943. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  1944. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  1945. else
  1946. test -d "$lt_sys_path" && \
  1947. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  1948. fi
  1949. done
  1950. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  1951. BEGIN {RS=" "; FS="/|\n";} {
  1952. lt_foo="";
  1953. lt_count=0;
  1954. for (lt_i = NF; lt_i > 0; lt_i--) {
  1955. if ($lt_i != "" && $lt_i != ".") {
  1956. if ($lt_i == "..") {
  1957. lt_count++;
  1958. } else {
  1959. if (lt_count == 0) {
  1960. lt_foo="/" $lt_i lt_foo;
  1961. } else {
  1962. lt_count--;
  1963. }
  1964. }
  1965. }
  1966. }
  1967. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  1968. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  1969. }'`
  1970. # AWK program above erroneously prepends '/' to C:/dos/paths
  1971. # for these hosts.
  1972. case $host_os in
  1973. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  1974. $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
  1975. esac
  1976. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  1977. else
  1978. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1979. fi])
  1980. library_names_spec=
  1981. libname_spec='lib$name'
  1982. soname_spec=
  1983. shrext_cmds=".so"
  1984. postinstall_cmds=
  1985. postuninstall_cmds=
  1986. finish_cmds=
  1987. finish_eval=
  1988. shlibpath_var=
  1989. shlibpath_overrides_runpath=unknown
  1990. version_type=none
  1991. dynamic_linker="$host_os ld.so"
  1992. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1993. need_lib_prefix=unknown
  1994. hardcode_into_libs=no
  1995. # when you set need_version to no, make sure it does not cause -set_version
  1996. # flags to be left without arguments
  1997. need_version=unknown
  1998. case $host_os in
  1999. aix3*)
  2000. version_type=linux # correct to gnu/linux during the next big refactor
  2001. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  2002. shlibpath_var=LIBPATH
  2003. # AIX 3 has no versioning support, so we append a major version to the name.
  2004. soname_spec='${libname}${release}${shared_ext}$major'
  2005. ;;
  2006. aix[[4-9]]*)
  2007. version_type=linux # correct to gnu/linux during the next big refactor
  2008. need_lib_prefix=no
  2009. need_version=no
  2010. hardcode_into_libs=yes
  2011. if test "$host_cpu" = ia64; then
  2012. # AIX 5 supports IA64
  2013. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  2014. shlibpath_var=LD_LIBRARY_PATH
  2015. else
  2016. # With GCC up to 2.95.x, collect2 would create an import file
  2017. # for dependence libraries. The import file would start with
  2018. # the line `#! .'. This would cause the generated library to
  2019. # depend on `.', always an invalid library. This was fixed in
  2020. # development snapshots of GCC prior to 3.0.
  2021. case $host_os in
  2022. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2023. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2024. echo ' yes '
  2025. echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  2026. :
  2027. else
  2028. can_build_shared=no
  2029. fi
  2030. ;;
  2031. esac
  2032. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  2033. # soname into executable. Probably we can add versioning support to
  2034. # collect2, so additional links can be useful in future.
  2035. if test "$aix_use_runtimelinking" = yes; then
  2036. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2037. # instead of lib<name>.a to let people know that these are not
  2038. # typical AIX shared libraries.
  2039. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2040. else
  2041. # We preserve .a as extension for shared libraries through AIX4.2
  2042. # and later when we are not doing run time linking.
  2043. library_names_spec='${libname}${release}.a $libname.a'
  2044. soname_spec='${libname}${release}${shared_ext}$major'
  2045. fi
  2046. shlibpath_var=LIBPATH
  2047. fi
  2048. ;;
  2049. amigaos*)
  2050. case $host_cpu in
  2051. powerpc)
  2052. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2053. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2054. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2055. ;;
  2056. m68k)
  2057. library_names_spec='$libname.ixlibrary $libname.a'
  2058. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2059. 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'
  2060. ;;
  2061. esac
  2062. ;;
  2063. beos*)
  2064. library_names_spec='${libname}${shared_ext}'
  2065. dynamic_linker="$host_os ld.so"
  2066. shlibpath_var=LIBRARY_PATH
  2067. ;;
  2068. bsdi[[45]]*)
  2069. version_type=linux # correct to gnu/linux during the next big refactor
  2070. need_version=no
  2071. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2072. soname_spec='${libname}${release}${shared_ext}$major'
  2073. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2074. shlibpath_var=LD_LIBRARY_PATH
  2075. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2076. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2077. # the default ld.so.conf also contains /usr/contrib/lib and
  2078. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2079. # libtool to hard-code these into programs
  2080. ;;
  2081. cygwin* | mingw* | pw32* | cegcc*)
  2082. version_type=windows
  2083. shrext_cmds=".dll"
  2084. need_version=no
  2085. need_lib_prefix=no
  2086. case $GCC,$cc_basename in
  2087. yes,*)
  2088. # gcc
  2089. library_names_spec='$libname.dll.a'
  2090. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2091. postinstall_cmds='base_file=`basename \${file}`~
  2092. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2093. dldir=$destdir/`dirname \$dlpath`~
  2094. test -d \$dldir || mkdir -p \$dldir~
  2095. $install_prog $dir/$dlname \$dldir/$dlname~
  2096. chmod a+x \$dldir/$dlname~
  2097. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2098. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2099. fi'
  2100. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2101. dlpath=$dir/\$dldll~
  2102. $RM \$dlpath'
  2103. shlibpath_overrides_runpath=yes
  2104. case $host_os in
  2105. cygwin*)
  2106. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2107. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2108. m4_if([$1], [],[
  2109. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2110. ;;
  2111. mingw* | cegcc*)
  2112. # MinGW DLLs use traditional 'lib' prefix
  2113. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2114. ;;
  2115. pw32*)
  2116. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2117. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2118. ;;
  2119. esac
  2120. dynamic_linker='Win32 ld.exe'
  2121. ;;
  2122. *,cl*)
  2123. # Native MSVC
  2124. libname_spec='$name'
  2125. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2126. library_names_spec='${libname}.dll.lib'
  2127. case $build_os in
  2128. mingw*)
  2129. sys_lib_search_path_spec=
  2130. lt_save_ifs=$IFS
  2131. IFS=';'
  2132. for lt_path in $LIB
  2133. do
  2134. IFS=$lt_save_ifs
  2135. # Let DOS variable expansion print the short 8.3 style file name.
  2136. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2137. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2138. done
  2139. IFS=$lt_save_ifs
  2140. # Convert to MSYS style.
  2141. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2142. ;;
  2143. cygwin*)
  2144. # Convert to unix form, then to dos form, then back to unix form
  2145. # but this time dos style (no spaces!) so that the unix form looks
  2146. # like /cygdrive/c/PROGRA~1:/cygdr...
  2147. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2148. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2149. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2150. ;;
  2151. *)
  2152. sys_lib_search_path_spec="$LIB"
  2153. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2154. # It is most probably a Windows format PATH.
  2155. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2156. else
  2157. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2158. fi
  2159. # FIXME: find the short name or the path components, as spaces are
  2160. # common. (e.g. "Program Files" -> "PROGRA~1")
  2161. ;;
  2162. esac
  2163. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2164. postinstall_cmds='base_file=`basename \${file}`~
  2165. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2166. dldir=$destdir/`dirname \$dlpath`~
  2167. test -d \$dldir || mkdir -p \$dldir~
  2168. $install_prog $dir/$dlname \$dldir/$dlname'
  2169. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2170. dlpath=$dir/\$dldll~
  2171. $RM \$dlpath'
  2172. shlibpath_overrides_runpath=yes
  2173. dynamic_linker='Win32 link.exe'
  2174. ;;
  2175. *)
  2176. # Assume MSVC wrapper
  2177. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  2178. dynamic_linker='Win32 ld.exe'
  2179. ;;
  2180. esac
  2181. # FIXME: first we should search . and the directory the executable is in
  2182. shlibpath_var=PATH
  2183. ;;
  2184. darwin* | rhapsody*)
  2185. dynamic_linker="$host_os dyld"
  2186. version_type=darwin
  2187. need_lib_prefix=no
  2188. need_version=no
  2189. library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  2190. soname_spec='${libname}${release}${major}$shared_ext'
  2191. shlibpath_overrides_runpath=yes
  2192. shlibpath_var=DYLD_LIBRARY_PATH
  2193. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2194. m4_if([$1], [],[
  2195. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2196. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2197. ;;
  2198. dgux*)
  2199. version_type=linux # correct to gnu/linux during the next big refactor
  2200. need_lib_prefix=no
  2201. need_version=no
  2202. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  2203. soname_spec='${libname}${release}${shared_ext}$major'
  2204. shlibpath_var=LD_LIBRARY_PATH
  2205. ;;
  2206. freebsd* | dragonfly*)
  2207. # DragonFly does not have aout. When/if they implement a new
  2208. # versioning mechanism, adjust this.
  2209. if test -x /usr/bin/objformat; then
  2210. objformat=`/usr/bin/objformat`
  2211. else
  2212. case $host_os in
  2213. freebsd[[23]].*) objformat=aout ;;
  2214. *) objformat=elf ;;
  2215. esac
  2216. fi
  2217. version_type=freebsd-$objformat
  2218. case $version_type in
  2219. freebsd-elf*)
  2220. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2221. need_version=no
  2222. need_lib_prefix=no
  2223. ;;
  2224. freebsd-*)
  2225. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  2226. need_version=yes
  2227. ;;
  2228. esac
  2229. shlibpath_var=LD_LIBRARY_PATH
  2230. case $host_os in
  2231. freebsd2.*)
  2232. shlibpath_overrides_runpath=yes
  2233. ;;
  2234. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2235. shlibpath_overrides_runpath=yes
  2236. hardcode_into_libs=yes
  2237. ;;
  2238. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2239. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2240. shlibpath_overrides_runpath=no
  2241. hardcode_into_libs=yes
  2242. ;;
  2243. *) # from 4.6 on, and DragonFly
  2244. shlibpath_overrides_runpath=yes
  2245. hardcode_into_libs=yes
  2246. ;;
  2247. esac
  2248. ;;
  2249. haiku*)
  2250. version_type=linux # correct to gnu/linux during the next big refactor
  2251. need_lib_prefix=no
  2252. need_version=no
  2253. dynamic_linker="$host_os runtime_loader"
  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=LIBRARY_PATH
  2257. shlibpath_overrides_runpath=yes
  2258. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2259. hardcode_into_libs=yes
  2260. ;;
  2261. hpux9* | hpux10* | hpux11*)
  2262. # Give a soname corresponding to the major version so that dld.sl refuses to
  2263. # link against other versions.
  2264. version_type=sunos
  2265. need_lib_prefix=no
  2266. need_version=no
  2267. case $host_cpu in
  2268. ia64*)
  2269. shrext_cmds='.so'
  2270. hardcode_into_libs=yes
  2271. dynamic_linker="$host_os dld.so"
  2272. shlibpath_var=LD_LIBRARY_PATH
  2273. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2274. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2275. soname_spec='${libname}${release}${shared_ext}$major'
  2276. if test "X$HPUX_IA64_MODE" = X32; then
  2277. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2278. else
  2279. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2280. fi
  2281. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2282. ;;
  2283. hppa*64*)
  2284. shrext_cmds='.sl'
  2285. hardcode_into_libs=yes
  2286. dynamic_linker="$host_os dld.sl"
  2287. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2288. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2289. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2290. soname_spec='${libname}${release}${shared_ext}$major'
  2291. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2292. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2293. ;;
  2294. *)
  2295. shrext_cmds='.sl'
  2296. dynamic_linker="$host_os dld.sl"
  2297. shlibpath_var=SHLIB_PATH
  2298. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2299. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2300. soname_spec='${libname}${release}${shared_ext}$major'
  2301. ;;
  2302. esac
  2303. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2304. postinstall_cmds='chmod 555 $lib'
  2305. # or fails outright, so override atomically:
  2306. install_override_mode=555
  2307. ;;
  2308. interix[[3-9]]*)
  2309. version_type=linux # correct to gnu/linux during the next big refactor
  2310. need_lib_prefix=no
  2311. need_version=no
  2312. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2313. soname_spec='${libname}${release}${shared_ext}$major'
  2314. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2315. shlibpath_var=LD_LIBRARY_PATH
  2316. shlibpath_overrides_runpath=no
  2317. hardcode_into_libs=yes
  2318. ;;
  2319. irix5* | irix6* | nonstopux*)
  2320. case $host_os in
  2321. nonstopux*) version_type=nonstopux ;;
  2322. *)
  2323. if test "$lt_cv_prog_gnu_ld" = yes; then
  2324. version_type=linux # correct to gnu/linux during the next big refactor
  2325. else
  2326. version_type=irix
  2327. fi ;;
  2328. esac
  2329. need_lib_prefix=no
  2330. need_version=no
  2331. soname_spec='${libname}${release}${shared_ext}$major'
  2332. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  2333. case $host_os in
  2334. irix5* | nonstopux*)
  2335. libsuff= shlibsuff=
  2336. ;;
  2337. *)
  2338. case $LD in # libtool.m4 will add one of these switches to LD
  2339. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2340. libsuff= shlibsuff= libmagic=32-bit;;
  2341. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2342. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2343. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2344. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2345. *) libsuff= shlibsuff= libmagic=never-match;;
  2346. esac
  2347. ;;
  2348. esac
  2349. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2350. shlibpath_overrides_runpath=no
  2351. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2352. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2353. hardcode_into_libs=yes
  2354. ;;
  2355. # No shared lib support for Linux oldld, aout, or coff.
  2356. linux*oldld* | linux*aout* | linux*coff*)
  2357. dynamic_linker=no
  2358. ;;
  2359. # This must be glibc/ELF.
  2360. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2361. version_type=linux # correct to gnu/linux during the next big refactor
  2362. need_lib_prefix=no
  2363. need_version=no
  2364. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2365. soname_spec='${libname}${release}${shared_ext}$major'
  2366. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2367. shlibpath_var=LD_LIBRARY_PATH
  2368. shlibpath_overrides_runpath=no
  2369. # Some binutils ld are patched to set DT_RUNPATH
  2370. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2371. [lt_cv_shlibpath_overrides_runpath=no
  2372. save_LDFLAGS=$LDFLAGS
  2373. save_libdir=$libdir
  2374. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2375. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2376. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2377. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2378. [lt_cv_shlibpath_overrides_runpath=yes])])
  2379. LDFLAGS=$save_LDFLAGS
  2380. libdir=$save_libdir
  2381. ])
  2382. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2383. # This implies no fast_install, which is unacceptable.
  2384. # Some rework will be needed to allow for fast_install
  2385. # before this can be enabled.
  2386. hardcode_into_libs=yes
  2387. # Append ld.so.conf contents to the search path
  2388. if test -f /etc/ld.so.conf; then
  2389. 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' ' '`
  2390. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2391. fi
  2392. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2393. # powerpc, because MkLinux only supported shared libraries with the
  2394. # GNU dynamic linker. Since this was broken with cross compilers,
  2395. # most powerpc-linux boxes support dynamic linking these days and
  2396. # people can always --disable-shared, the test was removed, and we
  2397. # assume the GNU/Linux dynamic linker is in use.
  2398. dynamic_linker='GNU/Linux ld.so'
  2399. ;;
  2400. netbsdelf*-gnu)
  2401. version_type=linux
  2402. need_lib_prefix=no
  2403. need_version=no
  2404. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2405. soname_spec='${libname}${release}${shared_ext}$major'
  2406. shlibpath_var=LD_LIBRARY_PATH
  2407. shlibpath_overrides_runpath=no
  2408. hardcode_into_libs=yes
  2409. dynamic_linker='NetBSD ld.elf_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. haiku*)
  2926. lt_cv_deplibs_check_method=pass_all
  2927. ;;
  2928. hpux10.20* | hpux11*)
  2929. lt_cv_file_magic_cmd=/usr/bin/file
  2930. case $host_cpu in
  2931. ia64*)
  2932. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2933. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2934. ;;
  2935. hppa*64*)
  2936. [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]']
  2937. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2938. ;;
  2939. *)
  2940. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  2941. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2942. ;;
  2943. esac
  2944. ;;
  2945. interix[[3-9]]*)
  2946. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  2947. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  2948. ;;
  2949. irix5* | irix6* | nonstopux*)
  2950. case $LD in
  2951. *-32|*"-32 ") libmagic=32-bit;;
  2952. *-n32|*"-n32 ") libmagic=N32;;
  2953. *-64|*"-64 ") libmagic=64-bit;;
  2954. *) libmagic=never-match;;
  2955. esac
  2956. lt_cv_deplibs_check_method=pass_all
  2957. ;;
  2958. # This must be glibc/ELF.
  2959. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2960. lt_cv_deplibs_check_method=pass_all
  2961. ;;
  2962. netbsd* | netbsdelf*-gnu)
  2963. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2964. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2965. else
  2966. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2967. fi
  2968. ;;
  2969. newos6*)
  2970. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2971. lt_cv_file_magic_cmd=/usr/bin/file
  2972. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2973. ;;
  2974. *nto* | *qnx*)
  2975. lt_cv_deplibs_check_method=pass_all
  2976. ;;
  2977. openbsd*)
  2978. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2979. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2980. else
  2981. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2982. fi
  2983. ;;
  2984. osf3* | osf4* | osf5*)
  2985. lt_cv_deplibs_check_method=pass_all
  2986. ;;
  2987. rdos*)
  2988. lt_cv_deplibs_check_method=pass_all
  2989. ;;
  2990. solaris*)
  2991. lt_cv_deplibs_check_method=pass_all
  2992. ;;
  2993. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2994. lt_cv_deplibs_check_method=pass_all
  2995. ;;
  2996. sysv4 | sysv4.3*)
  2997. case $host_vendor in
  2998. motorola)
  2999. 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]]'
  3000. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3001. ;;
  3002. ncr)
  3003. lt_cv_deplibs_check_method=pass_all
  3004. ;;
  3005. sequent)
  3006. lt_cv_file_magic_cmd='/bin/file'
  3007. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3008. ;;
  3009. sni)
  3010. lt_cv_file_magic_cmd='/bin/file'
  3011. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3012. lt_cv_file_magic_test_file=/lib/libc.so
  3013. ;;
  3014. siemens)
  3015. lt_cv_deplibs_check_method=pass_all
  3016. ;;
  3017. pc)
  3018. lt_cv_deplibs_check_method=pass_all
  3019. ;;
  3020. esac
  3021. ;;
  3022. tpf*)
  3023. lt_cv_deplibs_check_method=pass_all
  3024. ;;
  3025. esac
  3026. ])
  3027. file_magic_glob=
  3028. want_nocaseglob=no
  3029. if test "$build" = "$host"; then
  3030. case $host_os in
  3031. mingw* | pw32*)
  3032. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3033. want_nocaseglob=yes
  3034. else
  3035. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3036. fi
  3037. ;;
  3038. esac
  3039. fi
  3040. file_magic_cmd=$lt_cv_file_magic_cmd
  3041. deplibs_check_method=$lt_cv_deplibs_check_method
  3042. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3043. _LT_DECL([], [deplibs_check_method], [1],
  3044. [Method to check whether dependent libraries are shared objects])
  3045. _LT_DECL([], [file_magic_cmd], [1],
  3046. [Command to use when deplibs_check_method = "file_magic"])
  3047. _LT_DECL([], [file_magic_glob], [1],
  3048. [How to find potential files when deplibs_check_method = "file_magic"])
  3049. _LT_DECL([], [want_nocaseglob], [1],
  3050. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3051. ])# _LT_CHECK_MAGIC_METHOD
  3052. # LT_PATH_NM
  3053. # ----------
  3054. # find the pathname to a BSD- or MS-compatible name lister
  3055. AC_DEFUN([LT_PATH_NM],
  3056. [AC_REQUIRE([AC_PROG_CC])dnl
  3057. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3058. [if test -n "$NM"; then
  3059. # Let the user override the test.
  3060. lt_cv_path_NM="$NM"
  3061. else
  3062. lt_nm_to_check="${ac_tool_prefix}nm"
  3063. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3064. lt_nm_to_check="$lt_nm_to_check nm"
  3065. fi
  3066. for lt_tmp_nm in $lt_nm_to_check; do
  3067. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3068. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3069. IFS="$lt_save_ifs"
  3070. test -z "$ac_dir" && ac_dir=.
  3071. tmp_nm="$ac_dir/$lt_tmp_nm"
  3072. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  3073. # Check to see if the nm accepts a BSD-compat flag.
  3074. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3075. # nm: unknown option "B" ignored
  3076. # Tru64's nm complains that /dev/null is an invalid object file
  3077. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  3078. */dev/null* | *'Invalid file or object type'*)
  3079. lt_cv_path_NM="$tmp_nm -B"
  3080. break
  3081. ;;
  3082. *)
  3083. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3084. */dev/null*)
  3085. lt_cv_path_NM="$tmp_nm -p"
  3086. break
  3087. ;;
  3088. *)
  3089. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3090. continue # so that we can try to find one that supports BSD flags
  3091. ;;
  3092. esac
  3093. ;;
  3094. esac
  3095. fi
  3096. done
  3097. IFS="$lt_save_ifs"
  3098. done
  3099. : ${lt_cv_path_NM=no}
  3100. fi])
  3101. if test "$lt_cv_path_NM" != "no"; then
  3102. NM="$lt_cv_path_NM"
  3103. else
  3104. # Didn't find any BSD compatible name lister, look for dumpbin.
  3105. if test -n "$DUMPBIN"; then :
  3106. # Let the user override the test.
  3107. else
  3108. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3109. case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
  3110. *COFF*)
  3111. DUMPBIN="$DUMPBIN -symbols"
  3112. ;;
  3113. *)
  3114. DUMPBIN=:
  3115. ;;
  3116. esac
  3117. fi
  3118. AC_SUBST([DUMPBIN])
  3119. if test "$DUMPBIN" != ":"; then
  3120. NM="$DUMPBIN"
  3121. fi
  3122. fi
  3123. test -z "$NM" && NM=nm
  3124. AC_SUBST([NM])
  3125. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3126. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3127. [lt_cv_nm_interface="BSD nm"
  3128. echo "int some_variable = 0;" > conftest.$ac_ext
  3129. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3130. (eval "$ac_compile" 2>conftest.err)
  3131. cat conftest.err >&AS_MESSAGE_LOG_FD
  3132. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3133. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3134. cat conftest.err >&AS_MESSAGE_LOG_FD
  3135. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3136. cat conftest.out >&AS_MESSAGE_LOG_FD
  3137. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3138. lt_cv_nm_interface="MS dumpbin"
  3139. fi
  3140. rm -f conftest*])
  3141. ])# LT_PATH_NM
  3142. # Old names:
  3143. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3144. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3145. dnl aclocal-1.4 backwards compatibility:
  3146. dnl AC_DEFUN([AM_PROG_NM], [])
  3147. dnl AC_DEFUN([AC_PROG_NM], [])
  3148. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3149. # --------------------------------
  3150. # how to determine the name of the shared library
  3151. # associated with a specific link library.
  3152. # -- PORTME fill in with the dynamic library characteristics
  3153. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3154. [m4_require([_LT_DECL_EGREP])
  3155. m4_require([_LT_DECL_OBJDUMP])
  3156. m4_require([_LT_DECL_DLLTOOL])
  3157. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3158. lt_cv_sharedlib_from_linklib_cmd,
  3159. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3160. case $host_os in
  3161. cygwin* | mingw* | pw32* | cegcc*)
  3162. # two different shell functions defined in ltmain.sh
  3163. # decide which to use based on capabilities of $DLLTOOL
  3164. case `$DLLTOOL --help 2>&1` in
  3165. *--identify-strict*)
  3166. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3167. ;;
  3168. *)
  3169. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3170. ;;
  3171. esac
  3172. ;;
  3173. *)
  3174. # fallback: assume linklib IS sharedlib
  3175. lt_cv_sharedlib_from_linklib_cmd="$ECHO"
  3176. ;;
  3177. esac
  3178. ])
  3179. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3180. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3181. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3182. [Command to associate shared and link libraries])
  3183. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3184. # _LT_PATH_MANIFEST_TOOL
  3185. # ----------------------
  3186. # locate the manifest tool
  3187. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3188. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3189. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3190. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3191. [lt_cv_path_mainfest_tool=no
  3192. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3193. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3194. cat conftest.err >&AS_MESSAGE_LOG_FD
  3195. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3196. lt_cv_path_mainfest_tool=yes
  3197. fi
  3198. rm -f conftest*])
  3199. if test "x$lt_cv_path_mainfest_tool" != xyes; then
  3200. MANIFEST_TOOL=:
  3201. fi
  3202. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3203. ])# _LT_PATH_MANIFEST_TOOL
  3204. # LT_LIB_M
  3205. # --------
  3206. # check for math library
  3207. AC_DEFUN([LT_LIB_M],
  3208. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3209. LIBM=
  3210. case $host in
  3211. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3212. # These system don't have libm, or don't need it
  3213. ;;
  3214. *-ncr-sysv4.3*)
  3215. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3216. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3217. ;;
  3218. *)
  3219. AC_CHECK_LIB(m, cos, LIBM="-lm")
  3220. ;;
  3221. esac
  3222. AC_SUBST([LIBM])
  3223. ])# LT_LIB_M
  3224. # Old name:
  3225. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3226. dnl aclocal-1.4 backwards compatibility:
  3227. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3228. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3229. # -------------------------------
  3230. m4_defun([_LT_COMPILER_NO_RTTI],
  3231. [m4_require([_LT_TAG_COMPILER])dnl
  3232. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3233. if test "$GCC" = yes; then
  3234. case $cc_basename in
  3235. nvcc*)
  3236. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3237. *)
  3238. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3239. esac
  3240. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3241. lt_cv_prog_compiler_rtti_exceptions,
  3242. [-fno-rtti -fno-exceptions], [],
  3243. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3244. fi
  3245. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3246. [Compiler flag to turn off builtin functions])
  3247. ])# _LT_COMPILER_NO_RTTI
  3248. # _LT_CMD_GLOBAL_SYMBOLS
  3249. # ----------------------
  3250. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3251. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3252. AC_REQUIRE([AC_PROG_CC])dnl
  3253. AC_REQUIRE([AC_PROG_AWK])dnl
  3254. AC_REQUIRE([LT_PATH_NM])dnl
  3255. AC_REQUIRE([LT_PATH_LD])dnl
  3256. m4_require([_LT_DECL_SED])dnl
  3257. m4_require([_LT_DECL_EGREP])dnl
  3258. m4_require([_LT_TAG_COMPILER])dnl
  3259. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3260. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3261. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3262. [
  3263. # These are sane defaults that work on at least a few old systems.
  3264. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3265. # Character class describing NM global symbol codes.
  3266. symcode='[[BCDEGRST]]'
  3267. # Regexp to match symbols that can be accessed directly from C.
  3268. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3269. # Define system-specific variables.
  3270. case $host_os in
  3271. aix*)
  3272. symcode='[[BCDT]]'
  3273. ;;
  3274. cygwin* | mingw* | pw32* | cegcc*)
  3275. symcode='[[ABCDGISTW]]'
  3276. ;;
  3277. hpux*)
  3278. if test "$host_cpu" = ia64; then
  3279. symcode='[[ABCDEGRST]]'
  3280. fi
  3281. ;;
  3282. irix* | nonstopux*)
  3283. symcode='[[BCDEGRST]]'
  3284. ;;
  3285. osf*)
  3286. symcode='[[BCDEGQRST]]'
  3287. ;;
  3288. solaris*)
  3289. symcode='[[BDRT]]'
  3290. ;;
  3291. sco3.2v5*)
  3292. symcode='[[DT]]'
  3293. ;;
  3294. sysv4.2uw2*)
  3295. symcode='[[DT]]'
  3296. ;;
  3297. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3298. symcode='[[ABDT]]'
  3299. ;;
  3300. sysv4)
  3301. symcode='[[DFNSTU]]'
  3302. ;;
  3303. esac
  3304. # If we're using GNU nm, then use its standard symbol codes.
  3305. case `$NM -V 2>&1` in
  3306. *GNU* | *'with BFD'*)
  3307. symcode='[[ABCDGIRSTW]]' ;;
  3308. esac
  3309. # Transform an extracted symbol line into a proper C declaration.
  3310. # Some systems (esp. on ia64) link data and code symbols differently,
  3311. # so use this general approach.
  3312. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3313. # Transform an extracted symbol line into symbol name and symbol address
  3314. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  3315. 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'"
  3316. # Handle CRLF in mingw tool chain
  3317. opt_cr=
  3318. case $build_os in
  3319. mingw*)
  3320. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3321. ;;
  3322. esac
  3323. # Try without a prefix underscore, then with it.
  3324. for ac_symprfx in "" "_"; do
  3325. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3326. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3327. # Write the raw and C identifiers.
  3328. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3329. # Fake it for dumpbin and say T for any non-static function
  3330. # and D for any global variable.
  3331. # Also find C++ and __fastcall symbols from MSVC++,
  3332. # which start with @ or ?.
  3333. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3334. " {last_section=section; section=\$ 3};"\
  3335. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3336. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3337. " \$ 0!~/External *\|/{next};"\
  3338. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3339. " {if(hide[section]) next};"\
  3340. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  3341. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  3342. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  3343. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  3344. " ' prfx=^$ac_symprfx]"
  3345. else
  3346. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3347. fi
  3348. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3349. # Check to see that the pipe works correctly.
  3350. pipe_works=no
  3351. rm -f conftest*
  3352. cat > conftest.$ac_ext <<_LT_EOF
  3353. #ifdef __cplusplus
  3354. extern "C" {
  3355. #endif
  3356. char nm_test_var;
  3357. void nm_test_func(void);
  3358. void nm_test_func(void){}
  3359. #ifdef __cplusplus
  3360. }
  3361. #endif
  3362. int main(){nm_test_var='a';nm_test_func();return(0);}
  3363. _LT_EOF
  3364. if AC_TRY_EVAL(ac_compile); then
  3365. # Now try to grab the symbols.
  3366. nlist=conftest.nm
  3367. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  3368. # Try sorting and uniquifying the output.
  3369. if sort "$nlist" | uniq > "$nlist"T; then
  3370. mv -f "$nlist"T "$nlist"
  3371. else
  3372. rm -f "$nlist"T
  3373. fi
  3374. # Make sure that we snagged all the symbols we need.
  3375. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3376. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3377. cat <<_LT_EOF > conftest.$ac_ext
  3378. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3379. #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
  3380. /* DATA imports from DLLs on WIN32 con't be const, because runtime
  3381. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3382. # define LT@&t@_DLSYM_CONST
  3383. #elif defined(__osf__)
  3384. /* This system does not cope well with relocations in const data. */
  3385. # define LT@&t@_DLSYM_CONST
  3386. #else
  3387. # define LT@&t@_DLSYM_CONST const
  3388. #endif
  3389. #ifdef __cplusplus
  3390. extern "C" {
  3391. #endif
  3392. _LT_EOF
  3393. # Now generate the symbol file.
  3394. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3395. cat <<_LT_EOF >> conftest.$ac_ext
  3396. /* The mapping between symbol names and symbols. */
  3397. LT@&t@_DLSYM_CONST struct {
  3398. const char *name;
  3399. void *address;
  3400. }
  3401. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3402. {
  3403. { "@PROGRAM@", (void *) 0 },
  3404. _LT_EOF
  3405. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3406. cat <<\_LT_EOF >> conftest.$ac_ext
  3407. {0, (void *) 0}
  3408. };
  3409. /* This works around a problem in FreeBSD linker */
  3410. #ifdef FREEBSD_WORKAROUND
  3411. static const void *lt_preloaded_setup() {
  3412. return lt__PROGRAM__LTX_preloaded_symbols;
  3413. }
  3414. #endif
  3415. #ifdef __cplusplus
  3416. }
  3417. #endif
  3418. _LT_EOF
  3419. # Now try linking the two files.
  3420. mv conftest.$ac_objext conftstm.$ac_objext
  3421. lt_globsym_save_LIBS=$LIBS
  3422. lt_globsym_save_CFLAGS=$CFLAGS
  3423. LIBS="conftstm.$ac_objext"
  3424. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3425. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3426. pipe_works=yes
  3427. fi
  3428. LIBS=$lt_globsym_save_LIBS
  3429. CFLAGS=$lt_globsym_save_CFLAGS
  3430. else
  3431. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3432. fi
  3433. else
  3434. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3435. fi
  3436. else
  3437. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3438. fi
  3439. else
  3440. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3441. cat conftest.$ac_ext >&5
  3442. fi
  3443. rm -rf conftest* conftst*
  3444. # Do not use the global_symbol_pipe unless it works.
  3445. if test "$pipe_works" = yes; then
  3446. break
  3447. else
  3448. lt_cv_sys_global_symbol_pipe=
  3449. fi
  3450. done
  3451. ])
  3452. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3453. lt_cv_sys_global_symbol_to_cdecl=
  3454. fi
  3455. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3456. AC_MSG_RESULT(failed)
  3457. else
  3458. AC_MSG_RESULT(ok)
  3459. fi
  3460. # Response file support.
  3461. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3462. nm_file_list_spec='@'
  3463. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3464. nm_file_list_spec='@'
  3465. fi
  3466. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3467. [Take the output of nm and produce a listing of raw symbols and C names])
  3468. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3469. [Transform the output of nm in a proper C declaration])
  3470. _LT_DECL([global_symbol_to_c_name_address],
  3471. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3472. [Transform the output of nm in a C name address pair])
  3473. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3474. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3475. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3476. _LT_DECL([], [nm_file_list_spec], [1],
  3477. [Specify filename containing input files for $NM])
  3478. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3479. # _LT_COMPILER_PIC([TAGNAME])
  3480. # ---------------------------
  3481. m4_defun([_LT_COMPILER_PIC],
  3482. [m4_require([_LT_TAG_COMPILER])dnl
  3483. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3484. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3485. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3486. m4_if([$1], [CXX], [
  3487. # C++ specific cases for pic, static, wl, etc.
  3488. if test "$GXX" = yes; then
  3489. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3490. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3491. case $host_os in
  3492. aix*)
  3493. # All AIX code is PIC.
  3494. if test "$host_cpu" = ia64; then
  3495. # AIX 5 now supports IA64 processor
  3496. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3497. fi
  3498. ;;
  3499. amigaos*)
  3500. case $host_cpu in
  3501. powerpc)
  3502. # see comment about AmigaOS4 .so support
  3503. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3504. ;;
  3505. m68k)
  3506. # FIXME: we need at least 68020 code to build shared libraries, but
  3507. # adding the `-m68020' flag to GCC prevents building anything better,
  3508. # like `-m68040'.
  3509. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3510. ;;
  3511. esac
  3512. ;;
  3513. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3514. # PIC is the default for these OSes.
  3515. ;;
  3516. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3517. # This hack is so that the source file can tell whether it is being
  3518. # built for inclusion in a dll (and should export symbols for example).
  3519. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3520. # (--disable-auto-import) libraries
  3521. m4_if([$1], [GCJ], [],
  3522. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3523. ;;
  3524. darwin* | rhapsody*)
  3525. # PIC is the default on this platform
  3526. # Common symbols not allowed in MH_DYLIB files
  3527. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3528. ;;
  3529. *djgpp*)
  3530. # DJGPP does not support shared libraries at all
  3531. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3532. ;;
  3533. haiku*)
  3534. # PIC is the default for Haiku.
  3535. # The "-static" flag exists, but is broken.
  3536. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3537. ;;
  3538. interix[[3-9]]*)
  3539. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3540. # Instead, we relocate shared libraries at runtime.
  3541. ;;
  3542. sysv4*MP*)
  3543. if test -d /usr/nec; then
  3544. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3545. fi
  3546. ;;
  3547. hpux*)
  3548. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3549. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3550. # sets the default TLS model and affects inlining.
  3551. case $host_cpu in
  3552. hppa*64*)
  3553. ;;
  3554. *)
  3555. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3556. ;;
  3557. esac
  3558. ;;
  3559. *qnx* | *nto*)
  3560. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3561. # it will coredump.
  3562. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3563. ;;
  3564. *)
  3565. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3566. ;;
  3567. esac
  3568. else
  3569. case $host_os in
  3570. aix[[4-9]]*)
  3571. # All AIX code is PIC.
  3572. if test "$host_cpu" = ia64; then
  3573. # AIX 5 now supports IA64 processor
  3574. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3575. else
  3576. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3577. fi
  3578. ;;
  3579. chorus*)
  3580. case $cc_basename in
  3581. cxch68*)
  3582. # Green Hills C++ Compiler
  3583. # _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"
  3584. ;;
  3585. esac
  3586. ;;
  3587. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3588. # This hack is so that the source file can tell whether it is being
  3589. # built for inclusion in a dll (and should export symbols for example).
  3590. m4_if([$1], [GCJ], [],
  3591. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3592. ;;
  3593. dgux*)
  3594. case $cc_basename in
  3595. ec++*)
  3596. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3597. ;;
  3598. ghcx*)
  3599. # Green Hills C++ Compiler
  3600. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3601. ;;
  3602. *)
  3603. ;;
  3604. esac
  3605. ;;
  3606. freebsd* | dragonfly*)
  3607. # FreeBSD uses GNU C++
  3608. ;;
  3609. hpux9* | hpux10* | hpux11*)
  3610. case $cc_basename in
  3611. CC*)
  3612. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3613. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3614. if test "$host_cpu" != ia64; then
  3615. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3616. fi
  3617. ;;
  3618. aCC*)
  3619. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3620. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3621. case $host_cpu in
  3622. hppa*64*|ia64*)
  3623. # +Z the default
  3624. ;;
  3625. *)
  3626. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3627. ;;
  3628. esac
  3629. ;;
  3630. *)
  3631. ;;
  3632. esac
  3633. ;;
  3634. interix*)
  3635. # This is c89, which is MS Visual C++ (no shared libs)
  3636. # Anyone wants to do a port?
  3637. ;;
  3638. irix5* | irix6* | nonstopux*)
  3639. case $cc_basename in
  3640. CC*)
  3641. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3642. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3643. # CC pic flag -KPIC is the default.
  3644. ;;
  3645. *)
  3646. ;;
  3647. esac
  3648. ;;
  3649. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3650. case $cc_basename in
  3651. KCC*)
  3652. # KAI C++ Compiler
  3653. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3654. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3655. ;;
  3656. ecpc* )
  3657. # old Intel C++ for x86_64 which still supported -KPIC.
  3658. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3659. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3660. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3661. ;;
  3662. icpc* )
  3663. # Intel C++, used to be incompatible with GCC.
  3664. # ICC 10 doesn't accept -KPIC any more.
  3665. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3666. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3667. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3668. ;;
  3669. pgCC* | pgcpp*)
  3670. # Portland Group C++ compiler
  3671. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3672. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3673. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3674. ;;
  3675. cxx*)
  3676. # Compaq C++
  3677. # Make sure the PIC flag is empty. It appears that all Alpha
  3678. # Linux and Compaq Tru64 Unix objects are PIC.
  3679. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3680. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3681. ;;
  3682. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3683. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3684. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3685. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3686. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3687. ;;
  3688. *)
  3689. case `$CC -V 2>&1 | sed 5q` in
  3690. *Sun\ C*)
  3691. # Sun C++ 5.9
  3692. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3693. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3694. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3695. ;;
  3696. esac
  3697. ;;
  3698. esac
  3699. ;;
  3700. lynxos*)
  3701. ;;
  3702. m88k*)
  3703. ;;
  3704. mvs*)
  3705. case $cc_basename in
  3706. cxx*)
  3707. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  3708. ;;
  3709. *)
  3710. ;;
  3711. esac
  3712. ;;
  3713. netbsd* | netbsdelf*-gnu)
  3714. ;;
  3715. *qnx* | *nto*)
  3716. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3717. # it will coredump.
  3718. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3719. ;;
  3720. osf3* | osf4* | osf5*)
  3721. case $cc_basename in
  3722. KCC*)
  3723. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3724. ;;
  3725. RCC*)
  3726. # Rational C++ 2.4.1
  3727. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3728. ;;
  3729. cxx*)
  3730. # Digital/Compaq C++
  3731. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3732. # Make sure the PIC flag is empty. It appears that all Alpha
  3733. # Linux and Compaq Tru64 Unix objects are PIC.
  3734. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3735. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3736. ;;
  3737. *)
  3738. ;;
  3739. esac
  3740. ;;
  3741. psos*)
  3742. ;;
  3743. solaris*)
  3744. case $cc_basename in
  3745. CC* | sunCC*)
  3746. # Sun C++ 4.2, 5.x and Centerline C++
  3747. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3748. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3749. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3750. ;;
  3751. gcx*)
  3752. # Green Hills C++ Compiler
  3753. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3754. ;;
  3755. *)
  3756. ;;
  3757. esac
  3758. ;;
  3759. sunos4*)
  3760. case $cc_basename in
  3761. CC*)
  3762. # Sun C++ 4.x
  3763. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3764. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3765. ;;
  3766. lcc*)
  3767. # Lucid
  3768. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3769. ;;
  3770. *)
  3771. ;;
  3772. esac
  3773. ;;
  3774. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  3775. case $cc_basename in
  3776. CC*)
  3777. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3778. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3779. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3780. ;;
  3781. esac
  3782. ;;
  3783. tandem*)
  3784. case $cc_basename in
  3785. NCC*)
  3786. # NonStop-UX NCC 3.20
  3787. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3788. ;;
  3789. *)
  3790. ;;
  3791. esac
  3792. ;;
  3793. vxworks*)
  3794. ;;
  3795. *)
  3796. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3797. ;;
  3798. esac
  3799. fi
  3800. ],
  3801. [
  3802. if test "$GCC" = yes; then
  3803. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3804. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3805. case $host_os in
  3806. aix*)
  3807. # All AIX code is PIC.
  3808. if test "$host_cpu" = ia64; then
  3809. # AIX 5 now supports IA64 processor
  3810. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3811. fi
  3812. ;;
  3813. amigaos*)
  3814. case $host_cpu in
  3815. powerpc)
  3816. # see comment about AmigaOS4 .so support
  3817. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3818. ;;
  3819. m68k)
  3820. # FIXME: we need at least 68020 code to build shared libraries, but
  3821. # adding the `-m68020' flag to GCC prevents building anything better,
  3822. # like `-m68040'.
  3823. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3824. ;;
  3825. esac
  3826. ;;
  3827. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3828. # PIC is the default for these OSes.
  3829. ;;
  3830. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3831. # This hack is so that the source file can tell whether it is being
  3832. # built for inclusion in a dll (and should export symbols for example).
  3833. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3834. # (--disable-auto-import) libraries
  3835. m4_if([$1], [GCJ], [],
  3836. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3837. ;;
  3838. darwin* | rhapsody*)
  3839. # PIC is the default on this platform
  3840. # Common symbols not allowed in MH_DYLIB files
  3841. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3842. ;;
  3843. haiku*)
  3844. # PIC is the default for Haiku.
  3845. # The "-static" flag exists, but is broken.
  3846. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3847. ;;
  3848. hpux*)
  3849. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3850. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3851. # sets the default TLS model and affects inlining.
  3852. case $host_cpu in
  3853. hppa*64*)
  3854. # +Z the default
  3855. ;;
  3856. *)
  3857. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3858. ;;
  3859. esac
  3860. ;;
  3861. interix[[3-9]]*)
  3862. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3863. # Instead, we relocate shared libraries at runtime.
  3864. ;;
  3865. msdosdjgpp*)
  3866. # Just because we use GCC doesn't mean we suddenly get shared libraries
  3867. # on systems that don't support them.
  3868. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3869. enable_shared=no
  3870. ;;
  3871. *nto* | *qnx*)
  3872. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3873. # it will coredump.
  3874. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3875. ;;
  3876. sysv4*MP*)
  3877. if test -d /usr/nec; then
  3878. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3879. fi
  3880. ;;
  3881. *)
  3882. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3883. ;;
  3884. esac
  3885. case $cc_basename in
  3886. nvcc*) # Cuda Compiler Driver 2.2
  3887. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  3888. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  3889. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  3890. fi
  3891. ;;
  3892. esac
  3893. else
  3894. # PORTME Check for flag to pass linker flags through the system compiler.
  3895. case $host_os in
  3896. aix*)
  3897. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3898. if test "$host_cpu" = ia64; then
  3899. # AIX 5 now supports IA64 processor
  3900. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3901. else
  3902. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3903. fi
  3904. ;;
  3905. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3906. # This hack is so that the source file can tell whether it is being
  3907. # built for inclusion in a dll (and should export symbols for example).
  3908. m4_if([$1], [GCJ], [],
  3909. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3910. ;;
  3911. hpux9* | hpux10* | hpux11*)
  3912. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3913. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  3914. # not for PA HP-UX.
  3915. case $host_cpu in
  3916. hppa*64*|ia64*)
  3917. # +Z the default
  3918. ;;
  3919. *)
  3920. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3921. ;;
  3922. esac
  3923. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  3924. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3925. ;;
  3926. irix5* | irix6* | nonstopux*)
  3927. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3928. # PIC (with -KPIC) is the default.
  3929. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3930. ;;
  3931. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3932. case $cc_basename in
  3933. # old Intel for x86_64 which still supported -KPIC.
  3934. ecc*)
  3935. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3936. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3937. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3938. ;;
  3939. # icc used to be incompatible with GCC.
  3940. # ICC 10 doesn't accept -KPIC any more.
  3941. icc* | ifort*)
  3942. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3943. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3944. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3945. ;;
  3946. # Lahey Fortran 8.1.
  3947. lf95*)
  3948. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3949. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  3950. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  3951. ;;
  3952. nagfor*)
  3953. # NAG Fortran compiler
  3954. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  3955. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3956. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3957. ;;
  3958. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  3959. # Portland Group compilers (*not* the Pentium gcc compiler,
  3960. # which looks to be a dead project)
  3961. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3962. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3963. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3964. ;;
  3965. ccc*)
  3966. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3967. # All Alpha code is PIC.
  3968. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3969. ;;
  3970. xl* | bgxl* | bgf* | mpixl*)
  3971. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  3972. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3973. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3974. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3975. ;;
  3976. *)
  3977. case `$CC -V 2>&1 | sed 5q` in
  3978. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  3979. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  3980. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3981. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3982. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  3983. ;;
  3984. *Sun\ F* | *Sun*Fortran*)
  3985. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3986. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3987. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3988. ;;
  3989. *Sun\ C*)
  3990. # Sun C 5.9
  3991. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3992. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3993. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3994. ;;
  3995. *Intel*\ [[CF]]*Compiler*)
  3996. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3997. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3998. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3999. ;;
  4000. *Portland\ Group*)
  4001. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4002. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4003. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4004. ;;
  4005. esac
  4006. ;;
  4007. esac
  4008. ;;
  4009. newsos6)
  4010. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4011. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4012. ;;
  4013. *nto* | *qnx*)
  4014. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4015. # it will coredump.
  4016. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4017. ;;
  4018. osf3* | osf4* | osf5*)
  4019. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4020. # All OSF/1 code is PIC.
  4021. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4022. ;;
  4023. rdos*)
  4024. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4025. ;;
  4026. solaris*)
  4027. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4028. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4029. case $cc_basename in
  4030. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4031. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4032. *)
  4033. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4034. esac
  4035. ;;
  4036. sunos4*)
  4037. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4038. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4039. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4040. ;;
  4041. sysv4 | sysv4.2uw2* | sysv4.3*)
  4042. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4043. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4044. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4045. ;;
  4046. sysv4*MP*)
  4047. if test -d /usr/nec ;then
  4048. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4049. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4050. fi
  4051. ;;
  4052. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4053. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4054. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4055. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4056. ;;
  4057. unicos*)
  4058. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4059. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4060. ;;
  4061. uts4*)
  4062. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4063. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4064. ;;
  4065. *)
  4066. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4067. ;;
  4068. esac
  4069. fi
  4070. ])
  4071. case $host_os in
  4072. # For platforms which do not support PIC, -DPIC is meaningless:
  4073. *djgpp*)
  4074. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4075. ;;
  4076. *)
  4077. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4078. ;;
  4079. esac
  4080. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4081. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4082. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4083. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4084. #
  4085. # Check to make sure the PIC flag actually works.
  4086. #
  4087. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4088. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4089. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4090. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4091. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4092. "" | " "*) ;;
  4093. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4094. esac],
  4095. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4096. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4097. fi
  4098. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4099. [Additional compiler flags for building library objects])
  4100. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4101. [How to pass a linker flag through the compiler])
  4102. #
  4103. # Check to make sure the static flag actually works.
  4104. #
  4105. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4106. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4107. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4108. $lt_tmp_static_flag,
  4109. [],
  4110. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4111. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4112. [Compiler flag to prevent dynamic linking])
  4113. ])# _LT_COMPILER_PIC
  4114. # _LT_LINKER_SHLIBS([TAGNAME])
  4115. # ----------------------------
  4116. # See if the linker supports building shared libraries.
  4117. m4_defun([_LT_LINKER_SHLIBS],
  4118. [AC_REQUIRE([LT_PATH_LD])dnl
  4119. AC_REQUIRE([LT_PATH_NM])dnl
  4120. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4121. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4122. m4_require([_LT_DECL_EGREP])dnl
  4123. m4_require([_LT_DECL_SED])dnl
  4124. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4125. m4_require([_LT_TAG_COMPILER])dnl
  4126. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4127. m4_if([$1], [CXX], [
  4128. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4129. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4130. case $host_os in
  4131. aix[[4-9]]*)
  4132. # If we're using GNU nm, then we don't want the "-C" option.
  4133. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4134. # Also, AIX nm treats weak defined symbols like other global defined
  4135. # symbols, whereas GNU nm marks them as "W".
  4136. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4137. _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'
  4138. else
  4139. _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'
  4140. fi
  4141. ;;
  4142. pw32*)
  4143. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4144. ;;
  4145. cygwin* | mingw* | cegcc*)
  4146. case $cc_basename in
  4147. cl*)
  4148. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4149. ;;
  4150. *)
  4151. _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'
  4152. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4153. ;;
  4154. esac
  4155. ;;
  4156. linux* | k*bsd*-gnu | gnu*)
  4157. _LT_TAGVAR(link_all_deplibs, $1)=no
  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. linux* | k*bsd*-gnu | gnu*)
  4221. _LT_TAGVAR(link_all_deplibs, $1)=no
  4222. ;;
  4223. esac
  4224. _LT_TAGVAR(ld_shlibs, $1)=yes
  4225. # On some targets, GNU ld is compatible enough with the native linker
  4226. # that we're better off using the native interface for both.
  4227. lt_use_gnu_ld_interface=no
  4228. if test "$with_gnu_ld" = yes; then
  4229. case $host_os in
  4230. aix*)
  4231. # The AIX port of GNU ld has always aspired to compatibility
  4232. # with the native linker. However, as the warning in the GNU ld
  4233. # block says, versions before 2.19.5* couldn't really create working
  4234. # shared libraries, regardless of the interface used.
  4235. case `$LD -v 2>&1` in
  4236. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4237. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4238. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4239. *)
  4240. lt_use_gnu_ld_interface=yes
  4241. ;;
  4242. esac
  4243. ;;
  4244. *)
  4245. lt_use_gnu_ld_interface=yes
  4246. ;;
  4247. esac
  4248. fi
  4249. if test "$lt_use_gnu_ld_interface" = yes; then
  4250. # If archive_cmds runs LD, not CC, wlarc should be empty
  4251. wlarc='${wl}'
  4252. # Set some defaults for GNU ld with shared library support. These
  4253. # are reset later if shared libraries are not supported. Putting them
  4254. # here allows them to be overridden if necessary.
  4255. runpath_var=LD_RUN_PATH
  4256. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4257. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4258. # ancient GNU ld didn't support --whole-archive et. al.
  4259. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4260. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4261. else
  4262. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4263. fi
  4264. supports_anon_versioning=no
  4265. case `$LD -v 2>&1` in
  4266. *GNU\ gold*) supports_anon_versioning=yes ;;
  4267. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4268. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4269. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4270. *\ 2.11.*) ;; # other 2.11 versions
  4271. *) supports_anon_versioning=yes ;;
  4272. esac
  4273. # See if GNU ld supports shared libraries.
  4274. case $host_os in
  4275. aix[[3-9]]*)
  4276. # On AIX/PPC, the GNU linker is very broken
  4277. if test "$host_cpu" != ia64; then
  4278. _LT_TAGVAR(ld_shlibs, $1)=no
  4279. cat <<_LT_EOF 1>&2
  4280. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4281. *** to be unable to reliably create shared libraries on AIX.
  4282. *** Therefore, libtool is disabling shared libraries support. If you
  4283. *** really care for shared libraries, you may want to install binutils
  4284. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4285. *** You will then need to restart the configuration process.
  4286. _LT_EOF
  4287. fi
  4288. ;;
  4289. amigaos*)
  4290. case $host_cpu in
  4291. powerpc)
  4292. # see comment about AmigaOS4 .so support
  4293. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4294. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4295. ;;
  4296. m68k)
  4297. _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)'
  4298. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4299. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4300. ;;
  4301. esac
  4302. ;;
  4303. beos*)
  4304. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4305. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4306. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4307. # support --undefined. This deserves some investigation. FIXME
  4308. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4309. else
  4310. _LT_TAGVAR(ld_shlibs, $1)=no
  4311. fi
  4312. ;;
  4313. cygwin* | mingw* | pw32* | cegcc*)
  4314. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4315. # as there is no search path for DLLs.
  4316. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4317. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  4318. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4319. _LT_TAGVAR(always_export_symbols, $1)=no
  4320. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4321. _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'
  4322. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4323. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4324. _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'
  4325. # If the export-symbols file already is a .def file (1st line
  4326. # is EXPORTS), use it as is; otherwise, prepend...
  4327. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4328. cp $export_symbols $output_objdir/$soname.def;
  4329. else
  4330. echo EXPORTS > $output_objdir/$soname.def;
  4331. cat $export_symbols >> $output_objdir/$soname.def;
  4332. fi~
  4333. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4334. else
  4335. _LT_TAGVAR(ld_shlibs, $1)=no
  4336. fi
  4337. ;;
  4338. haiku*)
  4339. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4340. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4341. ;;
  4342. interix[[3-9]]*)
  4343. _LT_TAGVAR(hardcode_direct, $1)=no
  4344. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4345. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4346. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4347. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4348. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4349. # default) and relocated if they conflict, which is a slow very memory
  4350. # consuming and fragmenting process. To avoid this, we pick a random,
  4351. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4352. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4353. _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'
  4354. _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'
  4355. ;;
  4356. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4357. tmp_diet=no
  4358. if test "$host_os" = linux-dietlibc; then
  4359. case $cc_basename in
  4360. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4361. esac
  4362. fi
  4363. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4364. && test "$tmp_diet" = no
  4365. then
  4366. tmp_addflag=' $pic_flag'
  4367. tmp_sharedflag='-shared'
  4368. case $cc_basename,$host_cpu in
  4369. pgcc*) # Portland Group C compiler
  4370. _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'
  4371. tmp_addflag=' $pic_flag'
  4372. ;;
  4373. pgf77* | pgf90* | pgf95* | pgfortran*)
  4374. # Portland Group f77 and f90 compilers
  4375. _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'
  4376. tmp_addflag=' $pic_flag -Mnomain' ;;
  4377. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4378. tmp_addflag=' -i_dynamic' ;;
  4379. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4380. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4381. ifc* | ifort*) # Intel Fortran compiler
  4382. tmp_addflag=' -nofor_main' ;;
  4383. lf95*) # Lahey Fortran 8.1
  4384. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4385. tmp_sharedflag='--shared' ;;
  4386. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4387. tmp_sharedflag='-qmkshrobj'
  4388. tmp_addflag= ;;
  4389. nvcc*) # Cuda Compiler Driver 2.2
  4390. _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'
  4391. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4392. ;;
  4393. esac
  4394. case `$CC -V 2>&1 | sed 5q` in
  4395. *Sun\ C*) # Sun C 5.9
  4396. _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'
  4397. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4398. tmp_sharedflag='-G' ;;
  4399. *Sun\ F*) # Sun Fortran 8.3
  4400. tmp_sharedflag='-G' ;;
  4401. esac
  4402. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4403. if test "x$supports_anon_versioning" = xyes; then
  4404. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4405. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4406. echo "local: *; };" >> $output_objdir/$libname.ver~
  4407. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4408. fi
  4409. case $cc_basename in
  4410. xlf* | bgf* | bgxlf* | mpixlf*)
  4411. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4412. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4413. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4414. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4415. if test "x$supports_anon_versioning" = xyes; then
  4416. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4417. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4418. echo "local: *; };" >> $output_objdir/$libname.ver~
  4419. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4420. fi
  4421. ;;
  4422. esac
  4423. else
  4424. _LT_TAGVAR(ld_shlibs, $1)=no
  4425. fi
  4426. ;;
  4427. netbsd* | netbsdelf*-gnu)
  4428. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4429. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4430. wlarc=
  4431. else
  4432. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4433. _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'
  4434. fi
  4435. ;;
  4436. solaris*)
  4437. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4438. _LT_TAGVAR(ld_shlibs, $1)=no
  4439. cat <<_LT_EOF 1>&2
  4440. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4441. *** create shared libraries on Solaris systems. Therefore, libtool
  4442. *** is disabling shared libraries support. We urge you to upgrade GNU
  4443. *** binutils to release 2.9.1 or newer. Another option is to modify
  4444. *** your PATH or compiler configuration so that the native linker is
  4445. *** used, and then restart.
  4446. _LT_EOF
  4447. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4448. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4449. _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'
  4450. else
  4451. _LT_TAGVAR(ld_shlibs, $1)=no
  4452. fi
  4453. ;;
  4454. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4455. case `$LD -v 2>&1` in
  4456. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4457. _LT_TAGVAR(ld_shlibs, $1)=no
  4458. cat <<_LT_EOF 1>&2
  4459. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4460. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4461. *** is disabling shared libraries support. We urge you to upgrade GNU
  4462. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4463. *** your PATH or compiler configuration so that the native linker is
  4464. *** used, and then restart.
  4465. _LT_EOF
  4466. ;;
  4467. *)
  4468. # For security reasons, it is highly recommended that you always
  4469. # use absolute paths for naming shared libraries, and exclude the
  4470. # DT_RUNPATH tag from executables and libraries. But doing so
  4471. # requires that you compile everything twice, which is a pain.
  4472. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4473. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4474. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4475. _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'
  4476. else
  4477. _LT_TAGVAR(ld_shlibs, $1)=no
  4478. fi
  4479. ;;
  4480. esac
  4481. ;;
  4482. sunos4*)
  4483. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4484. wlarc=
  4485. _LT_TAGVAR(hardcode_direct, $1)=yes
  4486. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4487. ;;
  4488. *)
  4489. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4490. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4491. _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'
  4492. else
  4493. _LT_TAGVAR(ld_shlibs, $1)=no
  4494. fi
  4495. ;;
  4496. esac
  4497. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  4498. runpath_var=
  4499. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4500. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4501. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4502. fi
  4503. else
  4504. # PORTME fill in a description of your system's linker (not GNU ld)
  4505. case $host_os in
  4506. aix3*)
  4507. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4508. _LT_TAGVAR(always_export_symbols, $1)=yes
  4509. _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'
  4510. # Note: this linker hardcodes the directories in LIBPATH if there
  4511. # are no directories specified by -L.
  4512. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4513. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  4514. # Neither direct hardcoding nor static linking is supported with a
  4515. # broken collect2.
  4516. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4517. fi
  4518. ;;
  4519. aix[[4-9]]*)
  4520. if test "$host_cpu" = ia64; then
  4521. # On IA64, the linker does run time linking by default, so we don't
  4522. # have to do anything special.
  4523. aix_use_runtimelinking=no
  4524. exp_sym_flag='-Bexport'
  4525. no_entry_flag=""
  4526. else
  4527. # If we're using GNU nm, then we don't want the "-C" option.
  4528. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4529. # Also, AIX nm treats weak defined symbols like other global
  4530. # defined symbols, whereas GNU nm marks them as "W".
  4531. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4532. _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'
  4533. else
  4534. _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'
  4535. fi
  4536. aix_use_runtimelinking=no
  4537. # Test if we are trying to use run time linking or normal
  4538. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4539. # need to do runtime linking.
  4540. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4541. for ld_flag in $LDFLAGS; do
  4542. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4543. aix_use_runtimelinking=yes
  4544. break
  4545. fi
  4546. done
  4547. ;;
  4548. esac
  4549. exp_sym_flag='-bexport'
  4550. no_entry_flag='-bnoentry'
  4551. fi
  4552. # When large executables or shared objects are built, AIX ld can
  4553. # have problems creating the table of contents. If linking a library
  4554. # or program results in "error TOC overflow" add -mminimal-toc to
  4555. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4556. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4557. _LT_TAGVAR(archive_cmds, $1)=''
  4558. _LT_TAGVAR(hardcode_direct, $1)=yes
  4559. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4560. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4561. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4562. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  4563. if test "$GCC" = yes; then
  4564. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4565. # We only want to do this on AIX 4.2 and lower, the check
  4566. # below for broken collect2 doesn't work under 4.3+
  4567. collect2name=`${CC} -print-prog-name=collect2`
  4568. if test -f "$collect2name" &&
  4569. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4570. then
  4571. # We have reworked collect2
  4572. :
  4573. else
  4574. # We have old collect2
  4575. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4576. # It fails to find uninstalled libraries when the uninstalled
  4577. # path is not listed in the libpath. Setting hardcode_minus_L
  4578. # to unsupported forces relinking
  4579. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4580. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4581. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4582. fi
  4583. ;;
  4584. esac
  4585. shared_flag='-shared'
  4586. if test "$aix_use_runtimelinking" = yes; then
  4587. shared_flag="$shared_flag "'${wl}-G'
  4588. fi
  4589. _LT_TAGVAR(link_all_deplibs, $1)=no
  4590. else
  4591. # not using gcc
  4592. if test "$host_cpu" = ia64; then
  4593. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4594. # chokes on -Wl,-G. The following line is correct:
  4595. shared_flag='-G'
  4596. else
  4597. if test "$aix_use_runtimelinking" = yes; then
  4598. shared_flag='${wl}-G'
  4599. else
  4600. shared_flag='${wl}-bM:SRE'
  4601. fi
  4602. fi
  4603. fi
  4604. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  4605. # It seems that -bexpall does not export symbols beginning with
  4606. # underscore (_), so it is better to generate a list of symbols to export.
  4607. _LT_TAGVAR(always_export_symbols, $1)=yes
  4608. if test "$aix_use_runtimelinking" = yes; then
  4609. # Warning - without using the other runtime loading flags (-brtl),
  4610. # -berok will link without error, but may produce a broken library.
  4611. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4612. # Determine the default libpath from the value encoded in an
  4613. # empty executable.
  4614. _LT_SYS_MODULE_PATH_AIX([$1])
  4615. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4616. _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"
  4617. else
  4618. if test "$host_cpu" = ia64; then
  4619. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4620. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4621. _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"
  4622. else
  4623. # Determine the default libpath from the value encoded in an
  4624. # empty executable.
  4625. _LT_SYS_MODULE_PATH_AIX([$1])
  4626. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4627. # Warning - without using the other run time loading flags,
  4628. # -berok will link without error, but may produce a broken library.
  4629. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4630. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4631. if test "$with_gnu_ld" = yes; then
  4632. # We only use this code for GNU lds that support --whole-archive.
  4633. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  4634. else
  4635. # Exported symbols can be pulled into shared objects from archives
  4636. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  4637. fi
  4638. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4639. # This is similar to how AIX traditionally builds its shared libraries.
  4640. _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'
  4641. fi
  4642. fi
  4643. ;;
  4644. amigaos*)
  4645. case $host_cpu in
  4646. powerpc)
  4647. # see comment about AmigaOS4 .so support
  4648. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4649. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4650. ;;
  4651. m68k)
  4652. _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)'
  4653. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4654. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4655. ;;
  4656. esac
  4657. ;;
  4658. bsdi[[45]]*)
  4659. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4660. ;;
  4661. cygwin* | mingw* | pw32* | cegcc*)
  4662. # When not using gcc, we currently assume that we are using
  4663. # Microsoft Visual C++.
  4664. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4665. # no search path for DLLs.
  4666. case $cc_basename in
  4667. cl*)
  4668. # Native MSVC
  4669. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4670. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4671. _LT_TAGVAR(always_export_symbols, $1)=yes
  4672. _LT_TAGVAR(file_list_spec, $1)='@'
  4673. # Tell ltmain to make .lib files, not .a files.
  4674. libext=lib
  4675. # Tell ltmain to make .dll files, not .so files.
  4676. shrext_cmds=".dll"
  4677. # FIXME: Setting linknames here is a bad hack.
  4678. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  4679. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4680. sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  4681. else
  4682. sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  4683. fi~
  4684. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  4685. linknames='
  4686. # The linker will not automatically build a static lib if we build a DLL.
  4687. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4688. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4689. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4690. _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'
  4691. # Don't use ranlib
  4692. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  4693. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  4694. lt_tool_outputfile="@TOOL_OUTPUT@"~
  4695. case $lt_outputfile in
  4696. *.exe|*.EXE) ;;
  4697. *)
  4698. lt_outputfile="$lt_outputfile.exe"
  4699. lt_tool_outputfile="$lt_tool_outputfile.exe"
  4700. ;;
  4701. esac~
  4702. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  4703. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  4704. $RM "$lt_outputfile.manifest";
  4705. fi'
  4706. ;;
  4707. *)
  4708. # Assume MSVC wrapper
  4709. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4710. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4711. # Tell ltmain to make .lib files, not .a files.
  4712. libext=lib
  4713. # Tell ltmain to make .dll files, not .so files.
  4714. shrext_cmds=".dll"
  4715. # FIXME: Setting linknames here is a bad hack.
  4716. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  4717. # The linker will automatically build a .lib file if we build a DLL.
  4718. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4719. # FIXME: Should let the user specify the lib program.
  4720. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  4721. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4722. ;;
  4723. esac
  4724. ;;
  4725. darwin* | rhapsody*)
  4726. _LT_DARWIN_LINKER_FEATURES($1)
  4727. ;;
  4728. dgux*)
  4729. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4730. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4731. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4732. ;;
  4733. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4734. # support. Future versions do this automatically, but an explicit c++rt0.o
  4735. # does not break anything, and helps significantly (at the cost of a little
  4736. # extra space).
  4737. freebsd2.2*)
  4738. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  4739. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4740. _LT_TAGVAR(hardcode_direct, $1)=yes
  4741. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4742. ;;
  4743. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  4744. freebsd2.*)
  4745. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4746. _LT_TAGVAR(hardcode_direct, $1)=yes
  4747. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4748. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4749. ;;
  4750. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  4751. freebsd* | dragonfly*)
  4752. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4753. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4754. _LT_TAGVAR(hardcode_direct, $1)=yes
  4755. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4756. ;;
  4757. hpux9*)
  4758. if test "$GCC" = yes; then
  4759. _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'
  4760. else
  4761. _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'
  4762. fi
  4763. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4764. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4765. _LT_TAGVAR(hardcode_direct, $1)=yes
  4766. # hardcode_minus_L: Not really in the search PATH,
  4767. # but as the default location of the library.
  4768. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4769. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4770. ;;
  4771. hpux10*)
  4772. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4773. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4774. else
  4775. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  4776. fi
  4777. if test "$with_gnu_ld" = no; then
  4778. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4779. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4780. _LT_TAGVAR(hardcode_direct, $1)=yes
  4781. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4782. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4783. # hardcode_minus_L: Not really in the search PATH,
  4784. # but as the default location of the library.
  4785. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4786. fi
  4787. ;;
  4788. hpux11*)
  4789. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4790. case $host_cpu in
  4791. hppa*64*)
  4792. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4793. ;;
  4794. ia64*)
  4795. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4796. ;;
  4797. *)
  4798. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4799. ;;
  4800. esac
  4801. else
  4802. case $host_cpu in
  4803. hppa*64*)
  4804. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4805. ;;
  4806. ia64*)
  4807. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4808. ;;
  4809. *)
  4810. m4_if($1, [], [
  4811. # Older versions of the 11.00 compiler do not understand -b yet
  4812. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  4813. _LT_LINKER_OPTION([if $CC understands -b],
  4814. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  4815. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  4816. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  4817. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  4818. ;;
  4819. esac
  4820. fi
  4821. if test "$with_gnu_ld" = no; then
  4822. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4823. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4824. case $host_cpu in
  4825. hppa*64*|ia64*)
  4826. _LT_TAGVAR(hardcode_direct, $1)=no
  4827. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4828. ;;
  4829. *)
  4830. _LT_TAGVAR(hardcode_direct, $1)=yes
  4831. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4832. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4833. # hardcode_minus_L: Not really in the search PATH,
  4834. # but as the default location of the library.
  4835. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4836. ;;
  4837. esac
  4838. fi
  4839. ;;
  4840. irix5* | irix6* | nonstopux*)
  4841. if test "$GCC" = yes; then
  4842. _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'
  4843. # Try to use the -exported_symbol ld option, if it does not
  4844. # work, assume that -exports_file does not work either and
  4845. # implicitly export all symbols.
  4846. # This should be the same for all languages, so no per-tag cache variable.
  4847. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  4848. [lt_cv_irix_exported_symbol],
  4849. [save_LDFLAGS="$LDFLAGS"
  4850. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  4851. AC_LINK_IFELSE(
  4852. [AC_LANG_SOURCE(
  4853. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  4854. [C++], [[int foo (void) { return 0; }]],
  4855. [Fortran 77], [[
  4856. subroutine foo
  4857. end]],
  4858. [Fortran], [[
  4859. subroutine foo
  4860. end]])])],
  4861. [lt_cv_irix_exported_symbol=yes],
  4862. [lt_cv_irix_exported_symbol=no])
  4863. LDFLAGS="$save_LDFLAGS"])
  4864. if test "$lt_cv_irix_exported_symbol" = yes; then
  4865. _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'
  4866. fi
  4867. else
  4868. _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'
  4869. _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'
  4870. fi
  4871. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4872. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4873. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4874. _LT_TAGVAR(inherit_rpath, $1)=yes
  4875. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4876. ;;
  4877. netbsd* | netbsdelf*-gnu)
  4878. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4879. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  4880. else
  4881. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  4882. fi
  4883. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4884. _LT_TAGVAR(hardcode_direct, $1)=yes
  4885. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4886. ;;
  4887. newsos6)
  4888. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4889. _LT_TAGVAR(hardcode_direct, $1)=yes
  4890. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4891. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4892. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4893. ;;
  4894. *nto* | *qnx*)
  4895. ;;
  4896. openbsd*)
  4897. if test -f /usr/libexec/ld.so; then
  4898. _LT_TAGVAR(hardcode_direct, $1)=yes
  4899. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4900. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4901. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4902. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4903. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  4904. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4905. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4906. else
  4907. case $host_os in
  4908. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  4909. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4910. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4911. ;;
  4912. *)
  4913. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4914. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4915. ;;
  4916. esac
  4917. fi
  4918. else
  4919. _LT_TAGVAR(ld_shlibs, $1)=no
  4920. fi
  4921. ;;
  4922. os2*)
  4923. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4924. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4925. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4926. _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'
  4927. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  4928. ;;
  4929. osf3*)
  4930. if test "$GCC" = yes; then
  4931. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4932. _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'
  4933. else
  4934. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4935. _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'
  4936. fi
  4937. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4938. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4939. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4940. ;;
  4941. osf4* | osf5*) # as osf3* with the addition of -msym flag
  4942. if test "$GCC" = yes; then
  4943. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4944. _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'
  4945. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4946. else
  4947. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4948. _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'
  4949. _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~
  4950. $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'
  4951. # Both c and cxx compiler support -rpath directly
  4952. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  4953. fi
  4954. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4955. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4956. ;;
  4957. solaris*)
  4958. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  4959. if test "$GCC" = yes; then
  4960. wlarc='${wl}'
  4961. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4962. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4963. $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'
  4964. else
  4965. case `$CC -V 2>&1` in
  4966. *"Compilers 5.0"*)
  4967. wlarc=''
  4968. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4969. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4970. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  4971. ;;
  4972. *)
  4973. wlarc='${wl}'
  4974. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  4975. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4976. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4977. ;;
  4978. esac
  4979. fi
  4980. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4981. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4982. case $host_os in
  4983. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  4984. *)
  4985. # The compiler driver will combine and reorder linker options,
  4986. # but understands `-z linker_flag'. GCC discards it without `$wl',
  4987. # but is careful enough not to reorder.
  4988. # Supported since Solaris 2.6 (maybe 2.5.1?)
  4989. if test "$GCC" = yes; then
  4990. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  4991. else
  4992. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  4993. fi
  4994. ;;
  4995. esac
  4996. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4997. ;;
  4998. sunos4*)
  4999. if test "x$host_vendor" = xsequent; then
  5000. # Use $CC to link under sequent, because it throws in some extra .o
  5001. # files that make .init and .fini sections work.
  5002. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5003. else
  5004. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5005. fi
  5006. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5007. _LT_TAGVAR(hardcode_direct, $1)=yes
  5008. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5009. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5010. ;;
  5011. sysv4)
  5012. case $host_vendor in
  5013. sni)
  5014. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5015. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5016. ;;
  5017. siemens)
  5018. ## LD is ld it makes a PLAMLIB
  5019. ## CC just makes a GrossModule.
  5020. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5021. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5022. _LT_TAGVAR(hardcode_direct, $1)=no
  5023. ;;
  5024. motorola)
  5025. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5026. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5027. ;;
  5028. esac
  5029. runpath_var='LD_RUN_PATH'
  5030. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5031. ;;
  5032. sysv4.3*)
  5033. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5034. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5035. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5036. ;;
  5037. sysv4*MP*)
  5038. if test -d /usr/nec; then
  5039. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5040. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5041. runpath_var=LD_RUN_PATH
  5042. hardcode_runpath_var=yes
  5043. _LT_TAGVAR(ld_shlibs, $1)=yes
  5044. fi
  5045. ;;
  5046. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5047. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5048. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5049. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5050. runpath_var='LD_RUN_PATH'
  5051. if test "$GCC" = yes; then
  5052. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5053. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5054. else
  5055. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5056. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5057. fi
  5058. ;;
  5059. sysv5* | sco3.2v5* | sco5v6*)
  5060. # Note: We can NOT use -z defs as we might desire, because we do not
  5061. # link with -lc, and that would cause any symbols used from libc to
  5062. # always be unresolved, which means just about no library would
  5063. # ever link correctly. If we're not using GNU ld we use -z text
  5064. # though, which does catch some bad symbols but isn't as heavy-handed
  5065. # as -z defs.
  5066. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5067. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5068. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5069. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5070. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5071. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5072. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5073. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5074. runpath_var='LD_RUN_PATH'
  5075. if test "$GCC" = yes; then
  5076. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5077. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5078. else
  5079. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5080. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5081. fi
  5082. ;;
  5083. uts4*)
  5084. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5085. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5086. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5087. ;;
  5088. *)
  5089. _LT_TAGVAR(ld_shlibs, $1)=no
  5090. ;;
  5091. esac
  5092. if test x$host_vendor = xsni; then
  5093. case $host in
  5094. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5095. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  5096. ;;
  5097. esac
  5098. fi
  5099. fi
  5100. ])
  5101. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5102. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5103. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5104. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5105. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5106. _LT_DECL([], [extract_expsyms_cmds], [2],
  5107. [The commands to extract the exported symbol list from a shared archive])
  5108. #
  5109. # Do we need to explicitly link libc?
  5110. #
  5111. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5112. x|xyes)
  5113. # Assume -lc should be added
  5114. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5115. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5116. case $_LT_TAGVAR(archive_cmds, $1) in
  5117. *'~'*)
  5118. # FIXME: we may have to deal with multi-command sequences.
  5119. ;;
  5120. '$CC '*)
  5121. # Test whether the compiler implicitly links with -lc since on some
  5122. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5123. # to ld, don't add -lc before -lgcc.
  5124. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5125. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5126. [$RM conftest*
  5127. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5128. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5129. soname=conftest
  5130. lib=conftest
  5131. libobjs=conftest.$ac_objext
  5132. deplibs=
  5133. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5134. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5135. compiler_flags=-v
  5136. linker_flags=-v
  5137. verstring=
  5138. output_objdir=.
  5139. libname=conftest
  5140. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5141. _LT_TAGVAR(allow_undefined_flag, $1)=
  5142. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5143. then
  5144. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5145. else
  5146. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5147. fi
  5148. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5149. else
  5150. cat conftest.err 1>&5
  5151. fi
  5152. $RM conftest*
  5153. ])
  5154. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5155. ;;
  5156. esac
  5157. fi
  5158. ;;
  5159. esac
  5160. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5161. [Whether or not to add -lc for building shared libraries])
  5162. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5163. [enable_shared_with_static_runtimes], [0],
  5164. [Whether or not to disallow shared libs when runtime libs are static])
  5165. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5166. [Compiler flag to allow reflexive dlopens])
  5167. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5168. [Compiler flag to generate shared objects directly from archives])
  5169. _LT_TAGDECL([], [compiler_needs_object], [1],
  5170. [Whether the compiler copes with passing no objects directly])
  5171. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5172. [Create an old-style archive from a shared archive])
  5173. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5174. [Create a temporary old-style archive to link instead of a shared archive])
  5175. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5176. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5177. _LT_TAGDECL([], [module_cmds], [2],
  5178. [Commands used to build a loadable module if different from building
  5179. a shared archive.])
  5180. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5181. _LT_TAGDECL([], [with_gnu_ld], [1],
  5182. [Whether we are building with GNU ld or not])
  5183. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5184. [Flag that allows shared libraries with undefined symbols to be built])
  5185. _LT_TAGDECL([], [no_undefined_flag], [1],
  5186. [Flag that enforces no undefined symbols])
  5187. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5188. [Flag to hardcode $libdir into a binary during linking.
  5189. This must work even if $libdir does not exist])
  5190. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5191. [Whether we need a single "-rpath" flag with a separated argument])
  5192. _LT_TAGDECL([], [hardcode_direct], [0],
  5193. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5194. DIR into the resulting binary])
  5195. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5196. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5197. DIR into the resulting binary and the resulting library dependency is
  5198. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  5199. library is relocated])
  5200. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5201. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5202. into the resulting binary])
  5203. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5204. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5205. into the resulting binary])
  5206. _LT_TAGDECL([], [hardcode_automatic], [0],
  5207. [Set to "yes" if building a shared library automatically hardcodes DIR
  5208. into the library and all subsequent libraries and executables linked
  5209. against it])
  5210. _LT_TAGDECL([], [inherit_rpath], [0],
  5211. [Set to yes if linker adds runtime paths of dependent libraries
  5212. to runtime path list])
  5213. _LT_TAGDECL([], [link_all_deplibs], [0],
  5214. [Whether libtool must link a program against all its dependency libraries])
  5215. _LT_TAGDECL([], [always_export_symbols], [0],
  5216. [Set to "yes" if exported symbols are required])
  5217. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5218. [The commands to list exported symbols])
  5219. _LT_TAGDECL([], [exclude_expsyms], [1],
  5220. [Symbols that should not be listed in the preloaded symbols])
  5221. _LT_TAGDECL([], [include_expsyms], [1],
  5222. [Symbols that must always be exported])
  5223. _LT_TAGDECL([], [prelink_cmds], [2],
  5224. [Commands necessary for linking programs (against libraries) with templates])
  5225. _LT_TAGDECL([], [postlink_cmds], [2],
  5226. [Commands necessary for finishing linking programs])
  5227. _LT_TAGDECL([], [file_list_spec], [1],
  5228. [Specify filename containing input files])
  5229. dnl FIXME: Not yet implemented
  5230. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5231. dnl [Compiler flag to generate thread safe objects])
  5232. ])# _LT_LINKER_SHLIBS
  5233. # _LT_LANG_C_CONFIG([TAG])
  5234. # ------------------------
  5235. # Ensure that the configuration variables for a C compiler are suitably
  5236. # defined. These variables are subsequently used by _LT_CONFIG to write
  5237. # the compiler configuration to `libtool'.
  5238. m4_defun([_LT_LANG_C_CONFIG],
  5239. [m4_require([_LT_DECL_EGREP])dnl
  5240. lt_save_CC="$CC"
  5241. AC_LANG_PUSH(C)
  5242. # Source file extension for C test sources.
  5243. ac_ext=c
  5244. # Object file extension for compiled C test sources.
  5245. objext=o
  5246. _LT_TAGVAR(objext, $1)=$objext
  5247. # Code to be used in simple compile tests
  5248. lt_simple_compile_test_code="int some_variable = 0;"
  5249. # Code to be used in simple link tests
  5250. lt_simple_link_test_code='int main(){return(0);}'
  5251. _LT_TAG_COMPILER
  5252. # Save the default compiler, since it gets overwritten when the other
  5253. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5254. compiler_DEFAULT=$CC
  5255. # save warnings/boilerplate of simple test code
  5256. _LT_COMPILER_BOILERPLATE
  5257. _LT_LINKER_BOILERPLATE
  5258. if test -n "$compiler"; then
  5259. _LT_COMPILER_NO_RTTI($1)
  5260. _LT_COMPILER_PIC($1)
  5261. _LT_COMPILER_C_O($1)
  5262. _LT_COMPILER_FILE_LOCKS($1)
  5263. _LT_LINKER_SHLIBS($1)
  5264. _LT_SYS_DYNAMIC_LINKER($1)
  5265. _LT_LINKER_HARDCODE_LIBPATH($1)
  5266. LT_SYS_DLOPEN_SELF
  5267. _LT_CMD_STRIPLIB
  5268. # Report which library types will actually be built
  5269. AC_MSG_CHECKING([if libtool supports shared libraries])
  5270. AC_MSG_RESULT([$can_build_shared])
  5271. AC_MSG_CHECKING([whether to build shared libraries])
  5272. test "$can_build_shared" = "no" && enable_shared=no
  5273. # On AIX, shared libraries and static libraries use the same namespace, and
  5274. # are all built from PIC.
  5275. case $host_os in
  5276. aix3*)
  5277. test "$enable_shared" = yes && enable_static=no
  5278. if test -n "$RANLIB"; then
  5279. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5280. postinstall_cmds='$RANLIB $lib'
  5281. fi
  5282. ;;
  5283. aix[[4-9]]*)
  5284. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  5285. test "$enable_shared" = yes && enable_static=no
  5286. fi
  5287. ;;
  5288. esac
  5289. AC_MSG_RESULT([$enable_shared])
  5290. AC_MSG_CHECKING([whether to build static libraries])
  5291. # Make sure either enable_shared or enable_static is yes.
  5292. test "$enable_shared" = yes || enable_static=yes
  5293. AC_MSG_RESULT([$enable_static])
  5294. _LT_CONFIG($1)
  5295. fi
  5296. AC_LANG_POP
  5297. CC="$lt_save_CC"
  5298. ])# _LT_LANG_C_CONFIG
  5299. # _LT_LANG_CXX_CONFIG([TAG])
  5300. # --------------------------
  5301. # Ensure that the configuration variables for a C++ compiler are suitably
  5302. # defined. These variables are subsequently used by _LT_CONFIG to write
  5303. # the compiler configuration to `libtool'.
  5304. m4_defun([_LT_LANG_CXX_CONFIG],
  5305. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5306. m4_require([_LT_DECL_EGREP])dnl
  5307. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5308. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  5309. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  5310. (test "X$CXX" != "Xg++"))) ; then
  5311. AC_PROG_CXXCPP
  5312. else
  5313. _lt_caught_CXX_error=yes
  5314. fi
  5315. AC_LANG_PUSH(C++)
  5316. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5317. _LT_TAGVAR(allow_undefined_flag, $1)=
  5318. _LT_TAGVAR(always_export_symbols, $1)=no
  5319. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5320. _LT_TAGVAR(compiler_needs_object, $1)=no
  5321. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5322. _LT_TAGVAR(hardcode_direct, $1)=no
  5323. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5324. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5325. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5326. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5327. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5328. _LT_TAGVAR(hardcode_automatic, $1)=no
  5329. _LT_TAGVAR(inherit_rpath, $1)=no
  5330. _LT_TAGVAR(module_cmds, $1)=
  5331. _LT_TAGVAR(module_expsym_cmds, $1)=
  5332. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5333. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5334. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5335. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5336. _LT_TAGVAR(no_undefined_flag, $1)=
  5337. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5338. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5339. # Source file extension for C++ test sources.
  5340. ac_ext=cpp
  5341. # Object file extension for compiled C++ test sources.
  5342. objext=o
  5343. _LT_TAGVAR(objext, $1)=$objext
  5344. # No sense in running all these tests if we already determined that
  5345. # the CXX compiler isn't working. Some variables (like enable_shared)
  5346. # are currently assumed to apply to all compilers on this platform,
  5347. # and will be corrupted by setting them based on a non-working compiler.
  5348. if test "$_lt_caught_CXX_error" != yes; then
  5349. # Code to be used in simple compile tests
  5350. lt_simple_compile_test_code="int some_variable = 0;"
  5351. # Code to be used in simple link tests
  5352. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5353. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5354. _LT_TAG_COMPILER
  5355. # save warnings/boilerplate of simple test code
  5356. _LT_COMPILER_BOILERPLATE
  5357. _LT_LINKER_BOILERPLATE
  5358. # Allow CC to be a program name with arguments.
  5359. lt_save_CC=$CC
  5360. lt_save_CFLAGS=$CFLAGS
  5361. lt_save_LD=$LD
  5362. lt_save_GCC=$GCC
  5363. GCC=$GXX
  5364. lt_save_with_gnu_ld=$with_gnu_ld
  5365. lt_save_path_LD=$lt_cv_path_LD
  5366. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5367. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5368. else
  5369. $as_unset lt_cv_prog_gnu_ld
  5370. fi
  5371. if test -n "${lt_cv_path_LDCXX+set}"; then
  5372. lt_cv_path_LD=$lt_cv_path_LDCXX
  5373. else
  5374. $as_unset lt_cv_path_LD
  5375. fi
  5376. test -z "${LDCXX+set}" || LD=$LDCXX
  5377. CC=${CXX-"c++"}
  5378. CFLAGS=$CXXFLAGS
  5379. compiler=$CC
  5380. _LT_TAGVAR(compiler, $1)=$CC
  5381. _LT_CC_BASENAME([$compiler])
  5382. if test -n "$compiler"; then
  5383. # We don't want -fno-exception when compiling C++ code, so set the
  5384. # no_builtin_flag separately
  5385. if test "$GXX" = yes; then
  5386. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5387. else
  5388. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5389. fi
  5390. if test "$GXX" = yes; then
  5391. # Set up default GNU C++ configuration
  5392. LT_PATH_LD
  5393. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5394. # archiving commands below assume that GNU ld is being used.
  5395. if test "$with_gnu_ld" = yes; then
  5396. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5397. _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'
  5398. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5399. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5400. # If archive_cmds runs LD, not CC, wlarc should be empty
  5401. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5402. # investigate it a little bit more. (MM)
  5403. wlarc='${wl}'
  5404. # ancient GNU ld didn't support --whole-archive et. al.
  5405. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5406. $GREP 'no-whole-archive' > /dev/null; then
  5407. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5408. else
  5409. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5410. fi
  5411. else
  5412. with_gnu_ld=no
  5413. wlarc=
  5414. # A generic and very simple default shared library creation
  5415. # command for GNU C++ for the case where it uses the native
  5416. # linker, instead of GNU ld. If possible, this setting should
  5417. # overridden to take advantage of the native linker features on
  5418. # the platform it is being used on.
  5419. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5420. fi
  5421. # Commands to make compiler produce verbose output that lists
  5422. # what "hidden" libraries, object files and flags are used when
  5423. # linking a shared library.
  5424. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  5425. else
  5426. GXX=no
  5427. with_gnu_ld=no
  5428. wlarc=
  5429. fi
  5430. # PORTME: fill in a description of your system's C++ link characteristics
  5431. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5432. _LT_TAGVAR(ld_shlibs, $1)=yes
  5433. case $host_os in
  5434. aix3*)
  5435. # FIXME: insert proper C++ library support
  5436. _LT_TAGVAR(ld_shlibs, $1)=no
  5437. ;;
  5438. aix[[4-9]]*)
  5439. if test "$host_cpu" = ia64; then
  5440. # On IA64, the linker does run time linking by default, so we don't
  5441. # have to do anything special.
  5442. aix_use_runtimelinking=no
  5443. exp_sym_flag='-Bexport'
  5444. no_entry_flag=""
  5445. else
  5446. aix_use_runtimelinking=no
  5447. # Test if we are trying to use run time linking or normal
  5448. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5449. # need to do runtime linking.
  5450. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5451. for ld_flag in $LDFLAGS; do
  5452. case $ld_flag in
  5453. *-brtl*)
  5454. aix_use_runtimelinking=yes
  5455. break
  5456. ;;
  5457. esac
  5458. done
  5459. ;;
  5460. esac
  5461. exp_sym_flag='-bexport'
  5462. no_entry_flag='-bnoentry'
  5463. fi
  5464. # When large executables or shared objects are built, AIX ld can
  5465. # have problems creating the table of contents. If linking a library
  5466. # or program results in "error TOC overflow" add -mminimal-toc to
  5467. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5468. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5469. _LT_TAGVAR(archive_cmds, $1)=''
  5470. _LT_TAGVAR(hardcode_direct, $1)=yes
  5471. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5472. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5473. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5474. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5475. if test "$GXX" = yes; then
  5476. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5477. # We only want to do this on AIX 4.2 and lower, the check
  5478. # below for broken collect2 doesn't work under 4.3+
  5479. collect2name=`${CC} -print-prog-name=collect2`
  5480. if test -f "$collect2name" &&
  5481. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5482. then
  5483. # We have reworked collect2
  5484. :
  5485. else
  5486. # We have old collect2
  5487. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5488. # It fails to find uninstalled libraries when the uninstalled
  5489. # path is not listed in the libpath. Setting hardcode_minus_L
  5490. # to unsupported forces relinking
  5491. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5492. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5493. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5494. fi
  5495. esac
  5496. shared_flag='-shared'
  5497. if test "$aix_use_runtimelinking" = yes; then
  5498. shared_flag="$shared_flag "'${wl}-G'
  5499. fi
  5500. else
  5501. # not using gcc
  5502. if test "$host_cpu" = ia64; then
  5503. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5504. # chokes on -Wl,-G. The following line is correct:
  5505. shared_flag='-G'
  5506. else
  5507. if test "$aix_use_runtimelinking" = yes; then
  5508. shared_flag='${wl}-G'
  5509. else
  5510. shared_flag='${wl}-bM:SRE'
  5511. fi
  5512. fi
  5513. fi
  5514. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5515. # It seems that -bexpall does not export symbols beginning with
  5516. # underscore (_), so it is better to generate a list of symbols to
  5517. # export.
  5518. _LT_TAGVAR(always_export_symbols, $1)=yes
  5519. if test "$aix_use_runtimelinking" = yes; then
  5520. # Warning - without using the other runtime loading flags (-brtl),
  5521. # -berok will link without error, but may produce a broken library.
  5522. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5523. # Determine the default libpath from the value encoded in an empty
  5524. # executable.
  5525. _LT_SYS_MODULE_PATH_AIX([$1])
  5526. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5527. _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"
  5528. else
  5529. if test "$host_cpu" = ia64; then
  5530. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5531. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5532. _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"
  5533. else
  5534. # Determine the default libpath from the value encoded in an
  5535. # empty executable.
  5536. _LT_SYS_MODULE_PATH_AIX([$1])
  5537. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5538. # Warning - without using the other run time loading flags,
  5539. # -berok will link without error, but may produce a broken library.
  5540. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5541. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5542. if test "$with_gnu_ld" = yes; then
  5543. # We only use this code for GNU lds that support --whole-archive.
  5544. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5545. else
  5546. # Exported symbols can be pulled into shared objects from archives
  5547. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5548. fi
  5549. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5550. # This is similar to how AIX traditionally builds its shared
  5551. # libraries.
  5552. _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'
  5553. fi
  5554. fi
  5555. ;;
  5556. beos*)
  5557. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5558. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5559. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5560. # support --undefined. This deserves some investigation. FIXME
  5561. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5562. else
  5563. _LT_TAGVAR(ld_shlibs, $1)=no
  5564. fi
  5565. ;;
  5566. chorus*)
  5567. case $cc_basename in
  5568. *)
  5569. # FIXME: insert proper C++ library support
  5570. _LT_TAGVAR(ld_shlibs, $1)=no
  5571. ;;
  5572. esac
  5573. ;;
  5574. cygwin* | mingw* | pw32* | cegcc*)
  5575. case $GXX,$cc_basename in
  5576. ,cl* | no,cl*)
  5577. # Native MSVC
  5578. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5579. # no search path for DLLs.
  5580. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5581. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5582. _LT_TAGVAR(always_export_symbols, $1)=yes
  5583. _LT_TAGVAR(file_list_spec, $1)='@'
  5584. # Tell ltmain to make .lib files, not .a files.
  5585. libext=lib
  5586. # Tell ltmain to make .dll files, not .so files.
  5587. shrext_cmds=".dll"
  5588. # FIXME: Setting linknames here is a bad hack.
  5589. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  5590. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5591. $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  5592. else
  5593. $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  5594. fi~
  5595. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5596. linknames='
  5597. # The linker will not automatically build a static lib if we build a DLL.
  5598. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5599. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5600. # Don't use ranlib
  5601. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5602. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5603. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5604. case $lt_outputfile in
  5605. *.exe|*.EXE) ;;
  5606. *)
  5607. lt_outputfile="$lt_outputfile.exe"
  5608. lt_tool_outputfile="$lt_tool_outputfile.exe"
  5609. ;;
  5610. esac~
  5611. func_to_tool_file "$lt_outputfile"~
  5612. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  5613. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5614. $RM "$lt_outputfile.manifest";
  5615. fi'
  5616. ;;
  5617. *)
  5618. # g++
  5619. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5620. # as there is no search path for DLLs.
  5621. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5622. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  5623. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5624. _LT_TAGVAR(always_export_symbols, $1)=no
  5625. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5626. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5627. _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'
  5628. # If the export-symbols file already is a .def file (1st line
  5629. # is EXPORTS), use it as is; otherwise, prepend...
  5630. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5631. cp $export_symbols $output_objdir/$soname.def;
  5632. else
  5633. echo EXPORTS > $output_objdir/$soname.def;
  5634. cat $export_symbols >> $output_objdir/$soname.def;
  5635. fi~
  5636. $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'
  5637. else
  5638. _LT_TAGVAR(ld_shlibs, $1)=no
  5639. fi
  5640. ;;
  5641. esac
  5642. ;;
  5643. darwin* | rhapsody*)
  5644. _LT_DARWIN_LINKER_FEATURES($1)
  5645. ;;
  5646. dgux*)
  5647. case $cc_basename in
  5648. ec++*)
  5649. # FIXME: insert proper C++ library support
  5650. _LT_TAGVAR(ld_shlibs, $1)=no
  5651. ;;
  5652. ghcx*)
  5653. # Green Hills C++ Compiler
  5654. # FIXME: insert proper C++ library support
  5655. _LT_TAGVAR(ld_shlibs, $1)=no
  5656. ;;
  5657. *)
  5658. # FIXME: insert proper C++ library support
  5659. _LT_TAGVAR(ld_shlibs, $1)=no
  5660. ;;
  5661. esac
  5662. ;;
  5663. freebsd2.*)
  5664. # C++ shared libraries reported to be fairly broken before
  5665. # switch to ELF
  5666. _LT_TAGVAR(ld_shlibs, $1)=no
  5667. ;;
  5668. freebsd-elf*)
  5669. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5670. ;;
  5671. freebsd* | dragonfly*)
  5672. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  5673. # conventions
  5674. _LT_TAGVAR(ld_shlibs, $1)=yes
  5675. ;;
  5676. haiku*)
  5677. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5678. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5679. ;;
  5680. hpux9*)
  5681. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5682. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5683. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5684. _LT_TAGVAR(hardcode_direct, $1)=yes
  5685. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5686. # but as the default
  5687. # location of the library.
  5688. case $cc_basename in
  5689. CC*)
  5690. # FIXME: insert proper C++ library support
  5691. _LT_TAGVAR(ld_shlibs, $1)=no
  5692. ;;
  5693. aCC*)
  5694. _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'
  5695. # Commands to make compiler produce verbose output that lists
  5696. # what "hidden" libraries, object files and flags are used when
  5697. # linking a shared library.
  5698. #
  5699. # There doesn't appear to be a way to prevent this compiler from
  5700. # explicitly linking system object files so we need to strip them
  5701. # from the output so that they don't get included in the library
  5702. # dependencies.
  5703. 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"'
  5704. ;;
  5705. *)
  5706. if test "$GXX" = yes; then
  5707. _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'
  5708. else
  5709. # FIXME: insert proper C++ library support
  5710. _LT_TAGVAR(ld_shlibs, $1)=no
  5711. fi
  5712. ;;
  5713. esac
  5714. ;;
  5715. hpux10*|hpux11*)
  5716. if test $with_gnu_ld = no; then
  5717. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5718. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5719. case $host_cpu in
  5720. hppa*64*|ia64*)
  5721. ;;
  5722. *)
  5723. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5724. ;;
  5725. esac
  5726. fi
  5727. case $host_cpu in
  5728. hppa*64*|ia64*)
  5729. _LT_TAGVAR(hardcode_direct, $1)=no
  5730. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5731. ;;
  5732. *)
  5733. _LT_TAGVAR(hardcode_direct, $1)=yes
  5734. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5735. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5736. # but as the default
  5737. # location of the library.
  5738. ;;
  5739. esac
  5740. case $cc_basename in
  5741. CC*)
  5742. # FIXME: insert proper C++ library support
  5743. _LT_TAGVAR(ld_shlibs, $1)=no
  5744. ;;
  5745. aCC*)
  5746. case $host_cpu in
  5747. hppa*64*)
  5748. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5749. ;;
  5750. ia64*)
  5751. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5752. ;;
  5753. *)
  5754. _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'
  5755. ;;
  5756. esac
  5757. # Commands to make compiler produce verbose output that lists
  5758. # what "hidden" libraries, object files and flags are used when
  5759. # linking a shared library.
  5760. #
  5761. # There doesn't appear to be a way to prevent this compiler from
  5762. # explicitly linking system object files so we need to strip them
  5763. # from the output so that they don't get included in the library
  5764. # dependencies.
  5765. 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"'
  5766. ;;
  5767. *)
  5768. if test "$GXX" = yes; then
  5769. if test $with_gnu_ld = no; then
  5770. case $host_cpu in
  5771. hppa*64*)
  5772. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5773. ;;
  5774. ia64*)
  5775. _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'
  5776. ;;
  5777. *)
  5778. _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'
  5779. ;;
  5780. esac
  5781. fi
  5782. else
  5783. # FIXME: insert proper C++ library support
  5784. _LT_TAGVAR(ld_shlibs, $1)=no
  5785. fi
  5786. ;;
  5787. esac
  5788. ;;
  5789. interix[[3-9]]*)
  5790. _LT_TAGVAR(hardcode_direct, $1)=no
  5791. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5792. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5793. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5794. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5795. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5796. # default) and relocated if they conflict, which is a slow very memory
  5797. # consuming and fragmenting process. To avoid this, we pick a random,
  5798. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5799. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5800. _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'
  5801. _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'
  5802. ;;
  5803. irix5* | irix6*)
  5804. case $cc_basename in
  5805. CC*)
  5806. # SGI C++
  5807. _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'
  5808. # Archives containing C++ object files must be created using
  5809. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  5810. # necessary to make sure instantiated templates are included
  5811. # in the archive.
  5812. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  5813. ;;
  5814. *)
  5815. if test "$GXX" = yes; then
  5816. if test "$with_gnu_ld" = no; then
  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"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5818. else
  5819. _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'
  5820. fi
  5821. fi
  5822. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5823. ;;
  5824. esac
  5825. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5826. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5827. _LT_TAGVAR(inherit_rpath, $1)=yes
  5828. ;;
  5829. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  5830. case $cc_basename in
  5831. KCC*)
  5832. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5833. # KCC will only create a shared library if the output file
  5834. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5835. # to its proper name (with version) after linking.
  5836. _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'
  5837. _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'
  5838. # Commands to make compiler produce verbose output that lists
  5839. # what "hidden" libraries, object files and flags are used when
  5840. # linking a shared library.
  5841. #
  5842. # There doesn't appear to be a way to prevent this compiler from
  5843. # explicitly linking system object files so we need to strip them
  5844. # from the output so that they don't get included in the library
  5845. # dependencies.
  5846. 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"'
  5847. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5848. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5849. # Archives containing C++ object files must be created using
  5850. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5851. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5852. ;;
  5853. icpc* | ecpc* )
  5854. # Intel C++
  5855. with_gnu_ld=yes
  5856. # version 8.0 and above of icpc choke on multiply defined symbols
  5857. # if we add $predep_objects and $postdep_objects, however 7.1 and
  5858. # earlier do not add the objects themselves.
  5859. case `$CC -V 2>&1` in
  5860. *"Version 7."*)
  5861. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5862. _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'
  5863. ;;
  5864. *) # Version 8.0 or newer
  5865. tmp_idyn=
  5866. case $host_cpu in
  5867. ia64*) tmp_idyn=' -i_dynamic';;
  5868. esac
  5869. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5870. _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'
  5871. ;;
  5872. esac
  5873. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5874. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5875. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5876. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5877. ;;
  5878. pgCC* | pgcpp*)
  5879. # Portland Group C++ compiler
  5880. case `$CC -V` in
  5881. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  5882. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  5883. rm -rf $tpldir~
  5884. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  5885. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  5886. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  5887. rm -rf $tpldir~
  5888. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  5889. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  5890. $RANLIB $oldlib'
  5891. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  5892. rm -rf $tpldir~
  5893. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5894. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5895. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  5896. rm -rf $tpldir~
  5897. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5898. $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'
  5899. ;;
  5900. *) # Version 6 and above use weak symbols
  5901. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5902. _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'
  5903. ;;
  5904. esac
  5905. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5906. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5907. _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'
  5908. ;;
  5909. cxx*)
  5910. # Compaq C++
  5911. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5912. _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'
  5913. runpath_var=LD_RUN_PATH
  5914. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5915. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5916. # Commands to make compiler produce verbose output that lists
  5917. # what "hidden" libraries, object files and flags are used when
  5918. # linking a shared library.
  5919. #
  5920. # There doesn't appear to be a way to prevent this compiler from
  5921. # explicitly linking system object files so we need to strip them
  5922. # from the output so that they don't get included in the library
  5923. # dependencies.
  5924. 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'
  5925. ;;
  5926. xl* | mpixl* | bgxl*)
  5927. # IBM XL 8.0 on PPC, with GNU ld
  5928. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5929. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5930. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5931. if test "x$supports_anon_versioning" = xyes; then
  5932. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5933. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5934. echo "local: *; };" >> $output_objdir/$libname.ver~
  5935. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5936. fi
  5937. ;;
  5938. *)
  5939. case `$CC -V 2>&1 | sed 5q` in
  5940. *Sun\ C*)
  5941. # Sun C++ 5.9
  5942. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5943. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5944. _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'
  5945. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5946. _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'
  5947. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5948. # Not sure whether something based on
  5949. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  5950. # would be better.
  5951. output_verbose_link_cmd='func_echo_all'
  5952. # Archives containing C++ object files must be created using
  5953. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5954. # necessary to make sure instantiated templates are included
  5955. # in the archive.
  5956. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5957. ;;
  5958. esac
  5959. ;;
  5960. esac
  5961. ;;
  5962. lynxos*)
  5963. # FIXME: insert proper C++ library support
  5964. _LT_TAGVAR(ld_shlibs, $1)=no
  5965. ;;
  5966. m88k*)
  5967. # FIXME: insert proper C++ library support
  5968. _LT_TAGVAR(ld_shlibs, $1)=no
  5969. ;;
  5970. mvs*)
  5971. case $cc_basename in
  5972. cxx*)
  5973. # FIXME: insert proper C++ library support
  5974. _LT_TAGVAR(ld_shlibs, $1)=no
  5975. ;;
  5976. *)
  5977. # FIXME: insert proper C++ library support
  5978. _LT_TAGVAR(ld_shlibs, $1)=no
  5979. ;;
  5980. esac
  5981. ;;
  5982. netbsd*)
  5983. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5984. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  5985. wlarc=
  5986. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5987. _LT_TAGVAR(hardcode_direct, $1)=yes
  5988. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5989. fi
  5990. # Workaround some broken pre-1.5 toolchains
  5991. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  5992. ;;
  5993. *nto* | *qnx*)
  5994. _LT_TAGVAR(ld_shlibs, $1)=yes
  5995. ;;
  5996. openbsd2*)
  5997. # C++ shared libraries are fairly broken
  5998. _LT_TAGVAR(ld_shlibs, $1)=no
  5999. ;;
  6000. openbsd*)
  6001. if test -f /usr/libexec/ld.so; then
  6002. _LT_TAGVAR(hardcode_direct, $1)=yes
  6003. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6004. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6005. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6006. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6007. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6008. _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'
  6009. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6010. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6011. fi
  6012. output_verbose_link_cmd=func_echo_all
  6013. else
  6014. _LT_TAGVAR(ld_shlibs, $1)=no
  6015. fi
  6016. ;;
  6017. osf3* | osf4* | osf5*)
  6018. case $cc_basename in
  6019. KCC*)
  6020. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6021. # KCC will only create a shared library if the output file
  6022. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6023. # to its proper name (with version) after linking.
  6024. _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'
  6025. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6026. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6027. # Archives containing C++ object files must be created using
  6028. # the KAI C++ compiler.
  6029. case $host in
  6030. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6031. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6032. esac
  6033. ;;
  6034. RCC*)
  6035. # Rational C++ 2.4.1
  6036. # FIXME: insert proper C++ library support
  6037. _LT_TAGVAR(ld_shlibs, $1)=no
  6038. ;;
  6039. cxx*)
  6040. case $host in
  6041. osf3*)
  6042. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6043. _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'
  6044. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6045. ;;
  6046. *)
  6047. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6048. _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'
  6049. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6050. echo "-hidden">> $lib.exp~
  6051. $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~
  6052. $RM $lib.exp'
  6053. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6054. ;;
  6055. esac
  6056. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6057. # Commands to make compiler produce verbose output that lists
  6058. # what "hidden" libraries, object files and flags are used when
  6059. # linking a shared library.
  6060. #
  6061. # There doesn't appear to be a way to prevent this compiler from
  6062. # explicitly linking system object files so we need to strip them
  6063. # from the output so that they don't get included in the library
  6064. # dependencies.
  6065. 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"'
  6066. ;;
  6067. *)
  6068. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6069. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6070. case $host in
  6071. osf3*)
  6072. _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'
  6073. ;;
  6074. *)
  6075. _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'
  6076. ;;
  6077. esac
  6078. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6079. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6080. # Commands to make compiler produce verbose output that lists
  6081. # what "hidden" libraries, object files and flags are used when
  6082. # linking a shared library.
  6083. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6084. else
  6085. # FIXME: insert proper C++ library support
  6086. _LT_TAGVAR(ld_shlibs, $1)=no
  6087. fi
  6088. ;;
  6089. esac
  6090. ;;
  6091. psos*)
  6092. # FIXME: insert proper C++ library support
  6093. _LT_TAGVAR(ld_shlibs, $1)=no
  6094. ;;
  6095. sunos4*)
  6096. case $cc_basename in
  6097. CC*)
  6098. # Sun C++ 4.x
  6099. # FIXME: insert proper C++ library support
  6100. _LT_TAGVAR(ld_shlibs, $1)=no
  6101. ;;
  6102. lcc*)
  6103. # Lucid
  6104. # FIXME: insert proper C++ library support
  6105. _LT_TAGVAR(ld_shlibs, $1)=no
  6106. ;;
  6107. *)
  6108. # FIXME: insert proper C++ library support
  6109. _LT_TAGVAR(ld_shlibs, $1)=no
  6110. ;;
  6111. esac
  6112. ;;
  6113. solaris*)
  6114. case $cc_basename in
  6115. CC* | sunCC*)
  6116. # Sun C++ 4.2, 5.x and Centerline C++
  6117. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6118. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6119. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6120. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6121. $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'
  6122. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6123. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6124. case $host_os in
  6125. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6126. *)
  6127. # The compiler driver will combine and reorder linker options,
  6128. # but understands `-z linker_flag'.
  6129. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6130. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6131. ;;
  6132. esac
  6133. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6134. output_verbose_link_cmd='func_echo_all'
  6135. # Archives containing C++ object files must be created using
  6136. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6137. # necessary to make sure instantiated templates are included
  6138. # in the archive.
  6139. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6140. ;;
  6141. gcx*)
  6142. # Green Hills C++ Compiler
  6143. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6144. # The C++ compiler must be used to create the archive.
  6145. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6146. ;;
  6147. *)
  6148. # GNU C++ compiler with Solaris linker
  6149. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6150. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  6151. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6152. _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'
  6153. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6154. $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6155. # Commands to make compiler produce verbose output that lists
  6156. # what "hidden" libraries, object files and flags are used when
  6157. # linking a shared library.
  6158. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6159. else
  6160. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  6161. # platform.
  6162. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6163. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6164. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6165. # Commands to make compiler produce verbose output that lists
  6166. # what "hidden" libraries, object files and flags are used when
  6167. # linking a shared library.
  6168. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6169. fi
  6170. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  6171. case $host_os in
  6172. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6173. *)
  6174. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6175. ;;
  6176. esac
  6177. fi
  6178. ;;
  6179. esac
  6180. ;;
  6181. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6182. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6183. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6184. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6185. runpath_var='LD_RUN_PATH'
  6186. case $cc_basename in
  6187. CC*)
  6188. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6189. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6190. ;;
  6191. *)
  6192. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6193. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6194. ;;
  6195. esac
  6196. ;;
  6197. sysv5* | sco3.2v5* | sco5v6*)
  6198. # Note: We can NOT use -z defs as we might desire, because we do not
  6199. # link with -lc, and that would cause any symbols used from libc to
  6200. # always be unresolved, which means just about no library would
  6201. # ever link correctly. If we're not using GNU ld we use -z text
  6202. # though, which does catch some bad symbols but isn't as heavy-handed
  6203. # as -z defs.
  6204. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6205. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  6206. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6207. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6208. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  6209. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6210. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6211. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6212. runpath_var='LD_RUN_PATH'
  6213. case $cc_basename in
  6214. CC*)
  6215. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6216. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6217. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6218. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6219. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6220. '"$_LT_TAGVAR(reload_cmds, $1)"
  6221. ;;
  6222. *)
  6223. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6224. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6225. ;;
  6226. esac
  6227. ;;
  6228. tandem*)
  6229. case $cc_basename in
  6230. NCC*)
  6231. # NonStop-UX NCC 3.20
  6232. # FIXME: insert proper C++ library support
  6233. _LT_TAGVAR(ld_shlibs, $1)=no
  6234. ;;
  6235. *)
  6236. # FIXME: insert proper C++ library support
  6237. _LT_TAGVAR(ld_shlibs, $1)=no
  6238. ;;
  6239. esac
  6240. ;;
  6241. vxworks*)
  6242. # FIXME: insert proper C++ library support
  6243. _LT_TAGVAR(ld_shlibs, $1)=no
  6244. ;;
  6245. *)
  6246. # FIXME: insert proper C++ library support
  6247. _LT_TAGVAR(ld_shlibs, $1)=no
  6248. ;;
  6249. esac
  6250. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6251. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6252. _LT_TAGVAR(GCC, $1)="$GXX"
  6253. _LT_TAGVAR(LD, $1)="$LD"
  6254. ## CAVEAT EMPTOR:
  6255. ## There is no encapsulation within the following macros, do not change
  6256. ## the running order or otherwise move them around unless you know exactly
  6257. ## what you are doing...
  6258. _LT_SYS_HIDDEN_LIBDEPS($1)
  6259. _LT_COMPILER_PIC($1)
  6260. _LT_COMPILER_C_O($1)
  6261. _LT_COMPILER_FILE_LOCKS($1)
  6262. _LT_LINKER_SHLIBS($1)
  6263. _LT_SYS_DYNAMIC_LINKER($1)
  6264. _LT_LINKER_HARDCODE_LIBPATH($1)
  6265. _LT_CONFIG($1)
  6266. fi # test -n "$compiler"
  6267. CC=$lt_save_CC
  6268. CFLAGS=$lt_save_CFLAGS
  6269. LDCXX=$LD
  6270. LD=$lt_save_LD
  6271. GCC=$lt_save_GCC
  6272. with_gnu_ld=$lt_save_with_gnu_ld
  6273. lt_cv_path_LDCXX=$lt_cv_path_LD
  6274. lt_cv_path_LD=$lt_save_path_LD
  6275. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6276. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6277. fi # test "$_lt_caught_CXX_error" != yes
  6278. AC_LANG_POP
  6279. ])# _LT_LANG_CXX_CONFIG
  6280. # _LT_FUNC_STRIPNAME_CNF
  6281. # ----------------------
  6282. # func_stripname_cnf prefix suffix name
  6283. # strip PREFIX and SUFFIX off of NAME.
  6284. # PREFIX and SUFFIX must not contain globbing or regex special
  6285. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6286. # dot (in which case that matches only a dot).
  6287. #
  6288. # This function is identical to the (non-XSI) version of func_stripname,
  6289. # except this one can be used by m4 code that may be executed by configure,
  6290. # rather than the libtool script.
  6291. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6292. AC_REQUIRE([_LT_DECL_SED])
  6293. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6294. func_stripname_cnf ()
  6295. {
  6296. case ${2} in
  6297. .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
  6298. *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
  6299. esac
  6300. } # func_stripname_cnf
  6301. ])# _LT_FUNC_STRIPNAME_CNF
  6302. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6303. # ---------------------------------
  6304. # Figure out "hidden" library dependencies from verbose
  6305. # compiler output when linking a shared library.
  6306. # Parse the compiler output and extract the necessary
  6307. # objects, libraries and library flags.
  6308. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6309. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6310. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6311. # Dependencies to place before and after the object being linked:
  6312. _LT_TAGVAR(predep_objects, $1)=
  6313. _LT_TAGVAR(postdep_objects, $1)=
  6314. _LT_TAGVAR(predeps, $1)=
  6315. _LT_TAGVAR(postdeps, $1)=
  6316. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6317. dnl we can't use the lt_simple_compile_test_code here,
  6318. dnl because it contains code intended for an executable,
  6319. dnl not a library. It's possible we should let each
  6320. dnl tag define a new lt_????_link_test_code variable,
  6321. dnl but it's only used here...
  6322. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6323. int a;
  6324. void foo (void) { a = 0; }
  6325. _LT_EOF
  6326. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6327. class Foo
  6328. {
  6329. public:
  6330. Foo (void) { a = 0; }
  6331. private:
  6332. int a;
  6333. };
  6334. _LT_EOF
  6335. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6336. subroutine foo
  6337. implicit none
  6338. integer*4 a
  6339. a=0
  6340. return
  6341. end
  6342. _LT_EOF
  6343. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6344. subroutine foo
  6345. implicit none
  6346. integer a
  6347. a=0
  6348. return
  6349. end
  6350. _LT_EOF
  6351. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6352. public class foo {
  6353. private int a;
  6354. public void bar (void) {
  6355. a = 0;
  6356. }
  6357. };
  6358. _LT_EOF
  6359. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6360. package foo
  6361. func foo() {
  6362. }
  6363. _LT_EOF
  6364. ])
  6365. _lt_libdeps_save_CFLAGS=$CFLAGS
  6366. case "$CC $CFLAGS " in #(
  6367. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6368. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6369. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6370. esac
  6371. dnl Parse the compiler output and extract the necessary
  6372. dnl objects, libraries and library flags.
  6373. if AC_TRY_EVAL(ac_compile); then
  6374. # Parse the compiler output and extract the necessary
  6375. # objects, libraries and library flags.
  6376. # Sentinel used to keep track of whether or not we are before
  6377. # the conftest object file.
  6378. pre_test_object_deps_done=no
  6379. for p in `eval "$output_verbose_link_cmd"`; do
  6380. case ${prev}${p} in
  6381. -L* | -R* | -l*)
  6382. # Some compilers place space between "-{L,R}" and the path.
  6383. # Remove the space.
  6384. if test $p = "-L" ||
  6385. test $p = "-R"; then
  6386. prev=$p
  6387. continue
  6388. fi
  6389. # Expand the sysroot to ease extracting the directories later.
  6390. if test -z "$prev"; then
  6391. case $p in
  6392. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6393. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6394. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6395. esac
  6396. fi
  6397. case $p in
  6398. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6399. esac
  6400. if test "$pre_test_object_deps_done" = no; then
  6401. case ${prev} in
  6402. -L | -R)
  6403. # Internal compiler library paths should come after those
  6404. # provided the user. The postdeps already come after the
  6405. # user supplied libs so there is no need to process them.
  6406. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6407. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  6408. else
  6409. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  6410. fi
  6411. ;;
  6412. # The "-l" case would never come before the object being
  6413. # linked, so don't bother handling this case.
  6414. esac
  6415. else
  6416. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6417. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  6418. else
  6419. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  6420. fi
  6421. fi
  6422. prev=
  6423. ;;
  6424. *.lto.$objext) ;; # Ignore GCC LTO objects
  6425. *.$objext)
  6426. # This assumes that the test object file only shows up
  6427. # once in the compiler output.
  6428. if test "$p" = "conftest.$objext"; then
  6429. pre_test_object_deps_done=yes
  6430. continue
  6431. fi
  6432. if test "$pre_test_object_deps_done" = no; then
  6433. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6434. _LT_TAGVAR(predep_objects, $1)="$p"
  6435. else
  6436. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6437. fi
  6438. else
  6439. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6440. _LT_TAGVAR(postdep_objects, $1)="$p"
  6441. else
  6442. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6443. fi
  6444. fi
  6445. ;;
  6446. *) ;; # Ignore the rest.
  6447. esac
  6448. done
  6449. # Clean up.
  6450. rm -f a.out a.exe
  6451. else
  6452. echo "libtool.m4: error: problem compiling $1 test program"
  6453. fi
  6454. $RM -f confest.$objext
  6455. CFLAGS=$_lt_libdeps_save_CFLAGS
  6456. # PORTME: override above test on systems where it is broken
  6457. m4_if([$1], [CXX],
  6458. [case $host_os in
  6459. interix[[3-9]]*)
  6460. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6461. # hack all around it, let's just trust "g++" to DTRT.
  6462. _LT_TAGVAR(predep_objects,$1)=
  6463. _LT_TAGVAR(postdep_objects,$1)=
  6464. _LT_TAGVAR(postdeps,$1)=
  6465. ;;
  6466. linux*)
  6467. case `$CC -V 2>&1 | sed 5q` in
  6468. *Sun\ C*)
  6469. # Sun C++ 5.9
  6470. # The more standards-conforming stlport4 library is
  6471. # incompatible with the Cstd library. Avoid specifying
  6472. # it if it's in CXXFLAGS. Ignore libCrun as
  6473. # -library=stlport4 depends on it.
  6474. case " $CXX $CXXFLAGS " in
  6475. *" -library=stlport4 "*)
  6476. solaris_use_stlport4=yes
  6477. ;;
  6478. esac
  6479. if test "$solaris_use_stlport4" != yes; then
  6480. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6481. fi
  6482. ;;
  6483. esac
  6484. ;;
  6485. solaris*)
  6486. case $cc_basename in
  6487. CC* | sunCC*)
  6488. # The more standards-conforming stlport4 library is
  6489. # incompatible with the Cstd library. Avoid specifying
  6490. # it if it's in CXXFLAGS. Ignore libCrun as
  6491. # -library=stlport4 depends on it.
  6492. case " $CXX $CXXFLAGS " in
  6493. *" -library=stlport4 "*)
  6494. solaris_use_stlport4=yes
  6495. ;;
  6496. esac
  6497. # Adding this requires a known-good setup of shared libraries for
  6498. # Sun compiler versions before 5.6, else PIC objects from an old
  6499. # archive will be linked into the output, leading to subtle bugs.
  6500. if test "$solaris_use_stlport4" != yes; then
  6501. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6502. fi
  6503. ;;
  6504. esac
  6505. ;;
  6506. esac
  6507. ])
  6508. case " $_LT_TAGVAR(postdeps, $1) " in
  6509. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6510. esac
  6511. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6512. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6513. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  6514. fi
  6515. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  6516. [The directories searched by this compiler when creating a shared library])
  6517. _LT_TAGDECL([], [predep_objects], [1],
  6518. [Dependencies to place before and after the objects being linked to
  6519. create a shared library])
  6520. _LT_TAGDECL([], [postdep_objects], [1])
  6521. _LT_TAGDECL([], [predeps], [1])
  6522. _LT_TAGDECL([], [postdeps], [1])
  6523. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  6524. [The library search path used internally by the compiler when linking
  6525. a shared library])
  6526. ])# _LT_SYS_HIDDEN_LIBDEPS
  6527. # _LT_LANG_F77_CONFIG([TAG])
  6528. # --------------------------
  6529. # Ensure that the configuration variables for a Fortran 77 compiler are
  6530. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6531. # to write the compiler configuration to `libtool'.
  6532. m4_defun([_LT_LANG_F77_CONFIG],
  6533. [AC_LANG_PUSH(Fortran 77)
  6534. if test -z "$F77" || test "X$F77" = "Xno"; then
  6535. _lt_disable_F77=yes
  6536. fi
  6537. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6538. _LT_TAGVAR(allow_undefined_flag, $1)=
  6539. _LT_TAGVAR(always_export_symbols, $1)=no
  6540. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6541. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6542. _LT_TAGVAR(hardcode_direct, $1)=no
  6543. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6544. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6545. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6546. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6547. _LT_TAGVAR(hardcode_automatic, $1)=no
  6548. _LT_TAGVAR(inherit_rpath, $1)=no
  6549. _LT_TAGVAR(module_cmds, $1)=
  6550. _LT_TAGVAR(module_expsym_cmds, $1)=
  6551. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6552. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6553. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6554. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6555. _LT_TAGVAR(no_undefined_flag, $1)=
  6556. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6557. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6558. # Source file extension for f77 test sources.
  6559. ac_ext=f
  6560. # Object file extension for compiled f77 test sources.
  6561. objext=o
  6562. _LT_TAGVAR(objext, $1)=$objext
  6563. # No sense in running all these tests if we already determined that
  6564. # the F77 compiler isn't working. Some variables (like enable_shared)
  6565. # are currently assumed to apply to all compilers on this platform,
  6566. # and will be corrupted by setting them based on a non-working compiler.
  6567. if test "$_lt_disable_F77" != yes; then
  6568. # Code to be used in simple compile tests
  6569. lt_simple_compile_test_code="\
  6570. subroutine t
  6571. return
  6572. end
  6573. "
  6574. # Code to be used in simple link tests
  6575. lt_simple_link_test_code="\
  6576. program t
  6577. end
  6578. "
  6579. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6580. _LT_TAG_COMPILER
  6581. # save warnings/boilerplate of simple test code
  6582. _LT_COMPILER_BOILERPLATE
  6583. _LT_LINKER_BOILERPLATE
  6584. # Allow CC to be a program name with arguments.
  6585. lt_save_CC="$CC"
  6586. lt_save_GCC=$GCC
  6587. lt_save_CFLAGS=$CFLAGS
  6588. CC=${F77-"f77"}
  6589. CFLAGS=$FFLAGS
  6590. compiler=$CC
  6591. _LT_TAGVAR(compiler, $1)=$CC
  6592. _LT_CC_BASENAME([$compiler])
  6593. GCC=$G77
  6594. if test -n "$compiler"; then
  6595. AC_MSG_CHECKING([if libtool supports shared libraries])
  6596. AC_MSG_RESULT([$can_build_shared])
  6597. AC_MSG_CHECKING([whether to build shared libraries])
  6598. test "$can_build_shared" = "no" && enable_shared=no
  6599. # On AIX, shared libraries and static libraries use the same namespace, and
  6600. # are all built from PIC.
  6601. case $host_os in
  6602. aix3*)
  6603. test "$enable_shared" = yes && enable_static=no
  6604. if test -n "$RANLIB"; then
  6605. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6606. postinstall_cmds='$RANLIB $lib'
  6607. fi
  6608. ;;
  6609. aix[[4-9]]*)
  6610. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6611. test "$enable_shared" = yes && enable_static=no
  6612. fi
  6613. ;;
  6614. esac
  6615. AC_MSG_RESULT([$enable_shared])
  6616. AC_MSG_CHECKING([whether to build static libraries])
  6617. # Make sure either enable_shared or enable_static is yes.
  6618. test "$enable_shared" = yes || enable_static=yes
  6619. AC_MSG_RESULT([$enable_static])
  6620. _LT_TAGVAR(GCC, $1)="$G77"
  6621. _LT_TAGVAR(LD, $1)="$LD"
  6622. ## CAVEAT EMPTOR:
  6623. ## There is no encapsulation within the following macros, do not change
  6624. ## the running order or otherwise move them around unless you know exactly
  6625. ## what you are doing...
  6626. _LT_COMPILER_PIC($1)
  6627. _LT_COMPILER_C_O($1)
  6628. _LT_COMPILER_FILE_LOCKS($1)
  6629. _LT_LINKER_SHLIBS($1)
  6630. _LT_SYS_DYNAMIC_LINKER($1)
  6631. _LT_LINKER_HARDCODE_LIBPATH($1)
  6632. _LT_CONFIG($1)
  6633. fi # test -n "$compiler"
  6634. GCC=$lt_save_GCC
  6635. CC="$lt_save_CC"
  6636. CFLAGS="$lt_save_CFLAGS"
  6637. fi # test "$_lt_disable_F77" != yes
  6638. AC_LANG_POP
  6639. ])# _LT_LANG_F77_CONFIG
  6640. # _LT_LANG_FC_CONFIG([TAG])
  6641. # -------------------------
  6642. # Ensure that the configuration variables for a Fortran compiler are
  6643. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6644. # to write the compiler configuration to `libtool'.
  6645. m4_defun([_LT_LANG_FC_CONFIG],
  6646. [AC_LANG_PUSH(Fortran)
  6647. if test -z "$FC" || test "X$FC" = "Xno"; then
  6648. _lt_disable_FC=yes
  6649. fi
  6650. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6651. _LT_TAGVAR(allow_undefined_flag, $1)=
  6652. _LT_TAGVAR(always_export_symbols, $1)=no
  6653. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6654. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6655. _LT_TAGVAR(hardcode_direct, $1)=no
  6656. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6657. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6658. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6659. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6660. _LT_TAGVAR(hardcode_automatic, $1)=no
  6661. _LT_TAGVAR(inherit_rpath, $1)=no
  6662. _LT_TAGVAR(module_cmds, $1)=
  6663. _LT_TAGVAR(module_expsym_cmds, $1)=
  6664. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6665. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6666. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6667. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6668. _LT_TAGVAR(no_undefined_flag, $1)=
  6669. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6670. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6671. # Source file extension for fc test sources.
  6672. ac_ext=${ac_fc_srcext-f}
  6673. # Object file extension for compiled fc test sources.
  6674. objext=o
  6675. _LT_TAGVAR(objext, $1)=$objext
  6676. # No sense in running all these tests if we already determined that
  6677. # the FC compiler isn't working. Some variables (like enable_shared)
  6678. # are currently assumed to apply to all compilers on this platform,
  6679. # and will be corrupted by setting them based on a non-working compiler.
  6680. if test "$_lt_disable_FC" != yes; then
  6681. # Code to be used in simple compile tests
  6682. lt_simple_compile_test_code="\
  6683. subroutine t
  6684. return
  6685. end
  6686. "
  6687. # Code to be used in simple link tests
  6688. lt_simple_link_test_code="\
  6689. program t
  6690. end
  6691. "
  6692. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6693. _LT_TAG_COMPILER
  6694. # save warnings/boilerplate of simple test code
  6695. _LT_COMPILER_BOILERPLATE
  6696. _LT_LINKER_BOILERPLATE
  6697. # Allow CC to be a program name with arguments.
  6698. lt_save_CC="$CC"
  6699. lt_save_GCC=$GCC
  6700. lt_save_CFLAGS=$CFLAGS
  6701. CC=${FC-"f95"}
  6702. CFLAGS=$FCFLAGS
  6703. compiler=$CC
  6704. GCC=$ac_cv_fc_compiler_gnu
  6705. _LT_TAGVAR(compiler, $1)=$CC
  6706. _LT_CC_BASENAME([$compiler])
  6707. if test -n "$compiler"; then
  6708. AC_MSG_CHECKING([if libtool supports shared libraries])
  6709. AC_MSG_RESULT([$can_build_shared])
  6710. AC_MSG_CHECKING([whether to build shared libraries])
  6711. test "$can_build_shared" = "no" && enable_shared=no
  6712. # On AIX, shared libraries and static libraries use the same namespace, and
  6713. # are all built from PIC.
  6714. case $host_os in
  6715. aix3*)
  6716. test "$enable_shared" = yes && enable_static=no
  6717. if test -n "$RANLIB"; then
  6718. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6719. postinstall_cmds='$RANLIB $lib'
  6720. fi
  6721. ;;
  6722. aix[[4-9]]*)
  6723. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6724. test "$enable_shared" = yes && enable_static=no
  6725. fi
  6726. ;;
  6727. esac
  6728. AC_MSG_RESULT([$enable_shared])
  6729. AC_MSG_CHECKING([whether to build static libraries])
  6730. # Make sure either enable_shared or enable_static is yes.
  6731. test "$enable_shared" = yes || enable_static=yes
  6732. AC_MSG_RESULT([$enable_static])
  6733. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  6734. _LT_TAGVAR(LD, $1)="$LD"
  6735. ## CAVEAT EMPTOR:
  6736. ## There is no encapsulation within the following macros, do not change
  6737. ## the running order or otherwise move them around unless you know exactly
  6738. ## what you are doing...
  6739. _LT_SYS_HIDDEN_LIBDEPS($1)
  6740. _LT_COMPILER_PIC($1)
  6741. _LT_COMPILER_C_O($1)
  6742. _LT_COMPILER_FILE_LOCKS($1)
  6743. _LT_LINKER_SHLIBS($1)
  6744. _LT_SYS_DYNAMIC_LINKER($1)
  6745. _LT_LINKER_HARDCODE_LIBPATH($1)
  6746. _LT_CONFIG($1)
  6747. fi # test -n "$compiler"
  6748. GCC=$lt_save_GCC
  6749. CC=$lt_save_CC
  6750. CFLAGS=$lt_save_CFLAGS
  6751. fi # test "$_lt_disable_FC" != yes
  6752. AC_LANG_POP
  6753. ])# _LT_LANG_FC_CONFIG
  6754. # _LT_LANG_GCJ_CONFIG([TAG])
  6755. # --------------------------
  6756. # Ensure that the configuration variables for the GNU Java Compiler compiler
  6757. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6758. # to write the compiler configuration to `libtool'.
  6759. m4_defun([_LT_LANG_GCJ_CONFIG],
  6760. [AC_REQUIRE([LT_PROG_GCJ])dnl
  6761. AC_LANG_SAVE
  6762. # Source file extension for Java test sources.
  6763. ac_ext=java
  6764. # Object file extension for compiled Java test sources.
  6765. objext=o
  6766. _LT_TAGVAR(objext, $1)=$objext
  6767. # Code to be used in simple compile tests
  6768. lt_simple_compile_test_code="class foo {}"
  6769. # Code to be used in simple link tests
  6770. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  6771. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6772. _LT_TAG_COMPILER
  6773. # save warnings/boilerplate of simple test code
  6774. _LT_COMPILER_BOILERPLATE
  6775. _LT_LINKER_BOILERPLATE
  6776. # Allow CC to be a program name with arguments.
  6777. lt_save_CC=$CC
  6778. lt_save_CFLAGS=$CFLAGS
  6779. lt_save_GCC=$GCC
  6780. GCC=yes
  6781. CC=${GCJ-"gcj"}
  6782. CFLAGS=$GCJFLAGS
  6783. compiler=$CC
  6784. _LT_TAGVAR(compiler, $1)=$CC
  6785. _LT_TAGVAR(LD, $1)="$LD"
  6786. _LT_CC_BASENAME([$compiler])
  6787. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  6788. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6789. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6790. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6791. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6792. if test -n "$compiler"; then
  6793. _LT_COMPILER_NO_RTTI($1)
  6794. _LT_COMPILER_PIC($1)
  6795. _LT_COMPILER_C_O($1)
  6796. _LT_COMPILER_FILE_LOCKS($1)
  6797. _LT_LINKER_SHLIBS($1)
  6798. _LT_LINKER_HARDCODE_LIBPATH($1)
  6799. _LT_CONFIG($1)
  6800. fi
  6801. AC_LANG_RESTORE
  6802. GCC=$lt_save_GCC
  6803. CC=$lt_save_CC
  6804. CFLAGS=$lt_save_CFLAGS
  6805. ])# _LT_LANG_GCJ_CONFIG
  6806. # _LT_LANG_GO_CONFIG([TAG])
  6807. # --------------------------
  6808. # Ensure that the configuration variables for the GNU Go compiler
  6809. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6810. # to write the compiler configuration to `libtool'.
  6811. m4_defun([_LT_LANG_GO_CONFIG],
  6812. [AC_REQUIRE([LT_PROG_GO])dnl
  6813. AC_LANG_SAVE
  6814. # Source file extension for Go test sources.
  6815. ac_ext=go
  6816. # Object file extension for compiled Go test sources.
  6817. objext=o
  6818. _LT_TAGVAR(objext, $1)=$objext
  6819. # Code to be used in simple compile tests
  6820. lt_simple_compile_test_code="package main; func main() { }"
  6821. # Code to be used in simple link tests
  6822. lt_simple_link_test_code='package main; func main() { }'
  6823. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6824. _LT_TAG_COMPILER
  6825. # save warnings/boilerplate of simple test code
  6826. _LT_COMPILER_BOILERPLATE
  6827. _LT_LINKER_BOILERPLATE
  6828. # Allow CC to be a program name with arguments.
  6829. lt_save_CC=$CC
  6830. lt_save_CFLAGS=$CFLAGS
  6831. lt_save_GCC=$GCC
  6832. GCC=yes
  6833. CC=${GOC-"gccgo"}
  6834. CFLAGS=$GOFLAGS
  6835. compiler=$CC
  6836. _LT_TAGVAR(compiler, $1)=$CC
  6837. _LT_TAGVAR(LD, $1)="$LD"
  6838. _LT_CC_BASENAME([$compiler])
  6839. # Go did not exist at the time GCC didn't implicitly link libc in.
  6840. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6841. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6842. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6843. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6844. if test -n "$compiler"; then
  6845. _LT_COMPILER_NO_RTTI($1)
  6846. _LT_COMPILER_PIC($1)
  6847. _LT_COMPILER_C_O($1)
  6848. _LT_COMPILER_FILE_LOCKS($1)
  6849. _LT_LINKER_SHLIBS($1)
  6850. _LT_LINKER_HARDCODE_LIBPATH($1)
  6851. _LT_CONFIG($1)
  6852. fi
  6853. AC_LANG_RESTORE
  6854. GCC=$lt_save_GCC
  6855. CC=$lt_save_CC
  6856. CFLAGS=$lt_save_CFLAGS
  6857. ])# _LT_LANG_GO_CONFIG
  6858. # _LT_LANG_RC_CONFIG([TAG])
  6859. # -------------------------
  6860. # Ensure that the configuration variables for the Windows resource compiler
  6861. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6862. # to write the compiler configuration to `libtool'.
  6863. m4_defun([_LT_LANG_RC_CONFIG],
  6864. [AC_REQUIRE([LT_PROG_RC])dnl
  6865. AC_LANG_SAVE
  6866. # Source file extension for RC test sources.
  6867. ac_ext=rc
  6868. # Object file extension for compiled RC test sources.
  6869. objext=o
  6870. _LT_TAGVAR(objext, $1)=$objext
  6871. # Code to be used in simple compile tests
  6872. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  6873. # Code to be used in simple link tests
  6874. lt_simple_link_test_code="$lt_simple_compile_test_code"
  6875. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6876. _LT_TAG_COMPILER
  6877. # save warnings/boilerplate of simple test code
  6878. _LT_COMPILER_BOILERPLATE
  6879. _LT_LINKER_BOILERPLATE
  6880. # Allow CC to be a program name with arguments.
  6881. lt_save_CC="$CC"
  6882. lt_save_CFLAGS=$CFLAGS
  6883. lt_save_GCC=$GCC
  6884. GCC=
  6885. CC=${RC-"windres"}
  6886. CFLAGS=
  6887. compiler=$CC
  6888. _LT_TAGVAR(compiler, $1)=$CC
  6889. _LT_CC_BASENAME([$compiler])
  6890. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  6891. if test -n "$compiler"; then
  6892. :
  6893. _LT_CONFIG($1)
  6894. fi
  6895. GCC=$lt_save_GCC
  6896. AC_LANG_RESTORE
  6897. CC=$lt_save_CC
  6898. CFLAGS=$lt_save_CFLAGS
  6899. ])# _LT_LANG_RC_CONFIG
  6900. # LT_PROG_GCJ
  6901. # -----------
  6902. AC_DEFUN([LT_PROG_GCJ],
  6903. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  6904. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  6905. [AC_CHECK_TOOL(GCJ, gcj,)
  6906. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  6907. AC_SUBST(GCJFLAGS)])])[]dnl
  6908. ])
  6909. # Old name:
  6910. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  6911. dnl aclocal-1.4 backwards compatibility:
  6912. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  6913. # LT_PROG_GO
  6914. # ----------
  6915. AC_DEFUN([LT_PROG_GO],
  6916. [AC_CHECK_TOOL(GOC, gccgo,)
  6917. ])
  6918. # LT_PROG_RC
  6919. # ----------
  6920. AC_DEFUN([LT_PROG_RC],
  6921. [AC_CHECK_TOOL(RC, windres,)
  6922. ])
  6923. # Old name:
  6924. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  6925. dnl aclocal-1.4 backwards compatibility:
  6926. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  6927. # _LT_DECL_EGREP
  6928. # --------------
  6929. # If we don't have a new enough Autoconf to choose the best grep
  6930. # available, choose the one first in the user's PATH.
  6931. m4_defun([_LT_DECL_EGREP],
  6932. [AC_REQUIRE([AC_PROG_EGREP])dnl
  6933. AC_REQUIRE([AC_PROG_FGREP])dnl
  6934. test -z "$GREP" && GREP=grep
  6935. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  6936. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  6937. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  6938. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  6939. AC_SUBST([GREP])
  6940. ])
  6941. # _LT_DECL_OBJDUMP
  6942. # --------------
  6943. # If we don't have a new enough Autoconf to choose the best objdump
  6944. # available, choose the one first in the user's PATH.
  6945. m4_defun([_LT_DECL_OBJDUMP],
  6946. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  6947. test -z "$OBJDUMP" && OBJDUMP=objdump
  6948. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  6949. AC_SUBST([OBJDUMP])
  6950. ])
  6951. # _LT_DECL_DLLTOOL
  6952. # ----------------
  6953. # Ensure DLLTOOL variable is set.
  6954. m4_defun([_LT_DECL_DLLTOOL],
  6955. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  6956. test -z "$DLLTOOL" && DLLTOOL=dlltool
  6957. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  6958. AC_SUBST([DLLTOOL])
  6959. ])
  6960. # _LT_DECL_SED
  6961. # ------------
  6962. # Check for a fully-functional sed program, that truncates
  6963. # as few characters as possible. Prefer GNU sed if found.
  6964. m4_defun([_LT_DECL_SED],
  6965. [AC_PROG_SED
  6966. test -z "$SED" && SED=sed
  6967. Xsed="$SED -e 1s/^X//"
  6968. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  6969. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  6970. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  6971. ])# _LT_DECL_SED
  6972. m4_ifndef([AC_PROG_SED], [
  6973. # NOTE: This macro has been submitted for inclusion into #
  6974. # GNU Autoconf as AC_PROG_SED. When it is available in #
  6975. # a released version of Autoconf we should remove this #
  6976. # macro and use it instead. #
  6977. m4_defun([AC_PROG_SED],
  6978. [AC_MSG_CHECKING([for a sed that does not truncate output])
  6979. AC_CACHE_VAL(lt_cv_path_SED,
  6980. [# Loop through the user's path and test for sed and gsed.
  6981. # Then use that list of sed's as ones to test for truncation.
  6982. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6983. for as_dir in $PATH
  6984. do
  6985. IFS=$as_save_IFS
  6986. test -z "$as_dir" && as_dir=.
  6987. for lt_ac_prog in sed gsed; do
  6988. for ac_exec_ext in '' $ac_executable_extensions; do
  6989. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  6990. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  6991. fi
  6992. done
  6993. done
  6994. done
  6995. IFS=$as_save_IFS
  6996. lt_ac_max=0
  6997. lt_ac_count=0
  6998. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  6999. # along with /bin/sed that truncates output.
  7000. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7001. test ! -f $lt_ac_sed && continue
  7002. cat /dev/null > conftest.in
  7003. lt_ac_count=0
  7004. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7005. # Check for GNU sed and select it if it is found.
  7006. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7007. lt_cv_path_SED=$lt_ac_sed
  7008. break
  7009. fi
  7010. while true; do
  7011. cat conftest.in conftest.in >conftest.tmp
  7012. mv conftest.tmp conftest.in
  7013. cp conftest.in conftest.nl
  7014. echo >>conftest.nl
  7015. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7016. cmp -s conftest.out conftest.nl || break
  7017. # 10000 chars as input seems more than enough
  7018. test $lt_ac_count -gt 10 && break
  7019. lt_ac_count=`expr $lt_ac_count + 1`
  7020. if test $lt_ac_count -gt $lt_ac_max; then
  7021. lt_ac_max=$lt_ac_count
  7022. lt_cv_path_SED=$lt_ac_sed
  7023. fi
  7024. done
  7025. done
  7026. ])
  7027. SED=$lt_cv_path_SED
  7028. AC_SUBST([SED])
  7029. AC_MSG_RESULT([$SED])
  7030. ])#AC_PROG_SED
  7031. ])#m4_ifndef
  7032. # Old name:
  7033. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7034. dnl aclocal-1.4 backwards compatibility:
  7035. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7036. # _LT_CHECK_SHELL_FEATURES
  7037. # ------------------------
  7038. # Find out whether the shell is Bourne or XSI compatible,
  7039. # or has some other useful features.
  7040. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7041. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  7042. # Try some XSI features
  7043. xsi_shell=no
  7044. ( _lt_dummy="a/b/c"
  7045. test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
  7046. = c,a/b,b/c, \
  7047. && eval 'test $(( 1 + 1 )) -eq 2 \
  7048. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  7049. && xsi_shell=yes
  7050. AC_MSG_RESULT([$xsi_shell])
  7051. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  7052. AC_MSG_CHECKING([whether the shell understands "+="])
  7053. lt_shell_append=no
  7054. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  7055. >/dev/null 2>&1 \
  7056. && lt_shell_append=yes
  7057. AC_MSG_RESULT([$lt_shell_append])
  7058. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  7059. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7060. lt_unset=unset
  7061. else
  7062. lt_unset=false
  7063. fi
  7064. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7065. # test EBCDIC or ASCII
  7066. case `echo X|tr X '\101'` in
  7067. A) # ASCII based system
  7068. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7069. lt_SP2NL='tr \040 \012'
  7070. lt_NL2SP='tr \015\012 \040\040'
  7071. ;;
  7072. *) # EBCDIC based system
  7073. lt_SP2NL='tr \100 \n'
  7074. lt_NL2SP='tr \r\n \100\100'
  7075. ;;
  7076. esac
  7077. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7078. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7079. ])# _LT_CHECK_SHELL_FEATURES
  7080. # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
  7081. # ------------------------------------------------------
  7082. # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
  7083. # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
  7084. m4_defun([_LT_PROG_FUNCTION_REPLACE],
  7085. [dnl {
  7086. sed -e '/^$1 ()$/,/^} # $1 /c\
  7087. $1 ()\
  7088. {\
  7089. m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
  7090. } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
  7091. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7092. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7093. test 0 -eq $? || _lt_function_replace_fail=:
  7094. ])
  7095. # _LT_PROG_REPLACE_SHELLFNS
  7096. # -------------------------
  7097. # Replace existing portable implementations of several shell functions with
  7098. # equivalent extended shell implementations where those features are available..
  7099. m4_defun([_LT_PROG_REPLACE_SHELLFNS],
  7100. [if test x"$xsi_shell" = xyes; then
  7101. _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
  7102. case ${1} in
  7103. */*) func_dirname_result="${1%/*}${2}" ;;
  7104. * ) func_dirname_result="${3}" ;;
  7105. esac])
  7106. _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
  7107. func_basename_result="${1##*/}"])
  7108. _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
  7109. case ${1} in
  7110. */*) func_dirname_result="${1%/*}${2}" ;;
  7111. * ) func_dirname_result="${3}" ;;
  7112. esac
  7113. func_basename_result="${1##*/}"])
  7114. _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
  7115. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  7116. # positional parameters, so assign one to ordinary parameter first.
  7117. func_stripname_result=${3}
  7118. func_stripname_result=${func_stripname_result#"${1}"}
  7119. func_stripname_result=${func_stripname_result%"${2}"}])
  7120. _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
  7121. func_split_long_opt_name=${1%%=*}
  7122. func_split_long_opt_arg=${1#*=}])
  7123. _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
  7124. func_split_short_opt_arg=${1#??}
  7125. func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
  7126. _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
  7127. case ${1} in
  7128. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  7129. *) func_lo2o_result=${1} ;;
  7130. esac])
  7131. _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
  7132. _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
  7133. _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
  7134. fi
  7135. if test x"$lt_shell_append" = xyes; then
  7136. _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
  7137. _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
  7138. func_quote_for_eval "${2}"
  7139. dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
  7140. eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
  7141. # Save a `func_append' function call where possible by direct use of '+='
  7142. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
  7143. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7144. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7145. test 0 -eq $? || _lt_function_replace_fail=:
  7146. else
  7147. # Save a `func_append' function call even when '+=' is not available
  7148. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
  7149. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7150. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7151. test 0 -eq $? || _lt_function_replace_fail=:
  7152. fi
  7153. if test x"$_lt_function_replace_fail" = x":"; then
  7154. AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
  7155. fi
  7156. ])
  7157. # _LT_PATH_CONVERSION_FUNCTIONS
  7158. # -----------------------------
  7159. # Determine which file name conversion functions should be used by
  7160. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7161. # for certain cross-compile configurations and native mingw.
  7162. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7163. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7164. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7165. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7166. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7167. [case $host in
  7168. *-*-mingw* )
  7169. case $build in
  7170. *-*-mingw* ) # actually msys
  7171. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7172. ;;
  7173. *-*-cygwin* )
  7174. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7175. ;;
  7176. * ) # otherwise, assume *nix
  7177. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7178. ;;
  7179. esac
  7180. ;;
  7181. *-*-cygwin* )
  7182. case $build in
  7183. *-*-mingw* ) # actually msys
  7184. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7185. ;;
  7186. *-*-cygwin* )
  7187. lt_cv_to_host_file_cmd=func_convert_file_noop
  7188. ;;
  7189. * ) # otherwise, assume *nix
  7190. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7191. ;;
  7192. esac
  7193. ;;
  7194. * ) # unhandled hosts (and "normal" native builds)
  7195. lt_cv_to_host_file_cmd=func_convert_file_noop
  7196. ;;
  7197. esac
  7198. ])
  7199. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7200. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7201. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7202. [0], [convert $build file names to $host format])dnl
  7203. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7204. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7205. [#assume ordinary cross tools, or native build.
  7206. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7207. case $host in
  7208. *-*-mingw* )
  7209. case $build in
  7210. *-*-mingw* ) # actually msys
  7211. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7212. ;;
  7213. esac
  7214. ;;
  7215. esac
  7216. ])
  7217. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7218. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7219. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7220. [0], [convert $build files to toolchain format])dnl
  7221. ])# _LT_PATH_CONVERSION_FUNCTIONS
  7222. # Helper functions for option handling. -*- Autoconf -*-
  7223. #
  7224. # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
  7225. # Inc.
  7226. # Written by Gary V. Vaughan, 2004
  7227. #
  7228. # This file is free software; the Free Software Foundation gives
  7229. # unlimited permission to copy and/or distribute it, with or without
  7230. # modifications, as long as this notice is preserved.
  7231. # serial 7 ltoptions.m4
  7232. # This is to help aclocal find these macros, as it can't see m4_define.
  7233. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  7234. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  7235. # ------------------------------------------
  7236. m4_define([_LT_MANGLE_OPTION],
  7237. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  7238. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  7239. # ---------------------------------------
  7240. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  7241. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  7242. # saved as a flag.
  7243. m4_define([_LT_SET_OPTION],
  7244. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  7245. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  7246. _LT_MANGLE_DEFUN([$1], [$2]),
  7247. [m4_warning([Unknown $1 option `$2'])])[]dnl
  7248. ])
  7249. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  7250. # ------------------------------------------------------------
  7251. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  7252. m4_define([_LT_IF_OPTION],
  7253. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  7254. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  7255. # -------------------------------------------------------
  7256. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  7257. # are set.
  7258. m4_define([_LT_UNLESS_OPTIONS],
  7259. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7260. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  7261. [m4_define([$0_found])])])[]dnl
  7262. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  7263. ])[]dnl
  7264. ])
  7265. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  7266. # ----------------------------------------
  7267. # OPTION-LIST is a space-separated list of Libtool options associated
  7268. # with MACRO-NAME. If any OPTION has a matching handler declared with
  7269. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  7270. # the unknown option and exit.
  7271. m4_defun([_LT_SET_OPTIONS],
  7272. [# Set options
  7273. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7274. [_LT_SET_OPTION([$1], _LT_Option)])
  7275. m4_if([$1],[LT_INIT],[
  7276. dnl
  7277. dnl Simply set some default values (i.e off) if boolean options were not
  7278. dnl specified:
  7279. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  7280. ])
  7281. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  7282. ])
  7283. dnl
  7284. dnl If no reference was made to various pairs of opposing options, then
  7285. dnl we run the default mode handler for the pair. For example, if neither
  7286. dnl `shared' nor `disable-shared' was passed, we enable building of shared
  7287. dnl archives by default:
  7288. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  7289. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  7290. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  7291. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  7292. [_LT_ENABLE_FAST_INSTALL])
  7293. ])
  7294. ])# _LT_SET_OPTIONS
  7295. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  7296. # -----------------------------------------
  7297. m4_define([_LT_MANGLE_DEFUN],
  7298. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  7299. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  7300. # -----------------------------------------------
  7301. m4_define([LT_OPTION_DEFINE],
  7302. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  7303. ])# LT_OPTION_DEFINE
  7304. # dlopen
  7305. # ------
  7306. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  7307. ])
  7308. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  7309. [_LT_SET_OPTION([LT_INIT], [dlopen])
  7310. AC_DIAGNOSE([obsolete],
  7311. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7312. put the `dlopen' option into LT_INIT's first parameter.])
  7313. ])
  7314. dnl aclocal-1.4 backwards compatibility:
  7315. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  7316. # win32-dll
  7317. # ---------
  7318. # Declare package support for building win32 dll's.
  7319. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  7320. [enable_win32_dll=yes
  7321. case $host in
  7322. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  7323. AC_CHECK_TOOL(AS, as, false)
  7324. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7325. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7326. ;;
  7327. esac
  7328. test -z "$AS" && AS=as
  7329. _LT_DECL([], [AS], [1], [Assembler program])dnl
  7330. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7331. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  7332. test -z "$OBJDUMP" && OBJDUMP=objdump
  7333. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  7334. ])# win32-dll
  7335. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  7336. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7337. _LT_SET_OPTION([LT_INIT], [win32-dll])
  7338. AC_DIAGNOSE([obsolete],
  7339. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7340. put the `win32-dll' option into LT_INIT's first parameter.])
  7341. ])
  7342. dnl aclocal-1.4 backwards compatibility:
  7343. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  7344. # _LT_ENABLE_SHARED([DEFAULT])
  7345. # ----------------------------
  7346. # implement the --enable-shared flag, and supports the `shared' and
  7347. # `disable-shared' LT_INIT options.
  7348. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7349. m4_define([_LT_ENABLE_SHARED],
  7350. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7351. AC_ARG_ENABLE([shared],
  7352. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  7353. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  7354. [p=${PACKAGE-default}
  7355. case $enableval in
  7356. yes) enable_shared=yes ;;
  7357. no) enable_shared=no ;;
  7358. *)
  7359. enable_shared=no
  7360. # Look at the argument we got. We use all the common list separators.
  7361. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7362. for pkg in $enableval; do
  7363. IFS="$lt_save_ifs"
  7364. if test "X$pkg" = "X$p"; then
  7365. enable_shared=yes
  7366. fi
  7367. done
  7368. IFS="$lt_save_ifs"
  7369. ;;
  7370. esac],
  7371. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  7372. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  7373. [Whether or not to build shared libraries])
  7374. ])# _LT_ENABLE_SHARED
  7375. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  7376. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  7377. # Old names:
  7378. AC_DEFUN([AC_ENABLE_SHARED],
  7379. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  7380. ])
  7381. AC_DEFUN([AC_DISABLE_SHARED],
  7382. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  7383. ])
  7384. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  7385. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  7386. dnl aclocal-1.4 backwards compatibility:
  7387. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  7388. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  7389. # _LT_ENABLE_STATIC([DEFAULT])
  7390. # ----------------------------
  7391. # implement the --enable-static flag, and support the `static' and
  7392. # `disable-static' LT_INIT options.
  7393. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7394. m4_define([_LT_ENABLE_STATIC],
  7395. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7396. AC_ARG_ENABLE([static],
  7397. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  7398. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  7399. [p=${PACKAGE-default}
  7400. case $enableval in
  7401. yes) enable_static=yes ;;
  7402. no) enable_static=no ;;
  7403. *)
  7404. enable_static=no
  7405. # Look at the argument we got. We use all the common list separators.
  7406. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7407. for pkg in $enableval; do
  7408. IFS="$lt_save_ifs"
  7409. if test "X$pkg" = "X$p"; then
  7410. enable_static=yes
  7411. fi
  7412. done
  7413. IFS="$lt_save_ifs"
  7414. ;;
  7415. esac],
  7416. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  7417. _LT_DECL([build_old_libs], [enable_static], [0],
  7418. [Whether or not to build static libraries])
  7419. ])# _LT_ENABLE_STATIC
  7420. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  7421. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  7422. # Old names:
  7423. AC_DEFUN([AC_ENABLE_STATIC],
  7424. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  7425. ])
  7426. AC_DEFUN([AC_DISABLE_STATIC],
  7427. [_LT_SET_OPTION([LT_INIT], [disable-static])
  7428. ])
  7429. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  7430. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  7431. dnl aclocal-1.4 backwards compatibility:
  7432. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  7433. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  7434. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  7435. # ----------------------------------
  7436. # implement the --enable-fast-install flag, and support the `fast-install'
  7437. # and `disable-fast-install' LT_INIT options.
  7438. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7439. m4_define([_LT_ENABLE_FAST_INSTALL],
  7440. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7441. AC_ARG_ENABLE([fast-install],
  7442. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  7443. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  7444. [p=${PACKAGE-default}
  7445. case $enableval in
  7446. yes) enable_fast_install=yes ;;
  7447. no) enable_fast_install=no ;;
  7448. *)
  7449. enable_fast_install=no
  7450. # Look at the argument we got. We use all the common list separators.
  7451. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7452. for pkg in $enableval; do
  7453. IFS="$lt_save_ifs"
  7454. if test "X$pkg" = "X$p"; then
  7455. enable_fast_install=yes
  7456. fi
  7457. done
  7458. IFS="$lt_save_ifs"
  7459. ;;
  7460. esac],
  7461. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  7462. _LT_DECL([fast_install], [enable_fast_install], [0],
  7463. [Whether or not to optimize for fast installation])dnl
  7464. ])# _LT_ENABLE_FAST_INSTALL
  7465. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  7466. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  7467. # Old names:
  7468. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  7469. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  7470. AC_DIAGNOSE([obsolete],
  7471. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7472. the `fast-install' option into LT_INIT's first parameter.])
  7473. ])
  7474. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  7475. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  7476. AC_DIAGNOSE([obsolete],
  7477. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7478. the `disable-fast-install' option into LT_INIT's first parameter.])
  7479. ])
  7480. dnl aclocal-1.4 backwards compatibility:
  7481. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  7482. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  7483. # _LT_WITH_PIC([MODE])
  7484. # --------------------
  7485. # implement the --with-pic flag, and support the `pic-only' and `no-pic'
  7486. # LT_INIT options.
  7487. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  7488. m4_define([_LT_WITH_PIC],
  7489. [AC_ARG_WITH([pic],
  7490. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  7491. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  7492. [lt_p=${PACKAGE-default}
  7493. case $withval in
  7494. yes|no) pic_mode=$withval ;;
  7495. *)
  7496. pic_mode=default
  7497. # Look at the argument we got. We use all the common list separators.
  7498. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7499. for lt_pkg in $withval; do
  7500. IFS="$lt_save_ifs"
  7501. if test "X$lt_pkg" = "X$lt_p"; then
  7502. pic_mode=yes
  7503. fi
  7504. done
  7505. IFS="$lt_save_ifs"
  7506. ;;
  7507. esac],
  7508. [pic_mode=default])
  7509. test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
  7510. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  7511. ])# _LT_WITH_PIC
  7512. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  7513. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  7514. # Old name:
  7515. AU_DEFUN([AC_LIBTOOL_PICMODE],
  7516. [_LT_SET_OPTION([LT_INIT], [pic-only])
  7517. AC_DIAGNOSE([obsolete],
  7518. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7519. put the `pic-only' option into LT_INIT's first parameter.])
  7520. ])
  7521. dnl aclocal-1.4 backwards compatibility:
  7522. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  7523. m4_define([_LTDL_MODE], [])
  7524. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  7525. [m4_define([_LTDL_MODE], [nonrecursive])])
  7526. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  7527. [m4_define([_LTDL_MODE], [recursive])])
  7528. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  7529. [m4_define([_LTDL_MODE], [subproject])])
  7530. m4_define([_LTDL_TYPE], [])
  7531. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  7532. [m4_define([_LTDL_TYPE], [installable])])
  7533. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  7534. [m4_define([_LTDL_TYPE], [convenience])])
  7535. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  7536. #
  7537. # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
  7538. # Written by Gary V. Vaughan, 2004
  7539. #
  7540. # This file is free software; the Free Software Foundation gives
  7541. # unlimited permission to copy and/or distribute it, with or without
  7542. # modifications, as long as this notice is preserved.
  7543. # serial 6 ltsugar.m4
  7544. # This is to help aclocal find these macros, as it can't see m4_define.
  7545. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  7546. # lt_join(SEP, ARG1, [ARG2...])
  7547. # -----------------------------
  7548. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  7549. # associated separator.
  7550. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  7551. # versions in m4sugar had bugs.
  7552. m4_define([lt_join],
  7553. [m4_if([$#], [1], [],
  7554. [$#], [2], [[$2]],
  7555. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  7556. m4_define([_lt_join],
  7557. [m4_if([$#$2], [2], [],
  7558. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  7559. # lt_car(LIST)
  7560. # lt_cdr(LIST)
  7561. # ------------
  7562. # Manipulate m4 lists.
  7563. # These macros are necessary as long as will still need to support
  7564. # Autoconf-2.59 which quotes differently.
  7565. m4_define([lt_car], [[$1]])
  7566. m4_define([lt_cdr],
  7567. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  7568. [$#], 1, [],
  7569. [m4_dquote(m4_shift($@))])])
  7570. m4_define([lt_unquote], $1)
  7571. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  7572. # ------------------------------------------
  7573. # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
  7574. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  7575. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  7576. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  7577. # than defined and empty).
  7578. #
  7579. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  7580. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  7581. m4_define([lt_append],
  7582. [m4_define([$1],
  7583. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  7584. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  7585. # ----------------------------------------------------------
  7586. # Produce a SEP delimited list of all paired combinations of elements of
  7587. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  7588. # has the form PREFIXmINFIXSUFFIXn.
  7589. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  7590. m4_define([lt_combine],
  7591. [m4_if(m4_eval([$# > 3]), [1],
  7592. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  7593. [[m4_foreach([_Lt_prefix], [$2],
  7594. [m4_foreach([_Lt_suffix],
  7595. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  7596. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  7597. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  7598. # -----------------------------------------------------------------------
  7599. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  7600. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  7601. m4_define([lt_if_append_uniq],
  7602. [m4_ifdef([$1],
  7603. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  7604. [lt_append([$1], [$2], [$3])$4],
  7605. [$5])],
  7606. [lt_append([$1], [$2], [$3])$4])])
  7607. # lt_dict_add(DICT, KEY, VALUE)
  7608. # -----------------------------
  7609. m4_define([lt_dict_add],
  7610. [m4_define([$1($2)], [$3])])
  7611. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  7612. # --------------------------------------------
  7613. m4_define([lt_dict_add_subkey],
  7614. [m4_define([$1($2:$3)], [$4])])
  7615. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  7616. # ----------------------------------
  7617. m4_define([lt_dict_fetch],
  7618. [m4_ifval([$3],
  7619. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  7620. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  7621. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  7622. # -----------------------------------------------------------------
  7623. m4_define([lt_if_dict_fetch],
  7624. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  7625. [$5],
  7626. [$6])])
  7627. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  7628. # --------------------------------------------------------------
  7629. m4_define([lt_dict_filter],
  7630. [m4_if([$5], [], [],
  7631. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  7632. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  7633. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  7634. ])
  7635. # ltversion.m4 -- version numbers -*- Autoconf -*-
  7636. #
  7637. # Copyright (C) 2004 Free Software Foundation, Inc.
  7638. # Written by Scott James Remnant, 2004
  7639. #
  7640. # This file is free software; the Free Software Foundation gives
  7641. # unlimited permission to copy and/or distribute it, with or without
  7642. # modifications, as long as this notice is preserved.
  7643. # @configure_input@
  7644. # serial 3337 ltversion.m4
  7645. # This file is part of GNU Libtool
  7646. m4_define([LT_PACKAGE_VERSION], [2.4.2])
  7647. m4_define([LT_PACKAGE_REVISION], [1.3337])
  7648. AC_DEFUN([LTVERSION_VERSION],
  7649. [macro_version='2.4.2'
  7650. macro_revision='1.3337'
  7651. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  7652. _LT_DECL(, macro_revision, 0)
  7653. ])
  7654. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  7655. #
  7656. # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
  7657. # Written by Scott James Remnant, 2004.
  7658. #
  7659. # This file is free software; the Free Software Foundation gives
  7660. # unlimited permission to copy and/or distribute it, with or without
  7661. # modifications, as long as this notice is preserved.
  7662. # serial 5 lt~obsolete.m4
  7663. # These exist entirely to fool aclocal when bootstrapping libtool.
  7664. #
  7665. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
  7666. # which have later been changed to m4_define as they aren't part of the
  7667. # exported API, or moved to Autoconf or Automake where they belong.
  7668. #
  7669. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  7670. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  7671. # using a macro with the same name in our local m4/libtool.m4 it'll
  7672. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  7673. # and doesn't know about Autoconf macros at all.)
  7674. #
  7675. # So we provide this file, which has a silly filename so it's always
  7676. # included after everything else. This provides aclocal with the
  7677. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  7678. # because those macros already exist, or will be overwritten later.
  7679. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  7680. #
  7681. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  7682. # Yes, that means every name once taken will need to remain here until
  7683. # we give up compatibility with versions before 1.7, at which point
  7684. # we need to keep only those names which we still refer to.
  7685. # This is to help aclocal find these macros, as it can't see m4_define.
  7686. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  7687. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  7688. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  7689. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  7690. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  7691. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  7692. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  7693. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  7694. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  7695. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  7696. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  7697. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  7698. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  7699. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  7700. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  7701. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  7702. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  7703. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  7704. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  7705. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  7706. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  7707. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  7708. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  7709. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  7710. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  7711. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  7712. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  7713. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  7714. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  7715. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  7716. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  7717. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  7718. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  7719. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  7720. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  7721. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  7722. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  7723. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  7724. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  7725. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  7726. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  7727. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  7728. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  7729. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  7730. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  7731. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  7732. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  7733. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  7734. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  7735. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  7736. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  7737. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  7738. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  7739. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  7740. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  7741. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  7742. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  7743. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  7744. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  7745. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  7746. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  7747. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
  7748. # Copyright (C) 2002-2013 Free Software Foundation, Inc.
  7749. #
  7750. # This file is free software; the Free Software Foundation
  7751. # gives unlimited permission to copy and/or distribute it,
  7752. # with or without modifications, as long as this notice is preserved.
  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.14'
  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.14.1], [],
  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.14.1])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-2013 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  7787. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  7788. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  7789. #
  7790. # Of course, Automake must honor this variable whenever it calls a
  7791. # tool from the auxiliary directory. The problem is that $srcdir (and
  7792. # therefore $ac_aux_dir as well) can be either absolute or relative,
  7793. # depending on how configure is run. This is pretty annoying, since
  7794. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  7795. # source directory, any form will work fine, but in subdirectories a
  7796. # relative path needs to be adjusted first.
  7797. #
  7798. # $ac_aux_dir/missing
  7799. # fails when called from a subdirectory if $ac_aux_dir is relative
  7800. # $top_srcdir/$ac_aux_dir/missing
  7801. # fails if $ac_aux_dir is absolute,
  7802. # fails when called from a subdirectory in a VPATH build with
  7803. # a relative $ac_aux_dir
  7804. #
  7805. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  7806. # are both prefixed by $srcdir. In an in-source build this is usually
  7807. # harmless because $srcdir is '.', but things will broke when you
  7808. # start a VPATH build or use an absolute $srcdir.
  7809. #
  7810. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  7811. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  7812. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  7813. # and then we would define $MISSING as
  7814. # MISSING="\${SHELL} $am_aux_dir/missing"
  7815. # This will work as long as MISSING is not called from configure, because
  7816. # unfortunately $(top_srcdir) has no meaning in configure.
  7817. # However there are other variables, like CC, which are often used in
  7818. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  7819. #
  7820. # Another solution, used here, is to always expand $ac_aux_dir to an
  7821. # absolute PATH. The drawback is that using absolute paths prevent a
  7822. # configured tree to be moved without reconfiguration.
  7823. AC_DEFUN([AM_AUX_DIR_EXPAND],
  7824. [dnl Rely on autoconf to set up CDPATH properly.
  7825. AC_PREREQ([2.50])dnl
  7826. # expand $ac_aux_dir to an absolute path
  7827. am_aux_dir=`cd $ac_aux_dir && pwd`
  7828. ])
  7829. # AM_CONDITIONAL -*- Autoconf -*-
  7830. # Copyright (C) 1997-2013 Free Software Foundation, Inc.
  7831. #
  7832. # This file is free software; the Free Software Foundation
  7833. # gives unlimited permission to copy and/or distribute it,
  7834. # with or without modifications, as long as this notice is preserved.
  7835. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  7836. # -------------------------------------
  7837. # Define a conditional.
  7838. AC_DEFUN([AM_CONDITIONAL],
  7839. [AC_PREREQ([2.52])dnl
  7840. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  7841. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  7842. AC_SUBST([$1_TRUE])dnl
  7843. AC_SUBST([$1_FALSE])dnl
  7844. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  7845. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  7846. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  7847. if $2; then
  7848. $1_TRUE=
  7849. $1_FALSE='#'
  7850. else
  7851. $1_TRUE='#'
  7852. $1_FALSE=
  7853. fi
  7854. AC_CONFIG_COMMANDS_PRE(
  7855. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  7856. AC_MSG_ERROR([[conditional "$1" was never defined.
  7857. Usually this means the macro was only invoked conditionally.]])
  7858. fi])])
  7859. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  7860. #
  7861. # This file is free software; the Free Software Foundation
  7862. # gives unlimited permission to copy and/or distribute it,
  7863. # with or without modifications, as long as this notice is preserved.
  7864. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  7865. # written in clear, in which case automake, when reading aclocal.m4,
  7866. # will think it sees a *use*, and therefore will trigger all it's
  7867. # C support machinery. Also note that it means that autoscan, seeing
  7868. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  7869. # _AM_DEPENDENCIES(NAME)
  7870. # ----------------------
  7871. # See how the compiler implements dependency checking.
  7872. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  7873. # We try a few techniques and use that to set a single cache variable.
  7874. #
  7875. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  7876. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  7877. # dependency, and given that the user is not expected to run this macro,
  7878. # just rely on AC_PROG_CC.
  7879. AC_DEFUN([_AM_DEPENDENCIES],
  7880. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  7881. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  7882. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  7883. AC_REQUIRE([AM_DEP_TRACK])dnl
  7884. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  7885. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  7886. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  7887. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  7888. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  7889. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  7890. [depcc="$$1" am_compiler_list=])
  7891. AC_CACHE_CHECK([dependency style of $depcc],
  7892. [am_cv_$1_dependencies_compiler_type],
  7893. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  7894. # We make a subdir and do the tests there. Otherwise we can end up
  7895. # making bogus files that we don't know about and never remove. For
  7896. # instance it was reported that on HP-UX the gcc test will end up
  7897. # making a dummy file named 'D' -- because '-MD' means "put the output
  7898. # in D".
  7899. rm -rf conftest.dir
  7900. mkdir conftest.dir
  7901. # Copy depcomp to subdir because otherwise we won't find it if we're
  7902. # using a relative directory.
  7903. cp "$am_depcomp" conftest.dir
  7904. cd conftest.dir
  7905. # We will build objects and dependencies in a subdirectory because
  7906. # it helps to detect inapplicable dependency modes. For instance
  7907. # both Tru64's cc and ICC support -MD to output dependencies as a
  7908. # side effect of compilation, but ICC will put the dependencies in
  7909. # the current directory while Tru64 will put them in the object
  7910. # directory.
  7911. mkdir sub
  7912. am_cv_$1_dependencies_compiler_type=none
  7913. if test "$am_compiler_list" = ""; then
  7914. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  7915. fi
  7916. am__universal=false
  7917. m4_case([$1], [CC],
  7918. [case " $depcc " in #(
  7919. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  7920. esac],
  7921. [CXX],
  7922. [case " $depcc " in #(
  7923. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  7924. esac])
  7925. for depmode in $am_compiler_list; do
  7926. # Setup a source with many dependencies, because some compilers
  7927. # like to wrap large dependency lists on column 80 (with \), and
  7928. # we should not choose a depcomp mode which is confused by this.
  7929. #
  7930. # We need to recreate these files for each test, as the compiler may
  7931. # overwrite some of them when testing with obscure command lines.
  7932. # This happens at least with the AIX C compiler.
  7933. : > sub/conftest.c
  7934. for i in 1 2 3 4 5 6; do
  7935. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  7936. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  7937. # Solaris 10 /bin/sh.
  7938. echo '/* dummy */' > sub/conftst$i.h
  7939. done
  7940. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  7941. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  7942. # mode. It turns out that the SunPro C++ compiler does not properly
  7943. # handle '-M -o', and we need to detect this. Also, some Intel
  7944. # versions had trouble with output in subdirs.
  7945. am__obj=sub/conftest.${OBJEXT-o}
  7946. am__minus_obj="-o $am__obj"
  7947. case $depmode in
  7948. gcc)
  7949. # This depmode causes a compiler race in universal mode.
  7950. test "$am__universal" = false || continue
  7951. ;;
  7952. nosideeffect)
  7953. # After this tag, mechanisms are not by side-effect, so they'll
  7954. # only be used when explicitly requested.
  7955. if test "x$enable_dependency_tracking" = xyes; then
  7956. continue
  7957. else
  7958. break
  7959. fi
  7960. ;;
  7961. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  7962. # This compiler won't grok '-c -o', but also, the minuso test has
  7963. # not run yet. These depmodes are late enough in the game, and
  7964. # so weak that their functioning should not be impacted.
  7965. am__obj=conftest.${OBJEXT-o}
  7966. am__minus_obj=
  7967. ;;
  7968. none) break ;;
  7969. esac
  7970. if depmode=$depmode \
  7971. source=sub/conftest.c object=$am__obj \
  7972. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  7973. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  7974. >/dev/null 2>conftest.err &&
  7975. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  7976. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  7977. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  7978. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  7979. # icc doesn't choke on unknown options, it will just issue warnings
  7980. # or remarks (even with -Werror). So we grep stderr for any message
  7981. # that says an option was ignored or not supported.
  7982. # When given -MP, icc 7.0 and 7.1 complain thusly:
  7983. # icc: Command line warning: ignoring option '-M'; no argument required
  7984. # The diagnosis changed in icc 8.0:
  7985. # icc: Command line remark: option '-MP' not supported
  7986. if (grep 'ignoring option' conftest.err ||
  7987. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  7988. am_cv_$1_dependencies_compiler_type=$depmode
  7989. break
  7990. fi
  7991. fi
  7992. done
  7993. cd ..
  7994. rm -rf conftest.dir
  7995. else
  7996. am_cv_$1_dependencies_compiler_type=none
  7997. fi
  7998. ])
  7999. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  8000. AM_CONDITIONAL([am__fastdep$1], [
  8001. test "x$enable_dependency_tracking" != xno \
  8002. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  8003. ])
  8004. # AM_SET_DEPDIR
  8005. # -------------
  8006. # Choose a directory name for dependency files.
  8007. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  8008. AC_DEFUN([AM_SET_DEPDIR],
  8009. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8010. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  8011. ])
  8012. # AM_DEP_TRACK
  8013. # ------------
  8014. AC_DEFUN([AM_DEP_TRACK],
  8015. [AC_ARG_ENABLE([dependency-tracking], [dnl
  8016. AS_HELP_STRING(
  8017. [--enable-dependency-tracking],
  8018. [do not reject slow dependency extractors])
  8019. AS_HELP_STRING(
  8020. [--disable-dependency-tracking],
  8021. [speeds up one-time build])])
  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-2013 Free Software Foundation, Inc.
  8035. #
  8036. # This file is free software; the Free Software Foundation
  8037. # gives unlimited permission to copy and/or distribute it,
  8038. # with or without modifications, as long as this notice is preserved.
  8039. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  8040. # ------------------------------
  8041. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  8042. [{
  8043. # Older Autoconf quotes --file arguments for eval, but not when files
  8044. # are listed without --file. Let's play safe and only enable the eval
  8045. # if we detect the quoting.
  8046. case $CONFIG_FILES in
  8047. *\'*) eval set x "$CONFIG_FILES" ;;
  8048. *) set x $CONFIG_FILES ;;
  8049. esac
  8050. shift
  8051. for mf
  8052. do
  8053. # Strip MF so we end up with the name of the file.
  8054. mf=`echo "$mf" | sed -e 's/:.*$//'`
  8055. # Check whether this is an Automake generated Makefile or not.
  8056. # We used to match only the files named 'Makefile.in', but
  8057. # some people rename them; so instead we look at the file content.
  8058. # Grep'ing the first line is not enough: some people post-process
  8059. # each Makefile.in and add a new line on top of each file to say so.
  8060. # Grep'ing the whole file is not good either: AIX grep has a line
  8061. # limit of 2048, but all sed's we know have understand at least 4000.
  8062. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  8063. dirpart=`AS_DIRNAME("$mf")`
  8064. else
  8065. continue
  8066. fi
  8067. # Extract the definition of DEPDIR, am__include, and am__quote
  8068. # from the Makefile without running 'make'.
  8069. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  8070. test -z "$DEPDIR" && continue
  8071. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  8072. test -z "$am__include" && continue
  8073. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  8074. # Find all dependency output files, they are included files with
  8075. # $(DEPDIR) in their names. We invoke sed twice because it is the
  8076. # simplest approach to changing $(DEPDIR) to its actual value in the
  8077. # expansion.
  8078. for file in `sed -n "
  8079. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  8080. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  8081. # Make sure the directory exists.
  8082. test -f "$dirpart/$file" && continue
  8083. fdir=`AS_DIRNAME(["$file"])`
  8084. AS_MKDIR_P([$dirpart/$fdir])
  8085. # echo "creating $dirpart/$file"
  8086. echo '# dummy' > "$dirpart/$file"
  8087. done
  8088. done
  8089. }
  8090. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  8091. # AM_OUTPUT_DEPENDENCY_COMMANDS
  8092. # -----------------------------
  8093. # This macro should only be invoked once -- use via AC_REQUIRE.
  8094. #
  8095. # This code is only required when automatic dependency tracking
  8096. # is enabled. FIXME. This creates each '.P' file that we will
  8097. # need in order to bootstrap the dependency handling code.
  8098. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  8099. [AC_CONFIG_COMMANDS([depfiles],
  8100. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  8101. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  8102. ])
  8103. # Do all the work for Automake. -*- Autoconf -*-
  8104. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  8105. #
  8106. # This file is free software; the Free Software Foundation
  8107. # gives unlimited permission to copy and/or distribute it,
  8108. # with or without modifications, as long as this notice is preserved.
  8109. # This macro actually does too much. Some checks are only needed if
  8110. # your package does certain things. But this isn't really a big deal.
  8111. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
  8112. m4_define([AC_PROG_CC],
  8113. m4_defn([AC_PROG_CC])
  8114. [_AM_PROG_CC_C_O
  8115. ])
  8116. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  8117. # AM_INIT_AUTOMAKE([OPTIONS])
  8118. # -----------------------------------------------
  8119. # The call with PACKAGE and VERSION arguments is the old style
  8120. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  8121. # and VERSION should now be passed to AC_INIT and removed from
  8122. # the call to AM_INIT_AUTOMAKE.
  8123. # We support both call styles for the transition. After
  8124. # the next Automake release, Autoconf can make the AC_INIT
  8125. # arguments mandatory, and then we can depend on a new Autoconf
  8126. # release and drop the old call support.
  8127. AC_DEFUN([AM_INIT_AUTOMAKE],
  8128. [AC_PREREQ([2.65])dnl
  8129. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  8130. dnl the ones we care about.
  8131. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  8132. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  8133. AC_REQUIRE([AC_PROG_INSTALL])dnl
  8134. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  8135. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  8136. # is not polluted with repeated "-I."
  8137. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  8138. # test to see if srcdir already configured
  8139. if test -f $srcdir/config.status; then
  8140. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  8141. fi
  8142. fi
  8143. # test whether we have cygpath
  8144. if test -z "$CYGPATH_W"; then
  8145. if (cygpath --version) >/dev/null 2>/dev/null; then
  8146. CYGPATH_W='cygpath -w'
  8147. else
  8148. CYGPATH_W=echo
  8149. fi
  8150. fi
  8151. AC_SUBST([CYGPATH_W])
  8152. # Define the identity of the package.
  8153. dnl Distinguish between old-style and new-style calls.
  8154. m4_ifval([$2],
  8155. [AC_DIAGNOSE([obsolete],
  8156. [$0: two- and three-arguments forms are deprecated.])
  8157. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  8158. AC_SUBST([PACKAGE], [$1])dnl
  8159. AC_SUBST([VERSION], [$2])],
  8160. [_AM_SET_OPTIONS([$1])dnl
  8161. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  8162. m4_if(
  8163. m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  8164. [ok:ok],,
  8165. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  8166. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  8167. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  8168. _AM_IF_OPTION([no-define],,
  8169. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  8170. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  8171. # Some tools Automake needs.
  8172. AC_REQUIRE([AM_SANITY_CHECK])dnl
  8173. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  8174. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  8175. AM_MISSING_PROG([AUTOCONF], [autoconf])
  8176. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  8177. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  8178. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  8179. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8180. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  8181. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  8182. # For better backward compatibility. To be removed once Automake 1.9.x
  8183. # dies out for good. For more background, see:
  8184. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  8185. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  8186. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  8187. # We need awk for the "check" target. The system "awk" is bad on
  8188. # some platforms.
  8189. AC_REQUIRE([AC_PROG_AWK])dnl
  8190. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  8191. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8192. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  8193. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  8194. [_AM_PROG_TAR([v7])])])
  8195. _AM_IF_OPTION([no-dependencies],,
  8196. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  8197. [_AM_DEPENDENCIES([CC])],
  8198. [m4_define([AC_PROG_CC],
  8199. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  8200. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  8201. [_AM_DEPENDENCIES([CXX])],
  8202. [m4_define([AC_PROG_CXX],
  8203. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  8204. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  8205. [_AM_DEPENDENCIES([OBJC])],
  8206. [m4_define([AC_PROG_OBJC],
  8207. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  8208. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  8209. [_AM_DEPENDENCIES([OBJCXX])],
  8210. [m4_define([AC_PROG_OBJCXX],
  8211. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  8212. ])
  8213. AC_REQUIRE([AM_SILENT_RULES])dnl
  8214. dnl The testsuite driver may need to know about EXEEXT, so add the
  8215. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  8216. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  8217. AC_CONFIG_COMMANDS_PRE(dnl
  8218. [m4_provide_if([_AM_COMPILER_EXEEXT],
  8219. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  8220. # POSIX will say in a future version that running "rm -f" with no argument
  8221. # is OK; and we want to be able to make that assumption in our Makefile
  8222. # recipes. So use an aggressive probe to check that the usage we want is
  8223. # actually supported "in the wild" to an acceptable degree.
  8224. # See automake bug#10828.
  8225. # To make any issue more visible, cause the running configure to be aborted
  8226. # by default if the 'rm' program in use doesn't match our expectations; the
  8227. # user can still override this though.
  8228. if rm -f && rm -fr && rm -rf; then : OK; else
  8229. cat >&2 <<'END'
  8230. Oops!
  8231. Your 'rm' program seems unable to run without file operands specified
  8232. on the command line, even when the '-f' option is present. This is contrary
  8233. to the behaviour of most rm programs out there, and not conforming with
  8234. the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
  8235. Please tell bug-automake@gnu.org about your system, including the value
  8236. of your $PATH and any error possibly output before this message. This
  8237. can help us improve future automake versions.
  8238. END
  8239. if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
  8240. echo 'Configuration will proceed anyway, since you have set the' >&2
  8241. echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
  8242. echo >&2
  8243. else
  8244. cat >&2 <<'END'
  8245. Aborting the configuration process, to ensure you take notice of the issue.
  8246. You can download and install GNU coreutils to get an 'rm' implementation
  8247. that behaves properly: <http://www.gnu.org/software/coreutils/>.
  8248. If you want to complete the configuration process using your problematic
  8249. 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
  8250. to "yes", and re-run configure.
  8251. END
  8252. AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
  8253. fi
  8254. fi
  8255. ])
  8256. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  8257. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  8258. dnl mangled by Autoconf and run in a shell conditional statement.
  8259. m4_define([_AC_COMPILER_EXEEXT],
  8260. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  8261. # When config.status generates a header, we must update the stamp-h file.
  8262. # This file resides in the same directory as the config header
  8263. # that is generated. The stamp files are numbered to have different names.
  8264. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  8265. # loop where config.status creates the headers, so we can generate
  8266. # our stamp files there.
  8267. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  8268. [# Compute $1's index in $config_headers.
  8269. _am_arg=$1
  8270. _am_stamp_count=1
  8271. for _am_header in $config_headers :; do
  8272. case $_am_header in
  8273. $_am_arg | $_am_arg:* )
  8274. break ;;
  8275. * )
  8276. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  8277. esac
  8278. done
  8279. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  8280. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  8281. #
  8282. # This file is free software; the Free Software Foundation
  8283. # gives unlimited permission to copy and/or distribute it,
  8284. # with or without modifications, as long as this notice is preserved.
  8285. # AM_PROG_INSTALL_SH
  8286. # ------------------
  8287. # Define $install_sh.
  8288. AC_DEFUN([AM_PROG_INSTALL_SH],
  8289. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8290. if test x"${install_sh}" != xset; then
  8291. case $am_aux_dir in
  8292. *\ * | *\ *)
  8293. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  8294. *)
  8295. install_sh="\${SHELL} $am_aux_dir/install-sh"
  8296. esac
  8297. fi
  8298. AC_SUBST([install_sh])])
  8299. # Copyright (C) 2003-2013 Free Software Foundation, Inc.
  8300. #
  8301. # This file is free software; the Free Software Foundation
  8302. # gives unlimited permission to copy and/or distribute it,
  8303. # with or without modifications, as long as this notice is preserved.
  8304. # Check whether the underlying file-system supports filenames
  8305. # with a leading dot. For instance MS-DOS doesn't.
  8306. AC_DEFUN([AM_SET_LEADING_DOT],
  8307. [rm -rf .tst 2>/dev/null
  8308. mkdir .tst 2>/dev/null
  8309. if test -d .tst; then
  8310. am__leading_dot=.
  8311. else
  8312. am__leading_dot=_
  8313. fi
  8314. rmdir .tst 2>/dev/null
  8315. AC_SUBST([am__leading_dot])])
  8316. # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  8317. # From Jim Meyering
  8318. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  8319. #
  8320. # This file is free software; the Free Software Foundation
  8321. # gives unlimited permission to copy and/or distribute it,
  8322. # with or without modifications, as long as this notice is preserved.
  8323. # AM_MAINTAINER_MODE([DEFAULT-MODE])
  8324. # ----------------------------------
  8325. # Control maintainer-specific portions of Makefiles.
  8326. # Default is to disable them, unless 'enable' is passed literally.
  8327. # For symmetry, 'disable' may be passed as well. Anyway, the user
  8328. # can override the default with the --enable/--disable switch.
  8329. AC_DEFUN([AM_MAINTAINER_MODE],
  8330. [m4_case(m4_default([$1], [disable]),
  8331. [enable], [m4_define([am_maintainer_other], [disable])],
  8332. [disable], [m4_define([am_maintainer_other], [enable])],
  8333. [m4_define([am_maintainer_other], [enable])
  8334. m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
  8335. AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  8336. dnl maintainer-mode's default is 'disable' unless 'enable' is passed
  8337. AC_ARG_ENABLE([maintainer-mode],
  8338. [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
  8339. am_maintainer_other[ make rules and dependencies not useful
  8340. (and sometimes confusing) to the casual installer])],
  8341. [USE_MAINTAINER_MODE=$enableval],
  8342. [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
  8343. AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  8344. AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
  8345. MAINT=$MAINTAINER_MODE_TRUE
  8346. AC_SUBST([MAINT])dnl
  8347. ]
  8348. )
  8349. # Check to see how 'make' treats includes. -*- Autoconf -*-
  8350. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  8351. #
  8352. # This file is free software; the Free Software Foundation
  8353. # gives unlimited permission to copy and/or distribute it,
  8354. # with or without modifications, as long as this notice is preserved.
  8355. # AM_MAKE_INCLUDE()
  8356. # -----------------
  8357. # Check to see how make treats includes.
  8358. AC_DEFUN([AM_MAKE_INCLUDE],
  8359. [am_make=${MAKE-make}
  8360. cat > confinc << 'END'
  8361. am__doit:
  8362. @echo this is the am__doit target
  8363. .PHONY: am__doit
  8364. END
  8365. # If we don't find an include directive, just comment out the code.
  8366. AC_MSG_CHECKING([for style of include used by $am_make])
  8367. am__include="#"
  8368. am__quote=
  8369. _am_result=none
  8370. # First try GNU make style include.
  8371. echo "include confinc" > confmf
  8372. # Ignore all kinds of additional output from 'make'.
  8373. case `$am_make -s -f confmf 2> /dev/null` in #(
  8374. *the\ am__doit\ target*)
  8375. am__include=include
  8376. am__quote=
  8377. _am_result=GNU
  8378. ;;
  8379. esac
  8380. # Now try BSD make style include.
  8381. if test "$am__include" = "#"; then
  8382. echo '.include "confinc"' > confmf
  8383. case `$am_make -s -f confmf 2> /dev/null` in #(
  8384. *the\ am__doit\ target*)
  8385. am__include=.include
  8386. am__quote="\""
  8387. _am_result=BSD
  8388. ;;
  8389. esac
  8390. fi
  8391. AC_SUBST([am__include])
  8392. AC_SUBST([am__quote])
  8393. AC_MSG_RESULT([$_am_result])
  8394. rm -f confinc confmf
  8395. ])
  8396. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  8397. # Copyright (C) 1997-2013 Free Software Foundation, Inc.
  8398. #
  8399. # This file is free software; the Free Software Foundation
  8400. # gives unlimited permission to copy and/or distribute it,
  8401. # with or without modifications, as long as this notice is preserved.
  8402. # AM_MISSING_PROG(NAME, PROGRAM)
  8403. # ------------------------------
  8404. AC_DEFUN([AM_MISSING_PROG],
  8405. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  8406. $1=${$1-"${am_missing_run}$2"}
  8407. AC_SUBST($1)])
  8408. # AM_MISSING_HAS_RUN
  8409. # ------------------
  8410. # Define MISSING if not defined so far and test if it is modern enough.
  8411. # If it is, set am_missing_run to use it, otherwise, to nothing.
  8412. AC_DEFUN([AM_MISSING_HAS_RUN],
  8413. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8414. AC_REQUIRE_AUX_FILE([missing])dnl
  8415. if test x"${MISSING+set}" != xset; then
  8416. case $am_aux_dir in
  8417. *\ * | *\ *)
  8418. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  8419. *)
  8420. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  8421. esac
  8422. fi
  8423. # Use eval to expand $SHELL
  8424. if eval "$MISSING --is-lightweight"; then
  8425. am_missing_run="$MISSING "
  8426. else
  8427. am_missing_run=
  8428. AC_MSG_WARN(['missing' script is too old or missing])
  8429. fi
  8430. ])
  8431. # Helper functions for option handling. -*- Autoconf -*-
  8432. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  8433. #
  8434. # This file is free software; the Free Software Foundation
  8435. # gives unlimited permission to copy and/or distribute it,
  8436. # with or without modifications, as long as this notice is preserved.
  8437. # _AM_MANGLE_OPTION(NAME)
  8438. # -----------------------
  8439. AC_DEFUN([_AM_MANGLE_OPTION],
  8440. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  8441. # _AM_SET_OPTION(NAME)
  8442. # --------------------
  8443. # Set option NAME. Presently that only means defining a flag for this option.
  8444. AC_DEFUN([_AM_SET_OPTION],
  8445. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  8446. # _AM_SET_OPTIONS(OPTIONS)
  8447. # ------------------------
  8448. # OPTIONS is a space-separated list of Automake options.
  8449. AC_DEFUN([_AM_SET_OPTIONS],
  8450. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  8451. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  8452. # -------------------------------------------
  8453. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  8454. AC_DEFUN([_AM_IF_OPTION],
  8455. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  8456. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  8457. #
  8458. # This file is free software; the Free Software Foundation
  8459. # gives unlimited permission to copy and/or distribute it,
  8460. # with or without modifications, as long as this notice is preserved.
  8461. # _AM_PROG_CC_C_O
  8462. # ---------------
  8463. # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
  8464. # to automatically call this.
  8465. AC_DEFUN([_AM_PROG_CC_C_O],
  8466. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8467. AC_REQUIRE_AUX_FILE([compile])dnl
  8468. AC_LANG_PUSH([C])dnl
  8469. AC_CACHE_CHECK(
  8470. [whether $CC understands -c and -o together],
  8471. [am_cv_prog_cc_c_o],
  8472. [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
  8473. # Make sure it works both with $CC and with simple cc.
  8474. # Following AC_PROG_CC_C_O, we do the test twice because some
  8475. # compilers refuse to overwrite an existing .o file with -o,
  8476. # though they will create one.
  8477. am_cv_prog_cc_c_o=yes
  8478. for am_i in 1 2; do
  8479. if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
  8480. && test -f conftest2.$ac_objext; then
  8481. : OK
  8482. else
  8483. am_cv_prog_cc_c_o=no
  8484. break
  8485. fi
  8486. done
  8487. rm -f core conftest*
  8488. unset am_i])
  8489. if test "$am_cv_prog_cc_c_o" != yes; then
  8490. # Losing compiler, so override with the script.
  8491. # FIXME: It is wrong to rewrite CC.
  8492. # But if we don't then we get into trouble of one sort or another.
  8493. # A longer-term fix would be to have automake use am__CC in this case,
  8494. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  8495. CC="$am_aux_dir/compile $CC"
  8496. fi
  8497. AC_LANG_POP([C])])
  8498. # For backward compatibility.
  8499. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
  8500. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  8501. #
  8502. # This file is free software; the Free Software Foundation
  8503. # gives unlimited permission to copy and/or distribute it,
  8504. # with or without modifications, as long as this notice is preserved.
  8505. # AM_RUN_LOG(COMMAND)
  8506. # -------------------
  8507. # Run COMMAND, save the exit status in ac_status, and log it.
  8508. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
  8509. AC_DEFUN([AM_RUN_LOG],
  8510. [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
  8511. ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
  8512. ac_status=$?
  8513. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  8514. (exit $ac_status); }])
  8515. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  8516. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  8517. #
  8518. # This file is free software; the Free Software Foundation
  8519. # gives unlimited permission to copy and/or distribute it,
  8520. # with or without modifications, as long as this notice is preserved.
  8521. # AM_SANITY_CHECK
  8522. # ---------------
  8523. AC_DEFUN([AM_SANITY_CHECK],
  8524. [AC_MSG_CHECKING([whether build environment is sane])
  8525. # Reject unsafe characters in $srcdir or the absolute working directory
  8526. # name. Accept space and tab only in the latter.
  8527. am_lf='
  8528. '
  8529. case `pwd` in
  8530. *[[\\\"\#\$\&\'\`$am_lf]]*)
  8531. AC_MSG_ERROR([unsafe absolute working directory name]);;
  8532. esac
  8533. case $srcdir in
  8534. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  8535. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  8536. esac
  8537. # Do 'set' in a subshell so we don't clobber the current shell's
  8538. # arguments. Must try -L first in case configure is actually a
  8539. # symlink; some systems play weird games with the mod time of symlinks
  8540. # (eg FreeBSD returns the mod time of the symlink's containing
  8541. # directory).
  8542. if (
  8543. am_has_slept=no
  8544. for am_try in 1 2; do
  8545. echo "timestamp, slept: $am_has_slept" > conftest.file
  8546. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  8547. if test "$[*]" = "X"; then
  8548. # -L didn't work.
  8549. set X `ls -t "$srcdir/configure" conftest.file`
  8550. fi
  8551. if test "$[*]" != "X $srcdir/configure conftest.file" \
  8552. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  8553. # If neither matched, then we have a broken ls. This can happen
  8554. # if, for instance, CONFIG_SHELL is bash and it inherits a
  8555. # broken ls alias from the environment. This has actually
  8556. # happened. Such a system could not be considered "sane".
  8557. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  8558. alias in your environment])
  8559. fi
  8560. if test "$[2]" = conftest.file || test $am_try -eq 2; then
  8561. break
  8562. fi
  8563. # Just in case.
  8564. sleep 1
  8565. am_has_slept=yes
  8566. done
  8567. test "$[2]" = conftest.file
  8568. )
  8569. then
  8570. # Ok.
  8571. :
  8572. else
  8573. AC_MSG_ERROR([newly created file is older than distributed files!
  8574. Check your system clock])
  8575. fi
  8576. AC_MSG_RESULT([yes])
  8577. # If we didn't sleep, we still need to ensure time stamps of config.status and
  8578. # generated files are strictly newer.
  8579. am_sleep_pid=
  8580. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  8581. ( sleep 1 ) &
  8582. am_sleep_pid=$!
  8583. fi
  8584. AC_CONFIG_COMMANDS_PRE(
  8585. [AC_MSG_CHECKING([that generated files are newer than configure])
  8586. if test -n "$am_sleep_pid"; then
  8587. # Hide warnings about reused PIDs.
  8588. wait $am_sleep_pid 2>/dev/null
  8589. fi
  8590. AC_MSG_RESULT([done])])
  8591. rm -f conftest.file
  8592. ])
  8593. # Copyright (C) 2009-2013 Free Software Foundation, Inc.
  8594. #
  8595. # This file is free software; the Free Software Foundation
  8596. # gives unlimited permission to copy and/or distribute it,
  8597. # with or without modifications, as long as this notice is preserved.
  8598. # AM_SILENT_RULES([DEFAULT])
  8599. # --------------------------
  8600. # Enable less verbose build rules; with the default set to DEFAULT
  8601. # ("yes" being less verbose, "no" or empty being verbose).
  8602. AC_DEFUN([AM_SILENT_RULES],
  8603. [AC_ARG_ENABLE([silent-rules], [dnl
  8604. AS_HELP_STRING(
  8605. [--enable-silent-rules],
  8606. [less verbose build output (undo: "make V=1")])
  8607. AS_HELP_STRING(
  8608. [--disable-silent-rules],
  8609. [verbose build output (undo: "make V=0")])dnl
  8610. ])
  8611. case $enable_silent_rules in @%:@ (((
  8612. yes) AM_DEFAULT_VERBOSITY=0;;
  8613. no) AM_DEFAULT_VERBOSITY=1;;
  8614. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  8615. esac
  8616. dnl
  8617. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  8618. dnl do not support nested variable expansions.
  8619. dnl See automake bug#9928 and bug#10237.
  8620. am_make=${MAKE-make}
  8621. AC_CACHE_CHECK([whether $am_make supports nested variables],
  8622. [am_cv_make_support_nested_variables],
  8623. [if AS_ECHO([['TRUE=$(BAR$(V))
  8624. BAR0=false
  8625. BAR1=true
  8626. V=1
  8627. am__doit:
  8628. @$(TRUE)
  8629. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  8630. am_cv_make_support_nested_variables=yes
  8631. else
  8632. am_cv_make_support_nested_variables=no
  8633. fi])
  8634. if test $am_cv_make_support_nested_variables = yes; then
  8635. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  8636. AM_V='$(V)'
  8637. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  8638. else
  8639. AM_V=$AM_DEFAULT_VERBOSITY
  8640. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  8641. fi
  8642. AC_SUBST([AM_V])dnl
  8643. AM_SUBST_NOTMAKE([AM_V])dnl
  8644. AC_SUBST([AM_DEFAULT_V])dnl
  8645. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  8646. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  8647. AM_BACKSLASH='\'
  8648. AC_SUBST([AM_BACKSLASH])dnl
  8649. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  8650. ])
  8651. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  8652. #
  8653. # This file is free software; the Free Software Foundation
  8654. # gives unlimited permission to copy and/or distribute it,
  8655. # with or without modifications, as long as this notice is preserved.
  8656. # AM_PROG_INSTALL_STRIP
  8657. # ---------------------
  8658. # One issue with vendor 'install' (even GNU) is that you can't
  8659. # specify the program used to strip binaries. This is especially
  8660. # annoying in cross-compiling environments, where the build's strip
  8661. # is unlikely to handle the host's binaries.
  8662. # Fortunately install-sh will honor a STRIPPROG variable, so we
  8663. # always use install-sh in "make install-strip", and initialize
  8664. # STRIPPROG with the value of the STRIP variable (set by the user).
  8665. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  8666. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8667. # Installed binaries are usually stripped using 'strip' when the user
  8668. # run "make install-strip". However 'strip' might not be the right
  8669. # tool to use in cross-compilation environments, therefore Automake
  8670. # will honor the 'STRIP' environment variable to overrule this program.
  8671. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  8672. if test "$cross_compiling" != no; then
  8673. AC_CHECK_TOOL([STRIP], [strip], :)
  8674. fi
  8675. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  8676. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  8677. # Copyright (C) 2006-2013 Free Software Foundation, Inc.
  8678. #
  8679. # This file is free software; the Free Software Foundation
  8680. # gives unlimited permission to copy and/or distribute it,
  8681. # with or without modifications, as long as this notice is preserved.
  8682. # _AM_SUBST_NOTMAKE(VARIABLE)
  8683. # ---------------------------
  8684. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  8685. # This macro is traced by Automake.
  8686. AC_DEFUN([_AM_SUBST_NOTMAKE])
  8687. # AM_SUBST_NOTMAKE(VARIABLE)
  8688. # --------------------------
  8689. # Public sister of _AM_SUBST_NOTMAKE.
  8690. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  8691. # Check how to create a tarball. -*- Autoconf -*-
  8692. # Copyright (C) 2004-2013 Free Software Foundation, Inc.
  8693. #
  8694. # This file is free software; the Free Software Foundation
  8695. # gives unlimited permission to copy and/or distribute it,
  8696. # with or without modifications, as long as this notice is preserved.
  8697. # _AM_PROG_TAR(FORMAT)
  8698. # --------------------
  8699. # Check how to create a tarball in format FORMAT.
  8700. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  8701. #
  8702. # Substitute a variable $(am__tar) that is a command
  8703. # writing to stdout a FORMAT-tarball containing the directory
  8704. # $tardir.
  8705. # tardir=directory && $(am__tar) > result.tar
  8706. #
  8707. # Substitute a variable $(am__untar) that extract such
  8708. # a tarball read from stdin.
  8709. # $(am__untar) < result.tar
  8710. #
  8711. AC_DEFUN([_AM_PROG_TAR],
  8712. [# Always define AMTAR for backward compatibility. Yes, it's still used
  8713. # in the wild :-( We should find a proper way to deprecate it ...
  8714. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  8715. # We'll loop over all known methods to create a tar archive until one works.
  8716. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  8717. m4_if([$1], [v7],
  8718. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  8719. [m4_case([$1],
  8720. [ustar],
  8721. [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  8722. # There is notably a 21 bits limit for the UID and the GID. In fact,
  8723. # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  8724. # and bug#13588).
  8725. am_max_uid=2097151 # 2^21 - 1
  8726. am_max_gid=$am_max_uid
  8727. # The $UID and $GID variables are not portable, so we need to resort
  8728. # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
  8729. # below are definitely unexpected, so allow the users to see them
  8730. # (that is, avoid stderr redirection).
  8731. am_uid=`id -u || echo unknown`
  8732. am_gid=`id -g || echo unknown`
  8733. AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  8734. if test $am_uid -le $am_max_uid; then
  8735. AC_MSG_RESULT([yes])
  8736. else
  8737. AC_MSG_RESULT([no])
  8738. _am_tools=none
  8739. fi
  8740. AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  8741. if test $am_gid -le $am_max_gid; then
  8742. AC_MSG_RESULT([yes])
  8743. else
  8744. AC_MSG_RESULT([no])
  8745. _am_tools=none
  8746. fi],
  8747. [pax],
  8748. [],
  8749. [m4_fatal([Unknown tar format])])
  8750. AC_MSG_CHECKING([how to create a $1 tar archive])
  8751. # Go ahead even if we have the value already cached. We do so because we
  8752. # need to set the values for the 'am__tar' and 'am__untar' variables.
  8753. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  8754. for _am_tool in $_am_tools; do
  8755. case $_am_tool in
  8756. gnutar)
  8757. for _am_tar in tar gnutar gtar; do
  8758. AM_RUN_LOG([$_am_tar --version]) && break
  8759. done
  8760. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  8761. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  8762. am__untar="$_am_tar -xf -"
  8763. ;;
  8764. plaintar)
  8765. # Must skip GNU tar: if it does not support --format= it doesn't create
  8766. # ustar tarball either.
  8767. (tar --version) >/dev/null 2>&1 && continue
  8768. am__tar='tar chf - "$$tardir"'
  8769. am__tar_='tar chf - "$tardir"'
  8770. am__untar='tar xf -'
  8771. ;;
  8772. pax)
  8773. am__tar='pax -L -x $1 -w "$$tardir"'
  8774. am__tar_='pax -L -x $1 -w "$tardir"'
  8775. am__untar='pax -r'
  8776. ;;
  8777. cpio)
  8778. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  8779. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  8780. am__untar='cpio -i -H $1 -d'
  8781. ;;
  8782. none)
  8783. am__tar=false
  8784. am__tar_=false
  8785. am__untar=false
  8786. ;;
  8787. esac
  8788. # If the value was cached, stop now. We just wanted to have am__tar
  8789. # and am__untar set.
  8790. test -n "${am_cv_prog_tar_$1}" && break
  8791. # tar/untar a dummy directory, and stop if the command works.
  8792. rm -rf conftest.dir
  8793. mkdir conftest.dir
  8794. echo GrepMe > conftest.dir/file
  8795. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  8796. rm -rf conftest.dir
  8797. if test -s conftest.tar; then
  8798. AM_RUN_LOG([$am__untar <conftest.tar])
  8799. AM_RUN_LOG([cat conftest.dir/file])
  8800. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  8801. fi
  8802. done
  8803. rm -rf conftest.dir
  8804. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  8805. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  8806. AC_SUBST([am__tar])
  8807. AC_SUBST([am__untar])
  8808. ]) # _AM_PROG_TAR