PageRenderTime 61ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/thirdparty/breakpad/third_party/glog/m4/libtool.m4

http://github.com/tomahawk-player/tomahawk
m4 | 2054 lines | 1362 code | 248 blank | 444 comment | 0 complexity | 68fe61a1c267bdd1a7a0f0aa7efedaa5 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, GPL-3.0, GPL-2.0
  1. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  2. #
  3. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  4. # 2006, 2007, 2008 Free Software Foundation, Inc.
  5. # Written by Gordon Matzigkeit, 1996
  6. #
  7. # This file is free software; the Free Software Foundation gives
  8. # unlimited permission to copy and/or distribute it, with or without
  9. # modifications, as long as this notice is preserved.
  10. m4_define([_LT_COPYING], [dnl
  11. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  12. # 2006, 2007, 2008 Free Software Foundation, Inc.
  13. # Written by Gordon Matzigkeit, 1996
  14. #
  15. # This file is part of GNU Libtool.
  16. #
  17. # GNU Libtool is free software; you can redistribute it and/or
  18. # modify it under the terms of the GNU General Public License as
  19. # published by the Free Software Foundation; either version 2 of
  20. # the License, or (at your option) any later version.
  21. #
  22. # As a special exception to the GNU General Public License,
  23. # if you distribute this file as part of a program or library that
  24. # is built using GNU Libtool, you may include this file under the
  25. # same distribution terms that you use for the rest of that program.
  26. #
  27. # GNU Libtool is distributed in the hope that it will be useful,
  28. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  29. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  30. # GNU General Public License for more details.
  31. #
  32. # You should have received a copy of the GNU General Public License
  33. # along with GNU Libtool; see the file COPYING. If not, a copy
  34. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  35. # obtained by writing to the Free Software Foundation, Inc.,
  36. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  37. ])
  38. # serial 56 LT_INIT
  39. # LT_PREREQ(VERSION)
  40. # ------------------
  41. # Complain and exit if this libtool version is less that VERSION.
  42. m4_defun([LT_PREREQ],
  43. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  44. [m4_default([$3],
  45. [m4_fatal([Libtool version $1 or higher is required],
  46. 63)])],
  47. [$2])])
  48. # _LT_CHECK_BUILDDIR
  49. # ------------------
  50. # Complain if the absolute build directory name contains unusual characters
  51. m4_defun([_LT_CHECK_BUILDDIR],
  52. [case `pwd` in
  53. *\ * | *\ *)
  54. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  55. esac
  56. ])
  57. # LT_INIT([OPTIONS])
  58. # ------------------
  59. AC_DEFUN([LT_INIT],
  60. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  61. AC_BEFORE([$0], [LT_LANG])dnl
  62. AC_BEFORE([$0], [LT_OUTPUT])dnl
  63. AC_BEFORE([$0], [LTDL_INIT])dnl
  64. m4_require([_LT_CHECK_BUILDDIR])dnl
  65. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  66. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  67. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  68. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  69. dnl unless we require an AC_DEFUNed macro:
  70. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  71. AC_REQUIRE([LTSUGAR_VERSION])dnl
  72. AC_REQUIRE([LTVERSION_VERSION])dnl
  73. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  74. m4_require([_LT_PROG_LTMAIN])dnl
  75. dnl Parse OPTIONS
  76. _LT_SET_OPTIONS([$0], [$1])
  77. # This can be used to rebuild libtool when needed
  78. LIBTOOL_DEPS="$ltmain"
  79. # Always use our own libtool.
  80. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  81. AC_SUBST(LIBTOOL)dnl
  82. _LT_SETUP
  83. # Only expand once:
  84. m4_define([LT_INIT])
  85. ])# LT_INIT
  86. # Old names:
  87. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  88. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  89. dnl aclocal-1.4 backwards compatibility:
  90. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  91. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  92. # _LT_CC_BASENAME(CC)
  93. # -------------------
  94. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  95. m4_defun([_LT_CC_BASENAME],
  96. [for cc_temp in $1""; do
  97. case $cc_temp in
  98. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  99. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  100. \-*) ;;
  101. *) break;;
  102. esac
  103. done
  104. cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  105. ])
  106. # _LT_FILEUTILS_DEFAULTS
  107. # ----------------------
  108. # It is okay to use these file commands and assume they have been set
  109. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  110. m4_defun([_LT_FILEUTILS_DEFAULTS],
  111. [: ${CP="cp -f"}
  112. : ${MV="mv -f"}
  113. : ${RM="rm -f"}
  114. ])# _LT_FILEUTILS_DEFAULTS
  115. # _LT_SETUP
  116. # ---------
  117. m4_defun([_LT_SETUP],
  118. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  119. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  120. _LT_DECL([], [host_alias], [0], [The host system])dnl
  121. _LT_DECL([], [host], [0])dnl
  122. _LT_DECL([], [host_os], [0])dnl
  123. dnl
  124. _LT_DECL([], [build_alias], [0], [The build system])dnl
  125. _LT_DECL([], [build], [0])dnl
  126. _LT_DECL([], [build_os], [0])dnl
  127. dnl
  128. AC_REQUIRE([AC_PROG_CC])dnl
  129. AC_REQUIRE([LT_PATH_LD])dnl
  130. AC_REQUIRE([LT_PATH_NM])dnl
  131. dnl
  132. AC_REQUIRE([AC_PROG_LN_S])dnl
  133. test -z "$LN_S" && LN_S="ln -s"
  134. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  135. dnl
  136. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  137. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  138. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  139. dnl
  140. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  141. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  142. m4_require([_LT_CMD_RELOAD])dnl
  143. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  144. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  145. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  146. _LT_CONFIG_LIBTOOL_INIT([
  147. # See if we are running on zsh, and set the options which allow our
  148. # commands through without removal of \ escapes INIT.
  149. if test -n "\${ZSH_VERSION+set}" ; then
  150. setopt NO_GLOB_SUBST
  151. fi
  152. ])
  153. if test -n "${ZSH_VERSION+set}" ; then
  154. setopt NO_GLOB_SUBST
  155. fi
  156. _LT_CHECK_OBJDIR
  157. m4_require([_LT_TAG_COMPILER])dnl
  158. _LT_PROG_ECHO_BACKSLASH
  159. case $host_os in
  160. aix3*)
  161. # AIX sometimes has problems with the GCC collect2 program. For some
  162. # reason, if we set the COLLECT_NAMES environment variable, the problems
  163. # vanish in a puff of smoke.
  164. if test "X${COLLECT_NAMES+set}" != Xset; then
  165. COLLECT_NAMES=
  166. export COLLECT_NAMES
  167. fi
  168. ;;
  169. esac
  170. # Sed substitution that helps us do robust quoting. It backslashifies
  171. # metacharacters that are still active within double-quoted strings.
  172. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  173. # Same as above, but do not quote variable references.
  174. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  175. # Sed substitution to delay expansion of an escaped shell variable in a
  176. # double_quote_subst'ed string.
  177. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  178. # Sed substitution to delay expansion of an escaped single quote.
  179. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  180. # Sed substitution to avoid accidental globbing in evaled expressions
  181. no_glob_subst='s/\*/\\\*/g'
  182. # Global variables:
  183. ofile=libtool
  184. can_build_shared=yes
  185. # All known linkers require a `.a' archive for static linking (except MSVC,
  186. # which needs '.lib').
  187. libext=a
  188. with_gnu_ld="$lt_cv_prog_gnu_ld"
  189. old_CC="$CC"
  190. old_CFLAGS="$CFLAGS"
  191. # Set sane defaults for various variables
  192. test -z "$CC" && CC=cc
  193. test -z "$LTCC" && LTCC=$CC
  194. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  195. test -z "$LD" && LD=ld
  196. test -z "$ac_objext" && ac_objext=o
  197. _LT_CC_BASENAME([$compiler])
  198. # Only perform the check for file, if the check method requires it
  199. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  200. case $deplibs_check_method in
  201. file_magic*)
  202. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  203. _LT_PATH_MAGIC
  204. fi
  205. ;;
  206. esac
  207. # Use C for the default configuration in the libtool script
  208. LT_SUPPORTED_TAG([CC])
  209. _LT_LANG_C_CONFIG
  210. _LT_LANG_DEFAULT_CONFIG
  211. _LT_CONFIG_COMMANDS
  212. ])# _LT_SETUP
  213. # _LT_PROG_LTMAIN
  214. # ---------------
  215. # Note that this code is called both from `configure', and `config.status'
  216. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  217. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  218. # so we pass a copy along to make sure it has a sensible value anyway.
  219. m4_defun([_LT_PROG_LTMAIN],
  220. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  221. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  222. ltmain="$ac_aux_dir/ltmain.sh"
  223. ])# _LT_PROG_LTMAIN
  224. ## ------------------------------------- ##
  225. ## Accumulate code for creating libtool. ##
  226. ## ------------------------------------- ##
  227. # So that we can recreate a full libtool script including additional
  228. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  229. # in macros and then make a single call at the end using the `libtool'
  230. # label.
  231. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  232. # ----------------------------------------
  233. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  234. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  235. [m4_ifval([$1],
  236. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  237. [$1
  238. ])])])
  239. # Initialize.
  240. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  241. # _LT_CONFIG_LIBTOOL([COMMANDS])
  242. # ------------------------------
  243. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  244. m4_define([_LT_CONFIG_LIBTOOL],
  245. [m4_ifval([$1],
  246. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  247. [$1
  248. ])])])
  249. # Initialize.
  250. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  251. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  252. # -----------------------------------------------------
  253. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  254. [_LT_CONFIG_LIBTOOL([$1])
  255. _LT_CONFIG_LIBTOOL_INIT([$2])
  256. ])
  257. # _LT_FORMAT_COMMENT([COMMENT])
  258. # -----------------------------
  259. # Add leading comment marks to the start of each line, and a trailing
  260. # full-stop to the whole comment if one is not present already.
  261. m4_define([_LT_FORMAT_COMMENT],
  262. [m4_ifval([$1], [
  263. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  264. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  265. )])
  266. ## ------------------------ ##
  267. ## FIXME: Eliminate VARNAME ##
  268. ## ------------------------ ##
  269. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  270. # -------------------------------------------------------------------
  271. # CONFIGNAME is the name given to the value in the libtool script.
  272. # VARNAME is the (base) name used in the configure script.
  273. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  274. # VARNAME. Any other value will be used directly.
  275. m4_define([_LT_DECL],
  276. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  277. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  278. [m4_ifval([$1], [$1], [$2])])
  279. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  280. m4_ifval([$4],
  281. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  282. lt_dict_add_subkey([lt_decl_dict], [$2],
  283. [tagged?], [m4_ifval([$5], [yes], [no])])])
  284. ])
  285. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  286. # --------------------------------------------------------
  287. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  288. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  289. # ------------------------------------------------
  290. m4_define([lt_decl_tag_varnames],
  291. [_lt_decl_filter([tagged?], [yes], $@)])
  292. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  293. # ---------------------------------------------------------
  294. m4_define([_lt_decl_filter],
  295. [m4_case([$#],
  296. [0], [m4_fatal([$0: too few arguments: $#])],
  297. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  298. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  299. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  300. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  301. ])
  302. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  303. # --------------------------------------------------
  304. m4_define([lt_decl_quote_varnames],
  305. [_lt_decl_filter([value], [1], $@)])
  306. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  307. # ---------------------------------------------------
  308. m4_define([lt_decl_dquote_varnames],
  309. [_lt_decl_filter([value], [2], $@)])
  310. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  311. # ---------------------------------------------------
  312. m4_define([lt_decl_varnames_tagged],
  313. [m4_assert([$# <= 2])dnl
  314. _$0(m4_quote(m4_default([$1], [[, ]])),
  315. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  316. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  317. m4_define([_lt_decl_varnames_tagged],
  318. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  319. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  320. # ------------------------------------------------
  321. m4_define([lt_decl_all_varnames],
  322. [_$0(m4_quote(m4_default([$1], [[, ]])),
  323. m4_if([$2], [],
  324. m4_quote(lt_decl_varnames),
  325. m4_quote(m4_shift($@))))[]dnl
  326. ])
  327. m4_define([_lt_decl_all_varnames],
  328. [lt_join($@, lt_decl_varnames_tagged([$1],
  329. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  330. ])
  331. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  332. # ------------------------------------
  333. # Quote a variable value, and forward it to `config.status' so that its
  334. # declaration there will have the same value as in `configure'. VARNAME
  335. # must have a single quote delimited value for this to work.
  336. m4_define([_LT_CONFIG_STATUS_DECLARE],
  337. [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
  338. # _LT_CONFIG_STATUS_DECLARATIONS
  339. # ------------------------------
  340. # We delimit libtool config variables with single quotes, so when
  341. # we write them to config.status, we have to be sure to quote all
  342. # embedded single quotes properly. In configure, this macro expands
  343. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  344. #
  345. # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
  346. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  347. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  348. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  349. # _LT_LIBTOOL_TAGS
  350. # ----------------
  351. # Output comment and list of tags supported by the script
  352. m4_defun([_LT_LIBTOOL_TAGS],
  353. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  354. available_tags="_LT_TAGS"dnl
  355. ])
  356. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  357. # -----------------------------------
  358. # Extract the dictionary values for VARNAME (optionally with TAG) and
  359. # expand to a commented shell variable setting:
  360. #
  361. # # Some comment about what VAR is for.
  362. # visible_name=$lt_internal_name
  363. m4_define([_LT_LIBTOOL_DECLARE],
  364. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  365. [description])))[]dnl
  366. m4_pushdef([_libtool_name],
  367. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  368. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  369. [0], [_libtool_name=[$]$1],
  370. [1], [_libtool_name=$lt_[]$1],
  371. [2], [_libtool_name=$lt_[]$1],
  372. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  373. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  374. ])
  375. # _LT_LIBTOOL_CONFIG_VARS
  376. # -----------------------
  377. # Produce commented declarations of non-tagged libtool config variables
  378. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  379. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  380. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  381. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  382. [m4_foreach([_lt_var],
  383. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  384. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  385. # _LT_LIBTOOL_TAG_VARS(TAG)
  386. # -------------------------
  387. m4_define([_LT_LIBTOOL_TAG_VARS],
  388. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  389. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  390. # _LT_TAGVAR(VARNAME, [TAGNAME])
  391. # ------------------------------
  392. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  393. # _LT_CONFIG_COMMANDS
  394. # -------------------
  395. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  396. # variables for single and double quote escaping we saved from calls
  397. # to _LT_DECL, we can put quote escaped variables declarations
  398. # into `config.status', and then the shell code to quote escape them in
  399. # for loops in `config.status'. Finally, any additional code accumulated
  400. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  401. m4_defun([_LT_CONFIG_COMMANDS],
  402. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  403. dnl If the libtool generation code has been placed in $CONFIG_LT,
  404. dnl instead of duplicating it all over again into config.status,
  405. dnl then we will have config.status run $CONFIG_LT later, so it
  406. dnl needs to know what name is stored there:
  407. [AC_CONFIG_COMMANDS([libtool],
  408. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  409. dnl If the libtool generation code is destined for config.status,
  410. dnl expand the accumulated commands and init code now:
  411. [AC_CONFIG_COMMANDS([libtool],
  412. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  413. ])#_LT_CONFIG_COMMANDS
  414. # Initialize.
  415. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  416. [
  417. # The HP-UX ksh and POSIX shell print the target directory to stdout
  418. # if CDPATH is set.
  419. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  420. sed_quote_subst='$sed_quote_subst'
  421. double_quote_subst='$double_quote_subst'
  422. delay_variable_subst='$delay_variable_subst'
  423. _LT_CONFIG_STATUS_DECLARATIONS
  424. LTCC='$LTCC'
  425. LTCFLAGS='$LTCFLAGS'
  426. compiler='$compiler_DEFAULT'
  427. # Quote evaled strings.
  428. for var in lt_decl_all_varnames([[ \
  429. ]], lt_decl_quote_varnames); do
  430. case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
  431. *[[\\\\\\\`\\"\\\$]]*)
  432. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  433. ;;
  434. *)
  435. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  436. ;;
  437. esac
  438. done
  439. # Double-quote double-evaled strings.
  440. for var in lt_decl_all_varnames([[ \
  441. ]], lt_decl_dquote_varnames); do
  442. case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
  443. *[[\\\\\\\`\\"\\\$]]*)
  444. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  445. ;;
  446. *)
  447. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  448. ;;
  449. esac
  450. done
  451. # Fix-up fallback echo if it was mangled by the above quoting rules.
  452. case \$lt_ECHO in
  453. *'\\\[$]0 --fallback-echo"')dnl "
  454. lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
  455. ;;
  456. esac
  457. _LT_OUTPUT_LIBTOOL_INIT
  458. ])
  459. # LT_OUTPUT
  460. # ---------
  461. # This macro allows early generation of the libtool script (before
  462. # AC_OUTPUT is called), incase it is used in configure for compilation
  463. # tests.
  464. AC_DEFUN([LT_OUTPUT],
  465. [: ${CONFIG_LT=./config.lt}
  466. AC_MSG_NOTICE([creating $CONFIG_LT])
  467. cat >"$CONFIG_LT" <<_LTEOF
  468. #! $SHELL
  469. # Generated by $as_me.
  470. # Run this file to recreate a libtool stub with the current configuration.
  471. lt_cl_silent=false
  472. SHELL=\${CONFIG_SHELL-$SHELL}
  473. _LTEOF
  474. cat >>"$CONFIG_LT" <<\_LTEOF
  475. AS_SHELL_SANITIZE
  476. _AS_PREPARE
  477. exec AS_MESSAGE_FD>&1
  478. exec AS_MESSAGE_LOG_FD>>config.log
  479. {
  480. echo
  481. AS_BOX([Running $as_me.])
  482. } >&AS_MESSAGE_LOG_FD
  483. lt_cl_help="\
  484. \`$as_me' creates a local libtool stub from the current configuration,
  485. for use in further configure time tests before the real libtool is
  486. generated.
  487. Usage: $[0] [[OPTIONS]]
  488. -h, --help print this help, then exit
  489. -V, --version print version number, then exit
  490. -q, --quiet do not print progress messages
  491. -d, --debug don't remove temporary files
  492. Report bugs to <bug-libtool@gnu.org>."
  493. lt_cl_version="\
  494. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  495. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  496. configured by $[0], generated by m4_PACKAGE_STRING.
  497. Copyright (C) 2008 Free Software Foundation, Inc.
  498. This config.lt script is free software; the Free Software Foundation
  499. gives unlimited permision to copy, distribute and modify it."
  500. while test $[#] != 0
  501. do
  502. case $[1] in
  503. --version | --v* | -V )
  504. echo "$lt_cl_version"; exit 0 ;;
  505. --help | --h* | -h )
  506. echo "$lt_cl_help"; exit 0 ;;
  507. --debug | --d* | -d )
  508. debug=: ;;
  509. --quiet | --q* | --silent | --s* | -q )
  510. lt_cl_silent=: ;;
  511. -*) AC_MSG_ERROR([unrecognized option: $[1]
  512. Try \`$[0] --help' for more information.]) ;;
  513. *) AC_MSG_ERROR([unrecognized argument: $[1]
  514. Try \`$[0] --help' for more information.]) ;;
  515. esac
  516. shift
  517. done
  518. if $lt_cl_silent; then
  519. exec AS_MESSAGE_FD>/dev/null
  520. fi
  521. _LTEOF
  522. cat >>"$CONFIG_LT" <<_LTEOF
  523. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  524. _LTEOF
  525. cat >>"$CONFIG_LT" <<\_LTEOF
  526. AC_MSG_NOTICE([creating $ofile])
  527. _LT_OUTPUT_LIBTOOL_COMMANDS
  528. AS_EXIT(0)
  529. _LTEOF
  530. chmod +x "$CONFIG_LT"
  531. # configure is writing to config.log, but config.lt does its own redirection,
  532. # appending to config.log, which fails on DOS, as config.log is still kept
  533. # open by configure. Here we exec the FD to /dev/null, effectively closing
  534. # config.log, so it can be properly (re)opened and appended to by config.lt.
  535. if test "$no_create" != yes; then
  536. lt_cl_success=:
  537. test "$silent" = yes &&
  538. lt_config_lt_args="$lt_config_lt_args --quiet"
  539. exec AS_MESSAGE_LOG_FD>/dev/null
  540. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  541. exec AS_MESSAGE_LOG_FD>>config.log
  542. $lt_cl_success || AS_EXIT(1)
  543. fi
  544. ])# LT_OUTPUT
  545. # _LT_CONFIG(TAG)
  546. # ---------------
  547. # If TAG is the built-in tag, create an initial libtool script with a
  548. # default configuration from the untagged config vars. Otherwise add code
  549. # to config.status for appending the configuration named by TAG from the
  550. # matching tagged config vars.
  551. m4_defun([_LT_CONFIG],
  552. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  553. _LT_CONFIG_SAVE_COMMANDS([
  554. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  555. m4_if(_LT_TAG, [C], [
  556. # See if we are running on zsh, and set the options which allow our
  557. # commands through without removal of \ escapes.
  558. if test -n "${ZSH_VERSION+set}" ; then
  559. setopt NO_GLOB_SUBST
  560. fi
  561. cfgfile="${ofile}T"
  562. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  563. $RM "$cfgfile"
  564. cat <<_LT_EOF >> "$cfgfile"
  565. #! $SHELL
  566. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  567. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  568. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  569. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  570. #
  571. _LT_COPYING
  572. _LT_LIBTOOL_TAGS
  573. # ### BEGIN LIBTOOL CONFIG
  574. _LT_LIBTOOL_CONFIG_VARS
  575. _LT_LIBTOOL_TAG_VARS
  576. # ### END LIBTOOL CONFIG
  577. _LT_EOF
  578. case $host_os in
  579. aix3*)
  580. cat <<\_LT_EOF >> "$cfgfile"
  581. # AIX sometimes has problems with the GCC collect2 program. For some
  582. # reason, if we set the COLLECT_NAMES environment variable, the problems
  583. # vanish in a puff of smoke.
  584. if test "X${COLLECT_NAMES+set}" != Xset; then
  585. COLLECT_NAMES=
  586. export COLLECT_NAMES
  587. fi
  588. _LT_EOF
  589. ;;
  590. esac
  591. _LT_PROG_LTMAIN
  592. # We use sed instead of cat because bash on DJGPP gets confused if
  593. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  594. # text mode, it properly converts lines to CR/LF. This bash problem
  595. # is reportedly fixed, but why not run on old versions too?
  596. sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
  597. || (rm -f "$cfgfile"; exit 1)
  598. _LT_PROG_XSI_SHELLFNS
  599. sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
  600. || (rm -f "$cfgfile"; exit 1)
  601. mv -f "$cfgfile" "$ofile" ||
  602. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  603. chmod +x "$ofile"
  604. ],
  605. [cat <<_LT_EOF >> "$ofile"
  606. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  607. dnl in a comment (ie after a #).
  608. # ### BEGIN LIBTOOL TAG CONFIG: $1
  609. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  610. # ### END LIBTOOL TAG CONFIG: $1
  611. _LT_EOF
  612. ])dnl /m4_if
  613. ],
  614. [m4_if([$1], [], [
  615. PACKAGE='$PACKAGE'
  616. VERSION='$VERSION'
  617. TIMESTAMP='$TIMESTAMP'
  618. RM='$RM'
  619. ofile='$ofile'], [])
  620. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  621. ])# _LT_CONFIG
  622. # LT_SUPPORTED_TAG(TAG)
  623. # ---------------------
  624. # Trace this macro to discover what tags are supported by the libtool
  625. # --tag option, using:
  626. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  627. AC_DEFUN([LT_SUPPORTED_TAG], [])
  628. # C support is built-in for now
  629. m4_define([_LT_LANG_C_enabled], [])
  630. m4_define([_LT_TAGS], [])
  631. # LT_LANG(LANG)
  632. # -------------
  633. # Enable libtool support for the given language if not already enabled.
  634. AC_DEFUN([LT_LANG],
  635. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  636. m4_case([$1],
  637. [C], [_LT_LANG(C)],
  638. [C++], [_LT_LANG(CXX)],
  639. [Java], [_LT_LANG(GCJ)],
  640. [Fortran 77], [_LT_LANG(F77)],
  641. [Fortran], [_LT_LANG(FC)],
  642. [Windows Resource], [_LT_LANG(RC)],
  643. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  644. [_LT_LANG($1)],
  645. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  646. ])# LT_LANG
  647. # _LT_LANG(LANGNAME)
  648. # ------------------
  649. m4_defun([_LT_LANG],
  650. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  651. [LT_SUPPORTED_TAG([$1])dnl
  652. m4_append([_LT_TAGS], [$1 ])dnl
  653. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  654. _LT_LANG_$1_CONFIG($1)])dnl
  655. ])# _LT_LANG
  656. # _LT_LANG_DEFAULT_CONFIG
  657. # -----------------------
  658. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  659. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  660. [LT_LANG(CXX)],
  661. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  662. AC_PROVIDE_IFELSE([AC_PROG_F77],
  663. [LT_LANG(F77)],
  664. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  665. AC_PROVIDE_IFELSE([AC_PROG_FC],
  666. [LT_LANG(FC)],
  667. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  668. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  669. dnl pulling things in needlessly.
  670. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  671. [LT_LANG(GCJ)],
  672. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  673. [LT_LANG(GCJ)],
  674. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  675. [LT_LANG(GCJ)],
  676. [m4_ifdef([AC_PROG_GCJ],
  677. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  678. m4_ifdef([A][M_PROG_GCJ],
  679. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  680. m4_ifdef([LT_PROG_GCJ],
  681. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  682. AC_PROVIDE_IFELSE([LT_PROG_RC],
  683. [LT_LANG(RC)],
  684. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  685. ])# _LT_LANG_DEFAULT_CONFIG
  686. # Obsolete macros:
  687. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  688. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  689. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  690. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  691. dnl aclocal-1.4 backwards compatibility:
  692. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  693. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  694. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  695. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  696. # _LT_TAG_COMPILER
  697. # ----------------
  698. m4_defun([_LT_TAG_COMPILER],
  699. [AC_REQUIRE([AC_PROG_CC])dnl
  700. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  701. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  702. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  703. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  704. # If no C compiler was specified, use CC.
  705. LTCC=${LTCC-"$CC"}
  706. # If no C compiler flags were specified, use CFLAGS.
  707. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  708. # Allow CC to be a program name with arguments.
  709. compiler=$CC
  710. ])# _LT_TAG_COMPILER
  711. # _LT_COMPILER_BOILERPLATE
  712. # ------------------------
  713. # Check for compiler boilerplate output or warnings with
  714. # the simple compiler test code.
  715. m4_defun([_LT_COMPILER_BOILERPLATE],
  716. [m4_require([_LT_DECL_SED])dnl
  717. ac_outfile=conftest.$ac_objext
  718. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  719. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  720. _lt_compiler_boilerplate=`cat conftest.err`
  721. $RM conftest*
  722. ])# _LT_COMPILER_BOILERPLATE
  723. # _LT_LINKER_BOILERPLATE
  724. # ----------------------
  725. # Check for linker boilerplate output or warnings with
  726. # the simple link test code.
  727. m4_defun([_LT_LINKER_BOILERPLATE],
  728. [m4_require([_LT_DECL_SED])dnl
  729. ac_outfile=conftest.$ac_objext
  730. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  731. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  732. _lt_linker_boilerplate=`cat conftest.err`
  733. $RM -r conftest*
  734. ])# _LT_LINKER_BOILERPLATE
  735. # _LT_REQUIRED_DARWIN_CHECKS
  736. # -------------------------
  737. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  738. case $host_os in
  739. rhapsody* | darwin*)
  740. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  741. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  742. AC_CHECK_TOOL([LIPO], [lipo], [:])
  743. AC_CHECK_TOOL([OTOOL], [otool], [:])
  744. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  745. _LT_DECL([], [DSYMUTIL], [1],
  746. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  747. _LT_DECL([], [NMEDIT], [1],
  748. [Tool to change global to local symbols on Mac OS X])
  749. _LT_DECL([], [LIPO], [1],
  750. [Tool to manipulate fat objects and archives on Mac OS X])
  751. _LT_DECL([], [OTOOL], [1],
  752. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  753. _LT_DECL([], [OTOOL64], [1],
  754. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  755. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  756. [lt_cv_apple_cc_single_mod=no
  757. if test -z "${LT_MULTI_MODULE}"; then
  758. # By default we will add the -single_module flag. You can override
  759. # by either setting the environment variable LT_MULTI_MODULE
  760. # non-empty at configure time, or by adding -multi_module to the
  761. # link flags.
  762. rm -rf libconftest.dylib*
  763. echo "int foo(void){return 1;}" > conftest.c
  764. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  765. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  766. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  767. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  768. _lt_result=$?
  769. if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
  770. lt_cv_apple_cc_single_mod=yes
  771. else
  772. cat conftest.err >&AS_MESSAGE_LOG_FD
  773. fi
  774. rm -rf libconftest.dylib*
  775. rm -f conftest.*
  776. fi])
  777. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  778. [lt_cv_ld_exported_symbols_list],
  779. [lt_cv_ld_exported_symbols_list=no
  780. save_LDFLAGS=$LDFLAGS
  781. echo "_main" > conftest.sym
  782. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  783. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  784. [lt_cv_ld_exported_symbols_list=yes],
  785. [lt_cv_ld_exported_symbols_list=no])
  786. LDFLAGS="$save_LDFLAGS"
  787. ])
  788. case $host_os in
  789. rhapsody* | darwin1.[[012]])
  790. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  791. darwin1.*)
  792. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  793. darwin*) # darwin 5.x on
  794. # if running on 10.5 or later, the deployment target defaults
  795. # to the OS version, if on x86, and 10.4, the deployment
  796. # target defaults to 10.4. Don't you love it?
  797. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  798. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  799. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  800. 10.[[012]]*)
  801. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  802. 10.*)
  803. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  804. esac
  805. ;;
  806. esac
  807. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  808. _lt_dar_single_mod='$single_module'
  809. fi
  810. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  811. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  812. else
  813. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  814. fi
  815. if test "$DSYMUTIL" != ":"; then
  816. _lt_dsymutil='~$DSYMUTIL $lib || :'
  817. else
  818. _lt_dsymutil=
  819. fi
  820. ;;
  821. esac
  822. ])
  823. # _LT_DARWIN_LINKER_FEATURES
  824. # --------------------------
  825. # Checks for linker and compiler features on darwin
  826. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  827. [
  828. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  829. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  830. _LT_TAGVAR(hardcode_direct, $1)=no
  831. _LT_TAGVAR(hardcode_automatic, $1)=yes
  832. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  833. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  834. _LT_TAGVAR(link_all_deplibs, $1)=yes
  835. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  836. case $cc_basename in
  837. ifort*) _lt_dar_can_shared=yes ;;
  838. *) _lt_dar_can_shared=$GCC ;;
  839. esac
  840. if test "$_lt_dar_can_shared" = "yes"; then
  841. output_verbose_link_cmd=echo
  842. _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}"
  843. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  844. _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}"
  845. _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}"
  846. m4_if([$1], [CXX],
  847. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  848. _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}"
  849. _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}"
  850. fi
  851. ],[])
  852. else
  853. _LT_TAGVAR(ld_shlibs, $1)=no
  854. fi
  855. ])
  856. # _LT_SYS_MODULE_PATH_AIX
  857. # -----------------------
  858. # Links a minimal program and checks the executable
  859. # for the system default hardcoded library path. In most cases,
  860. # this is /usr/lib:/lib, but when the MPI compilers are used
  861. # the location of the communication and MPI libs are included too.
  862. # If we don't find anything, use the default library path according
  863. # to the aix ld manual.
  864. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  865. [m4_require([_LT_DECL_SED])dnl
  866. AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  867. lt_aix_libpath_sed='
  868. /Import File Strings/,/^$/ {
  869. /^0/ {
  870. s/^0 *\(.*\)$/\1/
  871. p
  872. }
  873. }'
  874. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  875. # Check for a 64-bit object if we didn't find anything.
  876. if test -z "$aix_libpath"; then
  877. aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  878. fi],[])
  879. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  880. ])# _LT_SYS_MODULE_PATH_AIX
  881. # _LT_SHELL_INIT(ARG)
  882. # -------------------
  883. m4_define([_LT_SHELL_INIT],
  884. [ifdef([AC_DIVERSION_NOTICE],
  885. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  886. [AC_DIVERT_PUSH(NOTICE)])
  887. $1
  888. AC_DIVERT_POP
  889. ])# _LT_SHELL_INIT
  890. # _LT_PROG_ECHO_BACKSLASH
  891. # -----------------------
  892. # Add some code to the start of the generated configure script which
  893. # will find an echo command which doesn't interpret backslashes.
  894. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  895. [_LT_SHELL_INIT([
  896. # Check that we are running under the correct shell.
  897. SHELL=${CONFIG_SHELL-/bin/sh}
  898. case X$lt_ECHO in
  899. X*--fallback-echo)
  900. # Remove one level of quotation (which was required for Make).
  901. ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  902. ;;
  903. esac
  904. ECHO=${lt_ECHO-echo}
  905. if test "X[$]1" = X--no-reexec; then
  906. # Discard the --no-reexec flag, and continue.
  907. shift
  908. elif test "X[$]1" = X--fallback-echo; then
  909. # Avoid inline document here, it may be left over
  910. :
  911. elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
  912. # Yippee, $ECHO works!
  913. :
  914. else
  915. # Restart under the correct shell.
  916. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  917. fi
  918. if test "X[$]1" = X--fallback-echo; then
  919. # used as fallback echo
  920. shift
  921. cat <<_LT_EOF
  922. [$]*
  923. _LT_EOF
  924. exit 0
  925. fi
  926. # The HP-UX ksh and POSIX shell print the target directory to stdout
  927. # if CDPATH is set.
  928. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  929. if test -z "$lt_ECHO"; then
  930. if test "X${echo_test_string+set}" != Xset; then
  931. # find a string as large as possible, as long as the shell can cope with it
  932. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  933. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  934. if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
  935. { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
  936. then
  937. break
  938. fi
  939. done
  940. fi
  941. if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
  942. echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
  943. test "X$echo_testing_string" = "X$echo_test_string"; then
  944. :
  945. else
  946. # The Solaris, AIX, and Digital Unix default echo programs unquote
  947. # backslashes. This makes it impossible to quote backslashes using
  948. # echo "$something" | sed 's/\\/\\\\/g'
  949. #
  950. # So, first we look for a working echo in the user's PATH.
  951. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  952. for dir in $PATH /usr/ucb; do
  953. IFS="$lt_save_ifs"
  954. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  955. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  956. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  957. test "X$echo_testing_string" = "X$echo_test_string"; then
  958. ECHO="$dir/echo"
  959. break
  960. fi
  961. done
  962. IFS="$lt_save_ifs"
  963. if test "X$ECHO" = Xecho; then
  964. # We didn't find a better echo, so look for alternatives.
  965. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
  966. echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
  967. test "X$echo_testing_string" = "X$echo_test_string"; then
  968. # This shell has a builtin print -r that does the trick.
  969. ECHO='print -r'
  970. elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
  971. test "X$CONFIG_SHELL" != X/bin/ksh; then
  972. # If we have ksh, try running configure again with it.
  973. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  974. export ORIGINAL_CONFIG_SHELL
  975. CONFIG_SHELL=/bin/ksh
  976. export CONFIG_SHELL
  977. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  978. else
  979. # Try using printf.
  980. ECHO='printf %s\n'
  981. if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
  982. echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
  983. test "X$echo_testing_string" = "X$echo_test_string"; then
  984. # Cool, printf works
  985. :
  986. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  987. test "X$echo_testing_string" = 'X\t' &&
  988. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  989. test "X$echo_testing_string" = "X$echo_test_string"; then
  990. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  991. export CONFIG_SHELL
  992. SHELL="$CONFIG_SHELL"
  993. export SHELL
  994. ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
  995. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  996. test "X$echo_testing_string" = 'X\t' &&
  997. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  998. test "X$echo_testing_string" = "X$echo_test_string"; then
  999. ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
  1000. else
  1001. # maybe with a smaller string...
  1002. prev=:
  1003. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  1004. if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
  1005. then
  1006. break
  1007. fi
  1008. prev="$cmd"
  1009. done
  1010. if test "$prev" != 'sed 50q "[$]0"'; then
  1011. echo_test_string=`eval $prev`
  1012. export echo_test_string
  1013. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  1014. else
  1015. # Oops. We lost completely, so just stick with echo.
  1016. ECHO=echo
  1017. fi
  1018. fi
  1019. fi
  1020. fi
  1021. fi
  1022. fi
  1023. # Copy echo and quote the copy suitably for passing to libtool from
  1024. # the Makefile, instead of quoting the original, which is used later.
  1025. lt_ECHO=$ECHO
  1026. if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  1027. lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  1028. fi
  1029. AC_SUBST(lt_ECHO)
  1030. ])
  1031. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1032. _LT_DECL([], [ECHO], [1],
  1033. [An echo program that does not interpret backslashes])
  1034. ])# _LT_PROG_ECHO_BACKSLASH
  1035. # _LT_ENABLE_LOCK
  1036. # ---------------
  1037. m4_defun([_LT_ENABLE_LOCK],
  1038. [AC_ARG_ENABLE([libtool-lock],
  1039. [AS_HELP_STRING([--disable-libtool-lock],
  1040. [avoid locking (might break parallel builds)])])
  1041. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1042. # Some flags need to be propagated to the compiler or linker for good
  1043. # libtool support.
  1044. case $host in
  1045. ia64-*-hpux*)
  1046. # Find out which ABI we are using.
  1047. echo 'int i;' > conftest.$ac_ext
  1048. if AC_TRY_EVAL(ac_compile); then
  1049. case `/usr/bin/file conftest.$ac_objext` in
  1050. *ELF-32*)
  1051. HPUX_IA64_MODE="32"
  1052. ;;
  1053. *ELF-64*)
  1054. HPUX_IA64_MODE="64"
  1055. ;;
  1056. esac
  1057. fi
  1058. rm -rf conftest*
  1059. ;;
  1060. *-*-irix6*)
  1061. # Find out which ABI we are using.
  1062. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  1063. if AC_TRY_EVAL(ac_compile); then
  1064. if test "$lt_cv_prog_gnu_ld" = yes; then
  1065. case `/usr/bin/file conftest.$ac_objext` in
  1066. *32-bit*)
  1067. LD="${LD-ld} -melf32bsmip"
  1068. ;;
  1069. *N32*)
  1070. LD="${LD-ld} -melf32bmipn32"
  1071. ;;
  1072. *64-bit*)
  1073. LD="${LD-ld} -melf64bmip"
  1074. ;;
  1075. esac
  1076. else
  1077. case `/usr/bin/file conftest.$ac_objext` in
  1078. *32-bit*)
  1079. LD="${LD-ld} -32"
  1080. ;;
  1081. *N32*)
  1082. LD="${LD-ld} -n32"
  1083. ;;
  1084. *64-bit*)
  1085. LD="${LD-ld} -64"
  1086. ;;
  1087. esac
  1088. fi
  1089. fi
  1090. rm -rf conftest*
  1091. ;;
  1092. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1093. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1094. # Find out which ABI we are using.
  1095. echo 'int i;' > conftest.$ac_ext
  1096. if AC_TRY_EVAL(ac_compile); then
  1097. case `/usr/bin/file conftest.o` in
  1098. *32-bit*)
  1099. case $host in
  1100. x86_64-*kfreebsd*-gnu)
  1101. LD="${LD-ld} -m elf_i386_fbsd"
  1102. ;;
  1103. x86_64-*linux*)
  1104. LD="${LD-ld} -m elf_i386"
  1105. ;;
  1106. ppc64-*linux*|powerpc64-*linux*)
  1107. LD="${LD-ld} -m elf32ppclinux"
  1108. ;;
  1109. s390x-*linux*)
  1110. LD="${LD-ld} -m elf_s390"
  1111. ;;
  1112. sparc64-*linux*)
  1113. LD="${LD-ld} -m elf32_sparc"
  1114. ;;
  1115. esac
  1116. ;;
  1117. *64-bit*)
  1118. case $host in
  1119. x86_64-*kfreebsd*-gnu)
  1120. LD="${LD-ld} -m elf_x86_64_fbsd"
  1121. ;;
  1122. x86_64-*linux*)
  1123. LD="${LD-ld} -m elf_x86_64"
  1124. ;;
  1125. ppc*-*linux*|powerpc*-*linux*)
  1126. LD="${LD-ld} -m elf64ppc"
  1127. ;;
  1128. s390*-*linux*|s390*-*tpf*)
  1129. LD="${LD-ld} -m elf64_s390"
  1130. ;;
  1131. sparc*-*linux*)
  1132. LD="${LD-ld} -m elf64_sparc"
  1133. ;;
  1134. esac
  1135. ;;
  1136. esac
  1137. fi
  1138. rm -rf conftest*
  1139. ;;
  1140. *-*-sco3.2v5*)
  1141. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1142. SAVE_CFLAGS="$CFLAGS"
  1143. CFLAGS="$CFLAGS -belf"
  1144. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1145. [AC_LANG_PUSH(C)
  1146. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1147. AC_LANG_POP])
  1148. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1149. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1150. CFLAGS="$SAVE_CFLAGS"
  1151. fi
  1152. ;;
  1153. sparc*-*solaris*)
  1154. # Find out which ABI we are using.
  1155. echo 'int i;' > conftest.$ac_ext
  1156. if AC_TRY_EVAL(ac_compile); then
  1157. case `/usr/bin/file conftest.o` in
  1158. *64-bit*)
  1159. case $lt_cv_prog_gnu_ld in
  1160. yes*) LD="${LD-ld} -m elf64_sparc" ;;
  1161. *)
  1162. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1163. LD="${LD-ld} -64"
  1164. fi
  1165. ;;
  1166. esac
  1167. ;;
  1168. esac
  1169. fi
  1170. rm -rf conftest*
  1171. ;;
  1172. esac
  1173. need_locks="$enable_libtool_lock"
  1174. ])# _LT_ENABLE_LOCK
  1175. # _LT_CMD_OLD_ARCHIVE
  1176. # -------------------
  1177. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1178. [AC_CHECK_TOOL(AR, ar, false)
  1179. test -z "$AR" && AR=ar
  1180. test -z "$AR_FLAGS" && AR_FLAGS=cru
  1181. _LT_DECL([], [AR], [1], [The archiver])
  1182. _LT_DECL([], [AR_FLAGS], [1])
  1183. AC_CHECK_TOOL(STRIP, strip, :)
  1184. test -z "$STRIP" && STRIP=:
  1185. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1186. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1187. test -z "$RANLIB" && RANLIB=:
  1188. _LT_DECL([], [RANLIB], [1],
  1189. [Commands used to install an old-style archive])
  1190. # Determine commands to create old-style static archives.
  1191. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1192. old_postinstall_cmds='chmod 644 $oldlib'
  1193. old_postuninstall_cmds=
  1194. if test -n "$RANLIB"; then
  1195. case $host_os in
  1196. openbsd*)
  1197. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
  1198. ;;
  1199. *)
  1200. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
  1201. ;;
  1202. esac
  1203. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  1204. fi
  1205. _LT_DECL([], [old_postinstall_cmds], [2])
  1206. _LT_DECL([], [old_postuninstall_cmds], [2])
  1207. _LT_TAGDECL([], [old_archive_cmds], [2],
  1208. [Commands used to build an old-style archive])
  1209. ])# _LT_CMD_OLD_ARCHIVE
  1210. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1211. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1212. # ----------------------------------------------------------------
  1213. # Check whether the given compiler option works
  1214. AC_DEFUN([_LT_COMPILER_OPTION],
  1215. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1216. m4_require([_LT_DECL_SED])dnl
  1217. AC_CACHE_CHECK([$1], [$2],
  1218. [$2=no
  1219. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1220. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1221. lt_compiler_flag="$3"
  1222. # Insert the option either (1) after the last *FLAGS variable, or
  1223. # (2) before a word containing "conftest.", or (3) at the end.
  1224. # Note that $ac_compile itself does not contain backslashes and begins
  1225. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1226. # The option is referenced via a variable to avoid confusing sed.
  1227. lt_compile=`echo "$ac_compile" | $SED \
  1228. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1229. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1230. -e 's:$: $lt_compiler_flag:'`
  1231. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1232. (eval "$lt_compile" 2>conftest.err)
  1233. ac_status=$?
  1234. cat conftest.err >&AS_MESSAGE_LOG_FD
  1235. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1236. if (exit $ac_status) && test -s "$ac_outfile"; then
  1237. # The compiler can only warn and ignore the option if not recognized
  1238. # So say no if there are warnings other than the usual output.
  1239. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
  1240. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1241. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1242. $2=yes
  1243. fi
  1244. fi
  1245. $RM conftest*
  1246. ])
  1247. if test x"[$]$2" = xyes; then
  1248. m4_if([$5], , :, [$5])
  1249. else
  1250. m4_if([$6], , :, [$6])
  1251. fi
  1252. ])# _LT_COMPILER_OPTION
  1253. # Old name:
  1254. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1255. dnl aclocal-1.4 backwards compatibility:
  1256. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1257. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1258. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1259. # ----------------------------------------------------
  1260. # Check whether the given linker option works
  1261. AC_DEFUN([_LT_LINKER_OPTION],
  1262. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1263. m4_require([_LT_DECL_SED])dnl
  1264. AC_CACHE_CHECK([$1], [$2],
  1265. [$2=no
  1266. save_LDFLAGS="$LDFLAGS"
  1267. LDFLAGS="$LDFLAGS $3"
  1268. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1269. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1270. # The linker can only warn and ignore the option if not recognized
  1271. # So say no if there are warnings
  1272. if test -s conftest.err; then
  1273. # Append any errors to the config.log.
  1274. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1275. $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
  1276. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1277. if diff conftest.exp conftest.er2 >/dev/null; then
  1278. $2=yes
  1279. fi
  1280. else
  1281. $2=yes
  1282. fi
  1283. fi
  1284. $RM -r conftest*
  1285. LDFLAGS="$save_LDFLAGS"
  1286. ])
  1287. if test x"[$]$2" = xyes; then
  1288. m4_if([$4], , :, [$4])
  1289. else
  1290. m4_if([$5], , :, [$5])
  1291. fi
  1292. ])# _LT_LINKER_OPTION
  1293. # Old name:
  1294. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1295. dnl aclocal-1.4 backwards compatibility:
  1296. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1297. # LT_CMD_MAX_LEN
  1298. #---------------
  1299. AC_DEFUN([LT_CMD_MAX_LEN],
  1300. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1301. # find the maximum length of command line arguments
  1302. AC_MSG_CHECKING([the maximum length of command line arguments])
  1303. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1304. i=0
  1305. teststring="ABCD"
  1306. case $build_os in
  1307. msdosdjgpp*)
  1308. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1309. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1310. # during glob expansion). Even if it were fixed, the result of this
  1311. # check would be larger than it should be.
  1312. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1313. ;;
  1314. gnu*)
  1315. # Under GNU Hurd, this test is not required because there is
  1316. # no limit to the length of command line arguments.
  1317. # Libtool will interpret -1 as no limit whatsoever
  1318. lt_cv_sys_max_cmd_len=-1;
  1319. ;;
  1320. cygwin* | mingw* | cegcc*)
  1321. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1322. # about 5 minutes as the teststring grows exponentially.
  1323. # Worse, since 9x/ME are not pre-emptively multitasking,
  1324. # you end up with a "frozen" computer, even though with patience
  1325. # the test eventually succeeds (with a max line length of 256k).
  1326. # Instead, let's just punt: use the minimum linelength reported by
  1327. # all of the supported platforms: 8192 (on NT/2K/XP).
  1328. lt_cv_sys_max_cmd_len=8192;
  1329. ;;
  1330. amigaos*)
  1331. # On AmigaOS with pdksh, this test takes hours, literally.
  1332. # So we just punt and use a minimum line length of 8192.
  1333. lt_cv_sys_max_cmd_len=8192;
  1334. ;;
  1335. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  1336. # This has been around since 386BSD, at least. Likely further.
  1337. if test -x /sbin/sysctl; then
  1338. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1339. elif test -x /usr/sbin/sysctl; then
  1340. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1341. else
  1342. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1343. fi
  1344. # And add a safety zone
  1345. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1346. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1347. ;;
  1348. interix*)
  1349. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1350. lt_cv_sys_max_cmd_len=196608
  1351. ;;
  1352. osf*)
  1353. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1354. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1355. # nice to cause kernel panics so lets avoid the loop below.
  1356. # First set a reasonable default.
  1357. lt_cv_sys_max_cmd_len=16384
  1358. #
  1359. if test -x /sbin/sysconfig; then
  1360. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1361. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1362. esac
  1363. fi
  1364. ;;
  1365. sco3.2v5*)
  1366. lt_cv_sys_max_cmd_len=102400
  1367. ;;
  1368. sysv5* | sco5v6* | sysv4.2uw2*)
  1369. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1370. if test -n "$kargmax"; then
  1371. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  1372. else
  1373. lt_cv_sys_max_cmd_len=32768
  1374. fi
  1375. ;;
  1376. *)
  1377. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  1378. if test -n "$lt_cv_sys_max_cmd_len"; then
  1379. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1380. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1381. else
  1382. # Make teststring a little bigger before we do anything with it.
  1383. # a 1K string should be a reasonable start.
  1384. for i in 1 2 3 4 5 6 7 8 ; do
  1385. teststring=$teststring$teststring
  1386. done
  1387. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  1388. # If test is not a shell built-in, we'll probably end up computing a
  1389. # maximum length that is only half of the actual maximum length, but
  1390. # we can't tell.
  1391. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
  1392. = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
  1393. test $i != 17 # 1/2 MB should be enough
  1394. do
  1395. i=`expr $i + 1`
  1396. teststring=$teststring$teststring
  1397. done
  1398. # Only check the string length outside the loop.
  1399. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  1400. teststring=
  1401. # Add a significant safety factor because C++ compilers can tack on
  1402. # massive amounts of additional arguments before passing them to the
  1403. # linker. It appears as though 1/2 is a usable value.
  1404. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1405. fi
  1406. ;;
  1407. esac
  1408. ])
  1409. if test -n $lt_cv_sys_max_cmd_len ; then
  1410. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1411. else
  1412. AC_MSG_RESULT(none)
  1413. fi
  1414. max_cmd_len=$lt_cv_sys_max_cmd_len
  1415. _LT_DECL([], [max_cmd_len], [0],
  1416. [What is the maximum length of a command?])
  1417. ])# LT_CMD_MAX_LEN
  1418. # Old name:
  1419. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  1420. dnl aclocal-1.4 backwards compatibility:
  1421. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  1422. # _LT_HEADER_DLFCN
  1423. # ----------------
  1424. m4_defun([_LT_HEADER_DLFCN],
  1425. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  1426. ])# _LT_HEADER_DLFCN
  1427. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1428. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1429. # ----------------------------------------------------------------
  1430. m4_defun([_LT_TRY_DLOPEN_SELF],
  1431. [m4_require([_LT_HEADER_DLFCN])dnl
  1432. if test "$cross_compiling" = yes; then :
  1433. [$4]
  1434. else
  1435. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1436. lt_status=$lt_dlunknown
  1437. cat > conftest.$ac_ext <<_LT_EOF
  1438. [#line __oline__ "configure"
  1439. #include "confdefs.h"
  1440. #if HAVE_DLFCN_H
  1441. #include <dlfcn.h>
  1442. #endif
  1443. #include <stdio.h>
  1444. #ifdef RTLD_GLOBAL
  1445. # define LT_DLGLOBAL RTLD_GLOBAL
  1446. #else
  1447. # ifdef DL_GLOBAL
  1448. # define LT_DLGLOBAL DL_GLOBAL
  1449. # else
  1450. # define LT_DLGLOBAL 0
  1451. # endif
  1452. #endif
  1453. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1454. find out it does not work in some platform. */
  1455. #ifndef LT_DLLAZY_OR_NOW
  1456. # ifdef RTLD_LAZY
  1457. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1458. # else
  1459. # ifdef DL_LAZY
  1460. # define LT_DLLAZY_OR_NOW DL_LAZY
  1461. # else
  1462. # ifdef RTLD_NOW
  1463. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1464. # else
  1465. # ifdef DL_NOW
  1466. # define LT_DLLAZY_OR_NOW DL_NOW
  1467. # else
  1468. # define LT_DLLAZY_OR_NOW 0
  1469. # endif
  1470. # endif
  1471. # endif
  1472. # endif
  1473. #endif
  1474. void fnord() { int i=42;}
  1475. int main ()
  1476. {
  1477. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1478. int status = $lt_dlunknown;
  1479. if (self)
  1480. {
  1481. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1482. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1483. /* dlclose (self); */
  1484. }
  1485. else
  1486. puts (dlerror ());
  1487. return status;
  1488. }]
  1489. _LT_EOF
  1490. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  1491. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  1492. lt_status=$?
  1493. case x$lt_status in
  1494. x$lt_dlno_uscore) $1 ;;
  1495. x$lt_dlneed_uscore) $2 ;;
  1496. x$lt_dlunknown|x*) $3 ;;
  1497. esac
  1498. else :
  1499. # compilation failed
  1500. $3
  1501. fi
  1502. fi
  1503. rm -fr conftest*
  1504. ])# _LT_TRY_DLOPEN_SELF
  1505. # LT_SYS_DLOPEN_SELF
  1506. # ------------------
  1507. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  1508. [m4_require([_LT_HEADER_DLFCN])dnl
  1509. if test "x$enable_dlopen" != xyes; then
  1510. enable_dlopen=unknown
  1511. enable_dlopen_self=unknown
  1512. enable_dlopen_self_static=unknown
  1513. else
  1514. lt_cv_dlopen=no
  1515. lt_cv_dlopen_libs=
  1516. case $host_os in
  1517. beos*)
  1518. lt_cv_dlopen="load_add_on"
  1519. lt_cv_dlopen_libs=
  1520. lt_cv_dlopen_self=yes
  1521. ;;
  1522. mingw* | pw32* | cegcc*)
  1523. lt_cv_dlopen="LoadLibrary"
  1524. lt_cv_dlopen_libs=
  1525. ;;
  1526. cygwin*)
  1527. lt_cv_dlopen="dlopen"
  1528. lt_cv_dlopen_libs=
  1529. ;;
  1530. darwin*)
  1531. # if libdl is installed we need to link against it
  1532. AC_CHECK_LIB([dl], [dlopen],
  1533. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  1534. lt_cv_dlopen="dyld"
  1535. lt_cv_dlopen_libs=
  1536. lt_cv_dlopen_self=yes
  1537. ])
  1538. ;;
  1539. *)
  1540. AC_CHECK_FUNC([shl_load],
  1541. [lt_cv_dlopen="shl_load"],
  1542. [AC_CHECK_LIB([dld], [shl_load],
  1543. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  1544. [AC_CHECK_FUNC([dlopen],
  1545. [lt_cv_dlopen="dlopen"],
  1546. [AC_CHECK_LIB([dl], [dlopen],
  1547. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  1548. [AC_CHECK_LIB([svld], [dlopen],
  1549. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  1550. [AC_CHECK_LIB([dld], [dld_link],
  1551. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  1552. ])
  1553. ])
  1554. ])
  1555. ])
  1556. ])
  1557. ;;
  1558. esac
  1559. if test "x$lt_cv_dlopen" != xno; then
  1560. enable_dlopen=yes
  1561. else
  1562. enable_dlopen=no
  1563. fi
  1564. case $lt_cv_dlopen in
  1565. dlopen)
  1566. save_CPPFLAGS="$CPPFLAGS"
  1567. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1568. save_LDFLAGS="$LDFLAGS"
  1569. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1570. save_LIBS="$LIBS"
  1571. LIBS="$lt_cv_dlopen_libs $LIBS"
  1572. AC_CACHE_CHECK([whether a program can dlopen itself],
  1573. lt_cv_dlopen_self, [dnl
  1574. _LT_TRY_DLOPEN_SELF(
  1575. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1576. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1577. ])
  1578. if test "x$lt_cv_dlopen_self" = xyes; then
  1579. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  1580. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1581. lt_cv_dlopen_self_static, [dnl
  1582. _LT_TRY_DLOPEN_SELF(
  1583. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1584. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1585. ])
  1586. fi
  1587. CPPFLAGS="$save_CPPFLAGS"
  1588. LDFLAGS="$save_LDFLAGS"
  1589. LIBS="$save_LIBS"
  1590. ;;
  1591. esac
  1592. case $lt_cv_dlopen_self in
  1593. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1594. *) enable_dlopen_self=unknown ;;
  1595. esac
  1596. case $lt_cv_dlopen_self_static in
  1597. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1598. *) enable_dlopen_self_static=unknown ;;
  1599. esac
  1600. fi
  1601. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  1602. [Whether dlopen is supported])
  1603. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  1604. [Whether dlopen of programs is supported])
  1605. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  1606. [Whether dlopen of statically linked programs is supported])
  1607. ])# LT_SYS_DLOPEN_SELF
  1608. # Old name:
  1609. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  1610. dnl aclocal-1.4 backwards compatibility:
  1611. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  1612. # _LT_COMPILER_C_O([TAGNAME])
  1613. # ---------------------------
  1614. # Check to see if options -c and -o are simultaneously supported by compiler.
  1615. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  1616. m4_defun([_LT_COMPILER_C_O],
  1617. [m4_require([_LT_DECL_SED])dnl
  1618. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1619. m4_require([_LT_TAG_COMPILER])dnl
  1620. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1621. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1622. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1623. $RM -r conftest 2>/dev/null
  1624. mkdir conftest
  1625. cd conftest
  1626. mkdir out
  1627. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1628. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1629. # Insert the option either (1) after the last *FLAGS variable, or
  1630. # (2) before a word containing "conftest.", or (3) at the end.
  1631. # Note that $ac_compile itself does not contain backslashes and begins
  1632. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1633. lt_compile=`echo "$ac_compile" | $SED \
  1634. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1635. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1636. -e 's:$: $lt_compiler_flag:'`
  1637. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1638. (eval "$lt_compile" 2>out/conftest.err)
  1639. ac_status=$?
  1640. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1641. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1642. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1643. then
  1644. # The compiler can only warn and ignore the option if not recognized
  1645. # So say no if there are warnings
  1646. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
  1647. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1648. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1649. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1650. fi
  1651. fi
  1652. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1653. $RM conftest*
  1654. # SGI C++ compiler will create directory out/ii_files/ for
  1655. # template instantiation
  1656. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  1657. $RM out/* && rmdir out
  1658. cd ..
  1659. $RM -r conftest
  1660. $RM conftest*
  1661. ])
  1662. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  1663. [Does compiler simultaneously support -c and -o options?])
  1664. ])# _LT_COMPILER_C_O
  1665. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  1666. # ----------------------------------
  1667. # Check to see if we can do hard links to lock some files if needed
  1668. m4_defun([_LT_COMPILER_FILE_LOCKS],
  1669. [m4_require([_LT_ENABLE_LOCK])dnl
  1670. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1671. _LT_COMPILER_C_O([$1])
  1672. hard_links="nottested"
  1673. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  1674. # do not overwrite the value of need_locks provided by the user
  1675. AC_MSG_CHECKING([if we can lock with hard links])
  1676. hard_links=yes
  1677. $RM conftest*
  1678. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1679. touch conftest.a
  1680. ln conftest.a conftest.b 2>&5 || hard_links=no
  1681. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1682. AC_MSG_RESULT([$hard_links])
  1683. if test "$hard_links" = no; then
  1684. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  1685. need_locks=warn
  1686. fi
  1687. else
  1688. need_locks=no
  1689. fi
  1690. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  1691. ])# _LT_COMPILER_FILE_LOCKS
  1692. # _LT_CHECK_OBJDIR
  1693. # ----------------
  1694. m4_defun([_LT_CHECK_OBJDIR],
  1695. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1696. [rm -f .libs 2>/dev/null
  1697. mkdir .libs 2>/dev/null
  1698. if test -d .libs; then
  1699. lt_cv_objdir=.libs
  1700. else
  1701. # MS-DOS does not allow filenames that begin with a dot.
  1702. lt_cv_objdir=_libs
  1703. fi
  1704. rmdir .libs 2>/dev/null])
  1705. objdir=$lt_cv_objdir
  1706. _LT_DECL([], [objdir], [0],
  1707. [The name of the directory that contains temporary libtool files])dnl
  1708. m4_pattern_allow([LT_OBJDIR])dnl
  1709. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  1710. [Define to the sub-directory in which libtool stores uninstalled libraries.])
  1711. ])# _LT_CHECK_OBJDIR
  1712. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  1713. # --------------------------------------
  1714. # Check hardcoding attributes.
  1715. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  1716. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1717. _LT_TAGVAR(hardcode_action, $1)=
  1718. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  1719. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  1720. test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  1721. # We can hardcode non-existent directories.
  1722. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  1723. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1724. # have to relink, otherwise we might link with an installed library
  1725. # when we should be linking with a yet-to-be-installed one
  1726. ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1727. test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  1728. # Linking always hardcodes the temporary library directory.
  1729. _LT_TAGVAR(hardcode_action, $1)=relink
  1730. else
  1731. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1732. _LT_TAGVAR(hardcode_action, $1)=immediate
  1733. fi
  1734. else
  1735. # We cannot hardcode anything, or else we can only hardcode existing
  1736. # directories.
  1737. _LT_TAGVAR(hardcode_action, $1)=unsupported
  1738. fi
  1739. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  1740. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  1741. test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  1742. # Fast installation is not supported
  1743. enable_fast_install=no
  1744. elif test "$shlibpath_overrides_runpath" = yes ||
  1745. test "$enable_shared" = no; then
  1746. # Fast installation is not necessary
  1747. enable_fast_install=needless
  1748. fi
  1749. _LT_TAGDECL([], [hardcode_action], [0],
  1750. [How to hardcode a shared library path into an executable])
  1751. ])# _LT_LINKER_HARDCODE_LIBPATH
  1752. # _LT_CMD_STRIPLIB
  1753. # ----------------
  1754. m4_defun([_LT_CMD_STRIPLIB],
  1755. [m4_require([_LT_DECL_EGREP])
  1756. striplib=
  1757. old_striplib=
  1758. AC_MSG_CHECKING([whether stripping libraries is possible])
  1759. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  1760. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1761. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1762. AC_MSG_RESULT([yes])
  1763. else
  1764. # FIXME - insert some real tests, host_os isn't really good enough
  1765. case $host_os in
  1766. darwin*)
  1767. if test -n "$STRIP" ; then
  1768. striplib="$STRIP -x"
  1769. old_striplib="$STRIP -S"
  1770. AC_MSG_RESULT([yes])
  1771. else
  1772. AC_MSG_RESULT([no])
  1773. fi
  1774. ;;
  1775. *)
  1776. AC_MSG_RESULT([no])
  1777. ;;
  1778. esac
  1779. fi
  1780. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  1781. _LT_DECL([], [striplib], [1])
  1782. ])# _LT_CMD_STRIPLIB
  1783. # _LT_SYS_DYNAMIC_LINKER([TAG])
  1784. # -----------------------------
  1785. # PORTME Fill in your ld.so characteristics
  1786. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  1787. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1788. m4_require([_LT_DECL_EGREP])dnl
  1789. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1790. m4_require([_LT_DECL_OBJDUMP])dnl
  1791. m4_require([_LT_DECL_SED])dnl
  1792. AC_MSG_CHECKING([dynamic linker characteristics])
  1793. m4_if([$1],
  1794. [], [
  1795. if test "$GCC" = yes; then
  1796. case $host_os in
  1797. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  1798. *) lt_awk_arg="/^libraries:/" ;;
  1799. esac
  1800. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1801. if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
  1802. # if the path contains ";" then we assume it to be the separator
  1803. # otherwise default to the standard path separator (i.e. ":") - it is
  1804. # assumed that no part of a normal pathname contains ";" but that should
  1805. # okay in the real world where ";" in dirpaths is itself problematic.
  1806. lt_search_path_spec=`$ECHO "$lt_sear