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.

9599 lines
338 KiB

11 years ago
  1. # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  3. # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
  4. # Inc.
  5. # This file is free software; the Free Software Foundation
  6. # gives unlimited permission to copy and/or distribute it,
  7. # with or without modifications, as long as this notice is preserved.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  10. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11. # PARTICULAR PURPOSE.
  12. m4_ifndef([AC_AUTOCONF_VERSION],
  13. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  14. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
  15. [m4_warning([this file was generated for autoconf 2.69.
  16. You have another version of autoconf. It may work, but is not guaranteed to.
  17. If you have problems, you may need to regenerate the build system entirely.
  18. To do so, use the procedure documented by the package, typically `autoreconf'.])])
  19. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  20. #
  21. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  22. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  23. # Foundation, Inc.
  24. # Written by Gordon Matzigkeit, 1996
  25. #
  26. # This file is free software; the Free Software Foundation gives
  27. # unlimited permission to copy and/or distribute it, with or without
  28. # modifications, as long as this notice is preserved.
  29. m4_define([_LT_COPYING], [dnl
  30. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  31. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  32. # Foundation, Inc.
  33. # Written by Gordon Matzigkeit, 1996
  34. #
  35. # This file is part of GNU Libtool.
  36. #
  37. # GNU Libtool is free software; you can redistribute it and/or
  38. # modify it under the terms of the GNU General Public License as
  39. # published by the Free Software Foundation; either version 2 of
  40. # the License, or (at your option) any later version.
  41. #
  42. # As a special exception to the GNU General Public License,
  43. # if you distribute this file as part of a program or library that
  44. # is built using GNU Libtool, you may include this file under the
  45. # same distribution terms that you use for the rest of that program.
  46. #
  47. # GNU Libtool is distributed in the hope that it will be useful,
  48. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  49. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  50. # GNU General Public License for more details.
  51. #
  52. # You should have received a copy of the GNU General Public License
  53. # along with GNU Libtool; see the file COPYING. If not, a copy
  54. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  55. # obtained by writing to the Free Software Foundation, Inc.,
  56. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  57. ])
  58. # serial 57 LT_INIT
  59. # LT_PREREQ(VERSION)
  60. # ------------------
  61. # Complain and exit if this libtool version is less that VERSION.
  62. m4_defun([LT_PREREQ],
  63. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  64. [m4_default([$3],
  65. [m4_fatal([Libtool version $1 or higher is required],
  66. 63)])],
  67. [$2])])
  68. # _LT_CHECK_BUILDDIR
  69. # ------------------
  70. # Complain if the absolute build directory name contains unusual characters
  71. m4_defun([_LT_CHECK_BUILDDIR],
  72. [case `pwd` in
  73. *\ * | *\ *)
  74. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  75. esac
  76. ])
  77. # LT_INIT([OPTIONS])
  78. # ------------------
  79. AC_DEFUN([LT_INIT],
  80. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  81. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  82. AC_BEFORE([$0], [LT_LANG])dnl
  83. AC_BEFORE([$0], [LT_OUTPUT])dnl
  84. AC_BEFORE([$0], [LTDL_INIT])dnl
  85. m4_require([_LT_CHECK_BUILDDIR])dnl
  86. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  87. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  88. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  89. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  90. dnl unless we require an AC_DEFUNed macro:
  91. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  92. AC_REQUIRE([LTSUGAR_VERSION])dnl
  93. AC_REQUIRE([LTVERSION_VERSION])dnl
  94. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  95. m4_require([_LT_PROG_LTMAIN])dnl
  96. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  97. dnl Parse OPTIONS
  98. _LT_SET_OPTIONS([$0], [$1])
  99. # This can be used to rebuild libtool when needed
  100. LIBTOOL_DEPS="$ltmain"
  101. # Always use our own libtool.
  102. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  103. AC_SUBST(LIBTOOL)dnl
  104. _LT_SETUP
  105. # Only expand once:
  106. m4_define([LT_INIT])
  107. ])# LT_INIT
  108. # Old names:
  109. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  110. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  111. dnl aclocal-1.4 backwards compatibility:
  112. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  113. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  114. # _LT_CC_BASENAME(CC)
  115. # -------------------
  116. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  117. m4_defun([_LT_CC_BASENAME],
  118. [for cc_temp in $1""; do
  119. case $cc_temp in
  120. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  121. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  122. \-*) ;;
  123. *) break;;
  124. esac
  125. done
  126. cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  127. ])
  128. # _LT_FILEUTILS_DEFAULTS
  129. # ----------------------
  130. # It is okay to use these file commands and assume they have been set
  131. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  132. m4_defun([_LT_FILEUTILS_DEFAULTS],
  133. [: ${CP="cp -f"}
  134. : ${MV="mv -f"}
  135. : ${RM="rm -f"}
  136. ])# _LT_FILEUTILS_DEFAULTS
  137. # _LT_SETUP
  138. # ---------
  139. m4_defun([_LT_SETUP],
  140. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  141. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  142. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  143. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  144. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  145. dnl
  146. _LT_DECL([], [host_alias], [0], [The host system])dnl
  147. _LT_DECL([], [host], [0])dnl
  148. _LT_DECL([], [host_os], [0])dnl
  149. dnl
  150. _LT_DECL([], [build_alias], [0], [The build system])dnl
  151. _LT_DECL([], [build], [0])dnl
  152. _LT_DECL([], [build_os], [0])dnl
  153. dnl
  154. AC_REQUIRE([AC_PROG_CC])dnl
  155. AC_REQUIRE([LT_PATH_LD])dnl
  156. AC_REQUIRE([LT_PATH_NM])dnl
  157. dnl
  158. AC_REQUIRE([AC_PROG_LN_S])dnl
  159. test -z "$LN_S" && LN_S="ln -s"
  160. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  161. dnl
  162. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  163. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  164. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  165. dnl
  166. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  167. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  168. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  169. m4_require([_LT_CMD_RELOAD])dnl
  170. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  171. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  172. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  173. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  174. m4_require([_LT_WITH_SYSROOT])dnl
  175. _LT_CONFIG_LIBTOOL_INIT([
  176. # See if we are running on zsh, and set the options which allow our
  177. # commands through without removal of \ escapes INIT.
  178. if test -n "\${ZSH_VERSION+set}" ; then
  179. setopt NO_GLOB_SUBST
  180. fi
  181. ])
  182. if test -n "${ZSH_VERSION+set}" ; then
  183. setopt NO_GLOB_SUBST
  184. fi
  185. _LT_CHECK_OBJDIR
  186. m4_require([_LT_TAG_COMPILER])dnl
  187. case $host_os in
  188. aix3*)
  189. # AIX sometimes has problems with the GCC collect2 program. For some
  190. # reason, if we set the COLLECT_NAMES environment variable, the problems
  191. # vanish in a puff of smoke.
  192. if test "X${COLLECT_NAMES+set}" != Xset; then
  193. COLLECT_NAMES=
  194. export COLLECT_NAMES
  195. fi
  196. ;;
  197. esac
  198. # Global variables:
  199. ofile=libtool
  200. can_build_shared=yes
  201. # All known linkers require a `.a' archive for static linking (except MSVC,
  202. # which needs '.lib').
  203. libext=a
  204. with_gnu_ld="$lt_cv_prog_gnu_ld"
  205. old_CC="$CC"
  206. old_CFLAGS="$CFLAGS"
  207. # Set sane defaults for various variables
  208. test -z "$CC" && CC=cc
  209. test -z "$LTCC" && LTCC=$CC
  210. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  211. test -z "$LD" && LD=ld
  212. test -z "$ac_objext" && ac_objext=o
  213. _LT_CC_BASENAME([$compiler])
  214. # Only perform the check for file, if the check method requires it
  215. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  216. case $deplibs_check_method in
  217. file_magic*)
  218. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  219. _LT_PATH_MAGIC
  220. fi
  221. ;;
  222. esac
  223. # Use C for the default configuration in the libtool script
  224. LT_SUPPORTED_TAG([CC])
  225. _LT_LANG_C_CONFIG
  226. _LT_LANG_DEFAULT_CONFIG
  227. _LT_CONFIG_COMMANDS
  228. ])# _LT_SETUP
  229. # _LT_PREPARE_SED_QUOTE_VARS
  230. # --------------------------
  231. # Define a few sed substitution that help us do robust quoting.
  232. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  233. [# Backslashify metacharacters that are still active within
  234. # double-quoted strings.
  235. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  236. # Same as above, but do not quote variable references.
  237. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  238. # Sed substitution to delay expansion of an escaped shell variable in a
  239. # double_quote_subst'ed string.
  240. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  241. # Sed substitution to delay expansion of an escaped single quote.
  242. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  243. # Sed substitution to avoid accidental globbing in evaled expressions
  244. no_glob_subst='s/\*/\\\*/g'
  245. ])
  246. # _LT_PROG_LTMAIN
  247. # ---------------
  248. # Note that this code is called both from `configure', and `config.status'
  249. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  250. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  251. # so we pass a copy along to make sure it has a sensible value anyway.
  252. m4_defun([_LT_PROG_LTMAIN],
  253. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  254. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  255. ltmain="$ac_aux_dir/ltmain.sh"
  256. ])# _LT_PROG_LTMAIN
  257. # So that we can recreate a full libtool script including additional
  258. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  259. # in macros and then make a single call at the end using the `libtool'
  260. # label.
  261. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  262. # ----------------------------------------
  263. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  264. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  265. [m4_ifval([$1],
  266. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  267. [$1
  268. ])])])
  269. # Initialize.
  270. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  271. # _LT_CONFIG_LIBTOOL([COMMANDS])
  272. # ------------------------------
  273. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  274. m4_define([_LT_CONFIG_LIBTOOL],
  275. [m4_ifval([$1],
  276. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  277. [$1
  278. ])])])
  279. # Initialize.
  280. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  281. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  282. # -----------------------------------------------------
  283. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  284. [_LT_CONFIG_LIBTOOL([$1])
  285. _LT_CONFIG_LIBTOOL_INIT([$2])
  286. ])
  287. # _LT_FORMAT_COMMENT([COMMENT])
  288. # -----------------------------
  289. # Add leading comment marks to the start of each line, and a trailing
  290. # full-stop to the whole comment if one is not present already.
  291. m4_define([_LT_FORMAT_COMMENT],
  292. [m4_ifval([$1], [
  293. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  294. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  295. )])
  296. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  297. # -------------------------------------------------------------------
  298. # CONFIGNAME is the name given to the value in the libtool script.
  299. # VARNAME is the (base) name used in the configure script.
  300. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  301. # VARNAME. Any other value will be used directly.
  302. m4_define([_LT_DECL],
  303. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  304. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  305. [m4_ifval([$1], [$1], [$2])])
  306. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  307. m4_ifval([$4],
  308. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  309. lt_dict_add_subkey([lt_decl_dict], [$2],
  310. [tagged?], [m4_ifval([$5], [yes], [no])])])
  311. ])
  312. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  313. # --------------------------------------------------------
  314. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  315. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  316. # ------------------------------------------------
  317. m4_define([lt_decl_tag_varnames],
  318. [_lt_decl_filter([tagged?], [yes], $@)])
  319. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  320. # ---------------------------------------------------------
  321. m4_define([_lt_decl_filter],
  322. [m4_case([$#],
  323. [0], [m4_fatal([$0: too few arguments: $#])],
  324. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  325. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  326. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  327. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  328. ])
  329. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  330. # --------------------------------------------------
  331. m4_define([lt_decl_quote_varnames],
  332. [_lt_decl_filter([value], [1], $@)])
  333. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  334. # ---------------------------------------------------
  335. m4_define([lt_decl_dquote_varnames],
  336. [_lt_decl_filter([value], [2], $@)])
  337. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  338. # ---------------------------------------------------
  339. m4_define([lt_decl_varnames_tagged],
  340. [m4_assert([$# <= 2])dnl
  341. _$0(m4_quote(m4_default([$1], [[, ]])),
  342. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  343. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  344. m4_define([_lt_decl_varnames_tagged],
  345. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  346. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  347. # ------------------------------------------------
  348. m4_define([lt_decl_all_varnames],
  349. [_$0(m4_quote(m4_default([$1], [[, ]])),
  350. m4_if([$2], [],
  351. m4_quote(lt_decl_varnames),
  352. m4_quote(m4_shift($@))))[]dnl
  353. ])
  354. m4_define([_lt_decl_all_varnames],
  355. [lt_join($@, lt_decl_varnames_tagged([$1],
  356. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  357. ])
  358. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  359. # ------------------------------------
  360. # Quote a variable value, and forward it to `config.status' so that its
  361. # declaration there will have the same value as in `configure'. VARNAME
  362. # must have a single quote delimited value for this to work.
  363. m4_define([_LT_CONFIG_STATUS_DECLARE],
  364. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  365. # _LT_CONFIG_STATUS_DECLARATIONS
  366. # ------------------------------
  367. # We delimit libtool config variables with single quotes, so when
  368. # we write them to config.status, we have to be sure to quote all
  369. # embedded single quotes properly. In configure, this macro expands
  370. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  371. #
  372. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  373. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  374. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  375. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  376. # _LT_LIBTOOL_TAGS
  377. # ----------------
  378. # Output comment and list of tags supported by the script
  379. m4_defun([_LT_LIBTOOL_TAGS],
  380. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  381. available_tags="_LT_TAGS"dnl
  382. ])
  383. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  384. # -----------------------------------
  385. # Extract the dictionary values for VARNAME (optionally with TAG) and
  386. # expand to a commented shell variable setting:
  387. #
  388. # # Some comment about what VAR is for.
  389. # visible_name=$lt_internal_name
  390. m4_define([_LT_LIBTOOL_DECLARE],
  391. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  392. [description])))[]dnl
  393. m4_pushdef([_libtool_name],
  394. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  395. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  396. [0], [_libtool_name=[$]$1],
  397. [1], [_libtool_name=$lt_[]$1],
  398. [2], [_libtool_name=$lt_[]$1],
  399. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  400. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  401. ])
  402. # _LT_LIBTOOL_CONFIG_VARS
  403. # -----------------------
  404. # Produce commented declarations of non-tagged libtool config variables
  405. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  406. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  407. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  408. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  409. [m4_foreach([_lt_var],
  410. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  411. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  412. # _LT_LIBTOOL_TAG_VARS(TAG)
  413. # -------------------------
  414. m4_define([_LT_LIBTOOL_TAG_VARS],
  415. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  416. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  417. # _LT_TAGVAR(VARNAME, [TAGNAME])
  418. # ------------------------------
  419. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  420. # _LT_CONFIG_COMMANDS
  421. # -------------------
  422. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  423. # variables for single and double quote escaping we saved from calls
  424. # to _LT_DECL, we can put quote escaped variables declarations
  425. # into `config.status', and then the shell code to quote escape them in
  426. # for loops in `config.status'. Finally, any additional code accumulated
  427. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  428. m4_defun([_LT_CONFIG_COMMANDS],
  429. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  430. dnl If the libtool generation code has been placed in $CONFIG_LT,
  431. dnl instead of duplicating it all over again into config.status,
  432. dnl then we will have config.status run $CONFIG_LT later, so it
  433. dnl needs to know what name is stored there:
  434. [AC_CONFIG_COMMANDS([libtool],
  435. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  436. dnl If the libtool generation code is destined for config.status,
  437. dnl expand the accumulated commands and init code now:
  438. [AC_CONFIG_COMMANDS([libtool],
  439. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  440. ])#_LT_CONFIG_COMMANDS
  441. # Initialize.
  442. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  443. [
  444. # The HP-UX ksh and POSIX shell print the target directory to stdout
  445. # if CDPATH is set.
  446. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  447. sed_quote_subst='$sed_quote_subst'
  448. double_quote_subst='$double_quote_subst'
  449. delay_variable_subst='$delay_variable_subst'
  450. _LT_CONFIG_STATUS_DECLARATIONS
  451. LTCC='$LTCC'
  452. LTCFLAGS='$LTCFLAGS'
  453. compiler='$compiler_DEFAULT'
  454. # A function that is used when there is no print builtin or printf.
  455. func_fallback_echo ()
  456. {
  457. eval 'cat <<_LTECHO_EOF
  458. \$[]1
  459. _LTECHO_EOF'
  460. }
  461. # Quote evaled strings.
  462. for var in lt_decl_all_varnames([[ \
  463. ]], lt_decl_quote_varnames); do
  464. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  465. *[[\\\\\\\`\\"\\\$]]*)
  466. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  467. ;;
  468. *)
  469. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  470. ;;
  471. esac
  472. done
  473. # Double-quote double-evaled strings.
  474. for var in lt_decl_all_varnames([[ \
  475. ]], lt_decl_dquote_varnames); do
  476. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  477. *[[\\\\\\\`\\"\\\$]]*)
  478. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  479. ;;
  480. *)
  481. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  482. ;;
  483. esac
  484. done
  485. _LT_OUTPUT_LIBTOOL_INIT
  486. ])
  487. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  488. # ------------------------------------
  489. # Generate a child script FILE with all initialization necessary to
  490. # reuse the environment learned by the parent script, and make the
  491. # file executable. If COMMENT is supplied, it is inserted after the
  492. # `#!' sequence but before initialization text begins. After this
  493. # macro, additional text can be appended to FILE to form the body of
  494. # the child script. The macro ends with non-zero status if the
  495. # file could not be fully written (such as if the disk is full).
  496. m4_ifdef([AS_INIT_GENERATED],
  497. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  498. [m4_defun([_LT_GENERATED_FILE_INIT],
  499. [m4_require([AS_PREPARE])]dnl
  500. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  501. [lt_write_fail=0
  502. cat >$1 <<_ASEOF || lt_write_fail=1
  503. #! $SHELL
  504. # Generated by $as_me.
  505. $2
  506. SHELL=\${CONFIG_SHELL-$SHELL}
  507. export SHELL
  508. _ASEOF
  509. cat >>$1 <<\_ASEOF || lt_write_fail=1
  510. AS_SHELL_SANITIZE
  511. _AS_PREPARE
  512. exec AS_MESSAGE_FD>&1
  513. _ASEOF
  514. test $lt_write_fail = 0 && chmod +x $1[]dnl
  515. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  516. # LT_OUTPUT
  517. # ---------
  518. # This macro allows early generation of the libtool script (before
  519. # AC_OUTPUT is called), incase it is used in configure for compilation
  520. # tests.
  521. AC_DEFUN([LT_OUTPUT],
  522. [: ${CONFIG_LT=./config.lt}
  523. AC_MSG_NOTICE([creating $CONFIG_LT])
  524. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  525. [# Run this file to recreate a libtool stub with the current configuration.])
  526. cat >>"$CONFIG_LT" <<\_LTEOF
  527. lt_cl_silent=false
  528. exec AS_MESSAGE_LOG_FD>>config.log
  529. {
  530. echo
  531. AS_BOX([Running $as_me.])
  532. } >&AS_MESSAGE_LOG_FD
  533. lt_cl_help="\
  534. \`$as_me' creates a local libtool stub from the current configuration,
  535. for use in further configure time tests before the real libtool is
  536. generated.
  537. Usage: $[0] [[OPTIONS]]
  538. -h, --help print this help, then exit
  539. -V, --version print version number, then exit
  540. -q, --quiet do not print progress messages
  541. -d, --debug don't remove temporary files
  542. Report bugs to <bug-libtool@gnu.org>."
  543. lt_cl_version="\
  544. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  545. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  546. configured by $[0], generated by m4_PACKAGE_STRING.
  547. Copyright (C) 2011 Free Software Foundation, Inc.
  548. This config.lt script is free software; the Free Software Foundation
  549. gives unlimited permision to copy, distribute and modify it."
  550. while test $[#] != 0
  551. do
  552. case $[1] in
  553. --version | --v* | -V )
  554. echo "$lt_cl_version"; exit 0 ;;
  555. --help | --h* | -h )
  556. echo "$lt_cl_help"; exit 0 ;;
  557. --debug | --d* | -d )
  558. debug=: ;;
  559. --quiet | --q* | --silent | --s* | -q )
  560. lt_cl_silent=: ;;
  561. -*) AC_MSG_ERROR([unrecognized option: $[1]
  562. Try \`$[0] --help' for more information.]) ;;
  563. *) AC_MSG_ERROR([unrecognized argument: $[1]
  564. Try \`$[0] --help' for more information.]) ;;
  565. esac
  566. shift
  567. done
  568. if $lt_cl_silent; then
  569. exec AS_MESSAGE_FD>/dev/null
  570. fi
  571. _LTEOF
  572. cat >>"$CONFIG_LT" <<_LTEOF
  573. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  574. _LTEOF
  575. cat >>"$CONFIG_LT" <<\_LTEOF
  576. AC_MSG_NOTICE([creating $ofile])
  577. _LT_OUTPUT_LIBTOOL_COMMANDS
  578. AS_EXIT(0)
  579. _LTEOF
  580. chmod +x "$CONFIG_LT"
  581. # configure is writing to config.log, but config.lt does its own redirection,
  582. # appending to config.log, which fails on DOS, as config.log is still kept
  583. # open by configure. Here we exec the FD to /dev/null, effectively closing
  584. # config.log, so it can be properly (re)opened and appended to by config.lt.
  585. lt_cl_success=:
  586. test "$silent" = yes &&
  587. lt_config_lt_args="$lt_config_lt_args --quiet"
  588. exec AS_MESSAGE_LOG_FD>/dev/null
  589. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  590. exec AS_MESSAGE_LOG_FD>>config.log
  591. $lt_cl_success || AS_EXIT(1)
  592. ])# LT_OUTPUT
  593. # _LT_CONFIG(TAG)
  594. # ---------------
  595. # If TAG is the built-in tag, create an initial libtool script with a
  596. # default configuration from the untagged config vars. Otherwise add code
  597. # to config.status for appending the configuration named by TAG from the
  598. # matching tagged config vars.
  599. m4_defun([_LT_CONFIG],
  600. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  601. _LT_CONFIG_SAVE_COMMANDS([
  602. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  603. m4_if(_LT_TAG, [C], [
  604. # See if we are running on zsh, and set the options which allow our
  605. # commands through without removal of \ escapes.
  606. if test -n "${ZSH_VERSION+set}" ; then
  607. setopt NO_GLOB_SUBST
  608. fi
  609. cfgfile="${ofile}T"
  610. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  611. $RM "$cfgfile"
  612. cat <<_LT_EOF >> "$cfgfile"
  613. #! $SHELL
  614. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  615. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  616. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  617. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  618. #
  619. _LT_COPYING
  620. _LT_LIBTOOL_TAGS
  621. # ### BEGIN LIBTOOL CONFIG
  622. _LT_LIBTOOL_CONFIG_VARS
  623. _LT_LIBTOOL_TAG_VARS
  624. # ### END LIBTOOL CONFIG
  625. _LT_EOF
  626. case $host_os in
  627. aix3*)
  628. cat <<\_LT_EOF >> "$cfgfile"
  629. # AIX sometimes has problems with the GCC collect2 program. For some
  630. # reason, if we set the COLLECT_NAMES environment variable, the problems
  631. # vanish in a puff of smoke.
  632. if test "X${COLLECT_NAMES+set}" != Xset; then
  633. COLLECT_NAMES=
  634. export COLLECT_NAMES
  635. fi
  636. _LT_EOF
  637. ;;
  638. esac
  639. _LT_PROG_LTMAIN
  640. # We use sed instead of cat because bash on DJGPP gets confused if
  641. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  642. # text mode, it properly converts lines to CR/LF. This bash problem
  643. # is reportedly fixed, but why not run on old versions too?
  644. sed '$q' "$ltmain" >> "$cfgfile" \
  645. || (rm -f "$cfgfile"; exit 1)
  646. _LT_PROG_REPLACE_SHELLFNS
  647. mv -f "$cfgfile" "$ofile" ||
  648. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  649. chmod +x "$ofile"
  650. ],
  651. [cat <<_LT_EOF >> "$ofile"
  652. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  653. dnl in a comment (ie after a #).
  654. # ### BEGIN LIBTOOL TAG CONFIG: $1
  655. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  656. # ### END LIBTOOL TAG CONFIG: $1
  657. _LT_EOF
  658. ])dnl /m4_if
  659. ],
  660. [m4_if([$1], [], [
  661. PACKAGE='$PACKAGE'
  662. VERSION='$VERSION'
  663. TIMESTAMP='$TIMESTAMP'
  664. RM='$RM'
  665. ofile='$ofile'], [])
  666. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  667. ])# _LT_CONFIG
  668. # LT_SUPPORTED_TAG(TAG)
  669. # ---------------------
  670. # Trace this macro to discover what tags are supported by the libtool
  671. # --tag option, using:
  672. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  673. AC_DEFUN([LT_SUPPORTED_TAG], [])
  674. # C support is built-in for now
  675. m4_define([_LT_LANG_C_enabled], [])
  676. m4_define([_LT_TAGS], [])
  677. # LT_LANG(LANG)
  678. # -------------
  679. # Enable libtool support for the given language if not already enabled.
  680. AC_DEFUN([LT_LANG],
  681. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  682. m4_case([$1],
  683. [C], [_LT_LANG(C)],
  684. [C++], [_LT_LANG(CXX)],
  685. [Go], [_LT_LANG(GO)],
  686. [Java], [_LT_LANG(GCJ)],
  687. [Fortran 77], [_LT_LANG(F77)],
  688. [Fortran], [_LT_LANG(FC)],
  689. [Windows Resource], [_LT_LANG(RC)],
  690. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  691. [_LT_LANG($1)],
  692. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  693. ])# LT_LANG
  694. # _LT_LANG(LANGNAME)
  695. # ------------------
  696. m4_defun([_LT_LANG],
  697. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  698. [LT_SUPPORTED_TAG([$1])dnl
  699. m4_append([_LT_TAGS], [$1 ])dnl
  700. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  701. _LT_LANG_$1_CONFIG($1)])dnl
  702. ])# _LT_LANG
  703. m4_ifndef([AC_PROG_GO], [
  704. # NOTE: This macro has been submitted for inclusion into #
  705. # GNU Autoconf as AC_PROG_GO. When it is available in #
  706. # a released version of Autoconf we should remove this #
  707. # macro and use it instead. #
  708. m4_defun([AC_PROG_GO],
  709. [AC_LANG_PUSH(Go)dnl
  710. AC_ARG_VAR([GOC], [Go compiler command])dnl
  711. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  712. _AC_ARG_VAR_LDFLAGS()dnl
  713. AC_CHECK_TOOL(GOC, gccgo)
  714. if test -z "$GOC"; then
  715. if test -n "$ac_tool_prefix"; then
  716. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  717. fi
  718. fi
  719. if test -z "$GOC"; then
  720. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  721. fi
  722. ])#m4_defun
  723. ])#m4_ifndef
  724. # _LT_LANG_DEFAULT_CONFIG
  725. # -----------------------
  726. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  727. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  728. [LT_LANG(CXX)],
  729. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  730. AC_PROVIDE_IFELSE([AC_PROG_F77],
  731. [LT_LANG(F77)],
  732. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  733. AC_PROVIDE_IFELSE([AC_PROG_FC],
  734. [LT_LANG(FC)],
  735. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  736. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  737. dnl pulling things in needlessly.
  738. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  739. [LT_LANG(GCJ)],
  740. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  741. [LT_LANG(GCJ)],
  742. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  743. [LT_LANG(GCJ)],
  744. [m4_ifdef([AC_PROG_GCJ],
  745. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  746. m4_ifdef([A][M_PROG_GCJ],
  747. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  748. m4_ifdef([LT_PROG_GCJ],
  749. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  750. AC_PROVIDE_IFELSE([AC_PROG_GO],
  751. [LT_LANG(GO)],
  752. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  753. AC_PROVIDE_IFELSE([LT_PROG_RC],
  754. [LT_LANG(RC)],
  755. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  756. ])# _LT_LANG_DEFAULT_CONFIG
  757. # Obsolete macros:
  758. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  759. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  760. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  761. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  762. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  763. dnl aclocal-1.4 backwards compatibility:
  764. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  765. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  766. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  767. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  768. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  769. # _LT_TAG_COMPILER
  770. # ----------------
  771. m4_defun([_LT_TAG_COMPILER],
  772. [AC_REQUIRE([AC_PROG_CC])dnl
  773. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  774. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  775. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  776. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  777. # If no C compiler was specified, use CC.
  778. LTCC=${LTCC-"$CC"}
  779. # If no C compiler flags were specified, use CFLAGS.
  780. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  781. # Allow CC to be a program name with arguments.
  782. compiler=$CC
  783. ])# _LT_TAG_COMPILER
  784. # _LT_COMPILER_BOILERPLATE
  785. # ------------------------
  786. # Check for compiler boilerplate output or warnings with
  787. # the simple compiler test code.
  788. m4_defun([_LT_COMPILER_BOILERPLATE],
  789. [m4_require([_LT_DECL_SED])dnl
  790. ac_outfile=conftest.$ac_objext
  791. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  792. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  793. _lt_compiler_boilerplate=`cat conftest.err`
  794. $RM conftest*
  795. ])# _LT_COMPILER_BOILERPLATE
  796. # _LT_LINKER_BOILERPLATE
  797. # ----------------------
  798. # Check for linker boilerplate output or warnings with
  799. # the simple link test code.
  800. m4_defun([_LT_LINKER_BOILERPLATE],
  801. [m4_require([_LT_DECL_SED])dnl
  802. ac_outfile=conftest.$ac_objext
  803. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  804. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  805. _lt_linker_boilerplate=`cat conftest.err`
  806. $RM -r conftest*
  807. ])# _LT_LINKER_BOILERPLATE
  808. # _LT_REQUIRED_DARWIN_CHECKS
  809. # -------------------------
  810. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  811. case $host_os in
  812. rhapsody* | darwin*)
  813. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  814. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  815. AC_CHECK_TOOL([LIPO], [lipo], [:])
  816. AC_CHECK_TOOL([OTOOL], [otool], [:])
  817. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  818. _LT_DECL([], [DSYMUTIL], [1],
  819. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  820. _LT_DECL([], [NMEDIT], [1],
  821. [Tool to change global to local symbols on Mac OS X])
  822. _LT_DECL([], [LIPO], [1],
  823. [Tool to manipulate fat objects and archives on Mac OS X])
  824. _LT_DECL([], [OTOOL], [1],
  825. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  826. _LT_DECL([], [OTOOL64], [1],
  827. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  828. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  829. [lt_cv_apple_cc_single_mod=no
  830. if test -z "${LT_MULTI_MODULE}"; then
  831. # By default we will add the -single_module flag. You can override
  832. # by either setting the environment variable LT_MULTI_MODULE
  833. # non-empty at configure time, or by adding -multi_module to the
  834. # link flags.
  835. rm -rf libconftest.dylib*
  836. echo "int foo(void){return 1;}" > conftest.c
  837. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  838. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  839. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  840. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  841. _lt_result=$?
  842. # If there is a non-empty error log, and "single_module"
  843. # appears in it, assume the flag caused a linker warning
  844. if test -s conftest.err && $GREP single_module conftest.err; then
  845. cat conftest.err >&AS_MESSAGE_LOG_FD
  846. # Otherwise, if the output was created with a 0 exit code from
  847. # the compiler, it worked.
  848. elif test -f libconftest.dylib && test $_lt_result -eq 0; then
  849. lt_cv_apple_cc_single_mod=yes
  850. else
  851. cat conftest.err >&AS_MESSAGE_LOG_FD
  852. fi
  853. rm -rf libconftest.dylib*
  854. rm -f conftest.*
  855. fi])
  856. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  857. [lt_cv_ld_exported_symbols_list],
  858. [lt_cv_ld_exported_symbols_list=no
  859. save_LDFLAGS=$LDFLAGS
  860. echo "_main" > conftest.sym
  861. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  862. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  863. [lt_cv_ld_exported_symbols_list=yes],
  864. [lt_cv_ld_exported_symbols_list=no])
  865. LDFLAGS="$save_LDFLAGS"
  866. ])
  867. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  868. [lt_cv_ld_force_load=no
  869. cat > conftest.c << _LT_EOF
  870. int forced_loaded() { return 2;}
  871. _LT_EOF
  872. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  873. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  874. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  875. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  876. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  877. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  878. cat > conftest.c << _LT_EOF
  879. int main() { return 0;}
  880. _LT_EOF
  881. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  882. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  883. _lt_result=$?
  884. if test -s conftest.err && $GREP force_load conftest.err; then
  885. cat conftest.err >&AS_MESSAGE_LOG_FD
  886. elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
  887. lt_cv_ld_force_load=yes
  888. else
  889. cat conftest.err >&AS_MESSAGE_LOG_FD
  890. fi
  891. rm -f conftest.err libconftest.a conftest conftest.c
  892. rm -rf conftest.dSYM
  893. ])
  894. case $host_os in
  895. rhapsody* | darwin1.[[012]])
  896. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  897. darwin1.*)
  898. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  899. darwin*) # darwin 5.x on
  900. # if running on 10.5 or later, the deployment target defaults
  901. # to the OS version, if on x86, and 10.4, the deployment
  902. # target defaults to 10.4. Don't you love it?
  903. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  904. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  905. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  906. 10.[[012]]*)
  907. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  908. 10.*)
  909. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  910. esac
  911. ;;
  912. esac
  913. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  914. _lt_dar_single_mod='$single_module'
  915. fi
  916. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  917. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  918. else
  919. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  920. fi
  921. if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  922. _lt_dsymutil='~$DSYMUTIL $lib || :'
  923. else
  924. _lt_dsymutil=
  925. fi
  926. ;;
  927. esac
  928. ])
  929. # _LT_DARWIN_LINKER_FEATURES([TAG])
  930. # ---------------------------------
  931. # Checks for linker and compiler features on darwin
  932. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  933. [
  934. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  935. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  936. _LT_TAGVAR(hardcode_direct, $1)=no
  937. _LT_TAGVAR(hardcode_automatic, $1)=yes
  938. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  939. if test "$lt_cv_ld_force_load" = "yes"; then
  940. _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
  941. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  942. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  943. else
  944. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  945. fi
  946. _LT_TAGVAR(link_all_deplibs, $1)=yes
  947. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  948. case $cc_basename in
  949. ifort*) _lt_dar_can_shared=yes ;;
  950. *) _lt_dar_can_shared=$GCC ;;
  951. esac
  952. if test "$_lt_dar_can_shared" = "yes"; then
  953. output_verbose_link_cmd=func_echo_all
  954. _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
  955. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  956. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
  957. _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
  958. m4_if([$1], [CXX],
  959. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  960. _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
  961. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
  962. fi
  963. ],[])
  964. else
  965. _LT_TAGVAR(ld_shlibs, $1)=no
  966. fi
  967. ])
  968. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  969. # ----------------------------------
  970. # Links a minimal program and checks the executable
  971. # for the system default hardcoded library path. In most cases,
  972. # this is /usr/lib:/lib, but when the MPI compilers are used
  973. # the location of the communication and MPI libs are included too.
  974. # If we don't find anything, use the default library path according
  975. # to the aix ld manual.
  976. # Store the results from the different compilers for each TAGNAME.
  977. # Allow to override them for all tags through lt_cv_aix_libpath.
  978. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  979. [m4_require([_LT_DECL_SED])dnl
  980. if test "${lt_cv_aix_libpath+set}" = set; then
  981. aix_libpath=$lt_cv_aix_libpath
  982. else
  983. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  984. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  985. lt_aix_libpath_sed='[
  986. /Import File Strings/,/^$/ {
  987. /^0/ {
  988. s/^0 *\([^ ]*\) *$/\1/
  989. p
  990. }
  991. }]'
  992. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  993. # Check for a 64-bit object if we didn't find anything.
  994. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  995. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  996. fi],[])
  997. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  998. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
  999. fi
  1000. ])
  1001. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1002. fi
  1003. ])# _LT_SYS_MODULE_PATH_AIX
  1004. # _LT_SHELL_INIT(ARG)
  1005. # -------------------
  1006. m4_define([_LT_SHELL_INIT],
  1007. [m4_divert_text([M4SH-INIT], [$1
  1008. ])])# _LT_SHELL_INIT
  1009. # _LT_PROG_ECHO_BACKSLASH
  1010. # -----------------------
  1011. # Find how we can fake an echo command that does not interpret backslash.
  1012. # In particular, with Autoconf 2.60 or later we add some code to the start
  1013. # of the generated configure script which will find a shell with a builtin
  1014. # printf (which we can use as an echo command).
  1015. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1016. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1017. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1018. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1019. AC_MSG_CHECKING([how to print strings])
  1020. # Test print first, because it will be a builtin if present.
  1021. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1022. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1023. ECHO='print -r --'
  1024. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1025. ECHO='printf %s\n'
  1026. else
  1027. # Use this function as a fallback that always works.
  1028. func_fallback_echo ()
  1029. {
  1030. eval 'cat <<_LTECHO_EOF
  1031. $[]1
  1032. _LTECHO_EOF'
  1033. }
  1034. ECHO='func_fallback_echo'
  1035. fi
  1036. # func_echo_all arg...
  1037. # Invoke $ECHO with all args, space-separated.
  1038. func_echo_all ()
  1039. {
  1040. $ECHO "$*"
  1041. }
  1042. case "$ECHO" in
  1043. printf*) AC_MSG_RESULT([printf]) ;;
  1044. print*) AC_MSG_RESULT([print -r]) ;;
  1045. *) AC_MSG_RESULT([cat]) ;;
  1046. esac
  1047. m4_ifdef([_AS_DETECT_SUGGESTED],
  1048. [_AS_DETECT_SUGGESTED([
  1049. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1050. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1051. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1052. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1053. PATH=/empty FPATH=/empty; export PATH FPATH
  1054. test "X`printf %s $ECHO`" = "X$ECHO" \
  1055. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1056. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1057. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1058. ])# _LT_PROG_ECHO_BACKSLASH
  1059. # _LT_WITH_SYSROOT
  1060. # ----------------
  1061. AC_DEFUN([_LT_WITH_SYSROOT],
  1062. [AC_MSG_CHECKING([for sysroot])
  1063. AC_ARG_WITH([sysroot],
  1064. [ --with-sysroot[=DIR] Search for dependent libraries within DIR
  1065. (or the compiler's sysroot if not specified).],
  1066. [], [with_sysroot=no])
  1067. dnl lt_sysroot will always be passed unquoted. We quote it here
  1068. dnl in case the user passed a directory name.
  1069. lt_sysroot=
  1070. case ${with_sysroot} in #(
  1071. yes)
  1072. if test "$GCC" = yes; then
  1073. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1074. fi
  1075. ;; #(
  1076. /*)
  1077. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1078. ;; #(
  1079. no|'')
  1080. ;; #(
  1081. *)
  1082. AC_MSG_RESULT([${with_sysroot}])
  1083. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1084. ;;
  1085. esac
  1086. AC_MSG_RESULT([${lt_sysroot:-no}])
  1087. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1088. [dependent libraries, and in which our libraries should be installed.])])
  1089. # _LT_ENABLE_LOCK
  1090. # ---------------
  1091. m4_defun([_LT_ENABLE_LOCK],
  1092. [AC_ARG_ENABLE([libtool-lock],
  1093. [AS_HELP_STRING([--disable-libtool-lock],
  1094. [avoid locking (might break parallel builds)])])
  1095. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1096. # Some flags need to be propagated to the compiler or linker for good
  1097. # libtool support.
  1098. case $host in
  1099. ia64-*-hpux*)
  1100. # Find out which ABI we are using.
  1101. echo 'int i;' > conftest.$ac_ext
  1102. if AC_TRY_EVAL(ac_compile); then
  1103. case `/usr/bin/file conftest.$ac_objext` in
  1104. *ELF-32*)
  1105. HPUX_IA64_MODE="32"
  1106. ;;
  1107. *ELF-64*)
  1108. HPUX_IA64_MODE="64"
  1109. ;;
  1110. esac
  1111. fi
  1112. rm -rf conftest*
  1113. ;;
  1114. *-*-irix6*)
  1115. # Find out which ABI we are using.
  1116. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1117. if AC_TRY_EVAL(ac_compile); then
  1118. if test "$lt_cv_prog_gnu_ld" = yes; then
  1119. case `/usr/bin/file conftest.$ac_objext` in
  1120. *32-bit*)
  1121. LD="${LD-ld} -melf32bsmip"
  1122. ;;
  1123. *N32*)
  1124. LD="${LD-ld} -melf32bmipn32"
  1125. ;;
  1126. *64-bit*)
  1127. LD="${LD-ld} -melf64bmip"
  1128. ;;
  1129. esac
  1130. else
  1131. case `/usr/bin/file conftest.$ac_objext` in
  1132. *32-bit*)
  1133. LD="${LD-ld} -32"
  1134. ;;
  1135. *N32*)
  1136. LD="${LD-ld} -n32"
  1137. ;;
  1138. *64-bit*)
  1139. LD="${LD-ld} -64"
  1140. ;;
  1141. esac
  1142. fi
  1143. fi
  1144. rm -rf conftest*
  1145. ;;
  1146. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1147. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1148. # Find out which ABI we are using.
  1149. echo 'int i;' > conftest.$ac_ext
  1150. if AC_TRY_EVAL(ac_compile); then
  1151. case `/usr/bin/file conftest.o` in
  1152. *32-bit*)
  1153. case $host in
  1154. x86_64-*kfreebsd*-gnu)
  1155. LD="${LD-ld} -m elf_i386_fbsd"
  1156. ;;
  1157. x86_64-*linux*)
  1158. LD="${LD-ld} -m elf_i386"
  1159. ;;
  1160. ppc64-*linux*|powerpc64-*linux*)
  1161. LD="${LD-ld} -m elf32ppclinux"
  1162. ;;
  1163. s390x-*linux*)
  1164. LD="${LD-ld} -m elf_s390"
  1165. ;;
  1166. sparc64-*linux*)
  1167. LD="${LD-ld} -m elf32_sparc"
  1168. ;;
  1169. esac
  1170. ;;
  1171. *64-bit*)
  1172. case $host in
  1173. x86_64-*kfreebsd*-gnu)
  1174. LD="${LD-ld} -m elf_x86_64_fbsd"
  1175. ;;
  1176. x86_64-*linux*)
  1177. LD="${LD-ld} -m elf_x86_64"
  1178. ;;
  1179. ppc*-*linux*|powerpc*-*linux*)
  1180. LD="${LD-ld} -m elf64ppc"
  1181. ;;
  1182. s390*-*linux*|s390*-*tpf*)
  1183. LD="${LD-ld} -m elf64_s390"
  1184. ;;
  1185. sparc*-*linux*)
  1186. LD="${LD-ld} -m elf64_sparc"
  1187. ;;
  1188. esac
  1189. ;;
  1190. esac
  1191. fi
  1192. rm -rf conftest*
  1193. ;;
  1194. *-*-sco3.2v5*)
  1195. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1196. SAVE_CFLAGS="$CFLAGS"
  1197. CFLAGS="$CFLAGS -belf"
  1198. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1199. [AC_LANG_PUSH(C)
  1200. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1201. AC_LANG_POP])
  1202. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1203. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1204. CFLAGS="$SAVE_CFLAGS"
  1205. fi
  1206. ;;
  1207. *-*solaris*)
  1208. # Find out which ABI we are using.
  1209. echo 'int i;' > conftest.$ac_ext
  1210. if AC_TRY_EVAL(ac_compile); then
  1211. case `/usr/bin/file conftest.o` in
  1212. *64-bit*)
  1213. case $lt_cv_prog_gnu_ld in
  1214. yes*)
  1215. case $host in
  1216. i?86-*-solaris*)
  1217. LD="${LD-ld} -m elf_x86_64"
  1218. ;;
  1219. sparc*-*-solaris*)
  1220. LD="${LD-ld} -m elf64_sparc"
  1221. ;;
  1222. esac
  1223. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1224. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1225. LD="${LD-ld}_sol2"
  1226. fi
  1227. ;;
  1228. *)
  1229. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1230. LD="${LD-ld} -64"
  1231. fi
  1232. ;;
  1233. esac
  1234. ;;
  1235. esac
  1236. fi
  1237. rm -rf conftest*
  1238. ;;
  1239. esac
  1240. need_locks="$enable_libtool_lock"
  1241. ])# _LT_ENABLE_LOCK
  1242. # _LT_PROG_AR
  1243. # -----------
  1244. m4_defun([_LT_PROG_AR],
  1245. [AC_CHECK_TOOLS(AR, [ar], false)
  1246. : ${AR=ar}
  1247. : ${AR_FLAGS=cru}
  1248. _LT_DECL([], [AR], [1], [The archiver])
  1249. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1250. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1251. [lt_cv_ar_at_file=no
  1252. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1253. [echo conftest.$ac_objext > conftest.lst
  1254. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1255. AC_TRY_EVAL([lt_ar_try])
  1256. if test "$ac_status" -eq 0; then
  1257. # Ensure the archiver fails upon bogus file names.
  1258. rm -f conftest.$ac_objext libconftest.a
  1259. AC_TRY_EVAL([lt_ar_try])
  1260. if test "$ac_status" -ne 0; then
  1261. lt_cv_ar_at_file=@
  1262. fi
  1263. fi
  1264. rm -f conftest.* libconftest.a
  1265. ])
  1266. ])
  1267. if test "x$lt_cv_ar_at_file" = xno; then
  1268. archiver_list_spec=
  1269. else
  1270. archiver_list_spec=$lt_cv_ar_at_file
  1271. fi
  1272. _LT_DECL([], [archiver_list_spec], [1],
  1273. [How to feed a file listing to the archiver])
  1274. ])# _LT_PROG_AR
  1275. # _LT_CMD_OLD_ARCHIVE
  1276. # -------------------
  1277. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1278. [_LT_PROG_AR
  1279. AC_CHECK_TOOL(STRIP, strip, :)
  1280. test -z "$STRIP" && STRIP=:
  1281. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1282. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1283. test -z "$RANLIB" && RANLIB=:
  1284. _LT_DECL([], [RANLIB], [1],
  1285. [Commands used to install an old-style archive])
  1286. # Determine commands to create old-style static archives.
  1287. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1288. old_postinstall_cmds='chmod 644 $oldlib'
  1289. old_postuninstall_cmds=
  1290. if test -n "$RANLIB"; then
  1291. case $host_os in
  1292. openbsd*)
  1293. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1294. ;;
  1295. *)
  1296. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1297. ;;
  1298. esac
  1299. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1300. fi
  1301. case $host_os in
  1302. darwin*)
  1303. lock_old_archive_extraction=yes ;;
  1304. *)
  1305. lock_old_archive_extraction=no ;;
  1306. esac
  1307. _LT_DECL([], [old_postinstall_cmds], [2])
  1308. _LT_DECL([], [old_postuninstall_cmds], [2])
  1309. _LT_TAGDECL([], [old_archive_cmds], [2],
  1310. [Commands used to build an old-style archive])
  1311. _LT_DECL([], [lock_old_archive_extraction], [0],
  1312. [Whether to use a lock for old archive extraction])
  1313. ])# _LT_CMD_OLD_ARCHIVE
  1314. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1315. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1316. # ----------------------------------------------------------------
  1317. # Check whether the given compiler option works
  1318. AC_DEFUN([_LT_COMPILER_OPTION],
  1319. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1320. m4_require([_LT_DECL_SED])dnl
  1321. AC_CACHE_CHECK([$1], [$2],
  1322. [$2=no
  1323. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1324. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1325. lt_compiler_flag="$3"
  1326. # Insert the option either (1) after the last *FLAGS variable, or
  1327. # (2) before a word containing "conftest.", or (3) at the end.
  1328. # Note that $ac_compile itself does not contain backslashes and begins
  1329. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1330. # The option is referenced via a variable to avoid confusing sed.
  1331. lt_compile=`echo "$ac_compile" | $SED \
  1332. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1333. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1334. -e 's:$: $lt_compiler_flag:'`
  1335. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1336. (eval "$lt_compile" 2>conftest.err)
  1337. ac_status=$?
  1338. cat conftest.err >&AS_MESSAGE_LOG_FD
  1339. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1340. if (exit $ac_status) && test -s "$ac_outfile"; then
  1341. # The compiler can only warn and ignore the option if not recognized
  1342. # So say no if there are warnings other than the usual output.
  1343. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1344. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1345. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1346. $2=yes
  1347. fi
  1348. fi
  1349. $RM conftest*
  1350. ])
  1351. if test x"[$]$2" = xyes; then
  1352. m4_if([$5], , :, [$5])
  1353. else
  1354. m4_if([$6], , :, [$6])
  1355. fi
  1356. ])# _LT_COMPILER_OPTION
  1357. # Old name:
  1358. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1359. dnl aclocal-1.4 backwards compatibility:
  1360. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1361. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1362. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1363. # ----------------------------------------------------
  1364. # Check whether the given linker option works
  1365. AC_DEFUN([_LT_LINKER_OPTION],
  1366. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1367. m4_require([_LT_DECL_SED])dnl
  1368. AC_CACHE_CHECK([$1], [$2],
  1369. [$2=no
  1370. save_LDFLAGS="$LDFLAGS"
  1371. LDFLAGS="$LDFLAGS $3"
  1372. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1373. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1374. # The linker can only warn and ignore the option if not recognized
  1375. # So say no if there are warnings
  1376. if test -s conftest.err; then
  1377. # Append any errors to the config.log.
  1378. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1379. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1380. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1381. if diff conftest.exp conftest.er2 >/dev/null; then
  1382. $2=yes
  1383. fi
  1384. else
  1385. $2=yes
  1386. fi
  1387. fi
  1388. $RM -r conftest*
  1389. LDFLAGS="$save_LDFLAGS"
  1390. ])
  1391. if test x"[$]$2" = xyes; then
  1392. m4_if([$4], , :, [$4])
  1393. else
  1394. m4_if([$5], , :, [$5])
  1395. fi
  1396. ])# _LT_LINKER_OPTION
  1397. # Old name:
  1398. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1399. dnl aclocal-1.4 backwards compatibility:
  1400. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1401. # LT_CMD_MAX_LEN
  1402. #---------------
  1403. AC_DEFUN([LT_CMD_MAX_LEN],
  1404. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1405. # find the maximum length of command line arguments
  1406. AC_MSG_CHECKING([the maximum length of command line arguments])
  1407. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1408. i=0
  1409. teststring="ABCD"
  1410. case $build_os in
  1411. msdosdjgpp*)
  1412. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1413. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1414. # during glob expansion). Even if it were fixed, the result of this
  1415. # check would be larger than it should be.
  1416. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1417. ;;
  1418. gnu*)
  1419. # Under GNU Hurd, this test is not required because there is
  1420. # no limit to the length of command line arguments.
  1421. # Libtool will interpret -1 as no limit whatsoever
  1422. lt_cv_sys_max_cmd_len=-1;
  1423. ;;
  1424. cygwin* | mingw* | cegcc*)
  1425. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1426. # about 5 minutes as the teststring grows exponentially.
  1427. # Worse, since 9x/ME are not pre-emptively multitasking,
  1428. # you end up with a "frozen" computer, even though with patience
  1429. # the test eventually succeeds (with a max line length of 256k).
  1430. # Instead, let's just punt: use the minimum linelength reported by
  1431. # all of the supported platforms: 8192 (on NT/2K/XP).
  1432. lt_cv_sys_max_cmd_len=8192;
  1433. ;;
  1434. mint*)
  1435. # On MiNT this can take a long time and run out of memory.
  1436. lt_cv_sys_max_cmd_len=8192;
  1437. ;;
  1438. amigaos*)
  1439. # On AmigaOS with pdksh, this test takes hours, literally.
  1440. # So we just punt and use a minimum line length of 8192.
  1441. lt_cv_sys_max_cmd_len=8192;
  1442. ;;
  1443. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  1444. # This has been around since 386BSD, at least. Likely further.
  1445. if test -x /sbin/sysctl; then
  1446. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1447. elif test -x /usr/sbin/sysctl; then
  1448. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1449. else
  1450. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1451. fi
  1452. # And add a safety zone
  1453. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1454. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1455. ;;
  1456. interix*)
  1457. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1458. lt_cv_sys_max_cmd_len=196608
  1459. ;;
  1460. os2*)
  1461. # The test takes a long time on OS/2.
  1462. lt_cv_sys_max_cmd_len=8192
  1463. ;;
  1464. osf*)
  1465. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1466. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1467. # nice to cause kernel panics so lets avoid the loop below.
  1468. # First set a reasonable default.
  1469. lt_cv_sys_max_cmd_len=16384
  1470. #
  1471. if test -x /sbin/sysconfig; then
  1472. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1473. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1474. esac
  1475. fi
  1476. ;;
  1477. sco3.2v5*)
  1478. lt_cv_sys_max_cmd_len=102400
  1479. ;;
  1480. sysv5* | sco5v6* | sysv4.2uw2*)
  1481. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1482. if test -n "$kargmax"; then
  1483. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1484. else
  1485. lt_cv_sys_max_cmd_len=32768
  1486. fi
  1487. ;;
  1488. *)
  1489. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1490. if test -n "$lt_cv_sys_max_cmd_len"; then
  1491. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1492. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1493. else
  1494. # Make teststring a little bigger before we do anything with it.
  1495. # a 1K string should be a reasonable start.
  1496. for i in 1 2 3 4 5 6 7 8 ; do
  1497. teststring=$teststring$teststring
  1498. done
  1499. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1500. # If test is not a shell built-in, we'll probably end up computing a
  1501. # maximum length that is only half of the actual maximum length, but
  1502. # we can't tell.
  1503. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
  1504. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  1505. test $i != 17 # 1/2 MB should be enough
  1506. do
  1507. i=`expr $i + 1`
  1508. teststring=$teststring$teststring
  1509. done
  1510. # Only check the string length outside the loop.
  1511. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1512. teststring=
  1513. # Add a significant safety factor because C++ compilers can tack on
  1514. # massive amounts of additional arguments before passing them to the
  1515. # linker. It appears as though 1/2 is a usable value.
  1516. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1517. fi
  1518. ;;
  1519. esac
  1520. ])
  1521. if test -n $lt_cv_sys_max_cmd_len ; then
  1522. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1523. else
  1524. AC_MSG_RESULT(none)
  1525. fi
  1526. max_cmd_len=$lt_cv_sys_max_cmd_len
  1527. _LT_DECL([], [max_cmd_len], [0],
  1528. [What is the maximum length of a command?])
  1529. ])# LT_CMD_MAX_LEN
  1530. # Old name:
  1531. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1532. dnl aclocal-1.4 backwards compatibility:
  1533. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1534. # _LT_HEADER_DLFCN
  1535. # ----------------
  1536. m4_defun([_LT_HEADER_DLFCN],
  1537. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1538. ])# _LT_HEADER_DLFCN
  1539. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1540. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1541. # ----------------------------------------------------------------
  1542. m4_defun([_LT_TRY_DLOPEN_SELF],
  1543. [m4_require([_LT_HEADER_DLFCN])dnl
  1544. if test "$cross_compiling" = yes; then :
  1545. [$4]
  1546. else
  1547. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1548. lt_status=$lt_dlunknown
  1549. cat > conftest.$ac_ext <<_LT_EOF
  1550. [#line $LINENO "configure"
  1551. #include "confdefs.h"
  1552. #if HAVE_DLFCN_H
  1553. #include <dlfcn.h>
  1554. #endif
  1555. #include <stdio.h>
  1556. #ifdef RTLD_GLOBAL
  1557. # define LT_DLGLOBAL RTLD_GLOBAL
  1558. #else
  1559. # ifdef DL_GLOBAL
  1560. # define LT_DLGLOBAL DL_GLOBAL
  1561. # else
  1562. # define LT_DLGLOBAL 0
  1563. # endif
  1564. #endif
  1565. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1566. find out it does not work in some platform. */
  1567. #ifndef LT_DLLAZY_OR_NOW
  1568. # ifdef RTLD_LAZY
  1569. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1570. # else
  1571. # ifdef DL_LAZY
  1572. # define LT_DLLAZY_OR_NOW DL_LAZY
  1573. # else
  1574. # ifdef RTLD_NOW
  1575. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1576. # else
  1577. # ifdef DL_NOW
  1578. # define LT_DLLAZY_OR_NOW DL_NOW
  1579. # else
  1580. # define LT_DLLAZY_OR_NOW 0
  1581. # endif
  1582. # endif
  1583. # endif
  1584. # endif
  1585. #endif
  1586. /* When -fvisbility=hidden is used, assume the code has been annotated
  1587. correspondingly for the symbols needed. */
  1588. #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  1589. int fnord () __attribute__((visibility("default")));
  1590. #endif
  1591. int fnord () { return 42; }
  1592. int main ()
  1593. {
  1594. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1595. int status = $lt_dlunknown;
  1596. if (self)
  1597. {
  1598. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1599. else
  1600. {
  1601. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1602. else puts (dlerror ());
  1603. }
  1604. /* dlclose (self); */
  1605. }
  1606. else
  1607. puts (dlerror ());
  1608. return status;
  1609. }]
  1610. _LT_EOF
  1611. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  1612. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1613. lt_status=$?
  1614. case x$lt_status in
  1615. x$lt_dlno_uscore) $1 ;;
  1616. x$lt_dlneed_uscore) $2 ;;
  1617. x$lt_dlunknown|x*) $3 ;;
  1618. esac
  1619. else :
  1620. # compilation failed
  1621. $3
  1622. fi
  1623. fi
  1624. rm -fr conftest*
  1625. ])# _LT_TRY_DLOPEN_SELF
  1626. # LT_SYS_DLOPEN_SELF
  1627. # ------------------
  1628. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1629. [m4_require([_LT_HEADER_DLFCN])dnl
  1630. if test "x$enable_dlopen" != xyes; then
  1631. enable_dlopen=unknown
  1632. enable_dlopen_self=unknown
  1633. enable_dlopen_self_static=unknown
  1634. else
  1635. lt_cv_dlopen=no
  1636. lt_cv_dlopen_libs=
  1637. case $host_os in
  1638. beos*)
  1639. lt_cv_dlopen="load_add_on"
  1640. lt_cv_dlopen_libs=
  1641. lt_cv_dlopen_self=yes
  1642. ;;
  1643. mingw* | pw32* | cegcc*)
  1644. lt_cv_dlopen="LoadLibrary"
  1645. lt_cv_dlopen_libs=
  1646. ;;
  1647. cygwin*)
  1648. lt_cv_dlopen="dlopen"
  1649. lt_cv_dlopen_libs=
  1650. ;;
  1651. darwin*)
  1652. # if libdl is installed we need to link against it
  1653. AC_CHECK_LIB([dl], [dlopen],
  1654. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  1655. lt_cv_dlopen="dyld"
  1656. lt_cv_dlopen_libs=
  1657. lt_cv_dlopen_self=yes
  1658. ])
  1659. ;;
  1660. *)
  1661. AC_CHECK_FUNC([shl_load],
  1662. [lt_cv_dlopen="shl_load"],
  1663. [AC_CHECK_LIB([dld], [shl_load],
  1664. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  1665. [AC_CHECK_FUNC([dlopen],
  1666. [lt_cv_dlopen="dlopen"],
  1667. [AC_CHECK_LIB([dl], [dlopen],
  1668. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  1669. [AC_CHECK_LIB([svld], [dlopen],
  1670. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  1671. [AC_CHECK_LIB([dld], [dld_link],
  1672. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  1673. ])
  1674. ])
  1675. ])
  1676. ])
  1677. ])
  1678. ;;
  1679. esac
  1680. if test "x$lt_cv_dlopen" != xno; then
  1681. enable_dlopen=yes
  1682. else
  1683. enable_dlopen=no
  1684. fi
  1685. case $lt_cv_dlopen in
  1686. dlopen)
  1687. save_CPPFLAGS="$CPPFLAGS"
  1688. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1689. save_LDFLAGS="$LDFLAGS"
  1690. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1691. save_LIBS="$LIBS"
  1692. LIBS="$lt_cv_dlopen_libs $LIBS"
  1693. AC_CACHE_CHECK([whether a program can dlopen itself],
  1694. lt_cv_dlopen_self, [dnl
  1695. _LT_TRY_DLOPEN_SELF(
  1696. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1697. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1698. ])
  1699. if test "x$lt_cv_dlopen_self" = xyes; then
  1700. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1701. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1702. lt_cv_dlopen_self_static, [dnl
  1703. _LT_TRY_DLOPEN_SELF(
  1704. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1705. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1706. ])
  1707. fi
  1708. CPPFLAGS="$save_CPPFLAGS"
  1709. LDFLAGS="$save_LDFLAGS"
  1710. LIBS="$save_LIBS"
  1711. ;;
  1712. esac
  1713. case $lt_cv_dlopen_self in
  1714. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1715. *) enable_dlopen_self=unknown ;;
  1716. esac
  1717. case $lt_cv_dlopen_self_static in
  1718. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1719. *) enable_dlopen_self_static=unknown ;;
  1720. esac
  1721. fi
  1722. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1723. [Whether dlopen is supported])
  1724. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1725. [Whether dlopen of programs is supported])
  1726. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1727. [Whether dlopen of statically linked programs is supported])
  1728. ])# LT_SYS_DLOPEN_SELF
  1729. # Old name:
  1730. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1731. dnl aclocal-1.4 backwards compatibility:
  1732. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1733. # _LT_COMPILER_C_O([TAGNAME])
  1734. # ---------------------------
  1735. # Check to see if options -c and -o are simultaneously supported by compiler.
  1736. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1737. m4_defun([_LT_COMPILER_C_O],
  1738. [m4_require([_LT_DECL_SED])dnl
  1739. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1740. m4_require([_LT_TAG_COMPILER])dnl
  1741. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1742. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1743. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1744. $RM -r conftest 2>/dev/null
  1745. mkdir conftest
  1746. cd conftest
  1747. mkdir out
  1748. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1749. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1750. # Insert the option either (1) after the last *FLAGS variable, or
  1751. # (2) before a word containing "conftest.", or (3) at the end.
  1752. # Note that $ac_compile itself does not contain backslashes and begins
  1753. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1754. lt_compile=`echo "$ac_compile" | $SED \
  1755. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1756. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1757. -e 's:$: $lt_compiler_flag:'`
  1758. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1759. (eval "$lt_compile" 2>out/conftest.err)
  1760. ac_status=$?
  1761. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1762. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1763. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1764. then
  1765. # The compiler can only warn and ignore the option if not recognized
  1766. # So say no if there are warnings
  1767. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  1768. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1769. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1770. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1771. fi
  1772. fi
  1773. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1774. $RM conftest*
  1775. # SGI C++ compiler will create directory out/ii_files/ for
  1776. # template instantiation
  1777. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1778. $RM out/* && rmdir out
  1779. cd ..
  1780. $RM -r conftest
  1781. $RM conftest*
  1782. ])
  1783. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1784. [Does compiler simultaneously support -c and -o options?])
  1785. ])# _LT_COMPILER_C_O
  1786. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1787. # ----------------------------------
  1788. # Check to see if we can do hard links to lock some files if needed
  1789. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1790. [m4_require([_LT_ENABLE_LOCK])dnl
  1791. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1792. _LT_COMPILER_C_O([$1])
  1793. hard_links="nottested"
  1794. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  1795. # do not overwrite the value of need_locks provided by the user
  1796. AC_MSG_CHECKING([if we can lock with hard links])
  1797. hard_links=yes
  1798. $RM conftest*
  1799. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1800. touch conftest.a
  1801. ln conftest.a conftest.b 2>&5 || hard_links=no
  1802. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1803. AC_MSG_RESULT([$hard_links])
  1804. if test "$hard_links" = no; then
  1805. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  1806. need_locks=warn
  1807. fi
  1808. else
  1809. need_locks=no
  1810. fi
  1811. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1812. ])# _LT_COMPILER_FILE_LOCKS
  1813. # _LT_CHECK_OBJDIR
  1814. # ----------------
  1815. m4_defun([_LT_CHECK_OBJDIR],
  1816. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1817. [rm -f .libs 2>/dev/null
  1818. mkdir .libs 2>/dev/null
  1819. if test -d .libs; then
  1820. lt_cv_objdir=.libs
  1821. else
  1822. # MS-DOS does not allow filenames that begin with a dot.
  1823. lt_cv_objdir=_libs
  1824. fi
  1825. rmdir .libs 2>/dev/null])
  1826. objdir=$lt_cv_objdir
  1827. _LT_DECL([], [objdir], [0],
  1828. [The name of the directory that contains temporary libtool files])dnl
  1829. m4_pattern_allow([LT_OBJDIR])dnl
  1830. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  1831. [Define to the sub-directory in which libtool stores uninstalled libraries.])
  1832. ])# _LT_CHECK_OBJDIR
  1833. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1834. # --------------------------------------
  1835. # Check hardcoding attributes.
  1836. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1837. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1838. _LT_TAGVAR(hardcode_action, $1)=
  1839. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1840. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1841. test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  1842. # We can hardcode non-existent directories.
  1843. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  1844. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1845. # have to relink, otherwise we might link with an installed library
  1846. # when we should be linking with a yet-to-be-installed one
  1847. ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1848. test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  1849. # Linking always hardcodes the temporary library directory.
  1850. _LT_TAGVAR(hardcode_action, $1)=relink
  1851. else
  1852. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1853. _LT_TAGVAR(hardcode_action, $1)=immediate
  1854. fi
  1855. else
  1856. # We cannot hardcode anything, or else we can only hardcode existing
  1857. # directories.
  1858. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1859. fi
  1860. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1861. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  1862. test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  1863. # Fast installation is not supported
  1864. enable_fast_install=no
  1865. elif test "$shlibpath_overrides_runpath" = yes ||
  1866. test "$enable_shared" = no; then
  1867. # Fast installation is not necessary
  1868. enable_fast_install=needless
  1869. fi
  1870. _LT_TAGDECL([], [hardcode_action], [0],
  1871. [How to hardcode a shared library path into an executable])
  1872. ])# _LT_LINKER_HARDCODE_LIBPATH
  1873. # _LT_CMD_STRIPLIB
  1874. # ----------------
  1875. m4_defun([_LT_CMD_STRIPLIB],
  1876. [m4_require([_LT_DECL_EGREP])
  1877. striplib=
  1878. old_striplib=
  1879. AC_MSG_CHECKING([whether stripping libraries is possible])
  1880. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1881. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1882. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1883. AC_MSG_RESULT([yes])
  1884. else
  1885. # FIXME - insert some real tests, host_os isn't really good enough
  1886. case $host_os in
  1887. darwin*)
  1888. if test -n "$STRIP" ; then
  1889. striplib="$STRIP -x"
  1890. old_striplib="$STRIP -S"
  1891. AC_MSG_RESULT([yes])
  1892. else
  1893. AC_MSG_RESULT([no])
  1894. fi
  1895. ;;
  1896. *)
  1897. AC_MSG_RESULT([no])
  1898. ;;
  1899. esac
  1900. fi
  1901. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1902. _LT_DECL([], [striplib], [1])
  1903. ])# _LT_CMD_STRIPLIB
  1904. # _LT_SYS_DYNAMIC_LINKER([TAG])
  1905. # -----------------------------
  1906. # PORTME Fill in your ld.so characteristics
  1907. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  1908. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1909. m4_require([_LT_DECL_EGREP])dnl
  1910. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1911. m4_require([_LT_DECL_OBJDUMP])dnl
  1912. m4_require([_LT_DECL_SED])dnl
  1913. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  1914. AC_MSG_CHECKING([dynamic linker characteristics])
  1915. m4_if([$1],
  1916. [], [
  1917. if test "$GCC" = yes; then
  1918. case $host_os in
  1919. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  1920. *) lt_awk_arg="/^libraries:/" ;;
  1921. esac
  1922. case $host_os in
  1923. mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
  1924. *) lt_sed_strip_eq="s,=/,/,g" ;;
  1925. esac
  1926. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  1927. case $lt_search_path_spec in
  1928. *\;*)
  1929. # if the path contains ";" then we assume it to be the separator
  1930. # otherwise default to the standard path separator (i.e. ":") - it is
  1931. # assumed that no part of a normal pathname contains ";" but that should
  1932. # okay in the real world where ";" in dirpaths is itself problematic.
  1933. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  1934. ;;
  1935. *)
  1936. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  1937. ;;
  1938. esac
  1939. # Ok, now we have the path, separated by spaces, we can step through it
  1940. # and add multilib dir if necessary.
  1941. lt_tmp_lt_search_path_spec=
  1942. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  1943. for lt_sys_path in $lt_search_path_spec; do
  1944. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  1945. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  1946. else
  1947. test -d "$lt_sys_path" && \
  1948. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  1949. fi
  1950. done
  1951. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  1952. BEGIN {RS=" "; FS="/|\n";} {
  1953. lt_foo="";
  1954. lt_count=0;
  1955. for (lt_i = NF; lt_i > 0; lt_i--) {
  1956. if ($lt_i != "" && $lt_i != ".") {
  1957. if ($lt_i == "..") {
  1958. lt_count++;
  1959. } else {
  1960. if (lt_count == 0) {
  1961. lt_foo="/" $lt_i lt_foo;
  1962. } else {
  1963. lt_count--;
  1964. }
  1965. }
  1966. }
  1967. }
  1968. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  1969. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  1970. }'`
  1971. # AWK program above erroneously prepends '/' to C:/dos/paths
  1972. # for these hosts.
  1973. case $host_os in
  1974. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  1975. $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
  1976. esac
  1977. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  1978. else
  1979. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1980. fi])
  1981. library_names_spec=
  1982. libname_spec='lib$name'
  1983. soname_spec=
  1984. shrext_cmds=".so"
  1985. postinstall_cmds=
  1986. postuninstall_cmds=
  1987. finish_cmds=
  1988. finish_eval=
  1989. shlibpath_var=
  1990. shlibpath_overrides_runpath=unknown
  1991. version_type=none
  1992. dynamic_linker="$host_os ld.so"
  1993. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1994. need_lib_prefix=unknown
  1995. hardcode_into_libs=no
  1996. # when you set need_version to no, make sure it does not cause -set_version
  1997. # flags to be left without arguments
  1998. need_version=unknown
  1999. case $host_os in
  2000. aix3*)
  2001. version_type=linux # correct to gnu/linux during the next big refactor
  2002. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  2003. shlibpath_var=LIBPATH
  2004. # AIX 3 has no versioning support, so we append a major version to the name.
  2005. soname_spec='${libname}${release}${shared_ext}$major'
  2006. ;;
  2007. aix[[4-9]]*)
  2008. version_type=linux # correct to gnu/linux during the next big refactor
  2009. need_lib_prefix=no
  2010. need_version=no
  2011. hardcode_into_libs=yes
  2012. if test "$host_cpu" = ia64; then
  2013. # AIX 5 supports IA64
  2014. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  2015. shlibpath_var=LD_LIBRARY_PATH
  2016. else
  2017. # With GCC up to 2.95.x, collect2 would create an import file
  2018. # for dependence libraries. The import file would start with
  2019. # the line `#! .'. This would cause the generated library to
  2020. # depend on `.', always an invalid library. This was fixed in
  2021. # development snapshots of GCC prior to 3.0.
  2022. case $host_os in
  2023. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2024. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2025. echo ' yes '
  2026. echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  2027. :
  2028. else
  2029. can_build_shared=no
  2030. fi
  2031. ;;
  2032. esac
  2033. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  2034. # soname into executable. Probably we can add versioning support to
  2035. # collect2, so additional links can be useful in future.
  2036. if test "$aix_use_runtimelinking" = yes; then
  2037. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2038. # instead of lib<name>.a to let people know that these are not
  2039. # typical AIX shared libraries.
  2040. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2041. else
  2042. # We preserve .a as extension for shared libraries through AIX4.2
  2043. # and later when we are not doing run time linking.
  2044. library_names_spec='${libname}${release}.a $libname.a'
  2045. soname_spec='${libname}${release}${shared_ext}$major'
  2046. fi
  2047. shlibpath_var=LIBPATH
  2048. fi
  2049. ;;
  2050. amigaos*)
  2051. case $host_cpu in
  2052. powerpc)
  2053. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2054. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2055. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2056. ;;
  2057. m68k)
  2058. library_names_spec='$libname.ixlibrary $libname.a'
  2059. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2060. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  2061. ;;
  2062. esac
  2063. ;;
  2064. beos*)
  2065. library_names_spec='${libname}${shared_ext}'
  2066. dynamic_linker="$host_os ld.so"
  2067. shlibpath_var=LIBRARY_PATH
  2068. ;;
  2069. bsdi[[45]]*)
  2070. version_type=linux # correct to gnu/linux during the next big refactor
  2071. need_version=no
  2072. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2073. soname_spec='${libname}${release}${shared_ext}$major'
  2074. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2075. shlibpath_var=LD_LIBRARY_PATH
  2076. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2077. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2078. # the default ld.so.conf also contains /usr/contrib/lib and
  2079. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2080. # libtool to hard-code these into programs
  2081. ;;
  2082. cygwin* | mingw* | pw32* | cegcc*)
  2083. version_type=windows
  2084. shrext_cmds=".dll"
  2085. need_version=no
  2086. need_lib_prefix=no
  2087. case $GCC,$cc_basename in
  2088. yes,*)
  2089. # gcc
  2090. library_names_spec='$libname.dll.a'
  2091. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2092. postinstall_cmds='base_file=`basename \${file}`~
  2093. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2094. dldir=$destdir/`dirname \$dlpath`~
  2095. test -d \$dldir || mkdir -p \$dldir~
  2096. $install_prog $dir/$dlname \$dldir/$dlname~
  2097. chmod a+x \$dldir/$dlname~
  2098. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2099. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2100. fi'
  2101. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2102. dlpath=$dir/\$dldll~
  2103. $RM \$dlpath'
  2104. shlibpath_overrides_runpath=yes
  2105. case $host_os in
  2106. cygwin*)
  2107. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2108. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2109. m4_if([$1], [],[
  2110. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2111. ;;
  2112. mingw* | cegcc*)
  2113. # MinGW DLLs use traditional 'lib' prefix
  2114. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2115. ;;
  2116. pw32*)
  2117. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2118. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2119. ;;
  2120. esac
  2121. dynamic_linker='Win32 ld.exe'
  2122. ;;
  2123. *,cl*)
  2124. # Native MSVC
  2125. libname_spec='$name'
  2126. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2127. library_names_spec='${libname}.dll.lib'
  2128. case $build_os in
  2129. mingw*)
  2130. sys_lib_search_path_spec=
  2131. lt_save_ifs=$IFS
  2132. IFS=';'
  2133. for lt_path in $LIB
  2134. do
  2135. IFS=$lt_save_ifs
  2136. # Let DOS variable expansion print the short 8.3 style file name.
  2137. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2138. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2139. done
  2140. IFS=$lt_save_ifs
  2141. # Convert to MSYS style.
  2142. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2143. ;;
  2144. cygwin*)
  2145. # Convert to unix form, then to dos form, then back to unix form
  2146. # but this time dos style (no spaces!) so that the unix form looks
  2147. # like /cygdrive/c/PROGRA~1:/cygdr...
  2148. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2149. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2150. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2151. ;;
  2152. *)
  2153. sys_lib_search_path_spec="$LIB"
  2154. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2155. # It is most probably a Windows format PATH.
  2156. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2157. else
  2158. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2159. fi
  2160. # FIXME: find the short name or the path components, as spaces are
  2161. # common. (e.g. "Program Files" -> "PROGRA~1")
  2162. ;;
  2163. esac
  2164. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2165. postinstall_cmds='base_file=`basename \${file}`~
  2166. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2167. dldir=$destdir/`dirname \$dlpath`~
  2168. test -d \$dldir || mkdir -p \$dldir~
  2169. $install_prog $dir/$dlname \$dldir/$dlname'
  2170. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2171. dlpath=$dir/\$dldll~
  2172. $RM \$dlpath'
  2173. shlibpath_overrides_runpath=yes
  2174. dynamic_linker='Win32 link.exe'
  2175. ;;
  2176. *)
  2177. # Assume MSVC wrapper
  2178. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  2179. dynamic_linker='Win32 ld.exe'
  2180. ;;
  2181. esac
  2182. # FIXME: first we should search . and the directory the executable is in
  2183. shlibpath_var=PATH
  2184. ;;
  2185. darwin* | rhapsody*)
  2186. dynamic_linker="$host_os dyld"
  2187. version_type=darwin
  2188. need_lib_prefix=no
  2189. need_version=no
  2190. library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  2191. soname_spec='${libname}${release}${major}$shared_ext'
  2192. shlibpath_overrides_runpath=yes
  2193. shlibpath_var=DYLD_LIBRARY_PATH
  2194. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2195. m4_if([$1], [],[
  2196. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2197. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2198. ;;
  2199. dgux*)
  2200. version_type=linux # correct to gnu/linux during the next big refactor
  2201. need_lib_prefix=no
  2202. need_version=no
  2203. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  2204. soname_spec='${libname}${release}${shared_ext}$major'
  2205. shlibpath_var=LD_LIBRARY_PATH
  2206. ;;
  2207. freebsd* | dragonfly*)
  2208. # DragonFly does not have aout. When/if they implement a new
  2209. # versioning mechanism, adjust this.
  2210. if test -x /usr/bin/objformat; then
  2211. objformat=`/usr/bin/objformat`
  2212. else
  2213. case $host_os in
  2214. freebsd[[23]].*) objformat=aout ;;
  2215. *) objformat=elf ;;
  2216. esac
  2217. fi
  2218. version_type=freebsd-$objformat
  2219. case $version_type in
  2220. freebsd-elf*)
  2221. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2222. need_version=no
  2223. need_lib_prefix=no
  2224. ;;
  2225. freebsd-*)
  2226. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  2227. need_version=yes
  2228. ;;
  2229. esac
  2230. shlibpath_var=LD_LIBRARY_PATH
  2231. case $host_os in
  2232. freebsd2.*)
  2233. shlibpath_overrides_runpath=yes
  2234. ;;
  2235. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2236. shlibpath_overrides_runpath=yes
  2237. hardcode_into_libs=yes
  2238. ;;
  2239. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2240. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2241. shlibpath_overrides_runpath=no
  2242. hardcode_into_libs=yes
  2243. ;;
  2244. *) # from 4.6 on, and DragonFly
  2245. shlibpath_overrides_runpath=yes
  2246. hardcode_into_libs=yes
  2247. ;;
  2248. esac
  2249. ;;
  2250. haiku*)
  2251. version_type=linux # correct to gnu/linux during the next big refactor
  2252. need_lib_prefix=no
  2253. need_version=no
  2254. dynamic_linker="$host_os runtime_loader"
  2255. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2256. soname_spec='${libname}${release}${shared_ext}$major'
  2257. shlibpath_var=LIBRARY_PATH
  2258. shlibpath_overrides_runpath=yes
  2259. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2260. hardcode_into_libs=yes
  2261. ;;
  2262. hpux9* | hpux10* | hpux11*)
  2263. # Give a soname corresponding to the major version so that dld.sl refuses to
  2264. # link against other versions.
  2265. version_type=sunos
  2266. need_lib_prefix=no
  2267. need_version=no
  2268. case $host_cpu in
  2269. ia64*)
  2270. shrext_cmds='.so'
  2271. hardcode_into_libs=yes
  2272. dynamic_linker="$host_os dld.so"
  2273. shlibpath_var=LD_LIBRARY_PATH
  2274. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2275. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2276. soname_spec='${libname}${release}${shared_ext}$major'
  2277. if test "X$HPUX_IA64_MODE" = X32; then
  2278. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2279. else
  2280. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2281. fi
  2282. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2283. ;;
  2284. hppa*64*)
  2285. shrext_cmds='.sl'
  2286. hardcode_into_libs=yes
  2287. dynamic_linker="$host_os dld.sl"
  2288. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2289. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2290. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2291. soname_spec='${libname}${release}${shared_ext}$major'
  2292. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2293. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2294. ;;
  2295. *)
  2296. shrext_cmds='.sl'
  2297. dynamic_linker="$host_os dld.sl"
  2298. shlibpath_var=SHLIB_PATH
  2299. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2300. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2301. soname_spec='${libname}${release}${shared_ext}$major'
  2302. ;;
  2303. esac
  2304. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2305. postinstall_cmds='chmod 555 $lib'
  2306. # or fails outright, so override atomically:
  2307. install_override_mode=555
  2308. ;;
  2309. interix[[3-9]]*)
  2310. version_type=linux # correct to gnu/linux during the next big refactor
  2311. need_lib_prefix=no
  2312. need_version=no
  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. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2316. shlibpath_var=LD_LIBRARY_PATH
  2317. shlibpath_overrides_runpath=no
  2318. hardcode_into_libs=yes
  2319. ;;
  2320. irix5* | irix6* | nonstopux*)
  2321. case $host_os in
  2322. nonstopux*) version_type=nonstopux ;;
  2323. *)
  2324. if test "$lt_cv_prog_gnu_ld" = yes; then
  2325. version_type=linux # correct to gnu/linux during the next big refactor
  2326. else
  2327. version_type=irix
  2328. fi ;;
  2329. esac
  2330. need_lib_prefix=no
  2331. need_version=no
  2332. soname_spec='${libname}${release}${shared_ext}$major'
  2333. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  2334. case $host_os in
  2335. irix5* | nonstopux*)
  2336. libsuff= shlibsuff=
  2337. ;;
  2338. *)
  2339. case $LD in # libtool.m4 will add one of these switches to LD
  2340. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  2341. libsuff= shlibsuff= libmagic=32-bit;;
  2342. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  2343. libsuff=32 shlibsuff=N32 libmagic=N32;;
  2344. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  2345. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2346. *) libsuff= shlibsuff= libmagic=never-match;;
  2347. esac
  2348. ;;
  2349. esac
  2350. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2351. shlibpath_overrides_runpath=no
  2352. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2353. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2354. hardcode_into_libs=yes
  2355. ;;
  2356. # No shared lib support for Linux oldld, aout, or coff.
  2357. linux*oldld* | linux*aout* | linux*coff*)
  2358. dynamic_linker=no
  2359. ;;
  2360. # This must be glibc/ELF.
  2361. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2362. version_type=linux # correct to gnu/linux during the next big refactor
  2363. need_lib_prefix=no
  2364. need_version=no
  2365. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2366. soname_spec='${libname}${release}${shared_ext}$major'
  2367. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2368. shlibpath_var=LD_LIBRARY_PATH
  2369. shlibpath_overrides_runpath=no
  2370. # Some binutils ld are patched to set DT_RUNPATH
  2371. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  2372. [lt_cv_shlibpath_overrides_runpath=no
  2373. save_LDFLAGS=$LDFLAGS
  2374. save_libdir=$libdir
  2375. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  2376. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  2377. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  2378. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  2379. [lt_cv_shlibpath_overrides_runpath=yes])])
  2380. LDFLAGS=$save_LDFLAGS
  2381. libdir=$save_libdir
  2382. ])
  2383. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  2384. # This implies no fast_install, which is unacceptable.
  2385. # Some rework will be needed to allow for fast_install
  2386. # before this can be enabled.
  2387. hardcode_into_libs=yes
  2388. # Append ld.so.conf contents to the search path
  2389. if test -f /etc/ld.so.conf; then
  2390. 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' ' '`
  2391. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2392. fi
  2393. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2394. # powerpc, because MkLinux only supported shared libraries with the
  2395. # GNU dynamic linker. Since this was broken with cross compilers,
  2396. # most powerpc-linux boxes support dynamic linking these days and
  2397. # people can always --disable-shared, the test was removed, and we
  2398. # assume the GNU/Linux dynamic linker is in use.
  2399. dynamic_linker='GNU/Linux ld.so'
  2400. ;;
  2401. netbsdelf*-gnu)
  2402. version_type=linux
  2403. need_lib_prefix=no
  2404. need_version=no
  2405. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2406. soname_spec='${libname}${release}${shared_ext}$major'
  2407. shlibpath_var=LD_LIBRARY_PATH
  2408. shlibpath_overrides_runpath=no
  2409. hardcode_into_libs=yes
  2410. dynamic_linker='NetBSD ld.elf_so'
  2411. ;;
  2412. netbsd*)
  2413. version_type=sunos
  2414. need_lib_prefix=no
  2415. need_version=no
  2416. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  2417. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2418. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2419. dynamic_linker='NetBSD (a.out) ld.so'
  2420. else
  2421. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2422. soname_spec='${libname}${release}${shared_ext}$major'
  2423. dynamic_linker='NetBSD ld.elf_so'
  2424. fi
  2425. shlibpath_var=LD_LIBRARY_PATH
  2426. shlibpath_overrides_runpath=yes
  2427. hardcode_into_libs=yes
  2428. ;;
  2429. newsos6)
  2430. version_type=linux # correct to gnu/linux during the next big refactor
  2431. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2432. shlibpath_var=LD_LIBRARY_PATH
  2433. shlibpath_overrides_runpath=yes
  2434. ;;
  2435. *nto* | *qnx*)
  2436. version_type=qnx
  2437. need_lib_prefix=no
  2438. need_version=no
  2439. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2440. soname_spec='${libname}${release}${shared_ext}$major'
  2441. shlibpath_var=LD_LIBRARY_PATH
  2442. shlibpath_overrides_runpath=no
  2443. hardcode_into_libs=yes
  2444. dynamic_linker='ldqnx.so'
  2445. ;;
  2446. openbsd*)
  2447. version_type=sunos
  2448. sys_lib_dlsearch_path_spec="/usr/lib"
  2449. need_lib_prefix=no
  2450. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  2451. case $host_os in
  2452. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  2453. *) need_version=no ;;
  2454. esac
  2455. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2456. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2457. shlibpath_var=LD_LIBRARY_PATH
  2458. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2459. case $host_os in
  2460. openbsd2.[[89]] | openbsd2.[[89]].*)
  2461. shlibpath_overrides_runpath=no
  2462. ;;
  2463. *)
  2464. shlibpath_overrides_runpath=yes
  2465. ;;
  2466. esac
  2467. else
  2468. shlibpath_overrides_runpath=yes
  2469. fi
  2470. ;;
  2471. os2*)
  2472. libname_spec='$name'
  2473. shrext_cmds=".dll"
  2474. need_lib_prefix=no
  2475. library_names_spec='$libname${shared_ext} $libname.a'
  2476. dynamic_linker='OS/2 ld.exe'
  2477. shlibpath_var=LIBPATH
  2478. ;;
  2479. osf3* | osf4* | osf5*)
  2480. version_type=osf
  2481. need_lib_prefix=no
  2482. need_version=no
  2483. soname_spec='${libname}${release}${shared_ext}$major'
  2484. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2485. shlibpath_var=LD_LIBRARY_PATH
  2486. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2487. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2488. ;;
  2489. rdos*)
  2490. dynamic_linker=no
  2491. ;;
  2492. solaris*)
  2493. version_type=linux # correct to gnu/linux during the next big refactor
  2494. need_lib_prefix=no
  2495. need_version=no
  2496. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2497. soname_spec='${libname}${release}${shared_ext}$major'
  2498. shlibpath_var=LD_LIBRARY_PATH
  2499. shlibpath_overrides_runpath=yes
  2500. hardcode_into_libs=yes
  2501. # ldd complains unless libraries are executable
  2502. postinstall_cmds='chmod +x $lib'
  2503. ;;
  2504. sunos4*)
  2505. version_type=sunos
  2506. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2507. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2508. shlibpath_var=LD_LIBRARY_PATH
  2509. shlibpath_overrides_runpath=yes
  2510. if test "$with_gnu_ld" = yes; then
  2511. need_lib_prefix=no
  2512. fi
  2513. need_version=yes
  2514. ;;
  2515. sysv4 | sysv4.3*)
  2516. version_type=linux # correct to gnu/linux during the next big refactor
  2517. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2518. soname_spec='${libname}${release}${shared_ext}$major'
  2519. shlibpath_var=LD_LIBRARY_PATH
  2520. case $host_vendor in
  2521. sni)
  2522. shlibpath_overrides_runpath=no
  2523. need_lib_prefix=no
  2524. runpath_var=LD_RUN_PATH
  2525. ;;
  2526. siemens)
  2527. need_lib_prefix=no
  2528. ;;
  2529. motorola)
  2530. need_lib_prefix=no
  2531. need_version=no
  2532. shlibpath_overrides_runpath=no
  2533. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2534. ;;
  2535. esac
  2536. ;;
  2537. sysv4*MP*)
  2538. if test -d /usr/nec ;then
  2539. version_type=linux # correct to gnu/linux during the next big refactor
  2540. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  2541. soname_spec='$libname${shared_ext}.$major'
  2542. shlibpath_var=LD_LIBRARY_PATH
  2543. fi
  2544. ;;
  2545. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2546. version_type=freebsd-elf
  2547. need_lib_prefix=no
  2548. need_version=no
  2549. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2550. soname_spec='${libname}${release}${shared_ext}$major'
  2551. shlibpath_var=LD_LIBRARY_PATH
  2552. shlibpath_overrides_runpath=yes
  2553. hardcode_into_libs=yes
  2554. if test "$with_gnu_ld" = yes; then
  2555. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  2556. else
  2557. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  2558. case $host_os in
  2559. sco3.2v5*)
  2560. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  2561. ;;
  2562. esac
  2563. fi
  2564. sys_lib_dlsearch_path_spec='/usr/lib'
  2565. ;;
  2566. tpf*)
  2567. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  2568. version_type=linux # correct to gnu/linux during the next big refactor
  2569. need_lib_prefix=no
  2570. need_version=no
  2571. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2572. shlibpath_var=LD_LIBRARY_PATH
  2573. shlibpath_overrides_runpath=no
  2574. hardcode_into_libs=yes
  2575. ;;
  2576. uts4*)
  2577. version_type=linux # correct to gnu/linux during the next big refactor
  2578. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2579. soname_spec='${libname}${release}${shared_ext}$major'
  2580. shlibpath_var=LD_LIBRARY_PATH
  2581. ;;
  2582. *)
  2583. dynamic_linker=no
  2584. ;;
  2585. esac
  2586. AC_MSG_RESULT([$dynamic_linker])
  2587. test "$dynamic_linker" = no && can_build_shared=no
  2588. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2589. if test "$GCC" = yes; then
  2590. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2591. fi
  2592. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  2593. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  2594. fi
  2595. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  2596. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  2597. fi
  2598. _LT_DECL([], [variables_saved_for_relink], [1],
  2599. [Variables whose values should be saved in libtool wrapper scripts and
  2600. restored at link time])
  2601. _LT_DECL([], [need_lib_prefix], [0],
  2602. [Do we need the "lib" prefix for modules?])
  2603. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  2604. _LT_DECL([], [version_type], [0], [Library versioning type])
  2605. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  2606. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  2607. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  2608. [Is shlibpath searched before the hard-coded library search path?])
  2609. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  2610. _LT_DECL([], [library_names_spec], [1],
  2611. [[List of archive names. First name is the real one, the rest are links.
  2612. The last name is the one that the linker finds with -lNAME]])
  2613. _LT_DECL([], [soname_spec], [1],
  2614. [[The coded name of the library, if different from the real name]])
  2615. _LT_DECL([], [install_override_mode], [1],
  2616. [Permission mode override for installation of shared libraries])
  2617. _LT_DECL([], [postinstall_cmds], [2],
  2618. [Command to use after installation of a shared archive])
  2619. _LT_DECL([], [postuninstall_cmds], [2],
  2620. [Command to use after uninstallation of a shared archive])
  2621. _LT_DECL([], [finish_cmds], [2],
  2622. [Commands used to finish a libtool library installation in a directory])
  2623. _LT_DECL([], [finish_eval], [1],
  2624. [[As "finish_cmds", except a single script fragment to be evaled but
  2625. not shown]])
  2626. _LT_DECL([], [hardcode_into_libs], [0],
  2627. [Whether we should hardcode library paths into libraries])
  2628. _LT_DECL([], [sys_lib_search_path_spec], [2],
  2629. [Compile-time system search path for libraries])
  2630. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  2631. [Run-time system search path for libraries])
  2632. ])# _LT_SYS_DYNAMIC_LINKER
  2633. # _LT_PATH_TOOL_PREFIX(TOOL)
  2634. # --------------------------
  2635. # find a file program which can recognize shared library
  2636. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  2637. [m4_require([_LT_DECL_EGREP])dnl
  2638. AC_MSG_CHECKING([for $1])
  2639. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2640. [case $MAGIC_CMD in
  2641. [[\\/*] | ?:[\\/]*])
  2642. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  2643. ;;
  2644. *)
  2645. lt_save_MAGIC_CMD="$MAGIC_CMD"
  2646. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2647. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2648. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2649. dnl not every word. This closes a longstanding sh security hole.
  2650. ac_dummy="m4_if([$2], , $PATH, [$2])"
  2651. for ac_dir in $ac_dummy; do
  2652. IFS="$lt_save_ifs"
  2653. test -z "$ac_dir" && ac_dir=.
  2654. if test -f $ac_dir/$1; then
  2655. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  2656. if test -n "$file_magic_test_file"; then
  2657. case $deplibs_check_method in
  2658. "file_magic "*)
  2659. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  2660. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2661. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2662. $EGREP "$file_magic_regex" > /dev/null; then
  2663. :
  2664. else
  2665. cat <<_LT_EOF 1>&2
  2666. *** Warning: the command libtool uses to detect shared libraries,
  2667. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2668. *** The result is that libtool may fail to recognize shared libraries
  2669. *** as such. This will affect the creation of libtool libraries that
  2670. *** depend on shared libraries, but programs linked with such libtool
  2671. *** libraries will work regardless of this problem. Nevertheless, you
  2672. *** may want to report the problem to your system manager and/or to
  2673. *** bug-libtool@gnu.org
  2674. _LT_EOF
  2675. fi ;;
  2676. esac
  2677. fi
  2678. break
  2679. fi
  2680. done
  2681. IFS="$lt_save_ifs"
  2682. MAGIC_CMD="$lt_save_MAGIC_CMD"
  2683. ;;
  2684. esac])
  2685. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2686. if test -n "$MAGIC_CMD"; then
  2687. AC_MSG_RESULT($MAGIC_CMD)
  2688. else
  2689. AC_MSG_RESULT(no)
  2690. fi
  2691. _LT_DECL([], [MAGIC_CMD], [0],
  2692. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  2693. ])# _LT_PATH_TOOL_PREFIX
  2694. # Old name:
  2695. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  2696. dnl aclocal-1.4 backwards compatibility:
  2697. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  2698. # _LT_PATH_MAGIC
  2699. # --------------
  2700. # find a file program which can recognize a shared library
  2701. m4_defun([_LT_PATH_MAGIC],
  2702. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2703. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2704. if test -n "$ac_tool_prefix"; then
  2705. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2706. else
  2707. MAGIC_CMD=:
  2708. fi
  2709. fi
  2710. ])# _LT_PATH_MAGIC
  2711. # LT_PATH_LD
  2712. # ----------
  2713. # find the pathname to the GNU or non-GNU linker
  2714. AC_DEFUN([LT_PATH_LD],
  2715. [AC_REQUIRE([AC_PROG_CC])dnl
  2716. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2717. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2718. m4_require([_LT_DECL_SED])dnl
  2719. m4_require([_LT_DECL_EGREP])dnl
  2720. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  2721. AC_ARG_WITH([gnu-ld],
  2722. [AS_HELP_STRING([--with-gnu-ld],
  2723. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2724. [test "$withval" = no || with_gnu_ld=yes],
  2725. [with_gnu_ld=no])dnl
  2726. ac_prog=ld
  2727. if test "$GCC" = yes; then
  2728. # Check if gcc -print-prog-name=ld gives a path.
  2729. AC_MSG_CHECKING([for ld used by $CC])
  2730. case $host in
  2731. *-*-mingw*)
  2732. # gcc leaves a trailing carriage return which upsets mingw
  2733. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2734. *)
  2735. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2736. esac
  2737. case $ac_prog in
  2738. # Accept absolute paths.
  2739. [[\\/]]* | ?:[[\\/]]*)
  2740. re_direlt='/[[^/]][[^/]]*/\.\./'
  2741. # Canonicalize the pathname of ld
  2742. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  2743. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  2744. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  2745. done
  2746. test -z "$LD" && LD="$ac_prog"
  2747. ;;
  2748. "")
  2749. # If it fails, then pretend we aren't using GCC.
  2750. ac_prog=ld
  2751. ;;
  2752. *)
  2753. # If it is relative, then search for the first ld in PATH.
  2754. with_gnu_ld=unknown
  2755. ;;
  2756. esac
  2757. elif test "$with_gnu_ld" = yes; then
  2758. AC_MSG_CHECKING([for GNU ld])
  2759. else
  2760. AC_MSG_CHECKING([for non-GNU ld])
  2761. fi
  2762. AC_CACHE_VAL(lt_cv_path_LD,
  2763. [if test -z "$LD"; then
  2764. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2765. for ac_dir in $PATH; do
  2766. IFS="$lt_save_ifs"
  2767. test -z "$ac_dir" && ac_dir=.
  2768. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2769. lt_cv_path_LD="$ac_dir/$ac_prog"
  2770. # Check to see if the program is GNU ld. I'd rather use --version,
  2771. # but apparently some variants of GNU ld only accept -v.
  2772. # Break only if it was the GNU/non-GNU ld that we prefer.
  2773. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2774. *GNU* | *'with BFD'*)
  2775. test "$with_gnu_ld" != no && break
  2776. ;;
  2777. *)
  2778. test "$with_gnu_ld" != yes && break
  2779. ;;
  2780. esac
  2781. fi
  2782. done
  2783. IFS="$lt_save_ifs"
  2784. else
  2785. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  2786. fi])
  2787. LD="$lt_cv_path_LD"
  2788. if test -n "$LD"; then
  2789. AC_MSG_RESULT($LD)
  2790. else
  2791. AC_MSG_RESULT(no)
  2792. fi
  2793. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2794. _LT_PATH_LD_GNU
  2795. AC_SUBST([LD])
  2796. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  2797. ])# LT_PATH_LD
  2798. # Old names:
  2799. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  2800. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  2801. dnl aclocal-1.4 backwards compatibility:
  2802. dnl AC_DEFUN([AM_PROG_LD], [])
  2803. dnl AC_DEFUN([AC_PROG_LD], [])
  2804. # _LT_PATH_LD_GNU
  2805. #- --------------
  2806. m4_defun([_LT_PATH_LD_GNU],
  2807. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2808. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  2809. case `$LD -v 2>&1 </dev/null` in
  2810. *GNU* | *'with BFD'*)
  2811. lt_cv_prog_gnu_ld=yes
  2812. ;;
  2813. *)
  2814. lt_cv_prog_gnu_ld=no
  2815. ;;
  2816. esac])
  2817. with_gnu_ld=$lt_cv_prog_gnu_ld
  2818. ])# _LT_PATH_LD_GNU
  2819. # _LT_CMD_RELOAD
  2820. # --------------
  2821. # find reload flag for linker
  2822. # -- PORTME Some linkers may need a different reload flag.
  2823. m4_defun([_LT_CMD_RELOAD],
  2824. [AC_CACHE_CHECK([for $LD option to reload object files],
  2825. lt_cv_ld_reload_flag,
  2826. [lt_cv_ld_reload_flag='-r'])
  2827. reload_flag=$lt_cv_ld_reload_flag
  2828. case $reload_flag in
  2829. "" | " "*) ;;
  2830. *) reload_flag=" $reload_flag" ;;
  2831. esac
  2832. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2833. case $host_os in
  2834. cygwin* | mingw* | pw32* | cegcc*)
  2835. if test "$GCC" != yes; then
  2836. reload_cmds=false
  2837. fi
  2838. ;;
  2839. darwin*)
  2840. if test "$GCC" = yes; then
  2841. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  2842. else
  2843. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2844. fi
  2845. ;;
  2846. esac
  2847. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  2848. _LT_TAGDECL([], [reload_cmds], [2])dnl
  2849. ])# _LT_CMD_RELOAD
  2850. # _LT_CHECK_MAGIC_METHOD
  2851. # ----------------------
  2852. # how to check for library dependencies
  2853. # -- PORTME fill in with the dynamic library characteristics
  2854. m4_defun([_LT_CHECK_MAGIC_METHOD],
  2855. [m4_require([_LT_DECL_EGREP])
  2856. m4_require([_LT_DECL_OBJDUMP])
  2857. AC_CACHE_CHECK([how to recognize dependent libraries],
  2858. lt_cv_deplibs_check_method,
  2859. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2860. lt_cv_file_magic_test_file=
  2861. lt_cv_deplibs_check_method='unknown'
  2862. # Need to set the preceding variable on all platforms that support
  2863. # interlibrary dependencies.
  2864. # 'none' -- dependencies not supported.
  2865. # `unknown' -- same as none, but documents that we really don't know.
  2866. # 'pass_all' -- all dependencies passed with no checks.
  2867. # 'test_compile' -- check by making test program.
  2868. # 'file_magic [[regex]]' -- check by looking for files in library path
  2869. # which responds to the $file_magic_cmd with a given extended regex.
  2870. # If you have `file' or equivalent on your system and you're not sure
  2871. # whether `pass_all' will *always* work, you probably want this one.
  2872. case $host_os in
  2873. aix[[4-9]]*)
  2874. lt_cv_deplibs_check_method=pass_all
  2875. ;;
  2876. beos*)
  2877. lt_cv_deplibs_check_method=pass_all
  2878. ;;
  2879. bsdi[[45]]*)
  2880. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2881. lt_cv_file_magic_cmd='/usr/bin/file -L'
  2882. lt_cv_file_magic_test_file=/shlib/libc.so
  2883. ;;
  2884. cygwin*)
  2885. # func_win32_libid is a shell function defined in ltmain.sh
  2886. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2887. lt_cv_file_magic_cmd='func_win32_libid'
  2888. ;;
  2889. mingw* | pw32*)
  2890. # Base MSYS/MinGW do not provide the 'file' command needed by
  2891. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  2892. # unless we find 'file', for example because we are cross-compiling.
  2893. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  2894. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  2895. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2896. lt_cv_file_magic_cmd='func_win32_libid'
  2897. else
  2898. # Keep this pattern in sync with the one in func_win32_libid.
  2899. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  2900. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2901. fi
  2902. ;;
  2903. cegcc*)
  2904. # use the weaker test based on 'objdump'. See mingw*.
  2905. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  2906. lt_cv_file_magic_cmd='$OBJDUMP -f'
  2907. ;;
  2908. darwin* | rhapsody*)
  2909. lt_cv_deplibs_check_method=pass_all
  2910. ;;
  2911. freebsd* | dragonfly*)
  2912. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2913. case $host_cpu in
  2914. i*86 )
  2915. # Not sure whether the presence of OpenBSD here was a mistake.
  2916. # Let's accept both of them until this is cleared up.
  2917. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  2918. lt_cv_file_magic_cmd=/usr/bin/file
  2919. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2920. ;;
  2921. esac
  2922. else
  2923. lt_cv_deplibs_check_method=pass_all
  2924. fi
  2925. ;;
  2926. haiku*)
  2927. lt_cv_deplibs_check_method=pass_all
  2928. ;;
  2929. hpux10.20* | hpux11*)
  2930. lt_cv_file_magic_cmd=/usr/bin/file
  2931. case $host_cpu in
  2932. ia64*)
  2933. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2934. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2935. ;;
  2936. hppa*64*)
  2937. [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]']
  2938. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2939. ;;
  2940. *)
  2941. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  2942. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2943. ;;
  2944. esac
  2945. ;;
  2946. interix[[3-9]]*)
  2947. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  2948. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  2949. ;;
  2950. irix5* | irix6* | nonstopux*)
  2951. case $LD in
  2952. *-32|*"-32 ") libmagic=32-bit;;
  2953. *-n32|*"-n32 ") libmagic=N32;;
  2954. *-64|*"-64 ") libmagic=64-bit;;
  2955. *) libmagic=never-match;;
  2956. esac
  2957. lt_cv_deplibs_check_method=pass_all
  2958. ;;
  2959. # This must be glibc/ELF.
  2960. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  2961. lt_cv_deplibs_check_method=pass_all
  2962. ;;
  2963. netbsd* | netbsdelf*-gnu)
  2964. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  2965. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2966. else
  2967. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2968. fi
  2969. ;;
  2970. newos6*)
  2971. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2972. lt_cv_file_magic_cmd=/usr/bin/file
  2973. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2974. ;;
  2975. *nto* | *qnx*)
  2976. lt_cv_deplibs_check_method=pass_all
  2977. ;;
  2978. openbsd*)
  2979. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2980. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  2981. else
  2982. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2983. fi
  2984. ;;
  2985. osf3* | osf4* | osf5*)
  2986. lt_cv_deplibs_check_method=pass_all
  2987. ;;
  2988. rdos*)
  2989. lt_cv_deplibs_check_method=pass_all
  2990. ;;
  2991. solaris*)
  2992. lt_cv_deplibs_check_method=pass_all
  2993. ;;
  2994. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  2995. lt_cv_deplibs_check_method=pass_all
  2996. ;;
  2997. sysv4 | sysv4.3*)
  2998. case $host_vendor in
  2999. motorola)
  3000. 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]]'
  3001. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3002. ;;
  3003. ncr)
  3004. lt_cv_deplibs_check_method=pass_all
  3005. ;;
  3006. sequent)
  3007. lt_cv_file_magic_cmd='/bin/file'
  3008. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3009. ;;
  3010. sni)
  3011. lt_cv_file_magic_cmd='/bin/file'
  3012. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3013. lt_cv_file_magic_test_file=/lib/libc.so
  3014. ;;
  3015. siemens)
  3016. lt_cv_deplibs_check_method=pass_all
  3017. ;;
  3018. pc)
  3019. lt_cv_deplibs_check_method=pass_all
  3020. ;;
  3021. esac
  3022. ;;
  3023. tpf*)
  3024. lt_cv_deplibs_check_method=pass_all
  3025. ;;
  3026. esac
  3027. ])
  3028. file_magic_glob=
  3029. want_nocaseglob=no
  3030. if test "$build" = "$host"; then
  3031. case $host_os in
  3032. mingw* | pw32*)
  3033. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3034. want_nocaseglob=yes
  3035. else
  3036. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3037. fi
  3038. ;;
  3039. esac
  3040. fi
  3041. file_magic_cmd=$lt_cv_file_magic_cmd
  3042. deplibs_check_method=$lt_cv_deplibs_check_method
  3043. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3044. _LT_DECL([], [deplibs_check_method], [1],
  3045. [Method to check whether dependent libraries are shared objects])
  3046. _LT_DECL([], [file_magic_cmd], [1],
  3047. [Command to use when deplibs_check_method = "file_magic"])
  3048. _LT_DECL([], [file_magic_glob], [1],
  3049. [How to find potential files when deplibs_check_method = "file_magic"])
  3050. _LT_DECL([], [want_nocaseglob], [1],
  3051. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3052. ])# _LT_CHECK_MAGIC_METHOD
  3053. # LT_PATH_NM
  3054. # ----------
  3055. # find the pathname to a BSD- or MS-compatible name lister
  3056. AC_DEFUN([LT_PATH_NM],
  3057. [AC_REQUIRE([AC_PROG_CC])dnl
  3058. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3059. [if test -n "$NM"; then
  3060. # Let the user override the test.
  3061. lt_cv_path_NM="$NM"
  3062. else
  3063. lt_nm_to_check="${ac_tool_prefix}nm"
  3064. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3065. lt_nm_to_check="$lt_nm_to_check nm"
  3066. fi
  3067. for lt_tmp_nm in $lt_nm_to_check; do
  3068. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3069. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3070. IFS="$lt_save_ifs"
  3071. test -z "$ac_dir" && ac_dir=.
  3072. tmp_nm="$ac_dir/$lt_tmp_nm"
  3073. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  3074. # Check to see if the nm accepts a BSD-compat flag.
  3075. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3076. # nm: unknown option "B" ignored
  3077. # Tru64's nm complains that /dev/null is an invalid object file
  3078. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  3079. */dev/null* | *'Invalid file or object type'*)
  3080. lt_cv_path_NM="$tmp_nm -B"
  3081. break
  3082. ;;
  3083. *)
  3084. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3085. */dev/null*)
  3086. lt_cv_path_NM="$tmp_nm -p"
  3087. break
  3088. ;;
  3089. *)
  3090. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3091. continue # so that we can try to find one that supports BSD flags
  3092. ;;
  3093. esac
  3094. ;;
  3095. esac
  3096. fi
  3097. done
  3098. IFS="$lt_save_ifs"
  3099. done
  3100. : ${lt_cv_path_NM=no}
  3101. fi])
  3102. if test "$lt_cv_path_NM" != "no"; then
  3103. NM="$lt_cv_path_NM"
  3104. else
  3105. # Didn't find any BSD compatible name lister, look for dumpbin.
  3106. if test -n "$DUMPBIN"; then :
  3107. # Let the user override the test.
  3108. else
  3109. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3110. case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
  3111. *COFF*)
  3112. DUMPBIN="$DUMPBIN -symbols"
  3113. ;;
  3114. *)
  3115. DUMPBIN=:
  3116. ;;
  3117. esac
  3118. fi
  3119. AC_SUBST([DUMPBIN])
  3120. if test "$DUMPBIN" != ":"; then
  3121. NM="$DUMPBIN"
  3122. fi
  3123. fi
  3124. test -z "$NM" && NM=nm
  3125. AC_SUBST([NM])
  3126. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3127. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3128. [lt_cv_nm_interface="BSD nm"
  3129. echo "int some_variable = 0;" > conftest.$ac_ext
  3130. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3131. (eval "$ac_compile" 2>conftest.err)
  3132. cat conftest.err >&AS_MESSAGE_LOG_FD
  3133. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3134. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3135. cat conftest.err >&AS_MESSAGE_LOG_FD
  3136. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3137. cat conftest.out >&AS_MESSAGE_LOG_FD
  3138. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3139. lt_cv_nm_interface="MS dumpbin"
  3140. fi
  3141. rm -f conftest*])
  3142. ])# LT_PATH_NM
  3143. # Old names:
  3144. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3145. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3146. dnl aclocal-1.4 backwards compatibility:
  3147. dnl AC_DEFUN([AM_PROG_NM], [])
  3148. dnl AC_DEFUN([AC_PROG_NM], [])
  3149. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3150. # --------------------------------
  3151. # how to determine the name of the shared library
  3152. # associated with a specific link library.
  3153. # -- PORTME fill in with the dynamic library characteristics
  3154. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3155. [m4_require([_LT_DECL_EGREP])
  3156. m4_require([_LT_DECL_OBJDUMP])
  3157. m4_require([_LT_DECL_DLLTOOL])
  3158. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3159. lt_cv_sharedlib_from_linklib_cmd,
  3160. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3161. case $host_os in
  3162. cygwin* | mingw* | pw32* | cegcc*)
  3163. # two different shell functions defined in ltmain.sh
  3164. # decide which to use based on capabilities of $DLLTOOL
  3165. case `$DLLTOOL --help 2>&1` in
  3166. *--identify-strict*)
  3167. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3168. ;;
  3169. *)
  3170. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3171. ;;
  3172. esac
  3173. ;;
  3174. *)
  3175. # fallback: assume linklib IS sharedlib
  3176. lt_cv_sharedlib_from_linklib_cmd="$ECHO"
  3177. ;;
  3178. esac
  3179. ])
  3180. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3181. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3182. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3183. [Command to associate shared and link libraries])
  3184. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3185. # _LT_PATH_MANIFEST_TOOL
  3186. # ----------------------
  3187. # locate the manifest tool
  3188. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3189. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3190. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3191. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3192. [lt_cv_path_mainfest_tool=no
  3193. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3194. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3195. cat conftest.err >&AS_MESSAGE_LOG_FD
  3196. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3197. lt_cv_path_mainfest_tool=yes
  3198. fi
  3199. rm -f conftest*])
  3200. if test "x$lt_cv_path_mainfest_tool" != xyes; then
  3201. MANIFEST_TOOL=:
  3202. fi
  3203. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3204. ])# _LT_PATH_MANIFEST_TOOL
  3205. # LT_LIB_M
  3206. # --------
  3207. # check for math library
  3208. AC_DEFUN([LT_LIB_M],
  3209. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3210. LIBM=
  3211. case $host in
  3212. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3213. # These system don't have libm, or don't need it
  3214. ;;
  3215. *-ncr-sysv4.3*)
  3216. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3217. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3218. ;;
  3219. *)
  3220. AC_CHECK_LIB(m, cos, LIBM="-lm")
  3221. ;;
  3222. esac
  3223. AC_SUBST([LIBM])
  3224. ])# LT_LIB_M
  3225. # Old name:
  3226. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3227. dnl aclocal-1.4 backwards compatibility:
  3228. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3229. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3230. # -------------------------------
  3231. m4_defun([_LT_COMPILER_NO_RTTI],
  3232. [m4_require([_LT_TAG_COMPILER])dnl
  3233. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3234. if test "$GCC" = yes; then
  3235. case $cc_basename in
  3236. nvcc*)
  3237. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3238. *)
  3239. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3240. esac
  3241. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3242. lt_cv_prog_compiler_rtti_exceptions,
  3243. [-fno-rtti -fno-exceptions], [],
  3244. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3245. fi
  3246. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3247. [Compiler flag to turn off builtin functions])
  3248. ])# _LT_COMPILER_NO_RTTI
  3249. # _LT_CMD_GLOBAL_SYMBOLS
  3250. # ----------------------
  3251. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3252. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3253. AC_REQUIRE([AC_PROG_CC])dnl
  3254. AC_REQUIRE([AC_PROG_AWK])dnl
  3255. AC_REQUIRE([LT_PATH_NM])dnl
  3256. AC_REQUIRE([LT_PATH_LD])dnl
  3257. m4_require([_LT_DECL_SED])dnl
  3258. m4_require([_LT_DECL_EGREP])dnl
  3259. m4_require([_LT_TAG_COMPILER])dnl
  3260. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3261. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3262. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3263. [
  3264. # These are sane defaults that work on at least a few old systems.
  3265. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3266. # Character class describing NM global symbol codes.
  3267. symcode='[[BCDEGRST]]'
  3268. # Regexp to match symbols that can be accessed directly from C.
  3269. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3270. # Define system-specific variables.
  3271. case $host_os in
  3272. aix*)
  3273. symcode='[[BCDT]]'
  3274. ;;
  3275. cygwin* | mingw* | pw32* | cegcc*)
  3276. symcode='[[ABCDGISTW]]'
  3277. ;;
  3278. hpux*)
  3279. if test "$host_cpu" = ia64; then
  3280. symcode='[[ABCDEGRST]]'
  3281. fi
  3282. ;;
  3283. irix* | nonstopux*)
  3284. symcode='[[BCDEGRST]]'
  3285. ;;
  3286. osf*)
  3287. symcode='[[BCDEGQRST]]'
  3288. ;;
  3289. solaris*)
  3290. symcode='[[BDRT]]'
  3291. ;;
  3292. sco3.2v5*)
  3293. symcode='[[DT]]'
  3294. ;;
  3295. sysv4.2uw2*)
  3296. symcode='[[DT]]'
  3297. ;;
  3298. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3299. symcode='[[ABDT]]'
  3300. ;;
  3301. sysv4)
  3302. symcode='[[DFNSTU]]'
  3303. ;;
  3304. esac
  3305. # If we're using GNU nm, then use its standard symbol codes.
  3306. case `$NM -V 2>&1` in
  3307. *GNU* | *'with BFD'*)
  3308. symcode='[[ABCDGIRSTW]]' ;;
  3309. esac
  3310. # Transform an extracted symbol line into a proper C declaration.
  3311. # Some systems (esp. on ia64) link data and code symbols differently,
  3312. # so use this general approach.
  3313. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3314. # Transform an extracted symbol line into symbol name and symbol address
  3315. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  3316. 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'"
  3317. # Handle CRLF in mingw tool chain
  3318. opt_cr=
  3319. case $build_os in
  3320. mingw*)
  3321. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3322. ;;
  3323. esac
  3324. # Try without a prefix underscore, then with it.
  3325. for ac_symprfx in "" "_"; do
  3326. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3327. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3328. # Write the raw and C identifiers.
  3329. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3330. # Fake it for dumpbin and say T for any non-static function
  3331. # and D for any global variable.
  3332. # Also find C++ and __fastcall symbols from MSVC++,
  3333. # which start with @ or ?.
  3334. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3335. " {last_section=section; section=\$ 3};"\
  3336. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3337. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3338. " \$ 0!~/External *\|/{next};"\
  3339. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3340. " {if(hide[section]) next};"\
  3341. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  3342. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  3343. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  3344. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  3345. " ' prfx=^$ac_symprfx]"
  3346. else
  3347. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  3348. fi
  3349. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  3350. # Check to see that the pipe works correctly.
  3351. pipe_works=no
  3352. rm -f conftest*
  3353. cat > conftest.$ac_ext <<_LT_EOF
  3354. #ifdef __cplusplus
  3355. extern "C" {
  3356. #endif
  3357. char nm_test_var;
  3358. void nm_test_func(void);
  3359. void nm_test_func(void){}
  3360. #ifdef __cplusplus
  3361. }
  3362. #endif
  3363. int main(){nm_test_var='a';nm_test_func();return(0);}
  3364. _LT_EOF
  3365. if AC_TRY_EVAL(ac_compile); then
  3366. # Now try to grab the symbols.
  3367. nlist=conftest.nm
  3368. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  3369. # Try sorting and uniquifying the output.
  3370. if sort "$nlist" | uniq > "$nlist"T; then
  3371. mv -f "$nlist"T "$nlist"
  3372. else
  3373. rm -f "$nlist"T
  3374. fi
  3375. # Make sure that we snagged all the symbols we need.
  3376. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  3377. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  3378. cat <<_LT_EOF > conftest.$ac_ext
  3379. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  3380. #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
  3381. /* DATA imports from DLLs on WIN32 con't be const, because runtime
  3382. relocations are performed -- see ld's documentation on pseudo-relocs. */
  3383. # define LT@&t@_DLSYM_CONST
  3384. #elif defined(__osf__)
  3385. /* This system does not cope well with relocations in const data. */
  3386. # define LT@&t@_DLSYM_CONST
  3387. #else
  3388. # define LT@&t@_DLSYM_CONST const
  3389. #endif
  3390. #ifdef __cplusplus
  3391. extern "C" {
  3392. #endif
  3393. _LT_EOF
  3394. # Now generate the symbol file.
  3395. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  3396. cat <<_LT_EOF >> conftest.$ac_ext
  3397. /* The mapping between symbol names and symbols. */
  3398. LT@&t@_DLSYM_CONST struct {
  3399. const char *name;
  3400. void *address;
  3401. }
  3402. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  3403. {
  3404. { "@PROGRAM@", (void *) 0 },
  3405. _LT_EOF
  3406. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  3407. cat <<\_LT_EOF >> conftest.$ac_ext
  3408. {0, (void *) 0}
  3409. };
  3410. /* This works around a problem in FreeBSD linker */
  3411. #ifdef FREEBSD_WORKAROUND
  3412. static const void *lt_preloaded_setup() {
  3413. return lt__PROGRAM__LTX_preloaded_symbols;
  3414. }
  3415. #endif
  3416. #ifdef __cplusplus
  3417. }
  3418. #endif
  3419. _LT_EOF
  3420. # Now try linking the two files.
  3421. mv conftest.$ac_objext conftstm.$ac_objext
  3422. lt_globsym_save_LIBS=$LIBS
  3423. lt_globsym_save_CFLAGS=$CFLAGS
  3424. LIBS="conftstm.$ac_objext"
  3425. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3426. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3427. pipe_works=yes
  3428. fi
  3429. LIBS=$lt_globsym_save_LIBS
  3430. CFLAGS=$lt_globsym_save_CFLAGS
  3431. else
  3432. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3433. fi
  3434. else
  3435. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3436. fi
  3437. else
  3438. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3439. fi
  3440. else
  3441. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3442. cat conftest.$ac_ext >&5
  3443. fi
  3444. rm -rf conftest* conftst*
  3445. # Do not use the global_symbol_pipe unless it works.
  3446. if test "$pipe_works" = yes; then
  3447. break
  3448. else
  3449. lt_cv_sys_global_symbol_pipe=
  3450. fi
  3451. done
  3452. ])
  3453. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3454. lt_cv_sys_global_symbol_to_cdecl=
  3455. fi
  3456. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3457. AC_MSG_RESULT(failed)
  3458. else
  3459. AC_MSG_RESULT(ok)
  3460. fi
  3461. # Response file support.
  3462. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3463. nm_file_list_spec='@'
  3464. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  3465. nm_file_list_spec='@'
  3466. fi
  3467. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  3468. [Take the output of nm and produce a listing of raw symbols and C names])
  3469. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  3470. [Transform the output of nm in a proper C declaration])
  3471. _LT_DECL([global_symbol_to_c_name_address],
  3472. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  3473. [Transform the output of nm in a C name address pair])
  3474. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  3475. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  3476. [Transform the output of nm in a C name address pair when lib prefix is needed])
  3477. _LT_DECL([], [nm_file_list_spec], [1],
  3478. [Specify filename containing input files for $NM])
  3479. ]) # _LT_CMD_GLOBAL_SYMBOLS
  3480. # _LT_COMPILER_PIC([TAGNAME])
  3481. # ---------------------------
  3482. m4_defun([_LT_COMPILER_PIC],
  3483. [m4_require([_LT_TAG_COMPILER])dnl
  3484. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  3485. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3486. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3487. m4_if([$1], [CXX], [
  3488. # C++ specific cases for pic, static, wl, etc.
  3489. if test "$GXX" = yes; then
  3490. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3491. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3492. case $host_os in
  3493. aix*)
  3494. # All AIX code is PIC.
  3495. if test "$host_cpu" = ia64; then
  3496. # AIX 5 now supports IA64 processor
  3497. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3498. fi
  3499. ;;
  3500. amigaos*)
  3501. case $host_cpu in
  3502. powerpc)
  3503. # see comment about AmigaOS4 .so support
  3504. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3505. ;;
  3506. m68k)
  3507. # FIXME: we need at least 68020 code to build shared libraries, but
  3508. # adding the `-m68020' flag to GCC prevents building anything better,
  3509. # like `-m68040'.
  3510. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3511. ;;
  3512. esac
  3513. ;;
  3514. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3515. # PIC is the default for these OSes.
  3516. ;;
  3517. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3518. # This hack is so that the source file can tell whether it is being
  3519. # built for inclusion in a dll (and should export symbols for example).
  3520. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3521. # (--disable-auto-import) libraries
  3522. m4_if([$1], [GCJ], [],
  3523. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3524. ;;
  3525. darwin* | rhapsody*)
  3526. # PIC is the default on this platform
  3527. # Common symbols not allowed in MH_DYLIB files
  3528. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3529. ;;
  3530. *djgpp*)
  3531. # DJGPP does not support shared libraries at all
  3532. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3533. ;;
  3534. haiku*)
  3535. # PIC is the default for Haiku.
  3536. # The "-static" flag exists, but is broken.
  3537. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3538. ;;
  3539. interix[[3-9]]*)
  3540. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3541. # Instead, we relocate shared libraries at runtime.
  3542. ;;
  3543. sysv4*MP*)
  3544. if test -d /usr/nec; then
  3545. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3546. fi
  3547. ;;
  3548. hpux*)
  3549. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3550. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3551. # sets the default TLS model and affects inlining.
  3552. case $host_cpu in
  3553. hppa*64*)
  3554. ;;
  3555. *)
  3556. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3557. ;;
  3558. esac
  3559. ;;
  3560. *qnx* | *nto*)
  3561. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3562. # it will coredump.
  3563. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3564. ;;
  3565. *)
  3566. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3567. ;;
  3568. esac
  3569. else
  3570. case $host_os in
  3571. aix[[4-9]]*)
  3572. # All AIX code is PIC.
  3573. if test "$host_cpu" = ia64; then
  3574. # AIX 5 now supports IA64 processor
  3575. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3576. else
  3577. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3578. fi
  3579. ;;
  3580. chorus*)
  3581. case $cc_basename in
  3582. cxch68*)
  3583. # Green Hills C++ Compiler
  3584. # _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"
  3585. ;;
  3586. esac
  3587. ;;
  3588. mingw* | cygwin* | os2* | pw32* | cegcc*)
  3589. # This hack is so that the source file can tell whether it is being
  3590. # built for inclusion in a dll (and should export symbols for example).
  3591. m4_if([$1], [GCJ], [],
  3592. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3593. ;;
  3594. dgux*)
  3595. case $cc_basename in
  3596. ec++*)
  3597. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3598. ;;
  3599. ghcx*)
  3600. # Green Hills C++ Compiler
  3601. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3602. ;;
  3603. *)
  3604. ;;
  3605. esac
  3606. ;;
  3607. freebsd* | dragonfly*)
  3608. # FreeBSD uses GNU C++
  3609. ;;
  3610. hpux9* | hpux10* | hpux11*)
  3611. case $cc_basename in
  3612. CC*)
  3613. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3614. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3615. if test "$host_cpu" != ia64; then
  3616. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3617. fi
  3618. ;;
  3619. aCC*)
  3620. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3621. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3622. case $host_cpu in
  3623. hppa*64*|ia64*)
  3624. # +Z the default
  3625. ;;
  3626. *)
  3627. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3628. ;;
  3629. esac
  3630. ;;
  3631. *)
  3632. ;;
  3633. esac
  3634. ;;
  3635. interix*)
  3636. # This is c89, which is MS Visual C++ (no shared libs)
  3637. # Anyone wants to do a port?
  3638. ;;
  3639. irix5* | irix6* | nonstopux*)
  3640. case $cc_basename in
  3641. CC*)
  3642. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3643. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3644. # CC pic flag -KPIC is the default.
  3645. ;;
  3646. *)
  3647. ;;
  3648. esac
  3649. ;;
  3650. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3651. case $cc_basename in
  3652. KCC*)
  3653. # KAI C++ Compiler
  3654. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3655. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3656. ;;
  3657. ecpc* )
  3658. # old Intel C++ for x86_64 which still supported -KPIC.
  3659. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3660. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3661. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3662. ;;
  3663. icpc* )
  3664. # Intel C++, used to be incompatible with GCC.
  3665. # ICC 10 doesn't accept -KPIC any more.
  3666. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3667. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3668. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3669. ;;
  3670. pgCC* | pgcpp*)
  3671. # Portland Group C++ compiler
  3672. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3673. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3674. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3675. ;;
  3676. cxx*)
  3677. # Compaq C++
  3678. # Make sure the PIC flag is empty. It appears that all Alpha
  3679. # Linux and Compaq Tru64 Unix objects are PIC.
  3680. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3681. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3682. ;;
  3683. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  3684. # IBM XL 8.0, 9.0 on PPC and BlueGene
  3685. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3686. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3687. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3688. ;;
  3689. *)
  3690. case `$CC -V 2>&1 | sed 5q` in
  3691. *Sun\ C*)
  3692. # Sun C++ 5.9
  3693. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3694. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3695. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3696. ;;
  3697. esac
  3698. ;;
  3699. esac
  3700. ;;
  3701. lynxos*)
  3702. ;;
  3703. m88k*)
  3704. ;;
  3705. mvs*)
  3706. case $cc_basename in
  3707. cxx*)
  3708. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  3709. ;;
  3710. *)
  3711. ;;
  3712. esac
  3713. ;;
  3714. netbsd* | netbsdelf*-gnu)
  3715. ;;
  3716. *qnx* | *nto*)
  3717. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3718. # it will coredump.
  3719. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3720. ;;
  3721. osf3* | osf4* | osf5*)
  3722. case $cc_basename in
  3723. KCC*)
  3724. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  3725. ;;
  3726. RCC*)
  3727. # Rational C++ 2.4.1
  3728. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3729. ;;
  3730. cxx*)
  3731. # Digital/Compaq C++
  3732. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3733. # Make sure the PIC flag is empty. It appears that all Alpha
  3734. # Linux and Compaq Tru64 Unix objects are PIC.
  3735. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  3736. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3737. ;;
  3738. *)
  3739. ;;
  3740. esac
  3741. ;;
  3742. psos*)
  3743. ;;
  3744. solaris*)
  3745. case $cc_basename in
  3746. CC* | sunCC*)
  3747. # Sun C++ 4.2, 5.x and Centerline C++
  3748. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3749. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3750. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3751. ;;
  3752. gcx*)
  3753. # Green Hills C++ Compiler
  3754. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3755. ;;
  3756. *)
  3757. ;;
  3758. esac
  3759. ;;
  3760. sunos4*)
  3761. case $cc_basename in
  3762. CC*)
  3763. # Sun C++ 4.x
  3764. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3765. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3766. ;;
  3767. lcc*)
  3768. # Lucid
  3769. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  3770. ;;
  3771. *)
  3772. ;;
  3773. esac
  3774. ;;
  3775. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  3776. case $cc_basename in
  3777. CC*)
  3778. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3779. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3780. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3781. ;;
  3782. esac
  3783. ;;
  3784. tandem*)
  3785. case $cc_basename in
  3786. NCC*)
  3787. # NonStop-UX NCC 3.20
  3788. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3789. ;;
  3790. *)
  3791. ;;
  3792. esac
  3793. ;;
  3794. vxworks*)
  3795. ;;
  3796. *)
  3797. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3798. ;;
  3799. esac
  3800. fi
  3801. ],
  3802. [
  3803. if test "$GCC" = yes; then
  3804. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3805. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3806. case $host_os in
  3807. aix*)
  3808. # All AIX code is PIC.
  3809. if test "$host_cpu" = ia64; then
  3810. # AIX 5 now supports IA64 processor
  3811. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3812. fi
  3813. ;;
  3814. amigaos*)
  3815. case $host_cpu in
  3816. powerpc)
  3817. # see comment about AmigaOS4 .so support
  3818. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3819. ;;
  3820. m68k)
  3821. # FIXME: we need at least 68020 code to build shared libraries, but
  3822. # adding the `-m68020' flag to GCC prevents building anything better,
  3823. # like `-m68040'.
  3824. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  3825. ;;
  3826. esac
  3827. ;;
  3828. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  3829. # PIC is the default for these OSes.
  3830. ;;
  3831. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3832. # This hack is so that the source file can tell whether it is being
  3833. # built for inclusion in a dll (and should export symbols for example).
  3834. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  3835. # (--disable-auto-import) libraries
  3836. m4_if([$1], [GCJ], [],
  3837. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3838. ;;
  3839. darwin* | rhapsody*)
  3840. # PIC is the default on this platform
  3841. # Common symbols not allowed in MH_DYLIB files
  3842. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  3843. ;;
  3844. haiku*)
  3845. # PIC is the default for Haiku.
  3846. # The "-static" flag exists, but is broken.
  3847. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  3848. ;;
  3849. hpux*)
  3850. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  3851. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  3852. # sets the default TLS model and affects inlining.
  3853. case $host_cpu in
  3854. hppa*64*)
  3855. # +Z the default
  3856. ;;
  3857. *)
  3858. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3859. ;;
  3860. esac
  3861. ;;
  3862. interix[[3-9]]*)
  3863. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  3864. # Instead, we relocate shared libraries at runtime.
  3865. ;;
  3866. msdosdjgpp*)
  3867. # Just because we use GCC doesn't mean we suddenly get shared libraries
  3868. # on systems that don't support them.
  3869. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  3870. enable_shared=no
  3871. ;;
  3872. *nto* | *qnx*)
  3873. # QNX uses GNU C++, but need to define -shared option too, otherwise
  3874. # it will coredump.
  3875. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  3876. ;;
  3877. sysv4*MP*)
  3878. if test -d /usr/nec; then
  3879. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  3880. fi
  3881. ;;
  3882. *)
  3883. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3884. ;;
  3885. esac
  3886. case $cc_basename in
  3887. nvcc*) # Cuda Compiler Driver 2.2
  3888. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  3889. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  3890. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  3891. fi
  3892. ;;
  3893. esac
  3894. else
  3895. # PORTME Check for flag to pass linker flags through the system compiler.
  3896. case $host_os in
  3897. aix*)
  3898. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3899. if test "$host_cpu" = ia64; then
  3900. # AIX 5 now supports IA64 processor
  3901. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3902. else
  3903. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  3904. fi
  3905. ;;
  3906. mingw* | cygwin* | pw32* | os2* | cegcc*)
  3907. # This hack is so that the source file can tell whether it is being
  3908. # built for inclusion in a dll (and should export symbols for example).
  3909. m4_if([$1], [GCJ], [],
  3910. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  3911. ;;
  3912. hpux9* | hpux10* | hpux11*)
  3913. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3914. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  3915. # not for PA HP-UX.
  3916. case $host_cpu in
  3917. hppa*64*|ia64*)
  3918. # +Z the default
  3919. ;;
  3920. *)
  3921. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  3922. ;;
  3923. esac
  3924. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  3925. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  3926. ;;
  3927. irix5* | irix6* | nonstopux*)
  3928. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3929. # PIC (with -KPIC) is the default.
  3930. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3931. ;;
  3932. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  3933. case $cc_basename in
  3934. # old Intel for x86_64 which still supported -KPIC.
  3935. ecc*)
  3936. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3937. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3938. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3939. ;;
  3940. # icc used to be incompatible with GCC.
  3941. # ICC 10 doesn't accept -KPIC any more.
  3942. icc* | ifort*)
  3943. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3944. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3945. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  3946. ;;
  3947. # Lahey Fortran 8.1.
  3948. lf95*)
  3949. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3950. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  3951. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  3952. ;;
  3953. nagfor*)
  3954. # NAG Fortran compiler
  3955. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  3956. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  3957. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3958. ;;
  3959. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  3960. # Portland Group compilers (*not* the Pentium gcc compiler,
  3961. # which looks to be a dead project)
  3962. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3963. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  3964. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3965. ;;
  3966. ccc*)
  3967. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3968. # All Alpha code is PIC.
  3969. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  3970. ;;
  3971. xl* | bgxl* | bgf* | mpixl*)
  3972. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  3973. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3974. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  3975. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  3976. ;;
  3977. *)
  3978. case `$CC -V 2>&1 | sed 5q` in
  3979. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  3980. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  3981. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3982. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3983. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  3984. ;;
  3985. *Sun\ F* | *Sun*Fortran*)
  3986. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3987. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3988. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  3989. ;;
  3990. *Sun\ C*)
  3991. # Sun C 5.9
  3992. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  3993. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  3994. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3995. ;;
  3996. *Intel*\ [[CF]]*Compiler*)
  3997. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  3998. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  3999. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4000. ;;
  4001. *Portland\ Group*)
  4002. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4003. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4004. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4005. ;;
  4006. esac
  4007. ;;
  4008. esac
  4009. ;;
  4010. newsos6)
  4011. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4012. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4013. ;;
  4014. *nto* | *qnx*)
  4015. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4016. # it will coredump.
  4017. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4018. ;;
  4019. osf3* | osf4* | osf5*)
  4020. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4021. # All OSF/1 code is PIC.
  4022. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4023. ;;
  4024. rdos*)
  4025. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4026. ;;
  4027. solaris*)
  4028. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4029. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4030. case $cc_basename in
  4031. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4032. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4033. *)
  4034. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4035. esac
  4036. ;;
  4037. sunos4*)
  4038. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4039. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4040. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4041. ;;
  4042. sysv4 | sysv4.2uw2* | sysv4.3*)
  4043. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4044. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4045. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4046. ;;
  4047. sysv4*MP*)
  4048. if test -d /usr/nec ;then
  4049. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4050. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4051. fi
  4052. ;;
  4053. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4054. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4055. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4056. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4057. ;;
  4058. unicos*)
  4059. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4060. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4061. ;;
  4062. uts4*)
  4063. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4064. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4065. ;;
  4066. *)
  4067. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4068. ;;
  4069. esac
  4070. fi
  4071. ])
  4072. case $host_os in
  4073. # For platforms which do not support PIC, -DPIC is meaningless:
  4074. *djgpp*)
  4075. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4076. ;;
  4077. *)
  4078. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4079. ;;
  4080. esac
  4081. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4082. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4083. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4084. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4085. #
  4086. # Check to make sure the PIC flag actually works.
  4087. #
  4088. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4089. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4090. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4091. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4092. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4093. "" | " "*) ;;
  4094. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4095. esac],
  4096. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4097. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4098. fi
  4099. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4100. [Additional compiler flags for building library objects])
  4101. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4102. [How to pass a linker flag through the compiler])
  4103. #
  4104. # Check to make sure the static flag actually works.
  4105. #
  4106. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4107. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4108. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4109. $lt_tmp_static_flag,
  4110. [],
  4111. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4112. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4113. [Compiler flag to prevent dynamic linking])
  4114. ])# _LT_COMPILER_PIC
  4115. # _LT_LINKER_SHLIBS([TAGNAME])
  4116. # ----------------------------
  4117. # See if the linker supports building shared libraries.
  4118. m4_defun([_LT_LINKER_SHLIBS],
  4119. [AC_REQUIRE([LT_PATH_LD])dnl
  4120. AC_REQUIRE([LT_PATH_NM])dnl
  4121. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4122. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4123. m4_require([_LT_DECL_EGREP])dnl
  4124. m4_require([_LT_DECL_SED])dnl
  4125. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4126. m4_require([_LT_TAG_COMPILER])dnl
  4127. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4128. m4_if([$1], [CXX], [
  4129. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4130. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4131. case $host_os in
  4132. aix[[4-9]]*)
  4133. # If we're using GNU nm, then we don't want the "-C" option.
  4134. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4135. # Also, AIX nm treats weak defined symbols like other global defined
  4136. # symbols, whereas GNU nm marks them as "W".
  4137. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4138. _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'
  4139. else
  4140. _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'
  4141. fi
  4142. ;;
  4143. pw32*)
  4144. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4145. ;;
  4146. cygwin* | mingw* | cegcc*)
  4147. case $cc_basename in
  4148. cl*)
  4149. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4150. ;;
  4151. *)
  4152. _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'
  4153. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4154. ;;
  4155. esac
  4156. ;;
  4157. linux* | k*bsd*-gnu | gnu*)
  4158. _LT_TAGVAR(link_all_deplibs, $1)=no
  4159. ;;
  4160. *)
  4161. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4162. ;;
  4163. esac
  4164. ], [
  4165. runpath_var=
  4166. _LT_TAGVAR(allow_undefined_flag, $1)=
  4167. _LT_TAGVAR(always_export_symbols, $1)=no
  4168. _LT_TAGVAR(archive_cmds, $1)=
  4169. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4170. _LT_TAGVAR(compiler_needs_object, $1)=no
  4171. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4172. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4173. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4174. _LT_TAGVAR(hardcode_automatic, $1)=no
  4175. _LT_TAGVAR(hardcode_direct, $1)=no
  4176. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4177. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4178. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4179. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4180. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4181. _LT_TAGVAR(inherit_rpath, $1)=no
  4182. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4183. _LT_TAGVAR(module_cmds, $1)=
  4184. _LT_TAGVAR(module_expsym_cmds, $1)=
  4185. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4186. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4187. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4188. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4189. # include_expsyms should be a list of space-separated symbols to be *always*
  4190. # included in the symbol list
  4191. _LT_TAGVAR(include_expsyms, $1)=
  4192. # exclude_expsyms can be an extended regexp of symbols to exclude
  4193. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4194. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4195. # as well as any symbol that contains `d'.
  4196. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4197. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4198. # platforms (ab)use it in PIC code, but their linkers get confused if
  4199. # the symbol is explicitly referenced. Since portable code cannot
  4200. # rely on this symbol name, it's probably fine to never include it in
  4201. # preloaded symbol tables.
  4202. # Exclude shared library initialization/finalization symbols.
  4203. dnl Note also adjust exclude_expsyms for C++ above.
  4204. extract_expsyms_cmds=
  4205. case $host_os in
  4206. cygwin* | mingw* | pw32* | cegcc*)
  4207. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4208. # When not using gcc, we currently assume that we are using
  4209. # Microsoft Visual C++.
  4210. if test "$GCC" != yes; then
  4211. with_gnu_ld=no
  4212. fi
  4213. ;;
  4214. interix*)
  4215. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4216. with_gnu_ld=yes
  4217. ;;
  4218. openbsd*)
  4219. with_gnu_ld=no
  4220. ;;
  4221. linux* | k*bsd*-gnu | gnu*)
  4222. _LT_TAGVAR(link_all_deplibs, $1)=no
  4223. ;;
  4224. esac
  4225. _LT_TAGVAR(ld_shlibs, $1)=yes
  4226. # On some targets, GNU ld is compatible enough with the native linker
  4227. # that we're better off using the native interface for both.
  4228. lt_use_gnu_ld_interface=no
  4229. if test "$with_gnu_ld" = yes; then
  4230. case $host_os in
  4231. aix*)
  4232. # The AIX port of GNU ld has always aspired to compatibility
  4233. # with the native linker. However, as the warning in the GNU ld
  4234. # block says, versions before 2.19.5* couldn't really create working
  4235. # shared libraries, regardless of the interface used.
  4236. case `$LD -v 2>&1` in
  4237. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4238. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4239. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4240. *)
  4241. lt_use_gnu_ld_interface=yes
  4242. ;;
  4243. esac
  4244. ;;
  4245. *)
  4246. lt_use_gnu_ld_interface=yes
  4247. ;;
  4248. esac
  4249. fi
  4250. if test "$lt_use_gnu_ld_interface" = yes; then
  4251. # If archive_cmds runs LD, not CC, wlarc should be empty
  4252. wlarc='${wl}'
  4253. # Set some defaults for GNU ld with shared library support. These
  4254. # are reset later if shared libraries are not supported. Putting them
  4255. # here allows them to be overridden if necessary.
  4256. runpath_var=LD_RUN_PATH
  4257. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4258. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4259. # ancient GNU ld didn't support --whole-archive et. al.
  4260. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4261. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4262. else
  4263. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4264. fi
  4265. supports_anon_versioning=no
  4266. case `$LD -v 2>&1` in
  4267. *GNU\ gold*) supports_anon_versioning=yes ;;
  4268. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4269. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4270. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4271. *\ 2.11.*) ;; # other 2.11 versions
  4272. *) supports_anon_versioning=yes ;;
  4273. esac
  4274. # See if GNU ld supports shared libraries.
  4275. case $host_os in
  4276. aix[[3-9]]*)
  4277. # On AIX/PPC, the GNU linker is very broken
  4278. if test "$host_cpu" != ia64; then
  4279. _LT_TAGVAR(ld_shlibs, $1)=no
  4280. cat <<_LT_EOF 1>&2
  4281. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4282. *** to be unable to reliably create shared libraries on AIX.
  4283. *** Therefore, libtool is disabling shared libraries support. If you
  4284. *** really care for shared libraries, you may want to install binutils
  4285. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4286. *** You will then need to restart the configuration process.
  4287. _LT_EOF
  4288. fi
  4289. ;;
  4290. amigaos*)
  4291. case $host_cpu in
  4292. powerpc)
  4293. # see comment about AmigaOS4 .so support
  4294. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4295. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4296. ;;
  4297. m68k)
  4298. _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)'
  4299. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4300. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4301. ;;
  4302. esac
  4303. ;;
  4304. beos*)
  4305. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4306. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4307. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4308. # support --undefined. This deserves some investigation. FIXME
  4309. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4310. else
  4311. _LT_TAGVAR(ld_shlibs, $1)=no
  4312. fi
  4313. ;;
  4314. cygwin* | mingw* | pw32* | cegcc*)
  4315. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4316. # as there is no search path for DLLs.
  4317. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4318. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  4319. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4320. _LT_TAGVAR(always_export_symbols, $1)=no
  4321. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4322. _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'
  4323. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4324. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4325. _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'
  4326. # If the export-symbols file already is a .def file (1st line
  4327. # is EXPORTS), use it as is; otherwise, prepend...
  4328. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4329. cp $export_symbols $output_objdir/$soname.def;
  4330. else
  4331. echo EXPORTS > $output_objdir/$soname.def;
  4332. cat $export_symbols >> $output_objdir/$soname.def;
  4333. fi~
  4334. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4335. else
  4336. _LT_TAGVAR(ld_shlibs, $1)=no
  4337. fi
  4338. ;;
  4339. haiku*)
  4340. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4341. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4342. ;;
  4343. interix[[3-9]]*)
  4344. _LT_TAGVAR(hardcode_direct, $1)=no
  4345. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4346. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4347. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4348. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4349. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4350. # default) and relocated if they conflict, which is a slow very memory
  4351. # consuming and fragmenting process. To avoid this, we pick a random,
  4352. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  4353. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  4354. _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'
  4355. _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'
  4356. ;;
  4357. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  4358. tmp_diet=no
  4359. if test "$host_os" = linux-dietlibc; then
  4360. case $cc_basename in
  4361. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  4362. esac
  4363. fi
  4364. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  4365. && test "$tmp_diet" = no
  4366. then
  4367. tmp_addflag=' $pic_flag'
  4368. tmp_sharedflag='-shared'
  4369. case $cc_basename,$host_cpu in
  4370. pgcc*) # Portland Group C compiler
  4371. _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'
  4372. tmp_addflag=' $pic_flag'
  4373. ;;
  4374. pgf77* | pgf90* | pgf95* | pgfortran*)
  4375. # Portland Group f77 and f90 compilers
  4376. _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'
  4377. tmp_addflag=' $pic_flag -Mnomain' ;;
  4378. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  4379. tmp_addflag=' -i_dynamic' ;;
  4380. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  4381. tmp_addflag=' -i_dynamic -nofor_main' ;;
  4382. ifc* | ifort*) # Intel Fortran compiler
  4383. tmp_addflag=' -nofor_main' ;;
  4384. lf95*) # Lahey Fortran 8.1
  4385. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4386. tmp_sharedflag='--shared' ;;
  4387. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  4388. tmp_sharedflag='-qmkshrobj'
  4389. tmp_addflag= ;;
  4390. nvcc*) # Cuda Compiler Driver 2.2
  4391. _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'
  4392. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4393. ;;
  4394. esac
  4395. case `$CC -V 2>&1 | sed 5q` in
  4396. *Sun\ C*) # Sun C 5.9
  4397. _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'
  4398. _LT_TAGVAR(compiler_needs_object, $1)=yes
  4399. tmp_sharedflag='-G' ;;
  4400. *Sun\ F*) # Sun Fortran 8.3
  4401. tmp_sharedflag='-G' ;;
  4402. esac
  4403. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4404. if test "x$supports_anon_versioning" = xyes; then
  4405. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4406. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4407. echo "local: *; };" >> $output_objdir/$libname.ver~
  4408. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4409. fi
  4410. case $cc_basename in
  4411. xlf* | bgf* | bgxlf* | mpixlf*)
  4412. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  4413. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  4414. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4415. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  4416. if test "x$supports_anon_versioning" = xyes; then
  4417. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  4418. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4419. echo "local: *; };" >> $output_objdir/$libname.ver~
  4420. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  4421. fi
  4422. ;;
  4423. esac
  4424. else
  4425. _LT_TAGVAR(ld_shlibs, $1)=no
  4426. fi
  4427. ;;
  4428. netbsd* | netbsdelf*-gnu)
  4429. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4430. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4431. wlarc=
  4432. else
  4433. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4434. _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'
  4435. fi
  4436. ;;
  4437. solaris*)
  4438. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  4439. _LT_TAGVAR(ld_shlibs, $1)=no
  4440. cat <<_LT_EOF 1>&2
  4441. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4442. *** create shared libraries on Solaris systems. Therefore, libtool
  4443. *** is disabling shared libraries support. We urge you to upgrade GNU
  4444. *** binutils to release 2.9.1 or newer. Another option is to modify
  4445. *** your PATH or compiler configuration so that the native linker is
  4446. *** used, and then restart.
  4447. _LT_EOF
  4448. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4449. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4450. _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'
  4451. else
  4452. _LT_TAGVAR(ld_shlibs, $1)=no
  4453. fi
  4454. ;;
  4455. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  4456. case `$LD -v 2>&1` in
  4457. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  4458. _LT_TAGVAR(ld_shlibs, $1)=no
  4459. cat <<_LT_EOF 1>&2
  4460. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  4461. *** reliably create shared libraries on SCO systems. Therefore, libtool
  4462. *** is disabling shared libraries support. We urge you to upgrade GNU
  4463. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  4464. *** your PATH or compiler configuration so that the native linker is
  4465. *** used, and then restart.
  4466. _LT_EOF
  4467. ;;
  4468. *)
  4469. # For security reasons, it is highly recommended that you always
  4470. # use absolute paths for naming shared libraries, and exclude the
  4471. # DT_RUNPATH tag from executables and libraries. But doing so
  4472. # requires that you compile everything twice, which is a pain.
  4473. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4474. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4475. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4476. _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'
  4477. else
  4478. _LT_TAGVAR(ld_shlibs, $1)=no
  4479. fi
  4480. ;;
  4481. esac
  4482. ;;
  4483. sunos4*)
  4484. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4485. wlarc=
  4486. _LT_TAGVAR(hardcode_direct, $1)=yes
  4487. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4488. ;;
  4489. *)
  4490. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4491. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4492. _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'
  4493. else
  4494. _LT_TAGVAR(ld_shlibs, $1)=no
  4495. fi
  4496. ;;
  4497. esac
  4498. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  4499. runpath_var=
  4500. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4501. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4502. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4503. fi
  4504. else
  4505. # PORTME fill in a description of your system's linker (not GNU ld)
  4506. case $host_os in
  4507. aix3*)
  4508. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4509. _LT_TAGVAR(always_export_symbols, $1)=yes
  4510. _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'
  4511. # Note: this linker hardcodes the directories in LIBPATH if there
  4512. # are no directories specified by -L.
  4513. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4514. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  4515. # Neither direct hardcoding nor static linking is supported with a
  4516. # broken collect2.
  4517. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4518. fi
  4519. ;;
  4520. aix[[4-9]]*)
  4521. if test "$host_cpu" = ia64; then
  4522. # On IA64, the linker does run time linking by default, so we don't
  4523. # have to do anything special.
  4524. aix_use_runtimelinking=no
  4525. exp_sym_flag='-Bexport'
  4526. no_entry_flag=""
  4527. else
  4528. # If we're using GNU nm, then we don't want the "-C" option.
  4529. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4530. # Also, AIX nm treats weak defined symbols like other global
  4531. # defined symbols, whereas GNU nm marks them as "W".
  4532. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4533. _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'
  4534. else
  4535. _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'
  4536. fi
  4537. aix_use_runtimelinking=no
  4538. # Test if we are trying to use run time linking or normal
  4539. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4540. # need to do runtime linking.
  4541. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  4542. for ld_flag in $LDFLAGS; do
  4543. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4544. aix_use_runtimelinking=yes
  4545. break
  4546. fi
  4547. done
  4548. ;;
  4549. esac
  4550. exp_sym_flag='-bexport'
  4551. no_entry_flag='-bnoentry'
  4552. fi
  4553. # When large executables or shared objects are built, AIX ld can
  4554. # have problems creating the table of contents. If linking a library
  4555. # or program results in "error TOC overflow" add -mminimal-toc to
  4556. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4557. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4558. _LT_TAGVAR(archive_cmds, $1)=''
  4559. _LT_TAGVAR(hardcode_direct, $1)=yes
  4560. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4561. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  4562. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4563. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  4564. if test "$GCC" = yes; then
  4565. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  4566. # We only want to do this on AIX 4.2 and lower, the check
  4567. # below for broken collect2 doesn't work under 4.3+
  4568. collect2name=`${CC} -print-prog-name=collect2`
  4569. if test -f "$collect2name" &&
  4570. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  4571. then
  4572. # We have reworked collect2
  4573. :
  4574. else
  4575. # We have old collect2
  4576. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  4577. # It fails to find uninstalled libraries when the uninstalled
  4578. # path is not listed in the libpath. Setting hardcode_minus_L
  4579. # to unsupported forces relinking
  4580. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4581. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4582. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4583. fi
  4584. ;;
  4585. esac
  4586. shared_flag='-shared'
  4587. if test "$aix_use_runtimelinking" = yes; then
  4588. shared_flag="$shared_flag "'${wl}-G'
  4589. fi
  4590. _LT_TAGVAR(link_all_deplibs, $1)=no
  4591. else
  4592. # not using gcc
  4593. if test "$host_cpu" = ia64; then
  4594. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4595. # chokes on -Wl,-G. The following line is correct:
  4596. shared_flag='-G'
  4597. else
  4598. if test "$aix_use_runtimelinking" = yes; then
  4599. shared_flag='${wl}-G'
  4600. else
  4601. shared_flag='${wl}-bM:SRE'
  4602. fi
  4603. fi
  4604. fi
  4605. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  4606. # It seems that -bexpall does not export symbols beginning with
  4607. # underscore (_), so it is better to generate a list of symbols to export.
  4608. _LT_TAGVAR(always_export_symbols, $1)=yes
  4609. if test "$aix_use_runtimelinking" = yes; then
  4610. # Warning - without using the other runtime loading flags (-brtl),
  4611. # -berok will link without error, but may produce a broken library.
  4612. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  4613. # Determine the default libpath from the value encoded in an
  4614. # empty executable.
  4615. _LT_SYS_MODULE_PATH_AIX([$1])
  4616. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4617. _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"
  4618. else
  4619. if test "$host_cpu" = ia64; then
  4620. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4621. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4622. _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"
  4623. else
  4624. # Determine the default libpath from the value encoded in an
  4625. # empty executable.
  4626. _LT_SYS_MODULE_PATH_AIX([$1])
  4627. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4628. # Warning - without using the other run time loading flags,
  4629. # -berok will link without error, but may produce a broken library.
  4630. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4631. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4632. if test "$with_gnu_ld" = yes; then
  4633. # We only use this code for GNU lds that support --whole-archive.
  4634. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  4635. else
  4636. # Exported symbols can be pulled into shared objects from archives
  4637. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  4638. fi
  4639. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  4640. # This is similar to how AIX traditionally builds its shared libraries.
  4641. _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'
  4642. fi
  4643. fi
  4644. ;;
  4645. amigaos*)
  4646. case $host_cpu in
  4647. powerpc)
  4648. # see comment about AmigaOS4 .so support
  4649. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4650. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4651. ;;
  4652. m68k)
  4653. _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)'
  4654. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4655. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4656. ;;
  4657. esac
  4658. ;;
  4659. bsdi[[45]]*)
  4660. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4661. ;;
  4662. cygwin* | mingw* | pw32* | cegcc*)
  4663. # When not using gcc, we currently assume that we are using
  4664. # Microsoft Visual C++.
  4665. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4666. # no search path for DLLs.
  4667. case $cc_basename in
  4668. cl*)
  4669. # Native MSVC
  4670. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4671. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4672. _LT_TAGVAR(always_export_symbols, $1)=yes
  4673. _LT_TAGVAR(file_list_spec, $1)='@'
  4674. # Tell ltmain to make .lib files, not .a files.
  4675. libext=lib
  4676. # Tell ltmain to make .dll files, not .so files.
  4677. shrext_cmds=".dll"
  4678. # FIXME: Setting linknames here is a bad hack.
  4679. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  4680. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4681. sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  4682. else
  4683. sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  4684. fi~
  4685. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  4686. linknames='
  4687. # The linker will not automatically build a static lib if we build a DLL.
  4688. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4689. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4690. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4691. _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'
  4692. # Don't use ranlib
  4693. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  4694. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  4695. lt_tool_outputfile="@TOOL_OUTPUT@"~
  4696. case $lt_outputfile in
  4697. *.exe|*.EXE) ;;
  4698. *)
  4699. lt_outputfile="$lt_outputfile.exe"
  4700. lt_tool_outputfile="$lt_tool_outputfile.exe"
  4701. ;;
  4702. esac~
  4703. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  4704. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  4705. $RM "$lt_outputfile.manifest";
  4706. fi'
  4707. ;;
  4708. *)
  4709. # Assume MSVC wrapper
  4710. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4711. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4712. # Tell ltmain to make .lib files, not .a files.
  4713. libext=lib
  4714. # Tell ltmain to make .dll files, not .so files.
  4715. shrext_cmds=".dll"
  4716. # FIXME: Setting linknames here is a bad hack.
  4717. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  4718. # The linker will automatically build a .lib file if we build a DLL.
  4719. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  4720. # FIXME: Should let the user specify the lib program.
  4721. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  4722. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4723. ;;
  4724. esac
  4725. ;;
  4726. darwin* | rhapsody*)
  4727. _LT_DARWIN_LINKER_FEATURES($1)
  4728. ;;
  4729. dgux*)
  4730. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4731. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4732. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4733. ;;
  4734. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4735. # support. Future versions do this automatically, but an explicit c++rt0.o
  4736. # does not break anything, and helps significantly (at the cost of a little
  4737. # extra space).
  4738. freebsd2.2*)
  4739. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  4740. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4741. _LT_TAGVAR(hardcode_direct, $1)=yes
  4742. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4743. ;;
  4744. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  4745. freebsd2.*)
  4746. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4747. _LT_TAGVAR(hardcode_direct, $1)=yes
  4748. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4749. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4750. ;;
  4751. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  4752. freebsd* | dragonfly*)
  4753. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4754. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4755. _LT_TAGVAR(hardcode_direct, $1)=yes
  4756. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4757. ;;
  4758. hpux9*)
  4759. if test "$GCC" = yes; then
  4760. _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'
  4761. else
  4762. _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'
  4763. fi
  4764. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4765. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4766. _LT_TAGVAR(hardcode_direct, $1)=yes
  4767. # hardcode_minus_L: Not really in the search PATH,
  4768. # but as the default location of the library.
  4769. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4770. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4771. ;;
  4772. hpux10*)
  4773. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4774. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4775. else
  4776. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  4777. fi
  4778. if test "$with_gnu_ld" = no; then
  4779. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4780. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4781. _LT_TAGVAR(hardcode_direct, $1)=yes
  4782. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4783. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4784. # hardcode_minus_L: Not really in the search PATH,
  4785. # but as the default location of the library.
  4786. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4787. fi
  4788. ;;
  4789. hpux11*)
  4790. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  4791. case $host_cpu in
  4792. hppa*64*)
  4793. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4794. ;;
  4795. ia64*)
  4796. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4797. ;;
  4798. *)
  4799. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4800. ;;
  4801. esac
  4802. else
  4803. case $host_cpu in
  4804. hppa*64*)
  4805. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4806. ;;
  4807. ia64*)
  4808. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  4809. ;;
  4810. *)
  4811. m4_if($1, [], [
  4812. # Older versions of the 11.00 compiler do not understand -b yet
  4813. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  4814. _LT_LINKER_OPTION([if $CC understands -b],
  4815. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  4816. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  4817. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  4818. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  4819. ;;
  4820. esac
  4821. fi
  4822. if test "$with_gnu_ld" = no; then
  4823. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4824. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4825. case $host_cpu in
  4826. hppa*64*|ia64*)
  4827. _LT_TAGVAR(hardcode_direct, $1)=no
  4828. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4829. ;;
  4830. *)
  4831. _LT_TAGVAR(hardcode_direct, $1)=yes
  4832. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4833. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4834. # hardcode_minus_L: Not really in the search PATH,
  4835. # but as the default location of the library.
  4836. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4837. ;;
  4838. esac
  4839. fi
  4840. ;;
  4841. irix5* | irix6* | nonstopux*)
  4842. if test "$GCC" = yes; then
  4843. _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'
  4844. # Try to use the -exported_symbol ld option, if it does not
  4845. # work, assume that -exports_file does not work either and
  4846. # implicitly export all symbols.
  4847. # This should be the same for all languages, so no per-tag cache variable.
  4848. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  4849. [lt_cv_irix_exported_symbol],
  4850. [save_LDFLAGS="$LDFLAGS"
  4851. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  4852. AC_LINK_IFELSE(
  4853. [AC_LANG_SOURCE(
  4854. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  4855. [C++], [[int foo (void) { return 0; }]],
  4856. [Fortran 77], [[
  4857. subroutine foo
  4858. end]],
  4859. [Fortran], [[
  4860. subroutine foo
  4861. end]])])],
  4862. [lt_cv_irix_exported_symbol=yes],
  4863. [lt_cv_irix_exported_symbol=no])
  4864. LDFLAGS="$save_LDFLAGS"])
  4865. if test "$lt_cv_irix_exported_symbol" = yes; then
  4866. _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'
  4867. fi
  4868. else
  4869. _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'
  4870. _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'
  4871. fi
  4872. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4873. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4874. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4875. _LT_TAGVAR(inherit_rpath, $1)=yes
  4876. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4877. ;;
  4878. netbsd* | netbsdelf*-gnu)
  4879. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  4880. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  4881. else
  4882. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  4883. fi
  4884. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4885. _LT_TAGVAR(hardcode_direct, $1)=yes
  4886. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4887. ;;
  4888. newsos6)
  4889. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4890. _LT_TAGVAR(hardcode_direct, $1)=yes
  4891. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4892. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4893. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4894. ;;
  4895. *nto* | *qnx*)
  4896. ;;
  4897. openbsd*)
  4898. if test -f /usr/libexec/ld.so; then
  4899. _LT_TAGVAR(hardcode_direct, $1)=yes
  4900. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4901. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  4902. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4903. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4904. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  4905. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4906. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4907. else
  4908. case $host_os in
  4909. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  4910. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4911. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4912. ;;
  4913. *)
  4914. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4915. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4916. ;;
  4917. esac
  4918. fi
  4919. else
  4920. _LT_TAGVAR(ld_shlibs, $1)=no
  4921. fi
  4922. ;;
  4923. os2*)
  4924. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4925. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4926. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4927. _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'
  4928. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  4929. ;;
  4930. osf3*)
  4931. if test "$GCC" = yes; then
  4932. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4933. _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'
  4934. else
  4935. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  4936. _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'
  4937. fi
  4938. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4939. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4940. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4941. ;;
  4942. osf4* | osf5*) # as osf3* with the addition of -msym flag
  4943. if test "$GCC" = yes; then
  4944. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  4945. _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'
  4946. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  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 -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  4950. _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~
  4951. $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'
  4952. # Both c and cxx compiler support -rpath directly
  4953. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  4954. fi
  4955. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  4956. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  4957. ;;
  4958. solaris*)
  4959. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  4960. if test "$GCC" = yes; then
  4961. wlarc='${wl}'
  4962. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4963. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4964. $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'
  4965. else
  4966. case `$CC -V 2>&1` in
  4967. *"Compilers 5.0"*)
  4968. wlarc=''
  4969. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4970. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  4971. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  4972. ;;
  4973. *)
  4974. wlarc='${wl}'
  4975. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  4978. ;;
  4979. esac
  4980. fi
  4981. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4982. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4983. case $host_os in
  4984. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  4985. *)
  4986. # The compiler driver will combine and reorder linker options,
  4987. # but understands `-z linker_flag'. GCC discards it without `$wl',
  4988. # but is careful enough not to reorder.
  4989. # Supported since Solaris 2.6 (maybe 2.5.1?)
  4990. if test "$GCC" = yes; then
  4991. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  4992. else
  4993. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  4994. fi
  4995. ;;
  4996. esac
  4997. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4998. ;;
  4999. sunos4*)
  5000. if test "x$host_vendor" = xsequent; then
  5001. # Use $CC to link under sequent, because it throws in some extra .o
  5002. # files that make .init and .fini sections work.
  5003. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5004. else
  5005. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5006. fi
  5007. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5008. _LT_TAGVAR(hardcode_direct, $1)=yes
  5009. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5010. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5011. ;;
  5012. sysv4)
  5013. case $host_vendor in
  5014. sni)
  5015. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5016. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5017. ;;
  5018. siemens)
  5019. ## LD is ld it makes a PLAMLIB
  5020. ## CC just makes a GrossModule.
  5021. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5022. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5023. _LT_TAGVAR(hardcode_direct, $1)=no
  5024. ;;
  5025. motorola)
  5026. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5027. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5028. ;;
  5029. esac
  5030. runpath_var='LD_RUN_PATH'
  5031. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5032. ;;
  5033. sysv4.3*)
  5034. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5035. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5036. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5037. ;;
  5038. sysv4*MP*)
  5039. if test -d /usr/nec; then
  5040. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5041. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5042. runpath_var=LD_RUN_PATH
  5043. hardcode_runpath_var=yes
  5044. _LT_TAGVAR(ld_shlibs, $1)=yes
  5045. fi
  5046. ;;
  5047. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5048. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5049. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5050. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5051. runpath_var='LD_RUN_PATH'
  5052. if test "$GCC" = yes; then
  5053. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5054. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5055. else
  5056. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5057. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5058. fi
  5059. ;;
  5060. sysv5* | sco3.2v5* | sco5v6*)
  5061. # Note: We can NOT use -z defs as we might desire, because we do not
  5062. # link with -lc, and that would cause any symbols used from libc to
  5063. # always be unresolved, which means just about no library would
  5064. # ever link correctly. If we're not using GNU ld we use -z text
  5065. # though, which does catch some bad symbols but isn't as heavy-handed
  5066. # as -z defs.
  5067. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5068. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5069. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5070. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5071. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5072. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5073. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5074. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5075. runpath_var='LD_RUN_PATH'
  5076. if test "$GCC" = yes; then
  5077. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5078. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5079. else
  5080. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5081. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5082. fi
  5083. ;;
  5084. uts4*)
  5085. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5086. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5087. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5088. ;;
  5089. *)
  5090. _LT_TAGVAR(ld_shlibs, $1)=no
  5091. ;;
  5092. esac
  5093. if test x$host_vendor = xsni; then
  5094. case $host in
  5095. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5096. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  5097. ;;
  5098. esac
  5099. fi
  5100. fi
  5101. ])
  5102. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5103. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5104. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5105. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5106. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5107. _LT_DECL([], [extract_expsyms_cmds], [2],
  5108. [The commands to extract the exported symbol list from a shared archive])
  5109. #
  5110. # Do we need to explicitly link libc?
  5111. #
  5112. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5113. x|xyes)
  5114. # Assume -lc should be added
  5115. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5116. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5117. case $_LT_TAGVAR(archive_cmds, $1) in
  5118. *'~'*)
  5119. # FIXME: we may have to deal with multi-command sequences.
  5120. ;;
  5121. '$CC '*)
  5122. # Test whether the compiler implicitly links with -lc since on some
  5123. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5124. # to ld, don't add -lc before -lgcc.
  5125. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5126. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5127. [$RM conftest*
  5128. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5129. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5130. soname=conftest
  5131. lib=conftest
  5132. libobjs=conftest.$ac_objext
  5133. deplibs=
  5134. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5135. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5136. compiler_flags=-v
  5137. linker_flags=-v
  5138. verstring=
  5139. output_objdir=.
  5140. libname=conftest
  5141. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5142. _LT_TAGVAR(allow_undefined_flag, $1)=
  5143. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5144. then
  5145. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5146. else
  5147. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5148. fi
  5149. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5150. else
  5151. cat conftest.err 1>&5
  5152. fi
  5153. $RM conftest*
  5154. ])
  5155. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5156. ;;
  5157. esac
  5158. fi
  5159. ;;
  5160. esac
  5161. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5162. [Whether or not to add -lc for building shared libraries])
  5163. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5164. [enable_shared_with_static_runtimes], [0],
  5165. [Whether or not to disallow shared libs when runtime libs are static])
  5166. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5167. [Compiler flag to allow reflexive dlopens])
  5168. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5169. [Compiler flag to generate shared objects directly from archives])
  5170. _LT_TAGDECL([], [compiler_needs_object], [1],
  5171. [Whether the compiler copes with passing no objects directly])
  5172. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5173. [Create an old-style archive from a shared archive])
  5174. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5175. [Create a temporary old-style archive to link instead of a shared archive])
  5176. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5177. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5178. _LT_TAGDECL([], [module_cmds], [2],
  5179. [Commands used to build a loadable module if different from building
  5180. a shared archive.])
  5181. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5182. _LT_TAGDECL([], [with_gnu_ld], [1],
  5183. [Whether we are building with GNU ld or not])
  5184. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5185. [Flag that allows shared libraries with undefined symbols to be built])
  5186. _LT_TAGDECL([], [no_undefined_flag], [1],
  5187. [Flag that enforces no undefined symbols])
  5188. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5189. [Flag to hardcode $libdir into a binary during linking.
  5190. This must work even if $libdir does not exist])
  5191. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5192. [Whether we need a single "-rpath" flag with a separated argument])
  5193. _LT_TAGDECL([], [hardcode_direct], [0],
  5194. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5195. DIR into the resulting binary])
  5196. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5197. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5198. DIR into the resulting binary and the resulting library dependency is
  5199. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  5200. library is relocated])
  5201. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5202. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5203. into the resulting binary])
  5204. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5205. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5206. into the resulting binary])
  5207. _LT_TAGDECL([], [hardcode_automatic], [0],
  5208. [Set to "yes" if building a shared library automatically hardcodes DIR
  5209. into the library and all subsequent libraries and executables linked
  5210. against it])
  5211. _LT_TAGDECL([], [inherit_rpath], [0],
  5212. [Set to yes if linker adds runtime paths of dependent libraries
  5213. to runtime path list])
  5214. _LT_TAGDECL([], [link_all_deplibs], [0],
  5215. [Whether libtool must link a program against all its dependency libraries])
  5216. _LT_TAGDECL([], [always_export_symbols], [0],
  5217. [Set to "yes" if exported symbols are required])
  5218. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5219. [The commands to list exported symbols])
  5220. _LT_TAGDECL([], [exclude_expsyms], [1],
  5221. [Symbols that should not be listed in the preloaded symbols])
  5222. _LT_TAGDECL([], [include_expsyms], [1],
  5223. [Symbols that must always be exported])
  5224. _LT_TAGDECL([], [prelink_cmds], [2],
  5225. [Commands necessary for linking programs (against libraries) with templates])
  5226. _LT_TAGDECL([], [postlink_cmds], [2],
  5227. [Commands necessary for finishing linking programs])
  5228. _LT_TAGDECL([], [file_list_spec], [1],
  5229. [Specify filename containing input files])
  5230. dnl FIXME: Not yet implemented
  5231. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5232. dnl [Compiler flag to generate thread safe objects])
  5233. ])# _LT_LINKER_SHLIBS
  5234. # _LT_LANG_C_CONFIG([TAG])
  5235. # ------------------------
  5236. # Ensure that the configuration variables for a C compiler are suitably
  5237. # defined. These variables are subsequently used by _LT_CONFIG to write
  5238. # the compiler configuration to `libtool'.
  5239. m4_defun([_LT_LANG_C_CONFIG],
  5240. [m4_require([_LT_DECL_EGREP])dnl
  5241. lt_save_CC="$CC"
  5242. AC_LANG_PUSH(C)
  5243. # Source file extension for C test sources.
  5244. ac_ext=c
  5245. # Object file extension for compiled C test sources.
  5246. objext=o
  5247. _LT_TAGVAR(objext, $1)=$objext
  5248. # Code to be used in simple compile tests
  5249. lt_simple_compile_test_code="int some_variable = 0;"
  5250. # Code to be used in simple link tests
  5251. lt_simple_link_test_code='int main(){return(0);}'
  5252. _LT_TAG_COMPILER
  5253. # Save the default compiler, since it gets overwritten when the other
  5254. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5255. compiler_DEFAULT=$CC
  5256. # save warnings/boilerplate of simple test code
  5257. _LT_COMPILER_BOILERPLATE
  5258. _LT_LINKER_BOILERPLATE
  5259. if test -n "$compiler"; then
  5260. _LT_COMPILER_NO_RTTI($1)
  5261. _LT_COMPILER_PIC($1)
  5262. _LT_COMPILER_C_O($1)
  5263. _LT_COMPILER_FILE_LOCKS($1)
  5264. _LT_LINKER_SHLIBS($1)
  5265. _LT_SYS_DYNAMIC_LINKER($1)
  5266. _LT_LINKER_HARDCODE_LIBPATH($1)
  5267. LT_SYS_DLOPEN_SELF
  5268. _LT_CMD_STRIPLIB
  5269. # Report which library types will actually be built
  5270. AC_MSG_CHECKING([if libtool supports shared libraries])
  5271. AC_MSG_RESULT([$can_build_shared])
  5272. AC_MSG_CHECKING([whether to build shared libraries])
  5273. test "$can_build_shared" = "no" && enable_shared=no
  5274. # On AIX, shared libraries and static libraries use the same namespace, and
  5275. # are all built from PIC.
  5276. case $host_os in
  5277. aix3*)
  5278. test "$enable_shared" = yes && enable_static=no
  5279. if test -n "$RANLIB"; then
  5280. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5281. postinstall_cmds='$RANLIB $lib'
  5282. fi
  5283. ;;
  5284. aix[[4-9]]*)
  5285. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  5286. test "$enable_shared" = yes && enable_static=no
  5287. fi
  5288. ;;
  5289. esac
  5290. AC_MSG_RESULT([$enable_shared])
  5291. AC_MSG_CHECKING([whether to build static libraries])
  5292. # Make sure either enable_shared or enable_static is yes.
  5293. test "$enable_shared" = yes || enable_static=yes
  5294. AC_MSG_RESULT([$enable_static])
  5295. _LT_CONFIG($1)
  5296. fi
  5297. AC_LANG_POP
  5298. CC="$lt_save_CC"
  5299. ])# _LT_LANG_C_CONFIG
  5300. # _LT_LANG_CXX_CONFIG([TAG])
  5301. # --------------------------
  5302. # Ensure that the configuration variables for a C++ compiler are suitably
  5303. # defined. These variables are subsequently used by _LT_CONFIG to write
  5304. # the compiler configuration to `libtool'.
  5305. m4_defun([_LT_LANG_CXX_CONFIG],
  5306. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5307. m4_require([_LT_DECL_EGREP])dnl
  5308. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5309. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  5310. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  5311. (test "X$CXX" != "Xg++"))) ; then
  5312. AC_PROG_CXXCPP
  5313. else
  5314. _lt_caught_CXX_error=yes
  5315. fi
  5316. AC_LANG_PUSH(C++)
  5317. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5318. _LT_TAGVAR(allow_undefined_flag, $1)=
  5319. _LT_TAGVAR(always_export_symbols, $1)=no
  5320. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5321. _LT_TAGVAR(compiler_needs_object, $1)=no
  5322. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5323. _LT_TAGVAR(hardcode_direct, $1)=no
  5324. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5325. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5326. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5327. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5328. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5329. _LT_TAGVAR(hardcode_automatic, $1)=no
  5330. _LT_TAGVAR(inherit_rpath, $1)=no
  5331. _LT_TAGVAR(module_cmds, $1)=
  5332. _LT_TAGVAR(module_expsym_cmds, $1)=
  5333. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5334. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5335. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5336. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5337. _LT_TAGVAR(no_undefined_flag, $1)=
  5338. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5339. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5340. # Source file extension for C++ test sources.
  5341. ac_ext=cpp
  5342. # Object file extension for compiled C++ test sources.
  5343. objext=o
  5344. _LT_TAGVAR(objext, $1)=$objext
  5345. # No sense in running all these tests if we already determined that
  5346. # the CXX compiler isn't working. Some variables (like enable_shared)
  5347. # are currently assumed to apply to all compilers on this platform,
  5348. # and will be corrupted by setting them based on a non-working compiler.
  5349. if test "$_lt_caught_CXX_error" != yes; then
  5350. # Code to be used in simple compile tests
  5351. lt_simple_compile_test_code="int some_variable = 0;"
  5352. # Code to be used in simple link tests
  5353. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  5354. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  5355. _LT_TAG_COMPILER
  5356. # save warnings/boilerplate of simple test code
  5357. _LT_COMPILER_BOILERPLATE
  5358. _LT_LINKER_BOILERPLATE
  5359. # Allow CC to be a program name with arguments.
  5360. lt_save_CC=$CC
  5361. lt_save_CFLAGS=$CFLAGS
  5362. lt_save_LD=$LD
  5363. lt_save_GCC=$GCC
  5364. GCC=$GXX
  5365. lt_save_with_gnu_ld=$with_gnu_ld
  5366. lt_save_path_LD=$lt_cv_path_LD
  5367. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  5368. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  5369. else
  5370. $as_unset lt_cv_prog_gnu_ld
  5371. fi
  5372. if test -n "${lt_cv_path_LDCXX+set}"; then
  5373. lt_cv_path_LD=$lt_cv_path_LDCXX
  5374. else
  5375. $as_unset lt_cv_path_LD
  5376. fi
  5377. test -z "${LDCXX+set}" || LD=$LDCXX
  5378. CC=${CXX-"c++"}
  5379. CFLAGS=$CXXFLAGS
  5380. compiler=$CC
  5381. _LT_TAGVAR(compiler, $1)=$CC
  5382. _LT_CC_BASENAME([$compiler])
  5383. if test -n "$compiler"; then
  5384. # We don't want -fno-exception when compiling C++ code, so set the
  5385. # no_builtin_flag separately
  5386. if test "$GXX" = yes; then
  5387. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  5388. else
  5389. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  5390. fi
  5391. if test "$GXX" = yes; then
  5392. # Set up default GNU C++ configuration
  5393. LT_PATH_LD
  5394. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  5395. # archiving commands below assume that GNU ld is being used.
  5396. if test "$with_gnu_ld" = yes; then
  5397. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5398. _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'
  5399. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5400. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5401. # If archive_cmds runs LD, not CC, wlarc should be empty
  5402. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  5403. # investigate it a little bit more. (MM)
  5404. wlarc='${wl}'
  5405. # ancient GNU ld didn't support --whole-archive et. al.
  5406. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  5407. $GREP 'no-whole-archive' > /dev/null; then
  5408. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5409. else
  5410. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5411. fi
  5412. else
  5413. with_gnu_ld=no
  5414. wlarc=
  5415. # A generic and very simple default shared library creation
  5416. # command for GNU C++ for the case where it uses the native
  5417. # linker, instead of GNU ld. If possible, this setting should
  5418. # overridden to take advantage of the native linker features on
  5419. # the platform it is being used on.
  5420. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  5421. fi
  5422. # Commands to make compiler produce verbose output that lists
  5423. # what "hidden" libraries, object files and flags are used when
  5424. # linking a shared library.
  5425. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  5426. else
  5427. GXX=no
  5428. with_gnu_ld=no
  5429. wlarc=
  5430. fi
  5431. # PORTME: fill in a description of your system's C++ link characteristics
  5432. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5433. _LT_TAGVAR(ld_shlibs, $1)=yes
  5434. case $host_os in
  5435. aix3*)
  5436. # FIXME: insert proper C++ library support
  5437. _LT_TAGVAR(ld_shlibs, $1)=no
  5438. ;;
  5439. aix[[4-9]]*)
  5440. if test "$host_cpu" = ia64; then
  5441. # On IA64, the linker does run time linking by default, so we don't
  5442. # have to do anything special.
  5443. aix_use_runtimelinking=no
  5444. exp_sym_flag='-Bexport'
  5445. no_entry_flag=""
  5446. else
  5447. aix_use_runtimelinking=no
  5448. # Test if we are trying to use run time linking or normal
  5449. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5450. # need to do runtime linking.
  5451. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5452. for ld_flag in $LDFLAGS; do
  5453. case $ld_flag in
  5454. *-brtl*)
  5455. aix_use_runtimelinking=yes
  5456. break
  5457. ;;
  5458. esac
  5459. done
  5460. ;;
  5461. esac
  5462. exp_sym_flag='-bexport'
  5463. no_entry_flag='-bnoentry'
  5464. fi
  5465. # When large executables or shared objects are built, AIX ld can
  5466. # have problems creating the table of contents. If linking a library
  5467. # or program results in "error TOC overflow" add -mminimal-toc to
  5468. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5469. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5470. _LT_TAGVAR(archive_cmds, $1)=''
  5471. _LT_TAGVAR(hardcode_direct, $1)=yes
  5472. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5473. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5474. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5475. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5476. if test "$GXX" = yes; then
  5477. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5478. # We only want to do this on AIX 4.2 and lower, the check
  5479. # below for broken collect2 doesn't work under 4.3+
  5480. collect2name=`${CC} -print-prog-name=collect2`
  5481. if test -f "$collect2name" &&
  5482. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5483. then
  5484. # We have reworked collect2
  5485. :
  5486. else
  5487. # We have old collect2
  5488. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5489. # It fails to find uninstalled libraries when the uninstalled
  5490. # path is not listed in the libpath. Setting hardcode_minus_L
  5491. # to unsupported forces relinking
  5492. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5493. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5494. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5495. fi
  5496. esac
  5497. shared_flag='-shared'
  5498. if test "$aix_use_runtimelinking" = yes; then
  5499. shared_flag="$shared_flag "'${wl}-G'
  5500. fi
  5501. else
  5502. # not using gcc
  5503. if test "$host_cpu" = ia64; then
  5504. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5505. # chokes on -Wl,-G. The following line is correct:
  5506. shared_flag='-G'
  5507. else
  5508. if test "$aix_use_runtimelinking" = yes; then
  5509. shared_flag='${wl}-G'
  5510. else
  5511. shared_flag='${wl}-bM:SRE'
  5512. fi
  5513. fi
  5514. fi
  5515. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5516. # It seems that -bexpall does not export symbols beginning with
  5517. # underscore (_), so it is better to generate a list of symbols to
  5518. # export.
  5519. _LT_TAGVAR(always_export_symbols, $1)=yes
  5520. if test "$aix_use_runtimelinking" = yes; then
  5521. # Warning - without using the other runtime loading flags (-brtl),
  5522. # -berok will link without error, but may produce a broken library.
  5523. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5524. # Determine the default libpath from the value encoded in an empty
  5525. # executable.
  5526. _LT_SYS_MODULE_PATH_AIX([$1])
  5527. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5528. _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"
  5529. else
  5530. if test "$host_cpu" = ia64; then
  5531. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5532. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5533. _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"
  5534. else
  5535. # Determine the default libpath from the value encoded in an
  5536. # empty executable.
  5537. _LT_SYS_MODULE_PATH_AIX([$1])
  5538. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5539. # Warning - without using the other run time loading flags,
  5540. # -berok will link without error, but may produce a broken library.
  5541. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5542. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5543. if test "$with_gnu_ld" = yes; then
  5544. # We only use this code for GNU lds that support --whole-archive.
  5545. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5546. else
  5547. # Exported symbols can be pulled into shared objects from archives
  5548. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5549. fi
  5550. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5551. # This is similar to how AIX traditionally builds its shared
  5552. # libraries.
  5553. _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'
  5554. fi
  5555. fi
  5556. ;;
  5557. beos*)
  5558. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5559. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5560. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5561. # support --undefined. This deserves some investigation. FIXME
  5562. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5563. else
  5564. _LT_TAGVAR(ld_shlibs, $1)=no
  5565. fi
  5566. ;;
  5567. chorus*)
  5568. case $cc_basename in
  5569. *)
  5570. # FIXME: insert proper C++ library support
  5571. _LT_TAGVAR(ld_shlibs, $1)=no
  5572. ;;
  5573. esac
  5574. ;;
  5575. cygwin* | mingw* | pw32* | cegcc*)
  5576. case $GXX,$cc_basename in
  5577. ,cl* | no,cl*)
  5578. # Native MSVC
  5579. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5580. # no search path for DLLs.
  5581. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5582. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5583. _LT_TAGVAR(always_export_symbols, $1)=yes
  5584. _LT_TAGVAR(file_list_spec, $1)='@'
  5585. # Tell ltmain to make .lib files, not .a files.
  5586. libext=lib
  5587. # Tell ltmain to make .dll files, not .so files.
  5588. shrext_cmds=".dll"
  5589. # FIXME: Setting linknames here is a bad hack.
  5590. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  5591. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5592. $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  5593. else
  5594. $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  5595. fi~
  5596. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5597. linknames='
  5598. # The linker will not automatically build a static lib if we build a DLL.
  5599. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5600. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5601. # Don't use ranlib
  5602. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5603. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5604. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5605. case $lt_outputfile in
  5606. *.exe|*.EXE) ;;
  5607. *)
  5608. lt_outputfile="$lt_outputfile.exe"
  5609. lt_tool_outputfile="$lt_tool_outputfile.exe"
  5610. ;;
  5611. esac~
  5612. func_to_tool_file "$lt_outputfile"~
  5613. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  5614. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5615. $RM "$lt_outputfile.manifest";
  5616. fi'
  5617. ;;
  5618. *)
  5619. # g++
  5620. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5621. # as there is no search path for DLLs.
  5622. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5623. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  5624. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5625. _LT_TAGVAR(always_export_symbols, $1)=no
  5626. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5627. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5628. _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'
  5629. # If the export-symbols file already is a .def file (1st line
  5630. # is EXPORTS), use it as is; otherwise, prepend...
  5631. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5632. cp $export_symbols $output_objdir/$soname.def;
  5633. else
  5634. echo EXPORTS > $output_objdir/$soname.def;
  5635. cat $export_symbols >> $output_objdir/$soname.def;
  5636. fi~
  5637. $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'
  5638. else
  5639. _LT_TAGVAR(ld_shlibs, $1)=no
  5640. fi
  5641. ;;
  5642. esac
  5643. ;;
  5644. darwin* | rhapsody*)
  5645. _LT_DARWIN_LINKER_FEATURES($1)
  5646. ;;
  5647. dgux*)
  5648. case $cc_basename in
  5649. ec++*)
  5650. # FIXME: insert proper C++ library support
  5651. _LT_TAGVAR(ld_shlibs, $1)=no
  5652. ;;
  5653. ghcx*)
  5654. # Green Hills C++ Compiler
  5655. # FIXME: insert proper C++ library support
  5656. _LT_TAGVAR(ld_shlibs, $1)=no
  5657. ;;
  5658. *)
  5659. # FIXME: insert proper C++ library support
  5660. _LT_TAGVAR(ld_shlibs, $1)=no
  5661. ;;
  5662. esac
  5663. ;;
  5664. freebsd2.*)
  5665. # C++ shared libraries reported to be fairly broken before
  5666. # switch to ELF
  5667. _LT_TAGVAR(ld_shlibs, $1)=no
  5668. ;;
  5669. freebsd-elf*)
  5670. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5671. ;;
  5672. freebsd* | dragonfly*)
  5673. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  5674. # conventions
  5675. _LT_TAGVAR(ld_shlibs, $1)=yes
  5676. ;;
  5677. haiku*)
  5678. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5679. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5680. ;;
  5681. hpux9*)
  5682. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5683. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5684. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5685. _LT_TAGVAR(hardcode_direct, $1)=yes
  5686. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5687. # but as the default
  5688. # location of the library.
  5689. case $cc_basename in
  5690. CC*)
  5691. # FIXME: insert proper C++ library support
  5692. _LT_TAGVAR(ld_shlibs, $1)=no
  5693. ;;
  5694. aCC*)
  5695. _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'
  5696. # Commands to make compiler produce verbose output that lists
  5697. # what "hidden" libraries, object files and flags are used when
  5698. # linking a shared library.
  5699. #
  5700. # There doesn't appear to be a way to prevent this compiler from
  5701. # explicitly linking system object files so we need to strip them
  5702. # from the output so that they don't get included in the library
  5703. # dependencies.
  5704. 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"'
  5705. ;;
  5706. *)
  5707. if test "$GXX" = yes; then
  5708. _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'
  5709. else
  5710. # FIXME: insert proper C++ library support
  5711. _LT_TAGVAR(ld_shlibs, $1)=no
  5712. fi
  5713. ;;
  5714. esac
  5715. ;;
  5716. hpux10*|hpux11*)
  5717. if test $with_gnu_ld = no; then
  5718. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5719. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5720. case $host_cpu in
  5721. hppa*64*|ia64*)
  5722. ;;
  5723. *)
  5724. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5725. ;;
  5726. esac
  5727. fi
  5728. case $host_cpu in
  5729. hppa*64*|ia64*)
  5730. _LT_TAGVAR(hardcode_direct, $1)=no
  5731. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5732. ;;
  5733. *)
  5734. _LT_TAGVAR(hardcode_direct, $1)=yes
  5735. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5736. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  5737. # but as the default
  5738. # location of the library.
  5739. ;;
  5740. esac
  5741. case $cc_basename in
  5742. CC*)
  5743. # FIXME: insert proper C++ library support
  5744. _LT_TAGVAR(ld_shlibs, $1)=no
  5745. ;;
  5746. aCC*)
  5747. case $host_cpu in
  5748. hppa*64*)
  5749. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5750. ;;
  5751. ia64*)
  5752. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5753. ;;
  5754. *)
  5755. _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'
  5756. ;;
  5757. esac
  5758. # Commands to make compiler produce verbose output that lists
  5759. # what "hidden" libraries, object files and flags are used when
  5760. # linking a shared library.
  5761. #
  5762. # There doesn't appear to be a way to prevent this compiler from
  5763. # explicitly linking system object files so we need to strip them
  5764. # from the output so that they don't get included in the library
  5765. # dependencies.
  5766. 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"'
  5767. ;;
  5768. *)
  5769. if test "$GXX" = yes; then
  5770. if test $with_gnu_ld = no; then
  5771. case $host_cpu in
  5772. hppa*64*)
  5773. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5774. ;;
  5775. ia64*)
  5776. _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'
  5777. ;;
  5778. *)
  5779. _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'
  5780. ;;
  5781. esac
  5782. fi
  5783. else
  5784. # FIXME: insert proper C++ library support
  5785. _LT_TAGVAR(ld_shlibs, $1)=no
  5786. fi
  5787. ;;
  5788. esac
  5789. ;;
  5790. interix[[3-9]]*)
  5791. _LT_TAGVAR(hardcode_direct, $1)=no
  5792. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5793. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5794. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5795. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5796. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5797. # default) and relocated if they conflict, which is a slow very memory
  5798. # consuming and fragmenting process. To avoid this, we pick a random,
  5799. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5800. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5801. _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'
  5802. _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'
  5803. ;;
  5804. irix5* | irix6*)
  5805. case $cc_basename in
  5806. CC*)
  5807. # SGI C++
  5808. _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'
  5809. # Archives containing C++ object files must be created using
  5810. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  5811. # necessary to make sure instantiated templates are included
  5812. # in the archive.
  5813. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  5814. ;;
  5815. *)
  5816. if test "$GXX" = yes; then
  5817. if test "$with_gnu_ld" = no; then
  5818. _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'
  5819. else
  5820. _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'
  5821. fi
  5822. fi
  5823. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5824. ;;
  5825. esac
  5826. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5827. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5828. _LT_TAGVAR(inherit_rpath, $1)=yes
  5829. ;;
  5830. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
  5831. case $cc_basename in
  5832. KCC*)
  5833. # Kuck and Associates, Inc. (KAI) C++ Compiler
  5834. # KCC will only create a shared library if the output file
  5835. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  5836. # to its proper name (with version) after linking.
  5837. _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'
  5838. _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'
  5839. # Commands to make compiler produce verbose output that lists
  5840. # what "hidden" libraries, object files and flags are used when
  5841. # linking a shared library.
  5842. #
  5843. # There doesn't appear to be a way to prevent this compiler from
  5844. # explicitly linking system object files so we need to strip them
  5845. # from the output so that they don't get included in the library
  5846. # dependencies.
  5847. 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"'
  5848. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5849. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5850. # Archives containing C++ object files must be created using
  5851. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  5852. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  5853. ;;
  5854. icpc* | ecpc* )
  5855. # Intel C++
  5856. with_gnu_ld=yes
  5857. # version 8.0 and above of icpc choke on multiply defined symbols
  5858. # if we add $predep_objects and $postdep_objects, however 7.1 and
  5859. # earlier do not add the objects themselves.
  5860. case `$CC -V 2>&1` in
  5861. *"Version 7."*)
  5862. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5863. _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'
  5864. ;;
  5865. *) # Version 8.0 or newer
  5866. tmp_idyn=
  5867. case $host_cpu in
  5868. ia64*) tmp_idyn=' -i_dynamic';;
  5869. esac
  5870. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5871. _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'
  5872. ;;
  5873. esac
  5874. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5875. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5876. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5877. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5878. ;;
  5879. pgCC* | pgcpp*)
  5880. # Portland Group C++ compiler
  5881. case `$CC -V` in
  5882. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  5883. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  5884. rm -rf $tpldir~
  5885. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  5886. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  5887. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  5888. rm -rf $tpldir~
  5889. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  5890. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  5891. $RANLIB $oldlib'
  5892. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  5893. rm -rf $tpldir~
  5894. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5895. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5896. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  5897. rm -rf $tpldir~
  5898. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  5899. $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'
  5900. ;;
  5901. *) # Version 6 and above use weak symbols
  5902. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  5903. _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'
  5904. ;;
  5905. esac
  5906. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5907. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5908. _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'
  5909. ;;
  5910. cxx*)
  5911. # Compaq C++
  5912. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5913. _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'
  5914. runpath_var=LD_RUN_PATH
  5915. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5916. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5917. # Commands to make compiler produce verbose output that lists
  5918. # what "hidden" libraries, object files and flags are used when
  5919. # linking a shared library.
  5920. #
  5921. # There doesn't appear to be a way to prevent this compiler from
  5922. # explicitly linking system object files so we need to strip them
  5923. # from the output so that they don't get included in the library
  5924. # dependencies.
  5925. 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'
  5926. ;;
  5927. xl* | mpixl* | bgxl*)
  5928. # IBM XL 8.0 on PPC, with GNU ld
  5929. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5930. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5931. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5932. if test "x$supports_anon_versioning" = xyes; then
  5933. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5934. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5935. echo "local: *; };" >> $output_objdir/$libname.ver~
  5936. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5937. fi
  5938. ;;
  5939. *)
  5940. case `$CC -V 2>&1 | sed 5q` in
  5941. *Sun\ C*)
  5942. # Sun C++ 5.9
  5943. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  5944. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  5945. _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'
  5946. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5947. _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'
  5948. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5949. # Not sure whether something based on
  5950. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  5951. # would be better.
  5952. output_verbose_link_cmd='func_echo_all'
  5953. # Archives containing C++ object files must be created using
  5954. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  5955. # necessary to make sure instantiated templates are included
  5956. # in the archive.
  5957. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  5958. ;;
  5959. esac
  5960. ;;
  5961. esac
  5962. ;;
  5963. lynxos*)
  5964. # FIXME: insert proper C++ library support
  5965. _LT_TAGVAR(ld_shlibs, $1)=no
  5966. ;;
  5967. m88k*)
  5968. # FIXME: insert proper C++ library support
  5969. _LT_TAGVAR(ld_shlibs, $1)=no
  5970. ;;
  5971. mvs*)
  5972. case $cc_basename in
  5973. cxx*)
  5974. # FIXME: insert proper C++ library support
  5975. _LT_TAGVAR(ld_shlibs, $1)=no
  5976. ;;
  5977. *)
  5978. # FIXME: insert proper C++ library support
  5979. _LT_TAGVAR(ld_shlibs, $1)=no
  5980. ;;
  5981. esac
  5982. ;;
  5983. netbsd*)
  5984. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5985. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  5986. wlarc=
  5987. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5988. _LT_TAGVAR(hardcode_direct, $1)=yes
  5989. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5990. fi
  5991. # Workaround some broken pre-1.5 toolchains
  5992. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  5993. ;;
  5994. *nto* | *qnx*)
  5995. _LT_TAGVAR(ld_shlibs, $1)=yes
  5996. ;;
  5997. openbsd2*)
  5998. # C++ shared libraries are fairly broken
  5999. _LT_TAGVAR(ld_shlibs, $1)=no
  6000. ;;
  6001. openbsd*)
  6002. if test -f /usr/libexec/ld.so; then
  6003. _LT_TAGVAR(hardcode_direct, $1)=yes
  6004. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6005. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6006. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6007. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6008. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6009. _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'
  6010. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6011. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6012. fi
  6013. output_verbose_link_cmd=func_echo_all
  6014. else
  6015. _LT_TAGVAR(ld_shlibs, $1)=no
  6016. fi
  6017. ;;
  6018. osf3* | osf4* | osf5*)
  6019. case $cc_basename in
  6020. KCC*)
  6021. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6022. # KCC will only create a shared library if the output file
  6023. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6024. # to its proper name (with version) after linking.
  6025. _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'
  6026. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6027. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6028. # Archives containing C++ object files must be created using
  6029. # the KAI C++ compiler.
  6030. case $host in
  6031. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6032. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6033. esac
  6034. ;;
  6035. RCC*)
  6036. # Rational C++ 2.4.1
  6037. # FIXME: insert proper C++ library support
  6038. _LT_TAGVAR(ld_shlibs, $1)=no
  6039. ;;
  6040. cxx*)
  6041. case $host in
  6042. osf3*)
  6043. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6044. _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'
  6045. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6046. ;;
  6047. *)
  6048. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6049. _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'
  6050. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6051. echo "-hidden">> $lib.exp~
  6052. $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~
  6053. $RM $lib.exp'
  6054. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6055. ;;
  6056. esac
  6057. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6058. # Commands to make compiler produce verbose output that lists
  6059. # what "hidden" libraries, object files and flags are used when
  6060. # linking a shared library.
  6061. #
  6062. # There doesn't appear to be a way to prevent this compiler from
  6063. # explicitly linking system object files so we need to strip them
  6064. # from the output so that they don't get included in the library
  6065. # dependencies.
  6066. 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"'
  6067. ;;
  6068. *)
  6069. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6070. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6071. case $host in
  6072. osf3*)
  6073. _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'
  6074. ;;
  6075. *)
  6076. _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'
  6077. ;;
  6078. esac
  6079. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6080. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6081. # Commands to make compiler produce verbose output that lists
  6082. # what "hidden" libraries, object files and flags are used when
  6083. # linking a shared library.
  6084. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6085. else
  6086. # FIXME: insert proper C++ library support
  6087. _LT_TAGVAR(ld_shlibs, $1)=no
  6088. fi
  6089. ;;
  6090. esac
  6091. ;;
  6092. psos*)
  6093. # FIXME: insert proper C++ library support
  6094. _LT_TAGVAR(ld_shlibs, $1)=no
  6095. ;;
  6096. sunos4*)
  6097. case $cc_basename in
  6098. CC*)
  6099. # Sun C++ 4.x
  6100. # FIXME: insert proper C++ library support
  6101. _LT_TAGVAR(ld_shlibs, $1)=no
  6102. ;;
  6103. lcc*)
  6104. # Lucid
  6105. # FIXME: insert proper C++ library support
  6106. _LT_TAGVAR(ld_shlibs, $1)=no
  6107. ;;
  6108. *)
  6109. # FIXME: insert proper C++ library support
  6110. _LT_TAGVAR(ld_shlibs, $1)=no
  6111. ;;
  6112. esac
  6113. ;;
  6114. solaris*)
  6115. case $cc_basename in
  6116. CC* | sunCC*)
  6117. # Sun C++ 4.2, 5.x and Centerline C++
  6118. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6119. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6120. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6121. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6122. $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'
  6123. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6124. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6125. case $host_os in
  6126. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6127. *)
  6128. # The compiler driver will combine and reorder linker options,
  6129. # but understands `-z linker_flag'.
  6130. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6131. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6132. ;;
  6133. esac
  6134. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6135. output_verbose_link_cmd='func_echo_all'
  6136. # Archives containing C++ object files must be created using
  6137. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6138. # necessary to make sure instantiated templates are included
  6139. # in the archive.
  6140. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6141. ;;
  6142. gcx*)
  6143. # Green Hills C++ Compiler
  6144. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6145. # The C++ compiler must be used to create the archive.
  6146. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6147. ;;
  6148. *)
  6149. # GNU C++ compiler with Solaris linker
  6150. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6151. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  6152. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6153. _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'
  6154. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6155. $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6156. # Commands to make compiler produce verbose output that lists
  6157. # what "hidden" libraries, object files and flags are used when
  6158. # linking a shared library.
  6159. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6160. else
  6161. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  6162. # platform.
  6163. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6164. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6165. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6166. # Commands to make compiler produce verbose output that lists
  6167. # what "hidden" libraries, object files and flags are used when
  6168. # linking a shared library.
  6169. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6170. fi
  6171. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  6172. case $host_os in
  6173. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6174. *)
  6175. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6176. ;;
  6177. esac
  6178. fi
  6179. ;;
  6180. esac
  6181. ;;
  6182. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6183. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6184. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6185. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6186. runpath_var='LD_RUN_PATH'
  6187. case $cc_basename in
  6188. CC*)
  6189. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6190. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6191. ;;
  6192. *)
  6193. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6194. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6195. ;;
  6196. esac
  6197. ;;
  6198. sysv5* | sco3.2v5* | sco5v6*)
  6199. # Note: We can NOT use -z defs as we might desire, because we do not
  6200. # link with -lc, and that would cause any symbols used from libc to
  6201. # always be unresolved, which means just about no library would
  6202. # ever link correctly. If we're not using GNU ld we use -z text
  6203. # though, which does catch some bad symbols but isn't as heavy-handed
  6204. # as -z defs.
  6205. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6206. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  6207. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6208. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6209. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  6210. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6211. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6212. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6213. runpath_var='LD_RUN_PATH'
  6214. case $cc_basename in
  6215. CC*)
  6216. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6217. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6218. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6219. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6220. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6221. '"$_LT_TAGVAR(reload_cmds, $1)"
  6222. ;;
  6223. *)
  6224. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6225. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6226. ;;
  6227. esac
  6228. ;;
  6229. tandem*)
  6230. case $cc_basename in
  6231. NCC*)
  6232. # NonStop-UX NCC 3.20
  6233. # FIXME: insert proper C++ library support
  6234. _LT_TAGVAR(ld_shlibs, $1)=no
  6235. ;;
  6236. *)
  6237. # FIXME: insert proper C++ library support
  6238. _LT_TAGVAR(ld_shlibs, $1)=no
  6239. ;;
  6240. esac
  6241. ;;
  6242. vxworks*)
  6243. # FIXME: insert proper C++ library support
  6244. _LT_TAGVAR(ld_shlibs, $1)=no
  6245. ;;
  6246. *)
  6247. # FIXME: insert proper C++ library support
  6248. _LT_TAGVAR(ld_shlibs, $1)=no
  6249. ;;
  6250. esac
  6251. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6252. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6253. _LT_TAGVAR(GCC, $1)="$GXX"
  6254. _LT_TAGVAR(LD, $1)="$LD"
  6255. ## CAVEAT EMPTOR:
  6256. ## There is no encapsulation within the following macros, do not change
  6257. ## the running order or otherwise move them around unless you know exactly
  6258. ## what you are doing...
  6259. _LT_SYS_HIDDEN_LIBDEPS($1)
  6260. _LT_COMPILER_PIC($1)
  6261. _LT_COMPILER_C_O($1)
  6262. _LT_COMPILER_FILE_LOCKS($1)
  6263. _LT_LINKER_SHLIBS($1)
  6264. _LT_SYS_DYNAMIC_LINKER($1)
  6265. _LT_LINKER_HARDCODE_LIBPATH($1)
  6266. _LT_CONFIG($1)
  6267. fi # test -n "$compiler"
  6268. CC=$lt_save_CC
  6269. CFLAGS=$lt_save_CFLAGS
  6270. LDCXX=$LD
  6271. LD=$lt_save_LD
  6272. GCC=$lt_save_GCC
  6273. with_gnu_ld=$lt_save_with_gnu_ld
  6274. lt_cv_path_LDCXX=$lt_cv_path_LD
  6275. lt_cv_path_LD=$lt_save_path_LD
  6276. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6277. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6278. fi # test "$_lt_caught_CXX_error" != yes
  6279. AC_LANG_POP
  6280. ])# _LT_LANG_CXX_CONFIG
  6281. # _LT_FUNC_STRIPNAME_CNF
  6282. # ----------------------
  6283. # func_stripname_cnf prefix suffix name
  6284. # strip PREFIX and SUFFIX off of NAME.
  6285. # PREFIX and SUFFIX must not contain globbing or regex special
  6286. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6287. # dot (in which case that matches only a dot).
  6288. #
  6289. # This function is identical to the (non-XSI) version of func_stripname,
  6290. # except this one can be used by m4 code that may be executed by configure,
  6291. # rather than the libtool script.
  6292. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6293. AC_REQUIRE([_LT_DECL_SED])
  6294. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6295. func_stripname_cnf ()
  6296. {
  6297. case ${2} in
  6298. .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
  6299. *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
  6300. esac
  6301. } # func_stripname_cnf
  6302. ])# _LT_FUNC_STRIPNAME_CNF
  6303. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6304. # ---------------------------------
  6305. # Figure out "hidden" library dependencies from verbose
  6306. # compiler output when linking a shared library.
  6307. # Parse the compiler output and extract the necessary
  6308. # objects, libraries and library flags.
  6309. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6310. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6311. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6312. # Dependencies to place before and after the object being linked:
  6313. _LT_TAGVAR(predep_objects, $1)=
  6314. _LT_TAGVAR(postdep_objects, $1)=
  6315. _LT_TAGVAR(predeps, $1)=
  6316. _LT_TAGVAR(postdeps, $1)=
  6317. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6318. dnl we can't use the lt_simple_compile_test_code here,
  6319. dnl because it contains code intended for an executable,
  6320. dnl not a library. It's possible we should let each
  6321. dnl tag define a new lt_????_link_test_code variable,
  6322. dnl but it's only used here...
  6323. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6324. int a;
  6325. void foo (void) { a = 0; }
  6326. _LT_EOF
  6327. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6328. class Foo
  6329. {
  6330. public:
  6331. Foo (void) { a = 0; }
  6332. private:
  6333. int a;
  6334. };
  6335. _LT_EOF
  6336. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6337. subroutine foo
  6338. implicit none
  6339. integer*4 a
  6340. a=0
  6341. return
  6342. end
  6343. _LT_EOF
  6344. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6345. subroutine foo
  6346. implicit none
  6347. integer a
  6348. a=0
  6349. return
  6350. end
  6351. _LT_EOF
  6352. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  6353. public class foo {
  6354. private int a;
  6355. public void bar (void) {
  6356. a = 0;
  6357. }
  6358. };
  6359. _LT_EOF
  6360. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  6361. package foo
  6362. func foo() {
  6363. }
  6364. _LT_EOF
  6365. ])
  6366. _lt_libdeps_save_CFLAGS=$CFLAGS
  6367. case "$CC $CFLAGS " in #(
  6368. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  6369. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  6370. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  6371. esac
  6372. dnl Parse the compiler output and extract the necessary
  6373. dnl objects, libraries and library flags.
  6374. if AC_TRY_EVAL(ac_compile); then
  6375. # Parse the compiler output and extract the necessary
  6376. # objects, libraries and library flags.
  6377. # Sentinel used to keep track of whether or not we are before
  6378. # the conftest object file.
  6379. pre_test_object_deps_done=no
  6380. for p in `eval "$output_verbose_link_cmd"`; do
  6381. case ${prev}${p} in
  6382. -L* | -R* | -l*)
  6383. # Some compilers place space between "-{L,R}" and the path.
  6384. # Remove the space.
  6385. if test $p = "-L" ||
  6386. test $p = "-R"; then
  6387. prev=$p
  6388. continue
  6389. fi
  6390. # Expand the sysroot to ease extracting the directories later.
  6391. if test -z "$prev"; then
  6392. case $p in
  6393. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  6394. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  6395. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  6396. esac
  6397. fi
  6398. case $p in
  6399. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  6400. esac
  6401. if test "$pre_test_object_deps_done" = no; then
  6402. case ${prev} in
  6403. -L | -R)
  6404. # Internal compiler library paths should come after those
  6405. # provided the user. The postdeps already come after the
  6406. # user supplied libs so there is no need to process them.
  6407. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  6408. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  6409. else
  6410. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  6411. fi
  6412. ;;
  6413. # The "-l" case would never come before the object being
  6414. # linked, so don't bother handling this case.
  6415. esac
  6416. else
  6417. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  6418. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  6419. else
  6420. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  6421. fi
  6422. fi
  6423. prev=
  6424. ;;
  6425. *.lto.$objext) ;; # Ignore GCC LTO objects
  6426. *.$objext)
  6427. # This assumes that the test object file only shows up
  6428. # once in the compiler output.
  6429. if test "$p" = "conftest.$objext"; then
  6430. pre_test_object_deps_done=yes
  6431. continue
  6432. fi
  6433. if test "$pre_test_object_deps_done" = no; then
  6434. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  6435. _LT_TAGVAR(predep_objects, $1)="$p"
  6436. else
  6437. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  6438. fi
  6439. else
  6440. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  6441. _LT_TAGVAR(postdep_objects, $1)="$p"
  6442. else
  6443. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  6444. fi
  6445. fi
  6446. ;;
  6447. *) ;; # Ignore the rest.
  6448. esac
  6449. done
  6450. # Clean up.
  6451. rm -f a.out a.exe
  6452. else
  6453. echo "libtool.m4: error: problem compiling $1 test program"
  6454. fi
  6455. $RM -f confest.$objext
  6456. CFLAGS=$_lt_libdeps_save_CFLAGS
  6457. # PORTME: override above test on systems where it is broken
  6458. m4_if([$1], [CXX],
  6459. [case $host_os in
  6460. interix[[3-9]]*)
  6461. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  6462. # hack all around it, let's just trust "g++" to DTRT.
  6463. _LT_TAGVAR(predep_objects,$1)=
  6464. _LT_TAGVAR(postdep_objects,$1)=
  6465. _LT_TAGVAR(postdeps,$1)=
  6466. ;;
  6467. linux*)
  6468. case `$CC -V 2>&1 | sed 5q` in
  6469. *Sun\ C*)
  6470. # Sun C++ 5.9
  6471. # The more standards-conforming stlport4 library is
  6472. # incompatible with the Cstd library. Avoid specifying
  6473. # it if it's in CXXFLAGS. Ignore libCrun as
  6474. # -library=stlport4 depends on it.
  6475. case " $CXX $CXXFLAGS " in
  6476. *" -library=stlport4 "*)
  6477. solaris_use_stlport4=yes
  6478. ;;
  6479. esac
  6480. if test "$solaris_use_stlport4" != yes; then
  6481. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6482. fi
  6483. ;;
  6484. esac
  6485. ;;
  6486. solaris*)
  6487. case $cc_basename in
  6488. CC* | sunCC*)
  6489. # The more standards-conforming stlport4 library is
  6490. # incompatible with the Cstd library. Avoid specifying
  6491. # it if it's in CXXFLAGS. Ignore libCrun as
  6492. # -library=stlport4 depends on it.
  6493. case " $CXX $CXXFLAGS " in
  6494. *" -library=stlport4 "*)
  6495. solaris_use_stlport4=yes
  6496. ;;
  6497. esac
  6498. # Adding this requires a known-good setup of shared libraries for
  6499. # Sun compiler versions before 5.6, else PIC objects from an old
  6500. # archive will be linked into the output, leading to subtle bugs.
  6501. if test "$solaris_use_stlport4" != yes; then
  6502. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  6503. fi
  6504. ;;
  6505. esac
  6506. ;;
  6507. esac
  6508. ])
  6509. case " $_LT_TAGVAR(postdeps, $1) " in
  6510. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  6511. esac
  6512. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  6513. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  6514. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  6515. fi
  6516. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  6517. [The directories searched by this compiler when creating a shared library])
  6518. _LT_TAGDECL([], [predep_objects], [1],
  6519. [Dependencies to place before and after the objects being linked to
  6520. create a shared library])
  6521. _LT_TAGDECL([], [postdep_objects], [1])
  6522. _LT_TAGDECL([], [predeps], [1])
  6523. _LT_TAGDECL([], [postdeps], [1])
  6524. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  6525. [The library search path used internally by the compiler when linking
  6526. a shared library])
  6527. ])# _LT_SYS_HIDDEN_LIBDEPS
  6528. # _LT_LANG_F77_CONFIG([TAG])
  6529. # --------------------------
  6530. # Ensure that the configuration variables for a Fortran 77 compiler are
  6531. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6532. # to write the compiler configuration to `libtool'.
  6533. m4_defun([_LT_LANG_F77_CONFIG],
  6534. [AC_LANG_PUSH(Fortran 77)
  6535. if test -z "$F77" || test "X$F77" = "Xno"; then
  6536. _lt_disable_F77=yes
  6537. fi
  6538. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6539. _LT_TAGVAR(allow_undefined_flag, $1)=
  6540. _LT_TAGVAR(always_export_symbols, $1)=no
  6541. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6542. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6543. _LT_TAGVAR(hardcode_direct, $1)=no
  6544. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6545. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6546. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6547. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6548. _LT_TAGVAR(hardcode_automatic, $1)=no
  6549. _LT_TAGVAR(inherit_rpath, $1)=no
  6550. _LT_TAGVAR(module_cmds, $1)=
  6551. _LT_TAGVAR(module_expsym_cmds, $1)=
  6552. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6553. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6554. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6555. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6556. _LT_TAGVAR(no_undefined_flag, $1)=
  6557. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6558. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6559. # Source file extension for f77 test sources.
  6560. ac_ext=f
  6561. # Object file extension for compiled f77 test sources.
  6562. objext=o
  6563. _LT_TAGVAR(objext, $1)=$objext
  6564. # No sense in running all these tests if we already determined that
  6565. # the F77 compiler isn't working. Some variables (like enable_shared)
  6566. # are currently assumed to apply to all compilers on this platform,
  6567. # and will be corrupted by setting them based on a non-working compiler.
  6568. if test "$_lt_disable_F77" != yes; then
  6569. # Code to be used in simple compile tests
  6570. lt_simple_compile_test_code="\
  6571. subroutine t
  6572. return
  6573. end
  6574. "
  6575. # Code to be used in simple link tests
  6576. lt_simple_link_test_code="\
  6577. program t
  6578. end
  6579. "
  6580. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6581. _LT_TAG_COMPILER
  6582. # save warnings/boilerplate of simple test code
  6583. _LT_COMPILER_BOILERPLATE
  6584. _LT_LINKER_BOILERPLATE
  6585. # Allow CC to be a program name with arguments.
  6586. lt_save_CC="$CC"
  6587. lt_save_GCC=$GCC
  6588. lt_save_CFLAGS=$CFLAGS
  6589. CC=${F77-"f77"}
  6590. CFLAGS=$FFLAGS
  6591. compiler=$CC
  6592. _LT_TAGVAR(compiler, $1)=$CC
  6593. _LT_CC_BASENAME([$compiler])
  6594. GCC=$G77
  6595. if test -n "$compiler"; then
  6596. AC_MSG_CHECKING([if libtool supports shared libraries])
  6597. AC_MSG_RESULT([$can_build_shared])
  6598. AC_MSG_CHECKING([whether to build shared libraries])
  6599. test "$can_build_shared" = "no" && enable_shared=no
  6600. # On AIX, shared libraries and static libraries use the same namespace, and
  6601. # are all built from PIC.
  6602. case $host_os in
  6603. aix3*)
  6604. test "$enable_shared" = yes && enable_static=no
  6605. if test -n "$RANLIB"; then
  6606. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6607. postinstall_cmds='$RANLIB $lib'
  6608. fi
  6609. ;;
  6610. aix[[4-9]]*)
  6611. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6612. test "$enable_shared" = yes && enable_static=no
  6613. fi
  6614. ;;
  6615. esac
  6616. AC_MSG_RESULT([$enable_shared])
  6617. AC_MSG_CHECKING([whether to build static libraries])
  6618. # Make sure either enable_shared or enable_static is yes.
  6619. test "$enable_shared" = yes || enable_static=yes
  6620. AC_MSG_RESULT([$enable_static])
  6621. _LT_TAGVAR(GCC, $1)="$G77"
  6622. _LT_TAGVAR(LD, $1)="$LD"
  6623. ## CAVEAT EMPTOR:
  6624. ## There is no encapsulation within the following macros, do not change
  6625. ## the running order or otherwise move them around unless you know exactly
  6626. ## what you are doing...
  6627. _LT_COMPILER_PIC($1)
  6628. _LT_COMPILER_C_O($1)
  6629. _LT_COMPILER_FILE_LOCKS($1)
  6630. _LT_LINKER_SHLIBS($1)
  6631. _LT_SYS_DYNAMIC_LINKER($1)
  6632. _LT_LINKER_HARDCODE_LIBPATH($1)
  6633. _LT_CONFIG($1)
  6634. fi # test -n "$compiler"
  6635. GCC=$lt_save_GCC
  6636. CC="$lt_save_CC"
  6637. CFLAGS="$lt_save_CFLAGS"
  6638. fi # test "$_lt_disable_F77" != yes
  6639. AC_LANG_POP
  6640. ])# _LT_LANG_F77_CONFIG
  6641. # _LT_LANG_FC_CONFIG([TAG])
  6642. # -------------------------
  6643. # Ensure that the configuration variables for a Fortran compiler are
  6644. # suitably defined. These variables are subsequently used by _LT_CONFIG
  6645. # to write the compiler configuration to `libtool'.
  6646. m4_defun([_LT_LANG_FC_CONFIG],
  6647. [AC_LANG_PUSH(Fortran)
  6648. if test -z "$FC" || test "X$FC" = "Xno"; then
  6649. _lt_disable_FC=yes
  6650. fi
  6651. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6652. _LT_TAGVAR(allow_undefined_flag, $1)=
  6653. _LT_TAGVAR(always_export_symbols, $1)=no
  6654. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6655. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6656. _LT_TAGVAR(hardcode_direct, $1)=no
  6657. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6658. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6659. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6660. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6661. _LT_TAGVAR(hardcode_automatic, $1)=no
  6662. _LT_TAGVAR(inherit_rpath, $1)=no
  6663. _LT_TAGVAR(module_cmds, $1)=
  6664. _LT_TAGVAR(module_expsym_cmds, $1)=
  6665. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6666. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6667. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6668. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6669. _LT_TAGVAR(no_undefined_flag, $1)=
  6670. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6671. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6672. # Source file extension for fc test sources.
  6673. ac_ext=${ac_fc_srcext-f}
  6674. # Object file extension for compiled fc test sources.
  6675. objext=o
  6676. _LT_TAGVAR(objext, $1)=$objext
  6677. # No sense in running all these tests if we already determined that
  6678. # the FC compiler isn't working. Some variables (like enable_shared)
  6679. # are currently assumed to apply to all compilers on this platform,
  6680. # and will be corrupted by setting them based on a non-working compiler.
  6681. if test "$_lt_disable_FC" != yes; then
  6682. # Code to be used in simple compile tests
  6683. lt_simple_compile_test_code="\
  6684. subroutine t
  6685. return
  6686. end
  6687. "
  6688. # Code to be used in simple link tests
  6689. lt_simple_link_test_code="\
  6690. program t
  6691. end
  6692. "
  6693. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6694. _LT_TAG_COMPILER
  6695. # save warnings/boilerplate of simple test code
  6696. _LT_COMPILER_BOILERPLATE
  6697. _LT_LINKER_BOILERPLATE
  6698. # Allow CC to be a program name with arguments.
  6699. lt_save_CC="$CC"
  6700. lt_save_GCC=$GCC
  6701. lt_save_CFLAGS=$CFLAGS
  6702. CC=${FC-"f95"}
  6703. CFLAGS=$FCFLAGS
  6704. compiler=$CC
  6705. GCC=$ac_cv_fc_compiler_gnu
  6706. _LT_TAGVAR(compiler, $1)=$CC
  6707. _LT_CC_BASENAME([$compiler])
  6708. if test -n "$compiler"; then
  6709. AC_MSG_CHECKING([if libtool supports shared libraries])
  6710. AC_MSG_RESULT([$can_build_shared])
  6711. AC_MSG_CHECKING([whether to build shared libraries])
  6712. test "$can_build_shared" = "no" && enable_shared=no
  6713. # On AIX, shared libraries and static libraries use the same namespace, and
  6714. # are all built from PIC.
  6715. case $host_os in
  6716. aix3*)
  6717. test "$enable_shared" = yes && enable_static=no
  6718. if test -n "$RANLIB"; then
  6719. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6720. postinstall_cmds='$RANLIB $lib'
  6721. fi
  6722. ;;
  6723. aix[[4-9]]*)
  6724. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6725. test "$enable_shared" = yes && enable_static=no
  6726. fi
  6727. ;;
  6728. esac
  6729. AC_MSG_RESULT([$enable_shared])
  6730. AC_MSG_CHECKING([whether to build static libraries])
  6731. # Make sure either enable_shared or enable_static is yes.
  6732. test "$enable_shared" = yes || enable_static=yes
  6733. AC_MSG_RESULT([$enable_static])
  6734. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  6735. _LT_TAGVAR(LD, $1)="$LD"
  6736. ## CAVEAT EMPTOR:
  6737. ## There is no encapsulation within the following macros, do not change
  6738. ## the running order or otherwise move them around unless you know exactly
  6739. ## what you are doing...
  6740. _LT_SYS_HIDDEN_LIBDEPS($1)
  6741. _LT_COMPILER_PIC($1)
  6742. _LT_COMPILER_C_O($1)
  6743. _LT_COMPILER_FILE_LOCKS($1)
  6744. _LT_LINKER_SHLIBS($1)
  6745. _LT_SYS_DYNAMIC_LINKER($1)
  6746. _LT_LINKER_HARDCODE_LIBPATH($1)
  6747. _LT_CONFIG($1)
  6748. fi # test -n "$compiler"
  6749. GCC=$lt_save_GCC
  6750. CC=$lt_save_CC
  6751. CFLAGS=$lt_save_CFLAGS
  6752. fi # test "$_lt_disable_FC" != yes
  6753. AC_LANG_POP
  6754. ])# _LT_LANG_FC_CONFIG
  6755. # _LT_LANG_GCJ_CONFIG([TAG])
  6756. # --------------------------
  6757. # Ensure that the configuration variables for the GNU Java Compiler compiler
  6758. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6759. # to write the compiler configuration to `libtool'.
  6760. m4_defun([_LT_LANG_GCJ_CONFIG],
  6761. [AC_REQUIRE([LT_PROG_GCJ])dnl
  6762. AC_LANG_SAVE
  6763. # Source file extension for Java test sources.
  6764. ac_ext=java
  6765. # Object file extension for compiled Java test sources.
  6766. objext=o
  6767. _LT_TAGVAR(objext, $1)=$objext
  6768. # Code to be used in simple compile tests
  6769. lt_simple_compile_test_code="class foo {}"
  6770. # Code to be used in simple link tests
  6771. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  6772. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6773. _LT_TAG_COMPILER
  6774. # save warnings/boilerplate of simple test code
  6775. _LT_COMPILER_BOILERPLATE
  6776. _LT_LINKER_BOILERPLATE
  6777. # Allow CC to be a program name with arguments.
  6778. lt_save_CC=$CC
  6779. lt_save_CFLAGS=$CFLAGS
  6780. lt_save_GCC=$GCC
  6781. GCC=yes
  6782. CC=${GCJ-"gcj"}
  6783. CFLAGS=$GCJFLAGS
  6784. compiler=$CC
  6785. _LT_TAGVAR(compiler, $1)=$CC
  6786. _LT_TAGVAR(LD, $1)="$LD"
  6787. _LT_CC_BASENAME([$compiler])
  6788. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  6789. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6790. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6791. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6792. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6793. if test -n "$compiler"; then
  6794. _LT_COMPILER_NO_RTTI($1)
  6795. _LT_COMPILER_PIC($1)
  6796. _LT_COMPILER_C_O($1)
  6797. _LT_COMPILER_FILE_LOCKS($1)
  6798. _LT_LINKER_SHLIBS($1)
  6799. _LT_LINKER_HARDCODE_LIBPATH($1)
  6800. _LT_CONFIG($1)
  6801. fi
  6802. AC_LANG_RESTORE
  6803. GCC=$lt_save_GCC
  6804. CC=$lt_save_CC
  6805. CFLAGS=$lt_save_CFLAGS
  6806. ])# _LT_LANG_GCJ_CONFIG
  6807. # _LT_LANG_GO_CONFIG([TAG])
  6808. # --------------------------
  6809. # Ensure that the configuration variables for the GNU Go compiler
  6810. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6811. # to write the compiler configuration to `libtool'.
  6812. m4_defun([_LT_LANG_GO_CONFIG],
  6813. [AC_REQUIRE([LT_PROG_GO])dnl
  6814. AC_LANG_SAVE
  6815. # Source file extension for Go test sources.
  6816. ac_ext=go
  6817. # Object file extension for compiled Go test sources.
  6818. objext=o
  6819. _LT_TAGVAR(objext, $1)=$objext
  6820. # Code to be used in simple compile tests
  6821. lt_simple_compile_test_code="package main; func main() { }"
  6822. # Code to be used in simple link tests
  6823. lt_simple_link_test_code='package main; func main() { }'
  6824. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6825. _LT_TAG_COMPILER
  6826. # save warnings/boilerplate of simple test code
  6827. _LT_COMPILER_BOILERPLATE
  6828. _LT_LINKER_BOILERPLATE
  6829. # Allow CC to be a program name with arguments.
  6830. lt_save_CC=$CC
  6831. lt_save_CFLAGS=$CFLAGS
  6832. lt_save_GCC=$GCC
  6833. GCC=yes
  6834. CC=${GOC-"gccgo"}
  6835. CFLAGS=$GOFLAGS
  6836. compiler=$CC
  6837. _LT_TAGVAR(compiler, $1)=$CC
  6838. _LT_TAGVAR(LD, $1)="$LD"
  6839. _LT_CC_BASENAME([$compiler])
  6840. # Go did not exist at the time GCC didn't implicitly link libc in.
  6841. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6842. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6843. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6844. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6845. if test -n "$compiler"; then
  6846. _LT_COMPILER_NO_RTTI($1)
  6847. _LT_COMPILER_PIC($1)
  6848. _LT_COMPILER_C_O($1)
  6849. _LT_COMPILER_FILE_LOCKS($1)
  6850. _LT_LINKER_SHLIBS($1)
  6851. _LT_LINKER_HARDCODE_LIBPATH($1)
  6852. _LT_CONFIG($1)
  6853. fi
  6854. AC_LANG_RESTORE
  6855. GCC=$lt_save_GCC
  6856. CC=$lt_save_CC
  6857. CFLAGS=$lt_save_CFLAGS
  6858. ])# _LT_LANG_GO_CONFIG
  6859. # _LT_LANG_RC_CONFIG([TAG])
  6860. # -------------------------
  6861. # Ensure that the configuration variables for the Windows resource compiler
  6862. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  6863. # to write the compiler configuration to `libtool'.
  6864. m4_defun([_LT_LANG_RC_CONFIG],
  6865. [AC_REQUIRE([LT_PROG_RC])dnl
  6866. AC_LANG_SAVE
  6867. # Source file extension for RC test sources.
  6868. ac_ext=rc
  6869. # Object file extension for compiled RC test sources.
  6870. objext=o
  6871. _LT_TAGVAR(objext, $1)=$objext
  6872. # Code to be used in simple compile tests
  6873. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  6874. # Code to be used in simple link tests
  6875. lt_simple_link_test_code="$lt_simple_compile_test_code"
  6876. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6877. _LT_TAG_COMPILER
  6878. # save warnings/boilerplate of simple test code
  6879. _LT_COMPILER_BOILERPLATE
  6880. _LT_LINKER_BOILERPLATE
  6881. # Allow CC to be a program name with arguments.
  6882. lt_save_CC="$CC"
  6883. lt_save_CFLAGS=$CFLAGS
  6884. lt_save_GCC=$GCC
  6885. GCC=
  6886. CC=${RC-"windres"}
  6887. CFLAGS=
  6888. compiler=$CC
  6889. _LT_TAGVAR(compiler, $1)=$CC
  6890. _LT_CC_BASENAME([$compiler])
  6891. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  6892. if test -n "$compiler"; then
  6893. :
  6894. _LT_CONFIG($1)
  6895. fi
  6896. GCC=$lt_save_GCC
  6897. AC_LANG_RESTORE
  6898. CC=$lt_save_CC
  6899. CFLAGS=$lt_save_CFLAGS
  6900. ])# _LT_LANG_RC_CONFIG
  6901. # LT_PROG_GCJ
  6902. # -----------
  6903. AC_DEFUN([LT_PROG_GCJ],
  6904. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  6905. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  6906. [AC_CHECK_TOOL(GCJ, gcj,)
  6907. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  6908. AC_SUBST(GCJFLAGS)])])[]dnl
  6909. ])
  6910. # Old name:
  6911. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  6912. dnl aclocal-1.4 backwards compatibility:
  6913. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  6914. # LT_PROG_GO
  6915. # ----------
  6916. AC_DEFUN([LT_PROG_GO],
  6917. [AC_CHECK_TOOL(GOC, gccgo,)
  6918. ])
  6919. # LT_PROG_RC
  6920. # ----------
  6921. AC_DEFUN([LT_PROG_RC],
  6922. [AC_CHECK_TOOL(RC, windres,)
  6923. ])
  6924. # Old name:
  6925. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  6926. dnl aclocal-1.4 backwards compatibility:
  6927. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  6928. # _LT_DECL_EGREP
  6929. # --------------
  6930. # If we don't have a new enough Autoconf to choose the best grep
  6931. # available, choose the one first in the user's PATH.
  6932. m4_defun([_LT_DECL_EGREP],
  6933. [AC_REQUIRE([AC_PROG_EGREP])dnl
  6934. AC_REQUIRE([AC_PROG_FGREP])dnl
  6935. test -z "$GREP" && GREP=grep
  6936. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  6937. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  6938. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  6939. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  6940. AC_SUBST([GREP])
  6941. ])
  6942. # _LT_DECL_OBJDUMP
  6943. # --------------
  6944. # If we don't have a new enough Autoconf to choose the best objdump
  6945. # available, choose the one first in the user's PATH.
  6946. m4_defun([_LT_DECL_OBJDUMP],
  6947. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  6948. test -z "$OBJDUMP" && OBJDUMP=objdump
  6949. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  6950. AC_SUBST([OBJDUMP])
  6951. ])
  6952. # _LT_DECL_DLLTOOL
  6953. # ----------------
  6954. # Ensure DLLTOOL variable is set.
  6955. m4_defun([_LT_DECL_DLLTOOL],
  6956. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  6957. test -z "$DLLTOOL" && DLLTOOL=dlltool
  6958. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  6959. AC_SUBST([DLLTOOL])
  6960. ])
  6961. # _LT_DECL_SED
  6962. # ------------
  6963. # Check for a fully-functional sed program, that truncates
  6964. # as few characters as possible. Prefer GNU sed if found.
  6965. m4_defun([_LT_DECL_SED],
  6966. [AC_PROG_SED
  6967. test -z "$SED" && SED=sed
  6968. Xsed="$SED -e 1s/^X//"
  6969. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  6970. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  6971. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  6972. ])# _LT_DECL_SED
  6973. m4_ifndef([AC_PROG_SED], [
  6974. # NOTE: This macro has been submitted for inclusion into #
  6975. # GNU Autoconf as AC_PROG_SED. When it is available in #
  6976. # a released version of Autoconf we should remove this #
  6977. # macro and use it instead. #
  6978. m4_defun([AC_PROG_SED],
  6979. [AC_MSG_CHECKING([for a sed that does not truncate output])
  6980. AC_CACHE_VAL(lt_cv_path_SED,
  6981. [# Loop through the user's path and test for sed and gsed.
  6982. # Then use that list of sed's as ones to test for truncation.
  6983. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6984. for as_dir in $PATH
  6985. do
  6986. IFS=$as_save_IFS
  6987. test -z "$as_dir" && as_dir=.
  6988. for lt_ac_prog in sed gsed; do
  6989. for ac_exec_ext in '' $ac_executable_extensions; do
  6990. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  6991. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  6992. fi
  6993. done
  6994. done
  6995. done
  6996. IFS=$as_save_IFS
  6997. lt_ac_max=0
  6998. lt_ac_count=0
  6999. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7000. # along with /bin/sed that truncates output.
  7001. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7002. test ! -f $lt_ac_sed && continue
  7003. cat /dev/null > conftest.in
  7004. lt_ac_count=0
  7005. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7006. # Check for GNU sed and select it if it is found.
  7007. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7008. lt_cv_path_SED=$lt_ac_sed
  7009. break
  7010. fi
  7011. while true; do
  7012. cat conftest.in conftest.in >conftest.tmp
  7013. mv conftest.tmp conftest.in
  7014. cp conftest.in conftest.nl
  7015. echo >>conftest.nl
  7016. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7017. cmp -s conftest.out conftest.nl || break
  7018. # 10000 chars as input seems more than enough
  7019. test $lt_ac_count -gt 10 && break
  7020. lt_ac_count=`expr $lt_ac_count + 1`
  7021. if test $lt_ac_count -gt $lt_ac_max; then
  7022. lt_ac_max=$lt_ac_count
  7023. lt_cv_path_SED=$lt_ac_sed
  7024. fi
  7025. done
  7026. done
  7027. ])
  7028. SED=$lt_cv_path_SED
  7029. AC_SUBST([SED])
  7030. AC_MSG_RESULT([$SED])
  7031. ])#AC_PROG_SED
  7032. ])#m4_ifndef
  7033. # Old name:
  7034. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7035. dnl aclocal-1.4 backwards compatibility:
  7036. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7037. # _LT_CHECK_SHELL_FEATURES
  7038. # ------------------------
  7039. # Find out whether the shell is Bourne or XSI compatible,
  7040. # or has some other useful features.
  7041. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7042. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  7043. # Try some XSI features
  7044. xsi_shell=no
  7045. ( _lt_dummy="a/b/c"
  7046. test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
  7047. = c,a/b,b/c, \
  7048. && eval 'test $(( 1 + 1 )) -eq 2 \
  7049. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  7050. && xsi_shell=yes
  7051. AC_MSG_RESULT([$xsi_shell])
  7052. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  7053. AC_MSG_CHECKING([whether the shell understands "+="])
  7054. lt_shell_append=no
  7055. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  7056. >/dev/null 2>&1 \
  7057. && lt_shell_append=yes
  7058. AC_MSG_RESULT([$lt_shell_append])
  7059. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  7060. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7061. lt_unset=unset
  7062. else
  7063. lt_unset=false
  7064. fi
  7065. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7066. # test EBCDIC or ASCII
  7067. case `echo X|tr X '\101'` in
  7068. A) # ASCII based system
  7069. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7070. lt_SP2NL='tr \040 \012'
  7071. lt_NL2SP='tr \015\012 \040\040'
  7072. ;;
  7073. *) # EBCDIC based system
  7074. lt_SP2NL='tr \100 \n'
  7075. lt_NL2SP='tr \r\n \100\100'
  7076. ;;
  7077. esac
  7078. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7079. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7080. ])# _LT_CHECK_SHELL_FEATURES
  7081. # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
  7082. # ------------------------------------------------------
  7083. # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
  7084. # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
  7085. m4_defun([_LT_PROG_FUNCTION_REPLACE],
  7086. [dnl {
  7087. sed -e '/^$1 ()$/,/^} # $1 /c\
  7088. $1 ()\
  7089. {\
  7090. m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
  7091. } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
  7092. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7093. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7094. test 0 -eq $? || _lt_function_replace_fail=:
  7095. ])
  7096. # _LT_PROG_REPLACE_SHELLFNS
  7097. # -------------------------
  7098. # Replace existing portable implementations of several shell functions with
  7099. # equivalent extended shell implementations where those features are available..
  7100. m4_defun([_LT_PROG_REPLACE_SHELLFNS],
  7101. [if test x"$xsi_shell" = xyes; then
  7102. _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
  7103. case ${1} in
  7104. */*) func_dirname_result="${1%/*}${2}" ;;
  7105. * ) func_dirname_result="${3}" ;;
  7106. esac])
  7107. _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
  7108. func_basename_result="${1##*/}"])
  7109. _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
  7110. case ${1} in
  7111. */*) func_dirname_result="${1%/*}${2}" ;;
  7112. * ) func_dirname_result="${3}" ;;
  7113. esac
  7114. func_basename_result="${1##*/}"])
  7115. _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
  7116. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  7117. # positional parameters, so assign one to ordinary parameter first.
  7118. func_stripname_result=${3}
  7119. func_stripname_result=${func_stripname_result#"${1}"}
  7120. func_stripname_result=${func_stripname_result%"${2}"}])
  7121. _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
  7122. func_split_long_opt_name=${1%%=*}
  7123. func_split_long_opt_arg=${1#*=}])
  7124. _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
  7125. func_split_short_opt_arg=${1#??}
  7126. func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
  7127. _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
  7128. case ${1} in
  7129. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  7130. *) func_lo2o_result=${1} ;;
  7131. esac])
  7132. _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
  7133. _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
  7134. _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
  7135. fi
  7136. if test x"$lt_shell_append" = xyes; then
  7137. _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
  7138. _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
  7139. func_quote_for_eval "${2}"
  7140. dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
  7141. eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
  7142. # Save a `func_append' function call where possible by direct use of '+='
  7143. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
  7144. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7145. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7146. test 0 -eq $? || _lt_function_replace_fail=:
  7147. else
  7148. # Save a `func_append' function call even when '+=' is not available
  7149. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
  7150. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7151. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7152. test 0 -eq $? || _lt_function_replace_fail=:
  7153. fi
  7154. if test x"$_lt_function_replace_fail" = x":"; then
  7155. AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
  7156. fi
  7157. ])
  7158. # _LT_PATH_CONVERSION_FUNCTIONS
  7159. # -----------------------------
  7160. # Determine which file name conversion functions should be used by
  7161. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7162. # for certain cross-compile configurations and native mingw.
  7163. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7164. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7165. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7166. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7167. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7168. [case $host in
  7169. *-*-mingw* )
  7170. case $build in
  7171. *-*-mingw* ) # actually msys
  7172. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7173. ;;
  7174. *-*-cygwin* )
  7175. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7176. ;;
  7177. * ) # otherwise, assume *nix
  7178. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7179. ;;
  7180. esac
  7181. ;;
  7182. *-*-cygwin* )
  7183. case $build in
  7184. *-*-mingw* ) # actually msys
  7185. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7186. ;;
  7187. *-*-cygwin* )
  7188. lt_cv_to_host_file_cmd=func_convert_file_noop
  7189. ;;
  7190. * ) # otherwise, assume *nix
  7191. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7192. ;;
  7193. esac
  7194. ;;
  7195. * ) # unhandled hosts (and "normal" native builds)
  7196. lt_cv_to_host_file_cmd=func_convert_file_noop
  7197. ;;
  7198. esac
  7199. ])
  7200. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7201. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7202. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7203. [0], [convert $build file names to $host format])dnl
  7204. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7205. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7206. [#assume ordinary cross tools, or native build.
  7207. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7208. case $host in
  7209. *-*-mingw* )
  7210. case $build in
  7211. *-*-mingw* ) # actually msys
  7212. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7213. ;;
  7214. esac
  7215. ;;
  7216. esac
  7217. ])
  7218. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7219. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7220. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7221. [0], [convert $build files to toolchain format])dnl
  7222. ])# _LT_PATH_CONVERSION_FUNCTIONS
  7223. # Helper functions for option handling. -*- Autoconf -*-
  7224. #
  7225. # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
  7226. # Inc.
  7227. # Written by Gary V. Vaughan, 2004
  7228. #
  7229. # This file is free software; the Free Software Foundation gives
  7230. # unlimited permission to copy and/or distribute it, with or without
  7231. # modifications, as long as this notice is preserved.
  7232. # serial 7 ltoptions.m4
  7233. # This is to help aclocal find these macros, as it can't see m4_define.
  7234. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  7235. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  7236. # ------------------------------------------
  7237. m4_define([_LT_MANGLE_OPTION],
  7238. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  7239. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  7240. # ---------------------------------------
  7241. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  7242. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  7243. # saved as a flag.
  7244. m4_define([_LT_SET_OPTION],
  7245. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  7246. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  7247. _LT_MANGLE_DEFUN([$1], [$2]),
  7248. [m4_warning([Unknown $1 option `$2'])])[]dnl
  7249. ])
  7250. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  7251. # ------------------------------------------------------------
  7252. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  7253. m4_define([_LT_IF_OPTION],
  7254. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  7255. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  7256. # -------------------------------------------------------
  7257. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  7258. # are set.
  7259. m4_define([_LT_UNLESS_OPTIONS],
  7260. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7261. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  7262. [m4_define([$0_found])])])[]dnl
  7263. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  7264. ])[]dnl
  7265. ])
  7266. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  7267. # ----------------------------------------
  7268. # OPTION-LIST is a space-separated list of Libtool options associated
  7269. # with MACRO-NAME. If any OPTION has a matching handler declared with
  7270. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  7271. # the unknown option and exit.
  7272. m4_defun([_LT_SET_OPTIONS],
  7273. [# Set options
  7274. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7275. [_LT_SET_OPTION([$1], _LT_Option)])
  7276. m4_if([$1],[LT_INIT],[
  7277. dnl
  7278. dnl Simply set some default values (i.e off) if boolean options were not
  7279. dnl specified:
  7280. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  7281. ])
  7282. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  7283. ])
  7284. dnl
  7285. dnl If no reference was made to various pairs of opposing options, then
  7286. dnl we run the default mode handler for the pair. For example, if neither
  7287. dnl `shared' nor `disable-shared' was passed, we enable building of shared
  7288. dnl archives by default:
  7289. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  7290. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  7291. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  7292. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  7293. [_LT_ENABLE_FAST_INSTALL])
  7294. ])
  7295. ])# _LT_SET_OPTIONS
  7296. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  7297. # -----------------------------------------
  7298. m4_define([_LT_MANGLE_DEFUN],
  7299. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  7300. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  7301. # -----------------------------------------------
  7302. m4_define([LT_OPTION_DEFINE],
  7303. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  7304. ])# LT_OPTION_DEFINE
  7305. # dlopen
  7306. # ------
  7307. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  7308. ])
  7309. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  7310. [_LT_SET_OPTION([LT_INIT], [dlopen])
  7311. AC_DIAGNOSE([obsolete],
  7312. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7313. put the `dlopen' option into LT_INIT's first parameter.])
  7314. ])
  7315. dnl aclocal-1.4 backwards compatibility:
  7316. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  7317. # win32-dll
  7318. # ---------
  7319. # Declare package support for building win32 dll's.
  7320. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  7321. [enable_win32_dll=yes
  7322. case $host in
  7323. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  7324. AC_CHECK_TOOL(AS, as, false)
  7325. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7326. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7327. ;;
  7328. esac
  7329. test -z "$AS" && AS=as
  7330. _LT_DECL([], [AS], [1], [Assembler program])dnl
  7331. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7332. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  7333. test -z "$OBJDUMP" && OBJDUMP=objdump
  7334. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  7335. ])# win32-dll
  7336. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  7337. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7338. _LT_SET_OPTION([LT_INIT], [win32-dll])
  7339. AC_DIAGNOSE([obsolete],
  7340. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7341. put the `win32-dll' option into LT_INIT's first parameter.])
  7342. ])
  7343. dnl aclocal-1.4 backwards compatibility:
  7344. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  7345. # _LT_ENABLE_SHARED([DEFAULT])
  7346. # ----------------------------
  7347. # implement the --enable-shared flag, and supports the `shared' and
  7348. # `disable-shared' LT_INIT options.
  7349. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7350. m4_define([_LT_ENABLE_SHARED],
  7351. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7352. AC_ARG_ENABLE([shared],
  7353. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  7354. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  7355. [p=${PACKAGE-default}
  7356. case $enableval in
  7357. yes) enable_shared=yes ;;
  7358. no) enable_shared=no ;;
  7359. *)
  7360. enable_shared=no
  7361. # Look at the argument we got. We use all the common list separators.
  7362. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7363. for pkg in $enableval; do
  7364. IFS="$lt_save_ifs"
  7365. if test "X$pkg" = "X$p"; then
  7366. enable_shared=yes
  7367. fi
  7368. done
  7369. IFS="$lt_save_ifs"
  7370. ;;
  7371. esac],
  7372. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  7373. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  7374. [Whether or not to build shared libraries])
  7375. ])# _LT_ENABLE_SHARED
  7376. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  7377. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  7378. # Old names:
  7379. AC_DEFUN([AC_ENABLE_SHARED],
  7380. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  7381. ])
  7382. AC_DEFUN([AC_DISABLE_SHARED],
  7383. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  7384. ])
  7385. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  7386. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  7387. dnl aclocal-1.4 backwards compatibility:
  7388. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  7389. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  7390. # _LT_ENABLE_STATIC([DEFAULT])
  7391. # ----------------------------
  7392. # implement the --enable-static flag, and support the `static' and
  7393. # `disable-static' LT_INIT options.
  7394. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7395. m4_define([_LT_ENABLE_STATIC],
  7396. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7397. AC_ARG_ENABLE([static],
  7398. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  7399. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  7400. [p=${PACKAGE-default}
  7401. case $enableval in
  7402. yes) enable_static=yes ;;
  7403. no) enable_static=no ;;
  7404. *)
  7405. enable_static=no
  7406. # Look at the argument we got. We use all the common list separators.
  7407. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7408. for pkg in $enableval; do
  7409. IFS="$lt_save_ifs"
  7410. if test "X$pkg" = "X$p"; then
  7411. enable_static=yes
  7412. fi
  7413. done
  7414. IFS="$lt_save_ifs"
  7415. ;;
  7416. esac],
  7417. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  7418. _LT_DECL([build_old_libs], [enable_static], [0],
  7419. [Whether or not to build static libraries])
  7420. ])# _LT_ENABLE_STATIC
  7421. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  7422. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  7423. # Old names:
  7424. AC_DEFUN([AC_ENABLE_STATIC],
  7425. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  7426. ])
  7427. AC_DEFUN([AC_DISABLE_STATIC],
  7428. [_LT_SET_OPTION([LT_INIT], [disable-static])
  7429. ])
  7430. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  7431. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  7432. dnl aclocal-1.4 backwards compatibility:
  7433. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  7434. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  7435. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  7436. # ----------------------------------
  7437. # implement the --enable-fast-install flag, and support the `fast-install'
  7438. # and `disable-fast-install' LT_INIT options.
  7439. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  7440. m4_define([_LT_ENABLE_FAST_INSTALL],
  7441. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  7442. AC_ARG_ENABLE([fast-install],
  7443. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  7444. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  7445. [p=${PACKAGE-default}
  7446. case $enableval in
  7447. yes) enable_fast_install=yes ;;
  7448. no) enable_fast_install=no ;;
  7449. *)
  7450. enable_fast_install=no
  7451. # Look at the argument we got. We use all the common list separators.
  7452. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7453. for pkg in $enableval; do
  7454. IFS="$lt_save_ifs"
  7455. if test "X$pkg" = "X$p"; then
  7456. enable_fast_install=yes
  7457. fi
  7458. done
  7459. IFS="$lt_save_ifs"
  7460. ;;
  7461. esac],
  7462. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  7463. _LT_DECL([fast_install], [enable_fast_install], [0],
  7464. [Whether or not to optimize for fast installation])dnl
  7465. ])# _LT_ENABLE_FAST_INSTALL
  7466. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  7467. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  7468. # Old names:
  7469. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  7470. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  7471. AC_DIAGNOSE([obsolete],
  7472. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7473. the `fast-install' option into LT_INIT's first parameter.])
  7474. ])
  7475. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  7476. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  7477. AC_DIAGNOSE([obsolete],
  7478. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  7479. the `disable-fast-install' option into LT_INIT's first parameter.])
  7480. ])
  7481. dnl aclocal-1.4 backwards compatibility:
  7482. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  7483. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  7484. # _LT_WITH_PIC([MODE])
  7485. # --------------------
  7486. # implement the --with-pic flag, and support the `pic-only' and `no-pic'
  7487. # LT_INIT options.
  7488. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  7489. m4_define([_LT_WITH_PIC],
  7490. [AC_ARG_WITH([pic],
  7491. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  7492. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  7493. [lt_p=${PACKAGE-default}
  7494. case $withval in
  7495. yes|no) pic_mode=$withval ;;
  7496. *)
  7497. pic_mode=default
  7498. # Look at the argument we got. We use all the common list separators.
  7499. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  7500. for lt_pkg in $withval; do
  7501. IFS="$lt_save_ifs"
  7502. if test "X$lt_pkg" = "X$lt_p"; then
  7503. pic_mode=yes
  7504. fi
  7505. done
  7506. IFS="$lt_save_ifs"
  7507. ;;
  7508. esac],
  7509. [pic_mode=default])
  7510. test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
  7511. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  7512. ])# _LT_WITH_PIC
  7513. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  7514. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  7515. # Old name:
  7516. AU_DEFUN([AC_LIBTOOL_PICMODE],
  7517. [_LT_SET_OPTION([LT_INIT], [pic-only])
  7518. AC_DIAGNOSE([obsolete],
  7519. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7520. put the `pic-only' option into LT_INIT's first parameter.])
  7521. ])
  7522. dnl aclocal-1.4 backwards compatibility:
  7523. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  7524. m4_define([_LTDL_MODE], [])
  7525. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  7526. [m4_define([_LTDL_MODE], [nonrecursive])])
  7527. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  7528. [m4_define([_LTDL_MODE], [recursive])])
  7529. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  7530. [m4_define([_LTDL_MODE], [subproject])])
  7531. m4_define([_LTDL_TYPE], [])
  7532. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  7533. [m4_define([_LTDL_TYPE], [installable])])
  7534. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  7535. [m4_define([_LTDL_TYPE], [convenience])])
  7536. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  7537. #
  7538. # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
  7539. # Written by Gary V. Vaughan, 2004
  7540. #
  7541. # This file is free software; the Free Software Foundation gives
  7542. # unlimited permission to copy and/or distribute it, with or without
  7543. # modifications, as long as this notice is preserved.
  7544. # serial 6 ltsugar.m4
  7545. # This is to help aclocal find these macros, as it can't see m4_define.
  7546. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  7547. # lt_join(SEP, ARG1, [ARG2...])
  7548. # -----------------------------
  7549. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  7550. # associated separator.
  7551. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  7552. # versions in m4sugar had bugs.
  7553. m4_define([lt_join],
  7554. [m4_if([$#], [1], [],
  7555. [$#], [2], [[$2]],
  7556. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  7557. m4_define([_lt_join],
  7558. [m4_if([$#$2], [2], [],
  7559. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  7560. # lt_car(LIST)
  7561. # lt_cdr(LIST)
  7562. # ------------
  7563. # Manipulate m4 lists.
  7564. # These macros are necessary as long as will still need to support
  7565. # Autoconf-2.59 which quotes differently.
  7566. m4_define([lt_car], [[$1]])
  7567. m4_define([lt_cdr],
  7568. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  7569. [$#], 1, [],
  7570. [m4_dquote(m4_shift($@))])])
  7571. m4_define([lt_unquote], $1)
  7572. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  7573. # ------------------------------------------
  7574. # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
  7575. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  7576. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  7577. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  7578. # than defined and empty).
  7579. #
  7580. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  7581. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  7582. m4_define([lt_append],
  7583. [m4_define([$1],
  7584. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  7585. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  7586. # ----------------------------------------------------------
  7587. # Produce a SEP delimited list of all paired combinations of elements of
  7588. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  7589. # has the form PREFIXmINFIXSUFFIXn.
  7590. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  7591. m4_define([lt_combine],
  7592. [m4_if(m4_eval([$# > 3]), [1],
  7593. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  7594. [[m4_foreach([_Lt_prefix], [$2],
  7595. [m4_foreach([_Lt_suffix],
  7596. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  7597. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  7598. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  7599. # -----------------------------------------------------------------------
  7600. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  7601. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  7602. m4_define([lt_if_append_uniq],
  7603. [m4_ifdef([$1],
  7604. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  7605. [lt_append([$1], [$2], [$3])$4],
  7606. [$5])],
  7607. [lt_append([$1], [$2], [$3])$4])])
  7608. # lt_dict_add(DICT, KEY, VALUE)
  7609. # -----------------------------
  7610. m4_define([lt_dict_add],
  7611. [m4_define([$1($2)], [$3])])
  7612. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  7613. # --------------------------------------------
  7614. m4_define([lt_dict_add_subkey],
  7615. [m4_define([$1($2:$3)], [$4])])
  7616. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  7617. # ----------------------------------
  7618. m4_define([lt_dict_fetch],
  7619. [m4_ifval([$3],
  7620. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  7621. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  7622. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  7623. # -----------------------------------------------------------------
  7624. m4_define([lt_if_dict_fetch],
  7625. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  7626. [$5],
  7627. [$6])])
  7628. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  7629. # --------------------------------------------------------------
  7630. m4_define([lt_dict_filter],
  7631. [m4_if([$5], [], [],
  7632. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  7633. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  7634. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  7635. ])
  7636. # ltversion.m4 -- version numbers -*- Autoconf -*-
  7637. #
  7638. # Copyright (C) 2004 Free Software Foundation, Inc.
  7639. # Written by Scott James Remnant, 2004
  7640. #
  7641. # This file is free software; the Free Software Foundation gives
  7642. # unlimited permission to copy and/or distribute it, with or without
  7643. # modifications, as long as this notice is preserved.
  7644. # @configure_input@
  7645. # serial 3337 ltversion.m4
  7646. # This file is part of GNU Libtool
  7647. m4_define([LT_PACKAGE_VERSION], [2.4.2])
  7648. m4_define([LT_PACKAGE_REVISION], [1.3337])
  7649. AC_DEFUN([LTVERSION_VERSION],
  7650. [macro_version='2.4.2'
  7651. macro_revision='1.3337'
  7652. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  7653. _LT_DECL(, macro_revision, 0)
  7654. ])
  7655. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  7656. #
  7657. # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
  7658. # Written by Scott James Remnant, 2004.
  7659. #
  7660. # This file is free software; the Free Software Foundation gives
  7661. # unlimited permission to copy and/or distribute it, with or without
  7662. # modifications, as long as this notice is preserved.
  7663. # serial 5 lt~obsolete.m4
  7664. # These exist entirely to fool aclocal when bootstrapping libtool.
  7665. #
  7666. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
  7667. # which have later been changed to m4_define as they aren't part of the
  7668. # exported API, or moved to Autoconf or Automake where they belong.
  7669. #
  7670. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  7671. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  7672. # using a macro with the same name in our local m4/libtool.m4 it'll
  7673. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  7674. # and doesn't know about Autoconf macros at all.)
  7675. #
  7676. # So we provide this file, which has a silly filename so it's always
  7677. # included after everything else. This provides aclocal with the
  7678. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  7679. # because those macros already exist, or will be overwritten later.
  7680. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  7681. #
  7682. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  7683. # Yes, that means every name once taken will need to remain here until
  7684. # we give up compatibility with versions before 1.7, at which point
  7685. # we need to keep only those names which we still refer to.
  7686. # This is to help aclocal find these macros, as it can't see m4_define.
  7687. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  7688. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  7689. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  7690. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  7691. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  7692. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  7693. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  7694. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  7695. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  7696. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  7697. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  7698. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  7699. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  7700. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  7701. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  7702. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  7703. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  7704. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  7705. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  7706. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  7707. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  7708. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  7709. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  7710. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  7711. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  7712. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  7713. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  7714. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  7715. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  7716. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  7717. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  7718. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  7719. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  7720. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  7721. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  7722. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  7723. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  7724. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  7725. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  7726. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  7727. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  7728. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  7729. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  7730. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  7731. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  7732. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  7733. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  7734. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  7735. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  7736. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  7737. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  7738. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  7739. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  7740. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  7741. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  7742. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  7743. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  7744. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  7745. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  7746. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  7747. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  7748. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
  7749. # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
  7750. # Foundation, Inc.
  7751. #
  7752. # This file is free software; the Free Software Foundation
  7753. # gives unlimited permission to copy and/or distribute it,
  7754. # with or without modifications, as long as this notice is preserved.
  7755. # serial 1
  7756. # AM_AUTOMAKE_VERSION(VERSION)
  7757. # ----------------------------
  7758. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  7759. # generated from the m4 files accompanying Automake X.Y.
  7760. # (This private macro should not be called outside this file.)
  7761. AC_DEFUN([AM_AUTOMAKE_VERSION],
  7762. [am__api_version='1.11'
  7763. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  7764. dnl require some minimum version. Point them to the right macro.
  7765. m4_if([$1], [1.11.6], [],
  7766. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  7767. ])
  7768. # _AM_AUTOCONF_VERSION(VERSION)
  7769. # -----------------------------
  7770. # aclocal traces this macro to find the Autoconf version.
  7771. # This is a private macro too. Using m4_define simplifies
  7772. # the logic in aclocal, which can simply ignore this definition.
  7773. m4_define([_AM_AUTOCONF_VERSION], [])
  7774. # AM_SET_CURRENT_AUTOMAKE_VERSION
  7775. # -------------------------------
  7776. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  7777. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  7778. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  7779. [AM_AUTOMAKE_VERSION([1.11.6])dnl
  7780. m4_ifndef([AC_AUTOCONF_VERSION],
  7781. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  7782. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  7783. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  7784. # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
  7785. #
  7786. # This file is free software; the Free Software Foundation
  7787. # gives unlimited permission to copy and/or distribute it,
  7788. # with or without modifications, as long as this notice is preserved.
  7789. # serial 1
  7790. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  7791. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  7792. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  7793. #
  7794. # Of course, Automake must honor this variable whenever it calls a
  7795. # tool from the auxiliary directory. The problem is that $srcdir (and
  7796. # therefore $ac_aux_dir as well) can be either absolute or relative,
  7797. # depending on how configure is run. This is pretty annoying, since
  7798. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  7799. # source directory, any form will work fine, but in subdirectories a
  7800. # relative path needs to be adjusted first.
  7801. #
  7802. # $ac_aux_dir/missing
  7803. # fails when called from a subdirectory if $ac_aux_dir is relative
  7804. # $top_srcdir/$ac_aux_dir/missing
  7805. # fails if $ac_aux_dir is absolute,
  7806. # fails when called from a subdirectory in a VPATH build with
  7807. # a relative $ac_aux_dir
  7808. #
  7809. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  7810. # are both prefixed by $srcdir. In an in-source build this is usually
  7811. # harmless because $srcdir is `.', but things will broke when you
  7812. # start a VPATH build or use an absolute $srcdir.
  7813. #
  7814. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  7815. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  7816. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  7817. # and then we would define $MISSING as
  7818. # MISSING="\${SHELL} $am_aux_dir/missing"
  7819. # This will work as long as MISSING is not called from configure, because
  7820. # unfortunately $(top_srcdir) has no meaning in configure.
  7821. # However there are other variables, like CC, which are often used in
  7822. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  7823. #
  7824. # Another solution, used here, is to always expand $ac_aux_dir to an
  7825. # absolute PATH. The drawback is that using absolute paths prevent a
  7826. # configured tree to be moved without reconfiguration.
  7827. AC_DEFUN([AM_AUX_DIR_EXPAND],
  7828. [dnl Rely on autoconf to set up CDPATH properly.
  7829. AC_PREREQ([2.50])dnl
  7830. # expand $ac_aux_dir to an absolute path
  7831. am_aux_dir=`cd $ac_aux_dir && pwd`
  7832. ])
  7833. # AM_CONDITIONAL -*- Autoconf -*-
  7834. # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
  7835. # Free Software Foundation, Inc.
  7836. #
  7837. # This file is free software; the Free Software Foundation
  7838. # gives unlimited permission to copy and/or distribute it,
  7839. # with or without modifications, as long as this notice is preserved.
  7840. # serial 9
  7841. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  7842. # -------------------------------------
  7843. # Define a conditional.
  7844. AC_DEFUN([AM_CONDITIONAL],
  7845. [AC_PREREQ(2.52)dnl
  7846. ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  7847. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  7848. AC_SUBST([$1_TRUE])dnl
  7849. AC_SUBST([$1_FALSE])dnl
  7850. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  7851. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  7852. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  7853. if $2; then
  7854. $1_TRUE=
  7855. $1_FALSE='#'
  7856. else
  7857. $1_TRUE='#'
  7858. $1_FALSE=
  7859. fi
  7860. AC_CONFIG_COMMANDS_PRE(
  7861. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  7862. AC_MSG_ERROR([[conditional "$1" was never defined.
  7863. Usually this means the macro was only invoked conditionally.]])
  7864. fi])])
  7865. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
  7866. # 2010, 2011 Free Software Foundation, Inc.
  7867. #
  7868. # This file is free software; the Free Software Foundation
  7869. # gives unlimited permission to copy and/or distribute it,
  7870. # with or without modifications, as long as this notice is preserved.
  7871. # serial 12
  7872. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  7873. # written in clear, in which case automake, when reading aclocal.m4,
  7874. # will think it sees a *use*, and therefore will trigger all it's
  7875. # C support machinery. Also note that it means that autoscan, seeing
  7876. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  7877. # _AM_DEPENDENCIES(NAME)
  7878. # ----------------------
  7879. # See how the compiler implements dependency checking.
  7880. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  7881. # We try a few techniques and use that to set a single cache variable.
  7882. #
  7883. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  7884. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  7885. # dependency, and given that the user is not expected to run this macro,
  7886. # just rely on AC_PROG_CC.
  7887. AC_DEFUN([_AM_DEPENDENCIES],
  7888. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  7889. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  7890. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  7891. AC_REQUIRE([AM_DEP_TRACK])dnl
  7892. ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  7893. [$1], CXX, [depcc="$CXX" am_compiler_list=],
  7894. [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  7895. [$1], UPC, [depcc="$UPC" am_compiler_list=],
  7896. [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  7897. [depcc="$$1" am_compiler_list=])
  7898. AC_CACHE_CHECK([dependency style of $depcc],
  7899. [am_cv_$1_dependencies_compiler_type],
  7900. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  7901. # We make a subdir and do the tests there. Otherwise we can end up
  7902. # making bogus files that we don't know about and never remove. For
  7903. # instance it was reported that on HP-UX the gcc test will end up
  7904. # making a dummy file named `D' -- because `-MD' means `put the output
  7905. # in D'.
  7906. rm -rf conftest.dir
  7907. mkdir conftest.dir
  7908. # Copy depcomp to subdir because otherwise we won't find it if we're
  7909. # using a relative directory.
  7910. cp "$am_depcomp" conftest.dir
  7911. cd conftest.dir
  7912. # We will build objects and dependencies in a subdirectory because
  7913. # it helps to detect inapplicable dependency modes. For instance
  7914. # both Tru64's cc and ICC support -MD to output dependencies as a
  7915. # side effect of compilation, but ICC will put the dependencies in
  7916. # the current directory while Tru64 will put them in the object
  7917. # directory.
  7918. mkdir sub
  7919. am_cv_$1_dependencies_compiler_type=none
  7920. if test "$am_compiler_list" = ""; then
  7921. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  7922. fi
  7923. am__universal=false
  7924. m4_case([$1], [CC],
  7925. [case " $depcc " in #(
  7926. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  7927. esac],
  7928. [CXX],
  7929. [case " $depcc " in #(
  7930. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  7931. esac])
  7932. for depmode in $am_compiler_list; do
  7933. # Setup a source with many dependencies, because some compilers
  7934. # like to wrap large dependency lists on column 80 (with \), and
  7935. # we should not choose a depcomp mode which is confused by this.
  7936. #
  7937. # We need to recreate these files for each test, as the compiler may
  7938. # overwrite some of them when testing with obscure command lines.
  7939. # This happens at least with the AIX C compiler.
  7940. : > sub/conftest.c
  7941. for i in 1 2 3 4 5 6; do
  7942. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  7943. # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  7944. # Solaris 8's {/usr,}/bin/sh.
  7945. touch sub/conftst$i.h
  7946. done
  7947. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  7948. # We check with `-c' and `-o' for the sake of the "dashmstdout"
  7949. # mode. It turns out that the SunPro C++ compiler does not properly
  7950. # handle `-M -o', and we need to detect this. Also, some Intel
  7951. # versions had trouble with output in subdirs
  7952. am__obj=sub/conftest.${OBJEXT-o}
  7953. am__minus_obj="-o $am__obj"
  7954. case $depmode in
  7955. gcc)
  7956. # This depmode causes a compiler race in universal mode.
  7957. test "$am__universal" = false || continue
  7958. ;;
  7959. nosideeffect)
  7960. # after this tag, mechanisms are not by side-effect, so they'll
  7961. # only be used when explicitly requested
  7962. if test "x$enable_dependency_tracking" = xyes; then
  7963. continue
  7964. else
  7965. break
  7966. fi
  7967. ;;
  7968. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  7969. # This compiler won't grok `-c -o', but also, the minuso test has
  7970. # not run yet. These depmodes are late enough in the game, and
  7971. # so weak that their functioning should not be impacted.
  7972. am__obj=conftest.${OBJEXT-o}
  7973. am__minus_obj=
  7974. ;;
  7975. none) break ;;
  7976. esac
  7977. if depmode=$depmode \
  7978. source=sub/conftest.c object=$am__obj \
  7979. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  7980. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  7981. >/dev/null 2>conftest.err &&
  7982. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  7983. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  7984. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  7985. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  7986. # icc doesn't choke on unknown options, it will just issue warnings
  7987. # or remarks (even with -Werror). So we grep stderr for any message
  7988. # that says an option was ignored or not supported.
  7989. # When given -MP, icc 7.0 and 7.1 complain thusly:
  7990. # icc: Command line warning: ignoring option '-M'; no argument required
  7991. # The diagnosis changed in icc 8.0:
  7992. # icc: Command line remark: option '-MP' not supported
  7993. if (grep 'ignoring option' conftest.err ||
  7994. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  7995. am_cv_$1_dependencies_compiler_type=$depmode
  7996. break
  7997. fi
  7998. fi
  7999. done
  8000. cd ..
  8001. rm -rf conftest.dir
  8002. else
  8003. am_cv_$1_dependencies_compiler_type=none
  8004. fi
  8005. ])
  8006. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  8007. AM_CONDITIONAL([am__fastdep$1], [
  8008. test "x$enable_dependency_tracking" != xno \
  8009. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  8010. ])
  8011. # AM_SET_DEPDIR
  8012. # -------------
  8013. # Choose a directory name for dependency files.
  8014. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  8015. AC_DEFUN([AM_SET_DEPDIR],
  8016. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8017. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  8018. ])
  8019. # AM_DEP_TRACK
  8020. # ------------
  8021. AC_DEFUN([AM_DEP_TRACK],
  8022. [AC_ARG_ENABLE(dependency-tracking,
  8023. [ --disable-dependency-tracking speeds up one-time build
  8024. --enable-dependency-tracking do not reject slow dependency extractors])
  8025. if test "x$enable_dependency_tracking" != xno; then
  8026. am_depcomp="$ac_aux_dir/depcomp"
  8027. AMDEPBACKSLASH='\'
  8028. am__nodep='_no'
  8029. fi
  8030. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  8031. AC_SUBST([AMDEPBACKSLASH])dnl
  8032. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  8033. AC_SUBST([am__nodep])dnl
  8034. _AM_SUBST_NOTMAKE([am__nodep])dnl
  8035. ])
  8036. # Generate code to set up dependency tracking. -*- Autoconf -*-
  8037. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
  8038. # Free Software Foundation, Inc.
  8039. #
  8040. # This file is free software; the Free Software Foundation
  8041. # gives unlimited permission to copy and/or distribute it,
  8042. # with or without modifications, as long as this notice is preserved.
  8043. #serial 5
  8044. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  8045. # ------------------------------
  8046. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  8047. [{
  8048. # Autoconf 2.62 quotes --file arguments for eval, but not when files
  8049. # are listed without --file. Let's play safe and only enable the eval
  8050. # if we detect the quoting.
  8051. case $CONFIG_FILES in
  8052. *\'*) eval set x "$CONFIG_FILES" ;;
  8053. *) set x $CONFIG_FILES ;;
  8054. esac
  8055. shift
  8056. for mf
  8057. do
  8058. # Strip MF so we end up with the name of the file.
  8059. mf=`echo "$mf" | sed -e 's/:.*$//'`
  8060. # Check whether this is an Automake generated Makefile or not.
  8061. # We used to match only the files named `Makefile.in', but
  8062. # some people rename them; so instead we look at the file content.
  8063. # Grep'ing the first line is not enough: some people post-process
  8064. # each Makefile.in and add a new line on top of each file to say so.
  8065. # Grep'ing the whole file is not good either: AIX grep has a line
  8066. # limit of 2048, but all sed's we know have understand at least 4000.
  8067. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  8068. dirpart=`AS_DIRNAME("$mf")`
  8069. else
  8070. continue
  8071. fi
  8072. # Extract the definition of DEPDIR, am__include, and am__quote
  8073. # from the Makefile without running `make'.
  8074. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  8075. test -z "$DEPDIR" && continue
  8076. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  8077. test -z "am__include" && continue
  8078. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  8079. # When using ansi2knr, U may be empty or an underscore; expand it
  8080. U=`sed -n 's/^U = //p' < "$mf"`
  8081. # Find all dependency output files, they are included files with
  8082. # $(DEPDIR) in their names. We invoke sed twice because it is the
  8083. # simplest approach to changing $(DEPDIR) to its actual value in the
  8084. # expansion.
  8085. for file in `sed -n "
  8086. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  8087. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  8088. # Make sure the directory exists.
  8089. test -f "$dirpart/$file" && continue
  8090. fdir=`AS_DIRNAME(["$file"])`
  8091. AS_MKDIR_P([$dirpart/$fdir])
  8092. # echo "creating $dirpart/$file"
  8093. echo '# dummy' > "$dirpart/$file"
  8094. done
  8095. done
  8096. }
  8097. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  8098. # AM_OUTPUT_DEPENDENCY_COMMANDS
  8099. # -----------------------------
  8100. # This macro should only be invoked once -- use via AC_REQUIRE.
  8101. #
  8102. # This code is only required when automatic dependency tracking
  8103. # is enabled. FIXME. This creates each `.P' file that we will
  8104. # need in order to bootstrap the dependency handling code.
  8105. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  8106. [AC_CONFIG_COMMANDS([depfiles],
  8107. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  8108. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  8109. ])
  8110. # Do all the work for Automake. -*- Autoconf -*-
  8111. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  8112. # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
  8113. #
  8114. # This file is free software; the Free Software Foundation
  8115. # gives unlimited permission to copy and/or distribute it,
  8116. # with or without modifications, as long as this notice is preserved.
  8117. # serial 16
  8118. # This macro actually does too much. Some checks are only needed if
  8119. # your package does certain things. But this isn't really a big deal.
  8120. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  8121. # AM_INIT_AUTOMAKE([OPTIONS])
  8122. # -----------------------------------------------
  8123. # The call with PACKAGE and VERSION arguments is the old style
  8124. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  8125. # and VERSION should now be passed to AC_INIT and removed from
  8126. # the call to AM_INIT_AUTOMAKE.
  8127. # We support both call styles for the transition. After
  8128. # the next Automake release, Autoconf can make the AC_INIT
  8129. # arguments mandatory, and then we can depend on a new Autoconf
  8130. # release and drop the old call support.
  8131. AC_DEFUN([AM_INIT_AUTOMAKE],
  8132. [AC_PREREQ([2.62])dnl
  8133. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  8134. dnl the ones we care about.
  8135. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  8136. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  8137. AC_REQUIRE([AC_PROG_INSTALL])dnl
  8138. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  8139. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  8140. # is not polluted with repeated "-I."
  8141. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  8142. # test to see if srcdir already configured
  8143. if test -f $srcdir/config.status; then
  8144. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  8145. fi
  8146. fi
  8147. # test whether we have cygpath
  8148. if test -z "$CYGPATH_W"; then
  8149. if (cygpath --version) >/dev/null 2>/dev/null; then
  8150. CYGPATH_W='cygpath -w'
  8151. else
  8152. CYGPATH_W=echo
  8153. fi
  8154. fi
  8155. AC_SUBST([CYGPATH_W])
  8156. # Define the identity of the package.
  8157. dnl Distinguish between old-style and new-style calls.
  8158. m4_ifval([$2],
  8159. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  8160. AC_SUBST([PACKAGE], [$1])dnl
  8161. AC_SUBST([VERSION], [$2])],
  8162. [_AM_SET_OPTIONS([$1])dnl
  8163. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  8164. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
  8165. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  8166. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  8167. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  8168. _AM_IF_OPTION([no-define],,
  8169. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  8170. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  8171. # Some tools Automake needs.
  8172. AC_REQUIRE([AM_SANITY_CHECK])dnl
  8173. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  8174. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  8175. AM_MISSING_PROG(AUTOCONF, autoconf)
  8176. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  8177. AM_MISSING_PROG(AUTOHEADER, autoheader)
  8178. AM_MISSING_PROG(MAKEINFO, makeinfo)
  8179. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8180. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  8181. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  8182. # We need awk for the "check" target. The system "awk" is bad on
  8183. # some platforms.
  8184. AC_REQUIRE([AC_PROG_AWK])dnl
  8185. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  8186. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  8187. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  8188. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  8189. [_AM_PROG_TAR([v7])])])
  8190. _AM_IF_OPTION([no-dependencies],,
  8191. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  8192. [_AM_DEPENDENCIES(CC)],
  8193. [define([AC_PROG_CC],
  8194. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  8195. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  8196. [_AM_DEPENDENCIES(CXX)],
  8197. [define([AC_PROG_CXX],
  8198. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  8199. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  8200. [_AM_DEPENDENCIES(OBJC)],
  8201. [define([AC_PROG_OBJC],
  8202. defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
  8203. ])
  8204. _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
  8205. dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
  8206. dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
  8207. dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
  8208. AC_CONFIG_COMMANDS_PRE(dnl
  8209. [m4_provide_if([_AM_COMPILER_EXEEXT],
  8210. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  8211. ])
  8212. dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  8213. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  8214. dnl mangled by Autoconf and run in a shell conditional statement.
  8215. m4_define([_AC_COMPILER_EXEEXT],
  8216. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  8217. # When config.status generates a header, we must update the stamp-h file.
  8218. # This file resides in the same directory as the config header
  8219. # that is generated. The stamp files are numbered to have different names.
  8220. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  8221. # loop where config.status creates the headers, so we can generate
  8222. # our stamp files there.
  8223. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  8224. [# Compute $1's index in $config_headers.
  8225. _am_arg=$1
  8226. _am_stamp_count=1
  8227. for _am_header in $config_headers :; do
  8228. case $_am_header in
  8229. $_am_arg | $_am_arg:* )
  8230. break ;;
  8231. * )
  8232. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  8233. esac
  8234. done
  8235. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  8236. # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
  8237. # Inc.
  8238. #
  8239. # This file is free software; the Free Software Foundation
  8240. # gives unlimited permission to copy and/or distribute it,
  8241. # with or without modifications, as long as this notice is preserved.
  8242. # serial 1
  8243. # AM_PROG_INSTALL_SH
  8244. # ------------------
  8245. # Define $install_sh.
  8246. AC_DEFUN([AM_PROG_INSTALL_SH],
  8247. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8248. if test x"${install_sh}" != xset; then
  8249. case $am_aux_dir in
  8250. *\ * | *\ *)
  8251. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  8252. *)
  8253. install_sh="\${SHELL} $am_aux_dir/install-sh"
  8254. esac
  8255. fi
  8256. AC_SUBST(install_sh)])
  8257. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  8258. #
  8259. # This file is free software; the Free Software Foundation
  8260. # gives unlimited permission to copy and/or distribute it,
  8261. # with or without modifications, as long as this notice is preserved.
  8262. # serial 2
  8263. # Check whether the underlying file-system supports filenames
  8264. # with a leading dot. For instance MS-DOS doesn't.
  8265. AC_DEFUN([AM_SET_LEADING_DOT],
  8266. [rm -rf .tst 2>/dev/null
  8267. mkdir .tst 2>/dev/null
  8268. if test -d .tst; then
  8269. am__leading_dot=.
  8270. else
  8271. am__leading_dot=_
  8272. fi
  8273. rmdir .tst 2>/dev/null
  8274. AC_SUBST([am__leading_dot])])
  8275. # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  8276. # From Jim Meyering
  8277. # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
  8278. # 2011 Free Software Foundation, Inc.
  8279. #
  8280. # This file is free software; the Free Software Foundation
  8281. # gives unlimited permission to copy and/or distribute it,
  8282. # with or without modifications, as long as this notice is preserved.
  8283. # serial 5
  8284. # AM_MAINTAINER_MODE([DEFAULT-MODE])
  8285. # ----------------------------------
  8286. # Control maintainer-specific portions of Makefiles.
  8287. # Default is to disable them, unless `enable' is passed literally.
  8288. # For symmetry, `disable' may be passed as well. Anyway, the user
  8289. # can override the default with the --enable/--disable switch.
  8290. AC_DEFUN([AM_MAINTAINER_MODE],
  8291. [m4_case(m4_default([$1], [disable]),
  8292. [enable], [m4_define([am_maintainer_other], [disable])],
  8293. [disable], [m4_define([am_maintainer_other], [enable])],
  8294. [m4_define([am_maintainer_other], [enable])
  8295. m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
  8296. AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  8297. dnl maintainer-mode's default is 'disable' unless 'enable' is passed
  8298. AC_ARG_ENABLE([maintainer-mode],
  8299. [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
  8300. (and sometimes confusing) to the casual installer],
  8301. [USE_MAINTAINER_MODE=$enableval],
  8302. [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
  8303. AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  8304. AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
  8305. MAINT=$MAINTAINER_MODE_TRUE
  8306. AC_SUBST([MAINT])dnl
  8307. ]
  8308. )
  8309. AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
  8310. # Check to see how 'make' treats includes. -*- Autoconf -*-
  8311. # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
  8312. #
  8313. # This file is free software; the Free Software Foundation
  8314. # gives unlimited permission to copy and/or distribute it,
  8315. # with or without modifications, as long as this notice is preserved.
  8316. # serial 4
  8317. # AM_MAKE_INCLUDE()
  8318. # -----------------
  8319. # Check to see how make treats includes.
  8320. AC_DEFUN([AM_MAKE_INCLUDE],
  8321. [am_make=${MAKE-make}
  8322. cat > confinc << 'END'
  8323. am__doit:
  8324. @echo this is the am__doit target
  8325. .PHONY: am__doit
  8326. END
  8327. # If we don't find an include directive, just comment out the code.
  8328. AC_MSG_CHECKING([for style of include used by $am_make])
  8329. am__include="#"
  8330. am__quote=
  8331. _am_result=none
  8332. # First try GNU make style include.
  8333. echo "include confinc" > confmf
  8334. # Ignore all kinds of additional output from `make'.
  8335. case `$am_make -s -f confmf 2> /dev/null` in #(
  8336. *the\ am__doit\ target*)
  8337. am__include=include
  8338. am__quote=
  8339. _am_result=GNU
  8340. ;;
  8341. esac
  8342. # Now try BSD make style include.
  8343. if test "$am__include" = "#"; then
  8344. echo '.include "confinc"' > confmf
  8345. case `$am_make -s -f confmf 2> /dev/null` in #(
  8346. *the\ am__doit\ target*)
  8347. am__include=.include
  8348. am__quote="\""
  8349. _am_result=BSD
  8350. ;;
  8351. esac
  8352. fi
  8353. AC_SUBST([am__include])
  8354. AC_SUBST([am__quote])
  8355. AC_MSG_RESULT([$_am_result])
  8356. rm -f confinc confmf
  8357. ])
  8358. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  8359. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
  8360. # Free Software Foundation, Inc.
  8361. #
  8362. # This file is free software; the Free Software Foundation
  8363. # gives unlimited permission to copy and/or distribute it,
  8364. # with or without modifications, as long as this notice is preserved.
  8365. # serial 6
  8366. # AM_MISSING_PROG(NAME, PROGRAM)
  8367. # ------------------------------
  8368. AC_DEFUN([AM_MISSING_PROG],
  8369. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  8370. $1=${$1-"${am_missing_run}$2"}
  8371. AC_SUBST($1)])
  8372. # AM_MISSING_HAS_RUN
  8373. # ------------------
  8374. # Define MISSING if not defined so far and test if it supports --run.
  8375. # If it does, set am_missing_run to use it, otherwise, to nothing.
  8376. AC_DEFUN([AM_MISSING_HAS_RUN],
  8377. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  8378. AC_REQUIRE_AUX_FILE([missing])dnl
  8379. if test x"${MISSING+set}" != xset; then
  8380. case $am_aux_dir in
  8381. *\ * | *\ *)
  8382. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  8383. *)
  8384. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  8385. esac
  8386. fi
  8387. # Use eval to expand $SHELL
  8388. if eval "$MISSING --run true"; then
  8389. am_missing_run="$MISSING --run "
  8390. else
  8391. am_missing_run=
  8392. AC_MSG_WARN([`missing' script is too old or missing])
  8393. fi
  8394. ])
  8395. # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
  8396. # Inc.
  8397. #
  8398. # This file is free software; the Free Software Foundation
  8399. # gives unlimited permission to copy and/or distribute it,
  8400. # with or without modifications, as long as this notice is preserved.
  8401. # serial 1
  8402. # AM_PROG_MKDIR_P
  8403. # ---------------
  8404. # Check for `mkdir -p'.
  8405. AC_DEFUN([AM_PROG_MKDIR_P],
  8406. [AC_PREREQ([2.60])dnl
  8407. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  8408. dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
  8409. dnl while keeping a definition of mkdir_p for backward compatibility.
  8410. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
  8411. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
  8412. dnl Makefile.ins that do not define MKDIR_P, so we do our own
  8413. dnl adjustment using top_builddir (which is defined more often than
  8414. dnl MKDIR_P).
  8415. AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
  8416. case $mkdir_p in
  8417. [[\\/$]]* | ?:[[\\/]]*) ;;
  8418. */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
  8419. esac
  8420. ])
  8421. # Helper functions for option handling. -*- Autoconf -*-
  8422. # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
  8423. # Foundation, Inc.
  8424. #
  8425. # This file is free software; the Free Software Foundation
  8426. # gives unlimited permission to copy and/or distribute it,
  8427. # with or without modifications, as long as this notice is preserved.
  8428. # serial 5
  8429. # _AM_MANGLE_OPTION(NAME)
  8430. # -----------------------
  8431. AC_DEFUN([_AM_MANGLE_OPTION],
  8432. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  8433. # _AM_SET_OPTION(NAME)
  8434. # --------------------
  8435. # Set option NAME. Presently that only means defining a flag for this option.
  8436. AC_DEFUN([_AM_SET_OPTION],
  8437. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  8438. # _AM_SET_OPTIONS(OPTIONS)
  8439. # ------------------------
  8440. # OPTIONS is a space-separated list of Automake options.
  8441. AC_DEFUN([_AM_SET_OPTIONS],
  8442. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  8443. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  8444. # -------------------------------------------
  8445. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  8446. AC_DEFUN([_AM_IF_OPTION],
  8447. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  8448. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  8449. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
  8450. # Free Software Foundation, Inc.
  8451. #
  8452. # This file is free software; the Free Software Foundation
  8453. # gives unlimited permission to copy and/or distribute it,
  8454. # with or without modifications, as long as this notice is preserved.
  8455. # serial 5
  8456. # AM_SANITY_CHECK
  8457. # ---------------
  8458. AC_DEFUN([AM_SANITY_CHECK],
  8459. [AC_MSG_CHECKING([whether build environment is sane])
  8460. # Just in case
  8461. sleep 1
  8462. echo timestamp > conftest.file
  8463. # Reject unsafe characters in $srcdir or the absolute working directory
  8464. # name. Accept space and tab only in the latter.
  8465. am_lf='
  8466. '
  8467. case `pwd` in
  8468. *[[\\\"\#\$\&\'\`$am_lf]]*)
  8469. AC_MSG_ERROR([unsafe absolute working directory name]);;
  8470. esac
  8471. case $srcdir in
  8472. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  8473. AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
  8474. esac
  8475. # Do `set' in a subshell so we don't clobber the current shell's
  8476. # arguments. Must try -L first in case configure is actually a
  8477. # symlink; some systems play weird games with the mod time of symlinks
  8478. # (eg FreeBSD returns the mod time of the symlink's containing
  8479. # directory).
  8480. if (
  8481. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  8482. if test "$[*]" = "X"; then
  8483. # -L didn't work.
  8484. set X `ls -t "$srcdir/configure" conftest.file`
  8485. fi
  8486. rm -f conftest.file
  8487. if test "$[*]" != "X $srcdir/configure conftest.file" \
  8488. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  8489. # If neither matched, then we have a broken ls. This can happen
  8490. # if, for instance, CONFIG_SHELL is bash and it inherits a
  8491. # broken ls alias from the environment. This has actually
  8492. # happened. Such a system could not be considered "sane".
  8493. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  8494. alias in your environment])
  8495. fi
  8496. test "$[2]" = conftest.file
  8497. )
  8498. then
  8499. # Ok.
  8500. :
  8501. else
  8502. AC_MSG_ERROR([newly created file is older than distributed files!
  8503. Check your system clock])
  8504. fi
  8505. AC_MSG_RESULT(yes)])
  8506. # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
  8507. #
  8508. # This file is free software; the Free Software Foundation
  8509. # gives unlimited permission to copy and/or distribute it,
  8510. # with or without modifications, as long as this notice is preserved.
  8511. # serial 1
  8512. # AM_PROG_INSTALL_STRIP
  8513. # ---------------------
  8514. # One issue with vendor `install' (even GNU) is that you can't
  8515. # specify the program used to strip binaries. This is especially
  8516. # annoying in cross-compiling environments, where the build's strip
  8517. # is unlikely to handle the host's binaries.
  8518. # Fortunately install-sh will honor a STRIPPROG variable, so we
  8519. # always use install-sh in `make install-strip', and initialize
  8520. # STRIPPROG with the value of the STRIP variable (set by the user).
  8521. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  8522. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  8523. # Installed binaries are usually stripped using `strip' when the user
  8524. # run `make install-strip'. However `strip' might not be the right
  8525. # tool to use in cross-compilation environments, therefore Automake
  8526. # will honor the `STRIP' environment variable to overrule this program.
  8527. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  8528. if test "$cross_compiling" != no; then
  8529. AC_CHECK_TOOL([STRIP], [strip], :)
  8530. fi
  8531. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  8532. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  8533. # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
  8534. #
  8535. # This file is free software; the Free Software Foundation
  8536. # gives unlimited permission to copy and/or distribute it,
  8537. # with or without modifications, as long as this notice is preserved.
  8538. # serial 3
  8539. # _AM_SUBST_NOTMAKE(VARIABLE)
  8540. # ---------------------------
  8541. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  8542. # This macro is traced by Automake.
  8543. AC_DEFUN([_AM_SUBST_NOTMAKE])
  8544. # AM_SUBST_NOTMAKE(VARIABLE)
  8545. # --------------------------
  8546. # Public sister of _AM_SUBST_NOTMAKE.
  8547. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  8548. # Check how to create a tarball. -*- Autoconf -*-
  8549. # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
  8550. #
  8551. # This file is free software; the Free Software Foundation
  8552. # gives unlimited permission to copy and/or distribute it,
  8553. # with or without modifications, as long as this notice is preserved.
  8554. # serial 2
  8555. # _AM_PROG_TAR(FORMAT)
  8556. # --------------------
  8557. # Check how to create a tarball in format FORMAT.
  8558. # FORMAT should be one of `v7', `ustar', or `pax'.
  8559. #
  8560. # Substitute a variable $(am__tar) that is a command
  8561. # writing to stdout a FORMAT-tarball containing the directory
  8562. # $tardir.
  8563. # tardir=directory && $(am__tar) > result.tar
  8564. #
  8565. # Substitute a variable $(am__untar) that extract such
  8566. # a tarball read from stdin.
  8567. # $(am__untar) < result.tar
  8568. AC_DEFUN([_AM_PROG_TAR],
  8569. [# Always define AMTAR for backward compatibility. Yes, it's still used
  8570. # in the wild :-( We should find a proper way to deprecate it ...
  8571. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  8572. m4_if([$1], [v7],
  8573. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  8574. [m4_case([$1], [ustar],, [pax],,
  8575. [m4_fatal([Unknown tar format])])
  8576. AC_MSG_CHECKING([how to create a $1 tar archive])
  8577. # Loop over all known methods to create a tar archive until one works.
  8578. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  8579. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  8580. # Do not fold the above two line into one, because Tru64 sh and
  8581. # Solaris sh will not grok spaces in the rhs of `-'.
  8582. for _am_tool in $_am_tools
  8583. do
  8584. case $_am_tool in
  8585. gnutar)
  8586. for _am_tar in tar gnutar gtar;
  8587. do
  8588. AM_RUN_LOG([$_am_tar --version]) && break
  8589. done
  8590. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  8591. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  8592. am__untar="$_am_tar -xf -"
  8593. ;;
  8594. plaintar)
  8595. # Must skip GNU tar: if it does not support --format= it doesn't create
  8596. # ustar tarball either.
  8597. (tar --version) >/dev/null 2>&1 && continue
  8598. am__tar='tar chf - "$$tardir"'
  8599. am__tar_='tar chf - "$tardir"'
  8600. am__untar='tar xf -'
  8601. ;;
  8602. pax)
  8603. am__tar='pax -L -x $1 -w "$$tardir"'
  8604. am__tar_='pax -L -x $1 -w "$tardir"'
  8605. am__untar='pax -r'
  8606. ;;
  8607. cpio)
  8608. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  8609. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  8610. am__untar='cpio -i -H $1 -d'
  8611. ;;
  8612. none)
  8613. am__tar=false
  8614. am__tar_=false
  8615. am__untar=false
  8616. ;;
  8617. esac
  8618. # If the value was cached, stop now. We just wanted to have am__tar
  8619. # and am__untar set.
  8620. test -n "${am_cv_prog_tar_$1}" && break
  8621. # tar/untar a dummy directory, and stop if the command works
  8622. rm -rf conftest.dir
  8623. mkdir conftest.dir
  8624. echo GrepMe > conftest.dir/file
  8625. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  8626. rm -rf conftest.dir
  8627. if test -s conftest.tar; then
  8628. AM_RUN_LOG([$am__untar <conftest.tar])
  8629. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  8630. fi
  8631. done
  8632. rm -rf conftest.dir
  8633. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  8634. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  8635. AC_SUBST([am__tar])
  8636. AC_SUBST([am__untar])
  8637. ]) # _AM_PROG_TAR