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.

9787 lines
344 KiB

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