PageRenderTime 105ms CodeModel.GetById 28ms RepoModel.GetById 1ms app.codeStats 0ms

/src/libev/aclocal.m4

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