/src/libev/aclocal.m4

http://github.com/jacksonh/manos · m4 · 8789 lines · 6060 code · 919 blank · 1810 comment · 0 complexity · ef5db044074ba2ec7fddae566a8c70f4 MD5 · raw file

Large files are truncated click here to view the full file

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