PageRenderTime 57ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 1ms

/libconfig-1.4.8/m4/libtool.m4

#
m4 | 7437 lines | 5409 code | 724 blank | 1304 comment | 0 complexity | c3a35a01d632ce199b40fde91ba72ca5 MD5 | raw file
Possible License(s): LGPL-2.1, LGPL-2.0

Large files files are truncated, but you can click here to view the full file

  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, 2009, 2010 Free Software Foundation,
  5. # Inc.
  6. # Written by Gordon Matzigkeit, 1996
  7. #
  8. # This file is free software; the Free Software Foundation gives
  9. # unlimited permission to copy and/or distribute it, with or without
  10. # modifications, as long as this notice is preserved.
  11. m4_define([_LT_COPYING], [dnl
  12. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  13. # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
  14. # Inc.
  15. # Written by Gordon Matzigkeit, 1996
  16. #
  17. # This file is part of GNU Libtool.
  18. #
  19. # GNU Libtool is free software; you can redistribute it and/or
  20. # modify it under the terms of the GNU General Public License as
  21. # published by the Free Software Foundation; either version 2 of
  22. # the License, or (at your option) any later version.
  23. #
  24. # As a special exception to the GNU General Public License,
  25. # if you distribute this file as part of a program or library that
  26. # is built using GNU Libtool, you may include this file under the
  27. # same distribution terms that you use for the rest of that program.
  28. #
  29. # GNU Libtool is distributed in the hope that it will be useful,
  30. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  31. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. # GNU General Public License for more details.
  33. #
  34. # You should have received a copy of the GNU General Public License
  35. # along with GNU Libtool; see the file COPYING. If not, a copy
  36. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  37. # obtained by writing to the Free Software Foundation, Inc.,
  38. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  39. ])
  40. # serial 57 LT_INIT
  41. # LT_PREREQ(VERSION)
  42. # ------------------
  43. # Complain and exit if this libtool version is less that VERSION.
  44. m4_defun([LT_PREREQ],
  45. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  46. [m4_default([$3],
  47. [m4_fatal([Libtool version $1 or higher is required],
  48. 63)])],
  49. [$2])])
  50. # _LT_CHECK_BUILDDIR
  51. # ------------------
  52. # Complain if the absolute build directory name contains unusual characters
  53. m4_defun([_LT_CHECK_BUILDDIR],
  54. [case `pwd` in
  55. *\ * | *\ *)
  56. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  57. esac
  58. ])
  59. # LT_INIT([OPTIONS])
  60. # ------------------
  61. AC_DEFUN([LT_INIT],
  62. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  63. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  64. AC_BEFORE([$0], [LT_LANG])dnl
  65. AC_BEFORE([$0], [LT_OUTPUT])dnl
  66. AC_BEFORE([$0], [LTDL_INIT])dnl
  67. m4_require([_LT_CHECK_BUILDDIR])dnl
  68. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  69. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  70. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  71. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  72. dnl unless we require an AC_DEFUNed macro:
  73. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  74. AC_REQUIRE([LTSUGAR_VERSION])dnl
  75. AC_REQUIRE([LTVERSION_VERSION])dnl
  76. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  77. m4_require([_LT_PROG_LTMAIN])dnl
  78. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  79. dnl Parse OPTIONS
  80. _LT_SET_OPTIONS([$0], [$1])
  81. # This can be used to rebuild libtool when needed
  82. LIBTOOL_DEPS="$ltmain"
  83. # Always use our own libtool.
  84. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  85. AC_SUBST(LIBTOOL)dnl
  86. _LT_SETUP
  87. # Only expand once:
  88. m4_define([LT_INIT])
  89. ])# LT_INIT
  90. # Old names:
  91. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  92. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  93. dnl aclocal-1.4 backwards compatibility:
  94. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  95. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  96. # _LT_CC_BASENAME(CC)
  97. # -------------------
  98. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  99. m4_defun([_LT_CC_BASENAME],
  100. [for cc_temp in $1""; do
  101. case $cc_temp in
  102. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  103. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  104. \-*) ;;
  105. *) break;;
  106. esac
  107. done
  108. cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  109. ])
  110. # _LT_FILEUTILS_DEFAULTS
  111. # ----------------------
  112. # It is okay to use these file commands and assume they have been set
  113. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  114. m4_defun([_LT_FILEUTILS_DEFAULTS],
  115. [: ${CP="cp -f"}
  116. : ${MV="mv -f"}
  117. : ${RM="rm -f"}
  118. ])# _LT_FILEUTILS_DEFAULTS
  119. # _LT_SETUP
  120. # ---------
  121. m4_defun([_LT_SETUP],
  122. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  123. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  124. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  125. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  126. _LT_DECL([], [host_alias], [0], [The host system])dnl
  127. _LT_DECL([], [host], [0])dnl
  128. _LT_DECL([], [host_os], [0])dnl
  129. dnl
  130. _LT_DECL([], [build_alias], [0], [The build system])dnl
  131. _LT_DECL([], [build], [0])dnl
  132. _LT_DECL([], [build_os], [0])dnl
  133. dnl
  134. AC_REQUIRE([AC_PROG_CC])dnl
  135. AC_REQUIRE([LT_PATH_LD])dnl
  136. AC_REQUIRE([LT_PATH_NM])dnl
  137. dnl
  138. AC_REQUIRE([AC_PROG_LN_S])dnl
  139. test -z "$LN_S" && LN_S="ln -s"
  140. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  141. dnl
  142. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  143. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  144. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  145. dnl
  146. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  147. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  148. m4_require([_LT_CMD_RELOAD])dnl
  149. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  150. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  151. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  152. _LT_CONFIG_LIBTOOL_INIT([
  153. # See if we are running on zsh, and set the options which allow our
  154. # commands through without removal of \ escapes INIT.
  155. if test -n "\${ZSH_VERSION+set}" ; then
  156. setopt NO_GLOB_SUBST
  157. fi
  158. ])
  159. if test -n "${ZSH_VERSION+set}" ; then
  160. setopt NO_GLOB_SUBST
  161. fi
  162. _LT_CHECK_OBJDIR
  163. m4_require([_LT_TAG_COMPILER])dnl
  164. case $host_os in
  165. aix3*)
  166. # AIX sometimes has problems with the GCC collect2 program. For some
  167. # reason, if we set the COLLECT_NAMES environment variable, the problems
  168. # vanish in a puff of smoke.
  169. if test "X${COLLECT_NAMES+set}" != Xset; then
  170. COLLECT_NAMES=
  171. export COLLECT_NAMES
  172. fi
  173. ;;
  174. esac
  175. # Global variables:
  176. ofile=libtool
  177. can_build_shared=yes
  178. # All known linkers require a `.a' archive for static linking (except MSVC,
  179. # which needs '.lib').
  180. libext=a
  181. with_gnu_ld="$lt_cv_prog_gnu_ld"
  182. old_CC="$CC"
  183. old_CFLAGS="$CFLAGS"
  184. # Set sane defaults for various variables
  185. test -z "$CC" && CC=cc
  186. test -z "$LTCC" && LTCC=$CC
  187. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  188. test -z "$LD" && LD=ld
  189. test -z "$ac_objext" && ac_objext=o
  190. _LT_CC_BASENAME([$compiler])
  191. # Only perform the check for file, if the check method requires it
  192. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  193. case $deplibs_check_method in
  194. file_magic*)
  195. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  196. _LT_PATH_MAGIC
  197. fi
  198. ;;
  199. esac
  200. # Use C for the default configuration in the libtool script
  201. LT_SUPPORTED_TAG([CC])
  202. _LT_LANG_C_CONFIG
  203. _LT_LANG_DEFAULT_CONFIG
  204. _LT_CONFIG_COMMANDS
  205. ])# _LT_SETUP
  206. # _LT_PREPARE_SED_QUOTE_VARS
  207. # --------------------------
  208. # Define a few sed substitution that help us do robust quoting.
  209. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  210. [# Backslashify metacharacters that are still active within
  211. # double-quoted strings.
  212. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  213. # Same as above, but do not quote variable references.
  214. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  215. # Sed substitution to delay expansion of an escaped shell variable in a
  216. # double_quote_subst'ed string.
  217. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  218. # Sed substitution to delay expansion of an escaped single quote.
  219. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  220. # Sed substitution to avoid accidental globbing in evaled expressions
  221. no_glob_subst='s/\*/\\\*/g'
  222. ])
  223. # _LT_PROG_LTMAIN
  224. # ---------------
  225. # Note that this code is called both from `configure', and `config.status'
  226. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  227. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  228. # so we pass a copy along to make sure it has a sensible value anyway.
  229. m4_defun([_LT_PROG_LTMAIN],
  230. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  231. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  232. ltmain="$ac_aux_dir/ltmain.sh"
  233. ])# _LT_PROG_LTMAIN
  234. ## ------------------------------------- ##
  235. ## Accumulate code for creating libtool. ##
  236. ## ------------------------------------- ##
  237. # So that we can recreate a full libtool script including additional
  238. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  239. # in macros and then make a single call at the end using the `libtool'
  240. # label.
  241. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  242. # ----------------------------------------
  243. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  244. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  245. [m4_ifval([$1],
  246. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  247. [$1
  248. ])])])
  249. # Initialize.
  250. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  251. # _LT_CONFIG_LIBTOOL([COMMANDS])
  252. # ------------------------------
  253. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  254. m4_define([_LT_CONFIG_LIBTOOL],
  255. [m4_ifval([$1],
  256. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  257. [$1
  258. ])])])
  259. # Initialize.
  260. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  261. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  262. # -----------------------------------------------------
  263. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  264. [_LT_CONFIG_LIBTOOL([$1])
  265. _LT_CONFIG_LIBTOOL_INIT([$2])
  266. ])
  267. # _LT_FORMAT_COMMENT([COMMENT])
  268. # -----------------------------
  269. # Add leading comment marks to the start of each line, and a trailing
  270. # full-stop to the whole comment if one is not present already.
  271. m4_define([_LT_FORMAT_COMMENT],
  272. [m4_ifval([$1], [
  273. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  274. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  275. )])
  276. ## ------------------------ ##
  277. ## FIXME: Eliminate VARNAME ##
  278. ## ------------------------ ##
  279. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  280. # -------------------------------------------------------------------
  281. # CONFIGNAME is the name given to the value in the libtool script.
  282. # VARNAME is the (base) name used in the configure script.
  283. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  284. # VARNAME. Any other value will be used directly.
  285. m4_define([_LT_DECL],
  286. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  287. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  288. [m4_ifval([$1], [$1], [$2])])
  289. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  290. m4_ifval([$4],
  291. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  292. lt_dict_add_subkey([lt_decl_dict], [$2],
  293. [tagged?], [m4_ifval([$5], [yes], [no])])])
  294. ])
  295. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  296. # --------------------------------------------------------
  297. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  298. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  299. # ------------------------------------------------
  300. m4_define([lt_decl_tag_varnames],
  301. [_lt_decl_filter([tagged?], [yes], $@)])
  302. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  303. # ---------------------------------------------------------
  304. m4_define([_lt_decl_filter],
  305. [m4_case([$#],
  306. [0], [m4_fatal([$0: too few arguments: $#])],
  307. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  308. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  309. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  310. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  311. ])
  312. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  313. # --------------------------------------------------
  314. m4_define([lt_decl_quote_varnames],
  315. [_lt_decl_filter([value], [1], $@)])
  316. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  317. # ---------------------------------------------------
  318. m4_define([lt_decl_dquote_varnames],
  319. [_lt_decl_filter([value], [2], $@)])
  320. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  321. # ---------------------------------------------------
  322. m4_define([lt_decl_varnames_tagged],
  323. [m4_assert([$# <= 2])dnl
  324. _$0(m4_quote(m4_default([$1], [[, ]])),
  325. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  326. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  327. m4_define([_lt_decl_varnames_tagged],
  328. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  329. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  330. # ------------------------------------------------
  331. m4_define([lt_decl_all_varnames],
  332. [_$0(m4_quote(m4_default([$1], [[, ]])),
  333. m4_if([$2], [],
  334. m4_quote(lt_decl_varnames),
  335. m4_quote(m4_shift($@))))[]dnl
  336. ])
  337. m4_define([_lt_decl_all_varnames],
  338. [lt_join($@, lt_decl_varnames_tagged([$1],
  339. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  340. ])
  341. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  342. # ------------------------------------
  343. # Quote a variable value, and forward it to `config.status' so that its
  344. # declaration there will have the same value as in `configure'. VARNAME
  345. # must have a single quote delimited value for this to work.
  346. m4_define([_LT_CONFIG_STATUS_DECLARE],
  347. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  348. # _LT_CONFIG_STATUS_DECLARATIONS
  349. # ------------------------------
  350. # We delimit libtool config variables with single quotes, so when
  351. # we write them to config.status, we have to be sure to quote all
  352. # embedded single quotes properly. In configure, this macro expands
  353. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  354. #
  355. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  356. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  357. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  358. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  359. # _LT_LIBTOOL_TAGS
  360. # ----------------
  361. # Output comment and list of tags supported by the script
  362. m4_defun([_LT_LIBTOOL_TAGS],
  363. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  364. available_tags="_LT_TAGS"dnl
  365. ])
  366. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  367. # -----------------------------------
  368. # Extract the dictionary values for VARNAME (optionally with TAG) and
  369. # expand to a commented shell variable setting:
  370. #
  371. # # Some comment about what VAR is for.
  372. # visible_name=$lt_internal_name
  373. m4_define([_LT_LIBTOOL_DECLARE],
  374. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  375. [description])))[]dnl
  376. m4_pushdef([_libtool_name],
  377. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  378. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  379. [0], [_libtool_name=[$]$1],
  380. [1], [_libtool_name=$lt_[]$1],
  381. [2], [_libtool_name=$lt_[]$1],
  382. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  383. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  384. ])
  385. # _LT_LIBTOOL_CONFIG_VARS
  386. # -----------------------
  387. # Produce commented declarations of non-tagged libtool config variables
  388. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  389. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  390. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  391. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  392. [m4_foreach([_lt_var],
  393. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  394. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  395. # _LT_LIBTOOL_TAG_VARS(TAG)
  396. # -------------------------
  397. m4_define([_LT_LIBTOOL_TAG_VARS],
  398. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  399. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  400. # _LT_TAGVAR(VARNAME, [TAGNAME])
  401. # ------------------------------
  402. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  403. # _LT_CONFIG_COMMANDS
  404. # -------------------
  405. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  406. # variables for single and double quote escaping we saved from calls
  407. # to _LT_DECL, we can put quote escaped variables declarations
  408. # into `config.status', and then the shell code to quote escape them in
  409. # for loops in `config.status'. Finally, any additional code accumulated
  410. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  411. m4_defun([_LT_CONFIG_COMMANDS],
  412. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  413. dnl If the libtool generation code has been placed in $CONFIG_LT,
  414. dnl instead of duplicating it all over again into config.status,
  415. dnl then we will have config.status run $CONFIG_LT later, so it
  416. dnl needs to know what name is stored there:
  417. [AC_CONFIG_COMMANDS([libtool],
  418. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  419. dnl If the libtool generation code is destined for config.status,
  420. dnl expand the accumulated commands and init code now:
  421. [AC_CONFIG_COMMANDS([libtool],
  422. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  423. ])#_LT_CONFIG_COMMANDS
  424. # Initialize.
  425. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  426. [
  427. # The HP-UX ksh and POSIX shell print the target directory to stdout
  428. # if CDPATH is set.
  429. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  430. sed_quote_subst='$sed_quote_subst'
  431. double_quote_subst='$double_quote_subst'
  432. delay_variable_subst='$delay_variable_subst'
  433. _LT_CONFIG_STATUS_DECLARATIONS
  434. LTCC='$LTCC'
  435. LTCFLAGS='$LTCFLAGS'
  436. compiler='$compiler_DEFAULT'
  437. # A function that is used when there is no print builtin or printf.
  438. func_fallback_echo ()
  439. {
  440. eval 'cat <<_LTECHO_EOF
  441. \$[]1
  442. _LTECHO_EOF'
  443. }
  444. # Quote evaled strings.
  445. for var in lt_decl_all_varnames([[ \
  446. ]], lt_decl_quote_varnames); do
  447. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  448. *[[\\\\\\\`\\"\\\$]]*)
  449. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  450. ;;
  451. *)
  452. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  453. ;;
  454. esac
  455. done
  456. # Double-quote double-evaled strings.
  457. for var in lt_decl_all_varnames([[ \
  458. ]], lt_decl_dquote_varnames); do
  459. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  460. *[[\\\\\\\`\\"\\\$]]*)
  461. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  462. ;;
  463. *)
  464. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  465. ;;
  466. esac
  467. done
  468. _LT_OUTPUT_LIBTOOL_INIT
  469. ])
  470. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  471. # ------------------------------------
  472. # Generate a child script FILE with all initialization necessary to
  473. # reuse the environment learned by the parent script, and make the
  474. # file executable. If COMMENT is supplied, it is inserted after the
  475. # `#!' sequence but before initialization text begins. After this
  476. # macro, additional text can be appended to FILE to form the body of
  477. # the child script. The macro ends with non-zero status if the
  478. # file could not be fully written (such as if the disk is full).
  479. m4_ifdef([AS_INIT_GENERATED],
  480. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  481. [m4_defun([_LT_GENERATED_FILE_INIT],
  482. [m4_require([AS_PREPARE])]dnl
  483. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  484. [lt_write_fail=0
  485. cat >$1 <<_ASEOF || lt_write_fail=1
  486. #! $SHELL
  487. # Generated by $as_me.
  488. $2
  489. SHELL=\${CONFIG_SHELL-$SHELL}
  490. export SHELL
  491. _ASEOF
  492. cat >>$1 <<\_ASEOF || lt_write_fail=1
  493. AS_SHELL_SANITIZE
  494. _AS_PREPARE
  495. exec AS_MESSAGE_FD>&1
  496. _ASEOF
  497. test $lt_write_fail = 0 && chmod +x $1[]dnl
  498. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  499. # LT_OUTPUT
  500. # ---------
  501. # This macro allows early generation of the libtool script (before
  502. # AC_OUTPUT is called), incase it is used in configure for compilation
  503. # tests.
  504. AC_DEFUN([LT_OUTPUT],
  505. [: ${CONFIG_LT=./config.lt}
  506. AC_MSG_NOTICE([creating $CONFIG_LT])
  507. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  508. [# Run this file to recreate a libtool stub with the current configuration.])
  509. cat >>"$CONFIG_LT" <<\_LTEOF
  510. lt_cl_silent=false
  511. exec AS_MESSAGE_LOG_FD>>config.log
  512. {
  513. echo
  514. AS_BOX([Running $as_me.])
  515. } >&AS_MESSAGE_LOG_FD
  516. lt_cl_help="\
  517. \`$as_me' creates a local libtool stub from the current configuration,
  518. for use in further configure time tests before the real libtool is
  519. generated.
  520. Usage: $[0] [[OPTIONS]]
  521. -h, --help print this help, then exit
  522. -V, --version print version number, then exit
  523. -q, --quiet do not print progress messages
  524. -d, --debug don't remove temporary files
  525. Report bugs to <bug-libtool@gnu.org>."
  526. lt_cl_version="\
  527. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  528. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  529. configured by $[0], generated by m4_PACKAGE_STRING.
  530. Copyright (C) 2010 Free Software Foundation, Inc.
  531. This config.lt script is free software; the Free Software Foundation
  532. gives unlimited permision to copy, distribute and modify it."
  533. while test $[#] != 0
  534. do
  535. case $[1] in
  536. --version | --v* | -V )
  537. echo "$lt_cl_version"; exit 0 ;;
  538. --help | --h* | -h )
  539. echo "$lt_cl_help"; exit 0 ;;
  540. --debug | --d* | -d )
  541. debug=: ;;
  542. --quiet | --q* | --silent | --s* | -q )
  543. lt_cl_silent=: ;;
  544. -*) AC_MSG_ERROR([unrecognized option: $[1]
  545. Try \`$[0] --help' for more information.]) ;;
  546. *) AC_MSG_ERROR([unrecognized argument: $[1]
  547. Try \`$[0] --help' for more information.]) ;;
  548. esac
  549. shift
  550. done
  551. if $lt_cl_silent; then
  552. exec AS_MESSAGE_FD>/dev/null
  553. fi
  554. _LTEOF
  555. cat >>"$CONFIG_LT" <<_LTEOF
  556. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  557. _LTEOF
  558. cat >>"$CONFIG_LT" <<\_LTEOF
  559. AC_MSG_NOTICE([creating $ofile])
  560. _LT_OUTPUT_LIBTOOL_COMMANDS
  561. AS_EXIT(0)
  562. _LTEOF
  563. chmod +x "$CONFIG_LT"
  564. # configure is writing to config.log, but config.lt does its own redirection,
  565. # appending to config.log, which fails on DOS, as config.log is still kept
  566. # open by configure. Here we exec the FD to /dev/null, effectively closing
  567. # config.log, so it can be properly (re)opened and appended to by config.lt.
  568. lt_cl_success=:
  569. test "$silent" = yes &&
  570. lt_config_lt_args="$lt_config_lt_args --quiet"
  571. exec AS_MESSAGE_LOG_FD>/dev/null
  572. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  573. exec AS_MESSAGE_LOG_FD>>config.log
  574. $lt_cl_success || AS_EXIT(1)
  575. ])# LT_OUTPUT
  576. # _LT_CONFIG(TAG)
  577. # ---------------
  578. # If TAG is the built-in tag, create an initial libtool script with a
  579. # default configuration from the untagged config vars. Otherwise add code
  580. # to config.status for appending the configuration named by TAG from the
  581. # matching tagged config vars.
  582. m4_defun([_LT_CONFIG],
  583. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  584. _LT_CONFIG_SAVE_COMMANDS([
  585. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  586. m4_if(_LT_TAG, [C], [
  587. # See if we are running on zsh, and set the options which allow our
  588. # commands through without removal of \ escapes.
  589. if test -n "${ZSH_VERSION+set}" ; then
  590. setopt NO_GLOB_SUBST
  591. fi
  592. cfgfile="${ofile}T"
  593. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  594. $RM "$cfgfile"
  595. cat <<_LT_EOF >> "$cfgfile"
  596. #! $SHELL
  597. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  598. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  599. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  600. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  601. #
  602. _LT_COPYING
  603. _LT_LIBTOOL_TAGS
  604. # ### BEGIN LIBTOOL CONFIG
  605. _LT_LIBTOOL_CONFIG_VARS
  606. _LT_LIBTOOL_TAG_VARS
  607. # ### END LIBTOOL CONFIG
  608. _LT_EOF
  609. case $host_os in
  610. aix3*)
  611. cat <<\_LT_EOF >> "$cfgfile"
  612. # AIX sometimes has problems with the GCC collect2 program. For some
  613. # reason, if we set the COLLECT_NAMES environment variable, the problems
  614. # vanish in a puff of smoke.
  615. if test "X${COLLECT_NAMES+set}" != Xset; then
  616. COLLECT_NAMES=
  617. export COLLECT_NAMES
  618. fi
  619. _LT_EOF
  620. ;;
  621. esac
  622. _LT_PROG_LTMAIN
  623. # We use sed instead of cat because bash on DJGPP gets confused if
  624. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  625. # text mode, it properly converts lines to CR/LF. This bash problem
  626. # is reportedly fixed, but why not run on old versions too?
  627. sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
  628. || (rm -f "$cfgfile"; exit 1)
  629. _LT_PROG_XSI_SHELLFNS
  630. sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
  631. || (rm -f "$cfgfile"; exit 1)
  632. mv -f "$cfgfile" "$ofile" ||
  633. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  634. chmod +x "$ofile"
  635. ],
  636. [cat <<_LT_EOF >> "$ofile"
  637. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  638. dnl in a comment (ie after a #).
  639. # ### BEGIN LIBTOOL TAG CONFIG: $1
  640. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  641. # ### END LIBTOOL TAG CONFIG: $1
  642. _LT_EOF
  643. ])dnl /m4_if
  644. ],
  645. [m4_if([$1], [], [
  646. PACKAGE='$PACKAGE'
  647. VERSION='$VERSION'
  648. TIMESTAMP='$TIMESTAMP'
  649. RM='$RM'
  650. ofile='$ofile'], [])
  651. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  652. ])# _LT_CONFIG
  653. # LT_SUPPORTED_TAG(TAG)
  654. # ---------------------
  655. # Trace this macro to discover what tags are supported by the libtool
  656. # --tag option, using:
  657. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  658. AC_DEFUN([LT_SUPPORTED_TAG], [])
  659. # C support is built-in for now
  660. m4_define([_LT_LANG_C_enabled], [])
  661. m4_define([_LT_TAGS], [])
  662. # LT_LANG(LANG)
  663. # -------------
  664. # Enable libtool support for the given language if not already enabled.
  665. AC_DEFUN([LT_LANG],
  666. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  667. m4_case([$1],
  668. [C], [_LT_LANG(C)],
  669. [C++], [_LT_LANG(CXX)],
  670. [Java], [_LT_LANG(GCJ)],
  671. [Fortran 77], [_LT_LANG(F77)],
  672. [Fortran], [_LT_LANG(FC)],
  673. [Windows Resource], [_LT_LANG(RC)],
  674. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  675. [_LT_LANG($1)],
  676. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  677. ])# LT_LANG
  678. # _LT_LANG(LANGNAME)
  679. # ------------------
  680. m4_defun([_LT_LANG],
  681. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  682. [LT_SUPPORTED_TAG([$1])dnl
  683. m4_append([_LT_TAGS], [$1 ])dnl
  684. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  685. _LT_LANG_$1_CONFIG($1)])dnl
  686. ])# _LT_LANG
  687. # _LT_LANG_DEFAULT_CONFIG
  688. # -----------------------
  689. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  690. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  691. [LT_LANG(CXX)],
  692. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  693. AC_PROVIDE_IFELSE([AC_PROG_F77],
  694. [LT_LANG(F77)],
  695. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  696. AC_PROVIDE_IFELSE([AC_PROG_FC],
  697. [LT_LANG(FC)],
  698. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  699. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  700. dnl pulling things in needlessly.
  701. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  702. [LT_LANG(GCJ)],
  703. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  704. [LT_LANG(GCJ)],
  705. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  706. [LT_LANG(GCJ)],
  707. [m4_ifdef([AC_PROG_GCJ],
  708. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  709. m4_ifdef([A][M_PROG_GCJ],
  710. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  711. m4_ifdef([LT_PROG_GCJ],
  712. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  713. AC_PROVIDE_IFELSE([LT_PROG_RC],
  714. [LT_LANG(RC)],
  715. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  716. ])# _LT_LANG_DEFAULT_CONFIG
  717. # Obsolete macros:
  718. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  719. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  720. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  721. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  722. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  723. dnl aclocal-1.4 backwards compatibility:
  724. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  725. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  726. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  727. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  728. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  729. # _LT_TAG_COMPILER
  730. # ----------------
  731. m4_defun([_LT_TAG_COMPILER],
  732. [AC_REQUIRE([AC_PROG_CC])dnl
  733. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  734. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  735. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  736. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  737. # If no C compiler was specified, use CC.
  738. LTCC=${LTCC-"$CC"}
  739. # If no C compiler flags were specified, use CFLAGS.
  740. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  741. # Allow CC to be a program name with arguments.
  742. compiler=$CC
  743. ])# _LT_TAG_COMPILER
  744. # _LT_COMPILER_BOILERPLATE
  745. # ------------------------
  746. # Check for compiler boilerplate output or warnings with
  747. # the simple compiler test code.
  748. m4_defun([_LT_COMPILER_BOILERPLATE],
  749. [m4_require([_LT_DECL_SED])dnl
  750. ac_outfile=conftest.$ac_objext
  751. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  752. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  753. _lt_compiler_boilerplate=`cat conftest.err`
  754. $RM conftest*
  755. ])# _LT_COMPILER_BOILERPLATE
  756. # _LT_LINKER_BOILERPLATE
  757. # ----------------------
  758. # Check for linker boilerplate output or warnings with
  759. # the simple link test code.
  760. m4_defun([_LT_LINKER_BOILERPLATE],
  761. [m4_require([_LT_DECL_SED])dnl
  762. ac_outfile=conftest.$ac_objext
  763. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  764. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  765. _lt_linker_boilerplate=`cat conftest.err`
  766. $RM -r conftest*
  767. ])# _LT_LINKER_BOILERPLATE
  768. # _LT_REQUIRED_DARWIN_CHECKS
  769. # -------------------------
  770. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  771. case $host_os in
  772. rhapsody* | darwin*)
  773. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  774. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  775. AC_CHECK_TOOL([LIPO], [lipo], [:])
  776. AC_CHECK_TOOL([OTOOL], [otool], [:])
  777. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  778. _LT_DECL([], [DSYMUTIL], [1],
  779. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  780. _LT_DECL([], [NMEDIT], [1],
  781. [Tool to change global to local symbols on Mac OS X])
  782. _LT_DECL([], [LIPO], [1],
  783. [Tool to manipulate fat objects and archives on Mac OS X])
  784. _LT_DECL([], [OTOOL], [1],
  785. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  786. _LT_DECL([], [OTOOL64], [1],
  787. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  788. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  789. [lt_cv_apple_cc_single_mod=no
  790. if test -z "${LT_MULTI_MODULE}"; then
  791. # By default we will add the -single_module flag. You can override
  792. # by either setting the environment variable LT_MULTI_MODULE
  793. # non-empty at configure time, or by adding -multi_module to the
  794. # link flags.
  795. rm -rf libconftest.dylib*
  796. echo "int foo(void){return 1;}" > conftest.c
  797. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  798. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  799. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  800. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  801. _lt_result=$?
  802. if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
  803. lt_cv_apple_cc_single_mod=yes
  804. else
  805. cat conftest.err >&AS_MESSAGE_LOG_FD
  806. fi
  807. rm -rf libconftest.dylib*
  808. rm -f conftest.*
  809. fi])
  810. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  811. [lt_cv_ld_exported_symbols_list],
  812. [lt_cv_ld_exported_symbols_list=no
  813. save_LDFLAGS=$LDFLAGS
  814. echo "_main" > conftest.sym
  815. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  816. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  817. [lt_cv_ld_exported_symbols_list=yes],
  818. [lt_cv_ld_exported_symbols_list=no])
  819. LDFLAGS="$save_LDFLAGS"
  820. ])
  821. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  822. [lt_cv_ld_force_load=no
  823. cat > conftest.c << _LT_EOF
  824. int forced_loaded() { return 2;}
  825. _LT_EOF
  826. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  827. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  828. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  829. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  830. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  831. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  832. cat > conftest.c << _LT_EOF
  833. int main() { return 0;}
  834. _LT_EOF
  835. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  836. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  837. _lt_result=$?
  838. if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
  839. lt_cv_ld_force_load=yes
  840. else
  841. cat conftest.err >&AS_MESSAGE_LOG_FD
  842. fi
  843. rm -f conftest.err libconftest.a conftest conftest.c
  844. rm -rf conftest.dSYM
  845. ])
  846. case $host_os in
  847. rhapsody* | darwin1.[[012]])
  848. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  849. darwin1.*)
  850. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  851. darwin*) # darwin 5.x on
  852. # if running on 10.5 or later, the deployment target defaults
  853. # to the OS version, if on x86, and 10.4, the deployment
  854. # target defaults to 10.4. Don't you love it?
  855. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  856. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  857. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  858. 10.[[012]]*)
  859. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  860. 10.*)
  861. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  862. esac
  863. ;;
  864. esac
  865. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  866. _lt_dar_single_mod='$single_module'
  867. fi
  868. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  869. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  870. else
  871. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  872. fi
  873. if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  874. _lt_dsymutil='~$DSYMUTIL $lib || :'
  875. else
  876. _lt_dsymutil=
  877. fi
  878. ;;
  879. esac
  880. ])
  881. # _LT_DARWIN_LINKER_FEATURES
  882. # --------------------------
  883. # Checks for linker and compiler features on darwin
  884. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  885. [
  886. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  887. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  888. _LT_TAGVAR(hardcode_direct, $1)=no
  889. _LT_TAGVAR(hardcode_automatic, $1)=yes
  890. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  891. if test "$lt_cv_ld_force_load" = "yes"; then
  892. _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
  893. else
  894. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  895. fi
  896. _LT_TAGVAR(link_all_deplibs, $1)=yes
  897. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  898. case $cc_basename in
  899. ifort*) _lt_dar_can_shared=yes ;;
  900. *) _lt_dar_can_shared=$GCC ;;
  901. esac
  902. if test "$_lt_dar_can_shared" = "yes"; then
  903. output_verbose_link_cmd=func_echo_all
  904. _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}"
  905. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  906. _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}"
  907. _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}"
  908. m4_if([$1], [CXX],
  909. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  910. _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}"
  911. _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}"
  912. fi
  913. ],[])
  914. else
  915. _LT_TAGVAR(ld_shlibs, $1)=no
  916. fi
  917. ])
  918. # _LT_SYS_MODULE_PATH_AIX
  919. # -----------------------
  920. # Links a minimal program and checks the executable
  921. # for the system default hardcoded library path. In most cases,
  922. # this is /usr/lib:/lib, but when the MPI compilers are used
  923. # the location of the communication and MPI libs are included too.
  924. # If we don't find anything, use the default library path according
  925. # to the aix ld manual.
  926. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  927. [m4_require([_LT_DECL_SED])dnl
  928. AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  929. lt_aix_libpath_sed='
  930. /Import File Strings/,/^$/ {
  931. /^0/ {
  932. s/^0 *\(.*\)$/\1/
  933. p
  934. }
  935. }'
  936. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  937. # Check for a 64-bit object if we didn't find anything.
  938. if test -z "$aix_libpath"; then
  939. aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  940. fi],[])
  941. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  942. ])# _LT_SYS_MODULE_PATH_AIX
  943. # _LT_SHELL_INIT(ARG)
  944. # -------------------
  945. m4_define([_LT_SHELL_INIT],
  946. [m4_divert_text([M4SH-INIT], [$1
  947. ])])# _LT_SHELL_INIT
  948. # _LT_PROG_ECHO_BACKSLASH
  949. # -----------------------
  950. # Find how we can fake an echo command that does not interpret backslash.
  951. # In particular, with Autoconf 2.60 or later we add some code to the start
  952. # of the generated configure script which will find a shell with a builtin
  953. # printf (which we can use as an echo command).
  954. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  955. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  956. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  957. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  958. AC_MSG_CHECKING([how to print strings])
  959. # Test print first, because it will be a builtin if present.
  960. if test "X`print -r -- -n 2>/dev/null`" = X-n && \
  961. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  962. ECHO='print -r --'
  963. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  964. ECHO='printf %s\n'
  965. else
  966. # Use this function as a fallback that always works.
  967. func_fallback_echo ()
  968. {
  969. eval 'cat <<_LTECHO_EOF
  970. $[]1
  971. _LTECHO_EOF'
  972. }
  973. ECHO='func_fallback_echo'
  974. fi
  975. # func_echo_all arg...
  976. # Invoke $ECHO with all args, space-separated.
  977. func_echo_all ()
  978. {
  979. $ECHO "$*"
  980. }
  981. case "$ECHO" in
  982. printf*) AC_MSG_RESULT([printf]) ;;
  983. print*) AC_MSG_RESULT([print -r]) ;;
  984. *) AC_MSG_RESULT([cat]) ;;
  985. esac
  986. m4_ifdef([_AS_DETECT_SUGGESTED],
  987. [_AS_DETECT_SUGGESTED([
  988. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  989. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  990. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  991. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  992. PATH=/empty FPATH=/empty; export PATH FPATH
  993. test "X`printf %s $ECHO`" = "X$ECHO" \
  994. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  995. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  996. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  997. ])# _LT_PROG_ECHO_BACKSLASH
  998. # _LT_ENABLE_LOCK
  999. # ---------------
  1000. m4_defun([_LT_ENABLE_LOCK],
  1001. [AC_ARG_ENABLE([libtool-lock],
  1002. [AS_HELP_STRING([--disable-libtool-lock],
  1003. [avoid locking (might break parallel builds)])])
  1004. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1005. # Some flags need to be propagated to the compiler or linker for good
  1006. # libtool support.
  1007. case $host in
  1008. ia64-*-hpux*)
  1009. # Find out which ABI we are using.
  1010. echo 'int i;' > conftest.$ac_ext
  1011. if AC_TRY_EVAL(ac_compile); then
  1012. case `/usr/bin/file conftest.$ac_objext` in
  1013. *ELF-32*)
  1014. HPUX_IA64_MODE="32"
  1015. ;;
  1016. *ELF-64*)
  1017. HPUX_IA64_MODE="64"
  1018. ;;
  1019. esac
  1020. fi
  1021. rm -rf conftest*
  1022. ;;
  1023. *-*-irix6*)
  1024. # Find out which ABI we are using.
  1025. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1026. if AC_TRY_EVAL(ac_compile); then
  1027. if test "$lt_cv_prog_gnu_ld" = yes; then
  1028. case `/usr/bin/file conftest.$ac_objext` in
  1029. *32-bit*)
  1030. LD="${LD-ld} -melf32bsmip"
  1031. ;;
  1032. *N32*)
  1033. LD="${LD-ld} -melf32bmipn32"
  1034. ;;
  1035. *64-bit*)
  1036. LD="${LD-ld} -melf64bmip"
  1037. ;;
  1038. esac
  1039. else
  1040. case `/usr/bin/file conftest.$ac_objext` in
  1041. *32-bit*)
  1042. LD="${LD-ld} -32"
  1043. ;;
  1044. *N32*)
  1045. LD="${LD-ld} -n32"
  1046. ;;
  1047. *64-bit*)
  1048. LD="${LD-ld} -64"
  1049. ;;
  1050. esac
  1051. fi
  1052. fi
  1053. rm -rf conftest*
  1054. ;;
  1055. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1056. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1057. # Find out which ABI we are using.
  1058. echo 'int i;' > conftest.$ac_ext
  1059. if AC_TRY_EVAL(ac_compile); then
  1060. case `/usr/bin/file conftest.o` in
  1061. *32-bit*)
  1062. case $host in
  1063. x86_64-*kfreebsd*-gnu)
  1064. LD="${LD-ld} -m elf_i386_fbsd"
  1065. ;;
  1066. x86_64-*linux*)
  1067. LD="${LD-ld} -m elf_i386"
  1068. ;;
  1069. ppc64-*linux*|powerpc64-*linux*)
  1070. LD="${LD-ld} -m elf32ppclinux"
  1071. ;;
  1072. s390x-*linux*)
  1073. LD="${LD-ld} -m elf_s390"
  1074. ;;
  1075. sparc64-*linux*)
  1076. LD="${LD-ld} -m elf32_sparc"
  1077. ;;
  1078. esac
  1079. ;;
  1080. *64-bit*)
  1081. case $host in
  1082. x86_64-*kfreebsd*-gnu)
  1083. LD="${LD-ld} -m elf_x86_64_fbsd"
  1084. ;;
  1085. x86_64-*linux*)
  1086. LD="${LD-ld} -m elf_x86_64"
  1087. ;;
  1088. ppc*-*linux*|powerpc*-*linux*)
  1089. LD="${LD-ld} -m elf64ppc"
  1090. ;;
  1091. s390*-*linux*|s390*-*tpf*)
  1092. LD="${LD-ld} -m elf64_s390"
  1093. ;;
  1094. sparc*-*linux*)
  1095. LD="${LD-ld} -m elf64_sparc"
  1096. ;;
  1097. esac
  1098. ;;
  1099. esac
  1100. fi
  1101. rm -rf conftest*
  1102. ;;
  1103. *-*-sco3.2v5*)
  1104. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1105. SAVE_CFLAGS="$CFLAGS"
  1106. CFLAGS="$CFLAGS -belf"
  1107. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1108. [AC_LANG_PUSH(C)
  1109. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1110. AC_LANG_POP])
  1111. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1112. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1113. CFLAGS="$SAVE_CFLAGS"
  1114. fi
  1115. ;;
  1116. sparc*-*solaris*)
  1117. # Find out which ABI we are using.
  1118. echo 'int i;' > conftest.$ac_ext
  1119. if AC_TRY_EVAL(ac_compile); then
  1120. case `/usr/bin/file conftest.o` in
  1121. *64-bit*)
  1122. case $lt_cv_prog_gnu_ld in
  1123. yes*) LD="${LD-ld} -m elf64_sparc" ;;
  1124. *)
  1125. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1126. LD="${LD-ld} -64"
  1127. fi
  1128. ;;
  1129. esac
  1130. ;;
  1131. esac
  1132. fi
  1133. rm -rf conftest*
  1134. ;;
  1135. esac
  1136. need_locks="$enable_libtool_lock"
  1137. ])# _LT_ENABLE_LOCK
  1138. # _LT_CMD_OLD_ARCHIVE
  1139. # -------------------
  1140. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1141. [AC_CHECK_TOOL(AR, ar, false)
  1142. test -z "$AR" && AR=ar
  1143. test -z "$AR_FLAGS" && AR_FLAGS=cru
  1144. _LT_DECL([], [AR], [1], [The archiver])
  1145. _LT_DECL([], [AR_FLAGS], [1])
  1146. AC_CHECK_TOOL(STRIP, strip, :)
  1147. test -z "$STRIP" && STRIP=:
  1148. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1149. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1150. test -z "$RANLIB" && RANLIB=:
  1151. _LT_DECL([], [RANLIB], [1],
  1152. [Commands used to install an old-style archive])
  1153. # Determine commands to create old-style static archives.
  1154. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1155. old_postinstall_cmds='chmod 644 $oldlib'
  1156. old_postuninstall_cmds=
  1157. if test -n "$RANLIB"; then
  1158. case $host_os in
  1159. openbsd*)
  1160. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
  1161. ;;
  1162. *)
  1163. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
  1164. ;;
  1165. esac
  1166. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  1167. fi
  1168. case $host_os in
  1169. darwin*)
  1170. lock_old_archive_extraction=yes ;;
  1171. *)
  1172. lock_old_archive_extraction=no ;;
  1173. esac
  1174. _LT_DECL([], [old_postinstall_cmds], [2])
  1175. _LT_DECL([], [old_postuninstall_cmds], [2])
  1176. _LT_TAGDECL([], [old_archive_cmds], [2],
  1177. [Commands used to build an old-style archive])
  1178. _LT_DECL([], [lock_old_archive_extraction], [0],
  1179. [Whether to use a lock for old archive extraction])
  1180. ])# _LT_CMD_OLD_ARCHIVE
  1181. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1182. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1183. # ----------------------------------------------------------------
  1184. # Check whether the given compiler option works
  1185. AC_DEFUN([_LT_COMPILER_OPTION],
  1186. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1187. m4_require([_LT_DECL_SED])dnl
  1188. AC_CACHE_CHECK([$1], [$2],
  1189. [$2=no
  1190. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1191. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1192. lt_compiler_flag="$3"
  1193. # Insert the option either (1) after the last *FLAGS variable, or
  1194. # (2) before a word containing "conftest.", or (3) at the end.
  1195. # Note that $ac_compile itself does not contain backslashes and begins
  1196. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1197. # The option is referenced via a variable to avoid confusing sed.
  1198. lt_compile=`echo "$ac_compile" | $SED \
  1199. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1200. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1201. -e 's:$: $lt_compiler_flag:'`
  1202. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1203. (eval "$lt_compile" 2>conftest.err)
  1204. ac_status=$?
  1205. cat conftest.err >&AS_MESSAGE_LOG_FD
  1206. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1207. if (exit $ac_status) && test -s "$ac_outfile"; then
  1208. # The compiler can only warn and ignore the option if not recognized
  1209. # So say no if there are warnings other than the usual output.
  1210. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1211. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1212. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1213. $2=yes
  1214. fi
  1215. fi
  1216. $RM conftest*
  1217. ])
  1218. if test x"[$]$2" = xyes; then
  1219. m4_if([$5], , :, [$5])
  1220. else
  1221. m4_if([$6], , :, [$6])
  1222. fi
  1223. ])# _LT_COMPILER_OPTION
  1224. # Old name:
  1225. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  1226. dnl aclocal-1.4 backwards compatibility:
  1227. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  1228. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1229. # [ACTION-SUCCESS], [ACTION-FAILURE])
  1230. # ----------------------------------------------------
  1231. # Check whether the given linker option works
  1232. AC_DEFUN([_LT_LINKER_OPTION],
  1233. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1234. m4_require([_LT_DECL_SED])dnl
  1235. AC_CACHE_CHECK([$1], [$2],
  1236. [$2=no
  1237. save_LDFLAGS="$LDFLAGS"
  1238. LDFLAGS="$LDFLAGS $3"
  1239. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  1240. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1241. # The linker can only warn and ignore the option if not recognized
  1242. # So say no if there are warnings
  1243. if test -s conftest.err; then
  1244. # Append any errors to the config.log.
  1245. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1246. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  1247. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1248. if diff conftest.exp conftest.er2 >/dev/null; then
  1249. $2=yes
  1250. fi
  1251. else
  1252. $2=yes
  1253. fi
  1254. fi
  1255. $RM -r conftest*
  1256. LDFLAGS="$save_LDFLAGS"
  1257. ])
  1258. if test x"[$]$2" = xyes; then
  1259. m4_if([$4], , :, [$4])
  1260. else
  1261. m4_if([$5], , :, [$5])
  1262. fi
  1263. ])# _LT_LINKER_OPTION
  1264. # Old name:
  1265. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  1266. dnl aclocal-1.4 backwards compatibility:
  1267. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  1268. # LT_CMD_MAX_LEN
  1269. #---------------
  1270. AC_DEFUN([LT_CMD_MAX_LEN],
  1271. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1272. # find the maximum length of command line arguments
  1273. AC_MSG_CHECKING([the maximum length of command line arguments])
  1274. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1275. i=0
  1276. teststring="ABCD"
  1277. case $build_os in
  1278. msdosdjgpp*)
  1279. # On DJGPP, this test can blow up pretty badly due to problems in libc
  1280. # (any single argument exceeding 2000 bytes causes a buffer overrun
  1281. # during glob expansion). Even if it were fixed, the result of this
  1282. # check would be larger than it should be.
  1283. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  1284. ;;
  1285. gnu*)
  1286. # Under GNU Hurd, this test is not required because there is
  1287. # no limit to the length of command line arguments.
  1288. # Libtool will interpret -1 as no limit whatsoever
  1289. lt_cv_sys_max_cmd_len=-1;
  1290. ;;
  1291. cygwin* | mingw* | cegcc*)
  1292. # On Win9x/ME, this test blows up -- it succeeds, but takes
  1293. # about 5 minutes as the teststring grows exponentially.
  1294. # Worse, since 9x/ME are not pre-emptively multitasking,
  1295. # you end up with a "frozen" computer, even though with patience
  1296. # the test eventually succeeds (with a max line length of 256k).
  1297. # Instead, let's just punt: use the minimum linelength reported by
  1298. # all of the supported platforms: 8192 (on NT/2K/XP).
  1299. lt_cv_sys_max_cmd_len=8192;
  1300. ;;
  1301. mint*)
  1302. # On MiNT this can take a long time and run out of memory.
  1303. lt_cv_sys_max_cmd_len=8192;
  1304. ;;
  1305. amigaos*)
  1306. # On AmigaOS with pdksh, this test takes hours, literally.
  1307. # So we just punt and use a minimum line length of 8192.
  1308. lt_cv_sys_max_cmd_len=8192;
  1309. ;;
  1310. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  1311. # This has been around since 386BSD, at least. Likely further.
  1312. if test -x /sbin/sysctl; then
  1313. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  1314. elif test -x /usr/sbin/sysctl; then
  1315. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  1316. else
  1317. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  1318. fi
  1319. # And add a safety zone
  1320. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  1321. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  1322. ;;
  1323. interix*)
  1324. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  1325. lt_cv_sys_max_cmd_len=196608
  1326. ;;
  1327. osf*)
  1328. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  1329. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  1330. # nice to cause kernel panics so lets avoid the loop below.
  1331. # First set a reasonable default.
  1332. lt_cv_sys_max_cmd_len=16384
  1333. #
  1334. if test -x /sbin/sysconfig; then
  1335. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  1336. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  1337. esac
  1338. fi
  1339. ;;
  1340. sco3.2v5*)
  1341. lt_cv_sys_max_cmd_len=102400
  1342. ;;
  1343. sysv5* | sco5v6* | sysv4.2uw2*)
  1344. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  1345. if test -n "$kargmax"; then
  1346. lt_cv_sys_ma

Large files files are truncated, but you can click here to view the full file