🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9313 lines
329 KiB

  1. AC_DEFUN([AC_CHECK_DEFINE],[dnl
  2. AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1,
  3. AC_EGREP_CPP([YES_IS_DEFINED], [
  4. #include <$2>
  5. #ifdef $1
  6. YES_IS_DEFINED
  7. #endif
  8. ], ac_cv_define_$1=yes, ac_cv_define_$1=no)
  9. )
  10. if test "$ac_cv_define_$1" = "yes" ; then
  11. AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE])
  12. fi
  13. ])dnl
  14. AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE])
  15. ##############################################################################
  16. dnl Configure Paths for Alsa
  17. dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
  18. dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
  19. dnl Jaroslav Kysela <perex@suse.cz>
  20. dnl Last modification: alsa.m4,v 1.23 2004/01/16 18:14:22 tiwai Exp
  21. dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
  22. dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
  23. dnl enables arguments --with-alsa-prefix=
  24. dnl --with-alsa-enc-prefix=
  25. dnl --disable-alsatest
  26. dnl
  27. dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
  28. dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
  29. dnl
  30. AC_DEFUN([AM_PATH_ALSA],
  31. [dnl Save the original CFLAGS, LDFLAGS, and LIBS
  32. alsa_save_CFLAGS="$CFLAGS"
  33. alsa_save_LDFLAGS="$LDFLAGS"
  34. alsa_save_LIBS="$LIBS"
  35. alsa_found=yes
  36. dnl
  37. dnl Get the cflags and libraries for alsa
  38. dnl
  39. AC_ARG_WITH(alsa-prefix,
  40. [ --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)],
  41. [alsa_prefix="$withval"], [alsa_prefix=""])
  42. AC_ARG_WITH(alsa-inc-prefix,
  43. [ --with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)],
  44. [alsa_inc_prefix="$withval"], [alsa_inc_prefix=""])
  45. dnl FIXME: this is not yet implemented
  46. AC_ARG_ENABLE(alsatest,
  47. [ --disable-alsatest Do not try to compile and run a test Alsa program],
  48. [enable_alsatest="$enableval"],
  49. [enable_alsatest=yes])
  50. dnl Add any special include directories
  51. AC_MSG_CHECKING(for ALSA CFLAGS)
  52. if test "$alsa_inc_prefix" != "" ; then
  53. ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix"
  54. CFLAGS="$CFLAGS -I$alsa_inc_prefix"
  55. fi
  56. AC_MSG_RESULT($ALSA_CFLAGS)
  57. dnl add any special lib dirs
  58. AC_MSG_CHECKING(for ALSA LDFLAGS)
  59. if test "$alsa_prefix" != "" ; then
  60. ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix"
  61. LDFLAGS="$LDFLAGS $ALSA_LIBS"
  62. fi
  63. dnl add the alsa library
  64. ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
  65. LIBS=`echo $LIBS | sed 's/-lm//'`
  66. LIBS=`echo $LIBS | sed 's/-ldl//'`
  67. LIBS=`echo $LIBS | sed 's/-lpthread//'`
  68. LIBS=`echo $LIBS | sed 's/ //'`
  69. LIBS="$ALSA_LIBS $LIBS"
  70. AC_MSG_RESULT($ALSA_LIBS)
  71. dnl Check for a working version of libasound that is of the right version.
  72. min_alsa_version=ifelse([$1], ,0.1.1,$1)
  73. AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version)
  74. no_alsa=""
  75. alsa_min_major_version=`echo $min_alsa_version | \
  76. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
  77. alsa_min_minor_version=`echo $min_alsa_version | \
  78. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
  79. alsa_min_micro_version=`echo $min_alsa_version | \
  80. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
  81. AC_LANG_SAVE
  82. AC_LANG_C
  83. AC_TRY_COMPILE([
  84. #include <alsa/asoundlib.h>
  85. ], [
  86. /* ensure backward compatibility */
  87. #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
  88. #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
  89. #endif
  90. #if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
  91. #define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
  92. #endif
  93. #if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
  94. #define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
  95. #endif
  96. # if(SND_LIB_MAJOR > $alsa_min_major_version)
  97. exit(0);
  98. # else
  99. # if(SND_LIB_MAJOR < $alsa_min_major_version)
  100. # error not present
  101. # endif
  102. # if(SND_LIB_MINOR > $alsa_min_minor_version)
  103. exit(0);
  104. # else
  105. # if(SND_LIB_MINOR < $alsa_min_minor_version)
  106. # error not present
  107. # endif
  108. # if(SND_LIB_SUBMINOR < $alsa_min_micro_version)
  109. # error not present
  110. # endif
  111. # endif
  112. # endif
  113. exit(0);
  114. ],
  115. [AC_MSG_RESULT(found.)],
  116. [AC_MSG_RESULT(not present.)
  117. ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)])
  118. alsa_found=no]
  119. )
  120. AC_LANG_RESTORE
  121. dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
  122. if test "x$enable_alsatest" = "xyes"; then
  123. AC_CHECK_LIB([asound], [snd_ctl_open],,
  124. [ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)])
  125. alsa_found=no]
  126. )
  127. fi
  128. if test "x$alsa_found" = "xyes" ; then
  129. ifelse([$2], , :, [$2])
  130. LIBS=`echo $LIBS | sed 's/-lasound//g'`
  131. LIBS=`echo $LIBS | sed 's/ //'`
  132. LIBS="-lasound $LIBS"
  133. fi
  134. if test "x$alsa_found" = "xno" ; then
  135. ifelse([$3], , :, [$3])
  136. CFLAGS="$alsa_save_CFLAGS"
  137. LDFLAGS="$alsa_save_LDFLAGS"
  138. LIBS="$alsa_save_LIBS"
  139. ALSA_CFLAGS=""
  140. ALSA_LIBS=""
  141. fi
  142. dnl That should be it. Now just export out symbols:
  143. AC_SUBST(ALSA_CFLAGS)
  144. AC_SUBST(ALSA_LIBS)
  145. ])
  146. # ===========================================================================
  147. # http://www.gnu.org/software/autoconf-archive/ax_check_compiler_flags.html
  148. # ===========================================================================
  149. #
  150. # SYNOPSIS
  151. #
  152. # AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
  153. #
  154. # DESCRIPTION
  155. #
  156. # Check whether the given compiler FLAGS work with the current language's
  157. # compiler, or whether they give an error. (Warnings, however, are
  158. # ignored.)
  159. #
  160. # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
  161. # success/failure.
  162. #
  163. # LICENSE
  164. #
  165. # Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
  166. # Copyright (c) 2009 Matteo Frigo
  167. #
  168. # This program is free software: you can redistribute it and/or modify it
  169. # under the terms of the GNU General Public License as published by the
  170. # Free Software Foundation, either version 3 of the License, or (at your
  171. # option) any later version.
  172. #
  173. # This program is distributed in the hope that it will be useful, but
  174. # WITHOUT ANY WARRANTY; without even the implied warranty of
  175. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  176. # Public License for more details.
  177. #
  178. # You should have received a copy of the GNU General Public License along
  179. # with this program. If not, see <http://www.gnu.org/licenses/>.
  180. #
  181. # As a special exception, the respective Autoconf Macro's copyright owner
  182. # gives unlimited permission to copy, distribute and modify the configure
  183. # scripts that are the output of Autoconf when processing the Macro. You
  184. # need not follow the terms of the GNU General Public License when using
  185. # or distributing such scripts, even though portions of the text of the
  186. # Macro appear in them. The GNU General Public License (GPL) does govern
  187. # all other use of the material that constitutes the Autoconf Macro.
  188. #
  189. # This special exception to the GPL applies to versions of the Autoconf
  190. # Macro released by the Autoconf Archive. When you make and distribute a
  191. # modified version of the Autoconf Macro, you may extend this special
  192. # exception to the GPL to apply to your modified version as well.
  193. #serial 9
  194. AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
  195. [AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
  196. AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
  197. dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
  198. AS_LITERAL_IF([$1],
  199. [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]), [
  200. ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
  201. _AC_LANG_PREFIX[]FLAGS="$1"
  202. AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
  203. AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
  204. AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
  205. _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
  206. [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
  207. _AC_LANG_PREFIX[]FLAGS="$1"
  208. AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
  209. eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
  210. eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
  211. _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
  212. eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])
  213. AC_MSG_RESULT($ax_check_compiler_flags)
  214. if test "x$ax_check_compiler_flags" = xyes; then
  215. m4_default([$2], :)
  216. else
  217. m4_default([$3], :)
  218. fi
  219. ])dnl AX_CHECK_COMPILER_FLAGS
  220. # ===========================================================================
  221. # http://www.gnu.org/software/autoconf-archive/ax_gcc_archflag.html
  222. # ===========================================================================
  223. #
  224. # SYNOPSIS
  225. #
  226. # AX_GCC_ARCHFLAG([PORTABLE?], [ACTION-SUCCESS], [ACTION-FAILURE])
  227. #
  228. # DESCRIPTION
  229. #
  230. # This macro tries to guess the "native" arch corresponding to the target
  231. # architecture for use with gcc's -march=arch or -mtune=arch flags. If
  232. # found, the cache variable $ax_cv_gcc_archflag is set to this flag and
  233. # ACTION-SUCCESS is executed; otherwise $ax_cv_gcc_archflag is is set to
  234. # "unknown" and ACTION-FAILURE is executed. The default ACTION-SUCCESS is
  235. # to add $ax_cv_gcc_archflag to the end of $CFLAGS.
  236. #
  237. # PORTABLE? should be either [yes] (default) or [no]. In the former case,
  238. # the flag is set to -mtune (or equivalent) so that the architecture is
  239. # only used for tuning, but the instruction set used is still portable. In
  240. # the latter case, the flag is set to -march (or equivalent) so that
  241. # architecture-specific instructions are enabled.
  242. #
  243. # The user can specify --with-gcc-arch=<arch> in order to override the
  244. # macro's choice of architecture, or --without-gcc-arch to disable this.
  245. #
  246. # When cross-compiling, or if $CC is not gcc, then ACTION-FAILURE is
  247. # called unless the user specified --with-gcc-arch manually.
  248. #
  249. # Requires macros: AX_CHECK_COMPILER_FLAGS, AX_GCC_X86_CPUID
  250. #
  251. # (The main emphasis here is on recent CPUs, on the principle that doing
  252. # high-performance computing on old hardware is uncommon.)
  253. #
  254. # LICENSE
  255. #
  256. # Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
  257. # Copyright (c) 2008 Matteo Frigo
  258. #
  259. # This program is free software: you can redistribute it and/or modify it
  260. # under the terms of the GNU General Public License as published by the
  261. # Free Software Foundation, either version 3 of the License, or (at your
  262. # option) any later version.
  263. #
  264. # This program is distributed in the hope that it will be useful, but
  265. # WITHOUT ANY WARRANTY; without even the implied warranty of
  266. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  267. # Public License for more details.
  268. #
  269. # You should have received a copy of the GNU General Public License along
  270. # with this program. If not, see <http://www.gnu.org/licenses/>.
  271. #
  272. # As a special exception, the respective Autoconf Macro's copyright owner
  273. # gives unlimited permission to copy, distribute and modify the configure
  274. # scripts that are the output of Autoconf when processing the Macro. You
  275. # need not follow the terms of the GNU General Public License when using
  276. # or distributing such scripts, even though portions of the text of the
  277. # Macro appear in them. The GNU General Public License (GPL) does govern
  278. # all other use of the material that constitutes the Autoconf Macro.
  279. #
  280. # This special exception to the GPL applies to versions of the Autoconf
  281. # Macro released by the Autoconf Archive. When you make and distribute a
  282. # modified version of the Autoconf Macro, you may extend this special
  283. # exception to the GPL to apply to your modified version as well.
  284. #serial 8
  285. AC_DEFUN([AX_GCC_ARCHFLAG],
  286. [AC_REQUIRE([AC_PROG_CC])
  287. AC_REQUIRE([AC_CANONICAL_HOST])
  288. AC_ARG_WITH(gcc-arch, [AS_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])],
  289. ax_gcc_arch=$withval, ax_gcc_arch=yes)
  290. AC_MSG_CHECKING([for gcc architecture flag])
  291. AC_MSG_RESULT([])
  292. AC_CACHE_VAL(ax_cv_gcc_archflag,
  293. [
  294. ax_cv_gcc_archflag="unknown"
  295. if test "$GCC" = yes; then
  296. if test "x$ax_gcc_arch" = xyes; then
  297. ax_gcc_arch=""
  298. if test "$cross_compiling" = no; then
  299. case $host_cpu in
  300. i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
  301. AX_GCC_X86_CPUID(0)
  302. AX_GCC_X86_CPUID(1)
  303. case $ax_cv_gcc_x86_cpuid_0 in
  304. *:756e6547:*:*) # Intel
  305. case $ax_cv_gcc_x86_cpuid_1 in
  306. *5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
  307. *5??:*:*:*) ax_gcc_arch=pentium ;;
  308. *6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
  309. *6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
  310. *6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
  311. *6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
  312. *6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
  313. *6??:*:*:*) ax_gcc_arch=pentiumpro ;;
  314. *f3[[347]]:*:*:*|*f4[1347]:*:*:*)
  315. case $host_cpu in
  316. x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
  317. *) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
  318. esac ;;
  319. *f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
  320. esac ;;
  321. *:68747541:*:*) # AMD
  322. case $ax_cv_gcc_x86_cpuid_1 in
  323. *5[[67]]?:*:*:*) ax_gcc_arch=k6 ;;
  324. *5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
  325. *5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
  326. *60?:*:*:*) ax_gcc_arch=k7 ;;
  327. *6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;;
  328. *6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
  329. *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
  330. *6[[68a]]?:*:*:*)
  331. AX_GCC_X86_CPUID(0x80000006) # L2 cache size
  332. case $ax_cv_gcc_x86_cpuid_0x80000006 in
  333. *:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256
  334. ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
  335. *) ax_gcc_arch="athlon-4 athlon k7" ;;
  336. esac ;;
  337. *f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
  338. *f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
  339. *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
  340. *f??:*:*:*) ax_gcc_arch="k8" ;;
  341. esac ;;
  342. *:746e6543:*:*) # IDT
  343. case $ax_cv_gcc_x86_cpuid_1 in
  344. *54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
  345. *58?:*:*:*) ax_gcc_arch=winchip2 ;;
  346. *6[[78]]?:*:*:*) ax_gcc_arch=c3 ;;
  347. *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
  348. esac ;;
  349. esac
  350. if test x"$ax_gcc_arch" = x; then # fallback
  351. case $host_cpu in
  352. i586*) ax_gcc_arch=pentium ;;
  353. i686*) ax_gcc_arch=pentiumpro ;;
  354. esac
  355. fi
  356. ;;
  357. sparc*)
  358. AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
  359. cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
  360. cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
  361. case $cputype in
  362. *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
  363. *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
  364. *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
  365. *supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;;
  366. *hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;;
  367. *cypress*) ax_gcc_arch=cypress ;;
  368. esac ;;
  369. alphaev5) ax_gcc_arch=ev5 ;;
  370. alphaev56) ax_gcc_arch=ev56 ;;
  371. alphapca56) ax_gcc_arch="pca56 ev56" ;;
  372. alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
  373. alphaev6) ax_gcc_arch=ev6 ;;
  374. alphaev67) ax_gcc_arch=ev67 ;;
  375. alphaev68) ax_gcc_arch="ev68 ev67" ;;
  376. alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
  377. alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
  378. alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
  379. powerpc*)
  380. cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
  381. cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
  382. case $cputype in
  383. *750*) ax_gcc_arch="750 G3" ;;
  384. *740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;;
  385. *74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;;
  386. *74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;;
  387. *970*) ax_gcc_arch="970 G5 power4";;
  388. *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
  389. *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
  390. 603ev|8240) ax_gcc_arch="$cputype 603e 603";;
  391. *) ax_gcc_arch=$cputype ;;
  392. esac
  393. ax_gcc_arch="$ax_gcc_arch powerpc"
  394. ;;
  395. esac
  396. fi # not cross-compiling
  397. fi # guess arch
  398. if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
  399. for arch in $ax_gcc_arch; do
  400. if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code
  401. flags="-mtune=$arch"
  402. # -mcpu=$arch and m$arch generate nonportable code on every arch except
  403. # x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr.
  404. case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
  405. else
  406. flags="-march=$arch -mcpu=$arch -m$arch"
  407. fi
  408. for flag in $flags; do
  409. AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break])
  410. done
  411. test "x$ax_cv_gcc_archflag" = xunknown || break
  412. done
  413. fi
  414. fi # $GCC=yes
  415. ])
  416. AC_MSG_CHECKING([for gcc architecture flag])
  417. AC_MSG_RESULT($ax_cv_gcc_archflag)
  418. if test "x$ax_cv_gcc_archflag" = xunknown; then
  419. m4_default([$3],:)
  420. else
  421. m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"])
  422. fi
  423. ])
  424. # ===========================================================================
  425. # http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_cpuid.html
  426. # ===========================================================================
  427. #
  428. # SYNOPSIS
  429. #
  430. # AX_GCC_X86_CPUID(OP)
  431. #
  432. # DESCRIPTION
  433. #
  434. # On Pentium and later x86 processors, with gcc or a compiler that has a
  435. # compatible syntax for inline assembly instructions, run a small program
  436. # that executes the cpuid instruction with input OP. This can be used to
  437. # detect the CPU type.
  438. #
  439. # On output, the values of the eax, ebx, ecx, and edx registers are stored
  440. # as hexadecimal strings as "eax:ebx:ecx:edx" in the cache variable
  441. # ax_cv_gcc_x86_cpuid_OP.
  442. #
  443. # If the cpuid instruction fails (because you are running a
  444. # cross-compiler, or because you are not using gcc, or because you are on
  445. # a processor that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP
  446. # is set to the string "unknown".
  447. #
  448. # This macro mainly exists to be used in AX_GCC_ARCHFLAG.
  449. #
  450. # LICENSE
  451. #
  452. # Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
  453. # Copyright (c) 2008 Matteo Frigo
  454. #
  455. # This program is free software: you can redistribute it and/or modify it
  456. # under the terms of the GNU General Public License as published by the
  457. # Free Software Foundation, either version 3 of the License, or (at your
  458. # option) any later version.
  459. #
  460. # This program is distributed in the hope that it will be useful, but
  461. # WITHOUT ANY WARRANTY; without even the implied warranty of
  462. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
  463. # Public License for more details.
  464. #
  465. # You should have received a copy of the GNU General Public License along
  466. # with this program. If not, see <http://www.gnu.org/licenses/>.
  467. #
  468. # As a special exception, the respective Autoconf Macro's copyright owner
  469. # gives unlimited permission to copy, distribute and modify the configure
  470. # scripts that are the output of Autoconf when processing the Macro. You
  471. # need not follow the terms of the GNU General Public License when using
  472. # or distributing such scripts, even though portions of the text of the
  473. # Macro appear in them. The GNU General Public License (GPL) does govern
  474. # all other use of the material that constitutes the Autoconf Macro.
  475. #
  476. # This special exception to the GPL applies to versions of the Autoconf
  477. # Macro released by the Autoconf Archive. When you make and distribute a
  478. # modified version of the Autoconf Macro, you may extend this special
  479. # exception to the GPL to apply to your modified version as well.
  480. #serial 7
  481. AC_DEFUN([AX_GCC_X86_CPUID],
  482. [AC_REQUIRE([AC_PROG_CC])
  483. AC_LANG_PUSH([C])
  484. AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
  485. [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
  486. int op = $1, eax, ebx, ecx, edx;
  487. FILE *f;
  488. __asm__("cpuid"
  489. : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
  490. : "a" (op));
  491. f = fopen("conftest_cpuid", "w"); if (!f) return 1;
  492. fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
  493. fclose(f);
  494. return 0;
  495. ])],
  496. [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
  497. [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
  498. [ax_cv_gcc_x86_cpuid_$1=unknown])])
  499. AC_LANG_POP([C])
  500. ])
  501. ##############################################################################
  502. #
  503. # --- esd.m4 ---
  504. #
  505. # Configure paths for ESD
  506. # Manish Singh 98-9-30
  507. # stolen back from Frank Belew
  508. # stolen from Manish Singh
  509. # Shamelessly stolen from Owen Taylor
  510. dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
  511. dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
  512. dnl
  513. AC_DEFUN([AM_PATH_ESD],
  514. [dnl
  515. dnl Get the cflags and libraries from the esd-config script
  516. dnl
  517. AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
  518. esd_prefix="$withval", esd_prefix="")
  519. AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
  520. esd_exec_prefix="$withval", esd_exec_prefix="")
  521. AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
  522. , enable_esdtest=yes)
  523. if test x$esd_exec_prefix != x ; then
  524. esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
  525. if test x${ESD_CONFIG+set} != xset ; then
  526. ESD_CONFIG=$esd_exec_prefix/bin/esd-config
  527. fi
  528. fi
  529. if test x$esd_prefix != x ; then
  530. esd_args="$esd_args --prefix=$esd_prefix"
  531. if test x${ESD_CONFIG+set} != xset ; then
  532. ESD_CONFIG=$esd_prefix/bin/esd-config
  533. fi
  534. fi
  535. AC_PATH_PROG(ESD_CONFIG, esd-config, no)
  536. min_esd_version=ifelse([$1], ,0.2.7,$1)
  537. AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
  538. no_esd=""
  539. if test "$ESD_CONFIG" = "no" ; then
  540. no_esd=yes
  541. else
  542. ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
  543. ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
  544. esd_major_version=`$ESD_CONFIG $esd_args --version | \
  545. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
  546. esd_minor_version=`$ESD_CONFIG $esd_args --version | \
  547. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
  548. esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
  549. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
  550. if test "x$enable_esdtest" = "xyes" ; then
  551. ac_save_CFLAGS="$CFLAGS"
  552. ac_save_LIBS="$LIBS"
  553. CFLAGS="$CFLAGS $ESD_CFLAGS"
  554. LIBS="$LIBS $ESD_LIBS"
  555. dnl
  556. dnl Now check if the installed ESD is sufficiently new. (Also sanity
  557. dnl checks the results of esd-config to some extent
  558. dnl
  559. rm -f conf.esdtest
  560. AC_TRY_RUN([
  561. #include <stdio.h>
  562. #include <stdlib.h>
  563. #include <string.h>
  564. #include <esd.h>
  565. char*
  566. my_strdup (char *str)
  567. {
  568. char *new_str;
  569. if (str)
  570. {
  571. new_str = malloc ((strlen (str) + 1) * sizeof(char));
  572. strcpy (new_str, str);
  573. }
  574. else
  575. new_str = NULL;
  576. return new_str;
  577. }
  578. int main ()
  579. {
  580. int major, minor, micro;
  581. char *tmp_version;
  582. system ("touch conf.esdtest");
  583. /* HP/UX 9 (%@#!) writes to sscanf strings */
  584. tmp_version = my_strdup("$min_esd_version");
  585. if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
  586. printf("%s, bad version string\n", "$min_esd_version");
  587. exit(1);
  588. }
  589. if (($esd_major_version > major) ||
  590. (($esd_major_version == major) && ($esd_minor_version > minor)) ||
  591. (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
  592. {
  593. return 0;
  594. }
  595. else
  596. {
  597. printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
  598. printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
  599. printf("*** best to upgrade to the required version.\n");
  600. printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
  601. printf("*** to point to the correct copy of esd-config, and remove the file\n");
  602. printf("*** config.cache before re-running configure\n");
  603. return 1;
  604. }
  605. }
  606. ],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
  607. CFLAGS="$ac_save_CFLAGS"
  608. LIBS="$ac_save_LIBS"
  609. fi
  610. fi
  611. if test "x$no_esd" = x ; then
  612. AC_MSG_RESULT(yes)
  613. ifelse([$2], , :, [$2])
  614. else
  615. AC_MSG_RESULT(no)
  616. if test "$ESD_CONFIG" = "no" ; then
  617. echo "*** The esd-config script installed by ESD could not be found"
  618. echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
  619. echo "*** your path, or set the ESD_CONFIG environment variable to the"
  620. echo "*** full path to esd-config."
  621. else
  622. if test -f conf.esdtest ; then
  623. :
  624. else
  625. echo "*** Could not run ESD test program, checking why..."
  626. CFLAGS="$CFLAGS $ESD_CFLAGS"
  627. LIBS="$LIBS $ESD_LIBS"
  628. AC_TRY_LINK([
  629. #include <stdio.h>
  630. #include <esd.h>
  631. ], [ return 0; ],
  632. [ echo "*** The test program compiled, but did not run. This usually means"
  633. echo "*** that the run-time linker is not finding ESD or finding the wrong"
  634. echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
  635. echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  636. echo "*** to the installed location Also, make sure you have run ldconfig if that"
  637. echo "*** is required on your system"
  638. echo "***"
  639. echo "*** If you have an old version installed, it is best to remove it, although"
  640. echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
  641. [ echo "*** The test program failed to compile or link. See the file config.log for the"
  642. echo "*** exact error that occured. This usually means ESD was incorrectly installed"
  643. echo "*** or that you have moved ESD since it was installed. In the latter case, you"
  644. echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
  645. CFLAGS="$ac_save_CFLAGS"
  646. LIBS="$ac_save_LIBS"
  647. fi
  648. fi
  649. ESD_CFLAGS=""
  650. ESD_LIBS=""
  651. ifelse([$3], , :, [$3])
  652. fi
  653. AC_SUBST(ESD_CFLAGS)
  654. AC_SUBST(ESD_LIBS)
  655. rm -f conf.esdtest
  656. ])
  657. ##############################################################################
  658. # Based on libtool-2.4.2
  659. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  660. #
  661. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  662. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  663. # Foundation, Inc.
  664. # Written by Gordon Matzigkeit, 1996
  665. #
  666. # This file is free software; the Free Software Foundation gives
  667. # unlimited permission to copy and/or distribute it, with or without
  668. # modifications, as long as this notice is preserved.
  669. m4_define([_LT_COPYING], [dnl
  670. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  671. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  672. # Foundation, Inc.
  673. # Written by Gordon Matzigkeit, 1996
  674. #
  675. # This file is part of GNU Libtool.
  676. #
  677. # GNU Libtool is free software; you can redistribute it and/or
  678. # modify it under the terms of the GNU General Public License as
  679. # published by the Free Software Foundation; either version 2 of
  680. # the License, or (at your option) any later version.
  681. #
  682. # As a special exception to the GNU General Public License,
  683. # if you distribute this file as part of a program or library that
  684. # is built using GNU Libtool, you may include this file under the
  685. # same distribution terms that you use for the rest of that program.
  686. #
  687. # GNU Libtool is distributed in the hope that it will be useful,
  688. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  689. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  690. # GNU General Public License for more details.
  691. #
  692. # You should have received a copy of the GNU General Public License
  693. # along with GNU Libtool; see the file COPYING. If not, a copy
  694. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  695. # obtained by writing to the Free Software Foundation, Inc.,
  696. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  697. ])
  698. # serial 57 LT_INIT
  699. # LT_PREREQ(VERSION)
  700. # ------------------
  701. # Complain and exit if this libtool version is less that VERSION.
  702. m4_defun([LT_PREREQ],
  703. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  704. [m4_default([$3],
  705. [m4_fatal([Libtool version $1 or higher is required],
  706. 63)])],
  707. [$2])])
  708. # _LT_CHECK_BUILDDIR
  709. # ------------------
  710. # Complain if the absolute build directory name contains unusual characters
  711. m4_defun([_LT_CHECK_BUILDDIR],
  712. [case `pwd` in
  713. *\ * | *\ *)
  714. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  715. esac
  716. ])
  717. # LT_INIT([OPTIONS])
  718. # ------------------
  719. AC_DEFUN([LT_INIT],
  720. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  721. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  722. AC_BEFORE([$0], [LT_LANG])dnl
  723. AC_BEFORE([$0], [LT_OUTPUT])dnl
  724. AC_BEFORE([$0], [LTDL_INIT])dnl
  725. m4_require([_LT_CHECK_BUILDDIR])dnl
  726. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  727. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  728. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  729. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  730. dnl unless we require an AC_DEFUNed macro:
  731. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  732. AC_REQUIRE([LTSUGAR_VERSION])dnl
  733. AC_REQUIRE([LTVERSION_VERSION])dnl
  734. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  735. m4_require([_LT_PROG_LTMAIN])dnl
  736. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  737. dnl Parse OPTIONS
  738. _LT_SET_OPTIONS([$0], [$1])
  739. # This can be used to rebuild libtool when needed
  740. LIBTOOL_DEPS="$ltmain"
  741. # Always use our own libtool.
  742. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  743. AC_SUBST(LIBTOOL)dnl
  744. _LT_SETUP
  745. # Only expand once:
  746. m4_define([LT_INIT])
  747. ])# LT_INIT
  748. # Old names:
  749. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  750. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  751. dnl aclocal-1.4 backwards compatibility:
  752. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  753. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  754. # _LT_CC_BASENAME(CC)
  755. # -------------------
  756. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  757. m4_defun([_LT_CC_BASENAME],
  758. [for cc_temp in $1""; do
  759. case $cc_temp in
  760. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  761. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  762. \-*) ;;
  763. *) break;;
  764. esac
  765. done
  766. cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  767. ])
  768. # _LT_FILEUTILS_DEFAULTS
  769. # ----------------------
  770. # It is okay to use these file commands and assume they have been set
  771. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  772. m4_defun([_LT_FILEUTILS_DEFAULTS],
  773. [: ${CP="cp -f"}
  774. : ${MV="mv -f"}
  775. : ${RM="rm -f"}
  776. ])# _LT_FILEUTILS_DEFAULTS
  777. # _LT_SETUP
  778. # ---------
  779. m4_defun([_LT_SETUP],
  780. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  781. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  782. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  783. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  784. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  785. dnl
  786. _LT_DECL([], [host_alias], [0], [The host system])dnl
  787. _LT_DECL([], [host], [0])dnl
  788. _LT_DECL([], [host_os], [0])dnl
  789. dnl
  790. _LT_DECL([], [build_alias], [0], [The build system])dnl
  791. _LT_DECL([], [build], [0])dnl
  792. _LT_DECL([], [build_os], [0])dnl
  793. dnl
  794. AC_REQUIRE([AC_PROG_CC])dnl
  795. AC_REQUIRE([LT_PATH_LD])dnl
  796. AC_REQUIRE([LT_PATH_NM])dnl
  797. dnl
  798. AC_REQUIRE([AC_PROG_LN_S])dnl
  799. test -z "$LN_S" && LN_S="ln -s"
  800. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  801. dnl
  802. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  803. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  804. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  805. dnl
  806. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  807. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  808. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  809. m4_require([_LT_CMD_RELOAD])dnl
  810. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  811. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  812. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  813. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  814. m4_require([_LT_WITH_SYSROOT])dnl
  815. _LT_CONFIG_LIBTOOL_INIT([
  816. # See if we are running on zsh, and set the options which allow our
  817. # commands through without removal of \ escapes INIT.
  818. if test -n "\${ZSH_VERSION+set}" ; then
  819. setopt NO_GLOB_SUBST
  820. fi
  821. ])
  822. if test -n "${ZSH_VERSION+set}" ; then
  823. setopt NO_GLOB_SUBST
  824. fi
  825. _LT_CHECK_OBJDIR
  826. m4_require([_LT_TAG_COMPILER])dnl
  827. case $host_os in
  828. aix3*)
  829. # AIX sometimes has problems with the GCC collect2 program. For some
  830. # reason, if we set the COLLECT_NAMES environment variable, the problems
  831. # vanish in a puff of smoke.
  832. if test "X${COLLECT_NAMES+set}" != Xset; then
  833. COLLECT_NAMES=
  834. export COLLECT_NAMES
  835. fi
  836. ;;
  837. esac
  838. # Global variables:
  839. ofile=libtool
  840. can_build_shared=yes
  841. # All known linkers require a `.a' archive for static linking (except MSVC,
  842. # which needs '.lib').
  843. libext=a
  844. with_gnu_ld="$lt_cv_prog_gnu_ld"
  845. old_CC="$CC"
  846. old_CFLAGS="$CFLAGS"
  847. # Set sane defaults for various variables
  848. test -z "$CC" && CC=cc
  849. test -z "$LTCC" && LTCC=$CC
  850. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  851. test -z "$LD" && LD=ld
  852. test -z "$ac_objext" && ac_objext=o
  853. _LT_CC_BASENAME([$compiler])
  854. # Only perform the check for file, if the check method requires it
  855. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  856. case $deplibs_check_method in
  857. file_magic*)
  858. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  859. _LT_PATH_MAGIC
  860. fi
  861. ;;
  862. esac
  863. # Use C for the default configuration in the libtool script
  864. LT_SUPPORTED_TAG([CC])
  865. _LT_LANG_C_CONFIG
  866. _LT_LANG_DEFAULT_CONFIG
  867. _LT_CONFIG_COMMANDS
  868. ])# _LT_SETUP
  869. # _LT_PREPARE_SED_QUOTE_VARS
  870. # --------------------------
  871. # Define a few sed substitution that help us do robust quoting.
  872. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  873. [# Backslashify metacharacters that are still active within
  874. # double-quoted strings.
  875. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  876. # Same as above, but do not quote variable references.
  877. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  878. # Sed substitution to delay expansion of an escaped shell variable in a
  879. # double_quote_subst'ed string.
  880. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  881. # Sed substitution to delay expansion of an escaped single quote.
  882. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  883. # Sed substitution to avoid accidental globbing in evaled expressions
  884. no_glob_subst='s/\*/\\\*/g'
  885. ])
  886. # _LT_PROG_LTMAIN
  887. # ---------------
  888. # Note that this code is called both from `configure', and `config.status'
  889. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  890. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  891. # so we pass a copy along to make sure it has a sensible value anyway.
  892. m4_defun([_LT_PROG_LTMAIN],
  893. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  894. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  895. ltmain="$ac_aux_dir/ltmain.sh"
  896. ])# _LT_PROG_LTMAIN
  897. ## ------------------------------------- ##
  898. ## Accumulate code for creating libtool. ##
  899. ## ------------------------------------- ##
  900. # So that we can recreate a full libtool script including additional
  901. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  902. # in macros and then make a single call at the end using the `libtool'
  903. # label.
  904. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  905. # ----------------------------------------
  906. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  907. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  908. [m4_ifval([$1],
  909. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  910. [$1
  911. ])])])
  912. # Initialize.
  913. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  914. # _LT_CONFIG_LIBTOOL([COMMANDS])
  915. # ------------------------------
  916. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  917. m4_define([_LT_CONFIG_LIBTOOL],
  918. [m4_ifval([$1],
  919. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  920. [$1
  921. ])])])
  922. # Initialize.
  923. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  924. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  925. # -----------------------------------------------------
  926. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  927. [_LT_CONFIG_LIBTOOL([$1])
  928. _LT_CONFIG_LIBTOOL_INIT([$2])
  929. ])
  930. # _LT_FORMAT_COMMENT([COMMENT])
  931. # -----------------------------
  932. # Add leading comment marks to the start of each line, and a trailing
  933. # full-stop to the whole comment if one is not present already.
  934. m4_define([_LT_FORMAT_COMMENT],
  935. [m4_ifval([$1], [
  936. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  937. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  938. )])
  939. ## ------------------------ ##
  940. ## FIXME: Eliminate VARNAME ##
  941. ## ------------------------ ##
  942. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  943. # -------------------------------------------------------------------
  944. # CONFIGNAME is the name given to the value in the libtool script.
  945. # VARNAME is the (base) name used in the configure script.
  946. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  947. # VARNAME. Any other value will be used directly.
  948. m4_define([_LT_DECL],
  949. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  950. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  951. [m4_ifval([$1], [$1], [$2])])
  952. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  953. m4_ifval([$4],
  954. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  955. lt_dict_add_subkey([lt_decl_dict], [$2],
  956. [tagged?], [m4_ifval([$5], [yes], [no])])])
  957. ])
  958. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  959. # --------------------------------------------------------
  960. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  961. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  962. # ------------------------------------------------
  963. m4_define([lt_decl_tag_varnames],
  964. [_lt_decl_filter([tagged?], [yes], $@)])
  965. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  966. # ---------------------------------------------------------
  967. m4_define([_lt_decl_filter],
  968. [m4_case([$#],
  969. [0], [m4_fatal([$0: too few arguments: $#])],
  970. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  971. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  972. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  973. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  974. ])
  975. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  976. # --------------------------------------------------
  977. m4_define([lt_decl_quote_varnames],
  978. [_lt_decl_filter([value], [1], $@)])
  979. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  980. # ---------------------------------------------------
  981. m4_define([lt_decl_dquote_varnames],
  982. [_lt_decl_filter([value], [2], $@)])
  983. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  984. # ---------------------------------------------------
  985. m4_define([lt_decl_varnames_tagged],
  986. [m4_assert([$# <= 2])dnl
  987. _$0(m4_quote(m4_default([$1], [[, ]])),
  988. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  989. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  990. m4_define([_lt_decl_varnames_tagged],
  991. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  992. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  993. # ------------------------------------------------
  994. m4_define([lt_decl_all_varnames],
  995. [_$0(m4_quote(m4_default([$1], [[, ]])),
  996. m4_if([$2], [],
  997. m4_quote(lt_decl_varnames),
  998. m4_quote(m4_shift($@))))[]dnl
  999. ])
  1000. m4_define([_lt_decl_all_varnames],
  1001. [lt_join($@, lt_decl_varnames_tagged([$1],
  1002. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  1003. ])
  1004. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  1005. # ------------------------------------
  1006. # Quote a variable value, and forward it to `config.status' so that its
  1007. # declaration there will have the same value as in `configure'. VARNAME
  1008. # must have a single quote delimited value for this to work.
  1009. m4_define([_LT_CONFIG_STATUS_DECLARE],
  1010. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  1011. # _LT_CONFIG_STATUS_DECLARATIONS
  1012. # ------------------------------
  1013. # We delimit libtool config variables with single quotes, so when
  1014. # we write them to config.status, we have to be sure to quote all
  1015. # embedded single quotes properly. In configure, this macro expands
  1016. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  1017. #
  1018. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  1019. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  1020. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  1021. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  1022. # _LT_LIBTOOL_TAGS
  1023. # ----------------
  1024. # Output comment and list of tags supported by the script
  1025. m4_defun([_LT_LIBTOOL_TAGS],
  1026. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  1027. available_tags="_LT_TAGS"dnl
  1028. ])
  1029. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  1030. # -----------------------------------
  1031. # Extract the dictionary values for VARNAME (optionally with TAG) and
  1032. # expand to a commented shell variable setting:
  1033. #
  1034. # # Some comment about what VAR is for.
  1035. # visible_name=$lt_internal_name
  1036. m4_define([_LT_LIBTOOL_DECLARE],
  1037. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  1038. [description])))[]dnl
  1039. m4_pushdef([_libtool_name],
  1040. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  1041. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  1042. [0], [_libtool_name=[$]$1],
  1043. [1], [_libtool_name=$lt_[]$1],
  1044. [2], [_libtool_name=$lt_[]$1],
  1045. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  1046. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  1047. ])
  1048. # _LT_LIBTOOL_CONFIG_VARS
  1049. # -----------------------
  1050. # Produce commented declarations of non-tagged libtool config variables
  1051. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  1052. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  1053. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  1054. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  1055. [m4_foreach([_lt_var],
  1056. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  1057. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  1058. # _LT_LIBTOOL_TAG_VARS(TAG)
  1059. # -------------------------
  1060. m4_define([_LT_LIBTOOL_TAG_VARS],
  1061. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  1062. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  1063. # _LT_TAGVAR(VARNAME, [TAGNAME])
  1064. # ------------------------------
  1065. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  1066. # _LT_CONFIG_COMMANDS
  1067. # -------------------
  1068. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  1069. # variables for single and double quote escaping we saved from calls
  1070. # to _LT_DECL, we can put quote escaped variables declarations
  1071. # into `config.status', and then the shell code to quote escape them in
  1072. # for loops in `config.status'. Finally, any additional code accumulated
  1073. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  1074. m4_defun([_LT_CONFIG_COMMANDS],
  1075. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  1076. dnl If the libtool generation code has been placed in $CONFIG_LT,
  1077. dnl instead of duplicating it all over again into config.status,
  1078. dnl then we will have config.status run $CONFIG_LT later, so it
  1079. dnl needs to know what name is stored there:
  1080. [AC_CONFIG_COMMANDS([libtool],
  1081. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  1082. dnl If the libtool generation code is destined for config.status,
  1083. dnl expand the accumulated commands and init code now:
  1084. [AC_CONFIG_COMMANDS([libtool],
  1085. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  1086. ])#_LT_CONFIG_COMMANDS
  1087. # Initialize.
  1088. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  1089. [
  1090. # The HP-UX ksh and POSIX shell print the target directory to stdout
  1091. # if CDPATH is set.
  1092. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  1093. sed_quote_subst='$sed_quote_subst'
  1094. double_quote_subst='$double_quote_subst'
  1095. delay_variable_subst='$delay_variable_subst'
  1096. _LT_CONFIG_STATUS_DECLARATIONS
  1097. LTCC='$LTCC'
  1098. LTCFLAGS='$LTCFLAGS'
  1099. compiler='$compiler_DEFAULT'
  1100. # A function that is used when there is no print builtin or printf.
  1101. func_fallback_echo ()
  1102. {
  1103. eval 'cat <<_LTECHO_EOF
  1104. \$[]1
  1105. _LTECHO_EOF'
  1106. }
  1107. # Quote evaled strings.
  1108. for var in lt_decl_all_varnames([[ \
  1109. ]], lt_decl_quote_varnames); do
  1110. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  1111. *[[\\\\\\\`\\"\\\$]]*)
  1112. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  1113. ;;
  1114. *)
  1115. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  1116. ;;
  1117. esac
  1118. done
  1119. # Double-quote double-evaled strings.
  1120. for var in lt_decl_all_varnames([[ \
  1121. ]], lt_decl_dquote_varnames); do
  1122. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  1123. *[[\\\\\\\`\\"\\\$]]*)
  1124. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  1125. ;;
  1126. *)
  1127. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  1128. ;;
  1129. esac
  1130. done
  1131. _LT_OUTPUT_LIBTOOL_INIT
  1132. ])
  1133. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  1134. # ------------------------------------
  1135. # Generate a child script FILE with all initialization necessary to
  1136. # reuse the environment learned by the parent script, and make the
  1137. # file executable. If COMMENT is supplied, it is inserted after the
  1138. # `#!' sequence but before initialization text begins. After this
  1139. # macro, additional text can be appended to FILE to form the body of
  1140. # the child script. The macro ends with non-zero status if the
  1141. # file could not be fully written (such as if the disk is full).
  1142. m4_ifdef([AS_INIT_GENERATED],
  1143. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  1144. [m4_defun([_LT_GENERATED_FILE_INIT],
  1145. [m4_require([AS_PREPARE])]dnl
  1146. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  1147. [lt_write_fail=0
  1148. cat >$1 <<_ASEOF || lt_write_fail=1
  1149. #! $SHELL
  1150. # Generated by $as_me.
  1151. $2
  1152. SHELL=\${CONFIG_SHELL-$SHELL}
  1153. export SHELL
  1154. _ASEOF
  1155. cat >>$1 <<\_ASEOF || lt_write_fail=1
  1156. AS_SHELL_SANITIZE
  1157. _AS_PREPARE
  1158. exec AS_MESSAGE_FD>&1
  1159. _ASEOF
  1160. test $lt_write_fail = 0 && chmod +x $1[]dnl
  1161. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  1162. # LT_OUTPUT
  1163. # ---------
  1164. # This macro allows early generation of the libtool script (before
  1165. # AC_OUTPUT is called), incase it is used in configure for compilation
  1166. # tests.
  1167. AC_DEFUN([LT_OUTPUT],
  1168. [: ${CONFIG_LT=./config.lt}
  1169. AC_MSG_NOTICE([creating $CONFIG_LT])
  1170. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  1171. [# Run this file to recreate a libtool stub with the current configuration.])
  1172. cat >>"$CONFIG_LT" <<\_LTEOF
  1173. lt_cl_silent=false
  1174. exec AS_MESSAGE_LOG_FD>>config.log
  1175. {
  1176. echo
  1177. AS_BOX([Running $as_me.])
  1178. } >&AS_MESSAGE_LOG_FD
  1179. lt_cl_help="\
  1180. \`$as_me' creates a local libtool stub from the current configuration,
  1181. for use in further configure time tests before the real libtool is
  1182. generated.
  1183. Usage: $[0] [[OPTIONS]]
  1184. -h, --help print this help, then exit
  1185. -V, --version print version number, then exit
  1186. -q, --quiet do not print progress messages
  1187. -d, --debug don't remove temporary files
  1188. Report bugs to <bug-libtool@gnu.org>."
  1189. lt_cl_version="\
  1190. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  1191. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  1192. configured by $[0], generated by m4_PACKAGE_STRING.
  1193. Copyright (C) 2011 Free Software Foundation, Inc.
  1194. This config.lt script is free software; the Free Software Foundation
  1195. gives unlimited permision to copy, distribute and modify it."
  1196. while test $[#] != 0
  1197. do
  1198. case $[1] in
  1199. --version | --v* | -V )
  1200. echo "$lt_cl_version"; exit 0 ;;
  1201. --help | --h* | -h )
  1202. echo "$lt_cl_help"; exit 0 ;;
  1203. --debug | --d* | -d )
  1204. debug=: ;;
  1205. --quiet | --q* | --silent | --s* | -q )
  1206. lt_cl_silent=: ;;
  1207. -*) AC_MSG_ERROR([unrecognized option: $[1]
  1208. Try \`$[0] --help' for more information.]) ;;
  1209. *) AC_MSG_ERROR([unrecognized argument: $[1]
  1210. Try \`$[0] --help' for more information.]) ;;
  1211. esac
  1212. shift
  1213. done
  1214. if $lt_cl_silent; then
  1215. exec AS_MESSAGE_FD>/dev/null
  1216. fi
  1217. _LTEOF
  1218. cat >>"$CONFIG_LT" <<_LTEOF
  1219. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  1220. _LTEOF
  1221. cat >>"$CONFIG_LT" <<\_LTEOF
  1222. AC_MSG_NOTICE([creating $ofile])
  1223. _LT_OUTPUT_LIBTOOL_COMMANDS
  1224. AS_EXIT(0)
  1225. _LTEOF
  1226. chmod +x "$CONFIG_LT"
  1227. # configure is writing to config.log, but config.lt does its own redirection,
  1228. # appending to config.log, which fails on DOS, as config.log is still kept
  1229. # open by configure. Here we exec the FD to /dev/null, effectively closing
  1230. # config.log, so it can be properly (re)opened and appended to by config.lt.
  1231. lt_cl_success=:
  1232. test "$silent" = yes &&
  1233. lt_config_lt_args="$lt_config_lt_args --quiet"
  1234. exec AS_MESSAGE_LOG_FD>/dev/null
  1235. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  1236. exec AS_MESSAGE_LOG_FD>>config.log
  1237. $lt_cl_success || AS_EXIT(1)
  1238. ])# LT_OUTPUT
  1239. # _LT_CONFIG(TAG)
  1240. # ---------------
  1241. # If TAG is the built-in tag, create an initial libtool script with a
  1242. # default configuration from the untagged config vars. Otherwise add code
  1243. # to config.status for appending the configuration named by TAG from the
  1244. # matching tagged config vars.
  1245. m4_defun([_LT_CONFIG],
  1246. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1247. _LT_CONFIG_SAVE_COMMANDS([
  1248. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  1249. m4_if(_LT_TAG, [C], [
  1250. # See if we are running on zsh, and set the options which allow our
  1251. # commands through without removal of \ escapes.
  1252. if test -n "${ZSH_VERSION+set}" ; then
  1253. setopt NO_GLOB_SUBST
  1254. fi
  1255. cfgfile="${ofile}T"
  1256. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  1257. $RM "$cfgfile"
  1258. cat <<_LT_EOF >> "$cfgfile"
  1259. #! $SHELL
  1260. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  1261. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  1262. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1263. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  1264. #
  1265. _LT_COPYING
  1266. _LT_LIBTOOL_TAGS
  1267. # ### BEGIN LIBTOOL CONFIG
  1268. _LT_LIBTOOL_CONFIG_VARS
  1269. _LT_LIBTOOL_TAG_VARS
  1270. # ### END LIBTOOL CONFIG
  1271. _LT_EOF
  1272. case $host_os in
  1273. aix3*)
  1274. cat <<\_LT_EOF >> "$cfgfile"
  1275. # AIX sometimes has problems with the GCC collect2 program. For some
  1276. # reason, if we set the COLLECT_NAMES environment variable, the problems
  1277. # vanish in a puff of smoke.
  1278. if test "X${COLLECT_NAMES+set}" != Xset; then
  1279. COLLECT_NAMES=
  1280. export COLLECT_NAMES
  1281. fi
  1282. _LT_EOF
  1283. ;;
  1284. esac
  1285. _LT_PROG_LTMAIN
  1286. # We use sed instead of cat because bash on DJGPP gets confused if
  1287. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  1288. # text mode, it properly converts lines to CR/LF. This bash problem
  1289. # is reportedly fixed, but why not run on old versions too?
  1290. sed '$q' "$ltmain" >> "$cfgfile" \
  1291. || (rm -f "$cfgfile"; exit 1)
  1292. _LT_PROG_REPLACE_SHELLFNS
  1293. mv -f "$cfgfile" "$ofile" ||
  1294. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  1295. chmod +x "$ofile"
  1296. ],
  1297. [cat <<_LT_EOF >> "$ofile"
  1298. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  1299. dnl in a comment (ie after a #).
  1300. # ### BEGIN LIBTOOL TAG CONFIG: $1
  1301. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  1302. # ### END LIBTOOL TAG CONFIG: $1
  1303. _LT_EOF
  1304. ])dnl /m4_if
  1305. ],
  1306. [m4_if([$1], [], [
  1307. PACKAGE='$PACKAGE'
  1308. VERSION='$VERSION'
  1309. TIMESTAMP='$TIMESTAMP'
  1310. RM='$RM'
  1311. ofile='$ofile'], [])
  1312. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  1313. ])# _LT_CONFIG
  1314. # LT_SUPPORTED_TAG(TAG)
  1315. # ---------------------
  1316. # Trace this macro to discover what tags are supported by the libtool
  1317. # --tag option, using:
  1318. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  1319. AC_DEFUN([LT_SUPPORTED_TAG], [])
  1320. # C support is built-in for now
  1321. m4_define([_LT_LANG_C_enabled], [])
  1322. m4_define([_LT_TAGS], [])
  1323. # LT_LANG(LANG)
  1324. # -------------
  1325. # Enable libtool support for the given language if not already enabled.
  1326. AC_DEFUN([LT_LANG],
  1327. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  1328. m4_case([$1],
  1329. [C], [_LT_LANG(C)],
  1330. [C++], [_LT_LANG(CXX)],
  1331. [Go], [_LT_LANG(GO)],
  1332. [Java], [_LT_LANG(GCJ)],
  1333. [Fortran 77], [_LT_LANG(F77)],
  1334. [Fortran], [_LT_LANG(FC)],
  1335. [Windows Resource], [_LT_LANG(RC)],
  1336. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  1337. [_LT_LANG($1)],
  1338. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  1339. ])# LT_LANG
  1340. # _LT_LANG(LANGNAME)
  1341. # ------------------
  1342. m4_defun([_LT_LANG],
  1343. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  1344. [LT_SUPPORTED_TAG([$1])dnl
  1345. m4_append([_LT_TAGS], [$1 ])dnl
  1346. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  1347. _LT_LANG_$1_CONFIG($1)])dnl
  1348. ])# _LT_LANG
  1349. m4_ifndef([AC_PROG_GO], [
  1350. ############################################################
  1351. # NOTE: This macro has been submitted for inclusion into #
  1352. # GNU Autoconf as AC_PROG_GO. When it is available in #
  1353. # a released version of Autoconf we should remove this #
  1354. # macro and use it instead. #
  1355. ############################################################
  1356. m4_defun([AC_PROG_GO],
  1357. [AC_LANG_PUSH(Go)dnl
  1358. AC_ARG_VAR([GOC], [Go compiler command])dnl
  1359. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  1360. _AC_ARG_VAR_LDFLAGS()dnl
  1361. AC_CHECK_TOOL(GOC, gccgo)
  1362. if test -z "$GOC"; then
  1363. if test -n "$ac_tool_prefix"; then
  1364. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  1365. fi
  1366. fi
  1367. if test -z "$GOC"; then
  1368. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  1369. fi
  1370. ])#m4_defun
  1371. ])#m4_ifndef
  1372. # _LT_LANG_DEFAULT_CONFIG
  1373. # -----------------------
  1374. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  1375. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  1376. [LT_LANG(CXX)],
  1377. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  1378. AC_PROVIDE_IFELSE([AC_PROG_F77],
  1379. [LT_LANG(F77)],
  1380. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  1381. AC_PROVIDE_IFELSE([AC_PROG_FC],
  1382. [LT_LANG(FC)],
  1383. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  1384. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  1385. dnl pulling things in needlessly.
  1386. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  1387. [LT_LANG(GCJ)],
  1388. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  1389. [LT_LANG(GCJ)],
  1390. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  1391. [LT_LANG(GCJ)],
  1392. [m4_ifdef([AC_PROG_GCJ],
  1393. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  1394. m4_ifdef([A][M_PROG_GCJ],
  1395. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  1396. m4_ifdef([LT_PROG_GCJ],
  1397. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  1398. AC_PROVIDE_IFELSE([AC_PROG_GO],
  1399. [LT_LANG(GO)],
  1400. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  1401. AC_PROVIDE_IFELSE([LT_PROG_RC],
  1402. [LT_LANG(RC)],
  1403. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  1404. ])# _LT_LANG_DEFAULT_CONFIG
  1405. # Obsolete macros:
  1406. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  1407. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  1408. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  1409. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  1410. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  1411. dnl aclocal-1.4 backwards compatibility:
  1412. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  1413. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  1414. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  1415. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  1416. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  1417. # _LT_TAG_COMPILER
  1418. # ----------------
  1419. m4_defun([_LT_TAG_COMPILER],
  1420. [AC_REQUIRE([AC_PROG_CC])dnl
  1421. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  1422. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  1423. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  1424. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  1425. # If no C compiler was specified, use CC.
  1426. LTCC=${LTCC-"$CC"}
  1427. # If no C compiler flags were specified, use CFLAGS.
  1428. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  1429. # Allow CC to be a program name with arguments.
  1430. compiler=$CC
  1431. ])# _LT_TAG_COMPILER
  1432. # _LT_COMPILER_BOILERPLATE
  1433. # ------------------------
  1434. # Check for compiler boilerplate output or warnings with
  1435. # the simple compiler test code.
  1436. m4_defun([_LT_COMPILER_BOILERPLATE],
  1437. [m4_require([_LT_DECL_SED])dnl
  1438. ac_outfile=conftest.$ac_objext
  1439. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  1440. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  1441. _lt_compiler_boilerplate=`cat conftest.err`
  1442. $RM conftest*
  1443. ])# _LT_COMPILER_BOILERPLATE
  1444. # _LT_LINKER_BOILERPLATE
  1445. # ----------------------
  1446. # Check for linker boilerplate output or warnings with
  1447. # the simple link test code.
  1448. m4_defun([_LT_LINKER_BOILERPLATE],
  1449. [m4_require([_LT_DECL_SED])dnl
  1450. ac_outfile=conftest.$ac_objext
  1451. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  1452. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  1453. _lt_linker_boilerplate=`cat conftest.err`
  1454. $RM -r conftest*
  1455. ])# _LT_LINKER_BOILERPLATE
  1456. # _LT_REQUIRED_DARWIN_CHECKS
  1457. # -------------------------
  1458. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  1459. case $host_os in
  1460. rhapsody* | darwin*)
  1461. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  1462. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  1463. AC_CHECK_TOOL([LIPO], [lipo], [:])
  1464. AC_CHECK_TOOL([OTOOL], [otool], [:])
  1465. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  1466. _LT_DECL([], [DSYMUTIL], [1],
  1467. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  1468. _LT_DECL([], [NMEDIT], [1],
  1469. [Tool to change global to local symbols on Mac OS X])
  1470. _LT_DECL([], [LIPO], [1],
  1471. [Tool to manipulate fat objects and archives on Mac OS X])
  1472. _LT_DECL([], [OTOOL], [1],
  1473. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  1474. _LT_DECL([], [OTOOL64], [1],
  1475. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  1476. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  1477. [lt_cv_apple_cc_single_mod=no
  1478. if test -z "${LT_MULTI_MODULE}"; then
  1479. # By default we will add the -single_module flag. You can override
  1480. # by either setting the environment variable LT_MULTI_MODULE
  1481. # non-empty at configure time, or by adding -multi_module to the
  1482. # link flags.
  1483. rm -rf libconftest.dylib*
  1484. echo "int foo(void){return 1;}" > conftest.c
  1485. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  1486. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  1487. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  1488. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  1489. _lt_result=$?
  1490. # If there is a non-empty error log, and "single_module"
  1491. # appears in it, assume the flag caused a linker warning
  1492. if test -s conftest.err && $GREP single_module conftest.err; then
  1493. cat conftest.err >&AS_MESSAGE_LOG_FD
  1494. # Otherwise, if the output was created with a 0 exit code from
  1495. # the compiler, it worked.
  1496. elif test -f libconftest.dylib && test $_lt_result -eq 0; then
  1497. lt_cv_apple_cc_single_mod=yes
  1498. else
  1499. cat conftest.err >&AS_MESSAGE_LOG_FD
  1500. fi
  1501. rm -rf libconftest.dylib*
  1502. rm -f conftest.*
  1503. fi])
  1504. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  1505. [lt_cv_ld_exported_symbols_list],
  1506. [lt_cv_ld_exported_symbols_list=no
  1507. save_LDFLAGS=$LDFLAGS
  1508. echo "_main" > conftest.sym
  1509. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  1510. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  1511. [lt_cv_ld_exported_symbols_list=yes],
  1512. [lt_cv_ld_exported_symbols_list=no])
  1513. LDFLAGS="$save_LDFLAGS"
  1514. ])
  1515. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  1516. [lt_cv_ld_force_load=no
  1517. cat > conftest.c << _LT_EOF
  1518. int forced_loaded() { return 2;}
  1519. _LT_EOF
  1520. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  1521. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  1522. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  1523. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  1524. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  1525. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  1526. cat > conftest.c << _LT_EOF
  1527. int main() { return 0;}
  1528. _LT_EOF
  1529. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  1530. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  1531. _lt_result=$?
  1532. if test -s conftest.err && $GREP force_load conftest.err; then
  1533. cat conftest.err >&AS_MESSAGE_LOG_FD
  1534. elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
  1535. lt_cv_ld_force_load=yes
  1536. else
  1537. cat conftest.err >&AS_MESSAGE_LOG_FD
  1538. fi
  1539. rm -f conftest.err libconftest.a conftest conftest.c
  1540. rm -rf conftest.dSYM
  1541. ])
  1542. case $host_os in
  1543. rhapsody* | darwin1.[[012]])
  1544. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  1545. darwin1.*)
  1546. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  1547. darwin*) # darwin 5.x on
  1548. # if running on 10.5 or later, the deployment target defaults
  1549. # to the OS version, if on x86, and 10.4, the deployment
  1550. # target defaults to 10.4. Don't you love it?
  1551. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  1552. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  1553. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  1554. 10.[[012]]*)
  1555. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  1556. 10.*)
  1557. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  1558. esac
  1559. ;;
  1560. esac
  1561. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  1562. _lt_dar_single_mod='$single_module'
  1563. fi
  1564. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  1565. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  1566. else
  1567. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1568. fi
  1569. if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  1570. _lt_dsymutil='~$DSYMUTIL $lib || :'
  1571. else
  1572. _lt_dsymutil=
  1573. fi
  1574. ;;
  1575. esac
  1576. ])
  1577. # _LT_DARWIN_LINKER_FEATURES([TAG])
  1578. # ---------------------------------
  1579. # Checks for linker and compiler features on darwin
  1580. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  1581. [
  1582. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  1583. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  1584. _LT_TAGVAR(hardcode_direct, $1)=no
  1585. _LT_TAGVAR(hardcode_automatic, $1)=yes
  1586. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  1587. if test "$lt_cv_ld_force_load" = "yes"; then
  1588. _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\"`'
  1589. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  1590. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  1591. else
  1592. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  1593. fi
  1594. _LT_TAGVAR(link_all_deplibs, $1)=yes
  1595. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  1596. case $cc_basename in
  1597. ifort*) _lt_dar_can_shared=yes ;;
  1598. *) _lt_dar_can_shared=$GCC ;;
  1599. esac
  1600. if test "$_lt_dar_can_shared" = "yes"; then
  1601. output_verbose_link_cmd=func_echo_all
  1602. _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}"
  1603. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  1604. _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}"
  1605. _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}"
  1606. m4_if([$1], [CXX],
  1607. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  1608. _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}"
  1609. _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}"
  1610. fi
  1611. ],[])
  1612. else
  1613. _LT_TAGVAR(ld_shlibs, $1)=no
  1614. fi
  1615. ])
  1616. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  1617. # ----------------------------------
  1618. # Links a minimal program and checks the executable
  1619. # for the system default hardcoded library path. In most cases,
  1620. # this is /usr/lib:/lib, but when the MPI compilers are used
  1621. # the location of the communication and MPI libs are included too.
  1622. # If we don't find anything, use the default library path according
  1623. # to the aix ld manual.
  1624. # Store the results from the different compilers for each TAGNAME.
  1625. # Allow to override them for all tags through lt_cv_aix_libpath.
  1626. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  1627. [m4_require([_LT_DECL_SED])dnl
  1628. if test "${lt_cv_aix_libpath+set}" = set; then
  1629. aix_libpath=$lt_cv_aix_libpath
  1630. else
  1631. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  1632. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  1633. lt_aix_libpath_sed='[
  1634. /Import File Strings/,/^$/ {
  1635. /^0/ {
  1636. s/^0 *\([^ ]*\) *$/\1/
  1637. p
  1638. }
  1639. }]'
  1640. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1641. # Check for a 64-bit object if we didn't find anything.
  1642. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1643. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1644. fi],[])
  1645. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1646. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
  1647. fi
  1648. ])
  1649. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1650. fi
  1651. ])# _LT_SYS_MODULE_PATH_AIX
  1652. # _LT_SHELL_INIT(ARG)
  1653. # -------------------
  1654. m4_define([_LT_SHELL_INIT],
  1655. [m4_divert_text([M4SH-INIT], [$1
  1656. ])])# _LT_SHELL_INIT
  1657. # _LT_PROG_ECHO_BACKSLASH
  1658. # -----------------------
  1659. # Find how we can fake an echo command that does not interpret backslash.
  1660. # In particular, with Autoconf 2.60 or later we add some code to the start
  1661. # of the generated configure script which will find a shell with a builtin
  1662. # printf (which we can use as an echo command).
  1663. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1664. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1665. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1666. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1667. AC_MSG_CHECKING([how to print strings])
  1668. # Test print first, because it will be a builtin if present.
  1669. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1670. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1671. ECHO='print -r --'
  1672. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1673. ECHO='printf %s\n'
  1674. else
  1675. # Use this function as a fallback that always works.
  1676. func_fallback_echo ()
  1677. {
  1678. eval 'cat <<_LTECHO_EOF
  1679. $[]1
  1680. _LTECHO_EOF'
  1681. }
  1682. ECHO='func_fallback_echo'
  1683. fi
  1684. # func_echo_all arg...
  1685. # Invoke $ECHO with all args, space-separated.
  1686. func_echo_all ()
  1687. {
  1688. $ECHO "$*"
  1689. }
  1690. case "$ECHO" in
  1691. printf*) AC_MSG_RESULT([printf]) ;;
  1692. print*) AC_MSG_RESULT([print -r]) ;;
  1693. *) AC_MSG_RESULT([cat]) ;;
  1694. esac
  1695. m4_ifdef([_AS_DETECT_SUGGESTED],
  1696. [_AS_DETECT_SUGGESTED([
  1697. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1698. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1699. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1700. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1701. PATH=/empty FPATH=/empty; export PATH FPATH
  1702. test "X`printf %s $ECHO`" = "X$ECHO" \
  1703. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1704. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1705. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1706. ])# _LT_PROG_ECHO_BACKSLASH
  1707. # _LT_WITH_SYSROOT
  1708. # ----------------
  1709. AC_DEFUN([_LT_WITH_SYSROOT],
  1710. [AC_MSG_CHECKING([for sysroot])
  1711. AC_ARG_WITH([sysroot],
  1712. [ --with-sysroot[=DIR] Search for dependent libraries within DIR
  1713. (or the compiler's sysroot if not specified).],
  1714. [], [with_sysroot=no])
  1715. dnl lt_sysroot will always be passed unquoted. We quote it here
  1716. dnl in case the user passed a directory name.
  1717. lt_sysroot=
  1718. case ${with_sysroot} in #(
  1719. yes)
  1720. if test "$GCC" = yes; then
  1721. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1722. fi
  1723. ;; #(
  1724. /*)
  1725. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1726. ;; #(
  1727. no|'')
  1728. ;; #(
  1729. *)
  1730. AC_MSG_RESULT([${with_sysroot}])
  1731. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1732. ;;
  1733. esac
  1734. AC_MSG_RESULT([${lt_sysroot:-no}])
  1735. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1736. [dependent libraries, and in which our libraries should be installed.])])
  1737. # _LT_ENABLE_LOCK
  1738. # ---------------
  1739. m4_defun([_LT_ENABLE_LOCK],
  1740. [AC_ARG_ENABLE([libtool-lock],
  1741. [AS_HELP_STRING([--disable-libtool-lock],
  1742. [avoid locking (might break parallel builds)])])
  1743. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1744. # Some flags need to be propagated to the compiler or linker for good
  1745. # libtool support.
  1746. case $host in
  1747. ia64-*-hpux*)
  1748. # Find out which ABI we are using.
  1749. echo 'int i;' > conftest.$ac_ext
  1750. if AC_TRY_EVAL(ac_compile); then
  1751. case `/usr/bin/file conftest.$ac_objext` in
  1752. *ELF-32*)
  1753. HPUX_IA64_MODE="32"
  1754. ;;
  1755. *ELF-64*)
  1756. HPUX_IA64_MODE="64"
  1757. ;;
  1758. esac
  1759. fi
  1760. rm -rf conftest*
  1761. ;;
  1762. *-*-irix6*)
  1763. # Find out which ABI we are using.
  1764. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1765. if AC_TRY_EVAL(ac_compile); then
  1766. if test "$lt_cv_prog_gnu_ld" = yes; then
  1767. case `/usr/bin/file conftest.$ac_objext` in
  1768. *32-bit*)
  1769. LD="${LD-ld} -melf32bsmip"
  1770. ;;
  1771. *N32*)
  1772. LD="${LD-ld} -melf32bmipn32"
  1773. ;;
  1774. *64-bit*)
  1775. LD="${LD-ld} -melf64bmip"
  1776. ;;
  1777. esac
  1778. else
  1779. case `/usr/bin/file conftest.$ac_objext` in
  1780. *32-bit*)
  1781. LD="${LD-ld} -32"
  1782. ;;
  1783. *N32*)
  1784. LD="${LD-ld} -n32"
  1785. ;;
  1786. *64-bit*)
  1787. LD="${LD-ld} -64"
  1788. ;;
  1789. esac
  1790. fi
  1791. fi
  1792. rm -rf conftest*
  1793. ;;
  1794. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1795. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1796. # Find out which ABI we are using.
  1797. echo 'int i;' > conftest.$ac_ext
  1798. if AC_TRY_EVAL(ac_compile); then
  1799. case `/usr/bin/file conftest.o` in
  1800. *32-bit*)
  1801. case $host in
  1802. x86_64-*kfreebsd*-gnu)
  1803. LD="${LD-ld} -m elf_i386_fbsd"
  1804. ;;
  1805. x86_64-*linux*)
  1806. LD="${LD-ld} -m elf_i386"
  1807. ;;
  1808. ppc64-*linux*|powerpc64-*linux*)
  1809. LD="${LD-ld} -m elf32ppclinux"
  1810. ;;
  1811. s390x-*linux*)
  1812. LD="${LD-ld} -m elf_s390"
  1813. ;;
  1814. sparc64-*linux*)
  1815. LD="${LD-ld} -m elf32_sparc"
  1816. ;;
  1817. esac
  1818. ;;
  1819. *64-bit*)
  1820. case $host in
  1821. x86_64-*kfreebsd*-gnu)
  1822. LD="${LD-ld} -m elf_x86_64_fbsd"
  1823. ;;
  1824. x86_64-*linux*)
  1825. LD="${LD-ld} -m elf_x86_64"
  1826. ;;
  1827. ppc*-*linux*|powerpc*-*linux*)
  1828. LD="${LD-ld} -m elf64ppc"
  1829. ;;
  1830. s390*-*linux*|s390*-*tpf*)
  1831. LD="${LD-ld} -m elf64_s390"
  1832. ;;
  1833. sparc*-*linux*)
  1834. LD="${LD-ld} -m elf64_sparc"
  1835. ;;
  1836. esac
  1837. ;;
  1838. esac
  1839. fi
  1840. rm -rf conftest*
  1841. ;;
  1842. *-*-sco3.2v5*)
  1843. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1844. SAVE_CFLAGS="$CFLAGS"
  1845. CFLAGS="$CFLAGS -belf"
  1846. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1847. [AC_LANG_PUSH(C)
  1848. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1849. AC_LANG_POP])
  1850. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1851. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1852. CFLAGS="$SAVE_CFLAGS"
  1853. fi
  1854. ;;
  1855. *-*solaris*)
  1856. # Find out which ABI we are using.
  1857. echo 'int i;' > conftest.$ac_ext
  1858. if AC_TRY_EVAL(ac_compile); then
  1859. case `/usr/bin/file conftest.o` in
  1860. *64-bit*)
  1861. case $lt_cv_prog_gnu_ld in
  1862. yes*)
  1863. case $host in
  1864. i?86-*-solaris*)
  1865. LD="${LD-ld} -m elf_x86_64"
  1866. ;;
  1867. sparc*-*-solaris*)
  1868. LD="${LD-ld} -m elf64_sparc"
  1869. ;;
  1870. esac
  1871. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1872. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1873. LD="${LD-ld}_sol2"
  1874. fi
  1875. ;;
  1876. *)
  1877. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1878. LD="${LD-ld} -64"
  1879. fi
  1880. ;;
  1881. esac
  1882. ;;
  1883. esac
  1884. fi
  1885. rm -rf conftest*
  1886. ;;
  1887. esac
  1888. need_locks="$enable_libtool_lock"
  1889. ])# _LT_ENABLE_LOCK
  1890. # _LT_PROG_AR
  1891. # -----------
  1892. m4_defun([_LT_PROG_AR],
  1893. [AC_CHECK_TOOLS(AR, [ar], false)
  1894. : ${AR=ar}
  1895. : ${AR_FLAGS=cru}
  1896. _LT_DECL([], [AR], [1], [The archiver])
  1897. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1898. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1899. [lt_cv_ar_at_file=no
  1900. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1901. [echo conftest.$ac_objext > conftest.lst
  1902. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1903. AC_TRY_EVAL([lt_ar_try])
  1904. if test "$ac_status" -eq 0; then
  1905. # Ensure the archiver fails upon bogus file names.
  1906. rm -f conftest.$ac_objext libconftest.a
  1907. AC_TRY_EVAL([lt_ar_try])
  1908. if test "$ac_status" -ne 0; then
  1909. lt_cv_ar_at_file=@
  1910. fi
  1911. fi
  1912. rm -f conftest.* libconftest.a
  1913. ])
  1914. ])
  1915. if test "x$lt_cv_ar_at_file" = xno; then
  1916. archiver_list_spec=
  1917. else
  1918. archiver_list_spec=$lt_cv_ar_at_file
  1919. fi
  1920. _LT_DECL([], [archiver_list_spec], [1],
  1921. [How to feed a file listing to the archiver])
  1922. ])# _LT_PROG_AR
  1923. # _LT_CMD_OLD_ARCHIVE
  1924. # -------------------
  1925. m4_defun([_LT_CMD_OLD_ARCHIVE],
  1926. [_LT_PROG_AR
  1927. AC_CHECK_TOOL(STRIP, strip, :)
  1928. test -z "$STRIP" && STRIP=:
  1929. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  1930. AC_CHECK_TOOL(RANLIB, ranlib, :)
  1931. test -z "$RANLIB" && RANLIB=:
  1932. _LT_DECL([], [RANLIB], [1],
  1933. [Commands used to install an old-style archive])
  1934. # Determine commands to create old-style static archives.
  1935. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  1936. old_postinstall_cmds='chmod 644 $oldlib'
  1937. old_postuninstall_cmds=
  1938. if test -n "$RANLIB"; then
  1939. case $host_os in
  1940. openbsd*)
  1941. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  1942. ;;
  1943. *)
  1944. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  1945. ;;
  1946. esac
  1947. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  1948. fi
  1949. case $host_os in
  1950. darwin*)
  1951. lock_old_archive_extraction=yes ;;
  1952. *)
  1953. lock_old_archive_extraction=no ;;
  1954. esac
  1955. _LT_DECL([], [old_postinstall_cmds], [2])
  1956. _LT_DECL([], [old_postuninstall_cmds], [2])
  1957. _LT_TAGDECL([], [old_archive_cmds], [2],
  1958. [Commands used to build an old-style archive])
  1959. _LT_DECL([], [lock_old_archive_extraction], [0],
  1960. [Whether to use a lock for old archive extraction])
  1961. ])# _LT_CMD_OLD_ARCHIVE
  1962. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1963. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1964. # ----------------------------------------------------------------
  1965. # Check whether the given compiler option works
  1966. AC_DEFUN([_LT_COMPILER_OPTION],
  1967. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1968. m4_require([_LT_DECL_SED])dnl
  1969. AC_CACHE_CHECK([$1], [$2],
  1970. [$2=no
  1971. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1972. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1973. lt_compiler_flag="$3"
  1974. # Insert the option either (1) after the last *FLAGS variable, or
  1975. # (2) before a word containing "conftest.", or (3) at the end.
  1976. # Note that $ac_compile itself does not contain backslashes and begins
  1977. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1978. # The option is referenced via a variable to avoid confusing sed.
  1979. lt_compile=`echo "$ac_compile" | $SED \
  1980. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1981. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1982. -e 's:$: $lt_compiler_flag:'`
  1983. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1984. (eval "$lt_compile" 2>conftest.err)
  1985. ac_status=$?
  1986. cat conftest.err >&AS_MESSAGE_LOG_FD
  1987. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1988. if (exit $ac_status) && test -s "$ac_outfile"; then
  1989. # The compiler can only warn and ignore the option if not recognized
  1990. # So say no if there are warnings other than the usual output.
  1991. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  1992. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  1993. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  1994. $2=yes
  1995. fi
  1996. fi
  1997. $RM conftest*
  1998. ])
  1999. if test x"[$]$2" = xyes; then
  2000. m4_if([$5], , :, [$5])
  2001. else
  2002. m4_if([$6], , :, [$6])
  2003. fi
  2004. ])# _LT_COMPILER_OPTION
  2005. # Old name:
  2006. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  2007. dnl aclocal-1.4 backwards compatibility:
  2008. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  2009. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  2010. # [ACTION-SUCCESS], [ACTION-FAILURE])
  2011. # ----------------------------------------------------
  2012. # Check whether the given linker option works
  2013. AC_DEFUN([_LT_LINKER_OPTION],
  2014. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2015. m4_require([_LT_DECL_SED])dnl
  2016. AC_CACHE_CHECK([$1], [$2],
  2017. [$2=no
  2018. save_LDFLAGS="$LDFLAGS"
  2019. LDFLAGS="$LDFLAGS $3"
  2020. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  2021. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  2022. # The linker can only warn and ignore the option if not recognized
  2023. # So say no if there are warnings
  2024. if test -s conftest.err; then
  2025. # Append any errors to the config.log.
  2026. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  2027. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  2028. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  2029. if diff conftest.exp conftest.er2 >/dev/null; then
  2030. $2=yes
  2031. fi
  2032. else
  2033. $2=yes
  2034. fi
  2035. fi
  2036. $RM -r conftest*
  2037. LDFLAGS="$save_LDFLAGS"
  2038. ])
  2039. if test x"[$]$2" = xyes; then
  2040. m4_if([$4], , :, [$4])
  2041. else
  2042. m4_if([$5], , :, [$5])
  2043. fi
  2044. ])# _LT_LINKER_OPTION
  2045. # Old name:
  2046. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  2047. dnl aclocal-1.4 backwards compatibility:
  2048. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  2049. # LT_CMD_MAX_LEN
  2050. #---------------
  2051. AC_DEFUN([LT_CMD_MAX_LEN],
  2052. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2053. # find the maximum length of command line arguments
  2054. AC_MSG_CHECKING([the maximum length of command line arguments])
  2055. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  2056. i=0
  2057. teststring="ABCD"
  2058. case $build_os in
  2059. msdosdjgpp*)
  2060. # On DJGPP, this test can blow up pretty badly due to problems in libc
  2061. # (any single argument exceeding 2000 bytes causes a buffer overrun
  2062. # during glob expansion). Even if it were fixed, the result of this
  2063. # check would be larger than it should be.
  2064. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  2065. ;;
  2066. gnu*)
  2067. # Under GNU Hurd, this test is not required because there is
  2068. # no limit to the length of command line arguments.
  2069. # Libtool will interpret -1 as no limit whatsoever
  2070. lt_cv_sys_max_cmd_len=-1;
  2071. ;;
  2072. cygwin* | mingw* | cegcc*)
  2073. # On Win9x/ME, this test blows up -- it succeeds, but takes
  2074. # about 5 minutes as the teststring grows exponentially.
  2075. # Worse, since 9x/ME are not pre-emptively multitasking,
  2076. # you end up with a "frozen" computer, even though with patience
  2077. # the test eventually succeeds (with a max line length of 256k).
  2078. # Instead, let's just punt: use the minimum linelength reported by
  2079. # all of the supported platforms: 8192 (on NT/2K/XP).
  2080. lt_cv_sys_max_cmd_len=8192;
  2081. ;;
  2082. mint*)
  2083. # On MiNT this can take a long time and run out of memory.
  2084. lt_cv_sys_max_cmd_len=8192;
  2085. ;;
  2086. amigaos*)
  2087. # On AmigaOS with pdksh, this test takes hours, literally.
  2088. # So we just punt and use a minimum line length of 8192.
  2089. lt_cv_sys_max_cmd_len=8192;
  2090. ;;
  2091. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  2092. # This has been around since 386BSD, at least. Likely further.
  2093. if test -x /sbin/sysctl; then
  2094. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  2095. elif test -x /usr/sbin/sysctl; then
  2096. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  2097. else
  2098. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  2099. fi
  2100. # And add a safety zone
  2101. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  2102. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  2103. ;;
  2104. interix*)
  2105. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  2106. lt_cv_sys_max_cmd_len=196608
  2107. ;;
  2108. os2*)
  2109. # The test takes a long time on OS/2.
  2110. lt_cv_sys_max_cmd_len=8192
  2111. ;;
  2112. osf*)
  2113. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  2114. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  2115. # nice to cause kernel panics so lets avoid the loop below.
  2116. # First set a reasonable default.
  2117. lt_cv_sys_max_cmd_len=16384
  2118. #
  2119. if test -x /sbin/sysconfig; then
  2120. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  2121. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  2122. esac
  2123. fi
  2124. ;;
  2125. sco3.2v5*)
  2126. lt_cv_sys_max_cmd_len=102400
  2127. ;;
  2128. sysv5* | sco5v6* | sysv4.2uw2*)
  2129. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  2130. if test -n "$kargmax"; then
  2131. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  2132. else
  2133. lt_cv_sys_max_cmd_len=32768
  2134. fi
  2135. ;;
  2136. *)
  2137. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  2138. if test -n "$lt_cv_sys_max_cmd_len"; then
  2139. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  2140. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  2141. else
  2142. # Make teststring a little bigger before we do anything with it.
  2143. # a 1K string should be a reasonable start.
  2144. for i in 1 2 3 4 5 6 7 8 ; do
  2145. teststring=$teststring$teststring
  2146. done
  2147. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  2148. # If test is not a shell built-in, we'll probably end up computing a
  2149. # maximum length that is only half of the actual maximum length, but
  2150. # we can't tell.
  2151. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
  2152. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  2153. test $i != 17 # 1/2 MB should be enough
  2154. do
  2155. i=`expr $i + 1`
  2156. teststring=$teststring$teststring
  2157. done
  2158. # Only check the string length outside the loop.
  2159. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  2160. teststring=
  2161. # Add a significant safety factor because C++ compilers can tack on
  2162. # massive amounts of additional arguments before passing them to the
  2163. # linker. It appears as though 1/2 is a usable value.
  2164. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  2165. fi
  2166. ;;
  2167. esac
  2168. ])
  2169. if test -n $lt_cv_sys_max_cmd_len ; then
  2170. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  2171. else
  2172. AC_MSG_RESULT(none)
  2173. fi
  2174. max_cmd_len=$lt_cv_sys_max_cmd_len
  2175. _LT_DECL([], [max_cmd_len], [0],
  2176. [What is the maximum length of a command?])
  2177. ])# LT_CMD_MAX_LEN
  2178. # Old name:
  2179. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  2180. dnl aclocal-1.4 backwards compatibility:
  2181. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  2182. # _LT_HEADER_DLFCN
  2183. # ----------------
  2184. m4_defun([_LT_HEADER_DLFCN],
  2185. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  2186. ])# _LT_HEADER_DLFCN
  2187. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  2188. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  2189. # ----------------------------------------------------------------
  2190. m4_defun([_LT_TRY_DLOPEN_SELF],
  2191. [m4_require([_LT_HEADER_DLFCN])dnl
  2192. if test "$cross_compiling" = yes; then :
  2193. [$4]
  2194. else
  2195. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  2196. lt_status=$lt_dlunknown
  2197. cat > conftest.$ac_ext <<_LT_EOF
  2198. [#line $LINENO "configure"
  2199. #include "confdefs.h"
  2200. #if HAVE_DLFCN_H
  2201. #include <dlfcn.h>
  2202. #endif
  2203. #include <stdio.h>
  2204. #ifdef RTLD_GLOBAL
  2205. # define LT_DLGLOBAL RTLD_GLOBAL
  2206. #else
  2207. # ifdef DL_GLOBAL
  2208. # define LT_DLGLOBAL DL_GLOBAL
  2209. # else
  2210. # define LT_DLGLOBAL 0
  2211. # endif
  2212. #endif
  2213. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  2214. find out it does not work in some platform. */
  2215. #ifndef LT_DLLAZY_OR_NOW
  2216. # ifdef RTLD_LAZY
  2217. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  2218. # else
  2219. # ifdef DL_LAZY
  2220. # define LT_DLLAZY_OR_NOW DL_LAZY
  2221. # else
  2222. # ifdef RTLD_NOW
  2223. # define LT_DLLAZY_OR_NOW RTLD_NOW
  2224. # else
  2225. # ifdef DL_NOW
  2226. # define LT_DLLAZY_OR_NOW DL_NOW
  2227. # else
  2228. # define LT_DLLAZY_OR_NOW 0
  2229. # endif
  2230. # endif
  2231. # endif
  2232. # endif
  2233. #endif
  2234. /* When -fvisbility=hidden is used, assume the code has been annotated
  2235. correspondingly for the symbols needed. */
  2236. #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  2237. int fnord () __attribute__((visibility("default")));
  2238. #endif
  2239. int fnord () { return 42; }
  2240. int main ()
  2241. {
  2242. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  2243. int status = $lt_dlunknown;
  2244. if (self)
  2245. {
  2246. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  2247. else
  2248. {
  2249. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  2250. else puts (dlerror ());
  2251. }
  2252. /* dlclose (self); */
  2253. }
  2254. else
  2255. puts (dlerror ());
  2256. return status;
  2257. }]
  2258. _LT_EOF
  2259. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  2260. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  2261. lt_status=$?
  2262. case x$lt_status in
  2263. x$lt_dlno_uscore) $1 ;;
  2264. x$lt_dlneed_uscore) $2 ;;
  2265. x$lt_dlunknown|x*) $3 ;;
  2266. esac
  2267. else :
  2268. # compilation failed
  2269. $3
  2270. fi
  2271. fi
  2272. rm -fr conftest*
  2273. ])# _LT_TRY_DLOPEN_SELF
  2274. # LT_SYS_DLOPEN_SELF
  2275. # ------------------
  2276. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  2277. [m4_require([_LT_HEADER_DLFCN])dnl
  2278. if test "x$enable_dlopen" != xyes; then
  2279. enable_dlopen=unknown
  2280. enable_dlopen_self=unknown
  2281. enable_dlopen_self_static=unknown
  2282. else
  2283. lt_cv_dlopen=no
  2284. lt_cv_dlopen_libs=
  2285. case $host_os in
  2286. beos*)
  2287. lt_cv_dlopen="load_add_on"
  2288. lt_cv_dlopen_libs=
  2289. lt_cv_dlopen_self=yes
  2290. ;;
  2291. mingw* | pw32* | cegcc*)
  2292. lt_cv_dlopen="LoadLibrary"
  2293. lt_cv_dlopen_libs=
  2294. ;;
  2295. cygwin*)
  2296. lt_cv_dlopen="dlopen"
  2297. lt_cv_dlopen_libs=
  2298. ;;
  2299. darwin*)
  2300. # if libdl is installed we need to link against it
  2301. AC_CHECK_LIB([dl], [dlopen],
  2302. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  2303. lt_cv_dlopen="dyld"
  2304. lt_cv_dlopen_libs=
  2305. lt_cv_dlopen_self=yes
  2306. ])
  2307. ;;
  2308. *)
  2309. AC_CHECK_FUNC([shl_load],
  2310. [lt_cv_dlopen="shl_load"],
  2311. [AC_CHECK_LIB([dld], [shl_load],
  2312. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  2313. [AC_CHECK_FUNC([dlopen],
  2314. [lt_cv_dlopen="dlopen"],
  2315. [AC_CHECK_LIB([dl], [dlopen],
  2316. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  2317. [AC_CHECK_LIB([svld], [dlopen],
  2318. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  2319. [AC_CHECK_LIB([dld], [dld_link],
  2320. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  2321. ])
  2322. ])
  2323. ])
  2324. ])
  2325. ])
  2326. ;;
  2327. esac
  2328. if test "x$lt_cv_dlopen" != xno; then
  2329. enable_dlopen=yes
  2330. else
  2331. enable_dlopen=no
  2332. fi
  2333. case $lt_cv_dlopen in
  2334. dlopen)
  2335. save_CPPFLAGS="$CPPFLAGS"
  2336. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  2337. save_LDFLAGS="$LDFLAGS"
  2338. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  2339. save_LIBS="$LIBS"
  2340. LIBS="$lt_cv_dlopen_libs $LIBS"
  2341. AC_CACHE_CHECK([whether a program can dlopen itself],
  2342. lt_cv_dlopen_self, [dnl
  2343. _LT_TRY_DLOPEN_SELF(
  2344. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  2345. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  2346. ])
  2347. if test "x$lt_cv_dlopen_self" = xyes; then
  2348. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  2349. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  2350. lt_cv_dlopen_self_static, [dnl
  2351. _LT_TRY_DLOPEN_SELF(
  2352. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  2353. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  2354. ])
  2355. fi
  2356. CPPFLAGS="$save_CPPFLAGS"
  2357. LDFLAGS="$save_LDFLAGS"
  2358. LIBS="$save_LIBS"
  2359. ;;
  2360. esac
  2361. case $lt_cv_dlopen_self in
  2362. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  2363. *) enable_dlopen_self=unknown ;;
  2364. esac
  2365. case $lt_cv_dlopen_self_static in
  2366. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  2367. *) enable_dlopen_self_static=unknown ;;
  2368. esac
  2369. fi
  2370. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  2371. [Whether dlopen is supported])
  2372. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  2373. [Whether dlopen of programs is supported])
  2374. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  2375. [Whether dlopen of statically linked programs is supported])
  2376. ])# LT_SYS_DLOPEN_SELF
  2377. # Old name:
  2378. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  2379. dnl aclocal-1.4 backwards compatibility:
  2380. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  2381. # _LT_COMPILER_C_O([TAGNAME])
  2382. # ---------------------------
  2383. # Check to see if options -c and -o are simultaneously supported by compiler.
  2384. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  2385. m4_defun([_LT_COMPILER_C_O],
  2386. [m4_require([_LT_DECL_SED])dnl
  2387. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2388. m4_require([_LT_TAG_COMPILER])dnl
  2389. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  2390. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  2391. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  2392. $RM -r conftest 2>/dev/null
  2393. mkdir conftest
  2394. cd conftest
  2395. mkdir out
  2396. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  2397. lt_compiler_flag="-o out/conftest2.$ac_objext"
  2398. # Insert the option either (1) after the last *FLAGS variable, or
  2399. # (2) before a word containing "conftest.", or (3) at the end.
  2400. # Note that $ac_compile itself does not contain backslashes and begins
  2401. # with a dollar sign (not a hyphen), so the echo should work correctly.
  2402. lt_compile=`echo "$ac_compile" | $SED \
  2403. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  2404. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  2405. -e 's:$: $lt_compiler_flag:'`
  2406. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  2407. (eval "$lt_compile" 2>out/conftest.err)
  2408. ac_status=$?
  2409. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  2410. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  2411. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  2412. then
  2413. # The compiler can only warn and ignore the option if not recognized
  2414. # So say no if there are warnings
  2415. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  2416. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  2417. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  2418. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  2419. fi
  2420. fi
  2421. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  2422. $RM conftest*
  2423. # SGI C++ compiler will create directory out/ii_files/ for
  2424. # template instantiation
  2425. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  2426. $RM out/* && rmdir out
  2427. cd ..
  2428. $RM -r conftest
  2429. $RM conftest*
  2430. ])
  2431. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  2432. [Does compiler simultaneously support -c and -o options?])
  2433. ])# _LT_COMPILER_C_O
  2434. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  2435. # ----------------------------------
  2436. # Check to see if we can do hard links to lock some files if needed
  2437. m4_defun([_LT_COMPILER_FILE_LOCKS],
  2438. [m4_require([_LT_ENABLE_LOCK])dnl
  2439. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2440. _LT_COMPILER_C_O([$1])
  2441. hard_links="nottested"
  2442. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  2443. # do not overwrite the value of need_locks provided by the user
  2444. AC_MSG_CHECKING([if we can lock with hard links])
  2445. hard_links=yes
  2446. $RM conftest*
  2447. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  2448. touch conftest.a
  2449. ln conftest.a conftest.b 2>&5 || hard_links=no
  2450. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  2451. AC_MSG_RESULT([$hard_links])
  2452. if test "$hard_links" = no; then
  2453. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  2454. need_locks=warn
  2455. fi
  2456. else
  2457. need_locks=no
  2458. fi
  2459. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  2460. ])# _LT_COMPILER_FILE_LOCKS
  2461. # _LT_CHECK_OBJDIR
  2462. # ----------------
  2463. m4_defun([_LT_CHECK_OBJDIR],
  2464. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  2465. [rm -f .libs 2>/dev/null
  2466. mkdir .libs 2>/dev/null
  2467. if test -d .libs; then
  2468. lt_cv_objdir=.libs
  2469. else
  2470. # MS-DOS does not allow filenames that begin with a dot.
  2471. lt_cv_objdir=_libs
  2472. fi
  2473. rmdir .libs 2>/dev/null])
  2474. objdir=$lt_cv_objdir
  2475. _LT_DECL([], [objdir], [0],
  2476. [The name of the directory that contains temporary libtool files])dnl
  2477. m4_pattern_allow([LT_OBJDIR])dnl
  2478. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  2479. [Define to the sub-directory in which libtool stores uninstalled libraries.])
  2480. ])# _LT_CHECK_OBJDIR
  2481. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  2482. # --------------------------------------
  2483. # Check hardcoding attributes.
  2484. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  2485. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  2486. _LT_TAGVAR(hardcode_action, $1)=
  2487. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  2488. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  2489. test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  2490. # We can hardcode non-existent directories.
  2491. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  2492. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  2493. # have to relink, otherwise we might link with an installed library
  2494. # when we should be linking with a yet-to-be-installed one
  2495. ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  2496. test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  2497. # Linking always hardcodes the temporary library directory.
  2498. _LT_TAGVAR(hardcode_action, $1)=relink
  2499. else
  2500. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  2501. _LT_TAGVAR(hardcode_action, $1)=immediate
  2502. fi
  2503. else
  2504. # We cannot hardcode anything, or else we can only hardcode existing
  2505. # directories.
  2506. _LT_TAGVAR(hardcode_action, $1)=unsupported
  2507. fi
  2508. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  2509. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  2510. test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  2511. # Fast installation is not supported
  2512. enable_fast_install=no
  2513. elif test "$shlibpath_overrides_runpath" = yes ||
  2514. test "$enable_shared" = no; then
  2515. # Fast installation is not necessary
  2516. enable_fast_install=needless
  2517. fi
  2518. _LT_TAGDECL([], [hardcode_action], [0],
  2519. [How to hardcode a shared library path into an executable])
  2520. ])# _LT_LINKER_HARDCODE_LIBPATH
  2521. # _LT_CMD_STRIPLIB
  2522. # ----------------
  2523. m4_defun([_LT_CMD_STRIPLIB],
  2524. [m4_require([_LT_DECL_EGREP])
  2525. striplib=
  2526. old_striplib=
  2527. AC_MSG_CHECKING([whether stripping libraries is possible])
  2528. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  2529. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  2530. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  2531. AC_MSG_RESULT([yes])
  2532. else
  2533. # FIXME - insert some real tests, host_os isn't really good enough
  2534. case $host_os in
  2535. darwin*)
  2536. if test -n "$STRIP" ; then
  2537. striplib="$STRIP -x"
  2538. old_striplib="$STRIP -S"
  2539. AC_MSG_RESULT([yes])
  2540. else
  2541. AC_MSG_RESULT([no])
  2542. fi
  2543. ;;
  2544. *)
  2545. AC_MSG_RESULT([no])
  2546. ;;
  2547. esac
  2548. fi
  2549. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  2550. _LT_DECL([], [striplib], [1])
  2551. ])# _LT_CMD_STRIPLIB
  2552. # _LT_SYS_DYNAMIC_LINKER([TAG])
  2553. # -----------------------------
  2554. # PORTME Fill in your ld.so characteristics
  2555. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  2556. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2557. m4_require([_LT_DECL_EGREP])dnl
  2558. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2559. m4_require([_LT_DECL_OBJDUMP])dnl
  2560. m4_require([_LT_DECL_SED])dnl
  2561. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2562. AC_MSG_CHECKING([dynamic linker characteristics])
  2563. m4_if([$1],
  2564. [], [
  2565. if test "$GCC" = yes; then
  2566. case $host_os in
  2567. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  2568. *) lt_awk_arg="/^libraries:/" ;;
  2569. esac
  2570. case $host_os in
  2571. mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
  2572. *) lt_sed_strip_eq="s,=/,/,g" ;;
  2573. esac
  2574. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  2575. case $lt_search_path_spec in
  2576. *\;*)
  2577. # if the path contains ";" then we assume it to be the separator
  2578. # otherwise default to the standard path separator (i.e. ":") - it is
  2579. # assumed that no part of a normal pathname contains ";" but that should
  2580. # okay in the real world where ";" in dirpaths is itself problematic.
  2581. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  2582. ;;
  2583. *)
  2584. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  2585. ;;
  2586. esac
  2587. # Ok, now we have the path, separated by spaces, we can step through it
  2588. # and add multilib dir if necessary.
  2589. lt_tmp_lt_search_path_spec=
  2590. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  2591. for lt_sys_path in $lt_search_path_spec; do
  2592. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  2593. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  2594. else
  2595. test -d "$lt_sys_path" && \
  2596. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  2597. fi
  2598. done
  2599. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  2600. BEGIN {RS=" "; FS="/|\n";} {
  2601. lt_foo="";
  2602. lt_count=0;
  2603. for (lt_i = NF; lt_i > 0; lt_i--) {
  2604. if ($lt_i != "" && $lt_i != ".") {
  2605. if ($lt_i == "..") {
  2606. lt_count++;
  2607. } else {
  2608. if (lt_count == 0) {
  2609. lt_foo="/" $lt_i lt_foo;
  2610. } else {
  2611. lt_count--;
  2612. }
  2613. }
  2614. }
  2615. }
  2616. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  2617. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  2618. }'`
  2619. # AWK program above erroneously prepends '/' to C:/dos/paths
  2620. # for these hosts.
  2621. case $host_os in
  2622. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  2623. $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
  2624. esac
  2625. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  2626. else
  2627. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2628. fi])
  2629. library_names_spec=
  2630. libname_spec='lib$name'
  2631. soname_spec=
  2632. shrext_cmds=".so"
  2633. postinstall_cmds=
  2634. postuninstall_cmds=
  2635. finish_cmds=
  2636. finish_eval=
  2637. shlibpath_var=
  2638. shlibpath_overrides_runpath=unknown
  2639. version_type=none
  2640. dynamic_linker="$host_os ld.so"
  2641. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2642. need_lib_prefix=unknown
  2643. hardcode_into_libs=no
  2644. # when you set need_version to no, make sure it does not cause -set_version
  2645. # flags to be left without arguments
  2646. need_version=unknown
  2647. case $host_os in
  2648. aix3*)
  2649. version_type=linux # correct to gnu/linux during the next big refactor
  2650. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  2651. shlibpath_var=LIBPATH
  2652. # AIX 3 has no versioning support, so we append a major version to the name.
  2653. soname_spec='${libname}${release}${shared_ext}$major'
  2654. ;;
  2655. aix[[4-9]]*)
  2656. version_type=linux # correct to gnu/linux during the next big refactor
  2657. need_lib_prefix=no
  2658. need_version=no
  2659. hardcode_into_libs=yes
  2660. if test "$host_cpu" = ia64; then
  2661. # AIX 5 supports IA64
  2662. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  2663. shlibpath_var=LD_LIBRARY_PATH
  2664. else
  2665. # With GCC up to 2.95.x, collect2 would create an import file
  2666. # for dependence libraries. The import file would start with
  2667. # the line `#! .'. This would cause the generated library to
  2668. # depend on `.', always an invalid library. This was fixed in
  2669. # development snapshots of GCC prior to 3.0.
  2670. case $host_os in
  2671. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2672. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2673. echo ' yes '
  2674. echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  2675. :
  2676. else
  2677. can_build_shared=no
  2678. fi
  2679. ;;
  2680. esac
  2681. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  2682. # soname into executable. Probably we can add versioning support to
  2683. # collect2, so additional links can be useful in future.
  2684. if test "$aix_use_runtimelinking" = yes; then
  2685. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2686. # instead of lib<name>.a to let people know that these are not
  2687. # typical AIX shared libraries.
  2688. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2689. else
  2690. # We preserve .a as extension for shared libraries through AIX4.2
  2691. # and later when we are not doing run time linking.
  2692. library_names_spec='${libname}${release}.a $libname.a'
  2693. soname_spec='${libname}${release}${shared_ext}$major'
  2694. fi
  2695. shlibpath_var=LIBPATH
  2696. fi
  2697. ;;
  2698. amigaos*)
  2699. case $host_cpu in
  2700. powerpc)
  2701. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2702. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2703. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2704. ;;
  2705. m68k)
  2706. library_names_spec='$libname.ixlibrary $libname.a'
  2707. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2708. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  2709. ;;
  2710. esac
  2711. ;;
  2712. beos*)
  2713. library_names_spec='${libname}${shared_ext}'
  2714. dynamic_linker="$host_os ld.so"
  2715. shlibpath_var=LIBRARY_PATH
  2716. ;;
  2717. bsdi[[45]]*)
  2718. version_type=linux # correct to gnu/linux during the next big refactor
  2719. need_version=no
  2720. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2721. soname_spec='${libname}${release}${shared_ext}$major'
  2722. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2723. shlibpath_var=LD_LIBRARY_PATH
  2724. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2725. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2726. # the default ld.so.conf also contains /usr/contrib/lib and
  2727. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2728. # libtool to hard-code these into programs
  2729. ;;
  2730. cygwin* | mingw* | pw32* | cegcc*)
  2731. version_type=windows
  2732. shrext_cmds=".dll"
  2733. need_version=no
  2734. need_lib_prefix=no
  2735. case $GCC,$cc_basename in
  2736. yes,*)
  2737. # gcc
  2738. library_names_spec='$libname.dll.a'
  2739. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2740. postinstall_cmds='base_file=`basename \${file}`~
  2741. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2742. dldir=$destdir/`dirname \$dlpath`~
  2743. test -d \$dldir || mkdir -p \$dldir~
  2744. $install_prog $dir/$dlname \$dldir/$dlname~
  2745. chmod a+x \$dldir/$dlname~
  2746. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2747. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2748. fi'
  2749. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2750. dlpath=$dir/\$dldll~
  2751. $RM \$dlpath'
  2752. shlibpath_overrides_runpath=yes
  2753. case $host_os in
  2754. cygwin*)
  2755. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2756. #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2757. soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
  2758. m4_if([$1], [],[
  2759. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2760. ;;
  2761. mingw* | cegcc*)
  2762. # MinGW DLLs use traditional 'lib' prefix
  2763. #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2764. soname_spec='`echo ${libname} | $SED -e 's/^lib//'`${shared_ext}'
  2765. ;;
  2766. pw32*)
  2767. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2768. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2769. ;;
  2770. esac
  2771. dynamic_linker='Win32 ld.exe'
  2772. ;;
  2773. *,cl*)
  2774. # Native MSVC
  2775. libname_spec='$name'
  2776. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2777. library_names_spec='${libname}.dll.lib'
  2778. case $build_os in
  2779. mingw*)
  2780. sys_lib_search_path_spec=
  2781. lt_save_ifs=$IFS
  2782. IFS=';'
  2783. for lt_path in $LIB
  2784. do
  2785. IFS=$lt_save_ifs
  2786. # Let DOS variable expansion print the short 8.3 style file name.
  2787. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2788. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2789. done
  2790. IFS=$lt_save_ifs
  2791. # Convert to MSYS style.
  2792. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2793. ;;
  2794. cygwin*)
  2795. # Convert to unix form, then to dos form, then back to unix form
  2796. # but this time dos style (no spaces!) so that the unix form looks
  2797. # like /cygdrive/c/PROGRA~1:/cygdr...
  2798. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2799. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2800. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2801. ;;
  2802. *)
  2803. sys_lib_search_path_spec="$LIB"
  2804. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2805. # It is most probably a Windows format PATH.
  2806. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2807. else
  2808. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2809. fi
  2810. # FIXME: find the short name or the path components, as spaces are
  2811. # common. (e.g. "Program Files" -> "PROGRA~1")
  2812. ;;
  2813. esac
  2814. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2815. postinstall_cmds='base_file=`basename \${file}`~
  2816. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2817. dldir=$destdir/`dirname \$dlpath`~
  2818. test -d \$dldir || mkdir -p \$dldir~
  2819. $install_prog $dir/$dlname \$dldir/$dlname'
  2820. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2821. dlpath=$dir/\$dldll~
  2822. $RM \$dlpath'
  2823. shlibpath_overrides_runpath=yes
  2824. dynamic_linker='Win32 link.exe'
  2825. ;;
  2826. *)
  2827. # Assume MSVC wrapper
  2828. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  2829. dynamic_linker='Win32 ld.exe'
  2830. ;;
  2831. esac
  2832. # FIXME: first we should search . and the directory the executable is in
  2833. shlibpath_var=PATH
  2834. ;;
  2835. darwin* | rhapsody*)
  2836. dynamic_linker="$host_os dyld"
  2837. version_type=darwin
  2838. need_lib_prefix=no
  2839. need_version=no
  2840. library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  2841. soname_spec='${libname}${release}${major}$shared_ext'
  2842. shlibpath_overrides_runpath=yes
  2843. shlibpath_var=DYLD_LIBRARY_PATH
  2844. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2845. m4_if([$1], [],[
  2846. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2847. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2848. ;;
  2849. dgux*)
  2850. version_type=linux # correct to gnu/linux during the next big refactor
  2851. need_lib_prefix=no
  2852. need_version=no
  2853. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  2854. soname_spec='${libname}${release}${shared_ext}$major'
  2855. shlibpath_var=LD_LIBRARY_PATH
  2856. ;;
  2857. freebsd* | dragonfly*)
  2858. # DragonFly does not have aout. When/if they implement a new
  2859. # versioning mechanism, adjust this.
  2860. if test -x /usr/bin/objformat; then
  2861. objformat=`/usr/bin/objformat`
  2862. else
  2863. case $host_os in
  2864. freebsd[[23]].*) objformat=aout ;;
  2865. *) objformat=elf ;;
  2866. esac
  2867. fi
  2868. version_type=freebsd-$objformat
  2869. case $version_type in
  2870. freebsd-elf*)
  2871. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2872. need_version=no
  2873. need_lib_prefix=no
  2874. ;;
  2875. freebsd-*)
  2876. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  2877. need_version=yes
  2878. ;;
  2879. esac
  2880. shlibpath_var=LD_LIBRARY_PATH
  2881. case $host_os in
  2882. freebsd2.*)
  2883. shlibpath_overrides_runpath=yes
  2884. ;;
  2885. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2886. shlibpath_overrides_runpath=yes
  2887. hardcode_into_libs=yes
  2888. ;;
  2889. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2890. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2891. shlibpath_overrides_runpath=no
  2892. hardcode_into_libs=yes
  2893. ;;
  2894. *) # from 4.6 on, and DragonFly
  2895. shlibpath_overrides_runpath=yes
  2896. hardcode_into_libs=yes
  2897. ;;
  2898. esac
  2899. ;;
  2900. gnu*)
  2901. version_type=linux # correct to gnu/linux during the next big refactor
  2902. need_lib_prefix=no
  2903. need_version=no
  2904. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2905. soname_spec='${libname}${release}${shared_ext}$major'
  2906. shlibpath_var=LD_LIBRARY_PATH
  2907. shlibpath_overrides_runpath=no
  2908. hardcode_into_libs=yes
  2909. ;;
  2910. haiku*)
  2911. version_type=linux # correct to gnu/linux during the next big refactor
  2912. need_lib_prefix=no
  2913. need_version=no
  2914. dynamic_linker="$host_os runtime_loader"
  2915. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2916. soname_spec='${libname}${release}${shared_ext}$major'
  2917. shlibpath_var=LIBRARY_PATH
  2918. shlibpath_overrides_runpath=yes
  2919. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  2920. hardcode_into_libs=yes
  2921. ;;
  2922. hpux9* | hpux10* | hpux11*)
  2923. # Give a soname corresponding to the major version so that dld.sl refuses to
  2924. # link against other versions.
  2925. version_type=sunos
  2926. need_lib_prefix=no
  2927. need_version=no
  2928. case $host_cpu in
  2929. ia64*)
  2930. shrext_cmds='.so'
  2931. hardcode_into_libs=yes
  2932. dynamic_linker="$host_os dld.so"
  2933. shlibpath_var=LD_LIBRARY_PATH
  2934. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2935. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2936. soname_spec='${libname}${release}${shared_ext}$major'
  2937. if test "X$HPUX_IA64_MODE" = X32; then
  2938. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  2939. else
  2940. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  2941. fi
  2942. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2943. ;;
  2944. hppa*64*)
  2945. shrext_cmds='.sl'
  2946. hardcode_into_libs=yes
  2947. dynamic_linker="$host_os dld.sl"
  2948. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  2949. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  2950. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2951. soname_spec='${libname}${release}${shared_ext}$major'
  2952. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  2953. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  2954. ;;
  2955. *)
  2956. shrext_cmds='.sl'
  2957. dynamic_linker="$host_os dld.sl"
  2958. shlibpath_var=SHLIB_PATH
  2959. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2960. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2961. soname_spec='${libname}${release}${shared_ext}$major'
  2962. ;;
  2963. esac
  2964. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  2965. postinstall_cmds='chmod 555 $lib'
  2966. # or fails outright, so override atomically:
  2967. install_override_mode=555
  2968. ;;
  2969. interix[[3-9]]*)
  2970. version_type=linux # correct to gnu/linux during the next big refactor
  2971. need_lib_prefix=no
  2972. need_version=no
  2973. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2974. soname_spec='${libname}${release}${shared_ext}$major'
  2975. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  2976. shlibpath_var=LD_LIBRARY_PATH
  2977. shlibpath_overrides_runpath=no
  2978. hardcode_into_libs=yes
  2979. ;;
  2980. irix5* | irix6* | nonstopux*)
  2981. case $host_os in
  2982. nonstopux*) version_type=nonstopux ;;
  2983. *)
  2984. if test "$lt_cv_prog_gnu_ld" = yes; then
  2985. version_type=linux # correct to gnu/linux during the next big refactor
  2986. else
  2987. version_type=irix
  2988. fi ;;
  2989. esac
  2990. need_lib_prefix=no
  2991. need_version=no
  2992. soname_spec='${libname}${release}${shared_ext}$major'
  2993. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  2994. case $host_os in
  2995. irix5* | nonstopux*)
  2996. libsuff= shlibsuff=
  2997. ;;
  2998. *)
  2999. case $LD in # libtool.m4 will add one of these switches to LD
  3000. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  3001. libsuff= shlibsuff= libmagic=32-bit;;
  3002. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  3003. libsuff=32 shlibsuff=N32 libmagic=N32;;
  3004. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  3005. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  3006. *) libsuff= shlibsuff= libmagic=never-match;;
  3007. esac
  3008. ;;
  3009. esac
  3010. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  3011. shlibpath_overrides_runpath=no
  3012. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  3013. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  3014. hardcode_into_libs=yes
  3015. ;;
  3016. # No shared lib support for Linux oldld, aout, or coff.
  3017. linux*oldld* | linux*aout* | linux*coff*)
  3018. dynamic_linker=no
  3019. ;;
  3020. # This must be glibc/ELF.
  3021. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3022. version_type=linux # correct to gnu/linux during the next big refactor
  3023. need_lib_prefix=no
  3024. need_version=no
  3025. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3026. soname_spec='${libname}${release}${shared_ext}$major'
  3027. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  3028. shlibpath_var=LD_LIBRARY_PATH
  3029. shlibpath_overrides_runpath=no
  3030. # Some binutils ld are patched to set DT_RUNPATH
  3031. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  3032. [lt_cv_shlibpath_overrides_runpath=no
  3033. save_LDFLAGS=$LDFLAGS
  3034. save_libdir=$libdir
  3035. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  3036. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  3037. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  3038. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  3039. [lt_cv_shlibpath_overrides_runpath=yes])])
  3040. LDFLAGS=$save_LDFLAGS
  3041. libdir=$save_libdir
  3042. ])
  3043. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  3044. # This implies no fast_install, which is unacceptable.
  3045. # Some rework will be needed to allow for fast_install
  3046. # before this can be enabled.
  3047. hardcode_into_libs=yes
  3048. # Append ld.so.conf contents to the search path
  3049. if test -f /etc/ld.so.conf; then
  3050. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
  3051. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  3052. fi
  3053. # We used to test for /lib/ld.so.1 and disable shared libraries on
  3054. # powerpc, because MkLinux only supported shared libraries with the
  3055. # GNU dynamic linker. Since this was broken with cross compilers,
  3056. # most powerpc-linux boxes support dynamic linking these days and
  3057. # people can always --disable-shared, the test was removed, and we
  3058. # assume the GNU/Linux dynamic linker is in use.
  3059. dynamic_linker='GNU/Linux ld.so'
  3060. ;;
  3061. netbsd*)
  3062. version_type=sunos
  3063. need_lib_prefix=no
  3064. need_version=no
  3065. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  3066. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3067. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  3068. dynamic_linker='NetBSD (a.out) ld.so'
  3069. else
  3070. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  3071. soname_spec='${libname}${release}${shared_ext}$major'
  3072. dynamic_linker='NetBSD ld.elf_so'
  3073. fi
  3074. shlibpath_var=LD_LIBRARY_PATH
  3075. shlibpath_overrides_runpath=yes
  3076. hardcode_into_libs=yes
  3077. ;;
  3078. newsos6)
  3079. version_type=linux # correct to gnu/linux during the next big refactor
  3080. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3081. shlibpath_var=LD_LIBRARY_PATH
  3082. shlibpath_overrides_runpath=yes
  3083. ;;
  3084. *nto* | *qnx*)
  3085. version_type=qnx
  3086. need_lib_prefix=no
  3087. need_version=no
  3088. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3089. soname_spec='${libname}${release}${shared_ext}$major'
  3090. shlibpath_var=LD_LIBRARY_PATH
  3091. shlibpath_overrides_runpath=no
  3092. hardcode_into_libs=yes
  3093. dynamic_linker='ldqnx.so'
  3094. ;;
  3095. openbsd*)
  3096. version_type=sunos
  3097. sys_lib_dlsearch_path_spec="/usr/lib"
  3098. need_lib_prefix=no
  3099. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  3100. case $host_os in
  3101. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  3102. *) need_version=no ;;
  3103. esac
  3104. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3105. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  3106. shlibpath_var=LD_LIBRARY_PATH
  3107. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3108. case $host_os in
  3109. openbsd2.[[89]] | openbsd2.[[89]].*)
  3110. shlibpath_overrides_runpath=no
  3111. ;;
  3112. *)
  3113. shlibpath_overrides_runpath=yes
  3114. ;;
  3115. esac
  3116. else
  3117. shlibpath_overrides_runpath=yes
  3118. fi
  3119. ;;
  3120. os2*)
  3121. libname_spec='$name'
  3122. shrext_cmds=".dll"
  3123. need_lib_prefix=no
  3124. library_names_spec='$libname${shared_ext} $libname.a'
  3125. dynamic_linker='OS/2 ld.exe'
  3126. shlibpath_var=LIBPATH
  3127. ;;
  3128. osf3* | osf4* | osf5*)
  3129. version_type=osf
  3130. need_lib_prefix=no
  3131. need_version=no
  3132. soname_spec='${libname}${release}${shared_ext}$major'
  3133. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3134. shlibpath_var=LD_LIBRARY_PATH
  3135. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  3136. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  3137. ;;
  3138. rdos*)
  3139. dynamic_linker=no
  3140. ;;
  3141. solaris*)
  3142. version_type=linux # correct to gnu/linux during the next big refactor
  3143. need_lib_prefix=no
  3144. need_version=no
  3145. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3146. soname_spec='${libname}${release}${shared_ext}$major'
  3147. shlibpath_var=LD_LIBRARY_PATH
  3148. shlibpath_overrides_runpath=yes
  3149. hardcode_into_libs=yes
  3150. # ldd complains unless libraries are executable
  3151. postinstall_cmds='chmod +x $lib'
  3152. ;;
  3153. sunos4*)
  3154. version_type=sunos
  3155. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3156. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  3157. shlibpath_var=LD_LIBRARY_PATH
  3158. shlibpath_overrides_runpath=yes
  3159. if test "$with_gnu_ld" = yes; then
  3160. need_lib_prefix=no
  3161. fi
  3162. need_version=yes
  3163. ;;
  3164. sysv4 | sysv4.3*)
  3165. version_type=linux # correct to gnu/linux during the next big refactor
  3166. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3167. soname_spec='${libname}${release}${shared_ext}$major'
  3168. shlibpath_var=LD_LIBRARY_PATH
  3169. case $host_vendor in
  3170. sni)
  3171. shlibpath_overrides_runpath=no
  3172. need_lib_prefix=no
  3173. runpath_var=LD_RUN_PATH
  3174. ;;
  3175. siemens)
  3176. need_lib_prefix=no
  3177. ;;
  3178. motorola)
  3179. need_lib_prefix=no
  3180. need_version=no
  3181. shlibpath_overrides_runpath=no
  3182. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  3183. ;;
  3184. esac
  3185. ;;
  3186. sysv4*MP*)
  3187. if test -d /usr/nec ;then
  3188. version_type=linux # correct to gnu/linux during the next big refactor
  3189. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  3190. soname_spec='$libname${shared_ext}.$major'
  3191. shlibpath_var=LD_LIBRARY_PATH
  3192. fi
  3193. ;;
  3194. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3195. version_type=freebsd-elf
  3196. need_lib_prefix=no
  3197. need_version=no
  3198. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  3199. soname_spec='${libname}${release}${shared_ext}$major'
  3200. shlibpath_var=LD_LIBRARY_PATH
  3201. shlibpath_overrides_runpath=yes
  3202. hardcode_into_libs=yes
  3203. if test "$with_gnu_ld" = yes; then
  3204. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  3205. else
  3206. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  3207. case $host_os in
  3208. sco3.2v5*)
  3209. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  3210. ;;
  3211. esac
  3212. fi
  3213. sys_lib_dlsearch_path_spec='/usr/lib'
  3214. ;;
  3215. tpf*)
  3216. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  3217. version_type=linux # correct to gnu/linux during the next big refactor
  3218. need_lib_prefix=no
  3219. need_version=no
  3220. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3221. shlibpath_var=LD_LIBRARY_PATH
  3222. shlibpath_overrides_runpath=no
  3223. hardcode_into_libs=yes
  3224. ;;
  3225. uts4*)
  3226. version_type=linux # correct to gnu/linux during the next big refactor
  3227. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3228. soname_spec='${libname}${release}${shared_ext}$major'
  3229. shlibpath_var=LD_LIBRARY_PATH
  3230. ;;
  3231. *)
  3232. dynamic_linker=no
  3233. ;;
  3234. esac
  3235. AC_MSG_RESULT([$dynamic_linker])
  3236. test "$dynamic_linker" = no && can_build_shared=no
  3237. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  3238. if test "$GCC" = yes; then
  3239. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  3240. fi
  3241. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  3242. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  3243. fi
  3244. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  3245. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  3246. fi
  3247. _LT_DECL([], [variables_saved_for_relink], [1],
  3248. [Variables whose values should be saved in libtool wrapper scripts and
  3249. restored at link time])
  3250. _LT_DECL([], [need_lib_prefix], [0],
  3251. [Do we need the "lib" prefix for modules?])
  3252. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  3253. _LT_DECL([], [version_type], [0], [Library versioning type])
  3254. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  3255. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  3256. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  3257. [Is shlibpath searched before the hard-coded library search path?])
  3258. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  3259. _LT_DECL([], [library_names_spec], [1],
  3260. [[List of archive names. First name is the real one, the rest are links.
  3261. The last name is the one that the linker finds with -lNAME]])
  3262. _LT_DECL([], [soname_spec], [1],
  3263. [[The coded name of the library, if different from the real name]])
  3264. _LT_DECL([], [install_override_mode], [1],
  3265. [Permission mode override for installation of shared libraries])
  3266. _LT_DECL([], [postinstall_cmds], [2],
  3267. [Command to use after installation of a shared archive])
  3268. _LT_DECL([], [postuninstall_cmds], [2],
  3269. [Command to use after uninstallation of a shared archive])
  3270. _LT_DECL([], [finish_cmds], [2],
  3271. [Commands used to finish a libtool library installation in a directory])
  3272. _LT_DECL([], [finish_eval], [1],
  3273. [[As "finish_cmds", except a single script fragment to be evaled but
  3274. not shown]])
  3275. _LT_DECL([], [hardcode_into_libs], [0],
  3276. [Whether we should hardcode library paths into libraries])
  3277. _LT_DECL([], [sys_lib_search_path_spec], [2],
  3278. [Compile-time system search path for libraries])
  3279. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  3280. [Run-time system search path for libraries])
  3281. ])# _LT_SYS_DYNAMIC_LINKER
  3282. # _LT_PATH_TOOL_PREFIX(TOOL)
  3283. # --------------------------
  3284. # find a file program which can recognize shared library
  3285. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  3286. [m4_require([_LT_DECL_EGREP])dnl
  3287. AC_MSG_CHECKING([for $1])
  3288. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  3289. [case $MAGIC_CMD in
  3290. [[\\/*] | ?:[\\/]*])
  3291. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  3292. ;;
  3293. *)
  3294. lt_save_MAGIC_CMD="$MAGIC_CMD"
  3295. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3296. dnl $ac_dummy forces splitting on constant user-supplied paths.
  3297. dnl POSIX.2 word splitting is done only on the output of word expansions,
  3298. dnl not every word. This closes a longstanding sh security hole.
  3299. ac_dummy="m4_if([$2], , $PATH, [$2])"
  3300. for ac_dir in $ac_dummy; do
  3301. IFS="$lt_save_ifs"
  3302. test -z "$ac_dir" && ac_dir=.
  3303. if test -f $ac_dir/$1; then
  3304. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  3305. if test -n "$file_magic_test_file"; then
  3306. case $deplibs_check_method in
  3307. "file_magic "*)
  3308. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  3309. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3310. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  3311. $EGREP "$file_magic_regex" > /dev/null; then
  3312. :
  3313. else
  3314. cat <<_LT_EOF 1>&2
  3315. *** Warning: the command libtool uses to detect shared libraries,
  3316. *** $file_magic_cmd, produces output that libtool cannot recognize.
  3317. *** The result is that libtool may fail to recognize shared libraries
  3318. *** as such. This will affect the creation of libtool libraries that
  3319. *** depend on shared libraries, but programs linked with such libtool
  3320. *** libraries will work regardless of this problem. Nevertheless, you
  3321. *** may want to report the problem to your system manager and/or to
  3322. *** bug-libtool@gnu.org
  3323. _LT_EOF
  3324. fi ;;
  3325. esac
  3326. fi
  3327. break
  3328. fi
  3329. done
  3330. IFS="$lt_save_ifs"
  3331. MAGIC_CMD="$lt_save_MAGIC_CMD"
  3332. ;;
  3333. esac])
  3334. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3335. if test -n "$MAGIC_CMD"; then
  3336. AC_MSG_RESULT($MAGIC_CMD)
  3337. else
  3338. AC_MSG_RESULT(no)
  3339. fi
  3340. _LT_DECL([], [MAGIC_CMD], [0],
  3341. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  3342. ])# _LT_PATH_TOOL_PREFIX
  3343. # Old name:
  3344. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  3345. dnl aclocal-1.4 backwards compatibility:
  3346. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  3347. # _LT_PATH_MAGIC
  3348. # --------------
  3349. # find a file program which can recognize a shared library
  3350. m4_defun([_LT_PATH_MAGIC],
  3351. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  3352. if test -z "$lt_cv_path_MAGIC_CMD"; then
  3353. if test -n "$ac_tool_prefix"; then
  3354. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  3355. else
  3356. MAGIC_CMD=:
  3357. fi
  3358. fi
  3359. ])# _LT_PATH_MAGIC
  3360. # LT_PATH_LD
  3361. # ----------
  3362. # find the pathname to the GNU or non-GNU linker
  3363. AC_DEFUN([LT_PATH_LD],
  3364. [AC_REQUIRE([AC_PROG_CC])dnl
  3365. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3366. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  3367. m4_require([_LT_DECL_SED])dnl
  3368. m4_require([_LT_DECL_EGREP])dnl
  3369. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  3370. AC_ARG_WITH([gnu-ld],
  3371. [AS_HELP_STRING([--with-gnu-ld],
  3372. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  3373. [test "$withval" = no || with_gnu_ld=yes],
  3374. [with_gnu_ld=no])dnl
  3375. ac_prog=ld
  3376. if test "$GCC" = yes; then
  3377. # Check if gcc -print-prog-name=ld gives a path.
  3378. AC_MSG_CHECKING([for ld used by $CC])
  3379. case $host in
  3380. *-*-mingw*)
  3381. # gcc leaves a trailing carriage return which upsets mingw
  3382. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  3383. *)
  3384. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  3385. esac
  3386. case $ac_prog in
  3387. # Accept absolute paths.
  3388. [[\\/]]* | ?:[[\\/]]*)
  3389. re_direlt='/[[^/]][[^/]]*/\.\./'
  3390. # Canonicalize the pathname of ld
  3391. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  3392. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  3393. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  3394. done
  3395. test -z "$LD" && LD="$ac_prog"
  3396. ;;
  3397. "")
  3398. # If it fails, then pretend we aren't using GCC.
  3399. ac_prog=ld
  3400. ;;
  3401. *)
  3402. # If it is relative, then search for the first ld in PATH.
  3403. with_gnu_ld=unknown
  3404. ;;
  3405. esac
  3406. elif test "$with_gnu_ld" = yes; then
  3407. AC_MSG_CHECKING([for GNU ld])
  3408. else
  3409. AC_MSG_CHECKING([for non-GNU ld])
  3410. fi
  3411. AC_CACHE_VAL(lt_cv_path_LD,
  3412. [if test -z "$LD"; then
  3413. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3414. for ac_dir in $PATH; do
  3415. IFS="$lt_save_ifs"
  3416. test -z "$ac_dir" && ac_dir=.
  3417. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  3418. lt_cv_path_LD="$ac_dir/$ac_prog"
  3419. # Check to see if the program is GNU ld. I'd rather use --version,
  3420. # but apparently some variants of GNU ld only accept -v.
  3421. # Break only if it was the GNU/non-GNU ld that we prefer.
  3422. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  3423. *GNU* | *'with BFD'*)
  3424. test "$with_gnu_ld" != no && break
  3425. ;;
  3426. *)
  3427. test "$with_gnu_ld" != yes && break
  3428. ;;
  3429. esac
  3430. fi
  3431. done
  3432. IFS="$lt_save_ifs"
  3433. else
  3434. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  3435. fi])
  3436. LD="$lt_cv_path_LD"
  3437. if test -n "$LD"; then
  3438. AC_MSG_RESULT($LD)
  3439. else
  3440. AC_MSG_RESULT(no)
  3441. fi
  3442. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3443. _LT_PATH_LD_GNU
  3444. AC_SUBST([LD])
  3445. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  3446. ])# LT_PATH_LD
  3447. # Old names:
  3448. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  3449. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  3450. dnl aclocal-1.4 backwards compatibility:
  3451. dnl AC_DEFUN([AM_PROG_LD], [])
  3452. dnl AC_DEFUN([AC_PROG_LD], [])
  3453. # _LT_PATH_LD_GNU
  3454. #- --------------
  3455. m4_defun([_LT_PATH_LD_GNU],
  3456. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3457. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3458. case `$LD -v 2>&1 </dev/null` in
  3459. *GNU* | *'with BFD'*)
  3460. lt_cv_prog_gnu_ld=yes
  3461. ;;
  3462. *)
  3463. lt_cv_prog_gnu_ld=no
  3464. ;;
  3465. esac])
  3466. with_gnu_ld=$lt_cv_prog_gnu_ld
  3467. ])# _LT_PATH_LD_GNU
  3468. # _LT_CMD_RELOAD
  3469. # --------------
  3470. # find reload flag for linker
  3471. # -- PORTME Some linkers may need a different reload flag.
  3472. m4_defun([_LT_CMD_RELOAD],
  3473. [AC_CACHE_CHECK([for $LD option to reload object files],
  3474. lt_cv_ld_reload_flag,
  3475. [lt_cv_ld_reload_flag='-r'])
  3476. reload_flag=$lt_cv_ld_reload_flag
  3477. case $reload_flag in
  3478. "" | " "*) ;;
  3479. *) reload_flag=" $reload_flag" ;;
  3480. esac
  3481. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3482. case $host_os in
  3483. cygwin* | mingw* | pw32* | cegcc*)
  3484. if test "$GCC" != yes; then
  3485. reload_cmds=false
  3486. fi
  3487. ;;
  3488. darwin*)
  3489. if test "$GCC" = yes; then
  3490. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  3491. else
  3492. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3493. fi
  3494. ;;
  3495. esac
  3496. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3497. _LT_TAGDECL([], [reload_cmds], [2])dnl
  3498. ])# _LT_CMD_RELOAD
  3499. # _LT_CHECK_MAGIC_METHOD
  3500. # ----------------------
  3501. # how to check for library dependencies
  3502. # -- PORTME fill in with the dynamic library characteristics
  3503. m4_defun([_LT_CHECK_MAGIC_METHOD],
  3504. [m4_require([_LT_DECL_EGREP])
  3505. m4_require([_LT_DECL_OBJDUMP])
  3506. AC_CACHE_CHECK([how to recognize dependent libraries],
  3507. lt_cv_deplibs_check_method,
  3508. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3509. lt_cv_file_magic_test_file=
  3510. lt_cv_deplibs_check_method='unknown'
  3511. # Need to set the preceding variable on all platforms that support
  3512. # interlibrary dependencies.
  3513. # 'none' -- dependencies not supported.
  3514. # `unknown' -- same as none, but documents that we really don't know.
  3515. # 'pass_all' -- all dependencies passed with no checks.
  3516. # 'test_compile' -- check by making test program.
  3517. # 'file_magic [[regex]]' -- check by looking for files in library path
  3518. # which responds to the $file_magic_cmd with a given extended regex.
  3519. # If you have `file' or equivalent on your system and you're not sure
  3520. # whether `pass_all' will *always* work, you probably want this one.
  3521. case $host_os in
  3522. aix[[4-9]]*)
  3523. lt_cv_deplibs_check_method=pass_all
  3524. ;;
  3525. beos*)
  3526. lt_cv_deplibs_check_method=pass_all
  3527. ;;
  3528. bsdi[[45]]*)
  3529. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3530. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3531. lt_cv_file_magic_test_file=/shlib/libc.so
  3532. ;;
  3533. cygwin*)
  3534. # func_win32_libid is a shell function defined in ltmain.sh
  3535. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3536. lt_cv_file_magic_cmd='func_win32_libid'
  3537. lt_cv_deplibs_check_method=pass_all
  3538. ;;
  3539. mingw* | pw32*)
  3540. # Base MSYS/MinGW do not provide the 'file' command needed by
  3541. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3542. # unless we find 'file', for example because we are cross-compiling.
  3543. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  3544. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  3545. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3546. lt_cv_file_magic_cmd='func_win32_libid'
  3547. else
  3548. # Keep this pattern in sync with the one in func_win32_libid.
  3549. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  3550. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3551. fi
  3552. lt_cv_deplibs_check_method=pass_all
  3553. ;;
  3554. cegcc*)
  3555. # use the weaker test based on 'objdump'. See mingw*.
  3556. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3557. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3558. ;;
  3559. darwin* | rhapsody*)
  3560. lt_cv_deplibs_check_method=pass_all
  3561. ;;
  3562. freebsd* | dragonfly*)
  3563. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3564. case $host_cpu in
  3565. i*86 )
  3566. # Not sure whether the presence of OpenBSD here was a mistake.
  3567. # Let's accept both of them until this is cleared up.
  3568. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3569. lt_cv_file_magic_cmd=/usr/bin/file
  3570. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3571. ;;
  3572. esac
  3573. else
  3574. lt_cv_deplibs_check_method=pass_all
  3575. fi
  3576. ;;
  3577. gnu*)
  3578. lt_cv_deplibs_check_method=pass_all
  3579. ;;
  3580. haiku*)
  3581. lt_cv_deplibs_check_method=pass_all
  3582. ;;
  3583. hpux10.20* | hpux11*)
  3584. lt_cv_file_magic_cmd=/usr/bin/file
  3585. case $host_cpu in
  3586. ia64*)
  3587. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3588. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3589. ;;
  3590. hppa*64*)
  3591. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
  3592. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3593. ;;
  3594. *)
  3595. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3596. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3597. ;;
  3598. esac
  3599. ;;
  3600. interix[[3-9]]*)
  3601. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3602. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3603. ;;
  3604. irix5* | irix6* | nonstopux*)
  3605. case $LD in
  3606. *-32|*"-32 ") libmagic=32-bit;;
  3607. *-n32|*"-n32 ") libmagic=N32;;
  3608. *-64|*"-64 ") libmagic=64-bit;;
  3609. *) libmagic=never-match;;
  3610. esac
  3611. lt_cv_deplibs_check_method=pass_all
  3612. ;;
  3613. # This must be glibc/ELF.
  3614. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3615. lt_cv_deplibs_check_method=pass_all
  3616. ;;
  3617. netbsd*)
  3618. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3619. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3620. else
  3621. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3622. fi
  3623. ;;
  3624. newos6*)
  3625. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3626. lt_cv_file_magic_cmd=/usr/bin/file
  3627. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3628. ;;
  3629. *nto* | *qnx*)
  3630. lt_cv_deplibs_check_method=pass_all
  3631. ;;
  3632. openbsd*)
  3633. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3634. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3635. else
  3636. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3637. fi
  3638. ;;
  3639. osf3* | osf4* | osf5*)
  3640. lt_cv_deplibs_check_method=pass_all
  3641. ;;
  3642. rdos*)
  3643. lt_cv_deplibs_check_method=pass_all
  3644. ;;
  3645. solaris*)
  3646. lt_cv_deplibs_check_method=pass_all
  3647. ;;
  3648. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3649. lt_cv_deplibs_check_method=pass_all
  3650. ;;
  3651. sysv4 | sysv4.3*)
  3652. case $host_vendor in
  3653. motorola)
  3654. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
  3655. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3656. ;;
  3657. ncr)
  3658. lt_cv_deplibs_check_method=pass_all
  3659. ;;
  3660. sequent)
  3661. lt_cv_file_magic_cmd='/bin/file'
  3662. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3663. ;;
  3664. sni)
  3665. lt_cv_file_magic_cmd='/bin/file'
  3666. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3667. lt_cv_file_magic_test_file=/lib/libc.so
  3668. ;;
  3669. siemens)
  3670. lt_cv_deplibs_check_method=pass_all
  3671. ;;
  3672. pc)
  3673. lt_cv_deplibs_check_method=pass_all
  3674. ;;
  3675. esac
  3676. ;;
  3677. tpf*)
  3678. lt_cv_deplibs_check_method=pass_all
  3679. ;;
  3680. esac
  3681. ])
  3682. file_magic_glob=
  3683. want_nocaseglob=no
  3684. if test "$build" = "$host"; then
  3685. case $host_os in
  3686. mingw* | pw32*)
  3687. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3688. want_nocaseglob=yes
  3689. else
  3690. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3691. fi
  3692. ;;
  3693. esac
  3694. fi
  3695. file_magic_cmd=$lt_cv_file_magic_cmd
  3696. deplibs_check_method=$lt_cv_deplibs_check_method
  3697. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3698. _LT_DECL([], [deplibs_check_method], [1],
  3699. [Method to check whether dependent libraries are shared objects])
  3700. _LT_DECL([], [file_magic_cmd], [1],
  3701. [Command to use when deplibs_check_method = "file_magic"])
  3702. _LT_DECL([], [file_magic_glob], [1],
  3703. [How to find potential files when deplibs_check_method = "file_magic"])
  3704. _LT_DECL([], [want_nocaseglob], [1],
  3705. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3706. ])# _LT_CHECK_MAGIC_METHOD
  3707. # LT_PATH_NM
  3708. # ----------
  3709. # find the pathname to a BSD- or MS-compatible name lister
  3710. AC_DEFUN([LT_PATH_NM],
  3711. [AC_REQUIRE([AC_PROG_CC])dnl
  3712. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3713. [if test -n "$NM"; then
  3714. # Let the user override the test.
  3715. lt_cv_path_NM="$NM"
  3716. else
  3717. lt_nm_to_check="${ac_tool_prefix}nm"
  3718. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3719. lt_nm_to_check="$lt_nm_to_check nm"
  3720. fi
  3721. for lt_tmp_nm in $lt_nm_to_check; do
  3722. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3723. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3724. IFS="$lt_save_ifs"
  3725. test -z "$ac_dir" && ac_dir=.
  3726. tmp_nm="$ac_dir/$lt_tmp_nm"
  3727. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  3728. # Check to see if the nm accepts a BSD-compat flag.
  3729. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3730. # nm: unknown option "B" ignored
  3731. # Tru64's nm complains that /dev/null is an invalid object file
  3732. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  3733. */dev/null* | *'Invalid file or object type'*)
  3734. lt_cv_path_NM="$tmp_nm -B"
  3735. break
  3736. ;;
  3737. *)
  3738. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3739. */dev/null*)
  3740. lt_cv_path_NM="$tmp_nm -p"
  3741. break
  3742. ;;
  3743. *)
  3744. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3745. continue # so that we can try to find one that supports BSD flags
  3746. ;;
  3747. esac
  3748. ;;
  3749. esac
  3750. fi
  3751. done
  3752. IFS="$lt_save_ifs"
  3753. done
  3754. : ${lt_cv_path_NM=no}
  3755. fi])
  3756. if test "$lt_cv_path_NM" != "no"; then
  3757. NM="$lt_cv_path_NM"
  3758. else
  3759. # Didn't find any BSD compatible name lister, look for dumpbin.
  3760. if test -n "$DUMPBIN"; then :
  3761. # Let the user override the test.
  3762. else
  3763. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3764. case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
  3765. *COFF*)
  3766. DUMPBIN="$DUMPBIN -symbols"
  3767. ;;
  3768. *)
  3769. DUMPBIN=:
  3770. ;;
  3771. esac
  3772. fi
  3773. AC_SUBST([DUMPBIN])
  3774. if test "$DUMPBIN" != ":"; then
  3775. NM="$DUMPBIN"
  3776. fi
  3777. fi
  3778. test -z "$NM" && NM=nm
  3779. AC_SUBST([NM])
  3780. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3781. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3782. [lt_cv_nm_interface="BSD nm"
  3783. echo "int some_variable = 0;" > conftest.$ac_ext
  3784. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3785. (eval "$ac_compile" 2>conftest.err)
  3786. cat conftest.err >&AS_MESSAGE_LOG_FD
  3787. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3788. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3789. cat conftest.err >&AS_MESSAGE_LOG_FD
  3790. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3791. cat conftest.out >&AS_MESSAGE_LOG_FD
  3792. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3793. lt_cv_nm_interface="MS dumpbin"
  3794. fi
  3795. rm -f conftest*])
  3796. ])# LT_PATH_NM
  3797. # Old names:
  3798. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3799. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3800. dnl aclocal-1.4 backwards compatibility:
  3801. dnl AC_DEFUN([AM_PROG_NM], [])
  3802. dnl AC_DEFUN([AC_PROG_NM], [])
  3803. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3804. # --------------------------------
  3805. # how to determine the name of the shared library
  3806. # associated with a specific link library.
  3807. # -- PORTME fill in with the dynamic library characteristics
  3808. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3809. [m4_require([_LT_DECL_EGREP])
  3810. m4_require([_LT_DECL_OBJDUMP])
  3811. m4_require([_LT_DECL_DLLTOOL])
  3812. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3813. lt_cv_sharedlib_from_linklib_cmd,
  3814. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3815. case $host_os in
  3816. cygwin* | mingw* | pw32* | cegcc*)
  3817. # two different shell functions defined in ltmain.sh
  3818. # decide which to use based on capabilities of $DLLTOOL
  3819. case `$DLLTOOL --help 2>&1` in
  3820. *--identify-strict*)
  3821. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3822. ;;
  3823. *)
  3824. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3825. ;;
  3826. esac
  3827. ;;
  3828. *)
  3829. # fallback: assume linklib IS sharedlib
  3830. lt_cv_sharedlib_from_linklib_cmd="$ECHO"
  3831. ;;
  3832. esac
  3833. ])
  3834. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3835. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3836. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3837. [Command to associate shared and link libraries])
  3838. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3839. # _LT_PATH_MANIFEST_TOOL
  3840. # ----------------------
  3841. # locate the manifest tool
  3842. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3843. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3844. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3845. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3846. [lt_cv_path_mainfest_tool=no
  3847. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3848. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3849. cat conftest.err >&AS_MESSAGE_LOG_FD
  3850. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3851. lt_cv_path_mainfest_tool=yes
  3852. fi
  3853. rm -f conftest*])
  3854. if test "x$lt_cv_path_mainfest_tool" != xyes; then
  3855. MANIFEST_TOOL=:
  3856. fi
  3857. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3858. ])# _LT_PATH_MANIFEST_TOOL
  3859. # LT_LIB_M
  3860. # --------
  3861. # check for math library
  3862. AC_DEFUN([LT_LIB_M],
  3863. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3864. LIBM=
  3865. case $host in
  3866. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3867. # These system don't have libm, or don't need it
  3868. ;;
  3869. *-ncr-sysv4.3*)
  3870. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3871. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3872. ;;
  3873. *)
  3874. AC_CHECK_LIB(m, cos, LIBM="-lm")
  3875. ;;
  3876. esac
  3877. AC_SUBST([LIBM])
  3878. ])# LT_LIB_M
  3879. # Old name:
  3880. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3881. dnl aclocal-1.4 backwards compatibility:
  3882. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3883. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3884. # -------------------------------
  3885. m4_defun([_LT_COMPILER_NO_RTTI],
  3886. [m4_require([_LT_TAG_COMPILER])dnl
  3887. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3888. if test "$GCC" = yes; then
  3889. case $cc_basename in
  3890. nvcc*)
  3891. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3892. *)
  3893. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3894. esac
  3895. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3896. lt_cv_prog_compiler_rtti_exceptions,
  3897. [-fno-rtti -fno-exceptions], [],
  3898. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3899. fi
  3900. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3901. [Compiler flag to turn off builtin functions])
  3902. ])# _LT_COMPILER_NO_RTTI
  3903. # _LT_CMD_GLOBAL_SYMBOLS
  3904. # ----------------------
  3905. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3906. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3907. AC_REQUIRE([AC_PROG_CC])dnl
  3908. AC_REQUIRE([AC_PROG_AWK])dnl
  3909. AC_REQUIRE([LT_PATH_NM])dnl
  3910. AC_REQUIRE([LT_PATH_LD])dnl
  3911. m4_require([_LT_DECL_SED])dnl
  3912. m4_require([_LT_DECL_EGREP])dnl
  3913. m4_require([_LT_TAG_COMPILER])dnl
  3914. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3915. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3916. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3917. [
  3918. # These are sane defaults that work on at least a few old systems.
  3919. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3920. # Character class describing NM global symbol codes.
  3921. symcode='[[BCDEGRST]]'
  3922. # Regexp to match symbols that can be accessed directly from C.
  3923. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3924. # Define system-specific variables.
  3925. case $host_os in
  3926. aix*)
  3927. symcode='[[BCDT]]'
  3928. ;;
  3929. cygwin* | mingw* | pw32* | cegcc*)
  3930. symcode='[[ABCDGISTW]]'
  3931. ;;
  3932. hpux*)
  3933. if test "$host_cpu" = ia64; then
  3934. symcode='[[ABCDEGRST]]'
  3935. fi
  3936. ;;
  3937. irix* | nonstopux*)
  3938. symcode='[[BCDEGRST]]'
  3939. ;;
  3940. osf*)
  3941. symcode='[[BCDEGQRST]]'
  3942. ;;
  3943. solaris*)
  3944. symcode='[[BDRT]]'
  3945. ;;
  3946. sco3.2v5*)
  3947. symcode='[[DT]]'
  3948. ;;
  3949. sysv4.2uw2*)
  3950. symcode='[[DT]]'
  3951. ;;
  3952. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  3953. symcode='[[ABDT]]'
  3954. ;;
  3955. sysv4)
  3956. symcode='[[DFNSTU]]'
  3957. ;;
  3958. esac
  3959. # If we're using GNU nm, then use its standard symbol codes.
  3960. case `$NM -V 2>&1` in
  3961. *GNU* | *'with BFD'*)
  3962. symcode='[[ABCDGIRSTW]]' ;;
  3963. esac
  3964. # Transform an extracted symbol line into a proper C declaration.
  3965. # Some systems (esp. on ia64) link data and code symbols differently,
  3966. # so use this general approach.
  3967. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3968. # Transform an extracted symbol line into symbol name and symbol address
  3969. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  3970. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
  3971. # Handle CRLF in mingw tool chain
  3972. opt_cr=
  3973. case $build_os in
  3974. mingw*)
  3975. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3976. ;;
  3977. esac
  3978. # Try without a prefix underscore, then with it.
  3979. for ac_symprfx in "" "_"; do
  3980. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  3981. symxfrm="\\1 $ac_symprfx\\2 \\2"
  3982. # Write the raw and C identifiers.
  3983. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  3984. # Fake it for dumpbin and say T for any non-static function
  3985. # and D for any global variable.
  3986. # Also find C++ and __fastcall symbols from MSVC++,
  3987. # which start with @ or ?.
  3988. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  3989. " {last_section=section; section=\$ 3};"\
  3990. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  3991. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  3992. " \$ 0!~/External *\|/{next};"\
  3993. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  3994. " {if(hide[section]) next};"\
  3995. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  3996. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  3997. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  3998. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  3999. " ' prfx=^$ac_symprfx]"
  4000. else
  4001. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  4002. fi
  4003. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  4004. # Check to see that the pipe works correctly.
  4005. pipe_works=no
  4006. rm -f conftest*
  4007. cat > conftest.$ac_ext <<_LT_EOF
  4008. #ifdef __cplusplus
  4009. extern "C" {
  4010. #endif
  4011. char nm_test_var;
  4012. void nm_test_func(void);
  4013. void nm_test_func(void){}
  4014. #ifdef __cplusplus
  4015. }
  4016. #endif
  4017. int main(){nm_test_var='a';nm_test_func();return(0);}
  4018. _LT_EOF
  4019. if AC_TRY_EVAL(ac_compile); then
  4020. # Now try to grab the symbols.
  4021. nlist=conftest.nm
  4022. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  4023. # Try sorting and uniquifying the output.
  4024. if sort "$nlist" | uniq > "$nlist"T; then
  4025. mv -f "$nlist"T "$nlist"
  4026. else
  4027. rm -f "$nlist"T
  4028. fi
  4029. # Make sure that we snagged all the symbols we need.
  4030. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  4031. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  4032. cat <<_LT_EOF > conftest.$ac_ext
  4033. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  4034. #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
  4035. /* DATA imports from DLLs on WIN32 con't be const, because runtime
  4036. relocations are performed -- see ld's documentation on pseudo-relocs. */
  4037. # define LT@&t@_DLSYM_CONST
  4038. #elif defined(__osf__)
  4039. /* This system does not cope well with relocations in const data. */
  4040. # define LT@&t@_DLSYM_CONST
  4041. #else
  4042. # define LT@&t@_DLSYM_CONST const
  4043. #endif
  4044. #ifdef __cplusplus
  4045. extern "C" {
  4046. #endif
  4047. _LT_EOF
  4048. # Now generate the symbol file.
  4049. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  4050. cat <<_LT_EOF >> conftest.$ac_ext
  4051. /* The mapping between symbol names and symbols. */
  4052. LT@&t@_DLSYM_CONST struct {
  4053. const char *name;
  4054. void *address;
  4055. }
  4056. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  4057. {
  4058. { "@PROGRAM@", (void *) 0 },
  4059. _LT_EOF
  4060. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  4061. cat <<\_LT_EOF >> conftest.$ac_ext
  4062. {0, (void *) 0}
  4063. };
  4064. /* This works around a problem in FreeBSD linker */
  4065. #ifdef FREEBSD_WORKAROUND
  4066. static const void *lt_preloaded_setup() {
  4067. return lt__PROGRAM__LTX_preloaded_symbols;
  4068. }
  4069. #endif
  4070. #ifdef __cplusplus
  4071. }
  4072. #endif
  4073. _LT_EOF
  4074. # Now try linking the two files.
  4075. mv conftest.$ac_objext conftstm.$ac_objext
  4076. lt_globsym_save_LIBS=$LIBS
  4077. lt_globsym_save_CFLAGS=$CFLAGS
  4078. LIBS="conftstm.$ac_objext"
  4079. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  4080. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  4081. pipe_works=yes
  4082. fi
  4083. LIBS=$lt_globsym_save_LIBS
  4084. CFLAGS=$lt_globsym_save_CFLAGS
  4085. else
  4086. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  4087. fi
  4088. else
  4089. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  4090. fi
  4091. else
  4092. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  4093. fi
  4094. else
  4095. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  4096. cat conftest.$ac_ext >&5
  4097. fi
  4098. rm -rf conftest* conftst*
  4099. # Do not use the global_symbol_pipe unless it works.
  4100. if test "$pipe_works" = yes; then
  4101. break
  4102. else
  4103. lt_cv_sys_global_symbol_pipe=
  4104. fi
  4105. done
  4106. ])
  4107. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  4108. lt_cv_sys_global_symbol_to_cdecl=
  4109. fi
  4110. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  4111. AC_MSG_RESULT(failed)
  4112. else
  4113. AC_MSG_RESULT(ok)
  4114. fi
  4115. # Response file support.
  4116. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  4117. nm_file_list_spec='@'
  4118. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  4119. nm_file_list_spec='@'
  4120. fi
  4121. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  4122. [Take the output of nm and produce a listing of raw symbols and C names])
  4123. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  4124. [Transform the output of nm in a proper C declaration])
  4125. _LT_DECL([global_symbol_to_c_name_address],
  4126. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  4127. [Transform the output of nm in a C name address pair])
  4128. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  4129. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  4130. [Transform the output of nm in a C name address pair when lib prefix is needed])
  4131. _LT_DECL([], [nm_file_list_spec], [1],
  4132. [Specify filename containing input files for $NM])
  4133. ]) # _LT_CMD_GLOBAL_SYMBOLS
  4134. # _LT_COMPILER_PIC([TAGNAME])
  4135. # ---------------------------
  4136. m4_defun([_LT_COMPILER_PIC],
  4137. [m4_require([_LT_TAG_COMPILER])dnl
  4138. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  4139. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4140. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4141. m4_if([$1], [CXX], [
  4142. # C++ specific cases for pic, static, wl, etc.
  4143. if test "$GXX" = yes; then
  4144. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4145. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4146. case $host_os in
  4147. aix*)
  4148. # All AIX code is PIC.
  4149. if test "$host_cpu" = ia64; then
  4150. # AIX 5 now supports IA64 processor
  4151. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4152. fi
  4153. ;;
  4154. amigaos*)
  4155. case $host_cpu in
  4156. powerpc)
  4157. # see comment about AmigaOS4 .so support
  4158. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4159. ;;
  4160. m68k)
  4161. # FIXME: we need at least 68020 code to build shared libraries, but
  4162. # adding the `-m68020' flag to GCC prevents building anything better,
  4163. # like `-m68040'.
  4164. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4165. ;;
  4166. esac
  4167. ;;
  4168. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4169. # PIC is the default for these OSes.
  4170. ;;
  4171. mingw* | cygwin* | os2* | pw32* | cegcc*)
  4172. # This hack is so that the source file can tell whether it is being
  4173. # built for inclusion in a dll (and should export symbols for example).
  4174. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4175. # (--disable-auto-import) libraries
  4176. m4_if([$1], [GCJ], [],
  4177. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4178. ;;
  4179. darwin* | rhapsody*)
  4180. # PIC is the default on this platform
  4181. # Common symbols not allowed in MH_DYLIB files
  4182. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4183. ;;
  4184. *djgpp*)
  4185. # DJGPP does not support shared libraries at all
  4186. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4187. ;;
  4188. haiku*)
  4189. # PIC is the default for Haiku.
  4190. # The "-static" flag exists, but is broken.
  4191. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4192. ;;
  4193. interix[[3-9]]*)
  4194. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4195. # Instead, we relocate shared libraries at runtime.
  4196. ;;
  4197. sysv4*MP*)
  4198. if test -d /usr/nec; then
  4199. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4200. fi
  4201. ;;
  4202. hpux*)
  4203. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4204. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4205. # sets the default TLS model and affects inlining.
  4206. case $host_cpu in
  4207. hppa*64*)
  4208. ;;
  4209. *)
  4210. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4211. ;;
  4212. esac
  4213. ;;
  4214. *qnx* | *nto*)
  4215. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4216. # it will coredump.
  4217. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4218. ;;
  4219. *)
  4220. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4221. ;;
  4222. esac
  4223. else
  4224. case $host_os in
  4225. aix[[4-9]]*)
  4226. # All AIX code is PIC.
  4227. if test "$host_cpu" = ia64; then
  4228. # AIX 5 now supports IA64 processor
  4229. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4230. else
  4231. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4232. fi
  4233. ;;
  4234. chorus*)
  4235. case $cc_basename in
  4236. cxch68*)
  4237. # Green Hills C++ Compiler
  4238. # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  4239. ;;
  4240. esac
  4241. ;;
  4242. mingw* | cygwin* | os2* | pw32* | cegcc*)
  4243. # This hack is so that the source file can tell whether it is being
  4244. # built for inclusion in a dll (and should export symbols for example).
  4245. m4_if([$1], [GCJ], [],
  4246. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4247. ;;
  4248. dgux*)
  4249. case $cc_basename in
  4250. ec++*)
  4251. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4252. ;;
  4253. ghcx*)
  4254. # Green Hills C++ Compiler
  4255. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4256. ;;
  4257. *)
  4258. ;;
  4259. esac
  4260. ;;
  4261. freebsd* | dragonfly*)
  4262. # FreeBSD uses GNU C++
  4263. ;;
  4264. hpux9* | hpux10* | hpux11*)
  4265. case $cc_basename in
  4266. CC*)
  4267. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4268. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4269. if test "$host_cpu" != ia64; then
  4270. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4271. fi
  4272. ;;
  4273. aCC*)
  4274. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4275. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4276. case $host_cpu in
  4277. hppa*64*|ia64*)
  4278. # +Z the default
  4279. ;;
  4280. *)
  4281. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4282. ;;
  4283. esac
  4284. ;;
  4285. *)
  4286. ;;
  4287. esac
  4288. ;;
  4289. interix*)
  4290. # This is c89, which is MS Visual C++ (no shared libs)
  4291. # Anyone wants to do a port?
  4292. ;;
  4293. irix5* | irix6* | nonstopux*)
  4294. case $cc_basename in
  4295. CC*)
  4296. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4297. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4298. # CC pic flag -KPIC is the default.
  4299. ;;
  4300. *)
  4301. ;;
  4302. esac
  4303. ;;
  4304. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  4305. case $cc_basename in
  4306. KCC*)
  4307. # KAI C++ Compiler
  4308. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4309. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4310. ;;
  4311. ecpc* )
  4312. # old Intel C++ for x86_64 which still supported -KPIC.
  4313. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4314. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4315. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4316. ;;
  4317. icpc* )
  4318. # Intel C++, used to be incompatible with GCC.
  4319. # ICC 10 doesn't accept -KPIC any more.
  4320. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4321. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4322. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4323. ;;
  4324. pgCC* | pgcpp*)
  4325. # Portland Group C++ compiler
  4326. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4327. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4328. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4329. ;;
  4330. cxx*)
  4331. # Compaq C++
  4332. # Make sure the PIC flag is empty. It appears that all Alpha
  4333. # Linux and Compaq Tru64 Unix objects are PIC.
  4334. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4335. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4336. ;;
  4337. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  4338. # IBM XL 8.0, 9.0 on PPC and BlueGene
  4339. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4340. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4341. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4342. ;;
  4343. *)
  4344. case `$CC -V 2>&1 | sed 5q` in
  4345. *Sun\ C*)
  4346. # Sun C++ 5.9
  4347. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4348. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4349. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4350. ;;
  4351. esac
  4352. ;;
  4353. esac
  4354. ;;
  4355. lynxos*)
  4356. ;;
  4357. m88k*)
  4358. ;;
  4359. mvs*)
  4360. case $cc_basename in
  4361. cxx*)
  4362. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4363. ;;
  4364. *)
  4365. ;;
  4366. esac
  4367. ;;
  4368. netbsd*)
  4369. ;;
  4370. *qnx* | *nto*)
  4371. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4372. # it will coredump.
  4373. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4374. ;;
  4375. osf3* | osf4* | osf5*)
  4376. case $cc_basename in
  4377. KCC*)
  4378. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4379. ;;
  4380. RCC*)
  4381. # Rational C++ 2.4.1
  4382. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4383. ;;
  4384. cxx*)
  4385. # Digital/Compaq C++
  4386. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4387. # Make sure the PIC flag is empty. It appears that all Alpha
  4388. # Linux and Compaq Tru64 Unix objects are PIC.
  4389. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4390. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4391. ;;
  4392. *)
  4393. ;;
  4394. esac
  4395. ;;
  4396. psos*)
  4397. ;;
  4398. solaris*)
  4399. case $cc_basename in
  4400. CC* | sunCC*)
  4401. # Sun C++ 4.2, 5.x and Centerline C++
  4402. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4403. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4404. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4405. ;;
  4406. gcx*)
  4407. # Green Hills C++ Compiler
  4408. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4409. ;;
  4410. *)
  4411. ;;
  4412. esac
  4413. ;;
  4414. sunos4*)
  4415. case $cc_basename in
  4416. CC*)
  4417. # Sun C++ 4.x
  4418. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4419. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4420. ;;
  4421. lcc*)
  4422. # Lucid
  4423. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4424. ;;
  4425. *)
  4426. ;;
  4427. esac
  4428. ;;
  4429. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4430. case $cc_basename in
  4431. CC*)
  4432. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4433. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4434. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4435. ;;
  4436. esac
  4437. ;;
  4438. tandem*)
  4439. case $cc_basename in
  4440. NCC*)
  4441. # NonStop-UX NCC 3.20
  4442. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4443. ;;
  4444. *)
  4445. ;;
  4446. esac
  4447. ;;
  4448. vxworks*)
  4449. ;;
  4450. *)
  4451. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4452. ;;
  4453. esac
  4454. fi
  4455. ],
  4456. [
  4457. if test "$GCC" = yes; then
  4458. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4459. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4460. case $host_os in
  4461. aix*)
  4462. # All AIX code is PIC.
  4463. if test "$host_cpu" = ia64; then
  4464. # AIX 5 now supports IA64 processor
  4465. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4466. fi
  4467. ;;
  4468. amigaos*)
  4469. case $host_cpu in
  4470. powerpc)
  4471. # see comment about AmigaOS4 .so support
  4472. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4473. ;;
  4474. m68k)
  4475. # FIXME: we need at least 68020 code to build shared libraries, but
  4476. # adding the `-m68020' flag to GCC prevents building anything better,
  4477. # like `-m68040'.
  4478. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4479. ;;
  4480. esac
  4481. ;;
  4482. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4483. # PIC is the default for these OSes.
  4484. ;;
  4485. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4486. # This hack is so that the source file can tell whether it is being
  4487. # built for inclusion in a dll (and should export symbols for example).
  4488. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4489. # (--disable-auto-import) libraries
  4490. m4_if([$1], [GCJ], [],
  4491. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4492. ;;
  4493. darwin* | rhapsody*)
  4494. # PIC is the default on this platform
  4495. # Common symbols not allowed in MH_DYLIB files
  4496. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4497. ;;
  4498. haiku*)
  4499. # PIC is the default for Haiku.
  4500. # The "-static" flag exists, but is broken.
  4501. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4502. ;;
  4503. hpux*)
  4504. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4505. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4506. # sets the default TLS model and affects inlining.
  4507. case $host_cpu in
  4508. hppa*64*)
  4509. # +Z the default
  4510. ;;
  4511. *)
  4512. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4513. ;;
  4514. esac
  4515. ;;
  4516. interix[[3-9]]*)
  4517. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4518. # Instead, we relocate shared libraries at runtime.
  4519. ;;
  4520. msdosdjgpp*)
  4521. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4522. # on systems that don't support them.
  4523. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4524. enable_shared=no
  4525. ;;
  4526. *nto* | *qnx*)
  4527. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4528. # it will coredump.
  4529. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4530. ;;
  4531. sysv4*MP*)
  4532. if test -d /usr/nec; then
  4533. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4534. fi
  4535. ;;
  4536. *)
  4537. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4538. ;;
  4539. esac
  4540. case $cc_basename in
  4541. nvcc*) # Cuda Compiler Driver 2.2
  4542. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4543. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4544. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4545. fi
  4546. ;;
  4547. esac
  4548. else
  4549. # PORTME Check for flag to pass linker flags through the system compiler.
  4550. case $host_os in
  4551. aix*)
  4552. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4553. if test "$host_cpu" = ia64; then
  4554. # AIX 5 now supports IA64 processor
  4555. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4556. else
  4557. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4558. fi
  4559. ;;
  4560. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4561. # This hack is so that the source file can tell whether it is being
  4562. # built for inclusion in a dll (and should export symbols for example).
  4563. m4_if([$1], [GCJ], [],
  4564. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4565. ;;
  4566. hpux9* | hpux10* | hpux11*)
  4567. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4568. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4569. # not for PA HP-UX.
  4570. case $host_cpu in
  4571. hppa*64*|ia64*)
  4572. # +Z the default
  4573. ;;
  4574. *)
  4575. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4576. ;;
  4577. esac
  4578. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4579. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4580. ;;
  4581. irix5* | irix6* | nonstopux*)
  4582. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4583. # PIC (with -KPIC) is the default.
  4584. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4585. ;;
  4586. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  4587. case $cc_basename in
  4588. # old Intel for x86_64 which still supported -KPIC.
  4589. ecc*)
  4590. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4591. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4592. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4593. ;;
  4594. # icc used to be incompatible with GCC.
  4595. # ICC 10 doesn't accept -KPIC any more.
  4596. icc* | ifort*)
  4597. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4598. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4599. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4600. ;;
  4601. # Lahey Fortran 8.1.
  4602. lf95*)
  4603. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4604. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4605. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4606. ;;
  4607. nagfor*)
  4608. # NAG Fortran compiler
  4609. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4610. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4611. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4612. ;;
  4613. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  4614. # Portland Group compilers (*not* the Pentium gcc compiler,
  4615. # which looks to be a dead project)
  4616. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4617. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4618. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4619. ;;
  4620. ccc*)
  4621. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4622. # All Alpha code is PIC.
  4623. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4624. ;;
  4625. xl* | bgxl* | bgf* | mpixl*)
  4626. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  4627. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4628. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4629. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4630. ;;
  4631. *)
  4632. case `$CC -V 2>&1 | sed 5q` in
  4633. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  4634. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4635. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4636. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4637. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4638. ;;
  4639. *Sun\ F* | *Sun*Fortran*)
  4640. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4641. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4642. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4643. ;;
  4644. *Sun\ C*)
  4645. # Sun C 5.9
  4646. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4647. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4648. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4649. ;;
  4650. *Intel*\ [[CF]]*Compiler*)
  4651. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4652. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4653. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4654. ;;
  4655. *Portland\ Group*)
  4656. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4657. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4658. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4659. ;;
  4660. esac
  4661. ;;
  4662. esac
  4663. ;;
  4664. newsos6)
  4665. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4666. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4667. ;;
  4668. *nto* | *qnx*)
  4669. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4670. # it will coredump.
  4671. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4672. ;;
  4673. osf3* | osf4* | osf5*)
  4674. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4675. # All OSF/1 code is PIC.
  4676. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4677. ;;
  4678. rdos*)
  4679. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4680. ;;
  4681. solaris*)
  4682. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4683. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4684. case $cc_basename in
  4685. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4686. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4687. *)
  4688. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4689. esac
  4690. ;;
  4691. sunos4*)
  4692. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4693. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4694. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4695. ;;
  4696. sysv4 | sysv4.2uw2* | sysv4.3*)
  4697. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4698. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4699. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4700. ;;
  4701. sysv4*MP*)
  4702. if test -d /usr/nec ;then
  4703. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4704. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4705. fi
  4706. ;;
  4707. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4708. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4709. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4710. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4711. ;;
  4712. unicos*)
  4713. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4714. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4715. ;;
  4716. uts4*)
  4717. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4718. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4719. ;;
  4720. *)
  4721. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4722. ;;
  4723. esac
  4724. fi
  4725. ])
  4726. case $host_os in
  4727. # For platforms which do not support PIC, -DPIC is meaningless:
  4728. *djgpp*)
  4729. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4730. ;;
  4731. *)
  4732. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4733. ;;
  4734. esac
  4735. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4736. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4737. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4738. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4739. #
  4740. # Check to make sure the PIC flag actually works.
  4741. #
  4742. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4743. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4744. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4745. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4746. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4747. "" | " "*) ;;
  4748. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4749. esac],
  4750. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4751. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4752. fi
  4753. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4754. [Additional compiler flags for building library objects])
  4755. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4756. [How to pass a linker flag through the compiler])
  4757. #
  4758. # Check to make sure the static flag actually works.
  4759. #
  4760. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4761. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4762. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4763. $lt_tmp_static_flag,
  4764. [],
  4765. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4766. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4767. [Compiler flag to prevent dynamic linking])
  4768. ])# _LT_COMPILER_PIC
  4769. # _LT_LINKER_SHLIBS([TAGNAME])
  4770. # ----------------------------
  4771. # See if the linker supports building shared libraries.
  4772. m4_defun([_LT_LINKER_SHLIBS],
  4773. [AC_REQUIRE([LT_PATH_LD])dnl
  4774. AC_REQUIRE([LT_PATH_NM])dnl
  4775. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4776. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4777. m4_require([_LT_DECL_EGREP])dnl
  4778. m4_require([_LT_DECL_SED])dnl
  4779. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4780. m4_require([_LT_TAG_COMPILER])dnl
  4781. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4782. m4_if([$1], [CXX], [
  4783. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4784. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4785. case $host_os in
  4786. aix[[4-9]]*)
  4787. # If we're using GNU nm, then we don't want the "-C" option.
  4788. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4789. # Also, AIX nm treats weak defined symbols like other global defined
  4790. # symbols, whereas GNU nm marks them as "W".
  4791. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4792. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4793. else
  4794. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4795. fi
  4796. ;;
  4797. pw32*)
  4798. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4799. ;;
  4800. cygwin* | mingw* | cegcc*)
  4801. case $cc_basename in
  4802. cl*)
  4803. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4804. ;;
  4805. *)
  4806. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4807. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4808. ;;
  4809. esac
  4810. ;;
  4811. *)
  4812. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4813. ;;
  4814. esac
  4815. ], [
  4816. runpath_var=
  4817. _LT_TAGVAR(allow_undefined_flag, $1)=
  4818. _LT_TAGVAR(always_export_symbols, $1)=no
  4819. _LT_TAGVAR(archive_cmds, $1)=
  4820. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4821. _LT_TAGVAR(compiler_needs_object, $1)=no
  4822. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4823. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4824. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4825. _LT_TAGVAR(hardcode_automatic, $1)=no
  4826. _LT_TAGVAR(hardcode_direct, $1)=no
  4827. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4828. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4829. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4830. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4831. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4832. _LT_TAGVAR(inherit_rpath, $1)=no
  4833. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4834. _LT_TAGVAR(module_cmds, $1)=
  4835. _LT_TAGVAR(module_expsym_cmds, $1)=
  4836. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4837. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4838. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4839. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4840. # include_expsyms should be a list of space-separated symbols to be *always*
  4841. # included in the symbol list
  4842. _LT_TAGVAR(include_expsyms, $1)=
  4843. # exclude_expsyms can be an extended regexp of symbols to exclude
  4844. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4845. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4846. # as well as any symbol that contains `d'.
  4847. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4848. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4849. # platforms (ab)use it in PIC code, but their linkers get confused if
  4850. # the symbol is explicitly referenced. Since portable code cannot
  4851. # rely on this symbol name, it's probably fine to never include it in
  4852. # preloaded symbol tables.
  4853. # Exclude shared library initialization/finalization symbols.
  4854. dnl Note also adjust exclude_expsyms for C++ above.
  4855. extract_expsyms_cmds=
  4856. case $host_os in
  4857. cygwin* | mingw* | pw32* | cegcc*)
  4858. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4859. # When not using gcc, we currently assume that we are using
  4860. # Microsoft Visual C++.
  4861. if test "$GCC" != yes; then
  4862. with_gnu_ld=no
  4863. fi
  4864. ;;
  4865. interix*)
  4866. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4867. with_gnu_ld=yes
  4868. ;;
  4869. openbsd*)
  4870. with_gnu_ld=no
  4871. ;;
  4872. esac
  4873. _LT_TAGVAR(ld_shlibs, $1)=yes
  4874. # On some targets, GNU ld is compatible enough with the native linker
  4875. # that we're better off using the native interface for both.
  4876. lt_use_gnu_ld_interface=no
  4877. if test "$with_gnu_ld" = yes; then
  4878. case $host_os in
  4879. aix*)
  4880. # The AIX port of GNU ld has always aspired to compatibility
  4881. # with the native linker. However, as the warning in the GNU ld
  4882. # block says, versions before 2.19.5* couldn't really create working
  4883. # shared libraries, regardless of the interface used.
  4884. case `$LD -v 2>&1` in
  4885. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4886. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4887. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4888. *)
  4889. lt_use_gnu_ld_interface=yes
  4890. ;;
  4891. esac
  4892. ;;
  4893. *)
  4894. lt_use_gnu_ld_interface=yes
  4895. ;;
  4896. esac
  4897. fi
  4898. if test "$lt_use_gnu_ld_interface" = yes; then
  4899. # If archive_cmds runs LD, not CC, wlarc should be empty
  4900. wlarc='${wl}'
  4901. # Set some defaults for GNU ld with shared library support. These
  4902. # are reset later if shared libraries are not supported. Putting them
  4903. # here allows them to be overridden if necessary.
  4904. runpath_var=LD_RUN_PATH
  4905. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4906. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4907. # ancient GNU ld didn't support --whole-archive et. al.
  4908. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4909. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4910. else
  4911. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4912. fi
  4913. supports_anon_versioning=no
  4914. case `$LD -v 2>&1` in
  4915. *GNU\ gold*) supports_anon_versioning=yes ;;
  4916. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4917. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4918. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4919. *\ 2.11.*) ;; # other 2.11 versions
  4920. *) supports_anon_versioning=yes ;;
  4921. esac
  4922. # See if GNU ld supports shared libraries.
  4923. case $host_os in
  4924. aix[[3-9]]*)
  4925. # On AIX/PPC, the GNU linker is very broken
  4926. if test "$host_cpu" != ia64; then
  4927. _LT_TAGVAR(ld_shlibs, $1)=no
  4928. cat <<_LT_EOF 1>&2
  4929. *** Warning: the GNU linker, at least up to release 2.19, is reported
  4930. *** to be unable to reliably create shared libraries on AIX.
  4931. *** Therefore, libtool is disabling shared libraries support. If you
  4932. *** really care for shared libraries, you may want to install binutils
  4933. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  4934. *** You will then need to restart the configuration process.
  4935. _LT_EOF
  4936. fi
  4937. ;;
  4938. amigaos*)
  4939. case $host_cpu in
  4940. powerpc)
  4941. # see comment about AmigaOS4 .so support
  4942. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4943. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  4944. ;;
  4945. m68k)
  4946. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  4947. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4948. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  4949. ;;
  4950. esac
  4951. ;;
  4952. beos*)
  4953. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  4954. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4955. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4956. # support --undefined. This deserves some investigation. FIXME
  4957. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4958. else
  4959. _LT_TAGVAR(ld_shlibs, $1)=no
  4960. fi
  4961. ;;
  4962. cygwin* | mingw* | pw32* | cegcc*)
  4963. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4964. # as there is no search path for DLLs.
  4965. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4966. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  4967. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  4968. _LT_TAGVAR(always_export_symbols, $1)=no
  4969. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4970. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4971. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4972. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  4973. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4974. # If the export-symbols file already is a .def file (1st line
  4975. # is EXPORTS), use it as is; otherwise, prepend...
  4976. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4977. cp $export_symbols $output_objdir/$soname.def;
  4978. else
  4979. echo EXPORTS > $output_objdir/$soname.def;
  4980. cat $export_symbols >> $output_objdir/$soname.def;
  4981. fi~
  4982. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  4983. else
  4984. _LT_TAGVAR(ld_shlibs, $1)=no
  4985. fi
  4986. ;;
  4987. haiku*)
  4988. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4989. _LT_TAGVAR(link_all_deplibs, $1)=yes
  4990. ;;
  4991. interix[[3-9]]*)
  4992. _LT_TAGVAR(hardcode_direct, $1)=no
  4993. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  4994. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4995. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4996. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  4997. # Instead, shared libraries are loaded at an image base (0x10000000 by
  4998. # default) and relocated if they conflict, which is a slow very memory
  4999. # consuming and fragmenting process. To avoid this, we pick a random,
  5000. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5001. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5002. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  5003. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  5004. ;;
  5005. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  5006. tmp_diet=no
  5007. if test "$host_os" = linux-dietlibc; then
  5008. case $cc_basename in
  5009. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  5010. esac
  5011. fi
  5012. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  5013. && test "$tmp_diet" = no
  5014. then
  5015. tmp_addflag=' $pic_flag'
  5016. tmp_sharedflag='-shared'
  5017. case $cc_basename,$host_cpu in
  5018. pgcc*) # Portland Group C compiler
  5019. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  5020. tmp_addflag=' $pic_flag'
  5021. ;;
  5022. pgf77* | pgf90* | pgf95* | pgfortran*)
  5023. # Portland Group f77 and f90 compilers
  5024. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  5025. tmp_addflag=' $pic_flag -Mnomain' ;;
  5026. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  5027. tmp_addflag=' -i_dynamic' ;;
  5028. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  5029. tmp_addflag=' -i_dynamic -nofor_main' ;;
  5030. ifc* | ifort*) # Intel Fortran compiler
  5031. tmp_addflag=' -nofor_main' ;;
  5032. lf95*) # Lahey Fortran 8.1
  5033. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5034. tmp_sharedflag='--shared' ;;
  5035. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  5036. tmp_sharedflag='-qmkshrobj'
  5037. tmp_addflag= ;;
  5038. nvcc*) # Cuda Compiler Driver 2.2
  5039. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  5040. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5041. ;;
  5042. esac
  5043. case `$CC -V 2>&1 | sed 5q` in
  5044. *Sun\ C*) # Sun C 5.9
  5045. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  5046. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5047. tmp_sharedflag='-G' ;;
  5048. *Sun\ F*) # Sun Fortran 8.3
  5049. tmp_sharedflag='-G' ;;
  5050. esac
  5051. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5052. if test "x$supports_anon_versioning" = xyes; then
  5053. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5054. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5055. echo "local: *; };" >> $output_objdir/$libname.ver~
  5056. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5057. fi
  5058. case $cc_basename in
  5059. xlf* | bgf* | bgxlf* | mpixlf*)
  5060. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  5061. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  5062. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5063. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  5064. if test "x$supports_anon_versioning" = xyes; then
  5065. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5066. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5067. echo "local: *; };" >> $output_objdir/$libname.ver~
  5068. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  5069. fi
  5070. ;;
  5071. esac
  5072. else
  5073. _LT_TAGVAR(ld_shlibs, $1)=no
  5074. fi
  5075. ;;
  5076. netbsd*)
  5077. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5078. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  5079. wlarc=
  5080. else
  5081. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5082. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5083. fi
  5084. ;;
  5085. solaris*)
  5086. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  5087. _LT_TAGVAR(ld_shlibs, $1)=no
  5088. cat <<_LT_EOF 1>&2
  5089. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  5090. *** create shared libraries on Solaris systems. Therefore, libtool
  5091. *** is disabling shared libraries support. We urge you to upgrade GNU
  5092. *** binutils to release 2.9.1 or newer. Another option is to modify
  5093. *** your PATH or compiler configuration so that the native linker is
  5094. *** used, and then restart.
  5095. _LT_EOF
  5096. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5097. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5098. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5099. else
  5100. _LT_TAGVAR(ld_shlibs, $1)=no
  5101. fi
  5102. ;;
  5103. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  5104. case `$LD -v 2>&1` in
  5105. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  5106. _LT_TAGVAR(ld_shlibs, $1)=no
  5107. cat <<_LT_EOF 1>&2
  5108. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  5109. *** reliably create shared libraries on SCO systems. Therefore, libtool
  5110. *** is disabling shared libraries support. We urge you to upgrade GNU
  5111. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  5112. *** your PATH or compiler configuration so that the native linker is
  5113. *** used, and then restart.
  5114. _LT_EOF
  5115. ;;
  5116. *)
  5117. # For security reasons, it is highly recommended that you always
  5118. # use absolute paths for naming shared libraries, and exclude the
  5119. # DT_RUNPATH tag from executables and libraries. But doing so
  5120. # requires that you compile everything twice, which is a pain.
  5121. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5122. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5123. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5124. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5125. else
  5126. _LT_TAGVAR(ld_shlibs, $1)=no
  5127. fi
  5128. ;;
  5129. esac
  5130. ;;
  5131. sunos4*)
  5132. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5133. wlarc=
  5134. _LT_TAGVAR(hardcode_direct, $1)=yes
  5135. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5136. ;;
  5137. *)
  5138. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5139. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5140. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5141. else
  5142. _LT_TAGVAR(ld_shlibs, $1)=no
  5143. fi
  5144. ;;
  5145. esac
  5146. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  5147. runpath_var=
  5148. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5149. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5150. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5151. fi
  5152. else
  5153. # PORTME fill in a description of your system's linker (not GNU ld)
  5154. case $host_os in
  5155. aix3*)
  5156. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5157. _LT_TAGVAR(always_export_symbols, $1)=yes
  5158. _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  5159. # Note: this linker hardcodes the directories in LIBPATH if there
  5160. # are no directories specified by -L.
  5161. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5162. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  5163. # Neither direct hardcoding nor static linking is supported with a
  5164. # broken collect2.
  5165. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5166. fi
  5167. ;;
  5168. aix[[4-9]]*)
  5169. if test "$host_cpu" = ia64; then
  5170. # On IA64, the linker does run time linking by default, so we don't
  5171. # have to do anything special.
  5172. aix_use_runtimelinking=no
  5173. exp_sym_flag='-Bexport'
  5174. no_entry_flag=""
  5175. else
  5176. # If we're using GNU nm, then we don't want the "-C" option.
  5177. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  5178. # Also, AIX nm treats weak defined symbols like other global
  5179. # defined symbols, whereas GNU nm marks them as "W".
  5180. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  5181. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  5182. else
  5183. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  5184. fi
  5185. aix_use_runtimelinking=no
  5186. # Test if we are trying to use run time linking or normal
  5187. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5188. # need to do runtime linking.
  5189. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5190. for ld_flag in $LDFLAGS; do
  5191. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  5192. aix_use_runtimelinking=yes
  5193. break
  5194. fi
  5195. done
  5196. ;;
  5197. esac
  5198. exp_sym_flag='-bexport'
  5199. no_entry_flag='-bnoentry'
  5200. fi
  5201. # When large executables or shared objects are built, AIX ld can
  5202. # have problems creating the table of contents. If linking a library
  5203. # or program results in "error TOC overflow" add -mminimal-toc to
  5204. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5205. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5206. _LT_TAGVAR(archive_cmds, $1)=''
  5207. _LT_TAGVAR(hardcode_direct, $1)=yes
  5208. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5209. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5210. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5211. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5212. if test "$GCC" = yes; then
  5213. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5214. # We only want to do this on AIX 4.2 and lower, the check
  5215. # below for broken collect2 doesn't work under 4.3+
  5216. collect2name=`${CC} -print-prog-name=collect2`
  5217. if test -f "$collect2name" &&
  5218. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5219. then
  5220. # We have reworked collect2
  5221. :
  5222. else
  5223. # We have old collect2
  5224. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5225. # It fails to find uninstalled libraries when the uninstalled
  5226. # path is not listed in the libpath. Setting hardcode_minus_L
  5227. # to unsupported forces relinking
  5228. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5229. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5230. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5231. fi
  5232. ;;
  5233. esac
  5234. shared_flag='-shared'
  5235. if test "$aix_use_runtimelinking" = yes; then
  5236. shared_flag="$shared_flag "'${wl}-G'
  5237. fi
  5238. else
  5239. # not using gcc
  5240. if test "$host_cpu" = ia64; then
  5241. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5242. # chokes on -Wl,-G. The following line is correct:
  5243. shared_flag='-G'
  5244. else
  5245. if test "$aix_use_runtimelinking" = yes; then
  5246. shared_flag='${wl}-G'
  5247. else
  5248. shared_flag='${wl}-bM:SRE'
  5249. fi
  5250. fi
  5251. fi
  5252. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5253. # It seems that -bexpall does not export symbols beginning with
  5254. # underscore (_), so it is better to generate a list of symbols to export.
  5255. _LT_TAGVAR(always_export_symbols, $1)=yes
  5256. if test "$aix_use_runtimelinking" = yes; then
  5257. # Warning - without using the other runtime loading flags (-brtl),
  5258. # -berok will link without error, but may produce a broken library.
  5259. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5260. # Determine the default libpath from the value encoded in an
  5261. # empty executable.
  5262. _LT_SYS_MODULE_PATH_AIX([$1])
  5263. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5264. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  5265. else
  5266. if test "$host_cpu" = ia64; then
  5267. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5268. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5269. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  5270. else
  5271. # Determine the default libpath from the value encoded in an
  5272. # empty executable.
  5273. _LT_SYS_MODULE_PATH_AIX([$1])
  5274. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5275. # Warning - without using the other run time loading flags,
  5276. # -berok will link without error, but may produce a broken library.
  5277. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5278. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5279. if test "$with_gnu_ld" = yes; then
  5280. # We only use this code for GNU lds that support --whole-archive.
  5281. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5282. else
  5283. # Exported symbols can be pulled into shared objects from archives
  5284. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5285. fi
  5286. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5287. # This is similar to how AIX traditionally builds its shared libraries.
  5288. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  5289. fi
  5290. fi
  5291. ;;
  5292. amigaos*)
  5293. case $host_cpu in
  5294. powerpc)
  5295. # see comment about AmigaOS4 .so support
  5296. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5297. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5298. ;;
  5299. m68k)
  5300. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  5301. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5302. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5303. ;;
  5304. esac
  5305. ;;
  5306. bsdi[[45]]*)
  5307. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5308. ;;
  5309. cygwin* | mingw* | pw32* | cegcc*)
  5310. # When not using gcc, we currently assume that we are using
  5311. # Microsoft Visual C++.
  5312. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5313. # no search path for DLLs.
  5314. case $cc_basename in
  5315. cl*)
  5316. # Native MSVC
  5317. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5318. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5319. _LT_TAGVAR(always_export_symbols, $1)=yes
  5320. _LT_TAGVAR(file_list_spec, $1)='@'
  5321. # Tell ltmain to make .lib files, not .a files.
  5322. libext=lib
  5323. # Tell ltmain to make .dll files, not .so files.
  5324. shrext_cmds=".dll"
  5325. # FIXME: Setting linknames here is a bad hack.
  5326. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  5327. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5328. sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  5329. else
  5330. sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  5331. fi~
  5332. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5333. linknames='
  5334. # The linker will not automatically build a static lib if we build a DLL.
  5335. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5336. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5337. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5338. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  5339. # Don't use ranlib
  5340. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5341. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5342. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5343. case $lt_outputfile in
  5344. *.exe|*.EXE) ;;
  5345. *)
  5346. lt_outputfile="$lt_outputfile.exe"
  5347. lt_tool_outputfile="$lt_tool_outputfile.exe"
  5348. ;;
  5349. esac~
  5350. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  5351. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5352. $RM "$lt_outputfile.manifest";
  5353. fi'
  5354. ;;
  5355. *)
  5356. # Assume MSVC wrapper
  5357. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5358. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5359. # Tell ltmain to make .lib files, not .a files.
  5360. libext=lib
  5361. # Tell ltmain to make .dll files, not .so files.
  5362. shrext_cmds=".dll"
  5363. # FIXME: Setting linknames here is a bad hack.
  5364. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  5365. # The linker will automatically build a .lib file if we build a DLL.
  5366. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5367. # FIXME: Should let the user specify the lib program.
  5368. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5369. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5370. ;;
  5371. esac
  5372. ;;
  5373. darwin* | rhapsody*)
  5374. _LT_DARWIN_LINKER_FEATURES($1)
  5375. ;;
  5376. dgux*)
  5377. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5378. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5379. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5380. ;;
  5381. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5382. # support. Future versions do this automatically, but an explicit c++rt0.o
  5383. # does not break anything, and helps significantly (at the cost of a little
  5384. # extra space).
  5385. freebsd2.2*)
  5386. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5387. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5388. _LT_TAGVAR(hardcode_direct, $1)=yes
  5389. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5390. ;;
  5391. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5392. freebsd2.*)
  5393. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5394. _LT_TAGVAR(hardcode_direct, $1)=yes
  5395. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5396. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5397. ;;
  5398. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5399. freebsd* | dragonfly*)
  5400. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5401. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5402. _LT_TAGVAR(hardcode_direct, $1)=yes
  5403. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5404. ;;
  5405. hpux9*)
  5406. if test "$GCC" = yes; then
  5407. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5408. else
  5409. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5410. fi
  5411. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5412. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5413. _LT_TAGVAR(hardcode_direct, $1)=yes
  5414. # hardcode_minus_L: Not really in the search PATH,
  5415. # but as the default location of the library.
  5416. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5417. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5418. ;;
  5419. hpux10*)
  5420. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  5421. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5422. else
  5423. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5424. fi
  5425. if test "$with_gnu_ld" = no; then
  5426. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5427. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5428. _LT_TAGVAR(hardcode_direct, $1)=yes
  5429. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5430. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5431. # hardcode_minus_L: Not really in the search PATH,
  5432. # but as the default location of the library.
  5433. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5434. fi
  5435. ;;
  5436. hpux11*)
  5437. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  5438. case $host_cpu in
  5439. hppa*64*)
  5440. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5441. ;;
  5442. ia64*)
  5443. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5444. ;;
  5445. *)
  5446. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5447. ;;
  5448. esac
  5449. else
  5450. case $host_cpu in
  5451. hppa*64*)
  5452. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5453. ;;
  5454. ia64*)
  5455. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5456. ;;
  5457. *)
  5458. m4_if($1, [], [
  5459. # Older versions of the 11.00 compiler do not understand -b yet
  5460. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  5461. _LT_LINKER_OPTION([if $CC understands -b],
  5462. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  5463. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  5464. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  5465. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  5466. ;;
  5467. esac
  5468. fi
  5469. if test "$with_gnu_ld" = no; then
  5470. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5471. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5472. case $host_cpu in
  5473. hppa*64*|ia64*)
  5474. _LT_TAGVAR(hardcode_direct, $1)=no
  5475. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5476. ;;
  5477. *)
  5478. _LT_TAGVAR(hardcode_direct, $1)=yes
  5479. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5480. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5481. # hardcode_minus_L: Not really in the search PATH,
  5482. # but as the default location of the library.
  5483. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5484. ;;
  5485. esac
  5486. fi
  5487. ;;
  5488. irix5* | irix6* | nonstopux*)
  5489. if test "$GCC" = yes; then
  5490. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5491. # Try to use the -exported_symbol ld option, if it does not
  5492. # work, assume that -exports_file does not work either and
  5493. # implicitly export all symbols.
  5494. # This should be the same for all languages, so no per-tag cache variable.
  5495. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  5496. [lt_cv_irix_exported_symbol],
  5497. [save_LDFLAGS="$LDFLAGS"
  5498. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  5499. AC_LINK_IFELSE(
  5500. [AC_LANG_SOURCE(
  5501. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  5502. [C++], [[int foo (void) { return 0; }]],
  5503. [Fortran 77], [[
  5504. subroutine foo
  5505. end]],
  5506. [Fortran], [[
  5507. subroutine foo
  5508. end]])])],
  5509. [lt_cv_irix_exported_symbol=yes],
  5510. [lt_cv_irix_exported_symbol=no])
  5511. LDFLAGS="$save_LDFLAGS"])
  5512. if test "$lt_cv_irix_exported_symbol" = yes; then
  5513. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
  5514. fi
  5515. else
  5516. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  5517. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
  5518. fi
  5519. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5520. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5521. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5522. _LT_TAGVAR(inherit_rpath, $1)=yes
  5523. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5524. ;;
  5525. netbsd*)
  5526. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5527. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5528. else
  5529. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5530. fi
  5531. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5532. _LT_TAGVAR(hardcode_direct, $1)=yes
  5533. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5534. ;;
  5535. newsos6)
  5536. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5537. _LT_TAGVAR(hardcode_direct, $1)=yes
  5538. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5539. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5540. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5541. ;;
  5542. *nto* | *qnx*)
  5543. ;;
  5544. openbsd*)
  5545. if test -f /usr/libexec/ld.so; then
  5546. _LT_TAGVAR(hardcode_direct, $1)=yes
  5547. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5548. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5549. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5550. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5551. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  5552. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5553. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5554. else
  5555. case $host_os in
  5556. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  5557. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5558. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5559. ;;
  5560. *)
  5561. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5562. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5563. ;;
  5564. esac
  5565. fi
  5566. else
  5567. _LT_TAGVAR(ld_shlibs, $1)=no
  5568. fi
  5569. ;;
  5570. os2*)
  5571. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5572. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5573. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5574. _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  5575. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  5576. ;;
  5577. osf3*)
  5578. if test "$GCC" = yes; then
  5579. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5580. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5581. else
  5582. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5583. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  5584. fi
  5585. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5586. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5587. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5588. ;;
  5589. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5590. if test "$GCC" = yes; then
  5591. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5592. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5593. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5594. else
  5595. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5596. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  5597. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
  5598. $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
  5599. # Both c and cxx compiler support -rpath directly
  5600. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5601. fi
  5602. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5603. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5604. ;;
  5605. solaris*)
  5606. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5607. if test "$GCC" = yes; then
  5608. wlarc='${wl}'
  5609. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5610. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5611. $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5612. else
  5613. case `$CC -V 2>&1` in
  5614. *"Compilers 5.0"*)
  5615. wlarc=''
  5616. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5617. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5618. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5619. ;;
  5620. *)
  5621. wlarc='${wl}'
  5622. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5623. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5624. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5625. ;;
  5626. esac
  5627. fi
  5628. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5629. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5630. case $host_os in
  5631. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5632. *)
  5633. # The compiler driver will combine and reorder linker options,
  5634. # but understands `-z linker_flag'. GCC discards it without `$wl',
  5635. # but is careful enough not to reorder.
  5636. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5637. if test "$GCC" = yes; then
  5638. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  5639. else
  5640. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5641. fi
  5642. ;;
  5643. esac
  5644. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5645. ;;
  5646. sunos4*)
  5647. if test "x$host_vendor" = xsequent; then
  5648. # Use $CC to link under sequent, because it throws in some extra .o
  5649. # files that make .init and .fini sections work.
  5650. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5651. else
  5652. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5653. fi
  5654. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5655. _LT_TAGVAR(hardcode_direct, $1)=yes
  5656. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5657. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5658. ;;
  5659. sysv4)
  5660. case $host_vendor in
  5661. sni)
  5662. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5663. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5664. ;;
  5665. siemens)
  5666. ## LD is ld it makes a PLAMLIB
  5667. ## CC just makes a GrossModule.
  5668. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5669. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5670. _LT_TAGVAR(hardcode_direct, $1)=no
  5671. ;;
  5672. motorola)
  5673. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5674. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5675. ;;
  5676. esac
  5677. runpath_var='LD_RUN_PATH'
  5678. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5679. ;;
  5680. sysv4.3*)
  5681. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5682. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5683. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5684. ;;
  5685. sysv4*MP*)
  5686. if test -d /usr/nec; then
  5687. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5688. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5689. runpath_var=LD_RUN_PATH
  5690. hardcode_runpath_var=yes
  5691. _LT_TAGVAR(ld_shlibs, $1)=yes
  5692. fi
  5693. ;;
  5694. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5695. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5696. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5697. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5698. runpath_var='LD_RUN_PATH'
  5699. if test "$GCC" = yes; then
  5700. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5701. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5702. else
  5703. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5704. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5705. fi
  5706. ;;
  5707. sysv5* | sco3.2v5* | sco5v6*)
  5708. # Note: We can NOT use -z defs as we might desire, because we do not
  5709. # link with -lc, and that would cause any symbols used from libc to
  5710. # always be unresolved, which means just about no library would
  5711. # ever link correctly. If we're not using GNU ld we use -z text
  5712. # though, which does catch some bad symbols but isn't as heavy-handed
  5713. # as -z defs.
  5714. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5715. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5716. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5717. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5718. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5719. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5720. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5721. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5722. runpath_var='LD_RUN_PATH'
  5723. if test "$GCC" = yes; then
  5724. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5725. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5726. else
  5727. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5728. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5729. fi
  5730. ;;
  5731. uts4*)
  5732. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5733. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5734. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5735. ;;
  5736. *)
  5737. _LT_TAGVAR(ld_shlibs, $1)=no
  5738. ;;
  5739. esac
  5740. if test x$host_vendor = xsni; then
  5741. case $host in
  5742. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5743. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  5744. ;;
  5745. esac
  5746. fi
  5747. fi
  5748. ])
  5749. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5750. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5751. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5752. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5753. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5754. _LT_DECL([], [extract_expsyms_cmds], [2],
  5755. [The commands to extract the exported symbol list from a shared archive])
  5756. #
  5757. # Do we need to explicitly link libc?
  5758. #
  5759. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5760. x|xyes)
  5761. # Assume -lc should be added
  5762. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5763. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5764. case $_LT_TAGVAR(archive_cmds, $1) in
  5765. *'~'*)
  5766. # FIXME: we may have to deal with multi-command sequences.
  5767. ;;
  5768. '$CC '*)
  5769. # Test whether the compiler implicitly links with -lc since on some
  5770. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5771. # to ld, don't add -lc before -lgcc.
  5772. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5773. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5774. [$RM conftest*
  5775. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5776. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5777. soname=conftest
  5778. lib=conftest
  5779. libobjs=conftest.$ac_objext
  5780. deplibs=
  5781. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5782. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5783. compiler_flags=-v
  5784. linker_flags=-v
  5785. verstring=
  5786. output_objdir=.
  5787. libname=conftest
  5788. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5789. _LT_TAGVAR(allow_undefined_flag, $1)=
  5790. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5791. then
  5792. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5793. else
  5794. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5795. fi
  5796. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5797. else
  5798. cat conftest.err 1>&5
  5799. fi
  5800. $RM conftest*
  5801. ])
  5802. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5803. ;;
  5804. esac
  5805. fi
  5806. ;;
  5807. esac
  5808. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5809. [Whether or not to add -lc for building shared libraries])
  5810. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5811. [enable_shared_with_static_runtimes], [0],
  5812. [Whether or not to disallow shared libs when runtime libs are static])
  5813. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5814. [Compiler flag to allow reflexive dlopens])
  5815. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5816. [Compiler flag to generate shared objects directly from archives])
  5817. _LT_TAGDECL([], [compiler_needs_object], [1],
  5818. [Whether the compiler copes with passing no objects directly])
  5819. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5820. [Create an old-style archive from a shared archive])
  5821. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5822. [Create a temporary old-style archive to link instead of a shared archive])
  5823. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5824. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5825. _LT_TAGDECL([], [module_cmds], [2],
  5826. [Commands used to build a loadable module if different from building
  5827. a shared archive.])
  5828. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5829. _LT_TAGDECL([], [with_gnu_ld], [1],
  5830. [Whether we are building with GNU ld or not])
  5831. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5832. [Flag that allows shared libraries with undefined symbols to be built])
  5833. _LT_TAGDECL([], [no_undefined_flag], [1],
  5834. [Flag that enforces no undefined symbols])
  5835. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5836. [Flag to hardcode $libdir into a binary during linking.
  5837. This must work even if $libdir does not exist])
  5838. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5839. [Whether we need a single "-rpath" flag with a separated argument])
  5840. _LT_TAGDECL([], [hardcode_direct], [0],
  5841. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5842. DIR into the resulting binary])
  5843. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5844. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5845. DIR into the resulting binary and the resulting library dependency is
  5846. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  5847. library is relocated])
  5848. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5849. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5850. into the resulting binary])
  5851. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5852. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5853. into the resulting binary])
  5854. _LT_TAGDECL([], [hardcode_automatic], [0],
  5855. [Set to "yes" if building a shared library automatically hardcodes DIR
  5856. into the library and all subsequent libraries and executables linked
  5857. against it])
  5858. _LT_TAGDECL([], [inherit_rpath], [0],
  5859. [Set to yes if linker adds runtime paths of dependent libraries
  5860. to runtime path list])
  5861. _LT_TAGDECL([], [link_all_deplibs], [0],
  5862. [Whether libtool must link a program against all its dependency libraries])
  5863. _LT_TAGDECL([], [always_export_symbols], [0],
  5864. [Set to "yes" if exported symbols are required])
  5865. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5866. [The commands to list exported symbols])
  5867. _LT_TAGDECL([], [exclude_expsyms], [1],
  5868. [Symbols that should not be listed in the preloaded symbols])
  5869. _LT_TAGDECL([], [include_expsyms], [1],
  5870. [Symbols that must always be exported])
  5871. _LT_TAGDECL([], [prelink_cmds], [2],
  5872. [Commands necessary for linking programs (against libraries) with templates])
  5873. _LT_TAGDECL([], [postlink_cmds], [2],
  5874. [Commands necessary for finishing linking programs])
  5875. _LT_TAGDECL([], [file_list_spec], [1],
  5876. [Specify filename containing input files])
  5877. dnl FIXME: Not yet implemented
  5878. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5879. dnl [Compiler flag to generate thread safe objects])
  5880. ])# _LT_LINKER_SHLIBS
  5881. # _LT_LANG_C_CONFIG([TAG])
  5882. # ------------------------
  5883. # Ensure that the configuration variables for a C compiler are suitably
  5884. # defined. These variables are subsequently used by _LT_CONFIG to write
  5885. # the compiler configuration to `libtool'.
  5886. m4_defun([_LT_LANG_C_CONFIG],
  5887. [m4_require([_LT_DECL_EGREP])dnl
  5888. lt_save_CC="$CC"
  5889. AC_LANG_PUSH(C)
  5890. # Source file extension for C test sources.
  5891. ac_ext=c
  5892. # Object file extension for compiled C test sources.
  5893. objext=o
  5894. _LT_TAGVAR(objext, $1)=$objext
  5895. # Code to be used in simple compile tests
  5896. lt_simple_compile_test_code="int some_variable = 0;"
  5897. # Code to be used in simple link tests
  5898. lt_simple_link_test_code='int main(){return(0);}'
  5899. _LT_TAG_COMPILER
  5900. # Save the default compiler, since it gets overwritten when the other
  5901. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5902. compiler_DEFAULT=$CC
  5903. # save warnings/boilerplate of simple test code
  5904. _LT_COMPILER_BOILERPLATE
  5905. _LT_LINKER_BOILERPLATE
  5906. ## CAVEAT EMPTOR:
  5907. ## There is no encapsulation within the following macros, do not change
  5908. ## the running order or otherwise move them around unless you know exactly
  5909. ## what you are doing...
  5910. if test -n "$compiler"; then
  5911. _LT_COMPILER_NO_RTTI($1)
  5912. _LT_COMPILER_PIC($1)
  5913. _LT_COMPILER_C_O($1)
  5914. _LT_COMPILER_FILE_LOCKS($1)
  5915. _LT_LINKER_SHLIBS($1)
  5916. _LT_SYS_DYNAMIC_LINKER($1)
  5917. _LT_LINKER_HARDCODE_LIBPATH($1)
  5918. LT_SYS_DLOPEN_SELF
  5919. _LT_CMD_STRIPLIB
  5920. # Report which library types will actually be built
  5921. AC_MSG_CHECKING([if libtool supports shared libraries])
  5922. AC_MSG_RESULT([$can_build_shared])
  5923. AC_MSG_CHECKING([whether to build shared libraries])
  5924. test "$can_build_shared" = "no" && enable_shared=no
  5925. # On AIX, shared libraries and static libraries use the same namespace, and
  5926. # are all built from PIC.
  5927. case $host_os in
  5928. aix3*)
  5929. test "$enable_shared" = yes && enable_static=no
  5930. if test -n "$RANLIB"; then
  5931. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  5932. postinstall_cmds='$RANLIB $lib'
  5933. fi
  5934. ;;
  5935. aix[[4-9]]*)
  5936. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  5937. test "$enable_shared" = yes && enable_static=no
  5938. fi
  5939. ;;
  5940. esac
  5941. AC_MSG_RESULT([$enable_shared])
  5942. AC_MSG_CHECKING([whether to build static libraries])
  5943. # Make sure either enable_shared or enable_static is yes.
  5944. test "$enable_shared" = yes || enable_static=yes
  5945. AC_MSG_RESULT([$enable_static])
  5946. _LT_CONFIG($1)
  5947. fi
  5948. AC_LANG_POP
  5949. CC="$lt_save_CC"
  5950. ])# _LT_LANG_C_CONFIG
  5951. # _LT_LANG_CXX_CONFIG([TAG])
  5952. # --------------------------
  5953. # Ensure that the configuration variables for a C++ compiler are suitably
  5954. # defined. These variables are subsequently used by _LT_CONFIG to write
  5955. # the compiler configuration to `libtool'.
  5956. m4_defun([_LT_LANG_CXX_CONFIG],
  5957. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  5958. m4_require([_LT_DECL_EGREP])dnl
  5959. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  5960. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  5961. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  5962. (test "X$CXX" != "Xg++"))) ; then
  5963. AC_PROG_CXXCPP
  5964. else
  5965. _lt_caught_CXX_error=yes
  5966. fi
  5967. AC_LANG_PUSH(C++)
  5968. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5969. _LT_TAGVAR(allow_undefined_flag, $1)=
  5970. _LT_TAGVAR(always_export_symbols, $1)=no
  5971. _LT_TAGVAR(archive_expsym_cmds, $1)=
  5972. _LT_TAGVAR(compiler_needs_object, $1)=no
  5973. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5974. _LT_TAGVAR(hardcode_direct, $1)=no
  5975. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  5976. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5977. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5978. _LT_TAGVAR(hardcode_minus_L, $1)=no
  5979. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5980. _LT_TAGVAR(hardcode_automatic, $1)=no
  5981. _LT_TAGVAR(inherit_rpath, $1)=no
  5982. _LT_TAGVAR(module_cmds, $1)=
  5983. _LT_TAGVAR(module_expsym_cmds, $1)=
  5984. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  5985. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  5986. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  5987. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  5988. _LT_TAGVAR(no_undefined_flag, $1)=
  5989. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5990. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5991. # Source file extension for C++ test sources.
  5992. ac_ext=cpp
  5993. # Object file extension for compiled C++ test sources.
  5994. objext=o
  5995. _LT_TAGVAR(objext, $1)=$objext
  5996. # No sense in running all these tests if we already determined that
  5997. # the CXX compiler isn't working. Some variables (like enable_shared)
  5998. # are currently assumed to apply to all compilers on this platform,
  5999. # and will be corrupted by setting them based on a non-working compiler.
  6000. if test "$_lt_caught_CXX_error" != yes; then
  6001. # Code to be used in simple compile tests
  6002. lt_simple_compile_test_code="int some_variable = 0;"
  6003. # Code to be used in simple link tests
  6004. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  6005. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6006. _LT_TAG_COMPILER
  6007. # save warnings/boilerplate of simple test code
  6008. _LT_COMPILER_BOILERPLATE
  6009. _LT_LINKER_BOILERPLATE
  6010. # Allow CC to be a program name with arguments.
  6011. lt_save_CC=$CC
  6012. lt_save_CFLAGS=$CFLAGS
  6013. lt_save_LD=$LD
  6014. lt_save_GCC=$GCC
  6015. GCC=$GXX
  6016. lt_save_with_gnu_ld=$with_gnu_ld
  6017. lt_save_path_LD=$lt_cv_path_LD
  6018. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  6019. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  6020. else
  6021. $as_unset lt_cv_prog_gnu_ld
  6022. fi
  6023. if test -n "${lt_cv_path_LDCXX+set}"; then
  6024. lt_cv_path_LD=$lt_cv_path_LDCXX
  6025. else
  6026. $as_unset lt_cv_path_LD
  6027. fi
  6028. test -z "${LDCXX+set}" || LD=$LDCXX
  6029. CC=${CXX-"c++"}
  6030. CFLAGS=$CXXFLAGS
  6031. compiler=$CC
  6032. _LT_TAGVAR(compiler, $1)=$CC
  6033. _LT_CC_BASENAME([$compiler])
  6034. if test -n "$compiler"; then
  6035. # We don't want -fno-exception when compiling C++ code, so set the
  6036. # no_builtin_flag separately
  6037. if test "$GXX" = yes; then
  6038. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  6039. else
  6040. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  6041. fi
  6042. if test "$GXX" = yes; then
  6043. # Set up default GNU C++ configuration
  6044. LT_PATH_LD
  6045. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  6046. # archiving commands below assume that GNU ld is being used.
  6047. if test "$with_gnu_ld" = yes; then
  6048. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6049. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6050. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6051. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6052. # If archive_cmds runs LD, not CC, wlarc should be empty
  6053. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  6054. # investigate it a little bit more. (MM)
  6055. wlarc='${wl}'
  6056. # ancient GNU ld didn't support --whole-archive et. al.
  6057. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  6058. $GREP 'no-whole-archive' > /dev/null; then
  6059. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6060. else
  6061. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6062. fi
  6063. else
  6064. with_gnu_ld=no
  6065. wlarc=
  6066. # A generic and very simple default shared library creation
  6067. # command for GNU C++ for the case where it uses the native
  6068. # linker, instead of GNU ld. If possible, this setting should
  6069. # overridden to take advantage of the native linker features on
  6070. # the platform it is being used on.
  6071. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6072. fi
  6073. # Commands to make compiler produce verbose output that lists
  6074. # what "hidden" libraries, object files and flags are used when
  6075. # linking a shared library.
  6076. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6077. else
  6078. GXX=no
  6079. with_gnu_ld=no
  6080. wlarc=
  6081. fi
  6082. # PORTME: fill in a description of your system's C++ link characteristics
  6083. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  6084. _LT_TAGVAR(ld_shlibs, $1)=yes
  6085. case $host_os in
  6086. aix3*)
  6087. # FIXME: insert proper C++ library support
  6088. _LT_TAGVAR(ld_shlibs, $1)=no
  6089. ;;
  6090. aix[[4-9]]*)
  6091. if test "$host_cpu" = ia64; then
  6092. # On IA64, the linker does run time linking by default, so we don't
  6093. # have to do anything special.
  6094. aix_use_runtimelinking=no
  6095. exp_sym_flag='-Bexport'
  6096. no_entry_flag=""
  6097. else
  6098. aix_use_runtimelinking=no
  6099. # Test if we are trying to use run time linking or normal
  6100. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  6101. # need to do runtime linking.
  6102. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  6103. for ld_flag in $LDFLAGS; do
  6104. case $ld_flag in
  6105. *-brtl*)
  6106. aix_use_runtimelinking=yes
  6107. break
  6108. ;;
  6109. esac
  6110. done
  6111. ;;
  6112. esac
  6113. exp_sym_flag='-bexport'
  6114. no_entry_flag='-bnoentry'
  6115. fi
  6116. # When large executables or shared objects are built, AIX ld can
  6117. # have problems creating the table of contents. If linking a library
  6118. # or program results in "error TOC overflow" add -mminimal-toc to
  6119. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  6120. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  6121. _LT_TAGVAR(archive_cmds, $1)=''
  6122. _LT_TAGVAR(hardcode_direct, $1)=yes
  6123. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6124. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6125. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6126. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  6127. if test "$GXX" = yes; then
  6128. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  6129. # We only want to do this on AIX 4.2 and lower, the check
  6130. # below for broken collect2 doesn't work under 4.3+
  6131. collect2name=`${CC} -print-prog-name=collect2`
  6132. if test -f "$collect2name" &&
  6133. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  6134. then
  6135. # We have reworked collect2
  6136. :
  6137. else
  6138. # We have old collect2
  6139. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  6140. # It fails to find uninstalled libraries when the uninstalled
  6141. # path is not listed in the libpath. Setting hardcode_minus_L
  6142. # to unsupported forces relinking
  6143. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6144. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6145. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6146. fi
  6147. esac
  6148. shared_flag='-shared'
  6149. if test "$aix_use_runtimelinking" = yes; then
  6150. shared_flag="$shared_flag "'${wl}-G'
  6151. fi
  6152. else
  6153. # not using gcc
  6154. if test "$host_cpu" = ia64; then
  6155. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  6156. # chokes on -Wl,-G. The following line is correct:
  6157. shared_flag='-G'
  6158. else
  6159. if test "$aix_use_runtimelinking" = yes; then
  6160. shared_flag='${wl}-G'
  6161. else
  6162. shared_flag='${wl}-bM:SRE'
  6163. fi
  6164. fi
  6165. fi
  6166. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  6167. # It seems that -bexpall does not export symbols beginning with
  6168. # underscore (_), so it is better to generate a list of symbols to
  6169. # export.
  6170. _LT_TAGVAR(always_export_symbols, $1)=yes
  6171. if test "$aix_use_runtimelinking" = yes; then
  6172. # Warning - without using the other runtime loading flags (-brtl),
  6173. # -berok will link without error, but may produce a broken library.
  6174. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  6175. # Determine the default libpath from the value encoded in an empty
  6176. # executable.
  6177. _LT_SYS_MODULE_PATH_AIX([$1])
  6178. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  6179. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  6180. else
  6181. if test "$host_cpu" = ia64; then
  6182. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  6183. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  6184. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  6185. else
  6186. # Determine the default libpath from the value encoded in an
  6187. # empty executable.
  6188. _LT_SYS_MODULE_PATH_AIX([$1])
  6189. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  6190. # Warning - without using the other run time loading flags,
  6191. # -berok will link without error, but may produce a broken library.
  6192. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  6193. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  6194. if test "$with_gnu_ld" = yes; then
  6195. # We only use this code for GNU lds that support --whole-archive.
  6196. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  6197. else
  6198. # Exported symbols can be pulled into shared objects from archives
  6199. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  6200. fi
  6201. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  6202. # This is similar to how AIX traditionally builds its shared
  6203. # libraries.
  6204. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  6205. fi
  6206. fi
  6207. ;;
  6208. beos*)
  6209. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  6210. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6211. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  6212. # support --undefined. This deserves some investigation. FIXME
  6213. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6214. else
  6215. _LT_TAGVAR(ld_shlibs, $1)=no
  6216. fi
  6217. ;;
  6218. chorus*)
  6219. case $cc_basename in
  6220. *)
  6221. # FIXME: insert proper C++ library support
  6222. _LT_TAGVAR(ld_shlibs, $1)=no
  6223. ;;
  6224. esac
  6225. ;;
  6226. cygwin* | mingw* | pw32* | cegcc*)
  6227. case $GXX,$cc_basename in
  6228. ,cl* | no,cl*)
  6229. # Native MSVC
  6230. # hardcode_libdir_flag_spec is actually meaningless, as there is
  6231. # no search path for DLLs.
  6232. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  6233. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6234. _LT_TAGVAR(always_export_symbols, $1)=yes
  6235. _LT_TAGVAR(file_list_spec, $1)='@'
  6236. # Tell ltmain to make .lib files, not .a files.
  6237. libext=lib
  6238. # Tell ltmain to make .dll files, not .so files.
  6239. shrext_cmds=".dll"
  6240. # FIXME: Setting linknames here is a bad hack.
  6241. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  6242. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  6243. $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  6244. else
  6245. $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  6246. fi~
  6247. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  6248. linknames='
  6249. # The linker will not automatically build a static lib if we build a DLL.
  6250. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  6251. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6252. # Don't use ranlib
  6253. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  6254. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  6255. lt_tool_outputfile="@TOOL_OUTPUT@"~
  6256. case $lt_outputfile in
  6257. *.exe|*.EXE) ;;
  6258. *)
  6259. lt_outputfile="$lt_outputfile.exe"
  6260. lt_tool_outputfile="$lt_tool_outputfile.exe"
  6261. ;;
  6262. esac~
  6263. func_to_tool_file "$lt_outputfile"~
  6264. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  6265. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  6266. $RM "$lt_outputfile.manifest";
  6267. fi'
  6268. ;;
  6269. *)
  6270. # g++
  6271. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  6272. # as there is no search path for DLLs.
  6273. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6274. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  6275. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  6276. _LT_TAGVAR(always_export_symbols, $1)=no
  6277. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  6278. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  6279. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  6280. # If the export-symbols file already is a .def file (1st line
  6281. # is EXPORTS), use it as is; otherwise, prepend...
  6282. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  6283. cp $export_symbols $output_objdir/$soname.def;
  6284. else
  6285. echo EXPORTS > $output_objdir/$soname.def;
  6286. cat $export_symbols >> $output_objdir/$soname.def;
  6287. fi~
  6288. $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  6289. else
  6290. _LT_TAGVAR(ld_shlibs, $1)=no
  6291. fi
  6292. ;;
  6293. esac
  6294. ;;
  6295. darwin* | rhapsody*)
  6296. _LT_DARWIN_LINKER_FEATURES($1)
  6297. ;;
  6298. dgux*)
  6299. case $cc_basename in
  6300. ec++*)
  6301. # FIXME: insert proper C++ library support
  6302. _LT_TAGVAR(ld_shlibs, $1)=no
  6303. ;;
  6304. ghcx*)
  6305. # Green Hills C++ Compiler
  6306. # FIXME: insert proper C++ library support
  6307. _LT_TAGVAR(ld_shlibs, $1)=no
  6308. ;;
  6309. *)
  6310. # FIXME: insert proper C++ library support
  6311. _LT_TAGVAR(ld_shlibs, $1)=no
  6312. ;;
  6313. esac
  6314. ;;
  6315. freebsd2.*)
  6316. # C++ shared libraries reported to be fairly broken before
  6317. # switch to ELF
  6318. _LT_TAGVAR(ld_shlibs, $1)=no
  6319. ;;
  6320. freebsd-elf*)
  6321. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6322. ;;
  6323. freebsd* | dragonfly*)
  6324. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  6325. # conventions
  6326. _LT_TAGVAR(ld_shlibs, $1)=yes
  6327. ;;
  6328. gnu*)
  6329. ;;
  6330. haiku*)
  6331. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6332. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6333. ;;
  6334. hpux9*)
  6335. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  6336. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6337. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6338. _LT_TAGVAR(hardcode_direct, $1)=yes
  6339. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6340. # but as the default
  6341. # location of the library.
  6342. case $cc_basename in
  6343. CC*)
  6344. # FIXME: insert proper C++ library support
  6345. _LT_TAGVAR(ld_shlibs, $1)=no
  6346. ;;
  6347. aCC*)
  6348. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  6349. # Commands to make compiler produce verbose output that lists
  6350. # what "hidden" libraries, object files and flags are used when
  6351. # linking a shared library.
  6352. #
  6353. # There doesn't appear to be a way to prevent this compiler from
  6354. # explicitly linking system object files so we need to strip them
  6355. # from the output so that they don't get included in the library
  6356. # dependencies.
  6357. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6358. ;;
  6359. *)
  6360. if test "$GXX" = yes; then
  6361. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  6362. else
  6363. # FIXME: insert proper C++ library support
  6364. _LT_TAGVAR(ld_shlibs, $1)=no
  6365. fi
  6366. ;;
  6367. esac
  6368. ;;
  6369. hpux10*|hpux11*)
  6370. if test $with_gnu_ld = no; then
  6371. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  6372. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6373. case $host_cpu in
  6374. hppa*64*|ia64*)
  6375. ;;
  6376. *)
  6377. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6378. ;;
  6379. esac
  6380. fi
  6381. case $host_cpu in
  6382. hppa*64*|ia64*)
  6383. _LT_TAGVAR(hardcode_direct, $1)=no
  6384. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6385. ;;
  6386. *)
  6387. _LT_TAGVAR(hardcode_direct, $1)=yes
  6388. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6389. _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  6390. # but as the default
  6391. # location of the library.
  6392. ;;
  6393. esac
  6394. case $cc_basename in
  6395. CC*)
  6396. # FIXME: insert proper C++ library support
  6397. _LT_TAGVAR(ld_shlibs, $1)=no
  6398. ;;
  6399. aCC*)
  6400. case $host_cpu in
  6401. hppa*64*)
  6402. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6403. ;;
  6404. ia64*)
  6405. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6406. ;;
  6407. *)
  6408. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6409. ;;
  6410. esac
  6411. # Commands to make compiler produce verbose output that lists
  6412. # what "hidden" libraries, object files and flags are used when
  6413. # linking a shared library.
  6414. #
  6415. # There doesn't appear to be a way to prevent this compiler from
  6416. # explicitly linking system object files so we need to strip them
  6417. # from the output so that they don't get included in the library
  6418. # dependencies.
  6419. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6420. ;;
  6421. *)
  6422. if test "$GXX" = yes; then
  6423. if test $with_gnu_ld = no; then
  6424. case $host_cpu in
  6425. hppa*64*)
  6426. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6427. ;;
  6428. ia64*)
  6429. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6430. ;;
  6431. *)
  6432. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6433. ;;
  6434. esac
  6435. fi
  6436. else
  6437. # FIXME: insert proper C++ library support
  6438. _LT_TAGVAR(ld_shlibs, $1)=no
  6439. fi
  6440. ;;
  6441. esac
  6442. ;;
  6443. interix[[3-9]]*)
  6444. _LT_TAGVAR(hardcode_direct, $1)=no
  6445. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6446. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6447. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6448. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  6449. # Instead, shared libraries are loaded at an image base (0x10000000 by
  6450. # default) and relocated if they conflict, which is a slow very memory
  6451. # consuming and fragmenting process. To avoid this, we pick a random,
  6452. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  6453. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  6454. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  6455. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  6456. ;;
  6457. irix5* | irix6*)
  6458. case $cc_basename in
  6459. CC*)
  6460. # SGI C++
  6461. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  6462. # Archives containing C++ object files must be created using
  6463. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  6464. # necessary to make sure instantiated templates are included
  6465. # in the archive.
  6466. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  6467. ;;
  6468. *)
  6469. if test "$GXX" = yes; then
  6470. if test "$with_gnu_ld" = no; then
  6471. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  6472. else
  6473. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
  6474. fi
  6475. fi
  6476. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6477. ;;
  6478. esac
  6479. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6480. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6481. _LT_TAGVAR(inherit_rpath, $1)=yes
  6482. ;;
  6483. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  6484. case $cc_basename in
  6485. KCC*)
  6486. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6487. # KCC will only create a shared library if the output file
  6488. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6489. # to its proper name (with version) after linking.
  6490. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  6491. _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
  6492. # Commands to make compiler produce verbose output that lists
  6493. # what "hidden" libraries, object files and flags are used when
  6494. # linking a shared library.
  6495. #
  6496. # There doesn't appear to be a way to prevent this compiler from
  6497. # explicitly linking system object files so we need to strip them
  6498. # from the output so that they don't get included in the library
  6499. # dependencies.
  6500. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6501. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6502. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6503. # Archives containing C++ object files must be created using
  6504. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  6505. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  6506. ;;
  6507. icpc* | ecpc* )
  6508. # Intel C++
  6509. with_gnu_ld=yes
  6510. # version 8.0 and above of icpc choke on multiply defined symbols
  6511. # if we add $predep_objects and $postdep_objects, however 7.1 and
  6512. # earlier do not add the objects themselves.
  6513. case `$CC -V 2>&1` in
  6514. *"Version 7."*)
  6515. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6516. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6517. ;;
  6518. *) # Version 8.0 or newer
  6519. tmp_idyn=
  6520. case $host_cpu in
  6521. ia64*) tmp_idyn=' -i_dynamic';;
  6522. esac
  6523. _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6524. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6525. ;;
  6526. esac
  6527. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6528. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6529. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6530. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  6531. ;;
  6532. pgCC* | pgcpp*)
  6533. # Portland Group C++ compiler
  6534. case `$CC -V` in
  6535. *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
  6536. _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
  6537. rm -rf $tpldir~
  6538. $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
  6539. compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
  6540. _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
  6541. rm -rf $tpldir~
  6542. $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
  6543. $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
  6544. $RANLIB $oldlib'
  6545. _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
  6546. rm -rf $tpldir~
  6547. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6548. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  6549. _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
  6550. rm -rf $tpldir~
  6551. $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
  6552. $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
  6553. ;;
  6554. *) # Version 6 and above use weak symbols
  6555. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
  6556. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
  6557. ;;
  6558. esac
  6559. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  6560. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6561. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  6562. ;;
  6563. cxx*)
  6564. # Compaq C++
  6565. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6566. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
  6567. runpath_var=LD_RUN_PATH
  6568. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6569. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6570. # Commands to make compiler produce verbose output that lists
  6571. # what "hidden" libraries, object files and flags are used when
  6572. # linking a shared library.
  6573. #
  6574. # There doesn't appear to be a way to prevent this compiler from
  6575. # explicitly linking system object files so we need to strip them
  6576. # from the output so that they don't get included in the library
  6577. # dependencies.
  6578. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
  6579. ;;
  6580. xl* | mpixl* | bgxl*)
  6581. # IBM XL 8.0 on PPC, with GNU ld
  6582. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6583. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6584. _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6585. if test "x$supports_anon_versioning" = xyes; then
  6586. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  6587. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  6588. echo "local: *; };" >> $output_objdir/$libname.ver~
  6589. $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  6590. fi
  6591. ;;
  6592. *)
  6593. case `$CC -V 2>&1 | sed 5q` in
  6594. *Sun\ C*)
  6595. # Sun C++ 5.9
  6596. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6597. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6598. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
  6599. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6600. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  6601. _LT_TAGVAR(compiler_needs_object, $1)=yes
  6602. # Not sure whether something based on
  6603. # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
  6604. # would be better.
  6605. output_verbose_link_cmd='func_echo_all'
  6606. # Archives containing C++ object files must be created using
  6607. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6608. # necessary to make sure instantiated templates are included
  6609. # in the archive.
  6610. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6611. ;;
  6612. esac
  6613. ;;
  6614. esac
  6615. ;;
  6616. lynxos*)
  6617. # FIXME: insert proper C++ library support
  6618. _LT_TAGVAR(ld_shlibs, $1)=no
  6619. ;;
  6620. m88k*)
  6621. # FIXME: insert proper C++ library support
  6622. _LT_TAGVAR(ld_shlibs, $1)=no
  6623. ;;
  6624. mvs*)
  6625. case $cc_basename in
  6626. cxx*)
  6627. # FIXME: insert proper C++ library support
  6628. _LT_TAGVAR(ld_shlibs, $1)=no
  6629. ;;
  6630. *)
  6631. # FIXME: insert proper C++ library support
  6632. _LT_TAGVAR(ld_shlibs, $1)=no
  6633. ;;
  6634. esac
  6635. ;;
  6636. netbsd*)
  6637. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  6638. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  6639. wlarc=
  6640. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6641. _LT_TAGVAR(hardcode_direct, $1)=yes
  6642. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6643. fi
  6644. # Workaround some broken pre-1.5 toolchains
  6645. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  6646. ;;
  6647. *nto* | *qnx*)
  6648. _LT_TAGVAR(ld_shlibs, $1)=yes
  6649. ;;
  6650. openbsd2*)
  6651. # C++ shared libraries are fairly broken
  6652. _LT_TAGVAR(ld_shlibs, $1)=no
  6653. ;;
  6654. openbsd*)
  6655. if test -f /usr/libexec/ld.so; then
  6656. _LT_TAGVAR(hardcode_direct, $1)=yes
  6657. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6658. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6659. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6660. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6661. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6662. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
  6663. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6664. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6665. fi
  6666. output_verbose_link_cmd=func_echo_all
  6667. else
  6668. _LT_TAGVAR(ld_shlibs, $1)=no
  6669. fi
  6670. ;;
  6671. osf3* | osf4* | osf5*)
  6672. case $cc_basename in
  6673. KCC*)
  6674. # Kuck and Associates, Inc. (KAI) C++ Compiler
  6675. # KCC will only create a shared library if the output file
  6676. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  6677. # to its proper name (with version) after linking.
  6678. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  6679. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6680. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6681. # Archives containing C++ object files must be created using
  6682. # the KAI C++ compiler.
  6683. case $host in
  6684. osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
  6685. *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
  6686. esac
  6687. ;;
  6688. RCC*)
  6689. # Rational C++ 2.4.1
  6690. # FIXME: insert proper C++ library support
  6691. _LT_TAGVAR(ld_shlibs, $1)=no
  6692. ;;
  6693. cxx*)
  6694. case $host in
  6695. osf3*)
  6696. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6697. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  6698. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6699. ;;
  6700. *)
  6701. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6702. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  6703. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  6704. echo "-hidden">> $lib.exp~
  6705. $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
  6706. $RM $lib.exp'
  6707. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6708. ;;
  6709. esac
  6710. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6711. # Commands to make compiler produce verbose output that lists
  6712. # what "hidden" libraries, object files and flags are used when
  6713. # linking a shared library.
  6714. #
  6715. # There doesn't appear to be a way to prevent this compiler from
  6716. # explicitly linking system object files so we need to strip them
  6717. # from the output so that they don't get included in the library
  6718. # dependencies.
  6719. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
  6720. ;;
  6721. *)
  6722. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6723. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6724. case $host in
  6725. osf3*)
  6726. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  6727. ;;
  6728. *)
  6729. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  6730. ;;
  6731. esac
  6732. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6733. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  6734. # Commands to make compiler produce verbose output that lists
  6735. # what "hidden" libraries, object files and flags are used when
  6736. # linking a shared library.
  6737. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6738. else
  6739. # FIXME: insert proper C++ library support
  6740. _LT_TAGVAR(ld_shlibs, $1)=no
  6741. fi
  6742. ;;
  6743. esac
  6744. ;;
  6745. psos*)
  6746. # FIXME: insert proper C++ library support
  6747. _LT_TAGVAR(ld_shlibs, $1)=no
  6748. ;;
  6749. sunos4*)
  6750. case $cc_basename in
  6751. CC*)
  6752. # Sun C++ 4.x
  6753. # FIXME: insert proper C++ library support
  6754. _LT_TAGVAR(ld_shlibs, $1)=no
  6755. ;;
  6756. lcc*)
  6757. # Lucid
  6758. # FIXME: insert proper C++ library support
  6759. _LT_TAGVAR(ld_shlibs, $1)=no
  6760. ;;
  6761. *)
  6762. # FIXME: insert proper C++ library support
  6763. _LT_TAGVAR(ld_shlibs, $1)=no
  6764. ;;
  6765. esac
  6766. ;;
  6767. solaris*)
  6768. case $cc_basename in
  6769. CC* | sunCC*)
  6770. # Sun C++ 4.2, 5.x and Centerline C++
  6771. _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
  6772. _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  6773. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  6774. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6775. $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6776. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6777. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6778. case $host_os in
  6779. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6780. *)
  6781. # The compiler driver will combine and reorder linker options,
  6782. # but understands `-z linker_flag'.
  6783. # Supported since Solaris 2.6 (maybe 2.5.1?)
  6784. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  6785. ;;
  6786. esac
  6787. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6788. output_verbose_link_cmd='func_echo_all'
  6789. # Archives containing C++ object files must be created using
  6790. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  6791. # necessary to make sure instantiated templates are included
  6792. # in the archive.
  6793. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  6794. ;;
  6795. gcx*)
  6796. # Green Hills C++ Compiler
  6797. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6798. # The C++ compiler must be used to create the archive.
  6799. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  6800. ;;
  6801. *)
  6802. # GNU C++ compiler with Solaris linker
  6803. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  6804. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  6805. if $CC --version | $GREP -v '^2\.7' > /dev/null; then
  6806. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6807. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6808. $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6809. # Commands to make compiler produce verbose output that lists
  6810. # what "hidden" libraries, object files and flags are used when
  6811. # linking a shared library.
  6812. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6813. else
  6814. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  6815. # platform.
  6816. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  6817. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  6818. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
  6819. # Commands to make compiler produce verbose output that lists
  6820. # what "hidden" libraries, object files and flags are used when
  6821. # linking a shared library.
  6822. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6823. fi
  6824. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  6825. case $host_os in
  6826. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6827. *)
  6828. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  6829. ;;
  6830. esac
  6831. fi
  6832. ;;
  6833. esac
  6834. ;;
  6835. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  6836. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6837. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6838. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6839. runpath_var='LD_RUN_PATH'
  6840. case $cc_basename in
  6841. CC*)
  6842. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6843. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6844. ;;
  6845. *)
  6846. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6847. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6848. ;;
  6849. esac
  6850. ;;
  6851. sysv5* | sco3.2v5* | sco5v6*)
  6852. # Note: We can NOT use -z defs as we might desire, because we do not
  6853. # link with -lc, and that would cause any symbols used from libc to
  6854. # always be unresolved, which means just about no library would
  6855. # ever link correctly. If we're not using GNU ld we use -z text
  6856. # though, which does catch some bad symbols but isn't as heavy-handed
  6857. # as -z defs.
  6858. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  6859. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  6860. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6861. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  6862. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  6863. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6864. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6865. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6866. runpath_var='LD_RUN_PATH'
  6867. case $cc_basename in
  6868. CC*)
  6869. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6870. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6871. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
  6872. '"$_LT_TAGVAR(old_archive_cmds, $1)"
  6873. _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
  6874. '"$_LT_TAGVAR(reload_cmds, $1)"
  6875. ;;
  6876. *)
  6877. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6878. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  6879. ;;
  6880. esac
  6881. ;;
  6882. tandem*)
  6883. case $cc_basename in
  6884. NCC*)
  6885. # NonStop-UX NCC 3.20
  6886. # FIXME: insert proper C++ library support
  6887. _LT_TAGVAR(ld_shlibs, $1)=no
  6888. ;;
  6889. *)
  6890. # FIXME: insert proper C++ library support
  6891. _LT_TAGVAR(ld_shlibs, $1)=no
  6892. ;;
  6893. esac
  6894. ;;
  6895. vxworks*)
  6896. # FIXME: insert proper C++ library support
  6897. _LT_TAGVAR(ld_shlibs, $1)=no
  6898. ;;
  6899. *)
  6900. # FIXME: insert proper C++ library support
  6901. _LT_TAGVAR(ld_shlibs, $1)=no
  6902. ;;
  6903. esac
  6904. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  6905. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6906. _LT_TAGVAR(GCC, $1)="$GXX"
  6907. _LT_TAGVAR(LD, $1)="$LD"
  6908. ## CAVEAT EMPTOR:
  6909. ## There is no encapsulation within the following macros, do not change
  6910. ## the running order or otherwise move them around unless you know exactly
  6911. ## what you are doing...
  6912. _LT_SYS_HIDDEN_LIBDEPS($1)
  6913. _LT_COMPILER_PIC($1)
  6914. _LT_COMPILER_C_O($1)
  6915. _LT_COMPILER_FILE_LOCKS($1)
  6916. _LT_LINKER_SHLIBS($1)
  6917. _LT_SYS_DYNAMIC_LINKER($1)
  6918. _LT_LINKER_HARDCODE_LIBPATH($1)
  6919. _LT_CONFIG($1)
  6920. fi # test -n "$compiler"
  6921. CC=$lt_save_CC
  6922. CFLAGS=$lt_save_CFLAGS
  6923. LDCXX=$LD
  6924. LD=$lt_save_LD
  6925. GCC=$lt_save_GCC
  6926. with_gnu_ld=$lt_save_with_gnu_ld
  6927. lt_cv_path_LDCXX=$lt_cv_path_LD
  6928. lt_cv_path_LD=$lt_save_path_LD
  6929. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  6930. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  6931. fi # test "$_lt_caught_CXX_error" != yes
  6932. AC_LANG_POP
  6933. ])# _LT_LANG_CXX_CONFIG
  6934. # _LT_FUNC_STRIPNAME_CNF
  6935. # ----------------------
  6936. # func_stripname_cnf prefix suffix name
  6937. # strip PREFIX and SUFFIX off of NAME.
  6938. # PREFIX and SUFFIX must not contain globbing or regex special
  6939. # characters, hashes, percent signs, but SUFFIX may contain a leading
  6940. # dot (in which case that matches only a dot).
  6941. #
  6942. # This function is identical to the (non-XSI) version of func_stripname,
  6943. # except this one can be used by m4 code that may be executed by configure,
  6944. # rather than the libtool script.
  6945. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
  6946. AC_REQUIRE([_LT_DECL_SED])
  6947. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
  6948. func_stripname_cnf ()
  6949. {
  6950. case ${2} in
  6951. .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
  6952. *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
  6953. esac
  6954. } # func_stripname_cnf
  6955. ])# _LT_FUNC_STRIPNAME_CNF
  6956. # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
  6957. # ---------------------------------
  6958. # Figure out "hidden" library dependencies from verbose
  6959. # compiler output when linking a shared library.
  6960. # Parse the compiler output and extract the necessary
  6961. # objects, libraries and library flags.
  6962. m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
  6963. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6964. AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
  6965. # Dependencies to place before and after the object being linked:
  6966. _LT_TAGVAR(predep_objects, $1)=
  6967. _LT_TAGVAR(postdep_objects, $1)=
  6968. _LT_TAGVAR(predeps, $1)=
  6969. _LT_TAGVAR(postdeps, $1)=
  6970. _LT_TAGVAR(compiler_lib_search_path, $1)=
  6971. dnl we can't use the lt_simple_compile_test_code here,
  6972. dnl because it contains code intended for an executable,
  6973. dnl not a library. It's possible we should let each
  6974. dnl tag define a new lt_????_link_test_code variable,
  6975. dnl but it's only used here...
  6976. m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
  6977. int a;
  6978. void foo (void) { a = 0; }
  6979. _LT_EOF
  6980. ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
  6981. class Foo
  6982. {
  6983. public:
  6984. Foo (void) { a = 0; }
  6985. private:
  6986. int a;
  6987. };
  6988. _LT_EOF
  6989. ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
  6990. subroutine foo
  6991. implicit none
  6992. integer*4 a
  6993. a=0
  6994. return
  6995. end
  6996. _LT_EOF
  6997. ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
  6998. subroutine foo
  6999. implicit none
  7000. integer a
  7001. a=0
  7002. return
  7003. end
  7004. _LT_EOF
  7005. ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
  7006. public class foo {
  7007. private int a;
  7008. public void bar (void) {
  7009. a = 0;
  7010. }
  7011. };
  7012. _LT_EOF
  7013. ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
  7014. package foo
  7015. func foo() {
  7016. }
  7017. _LT_EOF
  7018. ])
  7019. _lt_libdeps_save_CFLAGS=$CFLAGS
  7020. case "$CC $CFLAGS " in #(
  7021. *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
  7022. *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
  7023. *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
  7024. esac
  7025. dnl Parse the compiler output and extract the necessary
  7026. dnl objects, libraries and library flags.
  7027. if AC_TRY_EVAL(ac_compile); then
  7028. # Parse the compiler output and extract the necessary
  7029. # objects, libraries and library flags.
  7030. # Sentinel used to keep track of whether or not we are before
  7031. # the conftest object file.
  7032. pre_test_object_deps_done=no
  7033. for p in `eval "$output_verbose_link_cmd"`; do
  7034. case ${prev}${p} in
  7035. -L* | -R* | -l*)
  7036. # Some compilers place space between "-{L,R}" and the path.
  7037. # Remove the space.
  7038. if test $p = "-L" ||
  7039. test $p = "-R"; then
  7040. prev=$p
  7041. continue
  7042. fi
  7043. # Expand the sysroot to ease extracting the directories later.
  7044. if test -z "$prev"; then
  7045. case $p in
  7046. -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
  7047. -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
  7048. -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
  7049. esac
  7050. fi
  7051. case $p in
  7052. =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
  7053. esac
  7054. if test "$pre_test_object_deps_done" = no; then
  7055. case ${prev} in
  7056. -L | -R)
  7057. # Internal compiler library paths should come after those
  7058. # provided the user. The postdeps already come after the
  7059. # user supplied libs so there is no need to process them.
  7060. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
  7061. _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  7062. else
  7063. _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  7064. fi
  7065. ;;
  7066. # The "-l" case would never come before the object being
  7067. # linked, so don't bother handling this case.
  7068. esac
  7069. else
  7070. if test -z "$_LT_TAGVAR(postdeps, $1)"; then
  7071. _LT_TAGVAR(postdeps, $1)="${prev}${p}"
  7072. else
  7073. _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
  7074. fi
  7075. fi
  7076. prev=
  7077. ;;
  7078. *.lto.$objext) ;; # Ignore GCC LTO objects
  7079. *.$objext)
  7080. # This assumes that the test object file only shows up
  7081. # once in the compiler output.
  7082. if test "$p" = "conftest.$objext"; then
  7083. pre_test_object_deps_done=yes
  7084. continue
  7085. fi
  7086. if test "$pre_test_object_deps_done" = no; then
  7087. if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
  7088. _LT_TAGVAR(predep_objects, $1)="$p"
  7089. else
  7090. _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
  7091. fi
  7092. else
  7093. if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
  7094. _LT_TAGVAR(postdep_objects, $1)="$p"
  7095. else
  7096. _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
  7097. fi
  7098. fi
  7099. ;;
  7100. *) ;; # Ignore the rest.
  7101. esac
  7102. done
  7103. # Clean up.
  7104. rm -f a.out a.exe
  7105. else
  7106. echo "libtool.m4: error: problem compiling $1 test program"
  7107. fi
  7108. $RM -f confest.$objext
  7109. CFLAGS=$_lt_libdeps_save_CFLAGS
  7110. # PORTME: override above test on systems where it is broken
  7111. m4_if([$1], [CXX],
  7112. [case $host_os in
  7113. interix[[3-9]]*)
  7114. # Interix 3.5 installs completely hosed .la files for C++, so rather than
  7115. # hack all around it, let's just trust "g++" to DTRT.
  7116. _LT_TAGVAR(predep_objects,$1)=
  7117. _LT_TAGVAR(postdep_objects,$1)=
  7118. _LT_TAGVAR(postdeps,$1)=
  7119. ;;
  7120. linux*)
  7121. case `$CC -V 2>&1 | sed 5q` in
  7122. *Sun\ C*)
  7123. # Sun C++ 5.9
  7124. # The more standards-conforming stlport4 library is
  7125. # incompatible with the Cstd library. Avoid specifying
  7126. # it if it's in CXXFLAGS. Ignore libCrun as
  7127. # -library=stlport4 depends on it.
  7128. case " $CXX $CXXFLAGS " in
  7129. *" -library=stlport4 "*)
  7130. solaris_use_stlport4=yes
  7131. ;;
  7132. esac
  7133. if test "$solaris_use_stlport4" != yes; then
  7134. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  7135. fi
  7136. ;;
  7137. esac
  7138. ;;
  7139. solaris*)
  7140. case $cc_basename in
  7141. CC* | sunCC*)
  7142. # The more standards-conforming stlport4 library is
  7143. # incompatible with the Cstd library. Avoid specifying
  7144. # it if it's in CXXFLAGS. Ignore libCrun as
  7145. # -library=stlport4 depends on it.
  7146. case " $CXX $CXXFLAGS " in
  7147. *" -library=stlport4 "*)
  7148. solaris_use_stlport4=yes
  7149. ;;
  7150. esac
  7151. # Adding this requires a known-good setup of shared libraries for
  7152. # Sun compiler versions before 5.6, else PIC objects from an old
  7153. # archive will be linked into the output, leading to subtle bugs.
  7154. if test "$solaris_use_stlport4" != yes; then
  7155. _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
  7156. fi
  7157. ;;
  7158. esac
  7159. ;;
  7160. esac
  7161. ])
  7162. case " $_LT_TAGVAR(postdeps, $1) " in
  7163. *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  7164. esac
  7165. _LT_TAGVAR(compiler_lib_search_dirs, $1)=
  7166. if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
  7167. _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
  7168. fi
  7169. _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
  7170. [The directories searched by this compiler when creating a shared library])
  7171. _LT_TAGDECL([], [predep_objects], [1],
  7172. [Dependencies to place before and after the objects being linked to
  7173. create a shared library])
  7174. _LT_TAGDECL([], [postdep_objects], [1])
  7175. _LT_TAGDECL([], [predeps], [1])
  7176. _LT_TAGDECL([], [postdeps], [1])
  7177. _LT_TAGDECL([], [compiler_lib_search_path], [1],
  7178. [The library search path used internally by the compiler when linking
  7179. a shared library])
  7180. ])# _LT_SYS_HIDDEN_LIBDEPS
  7181. # _LT_LANG_F77_CONFIG([TAG])
  7182. # --------------------------
  7183. # Ensure that the configuration variables for a Fortran 77 compiler are
  7184. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7185. # to write the compiler configuration to `libtool'.
  7186. m4_defun([_LT_LANG_F77_CONFIG],
  7187. [AC_LANG_PUSH(Fortran 77)
  7188. if test -z "$F77" || test "X$F77" = "Xno"; then
  7189. _lt_disable_F77=yes
  7190. fi
  7191. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7192. _LT_TAGVAR(allow_undefined_flag, $1)=
  7193. _LT_TAGVAR(always_export_symbols, $1)=no
  7194. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7195. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7196. _LT_TAGVAR(hardcode_direct, $1)=no
  7197. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7198. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7199. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7200. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7201. _LT_TAGVAR(hardcode_automatic, $1)=no
  7202. _LT_TAGVAR(inherit_rpath, $1)=no
  7203. _LT_TAGVAR(module_cmds, $1)=
  7204. _LT_TAGVAR(module_expsym_cmds, $1)=
  7205. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7206. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7207. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7208. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7209. _LT_TAGVAR(no_undefined_flag, $1)=
  7210. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7211. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7212. # Source file extension for f77 test sources.
  7213. ac_ext=f
  7214. # Object file extension for compiled f77 test sources.
  7215. objext=o
  7216. _LT_TAGVAR(objext, $1)=$objext
  7217. # No sense in running all these tests if we already determined that
  7218. # the F77 compiler isn't working. Some variables (like enable_shared)
  7219. # are currently assumed to apply to all compilers on this platform,
  7220. # and will be corrupted by setting them based on a non-working compiler.
  7221. if test "$_lt_disable_F77" != yes; then
  7222. # Code to be used in simple compile tests
  7223. lt_simple_compile_test_code="\
  7224. subroutine t
  7225. return
  7226. end
  7227. "
  7228. # Code to be used in simple link tests
  7229. lt_simple_link_test_code="\
  7230. program t
  7231. end
  7232. "
  7233. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7234. _LT_TAG_COMPILER
  7235. # save warnings/boilerplate of simple test code
  7236. _LT_COMPILER_BOILERPLATE
  7237. _LT_LINKER_BOILERPLATE
  7238. # Allow CC to be a program name with arguments.
  7239. lt_save_CC="$CC"
  7240. lt_save_GCC=$GCC
  7241. lt_save_CFLAGS=$CFLAGS
  7242. CC=${F77-"f77"}
  7243. CFLAGS=$FFLAGS
  7244. compiler=$CC
  7245. _LT_TAGVAR(compiler, $1)=$CC
  7246. _LT_CC_BASENAME([$compiler])
  7247. GCC=$G77
  7248. if test -n "$compiler"; then
  7249. AC_MSG_CHECKING([if libtool supports shared libraries])
  7250. AC_MSG_RESULT([$can_build_shared])
  7251. AC_MSG_CHECKING([whether to build shared libraries])
  7252. test "$can_build_shared" = "no" && enable_shared=no
  7253. # On AIX, shared libraries and static libraries use the same namespace, and
  7254. # are all built from PIC.
  7255. case $host_os in
  7256. aix3*)
  7257. test "$enable_shared" = yes && enable_static=no
  7258. if test -n "$RANLIB"; then
  7259. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7260. postinstall_cmds='$RANLIB $lib'
  7261. fi
  7262. ;;
  7263. aix[[4-9]]*)
  7264. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  7265. test "$enable_shared" = yes && enable_static=no
  7266. fi
  7267. ;;
  7268. esac
  7269. AC_MSG_RESULT([$enable_shared])
  7270. AC_MSG_CHECKING([whether to build static libraries])
  7271. # Make sure either enable_shared or enable_static is yes.
  7272. test "$enable_shared" = yes || enable_static=yes
  7273. AC_MSG_RESULT([$enable_static])
  7274. _LT_TAGVAR(GCC, $1)="$G77"
  7275. _LT_TAGVAR(LD, $1)="$LD"
  7276. ## CAVEAT EMPTOR:
  7277. ## There is no encapsulation within the following macros, do not change
  7278. ## the running order or otherwise move them around unless you know exactly
  7279. ## what you are doing...
  7280. _LT_COMPILER_PIC($1)
  7281. _LT_COMPILER_C_O($1)
  7282. _LT_COMPILER_FILE_LOCKS($1)
  7283. _LT_LINKER_SHLIBS($1)
  7284. _LT_SYS_DYNAMIC_LINKER($1)
  7285. _LT_LINKER_HARDCODE_LIBPATH($1)
  7286. _LT_CONFIG($1)
  7287. fi # test -n "$compiler"
  7288. GCC=$lt_save_GCC
  7289. CC="$lt_save_CC"
  7290. CFLAGS="$lt_save_CFLAGS"
  7291. fi # test "$_lt_disable_F77" != yes
  7292. AC_LANG_POP
  7293. ])# _LT_LANG_F77_CONFIG
  7294. # _LT_LANG_FC_CONFIG([TAG])
  7295. # -------------------------
  7296. # Ensure that the configuration variables for a Fortran compiler are
  7297. # suitably defined. These variables are subsequently used by _LT_CONFIG
  7298. # to write the compiler configuration to `libtool'.
  7299. m4_defun([_LT_LANG_FC_CONFIG],
  7300. [AC_LANG_PUSH(Fortran)
  7301. if test -z "$FC" || test "X$FC" = "Xno"; then
  7302. _lt_disable_FC=yes
  7303. fi
  7304. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7305. _LT_TAGVAR(allow_undefined_flag, $1)=
  7306. _LT_TAGVAR(always_export_symbols, $1)=no
  7307. _LT_TAGVAR(archive_expsym_cmds, $1)=
  7308. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  7309. _LT_TAGVAR(hardcode_direct, $1)=no
  7310. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  7311. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  7312. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  7313. _LT_TAGVAR(hardcode_minus_L, $1)=no
  7314. _LT_TAGVAR(hardcode_automatic, $1)=no
  7315. _LT_TAGVAR(inherit_rpath, $1)=no
  7316. _LT_TAGVAR(module_cmds, $1)=
  7317. _LT_TAGVAR(module_expsym_cmds, $1)=
  7318. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  7319. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7320. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7321. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7322. _LT_TAGVAR(no_undefined_flag, $1)=
  7323. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  7324. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  7325. # Source file extension for fc test sources.
  7326. ac_ext=${ac_fc_srcext-f}
  7327. # Object file extension for compiled fc test sources.
  7328. objext=o
  7329. _LT_TAGVAR(objext, $1)=$objext
  7330. # No sense in running all these tests if we already determined that
  7331. # the FC compiler isn't working. Some variables (like enable_shared)
  7332. # are currently assumed to apply to all compilers on this platform,
  7333. # and will be corrupted by setting them based on a non-working compiler.
  7334. if test "$_lt_disable_FC" != yes; then
  7335. # Code to be used in simple compile tests
  7336. lt_simple_compile_test_code="\
  7337. subroutine t
  7338. return
  7339. end
  7340. "
  7341. # Code to be used in simple link tests
  7342. lt_simple_link_test_code="\
  7343. program t
  7344. end
  7345. "
  7346. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7347. _LT_TAG_COMPILER
  7348. # save warnings/boilerplate of simple test code
  7349. _LT_COMPILER_BOILERPLATE
  7350. _LT_LINKER_BOILERPLATE
  7351. # Allow CC to be a program name with arguments.
  7352. lt_save_CC="$CC"
  7353. lt_save_GCC=$GCC
  7354. lt_save_CFLAGS=$CFLAGS
  7355. CC=${FC-"f95"}
  7356. CFLAGS=$FCFLAGS
  7357. compiler=$CC
  7358. GCC=$ac_cv_fc_compiler_gnu
  7359. _LT_TAGVAR(compiler, $1)=$CC
  7360. _LT_CC_BASENAME([$compiler])
  7361. if test -n "$compiler"; then
  7362. AC_MSG_CHECKING([if libtool supports shared libraries])
  7363. AC_MSG_RESULT([$can_build_shared])
  7364. AC_MSG_CHECKING([whether to build shared libraries])
  7365. test "$can_build_shared" = "no" && enable_shared=no
  7366. # On AIX, shared libraries and static libraries use the same namespace, and
  7367. # are all built from PIC.
  7368. case $host_os in
  7369. aix3*)
  7370. test "$enable_shared" = yes && enable_static=no
  7371. if test -n "$RANLIB"; then
  7372. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  7373. postinstall_cmds='$RANLIB $lib'
  7374. fi
  7375. ;;
  7376. aix[[4-9]]*)
  7377. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  7378. test "$enable_shared" = yes && enable_static=no
  7379. fi
  7380. ;;
  7381. esac
  7382. AC_MSG_RESULT([$enable_shared])
  7383. AC_MSG_CHECKING([whether to build static libraries])
  7384. # Make sure either enable_shared or enable_static is yes.
  7385. test "$enable_shared" = yes || enable_static=yes
  7386. AC_MSG_RESULT([$enable_static])
  7387. _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
  7388. _LT_TAGVAR(LD, $1)="$LD"
  7389. ## CAVEAT EMPTOR:
  7390. ## There is no encapsulation within the following macros, do not change
  7391. ## the running order or otherwise move them around unless you know exactly
  7392. ## what you are doing...
  7393. _LT_SYS_HIDDEN_LIBDEPS($1)
  7394. _LT_COMPILER_PIC($1)
  7395. _LT_COMPILER_C_O($1)
  7396. _LT_COMPILER_FILE_LOCKS($1)
  7397. _LT_LINKER_SHLIBS($1)
  7398. _LT_SYS_DYNAMIC_LINKER($1)
  7399. _LT_LINKER_HARDCODE_LIBPATH($1)
  7400. _LT_CONFIG($1)
  7401. fi # test -n "$compiler"
  7402. GCC=$lt_save_GCC
  7403. CC=$lt_save_CC
  7404. CFLAGS=$lt_save_CFLAGS
  7405. fi # test "$_lt_disable_FC" != yes
  7406. AC_LANG_POP
  7407. ])# _LT_LANG_FC_CONFIG
  7408. # _LT_LANG_GCJ_CONFIG([TAG])
  7409. # --------------------------
  7410. # Ensure that the configuration variables for the GNU Java Compiler compiler
  7411. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7412. # to write the compiler configuration to `libtool'.
  7413. m4_defun([_LT_LANG_GCJ_CONFIG],
  7414. [AC_REQUIRE([LT_PROG_GCJ])dnl
  7415. AC_LANG_SAVE
  7416. # Source file extension for Java test sources.
  7417. ac_ext=java
  7418. # Object file extension for compiled Java test sources.
  7419. objext=o
  7420. _LT_TAGVAR(objext, $1)=$objext
  7421. # Code to be used in simple compile tests
  7422. lt_simple_compile_test_code="class foo {}"
  7423. # Code to be used in simple link tests
  7424. lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
  7425. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7426. _LT_TAG_COMPILER
  7427. # save warnings/boilerplate of simple test code
  7428. _LT_COMPILER_BOILERPLATE
  7429. _LT_LINKER_BOILERPLATE
  7430. # Allow CC to be a program name with arguments.
  7431. lt_save_CC=$CC
  7432. lt_save_CFLAGS=$CFLAGS
  7433. lt_save_GCC=$GCC
  7434. GCC=yes
  7435. CC=${GCJ-"gcj"}
  7436. CFLAGS=$GCJFLAGS
  7437. compiler=$CC
  7438. _LT_TAGVAR(compiler, $1)=$CC
  7439. _LT_TAGVAR(LD, $1)="$LD"
  7440. _LT_CC_BASENAME([$compiler])
  7441. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  7442. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7443. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7444. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7445. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7446. ## CAVEAT EMPTOR:
  7447. ## There is no encapsulation within the following macros, do not change
  7448. ## the running order or otherwise move them around unless you know exactly
  7449. ## what you are doing...
  7450. if test -n "$compiler"; then
  7451. _LT_COMPILER_NO_RTTI($1)
  7452. _LT_COMPILER_PIC($1)
  7453. _LT_COMPILER_C_O($1)
  7454. _LT_COMPILER_FILE_LOCKS($1)
  7455. _LT_LINKER_SHLIBS($1)
  7456. _LT_LINKER_HARDCODE_LIBPATH($1)
  7457. _LT_CONFIG($1)
  7458. fi
  7459. AC_LANG_RESTORE
  7460. GCC=$lt_save_GCC
  7461. CC=$lt_save_CC
  7462. CFLAGS=$lt_save_CFLAGS
  7463. ])# _LT_LANG_GCJ_CONFIG
  7464. # _LT_LANG_GO_CONFIG([TAG])
  7465. # --------------------------
  7466. # Ensure that the configuration variables for the GNU Go compiler
  7467. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7468. # to write the compiler configuration to `libtool'.
  7469. m4_defun([_LT_LANG_GO_CONFIG],
  7470. [AC_REQUIRE([LT_PROG_GO])dnl
  7471. AC_LANG_SAVE
  7472. # Source file extension for Go test sources.
  7473. ac_ext=go
  7474. # Object file extension for compiled Go test sources.
  7475. objext=o
  7476. _LT_TAGVAR(objext, $1)=$objext
  7477. # Code to be used in simple compile tests
  7478. lt_simple_compile_test_code="package main; func main() { }"
  7479. # Code to be used in simple link tests
  7480. lt_simple_link_test_code='package main; func main() { }'
  7481. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7482. _LT_TAG_COMPILER
  7483. # save warnings/boilerplate of simple test code
  7484. _LT_COMPILER_BOILERPLATE
  7485. _LT_LINKER_BOILERPLATE
  7486. # Allow CC to be a program name with arguments.
  7487. lt_save_CC=$CC
  7488. lt_save_CFLAGS=$CFLAGS
  7489. lt_save_GCC=$GCC
  7490. GCC=yes
  7491. CC=${GOC-"gccgo"}
  7492. CFLAGS=$GOFLAGS
  7493. compiler=$CC
  7494. _LT_TAGVAR(compiler, $1)=$CC
  7495. _LT_TAGVAR(LD, $1)="$LD"
  7496. _LT_CC_BASENAME([$compiler])
  7497. # Go did not exist at the time GCC didn't implicitly link libc in.
  7498. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  7499. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  7500. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  7501. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  7502. ## CAVEAT EMPTOR:
  7503. ## There is no encapsulation within the following macros, do not change
  7504. ## the running order or otherwise move them around unless you know exactly
  7505. ## what you are doing...
  7506. if test -n "$compiler"; then
  7507. _LT_COMPILER_NO_RTTI($1)
  7508. _LT_COMPILER_PIC($1)
  7509. _LT_COMPILER_C_O($1)
  7510. _LT_COMPILER_FILE_LOCKS($1)
  7511. _LT_LINKER_SHLIBS($1)
  7512. _LT_LINKER_HARDCODE_LIBPATH($1)
  7513. _LT_CONFIG($1)
  7514. fi
  7515. AC_LANG_RESTORE
  7516. GCC=$lt_save_GCC
  7517. CC=$lt_save_CC
  7518. CFLAGS=$lt_save_CFLAGS
  7519. ])# _LT_LANG_GO_CONFIG
  7520. # _LT_LANG_RC_CONFIG([TAG])
  7521. # -------------------------
  7522. # Ensure that the configuration variables for the Windows resource compiler
  7523. # are suitably defined. These variables are subsequently used by _LT_CONFIG
  7524. # to write the compiler configuration to `libtool'.
  7525. m4_defun([_LT_LANG_RC_CONFIG],
  7526. [AC_REQUIRE([LT_PROG_RC])dnl
  7527. AC_LANG_SAVE
  7528. # Source file extension for RC test sources.
  7529. ac_ext=rc
  7530. # Object file extension for compiled RC test sources.
  7531. objext=o
  7532. _LT_TAGVAR(objext, $1)=$objext
  7533. # Code to be used in simple compile tests
  7534. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
  7535. # Code to be used in simple link tests
  7536. lt_simple_link_test_code="$lt_simple_compile_test_code"
  7537. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  7538. _LT_TAG_COMPILER
  7539. # save warnings/boilerplate of simple test code
  7540. _LT_COMPILER_BOILERPLATE
  7541. _LT_LINKER_BOILERPLATE
  7542. # Allow CC to be a program name with arguments.
  7543. lt_save_CC="$CC"
  7544. lt_save_CFLAGS=$CFLAGS
  7545. lt_save_GCC=$GCC
  7546. GCC=
  7547. CC=${RC-"windres"}
  7548. CFLAGS=
  7549. compiler=$CC
  7550. _LT_TAGVAR(compiler, $1)=$CC
  7551. _LT_CC_BASENAME([$compiler])
  7552. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  7553. if test -n "$compiler"; then
  7554. :
  7555. _LT_CONFIG($1)
  7556. fi
  7557. GCC=$lt_save_GCC
  7558. AC_LANG_RESTORE
  7559. CC=$lt_save_CC
  7560. CFLAGS=$lt_save_CFLAGS
  7561. ])# _LT_LANG_RC_CONFIG
  7562. # LT_PROG_GCJ
  7563. # -----------
  7564. AC_DEFUN([LT_PROG_GCJ],
  7565. [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
  7566. [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
  7567. [AC_CHECK_TOOL(GCJ, gcj,)
  7568. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  7569. AC_SUBST(GCJFLAGS)])])[]dnl
  7570. ])
  7571. # Old name:
  7572. AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
  7573. dnl aclocal-1.4 backwards compatibility:
  7574. dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
  7575. # LT_PROG_GO
  7576. # ----------
  7577. AC_DEFUN([LT_PROG_GO],
  7578. [AC_CHECK_TOOL(GOC, gccgo,)
  7579. ])
  7580. # LT_PROG_RC
  7581. # ----------
  7582. AC_DEFUN([LT_PROG_RC],
  7583. [AC_CHECK_TOOL(RC, windres,)
  7584. ])
  7585. # Old name:
  7586. AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
  7587. dnl aclocal-1.4 backwards compatibility:
  7588. dnl AC_DEFUN([LT_AC_PROG_RC], [])
  7589. # _LT_DECL_EGREP
  7590. # --------------
  7591. # If we don't have a new enough Autoconf to choose the best grep
  7592. # available, choose the one first in the user's PATH.
  7593. m4_defun([_LT_DECL_EGREP],
  7594. [AC_REQUIRE([AC_PROG_EGREP])dnl
  7595. AC_REQUIRE([AC_PROG_FGREP])dnl
  7596. test -z "$GREP" && GREP=grep
  7597. _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
  7598. _LT_DECL([], [EGREP], [1], [An ERE matcher])
  7599. _LT_DECL([], [FGREP], [1], [A literal string matcher])
  7600. dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
  7601. AC_SUBST([GREP])
  7602. ])
  7603. # _LT_DECL_OBJDUMP
  7604. # --------------
  7605. # If we don't have a new enough Autoconf to choose the best objdump
  7606. # available, choose the one first in the user's PATH.
  7607. m4_defun([_LT_DECL_OBJDUMP],
  7608. [AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7609. test -z "$OBJDUMP" && OBJDUMP=objdump
  7610. _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
  7611. AC_SUBST([OBJDUMP])
  7612. ])
  7613. # _LT_DECL_DLLTOOL
  7614. # ----------------
  7615. # Ensure DLLTOOL variable is set.
  7616. m4_defun([_LT_DECL_DLLTOOL],
  7617. [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7618. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7619. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
  7620. AC_SUBST([DLLTOOL])
  7621. ])
  7622. # _LT_DECL_SED
  7623. # ------------
  7624. # Check for a fully-functional sed program, that truncates
  7625. # as few characters as possible. Prefer GNU sed if found.
  7626. m4_defun([_LT_DECL_SED],
  7627. [AC_PROG_SED
  7628. test -z "$SED" && SED=sed
  7629. Xsed="$SED -e 1s/^X//"
  7630. _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
  7631. _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
  7632. [Sed that helps us avoid accidentally triggering echo(1) options like -n])
  7633. ])# _LT_DECL_SED
  7634. m4_ifndef([AC_PROG_SED], [
  7635. ############################################################
  7636. # NOTE: This macro has been submitted for inclusion into #
  7637. # GNU Autoconf as AC_PROG_SED. When it is available in #
  7638. # a released version of Autoconf we should remove this #
  7639. # macro and use it instead. #
  7640. ############################################################
  7641. m4_defun([AC_PROG_SED],
  7642. [AC_MSG_CHECKING([for a sed that does not truncate output])
  7643. AC_CACHE_VAL(lt_cv_path_SED,
  7644. [# Loop through the user's path and test for sed and gsed.
  7645. # Then use that list of sed's as ones to test for truncation.
  7646. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  7647. for as_dir in $PATH
  7648. do
  7649. IFS=$as_save_IFS
  7650. test -z "$as_dir" && as_dir=.
  7651. for lt_ac_prog in sed gsed; do
  7652. for ac_exec_ext in '' $ac_executable_extensions; do
  7653. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  7654. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  7655. fi
  7656. done
  7657. done
  7658. done
  7659. IFS=$as_save_IFS
  7660. lt_ac_max=0
  7661. lt_ac_count=0
  7662. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  7663. # along with /bin/sed that truncates output.
  7664. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  7665. test ! -f $lt_ac_sed && continue
  7666. cat /dev/null > conftest.in
  7667. lt_ac_count=0
  7668. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  7669. # Check for GNU sed and select it if it is found.
  7670. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  7671. lt_cv_path_SED=$lt_ac_sed
  7672. break
  7673. fi
  7674. while true; do
  7675. cat conftest.in conftest.in >conftest.tmp
  7676. mv conftest.tmp conftest.in
  7677. cp conftest.in conftest.nl
  7678. echo >>conftest.nl
  7679. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  7680. cmp -s conftest.out conftest.nl || break
  7681. # 10000 chars as input seems more than enough
  7682. test $lt_ac_count -gt 10 && break
  7683. lt_ac_count=`expr $lt_ac_count + 1`
  7684. if test $lt_ac_count -gt $lt_ac_max; then
  7685. lt_ac_max=$lt_ac_count
  7686. lt_cv_path_SED=$lt_ac_sed
  7687. fi
  7688. done
  7689. done
  7690. ])
  7691. SED=$lt_cv_path_SED
  7692. AC_SUBST([SED])
  7693. AC_MSG_RESULT([$SED])
  7694. ])#AC_PROG_SED
  7695. ])#m4_ifndef
  7696. # Old name:
  7697. AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
  7698. dnl aclocal-1.4 backwards compatibility:
  7699. dnl AC_DEFUN([LT_AC_PROG_SED], [])
  7700. # _LT_CHECK_SHELL_FEATURES
  7701. # ------------------------
  7702. # Find out whether the shell is Bourne or XSI compatible,
  7703. # or has some other useful features.
  7704. m4_defun([_LT_CHECK_SHELL_FEATURES],
  7705. [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
  7706. # Try some XSI features
  7707. xsi_shell=no
  7708. ( _lt_dummy="a/b/c"
  7709. test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
  7710. = c,a/b,b/c, \
  7711. && eval 'test $(( 1 + 1 )) -eq 2 \
  7712. && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
  7713. && xsi_shell=yes
  7714. AC_MSG_RESULT([$xsi_shell])
  7715. _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
  7716. AC_MSG_CHECKING([whether the shell understands "+="])
  7717. lt_shell_append=no
  7718. ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
  7719. >/dev/null 2>&1 \
  7720. && lt_shell_append=yes
  7721. AC_MSG_RESULT([$lt_shell_append])
  7722. _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
  7723. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
  7724. lt_unset=unset
  7725. else
  7726. lt_unset=false
  7727. fi
  7728. _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
  7729. # test EBCDIC or ASCII
  7730. case `echo X|tr X '\101'` in
  7731. A) # ASCII based system
  7732. # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
  7733. lt_SP2NL='tr \040 \012'
  7734. lt_NL2SP='tr \015\012 \040\040'
  7735. ;;
  7736. *) # EBCDIC based system
  7737. lt_SP2NL='tr \100 \n'
  7738. lt_NL2SP='tr \r\n \100\100'
  7739. ;;
  7740. esac
  7741. _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
  7742. _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
  7743. ])# _LT_CHECK_SHELL_FEATURES
  7744. # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
  7745. # ------------------------------------------------------
  7746. # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
  7747. # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
  7748. m4_defun([_LT_PROG_FUNCTION_REPLACE],
  7749. [dnl {
  7750. sed -e '/^$1 ()$/,/^} # $1 /c\
  7751. $1 ()\
  7752. {\
  7753. m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
  7754. } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
  7755. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7756. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7757. test 0 -eq $? || _lt_function_replace_fail=:
  7758. ])
  7759. # _LT_PROG_REPLACE_SHELLFNS
  7760. # -------------------------
  7761. # Replace existing portable implementations of several shell functions with
  7762. # equivalent extended shell implementations where those features are available..
  7763. m4_defun([_LT_PROG_REPLACE_SHELLFNS],
  7764. [if test x"$xsi_shell" = xyes; then
  7765. _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
  7766. case ${1} in
  7767. */*) func_dirname_result="${1%/*}${2}" ;;
  7768. * ) func_dirname_result="${3}" ;;
  7769. esac])
  7770. _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
  7771. func_basename_result="${1##*/}"])
  7772. _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
  7773. case ${1} in
  7774. */*) func_dirname_result="${1%/*}${2}" ;;
  7775. * ) func_dirname_result="${3}" ;;
  7776. esac
  7777. func_basename_result="${1##*/}"])
  7778. _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
  7779. # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
  7780. # positional parameters, so assign one to ordinary parameter first.
  7781. func_stripname_result=${3}
  7782. func_stripname_result=${func_stripname_result#"${1}"}
  7783. func_stripname_result=${func_stripname_result%"${2}"}])
  7784. _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
  7785. func_split_long_opt_name=${1%%=*}
  7786. func_split_long_opt_arg=${1#*=}])
  7787. _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
  7788. func_split_short_opt_arg=${1#??}
  7789. func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
  7790. _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
  7791. case ${1} in
  7792. *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
  7793. *) func_lo2o_result=${1} ;;
  7794. esac])
  7795. _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
  7796. _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
  7797. _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
  7798. fi
  7799. if test x"$lt_shell_append" = xyes; then
  7800. _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
  7801. _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
  7802. func_quote_for_eval "${2}"
  7803. dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
  7804. eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
  7805. # Save a `func_append' function call where possible by direct use of '+='
  7806. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
  7807. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7808. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7809. test 0 -eq $? || _lt_function_replace_fail=:
  7810. else
  7811. # Save a `func_append' function call even when '+=' is not available
  7812. sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
  7813. && mv -f "$cfgfile.tmp" "$cfgfile" \
  7814. || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
  7815. test 0 -eq $? || _lt_function_replace_fail=:
  7816. fi
  7817. if test x"$_lt_function_replace_fail" = x":"; then
  7818. AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
  7819. fi
  7820. ])
  7821. # _LT_PATH_CONVERSION_FUNCTIONS
  7822. # -----------------------------
  7823. # Determine which file name conversion functions should be used by
  7824. # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
  7825. # for certain cross-compile configurations and native mingw.
  7826. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
  7827. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  7828. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  7829. AC_MSG_CHECKING([how to convert $build file names to $host format])
  7830. AC_CACHE_VAL(lt_cv_to_host_file_cmd,
  7831. [case $host in
  7832. *-*-mingw* )
  7833. case $build in
  7834. *-*-mingw* ) # actually msys
  7835. lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
  7836. ;;
  7837. *-*-cygwin* )
  7838. lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
  7839. ;;
  7840. * ) # otherwise, assume *nix
  7841. lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
  7842. ;;
  7843. esac
  7844. ;;
  7845. *-*-cygwin* )
  7846. case $build in
  7847. *-*-mingw* ) # actually msys
  7848. lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
  7849. ;;
  7850. *-*-cygwin* )
  7851. lt_cv_to_host_file_cmd=func_convert_file_noop
  7852. ;;
  7853. * ) # otherwise, assume *nix
  7854. lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
  7855. ;;
  7856. esac
  7857. ;;
  7858. * ) # unhandled hosts (and "normal" native builds)
  7859. lt_cv_to_host_file_cmd=func_convert_file_noop
  7860. ;;
  7861. esac
  7862. ])
  7863. to_host_file_cmd=$lt_cv_to_host_file_cmd
  7864. AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
  7865. _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
  7866. [0], [convert $build file names to $host format])dnl
  7867. AC_MSG_CHECKING([how to convert $build file names to toolchain format])
  7868. AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
  7869. [#assume ordinary cross tools, or native build.
  7870. lt_cv_to_tool_file_cmd=func_convert_file_noop
  7871. case $host in
  7872. *-*-mingw* )
  7873. case $build in
  7874. *-*-mingw* ) # actually msys
  7875. lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
  7876. ;;
  7877. esac
  7878. ;;
  7879. esac
  7880. ])
  7881. to_tool_file_cmd=$lt_cv_to_tool_file_cmd
  7882. AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
  7883. _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
  7884. [0], [convert $build files to toolchain format])dnl
  7885. ])# _LT_PATH_CONVERSION_FUNCTIONS
  7886. # Helper functions for option handling. -*- Autoconf -*-
  7887. #
  7888. # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
  7889. # Inc.
  7890. # Written by Gary V. Vaughan, 2004
  7891. #
  7892. # This file is free software; the Free Software Foundation gives
  7893. # unlimited permission to copy and/or distribute it, with or without
  7894. # modifications, as long as this notice is preserved.
  7895. # serial 7 ltoptions.m4
  7896. # This is to help aclocal find these macros, as it can't see m4_define.
  7897. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
  7898. # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
  7899. # ------------------------------------------
  7900. m4_define([_LT_MANGLE_OPTION],
  7901. [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
  7902. # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
  7903. # ---------------------------------------
  7904. # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
  7905. # matching handler defined, dispatch to it. Other OPTION-NAMEs are
  7906. # saved as a flag.
  7907. m4_define([_LT_SET_OPTION],
  7908. [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
  7909. m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
  7910. _LT_MANGLE_DEFUN([$1], [$2]),
  7911. [m4_warning([Unknown $1 option `$2'])])[]dnl
  7912. ])
  7913. # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
  7914. # ------------------------------------------------------------
  7915. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  7916. m4_define([_LT_IF_OPTION],
  7917. [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
  7918. # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
  7919. # -------------------------------------------------------
  7920. # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
  7921. # are set.
  7922. m4_define([_LT_UNLESS_OPTIONS],
  7923. [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7924. [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
  7925. [m4_define([$0_found])])])[]dnl
  7926. m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
  7927. ])[]dnl
  7928. ])
  7929. # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
  7930. # ----------------------------------------
  7931. # OPTION-LIST is a space-separated list of Libtool options associated
  7932. # with MACRO-NAME. If any OPTION has a matching handler declared with
  7933. # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
  7934. # the unknown option and exit.
  7935. m4_defun([_LT_SET_OPTIONS],
  7936. [# Set options
  7937. m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
  7938. [_LT_SET_OPTION([$1], _LT_Option)])
  7939. m4_if([$1],[LT_INIT],[
  7940. dnl
  7941. dnl Simply set some default values (i.e off) if boolean options were not
  7942. dnl specified:
  7943. _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
  7944. ])
  7945. _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
  7946. ])
  7947. dnl
  7948. dnl If no reference was made to various pairs of opposing options, then
  7949. dnl we run the default mode handler for the pair. For example, if neither
  7950. dnl `shared' nor `disable-shared' was passed, we enable building of shared
  7951. dnl archives by default:
  7952. _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
  7953. _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
  7954. _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
  7955. _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
  7956. [_LT_ENABLE_FAST_INSTALL])
  7957. ])
  7958. ])# _LT_SET_OPTIONS
  7959. ## --------------------------------- ##
  7960. ## Macros to handle LT_INIT options. ##
  7961. ## --------------------------------- ##
  7962. # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
  7963. # -----------------------------------------
  7964. m4_define([_LT_MANGLE_DEFUN],
  7965. [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
  7966. # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
  7967. # -----------------------------------------------
  7968. m4_define([LT_OPTION_DEFINE],
  7969. [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
  7970. ])# LT_OPTION_DEFINE
  7971. # dlopen
  7972. # ------
  7973. LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
  7974. ])
  7975. AU_DEFUN([AC_LIBTOOL_DLOPEN],
  7976. [_LT_SET_OPTION([LT_INIT], [dlopen])
  7977. AC_DIAGNOSE([obsolete],
  7978. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  7979. put the `dlopen' option into LT_INIT's first parameter.])
  7980. ])
  7981. dnl aclocal-1.4 backwards compatibility:
  7982. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
  7983. # win32-dll
  7984. # ---------
  7985. # Declare package support for building win32 dll's.
  7986. LT_OPTION_DEFINE([LT_INIT], [win32-dll],
  7987. [enable_win32_dll=yes
  7988. case $host in
  7989. *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
  7990. AC_CHECK_TOOL(AS, as, false)
  7991. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  7992. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  7993. ;;
  7994. esac
  7995. test -z "$AS" && AS=as
  7996. _LT_DECL([], [AS], [1], [Assembler program])dnl
  7997. test -z "$DLLTOOL" && DLLTOOL=dlltool
  7998. _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
  7999. test -z "$OBJDUMP" && OBJDUMP=objdump
  8000. _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
  8001. ])# win32-dll
  8002. AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
  8003. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  8004. _LT_SET_OPTION([LT_INIT], [win32-dll])
  8005. AC_DIAGNOSE([obsolete],
  8006. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  8007. put the `win32-dll' option into LT_INIT's first parameter.])
  8008. ])
  8009. dnl aclocal-1.4 backwards compatibility:
  8010. dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
  8011. # _LT_ENABLE_SHARED([DEFAULT])
  8012. # ----------------------------
  8013. # implement the --enable-shared flag, and supports the `shared' and
  8014. # `disable-shared' LT_INIT options.
  8015. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  8016. m4_define([_LT_ENABLE_SHARED],
  8017. [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
  8018. AC_ARG_ENABLE([shared],
  8019. [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  8020. [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
  8021. [p=${PACKAGE-default}
  8022. case $enableval in
  8023. yes) enable_shared=yes ;;
  8024. no) enable_shared=no ;;
  8025. *)
  8026. enable_shared=no
  8027. # Look at the argument we got. We use all the common list separators.
  8028. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  8029. for pkg in $enableval; do
  8030. IFS="$lt_save_ifs"
  8031. if test "X$pkg" = "X$p"; then
  8032. enable_shared=yes
  8033. fi
  8034. done
  8035. IFS="$lt_save_ifs"
  8036. ;;
  8037. esac],
  8038. [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
  8039. _LT_DECL([build_libtool_libs], [enable_shared], [0],
  8040. [Whether or not to build shared libraries])
  8041. ])# _LT_ENABLE_SHARED
  8042. LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
  8043. LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
  8044. # Old names:
  8045. AC_DEFUN([AC_ENABLE_SHARED],
  8046. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
  8047. ])
  8048. AC_DEFUN([AC_DISABLE_SHARED],
  8049. [_LT_SET_OPTION([LT_INIT], [disable-shared])
  8050. ])
  8051. AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  8052. AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  8053. dnl aclocal-1.4 backwards compatibility:
  8054. dnl AC_DEFUN([AM_ENABLE_SHARED], [])
  8055. dnl AC_DEFUN([AM_DISABLE_SHARED], [])
  8056. # _LT_ENABLE_STATIC([DEFAULT])
  8057. # ----------------------------
  8058. # implement the --enable-static flag, and support the `static' and
  8059. # `disable-static' LT_INIT options.
  8060. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  8061. m4_define([_LT_ENABLE_STATIC],
  8062. [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
  8063. AC_ARG_ENABLE([static],
  8064. [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  8065. [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
  8066. [p=${PACKAGE-default}
  8067. case $enableval in
  8068. yes) enable_static=yes ;;
  8069. no) enable_static=no ;;
  8070. *)
  8071. enable_static=no
  8072. # Look at the argument we got. We use all the common list separators.
  8073. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  8074. for pkg in $enableval; do
  8075. IFS="$lt_save_ifs"
  8076. if test "X$pkg" = "X$p"; then
  8077. enable_static=yes
  8078. fi
  8079. done
  8080. IFS="$lt_save_ifs"
  8081. ;;
  8082. esac],
  8083. [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
  8084. _LT_DECL([build_old_libs], [enable_static], [0],
  8085. [Whether or not to build static libraries])
  8086. ])# _LT_ENABLE_STATIC
  8087. LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
  8088. LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
  8089. # Old names:
  8090. AC_DEFUN([AC_ENABLE_STATIC],
  8091. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
  8092. ])
  8093. AC_DEFUN([AC_DISABLE_STATIC],
  8094. [_LT_SET_OPTION([LT_INIT], [disable-static])
  8095. ])
  8096. AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  8097. AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  8098. dnl aclocal-1.4 backwards compatibility:
  8099. dnl AC_DEFUN([AM_ENABLE_STATIC], [])
  8100. dnl AC_DEFUN([AM_DISABLE_STATIC], [])
  8101. # _LT_ENABLE_FAST_INSTALL([DEFAULT])
  8102. # ----------------------------------
  8103. # implement the --enable-fast-install flag, and support the `fast-install'
  8104. # and `disable-fast-install' LT_INIT options.
  8105. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  8106. m4_define([_LT_ENABLE_FAST_INSTALL],
  8107. [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
  8108. AC_ARG_ENABLE([fast-install],
  8109. [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  8110. [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  8111. [p=${PACKAGE-default}
  8112. case $enableval in
  8113. yes) enable_fast_install=yes ;;
  8114. no) enable_fast_install=no ;;
  8115. *)
  8116. enable_fast_install=no
  8117. # Look at the argument we got. We use all the common list separators.
  8118. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  8119. for pkg in $enableval; do
  8120. IFS="$lt_save_ifs"
  8121. if test "X$pkg" = "X$p"; then
  8122. enable_fast_install=yes
  8123. fi
  8124. done
  8125. IFS="$lt_save_ifs"
  8126. ;;
  8127. esac],
  8128. [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
  8129. _LT_DECL([fast_install], [enable_fast_install], [0],
  8130. [Whether or not to optimize for fast installation])dnl
  8131. ])# _LT_ENABLE_FAST_INSTALL
  8132. LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
  8133. LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
  8134. # Old names:
  8135. AU_DEFUN([AC_ENABLE_FAST_INSTALL],
  8136. [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
  8137. AC_DIAGNOSE([obsolete],
  8138. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  8139. the `fast-install' option into LT_INIT's first parameter.])
  8140. ])
  8141. AU_DEFUN([AC_DISABLE_FAST_INSTALL],
  8142. [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
  8143. AC_DIAGNOSE([obsolete],
  8144. [$0: Remove this warning and the call to _LT_SET_OPTION when you put
  8145. the `disable-fast-install' option into LT_INIT's first parameter.])
  8146. ])
  8147. dnl aclocal-1.4 backwards compatibility:
  8148. dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
  8149. dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
  8150. # _LT_WITH_PIC([MODE])
  8151. # --------------------
  8152. # implement the --with-pic flag, and support the `pic-only' and `no-pic'
  8153. # LT_INIT options.
  8154. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  8155. m4_define([_LT_WITH_PIC],
  8156. [AC_ARG_WITH([pic],
  8157. [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
  8158. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  8159. [lt_p=${PACKAGE-default}
  8160. case $withval in
  8161. yes|no) pic_mode=$withval ;;
  8162. *)
  8163. pic_mode=default
  8164. # Look at the argument we got. We use all the common list separators.
  8165. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  8166. for lt_pkg in $withval; do
  8167. IFS="$lt_save_ifs"
  8168. if test "X$lt_pkg" = "X$lt_p"; then
  8169. pic_mode=yes
  8170. fi
  8171. done
  8172. IFS="$lt_save_ifs"
  8173. ;;
  8174. esac],
  8175. [pic_mode=default])
  8176. test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
  8177. _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
  8178. ])# _LT_WITH_PIC
  8179. LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
  8180. LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
  8181. # Old name:
  8182. AU_DEFUN([AC_LIBTOOL_PICMODE],
  8183. [_LT_SET_OPTION([LT_INIT], [pic-only])
  8184. AC_DIAGNOSE([obsolete],
  8185. [$0: Remove this warning and the call to _LT_SET_OPTION when you
  8186. put the `pic-only' option into LT_INIT's first parameter.])
  8187. ])
  8188. dnl aclocal-1.4 backwards compatibility:
  8189. dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
  8190. ## ----------------- ##
  8191. ## LTDL_INIT Options ##
  8192. ## ----------------- ##
  8193. m4_define([_LTDL_MODE], [])
  8194. LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
  8195. [m4_define([_LTDL_MODE], [nonrecursive])])
  8196. LT_OPTION_DEFINE([LTDL_INIT], [recursive],
  8197. [m4_define([_LTDL_MODE], [recursive])])
  8198. LT_OPTION_DEFINE([LTDL_INIT], [subproject],
  8199. [m4_define([_LTDL_MODE], [subproject])])
  8200. m4_define([_LTDL_TYPE], [])
  8201. LT_OPTION_DEFINE([LTDL_INIT], [installable],
  8202. [m4_define([_LTDL_TYPE], [installable])])
  8203. LT_OPTION_DEFINE([LTDL_INIT], [convenience],
  8204. [m4_define([_LTDL_TYPE], [convenience])])
  8205. # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
  8206. #
  8207. # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
  8208. # Written by Gary V. Vaughan, 2004
  8209. #
  8210. # This file is free software; the Free Software Foundation gives
  8211. # unlimited permission to copy and/or distribute it, with or without
  8212. # modifications, as long as this notice is preserved.
  8213. # serial 6 ltsugar.m4
  8214. # This is to help aclocal find these macros, as it can't see m4_define.
  8215. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
  8216. # lt_join(SEP, ARG1, [ARG2...])
  8217. # -----------------------------
  8218. # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
  8219. # associated separator.
  8220. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
  8221. # versions in m4sugar had bugs.
  8222. m4_define([lt_join],
  8223. [m4_if([$#], [1], [],
  8224. [$#], [2], [[$2]],
  8225. [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
  8226. m4_define([_lt_join],
  8227. [m4_if([$#$2], [2], [],
  8228. [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
  8229. # lt_car(LIST)
  8230. # lt_cdr(LIST)
  8231. # ------------
  8232. # Manipulate m4 lists.
  8233. # These macros are necessary as long as will still need to support
  8234. # Autoconf-2.59 which quotes differently.
  8235. m4_define([lt_car], [[$1]])
  8236. m4_define([lt_cdr],
  8237. [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
  8238. [$#], 1, [],
  8239. [m4_dquote(m4_shift($@))])])
  8240. m4_define([lt_unquote], $1)
  8241. # lt_append(MACRO-NAME, STRING, [SEPARATOR])
  8242. # ------------------------------------------
  8243. # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
  8244. # Note that neither SEPARATOR nor STRING are expanded; they are appended
  8245. # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
  8246. # No SEPARATOR is output if MACRO-NAME was previously undefined (different
  8247. # than defined and empty).
  8248. #
  8249. # This macro is needed until we can rely on Autoconf 2.62, since earlier
  8250. # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
  8251. m4_define([lt_append],
  8252. [m4_define([$1],
  8253. m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
  8254. # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
  8255. # ----------------------------------------------------------
  8256. # Produce a SEP delimited list of all paired combinations of elements of
  8257. # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
  8258. # has the form PREFIXmINFIXSUFFIXn.
  8259. # Needed until we can rely on m4_combine added in Autoconf 2.62.
  8260. m4_define([lt_combine],
  8261. [m4_if(m4_eval([$# > 3]), [1],
  8262. [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
  8263. [[m4_foreach([_Lt_prefix], [$2],
  8264. [m4_foreach([_Lt_suffix],
  8265. ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
  8266. [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
  8267. # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
  8268. # -----------------------------------------------------------------------
  8269. # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
  8270. # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
  8271. m4_define([lt_if_append_uniq],
  8272. [m4_ifdef([$1],
  8273. [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
  8274. [lt_append([$1], [$2], [$3])$4],
  8275. [$5])],
  8276. [lt_append([$1], [$2], [$3])$4])])
  8277. # lt_dict_add(DICT, KEY, VALUE)
  8278. # -----------------------------
  8279. m4_define([lt_dict_add],
  8280. [m4_define([$1($2)], [$3])])
  8281. # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
  8282. # --------------------------------------------
  8283. m4_define([lt_dict_add_subkey],
  8284. [m4_define([$1($2:$3)], [$4])])
  8285. # lt_dict_fetch(DICT, KEY, [SUBKEY])
  8286. # ----------------------------------
  8287. m4_define([lt_dict_fetch],
  8288. [m4_ifval([$3],
  8289. m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
  8290. m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
  8291. # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
  8292. # -----------------------------------------------------------------
  8293. m4_define([lt_if_dict_fetch],
  8294. [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
  8295. [$5],
  8296. [$6])])
  8297. # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
  8298. # --------------------------------------------------------------
  8299. m4_define([lt_dict_filter],
  8300. [m4_if([$5], [], [],
  8301. [lt_join(m4_quote(m4_default([$4], [[, ]])),
  8302. lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
  8303. [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
  8304. ])
  8305. # ltversion.m4 -- version numbers -*- Autoconf -*-
  8306. #
  8307. # Copyright (C) 2004 Free Software Foundation, Inc.
  8308. # Written by Scott James Remnant, 2004
  8309. #
  8310. # This file is free software; the Free Software Foundation gives
  8311. # unlimited permission to copy and/or distribute it, with or without
  8312. # modifications, as long as this notice is preserved.
  8313. # @configure_input@
  8314. # serial 3337 ltversion.m4
  8315. # This file is part of GNU Libtool
  8316. m4_define([LT_PACKAGE_VERSION], [2.4.2])
  8317. m4_define([LT_PACKAGE_REVISION], [1.3337])
  8318. AC_DEFUN([LTVERSION_VERSION],
  8319. [macro_version='2.4.2'
  8320. macro_revision='1.3337'
  8321. _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
  8322. _LT_DECL(, macro_revision, 0)
  8323. ])
  8324. # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
  8325. #
  8326. # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
  8327. # Written by Scott James Remnant, 2004.
  8328. #
  8329. # This file is free software; the Free Software Foundation gives
  8330. # unlimited permission to copy and/or distribute it, with or without
  8331. # modifications, as long as this notice is preserved.
  8332. # serial 5 lt~obsolete.m4
  8333. # These exist entirely to fool aclocal when bootstrapping libtool.
  8334. #
  8335. # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
  8336. # which have later been changed to m4_define as they aren't part of the
  8337. # exported API, or moved to Autoconf or Automake where they belong.
  8338. #
  8339. # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
  8340. # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
  8341. # using a macro with the same name in our local m4/libtool.m4 it'll
  8342. # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
  8343. # and doesn't know about Autoconf macros at all.)
  8344. #
  8345. # So we provide this file, which has a silly filename so it's always
  8346. # included after everything else. This provides aclocal with the
  8347. # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
  8348. # because those macros already exist, or will be overwritten later.
  8349. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
  8350. #
  8351. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
  8352. # Yes, that means every name once taken will need to remain here until
  8353. # we give up compatibility with versions before 1.7, at which point
  8354. # we need to keep only those names which we still refer to.
  8355. # This is to help aclocal find these macros, as it can't see m4_define.
  8356. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
  8357. m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
  8358. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
  8359. m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
  8360. m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
  8361. m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
  8362. m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
  8363. m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
  8364. m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
  8365. m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
  8366. m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
  8367. m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
  8368. m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
  8369. m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
  8370. m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
  8371. m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
  8372. m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
  8373. m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
  8374. m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
  8375. m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
  8376. m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
  8377. m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
  8378. m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
  8379. m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
  8380. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
  8381. m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
  8382. m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
  8383. m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
  8384. m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
  8385. m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
  8386. m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
  8387. m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
  8388. m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
  8389. m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
  8390. m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
  8391. m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
  8392. m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
  8393. m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
  8394. m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
  8395. m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
  8396. m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
  8397. m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
  8398. m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
  8399. m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
  8400. m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
  8401. m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
  8402. m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
  8403. m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
  8404. m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
  8405. m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
  8406. m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
  8407. m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
  8408. m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
  8409. m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
  8410. m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
  8411. m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
  8412. m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
  8413. m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
  8414. m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
  8415. m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
  8416. m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
  8417. m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])