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.

4558 lines
146 KiB

25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
  1. # generated automatically by aclocal 1.7.9 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
  3. # Free Software Foundation, Inc.
  4. # This file is free software; the Free Software Foundation
  5. # gives unlimited permission to copy and/or distribute it,
  6. # with or without modifications, as long as this notice is preserved.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  9. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  10. # PARTICULAR PURPOSE.
  11. dnl -*- Autoconf -*-
  12. dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
  13. dnl This file is free software, distributed under the terms of the GNU
  14. dnl General Public License. As a special exception to the GNU General
  15. dnl Public License, this file may be distributed as part of a program
  16. dnl that contains a configuration script generated by Autoconf, under
  17. dnl the same distribution terms as the rest of that program.
  18. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  19. AC_PREREQ(2.57)
  20. AC_DEFUN([CL_AS_UNDERSCORE],
  21. [AC_BEFORE([$0], [CL_GLOBAL_CONSTRUCTORS])
  22. m4_pattern_allow([^AS_UNDERSCORE$])
  23. AC_CACHE_CHECK(for underscore in external names, cl_cv_prog_as_underscore, [
  24. cat > conftest.c <<EOF
  25. #ifdef __cplusplus
  26. extern "C"
  27. #endif
  28. int foo() { return 0; }
  29. EOF
  30. # look for the assembly language name in the .s file
  31. AC_TRY_COMMAND(${CC-cc} -S conftest.c) >/dev/null 2>&1
  32. if grep _foo conftest.s >/dev/null ; then
  33. cl_cv_prog_as_underscore=yes
  34. else
  35. cl_cv_prog_as_underscore=no
  36. fi
  37. rm -f conftest*
  38. ])
  39. if test $cl_cv_prog_as_underscore = yes; then
  40. AS_UNDERSCORE=true
  41. AC_DEFINE(ASM_UNDERSCORE,,[symbols are prefixed by an underscore in assembly language])
  42. else
  43. AS_UNDERSCORE=false
  44. fi
  45. AC_SUBST(AS_UNDERSCORE)dnl
  46. ])
  47. dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
  48. dnl This file is free software, distributed under the terms of the GNU
  49. dnl General Public License. As a special exception to the GNU General
  50. dnl Public License, this file may be distributed as part of a program
  51. dnl that contains a configuration script generated by Autoconf, under
  52. dnl the same distribution terms as the rest of that program.
  53. dnl From Bruno Haible, Marcus Daniels.
  54. AC_PREREQ(2.13)
  55. AC_DEFUN([CL_GLOBAL_CONSTRUCTORS],
  56. [AC_REQUIRE([CL_AS_UNDERSCORE])dnl
  57. if test -n "$GCC"; then
  58. AC_CACHE_CHECK(for the global constructors function prefix,
  59. cl_cv_cplusplus_ctorprefix, [
  60. cat > conftest.cc << EOF
  61. struct foo { foo (); };
  62. foo foobar;
  63. EOF
  64. # look for the assembly language name in the .s file
  65. AC_TRY_COMMAND(${CXX-g++} $CXXFLAGS -S conftest.cc) >/dev/null 2>&1
  66. if grep '_GLOBAL_\$I\$foobar' conftest.s >/dev/null ; then
  67. cl_cv_cplusplus_ctorprefix='_GLOBAL_$I$'
  68. else
  69. if grep '_GLOBAL_\.I\.foobar' conftest.s >/dev/null ; then
  70. cl_cv_cplusplus_ctorprefix='_GLOBAL_.I.'
  71. else
  72. if grep '_GLOBAL__I_foobar' conftest.s >/dev/null ; then
  73. cl_cv_cplusplus_ctorprefix='_GLOBAL__I_'
  74. else
  75. cl_cv_cplusplus_ctorprefix=unknown
  76. fi
  77. fi
  78. fi
  79. rm -f conftest*
  80. ])
  81. if test "$cl_cv_cplusplus_ctorprefix" '!=' unknown; then
  82. ac_value='"'"$cl_cv_cplusplus_ctorprefix"'"'
  83. AC_DEFINE_UNQUOTED(CL_GLOBAL_CONSTRUCTOR_PREFIX,$ac_value)
  84. AC_CACHE_CHECK(for the global destructors function prefix,
  85. cl_cv_cplusplus_dtorprefix, [
  86. cat > conftest.cc << EOF
  87. struct foo { foo (); ~ foo (); };
  88. foo foobar;
  89. EOF
  90. # look for the assembly language name in the .s file
  91. AC_TRY_COMMAND(${CXX-g++} $CXXFLAGS -S conftest.cc) >/dev/null 2>&1
  92. if grep '_GLOBAL_\$D\$foobar' conftest.s >/dev/null ; then
  93. cl_cv_cplusplus_dtorprefix='_GLOBAL_$D$'
  94. else
  95. if grep '_GLOBAL_\.D\.foobar' conftest.s >/dev/null ; then
  96. cl_cv_cplusplus_dtorprefix='_GLOBAL_.D.'
  97. else
  98. if grep '_GLOBAL__D_foobar' conftest.s >/dev/null ; then
  99. cl_cv_cplusplus_dtorprefix='_GLOBAL__D_'
  100. else
  101. cl_cv_cplusplus_dtorprefix=none
  102. fi
  103. fi
  104. fi
  105. rm -f conftest*
  106. ])
  107. if test "$cl_cv_cplusplus_dtorprefix" '!=' none; then
  108. ac_value='"'"$cl_cv_cplusplus_ctorprefix"'"'
  109. AC_DEFINE_UNQUOTED(CL_GLOBAL_DESTRUCTOR_PREFIX,$ac_value)
  110. fi
  111. dnl Check whether the global constructors/destructors functions are file-scope
  112. dnl only by default. This is the case in egcs-1.1.2 or newer.
  113. AC_CACHE_CHECK(whether the global constructors function need to be exported,
  114. cl_cv_cplusplus_ctorexport, [
  115. cat > conftest1.cc << EOF
  116. struct foo { foo (); };
  117. foo foobar;
  118. EOF
  119. cat > conftest2.cc << EOF
  120. #include "confdefs.h"
  121. #ifdef ASM_UNDERSCORE
  122. #define ASM_UNDERSCORE_PREFIX "_"
  123. #else
  124. #define ASM_UNDERSCORE_PREFIX ""
  125. #endif
  126. struct foo { foo (); };
  127. foo::foo () {}
  128. extern "C" void ctor (void) __asm__ (ASM_UNDERSCORE_PREFIX CL_GLOBAL_CONSTRUCTOR_PREFIX "foobar");
  129. int main() { ctor(); return 0; }
  130. EOF
  131. if AC_TRY_COMMAND(${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest1.cc conftest2.cc $LIBS 1>&5) >/dev/null 2>&1 && test -s conftest${ac_exeext}; then
  132. cl_cv_cplusplus_ctorexport=no
  133. else
  134. cl_cv_cplusplus_ctorexport=yes
  135. fi
  136. rm -f conftest*
  137. ])
  138. if test "$cl_cv_cplusplus_ctorexport" = yes; then
  139. AC_DEFINE(CL_NEED_GLOBALIZE_CTORDTOR)
  140. fi
  141. fi
  142. fi
  143. ])
  144. dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
  145. dnl This file is free software, distributed under the terms of the GNU
  146. dnl General Public License. As a special exception to the GNU General
  147. dnl Public License, this file may be distributed as part of a program
  148. dnl that contains a configuration script generated by Autoconf, under
  149. dnl the same distribution terms as the rest of that program.
  150. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  151. AC_PREREQ(2.13)
  152. dnl without AC_MSG_...: with AC_MSG_... and caching:
  153. dnl AC_TRY_CPP CL_CPP_CHECK
  154. dnl AC_TRY_COMPILE CL_COMPILE_CHECK
  155. dnl AC_TRY_LINK CL_LINK_CHECK
  156. dnl AC_TRY_RUN CL_RUN_CHECK - would require cross-compiling support
  157. dnl Usage:
  158. dnl AC_TRY_CPP(INCLUDES,
  159. dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  160. dnl CL_CPP_CHECK(ECHO-TEXT, CACHE-ID,
  161. dnl INCLUDES,
  162. dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  163. dnl AC_TRY_xxx(INCLUDES, FUNCTION-BODY,
  164. dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  165. dnl CL_xxx_CHECK(ECHO-TEXT, CACHE-ID,
  166. dnl INCLUDES, FUNCTION-BODY,
  167. dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  168. AC_DEFUN([CL_CPP_CHECK],
  169. [AC_MSG_CHECKING(for $1)
  170. AC_CACHE_VAL($2,[
  171. AC_TRY_CPP([$3], $2=yes, $2=no)
  172. ])
  173. AC_MSG_RESULT([$]$2)
  174. if test [$]$2 = yes; then
  175. ifelse([$4], , :, [$4])
  176. ifelse([$5], , , [else
  177. $5
  178. ])dnl
  179. fi
  180. ])
  181. AC_DEFUN([CL_COMPILE_CHECK],
  182. [AC_MSG_CHECKING(for $1)
  183. AC_CACHE_VAL($2,[
  184. AC_TRY_COMPILE([$3],[$4], $2=yes, $2=no)
  185. ])
  186. AC_MSG_RESULT([$]$2)
  187. if test [$]$2 = yes; then
  188. ifelse([$5], , :, [$5])
  189. ifelse([$6], , , [else
  190. $6
  191. ])dnl
  192. fi
  193. ])
  194. AC_DEFUN([CL_LINK_CHECK],
  195. [AC_MSG_CHECKING(for $1)
  196. AC_CACHE_VAL($2,[
  197. AC_TRY_LINK([$3],[$4], $2=yes, $2=no)
  198. ])
  199. AC_MSG_RESULT([$]$2)
  200. if test [$]$2 = yes; then
  201. ifelse([$5], , :, [$5])
  202. ifelse([$6], , , [else
  203. $6
  204. ])dnl
  205. fi
  206. ])
  207. dnl CL_SILENT(ACTION)
  208. dnl performs ACTION, with AC_MSG_CHECKING and AC_MSG_RESULT being defined away.
  209. AC_DEFUN([CL_SILENT],
  210. [pushdef([AC_MSG_CHECKING],[:])dnl
  211. pushdef([AC_CHECKING],[:])dnl
  212. pushdef([AC_MSG_RESULT],[:])dnl
  213. $1[]dnl
  214. popdef([AC_MSG_RESULT])dnl
  215. popdef([AC_CHECKING])dnl
  216. popdef([AC_MSG_CHECKING])dnl
  217. ])
  218. dnl Expands to the "extern ..." prefix used for system declarations.
  219. dnl AC_LANG_EXTERN()
  220. AC_DEFUN([AC_LANG_EXTERN],
  221. [extern
  222. #ifdef __cplusplus
  223. "C"
  224. #endif
  225. ])
  226. AC_DEFUN([CL_CC_WORKS],
  227. [AC_CACHE_CHECK(whether CC works at all, cl_cv_prog_cc_works, [
  228. AC_LANG_SAVE()
  229. AC_LANG_C()
  230. AC_TRY_RUN([int main() { exit(0); }],
  231. cl_cv_prog_cc_works=yes, cl_cv_prog_cc_works=no,
  232. AC_TRY_LINK([], [], cl_cv_prog_cc_works=yes, cl_cv_prog_cc_works=no))
  233. AC_LANG_RESTORE()
  234. ])
  235. case "$cl_cv_prog_cc_works" in
  236. *no) echo "Installation or configuration problem: C compiler cannot create executables."; exit 1;;
  237. *yes) ;;
  238. esac
  239. ])
  240. AC_DEFUN([CL_CONFIG_SUBDIRS],
  241. [dnl No AC_CONFIG_AUX_DIR_DEFAULT, so we don't need install.sh.
  242. AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])
  243. AC_CONFIG_SUBDIRS([$1])dnl
  244. ])
  245. AC_DEFUN([CL_CANONICAL_HOST],
  246. [AC_REQUIRE([AC_PROG_CC]) dnl Actually: AC_REQUIRE([CL_CC_WORKS])
  247. dnl Set ac_aux_dir before the cache check, because AM_PROG_LIBTOOL needs it.
  248. ac_aux_dir=${srcdir}/$1
  249. dnl A substitute for AC_CONFIG_AUX_DIR_DEFAULT, so we don't need install.sh.
  250. ac_config_guess="$SHELL $ac_aux_dir/config.guess"
  251. ac_config_sub="$SHELL $ac_aux_dir/config.sub"
  252. dnl We have defined $ac_aux_dir.
  253. AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  254. dnl In autoconf-2.52, a single AC_CANONICAL_HOST has the effect of inserting
  255. dnl the code of AC_CANONICAL_BUILD *before* CL_CANONICAL_HOST, i.e. before
  256. dnl ac_aux_dir has been set. To work around this, we list AC_CANONICAL_BUILD
  257. dnl explicitly.
  258. AC_CANONICAL_BUILD
  259. AC_CANONICAL_HOST
  260. ])
  261. AC_DEFUN([CL_CANONICAL_HOST_CPU],
  262. [AC_REQUIRE([CL_CANONICAL_HOST])AC_REQUIRE([AC_PROG_CC])
  263. case "$host_cpu" in
  264. changequote(,)dnl
  265. i[4567]86 )
  266. host_cpu=i386
  267. ;;
  268. alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
  269. host_cpu=alpha
  270. ;;
  271. hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
  272. host_cpu=hppa
  273. ;;
  274. powerpc )
  275. host_cpu=rs6000
  276. ;;
  277. c1 | c2 | c32 | c34 | c38 | c4 )
  278. host_cpu=convex
  279. ;;
  280. arm* )
  281. host_cpu=arm
  282. ;;
  283. changequote([,])dnl
  284. mips )
  285. AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [
  286. AC_EGREP_CPP(yes,
  287. [#if defined(_MIPS_SZLONG)
  288. #if (_MIPS_SZLONG == 64)
  289. /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */
  290. yes
  291. #endif
  292. #endif
  293. ], cl_cv_host_mips64=yes, cl_cv_host_mips64=no)
  294. ])
  295. if test $cl_cv_host_mips64 = yes; then
  296. host_cpu=mips64
  297. fi
  298. ;;
  299. dnl UltraSPARCs running Linux have `uname -m` = "sparc64", but the C compiler
  300. dnl still generates 32-bit code.
  301. sparc | sparc64 )
  302. AC_CACHE_CHECK([for 64-bit SPARC], cl_cv_host_sparc64, [
  303. AC_EGREP_CPP(yes,
  304. [#if defined(__sparcv9) || defined(__arch64__)
  305. yes
  306. #endif
  307. ], cl_cv_host_sparc64=yes, cl_cv_host_sparc64=no)
  308. ])
  309. if test $cl_cv_host_sparc64 = yes; then
  310. host_cpu=sparc64
  311. else
  312. host_cpu=sparc
  313. fi
  314. ;;
  315. esac
  316. dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this
  317. cat >> confdefs.h <<EOF
  318. #ifndef __${host_cpu}__
  319. #define __${host_cpu}__ 1
  320. #endif
  321. EOF
  322. ])
  323. AC_DEFUN([CL_CANONICAL_HOST_CPU_FOR_FFCALL],
  324. [AC_REQUIRE([CL_CANONICAL_HOST])AC_REQUIRE([AC_PROG_CC])
  325. case "$host_cpu" in
  326. changequote(,)dnl
  327. i[4567]86 )
  328. host_cpu=i386
  329. ;;
  330. alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
  331. host_cpu=alpha
  332. ;;
  333. hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
  334. host_cpu=hppa
  335. ;;
  336. powerpc )
  337. host_cpu=rs6000
  338. ;;
  339. c1 | c2 | c32 | c34 | c38 | c4 )
  340. host_cpu=convex
  341. ;;
  342. arm* )
  343. host_cpu=arm
  344. ;;
  345. changequote([,])dnl
  346. mips )
  347. AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [
  348. AC_EGREP_CPP(yes,
  349. [#if defined(_MIPS_SZLONG)
  350. #if (_MIPS_SZLONG == 64)
  351. /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */
  352. yes
  353. #endif
  354. #endif
  355. ], cl_cv_host_mips64=yes, cl_cv_host_mips64=no)
  356. ])
  357. if test $cl_cv_host_mips64 = yes; then
  358. host_cpu=mips64
  359. else
  360. AC_CACHE_CHECK([for MIPS with n32 ABI], cl_cv_host_mipsn32, [
  361. dnl Strictly speaking, the MIPS ABI (-32 or -n32) is independent from the CPU
  362. dnl identification (-mips[12] or -mips[34]). But -n32 is commonly used together
  363. dnl with -mips3, and it's easier to test the CPU identification.
  364. AC_EGREP_CPP(yes,
  365. [#if __mips >= 3
  366. yes
  367. #endif
  368. ], cl_cv_host_mipsn32=yes, cl_cv_host_mipsn32=no)
  369. ])
  370. if test $cl_cv_host_mipsn32 = yes; then
  371. host_cpu=mipsn32
  372. fi
  373. fi
  374. ;;
  375. dnl UltraSPARCs running Linux have `uname -m` = "sparc64", but the C compiler
  376. dnl still generates 32-bit code.
  377. sparc | sparc64 )
  378. AC_CACHE_CHECK([for 64-bit SPARC], cl_cv_host_sparc64, [
  379. AC_EGREP_CPP(yes,
  380. [#if defined(__sparcv9) || defined(__arch64__)
  381. yes
  382. #endif
  383. ], cl_cv_host_sparc64=yes, cl_cv_host_sparc64=no)
  384. ])
  385. if test $cl_cv_host_sparc64 = yes; then
  386. host_cpu=sparc64
  387. else
  388. host_cpu=sparc
  389. fi
  390. ;;
  391. esac
  392. dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this
  393. cat >> confdefs.h <<EOF
  394. #ifndef __${host_cpu}__
  395. #define __${host_cpu}__ 1
  396. #endif
  397. EOF
  398. ])
  399. # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
  400. # serial 46 AC_PROG_LIBTOOL
  401. AC_DEFUN([AC_PROG_LIBTOOL],
  402. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  403. # This can be used to rebuild libtool when needed
  404. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  405. # Always use our own libtool.
  406. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  407. AC_SUBST(LIBTOOL)dnl
  408. # Prevent multiple expansion
  409. define([AC_PROG_LIBTOOL], [])
  410. ])
  411. AC_DEFUN([AC_LIBTOOL_SETUP],
  412. [AC_PREREQ(2.13)dnl
  413. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  414. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  415. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  416. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  417. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  418. AC_REQUIRE([AC_PROG_CC])dnl
  419. AC_REQUIRE([AC_PROG_LD])dnl
  420. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  421. AC_REQUIRE([AC_PROG_NM])dnl
  422. AC_REQUIRE([LT_AC_PROG_SED])dnl
  423. AC_REQUIRE([AC_PROG_LN_S])dnl
  424. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  425. AC_REQUIRE([AC_OBJEXT])dnl
  426. AC_REQUIRE([AC_EXEEXT])dnl
  427. dnl
  428. _LT_AC_PROG_ECHO_BACKSLASH
  429. # Only perform the check for file, if the check method requires it
  430. case $deplibs_check_method in
  431. file_magic*)
  432. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  433. AC_PATH_MAGIC
  434. fi
  435. ;;
  436. esac
  437. AC_CHECK_TOOL(RANLIB, ranlib, :)
  438. AC_CHECK_TOOL(STRIP, strip, :)
  439. ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  440. ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  441. enable_win32_dll=yes, enable_win32_dll=no)
  442. AC_ARG_ENABLE(libtool-lock,
  443. [ --disable-libtool-lock avoid locking (might break parallel builds)])
  444. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  445. # Some flags need to be propagated to the compiler or linker for good
  446. # libtool support.
  447. case $host in
  448. *-*-irix6*)
  449. # Find out which ABI we are using.
  450. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  451. if AC_TRY_EVAL(ac_compile); then
  452. case `/usr/bin/file conftest.$ac_objext` in
  453. *32-bit*)
  454. LD="${LD-ld} -32"
  455. ;;
  456. *N32*)
  457. LD="${LD-ld} -n32"
  458. ;;
  459. *64-bit*)
  460. LD="${LD-ld} -64"
  461. ;;
  462. esac
  463. fi
  464. rm -rf conftest*
  465. ;;
  466. *-*-sco3.2v5*)
  467. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  468. SAVE_CFLAGS="$CFLAGS"
  469. CFLAGS="$CFLAGS -belf"
  470. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  471. [AC_LANG_SAVE
  472. AC_LANG_C
  473. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  474. AC_LANG_RESTORE])
  475. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  476. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  477. CFLAGS="$SAVE_CFLAGS"
  478. fi
  479. ;;
  480. ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  481. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  482. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  483. AC_CHECK_TOOL(AS, as, false)
  484. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  485. # recent cygwin and mingw systems supply a stub DllMain which the user
  486. # can override, but on older systems we have to supply one
  487. AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
  488. [AC_TRY_LINK([],
  489. [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
  490. DllMain (0, 0, 0);],
  491. [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
  492. case $host/$CC in
  493. *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
  494. # old mingw systems require "-dll" to link a DLL, while more recent ones
  495. # require "-mdll"
  496. SAVE_CFLAGS="$CFLAGS"
  497. CFLAGS="$CFLAGS -mdll"
  498. AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
  499. [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
  500. CFLAGS="$SAVE_CFLAGS" ;;
  501. *-*-cygwin* | *-*-pw32*)
  502. # cygwin systems need to pass --dll to the linker, and not link
  503. # crt.o which will require a WinMain@16 definition.
  504. lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
  505. esac
  506. ;;
  507. ])
  508. esac
  509. _LT_AC_LTCONFIG_HACK
  510. ])
  511. # AC_LIBTOOL_HEADER_ASSERT
  512. # ------------------------
  513. AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
  514. [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
  515. [lt_cv_func_assert_works],
  516. [case $host in
  517. *-*-solaris*)
  518. if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
  519. case `$CC --version 2>/dev/null` in
  520. [[12]].*) lt_cv_func_assert_works=no ;;
  521. *) lt_cv_func_assert_works=yes ;;
  522. esac
  523. fi
  524. ;;
  525. esac])
  526. if test "x$lt_cv_func_assert_works" = xyes; then
  527. AC_CHECK_HEADERS(assert.h)
  528. fi
  529. ])# AC_LIBTOOL_HEADER_ASSERT
  530. # _LT_AC_CHECK_DLFCN
  531. # --------------------
  532. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  533. [AC_CHECK_HEADERS(dlfcn.h)
  534. ])# _LT_AC_CHECK_DLFCN
  535. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  536. # ---------------------------------
  537. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  538. [AC_REQUIRE([AC_CANONICAL_HOST])
  539. AC_REQUIRE([AC_PROG_NM])
  540. AC_REQUIRE([AC_OBJEXT])
  541. # Check for command to grab the raw symbol name followed by C symbol from nm.
  542. AC_MSG_CHECKING([command to parse $NM output])
  543. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
  544. # These are sane defaults that work on at least a few old systems.
  545. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  546. # Character class describing NM global symbol codes.
  547. symcode='[[BCDEGRST]]'
  548. # Regexp to match symbols that can be accessed directly from C.
  549. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  550. # Transform the above into a raw symbol and a C symbol.
  551. symxfrm='\1 \2\3 \3'
  552. # Transform an extracted symbol line into a proper C declaration
  553. lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
  554. # Transform an extracted symbol line into symbol name and symbol address
  555. lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  556. # Define system-specific variables.
  557. case $host_os in
  558. aix*)
  559. symcode='[[BCDT]]'
  560. ;;
  561. cygwin* | mingw* | pw32*)
  562. symcode='[[ABCDGISTW]]'
  563. ;;
  564. hpux*) # Its linker distinguishes data from code symbols
  565. lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  566. lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  567. ;;
  568. irix* | nonstopux*)
  569. symcode='[[BCDEGRST]]'
  570. ;;
  571. osf*)
  572. symcode='[[BCDEGQRST]]'
  573. ;;
  574. solaris* | sysv5*)
  575. symcode='[[BDT]]'
  576. ;;
  577. sysv4)
  578. symcode='[[DFNSTU]]'
  579. ;;
  580. esac
  581. # Handle CRLF in mingw tool chain
  582. opt_cr=
  583. case $host_os in
  584. mingw*)
  585. opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  586. ;;
  587. esac
  588. # If we're using GNU nm, then use its standard symbol codes.
  589. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
  590. symcode='[[ABCDGISTW]]'
  591. fi
  592. # Try without a prefix undercore, then with it.
  593. for ac_symprfx in "" "_"; do
  594. # Write the raw and C identifiers.
  595. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
  596. # Check to see that the pipe works correctly.
  597. pipe_works=no
  598. rm -f conftest*
  599. cat > conftest.$ac_ext <<EOF
  600. #ifdef __cplusplus
  601. extern "C" {
  602. #endif
  603. char nm_test_var;
  604. void nm_test_func(){}
  605. #ifdef __cplusplus
  606. }
  607. #endif
  608. int main(){nm_test_var='a';nm_test_func();return(0);}
  609. EOF
  610. if AC_TRY_EVAL(ac_compile); then
  611. # Now try to grab the symbols.
  612. nlist=conftest.nm
  613. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  614. # Try sorting and uniquifying the output.
  615. if sort "$nlist" | uniq > "$nlist"T; then
  616. mv -f "$nlist"T "$nlist"
  617. else
  618. rm -f "$nlist"T
  619. fi
  620. # Make sure that we snagged all the symbols we need.
  621. if egrep ' nm_test_var$' "$nlist" >/dev/null; then
  622. if egrep ' nm_test_func$' "$nlist" >/dev/null; then
  623. cat <<EOF > conftest.$ac_ext
  624. #ifdef __cplusplus
  625. extern "C" {
  626. #endif
  627. EOF
  628. # Now generate the symbol file.
  629. eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
  630. cat <<EOF >> conftest.$ac_ext
  631. #if defined (__STDC__) && __STDC__
  632. # define lt_ptr void *
  633. #else
  634. # define lt_ptr char *
  635. # define const
  636. #endif
  637. /* The mapping between symbol names and symbols. */
  638. const struct {
  639. const char *name;
  640. lt_ptr address;
  641. }
  642. lt_preloaded_symbols[[]] =
  643. {
  644. EOF
  645. sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
  646. cat <<\EOF >> conftest.$ac_ext
  647. {0, (lt_ptr) 0}
  648. };
  649. #ifdef __cplusplus
  650. }
  651. #endif
  652. EOF
  653. # Now try linking the two files.
  654. mv conftest.$ac_objext conftstm.$ac_objext
  655. save_LIBS="$LIBS"
  656. save_CFLAGS="$CFLAGS"
  657. LIBS="conftstm.$ac_objext"
  658. CFLAGS="$CFLAGS$no_builtin_flag"
  659. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  660. pipe_works=yes
  661. fi
  662. LIBS="$save_LIBS"
  663. CFLAGS="$save_CFLAGS"
  664. else
  665. echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
  666. fi
  667. else
  668. echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
  669. fi
  670. else
  671. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
  672. fi
  673. else
  674. echo "$progname: failed program was:" >&AC_FD_CC
  675. cat conftest.$ac_ext >&5
  676. fi
  677. rm -f conftest* conftst*
  678. # Do not use the global_symbol_pipe unless it works.
  679. if test "$pipe_works" = yes; then
  680. break
  681. else
  682. lt_cv_sys_global_symbol_pipe=
  683. fi
  684. done
  685. ])
  686. global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
  687. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  688. global_symbol_to_cdecl=
  689. global_symbol_to_c_name_address=
  690. else
  691. global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
  692. global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
  693. fi
  694. if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
  695. then
  696. AC_MSG_RESULT(failed)
  697. else
  698. AC_MSG_RESULT(ok)
  699. fi
  700. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  701. # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  702. # ---------------------------------
  703. AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
  704. [# Find the correct PATH separator. Usually this is `:', but
  705. # DJGPP uses `;' like DOS.
  706. if test "X${PATH_SEPARATOR+set}" != Xset; then
  707. UNAME=${UNAME-`uname 2>/dev/null`}
  708. case X$UNAME in
  709. *-DOS) lt_cv_sys_path_separator=';' ;;
  710. *) lt_cv_sys_path_separator=':' ;;
  711. esac
  712. PATH_SEPARATOR=$lt_cv_sys_path_separator
  713. fi
  714. ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  715. # _LT_AC_PROG_ECHO_BACKSLASH
  716. # --------------------------
  717. # Add some code to the start of the generated configure script which
  718. # will find an echo command which doesn't interpret backslashes.
  719. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  720. [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  721. [AC_DIVERT_PUSH(NOTICE)])
  722. _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  723. # Check that we are running under the correct shell.
  724. SHELL=${CONFIG_SHELL-/bin/sh}
  725. case X$ECHO in
  726. X*--fallback-echo)
  727. # Remove one level of quotation (which was required for Make).
  728. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  729. ;;
  730. esac
  731. echo=${ECHO-echo}
  732. if test "X[$]1" = X--no-reexec; then
  733. # Discard the --no-reexec flag, and continue.
  734. shift
  735. elif test "X[$]1" = X--fallback-echo; then
  736. # Avoid inline document here, it may be left over
  737. :
  738. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  739. # Yippee, $echo works!
  740. :
  741. else
  742. # Restart under the correct shell.
  743. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  744. fi
  745. if test "X[$]1" = X--fallback-echo; then
  746. # used as fallback echo
  747. shift
  748. cat <<EOF
  749. $*
  750. EOF
  751. exit 0
  752. fi
  753. # The HP-UX ksh and POSIX shell print the target directory to stdout
  754. # if CDPATH is set.
  755. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  756. if test -z "$ECHO"; then
  757. if test "X${echo_test_string+set}" != Xset; then
  758. # find a string as large as possible, as long as the shell can cope with it
  759. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  760. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  761. if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  762. echo_test_string="`eval $cmd`" &&
  763. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  764. then
  765. break
  766. fi
  767. done
  768. fi
  769. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  770. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  771. test "X$echo_testing_string" = "X$echo_test_string"; then
  772. :
  773. else
  774. # The Solaris, AIX, and Digital Unix default echo programs unquote
  775. # backslashes. This makes it impossible to quote backslashes using
  776. # echo "$something" | sed 's/\\/\\\\/g'
  777. #
  778. # So, first we look for a working echo in the user's PATH.
  779. IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  780. for dir in $PATH /usr/ucb; do
  781. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  782. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  783. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  784. test "X$echo_testing_string" = "X$echo_test_string"; then
  785. echo="$dir/echo"
  786. break
  787. fi
  788. done
  789. IFS="$save_ifs"
  790. if test "X$echo" = Xecho; then
  791. # We didn't find a better echo, so look for alternatives.
  792. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  793. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  794. test "X$echo_testing_string" = "X$echo_test_string"; then
  795. # This shell has a builtin print -r that does the trick.
  796. echo='print -r'
  797. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  798. test "X$CONFIG_SHELL" != X/bin/ksh; then
  799. # If we have ksh, try running configure again with it.
  800. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  801. export ORIGINAL_CONFIG_SHELL
  802. CONFIG_SHELL=/bin/ksh
  803. export CONFIG_SHELL
  804. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  805. else
  806. # Try using printf.
  807. echo='printf %s\n'
  808. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  809. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  810. test "X$echo_testing_string" = "X$echo_test_string"; then
  811. # Cool, printf works
  812. :
  813. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  814. test "X$echo_testing_string" = 'X\t' &&
  815. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  816. test "X$echo_testing_string" = "X$echo_test_string"; then
  817. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  818. export CONFIG_SHELL
  819. SHELL="$CONFIG_SHELL"
  820. export SHELL
  821. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  822. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  823. test "X$echo_testing_string" = 'X\t' &&
  824. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  825. test "X$echo_testing_string" = "X$echo_test_string"; then
  826. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  827. else
  828. # maybe with a smaller string...
  829. prev=:
  830. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  831. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  832. then
  833. break
  834. fi
  835. prev="$cmd"
  836. done
  837. if test "$prev" != 'sed 50q "[$]0"'; then
  838. echo_test_string=`eval $prev`
  839. export echo_test_string
  840. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  841. else
  842. # Oops. We lost completely, so just stick with echo.
  843. echo=echo
  844. fi
  845. fi
  846. fi
  847. fi
  848. fi
  849. fi
  850. # Copy echo and quote the copy suitably for passing to libtool from
  851. # the Makefile, instead of quoting the original, which is used later.
  852. ECHO=$echo
  853. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  854. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  855. fi
  856. AC_SUBST(ECHO)
  857. AC_DIVERT_POP
  858. ])# _LT_AC_PROG_ECHO_BACKSLASH
  859. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  860. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  861. # ------------------------------------------------------------------
  862. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  863. [if test "$cross_compiling" = yes; then :
  864. [$4]
  865. else
  866. AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  867. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  868. lt_status=$lt_dlunknown
  869. cat > conftest.$ac_ext <<EOF
  870. [#line __oline__ "configure"
  871. #include "confdefs.h"
  872. #if HAVE_DLFCN_H
  873. #include <dlfcn.h>
  874. #endif
  875. #include <stdio.h>
  876. #ifdef RTLD_GLOBAL
  877. # define LT_DLGLOBAL RTLD_GLOBAL
  878. #else
  879. # ifdef DL_GLOBAL
  880. # define LT_DLGLOBAL DL_GLOBAL
  881. # else
  882. # define LT_DLGLOBAL 0
  883. # endif
  884. #endif
  885. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  886. find out it does not work in some platform. */
  887. #ifndef LT_DLLAZY_OR_NOW
  888. # ifdef RTLD_LAZY
  889. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  890. # else
  891. # ifdef DL_LAZY
  892. # define LT_DLLAZY_OR_NOW DL_LAZY
  893. # else
  894. # ifdef RTLD_NOW
  895. # define LT_DLLAZY_OR_NOW RTLD_NOW
  896. # else
  897. # ifdef DL_NOW
  898. # define LT_DLLAZY_OR_NOW DL_NOW
  899. # else
  900. # define LT_DLLAZY_OR_NOW 0
  901. # endif
  902. # endif
  903. # endif
  904. # endif
  905. #endif
  906. #ifdef __cplusplus
  907. extern "C" void exit (int);
  908. #endif
  909. void fnord() { int i=42;}
  910. int main ()
  911. {
  912. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  913. int status = $lt_dlunknown;
  914. if (self)
  915. {
  916. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  917. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  918. /* dlclose (self); */
  919. }
  920. exit (status);
  921. }]
  922. EOF
  923. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  924. (./conftest; exit; ) 2>/dev/null
  925. lt_status=$?
  926. case x$lt_status in
  927. x$lt_dlno_uscore) $1 ;;
  928. x$lt_dlneed_uscore) $2 ;;
  929. x$lt_unknown|x*) $3 ;;
  930. esac
  931. else :
  932. # compilation failed
  933. $3
  934. fi
  935. fi
  936. rm -fr conftest*
  937. ])# _LT_AC_TRY_DLOPEN_SELF
  938. # AC_LIBTOOL_DLOPEN_SELF
  939. # -------------------
  940. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  941. [if test "x$enable_dlopen" != xyes; then
  942. enable_dlopen=unknown
  943. enable_dlopen_self=unknown
  944. enable_dlopen_self_static=unknown
  945. else
  946. lt_cv_dlopen=no
  947. lt_cv_dlopen_libs=
  948. case $host_os in
  949. beos*)
  950. lt_cv_dlopen="load_add_on"
  951. lt_cv_dlopen_libs=
  952. lt_cv_dlopen_self=yes
  953. ;;
  954. cygwin* | mingw* | pw32*)
  955. lt_cv_dlopen="LoadLibrary"
  956. lt_cv_dlopen_libs=
  957. ;;
  958. *)
  959. AC_CHECK_FUNC([shl_load],
  960. [lt_cv_dlopen="shl_load"],
  961. [AC_CHECK_LIB([dld], [shl_load],
  962. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  963. [AC_CHECK_FUNC([dlopen],
  964. [lt_cv_dlopen="dlopen"],
  965. [AC_CHECK_LIB([dl], [dlopen],
  966. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  967. [AC_CHECK_LIB([svld], [dlopen],
  968. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  969. [AC_CHECK_LIB([dld], [dld_link],
  970. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  971. ])
  972. ])
  973. ])
  974. ])
  975. ])
  976. ;;
  977. esac
  978. if test "x$lt_cv_dlopen" != xno; then
  979. enable_dlopen=yes
  980. else
  981. enable_dlopen=no
  982. fi
  983. case $lt_cv_dlopen in
  984. dlopen)
  985. save_CPPFLAGS="$CPPFLAGS"
  986. AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  987. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  988. save_LDFLAGS="$LDFLAGS"
  989. eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  990. save_LIBS="$LIBS"
  991. LIBS="$lt_cv_dlopen_libs $LIBS"
  992. AC_CACHE_CHECK([whether a program can dlopen itself],
  993. lt_cv_dlopen_self, [dnl
  994. _LT_AC_TRY_DLOPEN_SELF(
  995. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  996. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  997. ])
  998. if test "x$lt_cv_dlopen_self" = xyes; then
  999. LDFLAGS="$LDFLAGS $link_static_flag"
  1000. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1001. lt_cv_dlopen_self_static, [dnl
  1002. _LT_AC_TRY_DLOPEN_SELF(
  1003. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1004. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1005. ])
  1006. fi
  1007. CPPFLAGS="$save_CPPFLAGS"
  1008. LDFLAGS="$save_LDFLAGS"
  1009. LIBS="$save_LIBS"
  1010. ;;
  1011. esac
  1012. case $lt_cv_dlopen_self in
  1013. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1014. *) enable_dlopen_self=unknown ;;
  1015. esac
  1016. case $lt_cv_dlopen_self_static in
  1017. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1018. *) enable_dlopen_self_static=unknown ;;
  1019. esac
  1020. fi
  1021. ])# AC_LIBTOOL_DLOPEN_SELF
  1022. AC_DEFUN([_LT_AC_LTCONFIG_HACK],
  1023. [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
  1024. # Sed substitution that helps us do robust quoting. It backslashifies
  1025. # metacharacters that are still active within double-quoted strings.
  1026. Xsed='sed -e s/^X//'
  1027. sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
  1028. # Same as above, but do not quote variable references.
  1029. double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
  1030. # Sed substitution to delay expansion of an escaped shell variable in a
  1031. # double_quote_subst'ed string.
  1032. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  1033. # Constants:
  1034. rm="rm -f"
  1035. # Global variables:
  1036. default_ofile=libtool
  1037. can_build_shared=yes
  1038. # All known linkers require a `.a' archive for static linking (except M$VC,
  1039. # which needs '.lib').
  1040. libext=a
  1041. ltmain="$ac_aux_dir/ltmain.sh"
  1042. ofile="$default_ofile"
  1043. with_gnu_ld="$lt_cv_prog_gnu_ld"
  1044. need_locks="$enable_libtool_lock"
  1045. old_CC="$CC"
  1046. old_CFLAGS="$CFLAGS"
  1047. # Set sane defaults for various variables
  1048. test -z "$AR" && AR=ar
  1049. test -z "$AR_FLAGS" && AR_FLAGS=cru
  1050. test -z "$AS" && AS=as
  1051. test -z "$CC" && CC=cc
  1052. test -z "$DLLTOOL" && DLLTOOL=dlltool
  1053. test -z "$LD" && LD=ld
  1054. test -z "$LN_S" && LN_S="ln -s"
  1055. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  1056. test -z "$NM" && NM=nm
  1057. test -z "$OBJDUMP" && OBJDUMP=objdump
  1058. test -z "$RANLIB" && RANLIB=:
  1059. test -z "$STRIP" && STRIP=:
  1060. test -z "$ac_objext" && ac_objext=o
  1061. if test x"$host" != x"$build"; then
  1062. ac_tool_prefix=${host_alias}-
  1063. else
  1064. ac_tool_prefix=
  1065. fi
  1066. # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  1067. case $host_os in
  1068. linux-gnu*) ;;
  1069. linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  1070. esac
  1071. case $host_os in
  1072. aix3*)
  1073. # AIX sometimes has problems with the GCC collect2 program. For some
  1074. # reason, if we set the COLLECT_NAMES environment variable, the problems
  1075. # vanish in a puff of smoke.
  1076. if test "X${COLLECT_NAMES+set}" != Xset; then
  1077. COLLECT_NAMES=
  1078. export COLLECT_NAMES
  1079. fi
  1080. ;;
  1081. esac
  1082. # Determine commands to create old-style static archives.
  1083. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  1084. old_postinstall_cmds='chmod 644 $oldlib'
  1085. old_postuninstall_cmds=
  1086. if test -n "$RANLIB"; then
  1087. case $host_os in
  1088. openbsd*)
  1089. old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
  1090. ;;
  1091. *)
  1092. old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  1093. ;;
  1094. esac
  1095. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  1096. fi
  1097. # Allow CC to be a program name with arguments.
  1098. set dummy $CC
  1099. compiler="[$]2"
  1100. AC_MSG_CHECKING([for objdir])
  1101. rm -f .libs 2>/dev/null
  1102. mkdir .libs 2>/dev/null
  1103. if test -d .libs; then
  1104. objdir=.libs
  1105. else
  1106. # MS-DOS does not allow filenames that begin with a dot.
  1107. objdir=_libs
  1108. fi
  1109. rmdir .libs 2>/dev/null
  1110. AC_MSG_RESULT($objdir)
  1111. AC_ARG_WITH(pic,
  1112. [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
  1113. pic_mode="$withval", pic_mode=default)
  1114. test -z "$pic_mode" && pic_mode=default
  1115. # We assume here that the value for lt_cv_prog_cc_pic will not be cached
  1116. # in isolation, and that seeing it set (from the cache) indicates that
  1117. # the associated values are set (in the cache) correctly too.
  1118. AC_MSG_CHECKING([for $compiler option to produce PIC])
  1119. AC_CACHE_VAL(lt_cv_prog_cc_pic,
  1120. [ lt_cv_prog_cc_pic=
  1121. lt_cv_prog_cc_shlib=
  1122. lt_cv_prog_cc_wl=
  1123. lt_cv_prog_cc_static=
  1124. lt_cv_prog_cc_no_builtin=
  1125. lt_cv_prog_cc_can_build_shared=$can_build_shared
  1126. if test "$GCC" = yes; then
  1127. lt_cv_prog_cc_wl='-Wl,'
  1128. lt_cv_prog_cc_static='-static'
  1129. case $host_os in
  1130. aix*)
  1131. # Below there is a dirty hack to force normal static linking with -ldl
  1132. # The problem is because libdl dynamically linked with both libc and
  1133. # libC (AIX C++ library), which obviously doesn't included in libraries
  1134. # list by gcc. This cause undefined symbols with -static flags.
  1135. # This hack allows C programs to be linked with "-static -ldl", but
  1136. # not sure about C++ programs.
  1137. lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
  1138. ;;
  1139. amigaos*)
  1140. # FIXME: we need at least 68020 code to build shared libraries, but
  1141. # adding the `-m68020' flag to GCC prevents building anything better,
  1142. # like `-m68040'.
  1143. lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
  1144. ;;
  1145. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  1146. # PIC is the default for these OSes.
  1147. ;;
  1148. darwin* | rhapsody*)
  1149. # PIC is the default on this platform
  1150. # Common symbols not allowed in MH_DYLIB files
  1151. lt_cv_prog_cc_pic='-fno-common'
  1152. ;;
  1153. cygwin* | mingw* | pw32* | os2*)
  1154. # This hack is so that the source file can tell whether it is being
  1155. # built for inclusion in a dll (and should export symbols for example).
  1156. lt_cv_prog_cc_pic='-DDLL_EXPORT'
  1157. ;;
  1158. sysv4*MP*)
  1159. if test -d /usr/nec; then
  1160. lt_cv_prog_cc_pic=-Kconform_pic
  1161. fi
  1162. ;;
  1163. *)
  1164. lt_cv_prog_cc_pic='-fPIC'
  1165. ;;
  1166. esac
  1167. else
  1168. # PORTME Check for PIC flags for the system compiler.
  1169. case $host_os in
  1170. aix3* | aix4* | aix5*)
  1171. lt_cv_prog_cc_wl='-Wl,'
  1172. # All AIX code is PIC.
  1173. if test "$host_cpu" = ia64; then
  1174. # AIX 5 now supports IA64 processor
  1175. lt_cv_prog_cc_static='-Bstatic'
  1176. else
  1177. lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
  1178. fi
  1179. ;;
  1180. hpux9* | hpux10* | hpux11*)
  1181. # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
  1182. lt_cv_prog_cc_wl='-Wl,'
  1183. lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
  1184. lt_cv_prog_cc_pic='+Z'
  1185. ;;
  1186. irix5* | irix6* | nonstopux*)
  1187. lt_cv_prog_cc_wl='-Wl,'
  1188. lt_cv_prog_cc_static='-non_shared'
  1189. # PIC (with -KPIC) is the default.
  1190. ;;
  1191. cygwin* | mingw* | pw32* | os2*)
  1192. # This hack is so that the source file can tell whether it is being
  1193. # built for inclusion in a dll (and should export symbols for example).
  1194. lt_cv_prog_cc_pic='-DDLL_EXPORT'
  1195. ;;
  1196. newsos6)
  1197. lt_cv_prog_cc_pic='-KPIC'
  1198. lt_cv_prog_cc_static='-Bstatic'
  1199. ;;
  1200. osf3* | osf4* | osf5*)
  1201. # All OSF/1 code is PIC.
  1202. lt_cv_prog_cc_wl='-Wl,'
  1203. lt_cv_prog_cc_static='-non_shared'
  1204. ;;
  1205. sco3.2v5*)
  1206. lt_cv_prog_cc_pic='-Kpic'
  1207. lt_cv_prog_cc_static='-dn'
  1208. lt_cv_prog_cc_shlib='-belf'
  1209. ;;
  1210. solaris*)
  1211. lt_cv_prog_cc_pic='-KPIC'
  1212. lt_cv_prog_cc_static='-Bstatic'
  1213. lt_cv_prog_cc_wl='-Wl,'
  1214. ;;
  1215. sunos4*)
  1216. lt_cv_prog_cc_pic='-PIC'
  1217. lt_cv_prog_cc_static='-Bstatic'
  1218. lt_cv_prog_cc_wl='-Qoption ld '
  1219. ;;
  1220. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1221. lt_cv_prog_cc_pic='-KPIC'
  1222. lt_cv_prog_cc_static='-Bstatic'
  1223. lt_cv_prog_cc_wl='-Wl,'
  1224. ;;
  1225. uts4*)
  1226. lt_cv_prog_cc_pic='-pic'
  1227. lt_cv_prog_cc_static='-Bstatic'
  1228. ;;
  1229. sysv4*MP*)
  1230. if test -d /usr/nec ;then
  1231. lt_cv_prog_cc_pic='-Kconform_pic'
  1232. lt_cv_prog_cc_static='-Bstatic'
  1233. fi
  1234. ;;
  1235. *)
  1236. lt_cv_prog_cc_can_build_shared=no
  1237. ;;
  1238. esac
  1239. fi
  1240. ])
  1241. if test -z "$lt_cv_prog_cc_pic"; then
  1242. AC_MSG_RESULT([none])
  1243. else
  1244. AC_MSG_RESULT([$lt_cv_prog_cc_pic])
  1245. # Check to make sure the pic_flag actually works.
  1246. AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
  1247. AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
  1248. save_CFLAGS="$CFLAGS"
  1249. CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
  1250. AC_TRY_COMPILE([], [], [dnl
  1251. case $host_os in
  1252. hpux9* | hpux10* | hpux11*)
  1253. # On HP-UX, both CC and GCC only warn that PIC is supported... then
  1254. # they create non-PIC objects. So, if there were any warnings, we
  1255. # assume that PIC is not supported.
  1256. if test -s conftest.err; then
  1257. lt_cv_prog_cc_pic_works=no
  1258. else
  1259. lt_cv_prog_cc_pic_works=yes
  1260. fi
  1261. ;;
  1262. *)
  1263. lt_cv_prog_cc_pic_works=yes
  1264. ;;
  1265. esac
  1266. ], [dnl
  1267. lt_cv_prog_cc_pic_works=no
  1268. ])
  1269. CFLAGS="$save_CFLAGS"
  1270. ])
  1271. if test "X$lt_cv_prog_cc_pic_works" = Xno; then
  1272. lt_cv_prog_cc_pic=
  1273. lt_cv_prog_cc_can_build_shared=no
  1274. else
  1275. lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
  1276. fi
  1277. AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
  1278. fi
  1279. # Check for any special shared library compilation flags.
  1280. if test -n "$lt_cv_prog_cc_shlib"; then
  1281. AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
  1282. if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
  1283. else
  1284. AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
  1285. lt_cv_prog_cc_can_build_shared=no
  1286. fi
  1287. fi
  1288. AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
  1289. AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
  1290. lt_cv_prog_cc_static_works=no
  1291. save_LDFLAGS="$LDFLAGS"
  1292. LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
  1293. AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
  1294. LDFLAGS="$save_LDFLAGS"
  1295. ])
  1296. # Belt *and* braces to stop my trousers falling down:
  1297. test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
  1298. AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
  1299. pic_flag="$lt_cv_prog_cc_pic"
  1300. special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
  1301. wl="$lt_cv_prog_cc_wl"
  1302. link_static_flag="$lt_cv_prog_cc_static"
  1303. no_builtin_flag="$lt_cv_prog_cc_no_builtin"
  1304. can_build_shared="$lt_cv_prog_cc_can_build_shared"
  1305. # Check to see if options -o and -c are simultaneously supported by compiler
  1306. AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
  1307. AC_CACHE_VAL([lt_cv_compiler_c_o], [
  1308. $rm -r conftest 2>/dev/null
  1309. mkdir conftest
  1310. cd conftest
  1311. echo "int some_variable = 0;" > conftest.$ac_ext
  1312. mkdir out
  1313. # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
  1314. # that will create temporary files in the current directory regardless of
  1315. # the output directory. Thus, making CWD read-only will cause this test
  1316. # to fail, enabling locking or at least warning the user not to do parallel
  1317. # builds.
  1318. chmod -w .
  1319. save_CFLAGS="$CFLAGS"
  1320. CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
  1321. compiler_c_o=no
  1322. if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
  1323. # The compiler can only warn and ignore the option if not recognized
  1324. # So say no if there are warnings
  1325. if test -s out/conftest.err; then
  1326. lt_cv_compiler_c_o=no
  1327. else
  1328. lt_cv_compiler_c_o=yes
  1329. fi
  1330. else
  1331. # Append any errors to the config.log.
  1332. cat out/conftest.err 1>&AC_FD_CC
  1333. lt_cv_compiler_c_o=no
  1334. fi
  1335. CFLAGS="$save_CFLAGS"
  1336. chmod u+w .
  1337. $rm conftest* out/*
  1338. rmdir out
  1339. cd ..
  1340. rmdir conftest
  1341. $rm -r conftest 2>/dev/null
  1342. ])
  1343. compiler_c_o=$lt_cv_compiler_c_o
  1344. AC_MSG_RESULT([$compiler_c_o])
  1345. if test x"$compiler_c_o" = x"yes"; then
  1346. # Check to see if we can write to a .lo
  1347. AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
  1348. AC_CACHE_VAL([lt_cv_compiler_o_lo], [
  1349. lt_cv_compiler_o_lo=no
  1350. save_CFLAGS="$CFLAGS"
  1351. CFLAGS="$CFLAGS -c -o conftest.lo"
  1352. save_objext="$ac_objext"
  1353. ac_objext=lo
  1354. AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
  1355. # The compiler can only warn and ignore the option if not recognized
  1356. # So say no if there are warnings
  1357. if test -s conftest.err; then
  1358. lt_cv_compiler_o_lo=no
  1359. else
  1360. lt_cv_compiler_o_lo=yes
  1361. fi
  1362. ])
  1363. ac_objext="$save_objext"
  1364. CFLAGS="$save_CFLAGS"
  1365. ])
  1366. compiler_o_lo=$lt_cv_compiler_o_lo
  1367. AC_MSG_RESULT([$compiler_o_lo])
  1368. else
  1369. compiler_o_lo=no
  1370. fi
  1371. # Check to see if we can do hard links to lock some files if needed
  1372. hard_links="nottested"
  1373. if test "$compiler_c_o" = no && test "$need_locks" != no; then
  1374. # do not overwrite the value of need_locks provided by the user
  1375. AC_MSG_CHECKING([if we can lock with hard links])
  1376. hard_links=yes
  1377. $rm conftest*
  1378. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1379. touch conftest.a
  1380. ln conftest.a conftest.b 2>&5 || hard_links=no
  1381. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1382. AC_MSG_RESULT([$hard_links])
  1383. if test "$hard_links" = no; then
  1384. AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
  1385. need_locks=warn
  1386. fi
  1387. else
  1388. need_locks=no
  1389. fi
  1390. if test "$GCC" = yes; then
  1391. # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
  1392. AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
  1393. echo "int some_variable = 0;" > conftest.$ac_ext
  1394. save_CFLAGS="$CFLAGS"
  1395. CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
  1396. compiler_rtti_exceptions=no
  1397. AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
  1398. # The compiler can only warn and ignore the option if not recognized
  1399. # So say no if there are warnings
  1400. if test -s conftest.err; then
  1401. compiler_rtti_exceptions=no
  1402. else
  1403. compiler_rtti_exceptions=yes
  1404. fi
  1405. ])
  1406. CFLAGS="$save_CFLAGS"
  1407. AC_MSG_RESULT([$compiler_rtti_exceptions])
  1408. if test "$compiler_rtti_exceptions" = "yes"; then
  1409. no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
  1410. else
  1411. no_builtin_flag=' -fno-builtin'
  1412. fi
  1413. fi
  1414. # See if the linker supports building shared libraries.
  1415. AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
  1416. allow_undefined_flag=
  1417. no_undefined_flag=
  1418. need_lib_prefix=unknown
  1419. need_version=unknown
  1420. # when you set need_version to no, make sure it does not cause -set_version
  1421. # flags to be left without arguments
  1422. archive_cmds=
  1423. archive_expsym_cmds=
  1424. old_archive_from_new_cmds=
  1425. old_archive_from_expsyms_cmds=
  1426. export_dynamic_flag_spec=
  1427. whole_archive_flag_spec=
  1428. thread_safe_flag_spec=
  1429. hardcode_into_libs=no
  1430. hardcode_libdir_flag_spec=
  1431. hardcode_libdir_separator=
  1432. hardcode_direct=no
  1433. hardcode_minus_L=no
  1434. hardcode_shlibpath_var=unsupported
  1435. runpath_var=
  1436. link_all_deplibs=unknown
  1437. always_export_symbols=no
  1438. export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
  1439. # include_expsyms should be a list of space-separated symbols to be *always*
  1440. # included in the symbol list
  1441. include_expsyms=
  1442. # exclude_expsyms can be an egrep regular expression of symbols to exclude
  1443. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  1444. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  1445. # as well as any symbol that contains `d'.
  1446. exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  1447. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  1448. # platforms (ab)use it in PIC code, but their linkers get confused if
  1449. # the symbol is explicitly referenced. Since portable code cannot
  1450. # rely on this symbol name, it's probably fine to never include it in
  1451. # preloaded symbol tables.
  1452. extract_expsyms_cmds=
  1453. case $host_os in
  1454. cygwin* | mingw* | pw32*)
  1455. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  1456. # When not using gcc, we currently assume that we are using
  1457. # Microsoft Visual C++.
  1458. if test "$GCC" != yes; then
  1459. with_gnu_ld=no
  1460. fi
  1461. ;;
  1462. openbsd*)
  1463. with_gnu_ld=no
  1464. ;;
  1465. esac
  1466. ld_shlibs=yes
  1467. if test "$with_gnu_ld" = yes; then
  1468. # If archive_cmds runs LD, not CC, wlarc should be empty
  1469. wlarc='${wl}'
  1470. # See if GNU ld supports shared libraries.
  1471. case $host_os in
  1472. aix3* | aix4* | aix5*)
  1473. # On AIX, the GNU linker is very broken
  1474. # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
  1475. ld_shlibs=no
  1476. cat <<EOF 1>&2
  1477. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  1478. *** to be unable to reliably create shared libraries on AIX.
  1479. *** Therefore, libtool is disabling shared libraries support. If you
  1480. *** really care for shared libraries, you may want to modify your PATH
  1481. *** so that a non-GNU linker is found, and then restart.
  1482. EOF
  1483. ;;
  1484. amigaos*)
  1485. archive_cmds='$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)'
  1486. hardcode_libdir_flag_spec='-L$libdir'
  1487. hardcode_minus_L=yes
  1488. # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  1489. # that the semantics of dynamic libraries on AmigaOS, at least up
  1490. # to version 4, is to share data among multiple programs linked
  1491. # with the same dynamic library. Since this doesn't match the
  1492. # behavior of shared libraries on other platforms, we can use
  1493. # them.
  1494. ld_shlibs=no
  1495. ;;
  1496. beos*)
  1497. if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1498. allow_undefined_flag=unsupported
  1499. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  1500. # support --undefined. This deserves some investigation. FIXME
  1501. archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1502. else
  1503. ld_shlibs=no
  1504. fi
  1505. ;;
  1506. cygwin* | mingw* | pw32*)
  1507. # hardcode_libdir_flag_spec is actually meaningless, as there is
  1508. # no search path for DLLs.
  1509. hardcode_libdir_flag_spec='-L$libdir'
  1510. allow_undefined_flag=unsupported
  1511. always_export_symbols=yes
  1512. extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
  1513. sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
  1514. test -f $output_objdir/impgen.exe || (cd $output_objdir && \
  1515. if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
  1516. else $CC -o impgen impgen.c ; fi)~
  1517. $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
  1518. old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
  1519. # cygwin and mingw dlls have different entry points and sets of symbols
  1520. # to exclude.
  1521. # FIXME: what about values for MSVC?
  1522. dll_entry=__cygwin_dll_entry@12
  1523. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
  1524. case $host_os in
  1525. mingw*)
  1526. # mingw values
  1527. dll_entry=_DllMainCRTStartup@12
  1528. dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
  1529. ;;
  1530. esac
  1531. # mingw and cygwin differ, and it's simplest to just exclude the union
  1532. # of the two symbol sets.
  1533. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
  1534. # recent cygwin and mingw systems supply a stub DllMain which the user
  1535. # can override, but on older systems we have to supply one (in ltdll.c)
  1536. if test "x$lt_cv_need_dllmain" = "xyes"; then
  1537. ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
  1538. ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
  1539. test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
  1540. else
  1541. ltdll_obj=
  1542. ltdll_cmds=
  1543. fi
  1544. # Extract the symbol export list from an `--export-all' def file,
  1545. # then regenerate the def file from the symbol export list, so that
  1546. # the compiled dll only exports the symbol export list.
  1547. # Be careful not to strip the DATA tag left be newer dlltools.
  1548. export_symbols_cmds="$ltdll_cmds"'
  1549. $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
  1550. sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
  1551. # If the export-symbols file already is a .def file (1st line
  1552. # is EXPORTS), use it as is.
  1553. # If DATA tags from a recent dlltool are present, honour them!
  1554. archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
  1555. cp $export_symbols $output_objdir/$soname-def;
  1556. else
  1557. echo EXPORTS > $output_objdir/$soname-def;
  1558. _lt_hint=1;
  1559. cat $export_symbols | while read symbol; do
  1560. set dummy \$symbol;
  1561. case \[$]# in
  1562. 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
  1563. 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
  1564. *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
  1565. esac;
  1566. _lt_hint=`expr 1 + \$_lt_hint`;
  1567. done;
  1568. fi~
  1569. '"$ltdll_cmds"'
  1570. $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
  1571. $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
  1572. $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
  1573. $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
  1574. $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
  1575. ;;
  1576. netbsd*)
  1577. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1578. archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  1579. wlarc=
  1580. else
  1581. archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1582. archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1583. fi
  1584. ;;
  1585. solaris* | sysv5*)
  1586. if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
  1587. ld_shlibs=no
  1588. cat <<EOF 1>&2
  1589. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  1590. *** create shared libraries on Solaris systems. Therefore, libtool
  1591. *** is disabling shared libraries support. We urge you to upgrade GNU
  1592. *** binutils to release 2.9.1 or newer. Another option is to modify
  1593. *** your PATH or compiler configuration so that the native linker is
  1594. *** used, and then restart.
  1595. EOF
  1596. elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1597. archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1598. archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1599. else
  1600. ld_shlibs=no
  1601. fi
  1602. ;;
  1603. sunos4*)
  1604. archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  1605. wlarc=
  1606. hardcode_direct=yes
  1607. hardcode_shlibpath_var=no
  1608. ;;
  1609. *)
  1610. if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1611. archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1612. archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1613. else
  1614. ld_shlibs=no
  1615. fi
  1616. ;;
  1617. esac
  1618. if test "$ld_shlibs" = yes; then
  1619. runpath_var=LD_RUN_PATH
  1620. hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
  1621. export_dynamic_flag_spec='${wl}--export-dynamic'
  1622. case $host_os in
  1623. cygwin* | mingw* | pw32*)
  1624. # dlltool doesn't understand --whole-archive et. al.
  1625. whole_archive_flag_spec=
  1626. ;;
  1627. *)
  1628. # ancient GNU ld didn't support --whole-archive et. al.
  1629. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
  1630. whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  1631. else
  1632. whole_archive_flag_spec=
  1633. fi
  1634. ;;
  1635. esac
  1636. fi
  1637. else
  1638. # PORTME fill in a description of your system's linker (not GNU ld)
  1639. case $host_os in
  1640. aix3*)
  1641. allow_undefined_flag=unsupported
  1642. always_export_symbols=yes
  1643. archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  1644. # Note: this linker hardcodes the directories in LIBPATH if there
  1645. # are no directories specified by -L.
  1646. hardcode_minus_L=yes
  1647. if test "$GCC" = yes && test -z "$link_static_flag"; then
  1648. # Neither direct hardcoding nor static linking is supported with a
  1649. # broken collect2.
  1650. hardcode_direct=unsupported
  1651. fi
  1652. ;;
  1653. aix4* | aix5*)
  1654. if test "$host_cpu" = ia64; then
  1655. # On IA64, the linker does run time linking by default, so we don't
  1656. # have to do anything special.
  1657. aix_use_runtimelinking=no
  1658. exp_sym_flag='-Bexport'
  1659. no_entry_flag=""
  1660. else
  1661. aix_use_runtimelinking=no
  1662. # Test if we are trying to use run time linking or normal
  1663. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  1664. # need to do runtime linking.
  1665. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  1666. for ld_flag in $LDFLAGS; do
  1667. case $ld_flag in
  1668. *-brtl*)
  1669. aix_use_runtimelinking=yes
  1670. break
  1671. ;;
  1672. esac
  1673. done
  1674. esac
  1675. exp_sym_flag='-bexport'
  1676. no_entry_flag='-bnoentry'
  1677. fi
  1678. # When large executables or shared objects are built, AIX ld can
  1679. # have problems creating the table of contents. If linking a library
  1680. # or program results in "error TOC overflow" add -mminimal-toc to
  1681. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  1682. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  1683. hardcode_direct=yes
  1684. archive_cmds=''
  1685. hardcode_libdir_separator=':'
  1686. if test "$GCC" = yes; then
  1687. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  1688. collect2name=`${CC} -print-prog-name=collect2`
  1689. if test -f "$collect2name" && \
  1690. strings "$collect2name" | grep resolve_lib_name >/dev/null
  1691. then
  1692. # We have reworked collect2
  1693. hardcode_direct=yes
  1694. else
  1695. # We have old collect2
  1696. hardcode_direct=unsupported
  1697. # It fails to find uninstalled libraries when the uninstalled
  1698. # path is not listed in the libpath. Setting hardcode_minus_L
  1699. # to unsupported forces relinking
  1700. hardcode_minus_L=yes
  1701. hardcode_libdir_flag_spec='-L$libdir'
  1702. hardcode_libdir_separator=
  1703. fi
  1704. esac
  1705. shared_flag='-shared'
  1706. else
  1707. # not using gcc
  1708. if test "$host_cpu" = ia64; then
  1709. shared_flag='${wl}-G'
  1710. else
  1711. if test "$aix_use_runtimelinking" = yes; then
  1712. shared_flag='${wl}-G'
  1713. else
  1714. shared_flag='${wl}-bM:SRE'
  1715. fi
  1716. fi
  1717. fi
  1718. # It seems that -bexpall can do strange things, so it is better to
  1719. # generate a list of symbols to export.
  1720. always_export_symbols=yes
  1721. if test "$aix_use_runtimelinking" = yes; then
  1722. # Warning - without using the other runtime loading flags (-brtl),
  1723. # -berok will link without error, but may produce a broken library.
  1724. allow_undefined_flag='-berok'
  1725. hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
  1726. archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  1727. else
  1728. if test "$host_cpu" = ia64; then
  1729. hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
  1730. allow_undefined_flag="-z nodefs"
  1731. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  1732. else
  1733. hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
  1734. # Warning - without using the other run time loading flags,
  1735. # -berok will link without error, but may produce a broken library.
  1736. allow_undefined_flag='${wl}-berok'
  1737. # This is a bit strange, but is similar to how AIX traditionally builds
  1738. # it's shared libraries.
  1739. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
  1740. fi
  1741. fi
  1742. ;;
  1743. amigaos*)
  1744. archive_cmds='$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)'
  1745. hardcode_libdir_flag_spec='-L$libdir'
  1746. hardcode_minus_L=yes
  1747. # see comment about different semantics on the GNU ld section
  1748. ld_shlibs=no
  1749. ;;
  1750. cygwin* | mingw* | pw32*)
  1751. # When not using gcc, we currently assume that we are using
  1752. # Microsoft Visual C++.
  1753. # hardcode_libdir_flag_spec is actually meaningless, as there is
  1754. # no search path for DLLs.
  1755. hardcode_libdir_flag_spec=' '
  1756. allow_undefined_flag=unsupported
  1757. # Tell ltmain to make .lib files, not .a files.
  1758. libext=lib
  1759. # FIXME: Setting linknames here is a bad hack.
  1760. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
  1761. # The linker will automatically build a .lib file if we build a DLL.
  1762. old_archive_from_new_cmds='true'
  1763. # FIXME: Should let the user specify the lib program.
  1764. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
  1765. fix_srcfile_path='`cygpath -w "$srcfile"`'
  1766. ;;
  1767. darwin* | rhapsody*)
  1768. case "$host_os" in
  1769. rhapsody* | darwin1.[[012]])
  1770. allow_undefined_flag='-undefined suppress'
  1771. ;;
  1772. *) # Darwin 1.3 on
  1773. allow_undefined_flag='-flat_namespace -undefined suppress'
  1774. ;;
  1775. esac
  1776. # FIXME: Relying on posixy $() will cause problems for
  1777. # cross-compilation, but unfortunately the echo tests do not
  1778. # yet detect zsh echo's removal of \ escapes. Also zsh mangles
  1779. # `"' quotes if we put them in here... so don't!
  1780. archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
  1781. # We need to add '_' to the symbols in $export_symbols first
  1782. #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
  1783. hardcode_direct=yes
  1784. hardcode_shlibpath_var=no
  1785. whole_archive_flag_spec='-all_load $convenience'
  1786. ;;
  1787. freebsd1*)
  1788. ld_shlibs=no
  1789. ;;
  1790. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  1791. # support. Future versions do this automatically, but an explicit c++rt0.o
  1792. # does not break anything, and helps significantly (at the cost of a little
  1793. # extra space).
  1794. freebsd2.2*)
  1795. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  1796. hardcode_libdir_flag_spec='-R$libdir'
  1797. hardcode_direct=yes
  1798. hardcode_shlibpath_var=no
  1799. ;;
  1800. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  1801. freebsd2*)
  1802. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  1803. hardcode_direct=yes
  1804. hardcode_minus_L=yes
  1805. hardcode_shlibpath_var=no
  1806. ;;
  1807. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  1808. freebsd*)
  1809. archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  1810. hardcode_libdir_flag_spec='-R$libdir'
  1811. hardcode_direct=yes
  1812. hardcode_shlibpath_var=no
  1813. ;;
  1814. hpux9* | hpux10* | hpux11*)
  1815. case $host_os in
  1816. hpux9*) archive_cmds='$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' ;;
  1817. *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
  1818. esac
  1819. hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  1820. hardcode_libdir_separator=:
  1821. hardcode_direct=yes
  1822. hardcode_minus_L=yes # Not in the search PATH, but as the default
  1823. # location of the library.
  1824. export_dynamic_flag_spec='${wl}-E'
  1825. ;;
  1826. irix5* | irix6* | nonstopux*)
  1827. if test "$GCC" = yes; then
  1828. archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  1829. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1830. else
  1831. archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  1832. hardcode_libdir_flag_spec='-rpath $libdir'
  1833. fi
  1834. hardcode_libdir_separator=:
  1835. link_all_deplibs=yes
  1836. ;;
  1837. netbsd*)
  1838. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1839. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  1840. else
  1841. archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  1842. fi
  1843. hardcode_libdir_flag_spec='-R$libdir'
  1844. hardcode_direct=yes
  1845. hardcode_shlibpath_var=no
  1846. ;;
  1847. newsos6)
  1848. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1849. hardcode_direct=yes
  1850. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1851. hardcode_libdir_separator=:
  1852. hardcode_shlibpath_var=no
  1853. ;;
  1854. openbsd*)
  1855. hardcode_direct=yes
  1856. hardcode_shlibpath_var=no
  1857. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  1858. archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  1859. hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
  1860. export_dynamic_flag_spec='${wl}-E'
  1861. else
  1862. case "$host_os" in
  1863. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  1864. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  1865. hardcode_libdir_flag_spec='-R$libdir'
  1866. ;;
  1867. *)
  1868. archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  1869. hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
  1870. ;;
  1871. esac
  1872. fi
  1873. ;;
  1874. os2*)
  1875. hardcode_libdir_flag_spec='-L$libdir'
  1876. hardcode_minus_L=yes
  1877. allow_undefined_flag=unsupported
  1878. archive_cmds='$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'
  1879. old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  1880. ;;
  1881. osf3*)
  1882. if test "$GCC" = yes; then
  1883. allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  1884. archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  1885. else
  1886. allow_undefined_flag=' -expect_unresolved \*'
  1887. archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  1888. fi
  1889. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1890. hardcode_libdir_separator=:
  1891. ;;
  1892. osf4* | osf5*) # as osf3* with the addition of -msym flag
  1893. if test "$GCC" = yes; then
  1894. allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  1895. archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  1896. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1897. else
  1898. allow_undefined_flag=' -expect_unresolved \*'
  1899. archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  1900. archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
  1901. $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
  1902. #Both c and cxx compiler support -rpath directly
  1903. hardcode_libdir_flag_spec='-rpath $libdir'
  1904. fi
  1905. hardcode_libdir_separator=:
  1906. ;;
  1907. sco3.2v5*)
  1908. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1909. hardcode_shlibpath_var=no
  1910. runpath_var=LD_RUN_PATH
  1911. hardcode_runpath_var=yes
  1912. export_dynamic_flag_spec='${wl}-Bexport'
  1913. ;;
  1914. solaris*)
  1915. # gcc --version < 3.0 without binutils cannot create self contained
  1916. # shared libraries reliably, requiring libgcc.a to resolve some of
  1917. # the object symbols generated in some cases. Libraries that use
  1918. # assert need libgcc.a to resolve __eprintf, for example. Linking
  1919. # a copy of libgcc.a into every shared library to guarantee resolving
  1920. # such symbols causes other problems: According to Tim Van Holder
  1921. # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
  1922. # (to the application) exception stack for one thing.
  1923. no_undefined_flag=' -z defs'
  1924. if test "$GCC" = yes; then
  1925. case `$CC --version 2>/dev/null` in
  1926. [[12]].*)
  1927. cat <<EOF 1>&2
  1928. *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
  1929. *** create self contained shared libraries on Solaris systems, without
  1930. *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
  1931. *** -no-undefined support, which will at least allow you to build shared
  1932. *** libraries. However, you may find that when you link such libraries
  1933. *** into an application without using GCC, you have to manually add
  1934. *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
  1935. *** upgrade to a newer version of GCC. Another option is to rebuild your
  1936. *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
  1937. EOF
  1938. no_undefined_flag=
  1939. ;;
  1940. esac
  1941. fi
  1942. # $CC -shared without GNU ld will not create a library from C++
  1943. # object files and a static libstdc++, better avoid it by now
  1944. archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1945. archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1946. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  1947. hardcode_libdir_flag_spec='-R$libdir'
  1948. hardcode_shlibpath_var=no
  1949. case $host_os in
  1950. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  1951. *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  1952. whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
  1953. esac
  1954. link_all_deplibs=yes
  1955. ;;
  1956. sunos4*)
  1957. if test "x$host_vendor" = xsequent; then
  1958. # Use $CC to link under sequent, because it throws in some extra .o
  1959. # files that make .init and .fini sections work.
  1960. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  1961. else
  1962. archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  1963. fi
  1964. hardcode_libdir_flag_spec='-L$libdir'
  1965. hardcode_direct=yes
  1966. hardcode_minus_L=yes
  1967. hardcode_shlibpath_var=no
  1968. ;;
  1969. sysv4)
  1970. case $host_vendor in
  1971. sni)
  1972. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1973. hardcode_direct=yes # is this really true???
  1974. ;;
  1975. siemens)
  1976. ## LD is ld it makes a PLAMLIB
  1977. ## CC just makes a GrossModule.
  1978. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  1979. reload_cmds='$CC -r -o $output$reload_objs'
  1980. hardcode_direct=no
  1981. ;;
  1982. motorola)
  1983. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1984. hardcode_direct=no #Motorola manual says yes, but my tests say they lie
  1985. ;;
  1986. esac
  1987. runpath_var='LD_RUN_PATH'
  1988. hardcode_shlibpath_var=no
  1989. ;;
  1990. sysv4.3*)
  1991. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1992. hardcode_shlibpath_var=no
  1993. export_dynamic_flag_spec='-Bexport'
  1994. ;;
  1995. sysv5*)
  1996. no_undefined_flag=' -z text'
  1997. # $CC -shared without GNU ld will not create a library from C++
  1998. # object files and a static libstdc++, better avoid it by now
  1999. archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2000. archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  2001. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  2002. hardcode_libdir_flag_spec=
  2003. hardcode_shlibpath_var=no
  2004. runpath_var='LD_RUN_PATH'
  2005. ;;
  2006. uts4*)
  2007. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2008. hardcode_libdir_flag_spec='-L$libdir'
  2009. hardcode_shlibpath_var=no
  2010. ;;
  2011. dgux*)
  2012. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2013. hardcode_libdir_flag_spec='-L$libdir'
  2014. hardcode_shlibpath_var=no
  2015. ;;
  2016. sysv4*MP*)
  2017. if test -d /usr/nec; then
  2018. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2019. hardcode_shlibpath_var=no
  2020. runpath_var=LD_RUN_PATH
  2021. hardcode_runpath_var=yes
  2022. ld_shlibs=yes
  2023. fi
  2024. ;;
  2025. sysv4.2uw2*)
  2026. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  2027. hardcode_direct=yes
  2028. hardcode_minus_L=no
  2029. hardcode_shlibpath_var=no
  2030. hardcode_runpath_var=yes
  2031. runpath_var=LD_RUN_PATH
  2032. ;;
  2033. sysv5uw7* | unixware7*)
  2034. no_undefined_flag='${wl}-z ${wl}text'
  2035. if test "$GCC" = yes; then
  2036. archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  2037. else
  2038. archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  2039. fi
  2040. runpath_var='LD_RUN_PATH'
  2041. hardcode_shlibpath_var=no
  2042. ;;
  2043. *)
  2044. ld_shlibs=no
  2045. ;;
  2046. esac
  2047. fi
  2048. AC_MSG_RESULT([$ld_shlibs])
  2049. test "$ld_shlibs" = no && can_build_shared=no
  2050. # Check hardcoding attributes.
  2051. AC_MSG_CHECKING([how to hardcode library paths into programs])
  2052. hardcode_action=
  2053. if test -n "$hardcode_libdir_flag_spec" || \
  2054. test -n "$runpath_var"; then
  2055. # We can hardcode non-existant directories.
  2056. if test "$hardcode_direct" != no &&
  2057. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  2058. # have to relink, otherwise we might link with an installed library
  2059. # when we should be linking with a yet-to-be-installed one
  2060. ## test "$hardcode_shlibpath_var" != no &&
  2061. test "$hardcode_minus_L" != no; then
  2062. # Linking always hardcodes the temporary library directory.
  2063. hardcode_action=relink
  2064. else
  2065. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  2066. hardcode_action=immediate
  2067. fi
  2068. else
  2069. # We cannot hardcode anything, or else we can only hardcode existing
  2070. # directories.
  2071. hardcode_action=unsupported
  2072. fi
  2073. AC_MSG_RESULT([$hardcode_action])
  2074. striplib=
  2075. old_striplib=
  2076. AC_MSG_CHECKING([whether stripping libraries is possible])
  2077. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  2078. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  2079. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  2080. AC_MSG_RESULT([yes])
  2081. else
  2082. AC_MSG_RESULT([no])
  2083. fi
  2084. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2085. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  2086. # PORTME Fill in your ld.so characteristics
  2087. AC_MSG_CHECKING([dynamic linker characteristics])
  2088. library_names_spec=
  2089. libname_spec='lib$name'
  2090. soname_spec=
  2091. postinstall_cmds=
  2092. postuninstall_cmds=
  2093. finish_cmds=
  2094. finish_eval=
  2095. shlibpath_var=
  2096. shlibpath_overrides_runpath=unknown
  2097. version_type=none
  2098. dynamic_linker="$host_os ld.so"
  2099. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2100. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2101. case $host_os in
  2102. aix3*)
  2103. version_type=linux
  2104. library_names_spec='${libname}${release}.so$versuffix $libname.a'
  2105. shlibpath_var=LIBPATH
  2106. # AIX has no versioning support, so we append a major version to the name.
  2107. soname_spec='${libname}${release}.so$major'
  2108. ;;
  2109. aix4* | aix5*)
  2110. version_type=linux
  2111. need_lib_prefix=no
  2112. need_version=no
  2113. hardcode_into_libs=yes
  2114. if test "$host_cpu" = ia64; then
  2115. # AIX 5 supports IA64
  2116. library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
  2117. shlibpath_var=LD_LIBRARY_PATH
  2118. else
  2119. # With GCC up to 2.95.x, collect2 would create an import file
  2120. # for dependence libraries. The import file would start with
  2121. # the line `#! .'. This would cause the generated library to
  2122. # depend on `.', always an invalid library. This was fixed in
  2123. # development snapshots of GCC prior to 3.0.
  2124. case $host_os in
  2125. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2126. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2127. echo ' yes '
  2128. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  2129. :
  2130. else
  2131. can_build_shared=no
  2132. fi
  2133. ;;
  2134. esac
  2135. # AIX (on Power*) has no versioning support, so currently we can
  2136. # not hardcode correct soname into executable. Probably we can
  2137. # add versioning support to collect2, so additional links can
  2138. # be useful in future.
  2139. if test "$aix_use_runtimelinking" = yes; then
  2140. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2141. # instead of lib<name>.a to let people know that these are not
  2142. # typical AIX shared libraries.
  2143. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2144. else
  2145. # We preserve .a as extension for shared libraries through AIX4.2
  2146. # and later when we are not doing run time linking.
  2147. library_names_spec='${libname}${release}.a $libname.a'
  2148. soname_spec='${libname}${release}.so$major'
  2149. fi
  2150. shlibpath_var=LIBPATH
  2151. fi
  2152. hardcode_into_libs=yes
  2153. ;;
  2154. amigaos*)
  2155. library_names_spec='$libname.ixlibrary $libname.a'
  2156. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2157. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
  2158. ;;
  2159. beos*)
  2160. library_names_spec='${libname}.so'
  2161. dynamic_linker="$host_os ld.so"
  2162. shlibpath_var=LIBRARY_PATH
  2163. ;;
  2164. bsdi4*)
  2165. version_type=linux
  2166. need_version=no
  2167. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2168. soname_spec='${libname}${release}.so$major'
  2169. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2170. shlibpath_var=LD_LIBRARY_PATH
  2171. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2172. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2173. export_dynamic_flag_spec=-rdynamic
  2174. # the default ld.so.conf also contains /usr/contrib/lib and
  2175. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2176. # libtool to hard-code these into programs
  2177. ;;
  2178. cygwin* | mingw* | pw32*)
  2179. version_type=windows
  2180. need_version=no
  2181. need_lib_prefix=no
  2182. case $GCC,$host_os in
  2183. yes,cygwin*)
  2184. library_names_spec='$libname.dll.a'
  2185. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
  2186. postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
  2187. dldir=$destdir/`dirname \$dlpath`~
  2188. test -d \$dldir || mkdir -p \$dldir~
  2189. $install_prog .libs/$dlname \$dldir/$dlname'
  2190. postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2191. dlpath=$dir/\$dldll~
  2192. $rm \$dlpath'
  2193. ;;
  2194. yes,mingw*)
  2195. library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
  2196. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
  2197. ;;
  2198. yes,pw32*)
  2199. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
  2200. ;;
  2201. *)
  2202. library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
  2203. ;;
  2204. esac
  2205. dynamic_linker='Win32 ld.exe'
  2206. # FIXME: first we should search . and the directory the executable is in
  2207. shlibpath_var=PATH
  2208. ;;
  2209. darwin* | rhapsody*)
  2210. dynamic_linker="$host_os dyld"
  2211. version_type=darwin
  2212. need_lib_prefix=no
  2213. need_version=no
  2214. # FIXME: Relying on posixy $() will cause problems for
  2215. # cross-compilation, but unfortunately the echo tests do not
  2216. # yet detect zsh echo's removal of \ escapes.
  2217. library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
  2218. soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
  2219. shlibpath_overrides_runpath=yes
  2220. shlibpath_var=DYLD_LIBRARY_PATH
  2221. ;;
  2222. freebsd1*)
  2223. dynamic_linker=no
  2224. ;;
  2225. freebsd*)
  2226. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  2227. version_type=freebsd-$objformat
  2228. case $version_type in
  2229. freebsd-elf*)
  2230. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  2231. need_version=no
  2232. need_lib_prefix=no
  2233. ;;
  2234. freebsd-*)
  2235. library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
  2236. need_version=yes
  2237. ;;
  2238. esac
  2239. shlibpath_var=LD_LIBRARY_PATH
  2240. case $host_os in
  2241. freebsd2*)
  2242. shlibpath_overrides_runpath=yes
  2243. ;;
  2244. *)
  2245. shlibpath_overrides_runpath=no
  2246. hardcode_into_libs=yes
  2247. ;;
  2248. esac
  2249. ;;
  2250. gnu*)
  2251. version_type=linux
  2252. need_lib_prefix=no
  2253. need_version=no
  2254. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
  2255. soname_spec='${libname}${release}.so$major'
  2256. shlibpath_var=LD_LIBRARY_PATH
  2257. hardcode_into_libs=yes
  2258. ;;
  2259. hpux9* | hpux10* | hpux11*)
  2260. # Give a soname corresponding to the major version so that dld.sl refuses to
  2261. # link against other versions.
  2262. dynamic_linker="$host_os dld.sl"
  2263. version_type=sunos
  2264. need_lib_prefix=no
  2265. need_version=no
  2266. shlibpath_var=SHLIB_PATH
  2267. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2268. library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
  2269. soname_spec='${libname}${release}.sl$major'
  2270. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  2271. postinstall_cmds='chmod 555 $lib'
  2272. ;;
  2273. irix5* | irix6* | nonstopux*)
  2274. case $host_os in
  2275. nonstopux*) version_type=nonstopux ;;
  2276. *) version_type=irix ;;
  2277. esac
  2278. need_lib_prefix=no
  2279. need_version=no
  2280. soname_spec='${libname}${release}.so$major'
  2281. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
  2282. case $host_os in
  2283. irix5* | nonstopux*)
  2284. libsuff= shlibsuff=
  2285. ;;
  2286. *)
  2287. case $LD in # libtool.m4 will add one of these switches to LD
  2288. *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  2289. *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  2290. *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2291. *) libsuff= shlibsuff= libmagic=never-match;;
  2292. esac
  2293. ;;
  2294. esac
  2295. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2296. shlibpath_overrides_runpath=no
  2297. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2298. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2299. ;;
  2300. # No shared lib support for Linux oldld, aout, or coff.
  2301. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
  2302. dynamic_linker=no
  2303. ;;
  2304. # This must be Linux ELF.
  2305. linux-gnu*)
  2306. version_type=linux
  2307. need_lib_prefix=no
  2308. need_version=no
  2309. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2310. soname_spec='${libname}${release}.so$major'
  2311. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2312. shlibpath_var=LD_LIBRARY_PATH
  2313. shlibpath_overrides_runpath=no
  2314. # This implies no fast_install, which is unacceptable.
  2315. # Some rework will be needed to allow for fast_install
  2316. # before this can be enabled.
  2317. hardcode_into_libs=yes
  2318. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2319. # powerpc, because MkLinux only supported shared libraries with the
  2320. # GNU dynamic linker. Since this was broken with cross compilers,
  2321. # most powerpc-linux boxes support dynamic linking these days and
  2322. # people can always --disable-shared, the test was removed, and we
  2323. # assume the GNU/Linux dynamic linker is in use.
  2324. dynamic_linker='GNU/Linux ld.so'
  2325. ;;
  2326. netbsd*)
  2327. version_type=sunos
  2328. need_lib_prefix=no
  2329. need_version=no
  2330. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  2331. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  2332. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2333. dynamic_linker='NetBSD (a.out) ld.so'
  2334. else
  2335. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
  2336. soname_spec='${libname}${release}.so$major'
  2337. dynamic_linker='NetBSD ld.elf_so'
  2338. fi
  2339. shlibpath_var=LD_LIBRARY_PATH
  2340. shlibpath_overrides_runpath=yes
  2341. hardcode_into_libs=yes
  2342. ;;
  2343. newsos6)
  2344. version_type=linux
  2345. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2346. shlibpath_var=LD_LIBRARY_PATH
  2347. shlibpath_overrides_runpath=yes
  2348. ;;
  2349. openbsd*)
  2350. version_type=sunos
  2351. need_lib_prefix=no
  2352. need_version=no
  2353. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2354. case "$host_os" in
  2355. openbsd2.[[89]] | openbsd2.[[89]].*)
  2356. shlibpath_overrides_runpath=no
  2357. ;;
  2358. *)
  2359. shlibpath_overrides_runpath=yes
  2360. ;;
  2361. esac
  2362. else
  2363. shlibpath_overrides_runpath=yes
  2364. fi
  2365. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  2366. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2367. shlibpath_var=LD_LIBRARY_PATH
  2368. ;;
  2369. os2*)
  2370. libname_spec='$name'
  2371. need_lib_prefix=no
  2372. library_names_spec='$libname.dll $libname.a'
  2373. dynamic_linker='OS/2 ld.exe'
  2374. shlibpath_var=LIBPATH
  2375. ;;
  2376. osf3* | osf4* | osf5*)
  2377. version_type=osf
  2378. need_version=no
  2379. soname_spec='${libname}${release}.so$major'
  2380. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2381. shlibpath_var=LD_LIBRARY_PATH
  2382. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2383. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2384. hardcode_into_libs=yes
  2385. ;;
  2386. sco3.2v5*)
  2387. version_type=osf
  2388. soname_spec='${libname}${release}.so$major'
  2389. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2390. shlibpath_var=LD_LIBRARY_PATH
  2391. ;;
  2392. solaris*)
  2393. version_type=linux
  2394. need_lib_prefix=no
  2395. need_version=no
  2396. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2397. soname_spec='${libname}${release}.so$major'
  2398. shlibpath_var=LD_LIBRARY_PATH
  2399. shlibpath_overrides_runpath=yes
  2400. hardcode_into_libs=yes
  2401. # ldd complains unless libraries are executable
  2402. postinstall_cmds='chmod +x $lib'
  2403. ;;
  2404. sunos4*)
  2405. version_type=sunos
  2406. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  2407. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2408. shlibpath_var=LD_LIBRARY_PATH
  2409. shlibpath_overrides_runpath=yes
  2410. if test "$with_gnu_ld" = yes; then
  2411. need_lib_prefix=no
  2412. fi
  2413. need_version=yes
  2414. ;;
  2415. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  2416. version_type=linux
  2417. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2418. soname_spec='${libname}${release}.so$major'
  2419. shlibpath_var=LD_LIBRARY_PATH
  2420. case $host_vendor in
  2421. sni)
  2422. shlibpath_overrides_runpath=no
  2423. need_lib_prefix=no
  2424. export_dynamic_flag_spec='${wl}-Blargedynsym'
  2425. runpath_var=LD_RUN_PATH
  2426. ;;
  2427. siemens)
  2428. need_lib_prefix=no
  2429. ;;
  2430. motorola)
  2431. need_lib_prefix=no
  2432. need_version=no
  2433. shlibpath_overrides_runpath=no
  2434. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2435. ;;
  2436. esac
  2437. ;;
  2438. uts4*)
  2439. version_type=linux
  2440. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2441. soname_spec='${libname}${release}.so$major'
  2442. shlibpath_var=LD_LIBRARY_PATH
  2443. ;;
  2444. dgux*)
  2445. version_type=linux
  2446. need_lib_prefix=no
  2447. need_version=no
  2448. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2449. soname_spec='${libname}${release}.so$major'
  2450. shlibpath_var=LD_LIBRARY_PATH
  2451. ;;
  2452. sysv4*MP*)
  2453. if test -d /usr/nec ;then
  2454. version_type=linux
  2455. library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
  2456. soname_spec='$libname.so.$major'
  2457. shlibpath_var=LD_LIBRARY_PATH
  2458. fi
  2459. ;;
  2460. *)
  2461. dynamic_linker=no
  2462. ;;
  2463. esac
  2464. AC_MSG_RESULT([$dynamic_linker])
  2465. test "$dynamic_linker" = no && can_build_shared=no
  2466. # Report the final consequences.
  2467. AC_MSG_CHECKING([if libtool supports shared libraries])
  2468. AC_MSG_RESULT([$can_build_shared])
  2469. AC_MSG_CHECKING([whether to build shared libraries])
  2470. test "$can_build_shared" = "no" && enable_shared=no
  2471. # On AIX, shared libraries and static libraries use the same namespace, and
  2472. # are all built from PIC.
  2473. case "$host_os" in
  2474. aix3*)
  2475. test "$enable_shared" = yes && enable_static=no
  2476. if test -n "$RANLIB"; then
  2477. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  2478. postinstall_cmds='$RANLIB $lib'
  2479. fi
  2480. ;;
  2481. aix4*)
  2482. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  2483. test "$enable_shared" = yes && enable_static=no
  2484. fi
  2485. ;;
  2486. esac
  2487. AC_MSG_RESULT([$enable_shared])
  2488. AC_MSG_CHECKING([whether to build static libraries])
  2489. # Make sure either enable_shared or enable_static is yes.
  2490. test "$enable_shared" = yes || enable_static=yes
  2491. AC_MSG_RESULT([$enable_static])
  2492. if test "$hardcode_action" = relink; then
  2493. # Fast installation is not supported
  2494. enable_fast_install=no
  2495. elif test "$shlibpath_overrides_runpath" = yes ||
  2496. test "$enable_shared" = no; then
  2497. # Fast installation is not necessary
  2498. enable_fast_install=needless
  2499. fi
  2500. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2501. if test "$GCC" = yes; then
  2502. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2503. fi
  2504. AC_LIBTOOL_DLOPEN_SELF
  2505. if test "$enable_shared" = yes && test "$GCC" = yes; then
  2506. case $archive_cmds in
  2507. *'~'*)
  2508. # FIXME: we may have to deal with multi-command sequences.
  2509. ;;
  2510. '$CC '*)
  2511. # Test whether the compiler implicitly links with -lc since on some
  2512. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  2513. # to ld, don't add -lc before -lgcc.
  2514. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  2515. AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
  2516. [$rm conftest*
  2517. echo 'static int dummy;' > conftest.$ac_ext
  2518. if AC_TRY_EVAL(ac_compile); then
  2519. soname=conftest
  2520. lib=conftest
  2521. libobjs=conftest.$ac_objext
  2522. deplibs=
  2523. wl=$lt_cv_prog_cc_wl
  2524. compiler_flags=-v
  2525. linker_flags=-v
  2526. verstring=
  2527. output_objdir=.
  2528. libname=conftest
  2529. save_allow_undefined_flag=$allow_undefined_flag
  2530. allow_undefined_flag=
  2531. if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
  2532. then
  2533. lt_cv_archive_cmds_need_lc=no
  2534. else
  2535. lt_cv_archive_cmds_need_lc=yes
  2536. fi
  2537. allow_undefined_flag=$save_allow_undefined_flag
  2538. else
  2539. cat conftest.err 1>&5
  2540. fi])
  2541. AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
  2542. ;;
  2543. esac
  2544. fi
  2545. need_lc=${lt_cv_archive_cmds_need_lc-yes}
  2546. # The second clause should only fire when bootstrapping the
  2547. # libtool distribution, otherwise you forgot to ship ltmain.sh
  2548. # with your package, and you will get complaints that there are
  2549. # no rules to generate ltmain.sh.
  2550. if test -f "$ltmain"; then
  2551. :
  2552. else
  2553. # If there is no Makefile yet, we rely on a make rule to execute
  2554. # `config.status --recheck' to rerun these tests and create the
  2555. # libtool script then.
  2556. test -f Makefile && make "$ltmain"
  2557. fi
  2558. if test -f "$ltmain"; then
  2559. trap "$rm \"${ofile}T\"; exit 1" 1 2 15
  2560. $rm -f "${ofile}T"
  2561. echo creating $ofile
  2562. # Now quote all the things that may contain metacharacters while being
  2563. # careful not to overquote the AC_SUBSTed values. We take copies of the
  2564. # variables and quote the copies for generation of the libtool script.
  2565. for var in echo old_CC old_CFLAGS SED \
  2566. AR AR_FLAGS CC LD LN_S NM SHELL \
  2567. reload_flag reload_cmds wl \
  2568. pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
  2569. thread_safe_flag_spec whole_archive_flag_spec libname_spec \
  2570. library_names_spec soname_spec \
  2571. RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
  2572. old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
  2573. postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
  2574. old_striplib striplib file_magic_cmd export_symbols_cmds \
  2575. deplibs_check_method allow_undefined_flag no_undefined_flag \
  2576. finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
  2577. global_symbol_to_c_name_address \
  2578. hardcode_libdir_flag_spec hardcode_libdir_separator \
  2579. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  2580. compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
  2581. case $var in
  2582. reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
  2583. old_postinstall_cmds | old_postuninstall_cmds | \
  2584. export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
  2585. extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
  2586. postinstall_cmds | postuninstall_cmds | \
  2587. finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  2588. # Double-quote double-evaled strings.
  2589. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  2590. ;;
  2591. *)
  2592. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  2593. ;;
  2594. esac
  2595. done
  2596. cat <<__EOF__ > "${ofile}T"
  2597. #! $SHELL
  2598. # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  2599. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  2600. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  2601. #
  2602. # Copyright (C) 1996-2000 Free Software Foundation, Inc.
  2603. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  2604. #
  2605. # This program is free software; you can redistribute it and/or modify
  2606. # it under the terms of the GNU General Public License as published by
  2607. # the Free Software Foundation; either version 2 of the License, or
  2608. # (at your option) any later version.
  2609. #
  2610. # This program is distributed in the hope that it will be useful, but
  2611. # WITHOUT ANY WARRANTY; without even the implied warranty of
  2612. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2613. # General Public License for more details.
  2614. #
  2615. # You should have received a copy of the GNU General Public License
  2616. # along with this program; if not, write to the Free Software
  2617. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  2618. #
  2619. # As a special exception to the GNU General Public License, if you
  2620. # distribute this file as part of a program that contains a
  2621. # configuration script generated by Autoconf, you may include it under
  2622. # the same distribution terms that you use for the rest of that program.
  2623. # A sed that does not truncate output.
  2624. SED=$lt_SED
  2625. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  2626. Xsed="${SED} -e s/^X//"
  2627. # The HP-UX ksh and POSIX shell print the target directory to stdout
  2628. # if CDPATH is set.
  2629. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  2630. # ### BEGIN LIBTOOL CONFIG
  2631. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2632. # Shell to use when invoking shell scripts.
  2633. SHELL=$lt_SHELL
  2634. # Whether or not to build shared libraries.
  2635. build_libtool_libs=$enable_shared
  2636. # Whether or not to build static libraries.
  2637. build_old_libs=$enable_static
  2638. # Whether or not to add -lc for building shared libraries.
  2639. build_libtool_need_lc=$need_lc
  2640. # Whether or not to optimize for fast installation.
  2641. fast_install=$enable_fast_install
  2642. # The host system.
  2643. host_alias=$host_alias
  2644. host=$host
  2645. # An echo program that does not interpret backslashes.
  2646. echo=$lt_echo
  2647. # The archiver.
  2648. AR=$lt_AR
  2649. AR_FLAGS=$lt_AR_FLAGS
  2650. # The default C compiler.
  2651. CC=$lt_CC
  2652. # Is the compiler the GNU C compiler?
  2653. with_gcc=$GCC
  2654. # The linker used to build libraries.
  2655. LD=$lt_LD
  2656. # Whether we need hard or soft links.
  2657. LN_S=$lt_LN_S
  2658. # A BSD-compatible nm program.
  2659. NM=$lt_NM
  2660. # A symbol stripping program
  2661. STRIP=$STRIP
  2662. # Used to examine libraries when file_magic_cmd begins "file"
  2663. MAGIC_CMD=$MAGIC_CMD
  2664. # Used on cygwin: DLL creation program.
  2665. DLLTOOL="$DLLTOOL"
  2666. # Used on cygwin: object dumper.
  2667. OBJDUMP="$OBJDUMP"
  2668. # Used on cygwin: assembler.
  2669. AS="$AS"
  2670. # The name of the directory that contains temporary libtool files.
  2671. objdir=$objdir
  2672. # How to create reloadable object files.
  2673. reload_flag=$lt_reload_flag
  2674. reload_cmds=$lt_reload_cmds
  2675. # How to pass a linker flag through the compiler.
  2676. wl=$lt_wl
  2677. # Object file suffix (normally "o").
  2678. objext="$ac_objext"
  2679. # Old archive suffix (normally "a").
  2680. libext="$libext"
  2681. # Executable file suffix (normally "").
  2682. exeext="$exeext"
  2683. # Additional compiler flags for building library objects.
  2684. pic_flag=$lt_pic_flag
  2685. pic_mode=$pic_mode
  2686. # Does compiler simultaneously support -c and -o options?
  2687. compiler_c_o=$lt_compiler_c_o
  2688. # Can we write directly to a .lo ?
  2689. compiler_o_lo=$lt_compiler_o_lo
  2690. # Must we lock files when doing compilation ?
  2691. need_locks=$lt_need_locks
  2692. # Do we need the lib prefix for modules?
  2693. need_lib_prefix=$need_lib_prefix
  2694. # Do we need a version for libraries?
  2695. need_version=$need_version
  2696. # Whether dlopen is supported.
  2697. dlopen_support=$enable_dlopen
  2698. # Whether dlopen of programs is supported.
  2699. dlopen_self=$enable_dlopen_self
  2700. # Whether dlopen of statically linked programs is supported.
  2701. dlopen_self_static=$enable_dlopen_self_static
  2702. # Compiler flag to prevent dynamic linking.
  2703. link_static_flag=$lt_link_static_flag
  2704. # Compiler flag to turn off builtin functions.
  2705. no_builtin_flag=$lt_no_builtin_flag
  2706. # Compiler flag to allow reflexive dlopens.
  2707. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
  2708. # Compiler flag to generate shared objects directly from archives.
  2709. whole_archive_flag_spec=$lt_whole_archive_flag_spec
  2710. # Compiler flag to generate thread-safe objects.
  2711. thread_safe_flag_spec=$lt_thread_safe_flag_spec
  2712. # Library versioning type.
  2713. version_type=$version_type
  2714. # Format of library name prefix.
  2715. libname_spec=$lt_libname_spec
  2716. # List of archive names. First name is the real one, the rest are links.
  2717. # The last name is the one that the linker finds with -lNAME.
  2718. library_names_spec=$lt_library_names_spec
  2719. # The coded name of the library, if different from the real name.
  2720. soname_spec=$lt_soname_spec
  2721. # Commands used to build and install an old-style archive.
  2722. RANLIB=$lt_RANLIB
  2723. old_archive_cmds=$lt_old_archive_cmds
  2724. old_postinstall_cmds=$lt_old_postinstall_cmds
  2725. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  2726. # Create an old-style archive from a shared archive.
  2727. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
  2728. # Create a temporary old-style archive to link instead of a shared archive.
  2729. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
  2730. # Commands used to build and install a shared archive.
  2731. archive_cmds=$lt_archive_cmds
  2732. archive_expsym_cmds=$lt_archive_expsym_cmds
  2733. postinstall_cmds=$lt_postinstall_cmds
  2734. postuninstall_cmds=$lt_postuninstall_cmds
  2735. # Commands to strip libraries.
  2736. old_striplib=$lt_old_striplib
  2737. striplib=$lt_striplib
  2738. # Method to check whether dependent libraries are shared objects.
  2739. deplibs_check_method=$lt_deplibs_check_method
  2740. # Command to use when deplibs_check_method == file_magic.
  2741. file_magic_cmd=$lt_file_magic_cmd
  2742. # Flag that allows shared libraries with undefined symbols to be built.
  2743. allow_undefined_flag=$lt_allow_undefined_flag
  2744. # Flag that forces no undefined symbols.
  2745. no_undefined_flag=$lt_no_undefined_flag
  2746. # Commands used to finish a libtool library installation in a directory.
  2747. finish_cmds=$lt_finish_cmds
  2748. # Same as above, but a single script fragment to be evaled but not shown.
  2749. finish_eval=$lt_finish_eval
  2750. # Take the output of nm and produce a listing of raw symbols and C names.
  2751. global_symbol_pipe=$lt_global_symbol_pipe
  2752. # Transform the output of nm in a proper C declaration
  2753. global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
  2754. # Transform the output of nm in a C name address pair
  2755. global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
  2756. # This is the shared library runtime path variable.
  2757. runpath_var=$runpath_var
  2758. # This is the shared library path variable.
  2759. shlibpath_var=$shlibpath_var
  2760. # Is shlibpath searched before the hard-coded library search path?
  2761. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  2762. # How to hardcode a shared library path into an executable.
  2763. hardcode_action=$hardcode_action
  2764. # Whether we should hardcode library paths into libraries.
  2765. hardcode_into_libs=$hardcode_into_libs
  2766. # Flag to hardcode \$libdir into a binary during linking.
  2767. # This must work even if \$libdir does not exist.
  2768. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
  2769. # Whether we need a single -rpath flag with a separated argument.
  2770. hardcode_libdir_separator=$lt_hardcode_libdir_separator
  2771. # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
  2772. # resulting binary.
  2773. hardcode_direct=$hardcode_direct
  2774. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  2775. # resulting binary.
  2776. hardcode_minus_L=$hardcode_minus_L
  2777. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  2778. # the resulting binary.
  2779. hardcode_shlibpath_var=$hardcode_shlibpath_var
  2780. # Variables whose values should be saved in libtool wrapper scripts and
  2781. # restored at relink time.
  2782. variables_saved_for_relink="$variables_saved_for_relink"
  2783. # Whether libtool must link a program against all its dependency libraries.
  2784. link_all_deplibs=$link_all_deplibs
  2785. # Compile-time system search path for libraries
  2786. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  2787. # Run-time system search path for libraries
  2788. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  2789. # Fix the shell variable \$srcfile for the compiler.
  2790. fix_srcfile_path="$fix_srcfile_path"
  2791. # Set to yes if exported symbols are required.
  2792. always_export_symbols=$always_export_symbols
  2793. # The commands to list exported symbols.
  2794. export_symbols_cmds=$lt_export_symbols_cmds
  2795. # The commands to extract the exported symbol list from a shared archive.
  2796. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  2797. # Symbols that should not be listed in the preloaded symbols.
  2798. exclude_expsyms=$lt_exclude_expsyms
  2799. # Symbols that must always be exported.
  2800. include_expsyms=$lt_include_expsyms
  2801. # ### END LIBTOOL CONFIG
  2802. __EOF__
  2803. case $host_os in
  2804. aix3*)
  2805. cat <<\EOF >> "${ofile}T"
  2806. # AIX sometimes has problems with the GCC collect2 program. For some
  2807. # reason, if we set the COLLECT_NAMES environment variable, the problems
  2808. # vanish in a puff of smoke.
  2809. if test "X${COLLECT_NAMES+set}" != Xset; then
  2810. COLLECT_NAMES=
  2811. export COLLECT_NAMES
  2812. fi
  2813. EOF
  2814. ;;
  2815. esac
  2816. case $host_os in
  2817. cygwin* | mingw* | pw32* | os2*)
  2818. cat <<'EOF' >> "${ofile}T"
  2819. # This is a source program that is used to create dlls on Windows
  2820. # Don't remove nor modify the starting and closing comments
  2821. # /* ltdll.c starts here */
  2822. # #define WIN32_LEAN_AND_MEAN
  2823. # #include <windows.h>
  2824. # #undef WIN32_LEAN_AND_MEAN
  2825. # #include <stdio.h>
  2826. #
  2827. # #ifndef __CYGWIN__
  2828. # # ifdef __CYGWIN32__
  2829. # # define __CYGWIN__ __CYGWIN32__
  2830. # # endif
  2831. # #endif
  2832. #
  2833. # #ifdef __cplusplus
  2834. # extern "C" {
  2835. # #endif
  2836. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  2837. # #ifdef __cplusplus
  2838. # }
  2839. # #endif
  2840. #
  2841. # #ifdef __CYGWIN__
  2842. # #include <cygwin/cygwin_dll.h>
  2843. # DECLARE_CYGWIN_DLL( DllMain );
  2844. # #endif
  2845. # HINSTANCE __hDllInstance_base;
  2846. #
  2847. # BOOL APIENTRY
  2848. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  2849. # {
  2850. # __hDllInstance_base = hInst;
  2851. # return TRUE;
  2852. # }
  2853. # /* ltdll.c ends here */
  2854. # This is a source program that is used to create import libraries
  2855. # on Windows for dlls which lack them. Don't remove nor modify the
  2856. # starting and closing comments
  2857. # /* impgen.c starts here */
  2858. # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
  2859. #
  2860. # This file is part of GNU libtool.
  2861. #
  2862. # This program is free software; you can redistribute it and/or modify
  2863. # it under the terms of the GNU General Public License as published by
  2864. # the Free Software Foundation; either version 2 of the License, or
  2865. # (at your option) any later version.
  2866. #
  2867. # This program is distributed in the hope that it will be useful,
  2868. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  2869. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2870. # GNU General Public License for more details.
  2871. #
  2872. # You should have received a copy of the GNU General Public License
  2873. # along with this program; if not, write to the Free Software
  2874. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  2875. # */
  2876. #
  2877. # #include <stdio.h> /* for printf() */
  2878. # #include <unistd.h> /* for open(), lseek(), read() */
  2879. # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
  2880. # #include <string.h> /* for strdup() */
  2881. #
  2882. # /* O_BINARY isn't required (or even defined sometimes) under Unix */
  2883. # #ifndef O_BINARY
  2884. # #define O_BINARY 0
  2885. # #endif
  2886. #
  2887. # static unsigned int
  2888. # pe_get16 (fd, offset)
  2889. # int fd;
  2890. # int offset;
  2891. # {
  2892. # unsigned char b[2];
  2893. # lseek (fd, offset, SEEK_SET);
  2894. # read (fd, b, 2);
  2895. # return b[0] + (b[1]<<8);
  2896. # }
  2897. #
  2898. # static unsigned int
  2899. # pe_get32 (fd, offset)
  2900. # int fd;
  2901. # int offset;
  2902. # {
  2903. # unsigned char b[4];
  2904. # lseek (fd, offset, SEEK_SET);
  2905. # read (fd, b, 4);
  2906. # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
  2907. # }
  2908. #
  2909. # static unsigned int
  2910. # pe_as32 (ptr)
  2911. # void *ptr;
  2912. # {
  2913. # unsigned char *b = ptr;
  2914. # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
  2915. # }
  2916. #
  2917. # int
  2918. # main (argc, argv)
  2919. # int argc;
  2920. # char *argv[];
  2921. # {
  2922. # int dll;
  2923. # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
  2924. # unsigned long export_rva, export_size, nsections, secptr, expptr;
  2925. # unsigned long name_rvas, nexp;
  2926. # unsigned char *expdata, *erva;
  2927. # char *filename, *dll_name;
  2928. #
  2929. # filename = argv[1];
  2930. #
  2931. # dll = open(filename, O_RDONLY|O_BINARY);
  2932. # if (dll < 1)
  2933. # return 1;
  2934. #
  2935. # dll_name = filename;
  2936. #
  2937. # for (i=0; filename[i]; i++)
  2938. # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
  2939. # dll_name = filename + i +1;
  2940. #
  2941. # pe_header_offset = pe_get32 (dll, 0x3c);
  2942. # opthdr_ofs = pe_header_offset + 4 + 20;
  2943. # num_entries = pe_get32 (dll, opthdr_ofs + 92);
  2944. #
  2945. # if (num_entries < 1) /* no exports */
  2946. # return 1;
  2947. #
  2948. # export_rva = pe_get32 (dll, opthdr_ofs + 96);
  2949. # export_size = pe_get32 (dll, opthdr_ofs + 100);
  2950. # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
  2951. # secptr = (pe_header_offset + 4 + 20 +
  2952. # pe_get16 (dll, pe_header_offset + 4 + 16));
  2953. #
  2954. # expptr = 0;
  2955. # for (i = 0; i < nsections; i++)
  2956. # {
  2957. # char sname[8];
  2958. # unsigned long secptr1 = secptr + 40 * i;
  2959. # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
  2960. # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
  2961. # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
  2962. # lseek(dll, secptr1, SEEK_SET);
  2963. # read(dll, sname, 8);
  2964. # if (vaddr <= export_rva && vaddr+vsize > export_rva)
  2965. # {
  2966. # expptr = fptr + (export_rva - vaddr);
  2967. # if (export_rva + export_size > vaddr + vsize)
  2968. # export_size = vsize - (export_rva - vaddr);
  2969. # break;
  2970. # }
  2971. # }
  2972. #
  2973. # expdata = (unsigned char*)malloc(export_size);
  2974. # lseek (dll, expptr, SEEK_SET);
  2975. # read (dll, expdata, export_size);
  2976. # erva = expdata - export_rva;
  2977. #
  2978. # nexp = pe_as32 (expdata+24);
  2979. # name_rvas = pe_as32 (expdata+32);
  2980. #
  2981. # printf ("EXPORTS\n");
  2982. # for (i = 0; i<nexp; i++)
  2983. # {
  2984. # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
  2985. # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
  2986. # }
  2987. #
  2988. # return 0;
  2989. # }
  2990. # /* impgen.c ends here */
  2991. EOF
  2992. ;;
  2993. esac
  2994. # We use sed instead of cat because bash on DJGPP gets confused if
  2995. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  2996. # text mode, it properly converts lines to CR/LF. This bash problem
  2997. # is reportedly fixed, but why not run on old versions too?
  2998. sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
  2999. mv -f "${ofile}T" "$ofile" || \
  3000. (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
  3001. chmod +x "$ofile"
  3002. fi
  3003. ])# _LT_AC_LTCONFIG_HACK
  3004. # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
  3005. AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
  3006. # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
  3007. AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
  3008. # AC_ENABLE_SHARED - implement the --enable-shared flag
  3009. # Usage: AC_ENABLE_SHARED[(DEFAULT)]
  3010. # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
  3011. # `yes'.
  3012. AC_DEFUN([AC_ENABLE_SHARED],
  3013. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  3014. AC_ARG_ENABLE(shared,
  3015. changequote(<<, >>)dnl
  3016. << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
  3017. changequote([, ])dnl
  3018. [p=${PACKAGE-default}
  3019. case $enableval in
  3020. yes) enable_shared=yes ;;
  3021. no) enable_shared=no ;;
  3022. *)
  3023. enable_shared=no
  3024. # Look at the argument we got. We use all the common list separators.
  3025. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  3026. for pkg in $enableval; do
  3027. if test "X$pkg" = "X$p"; then
  3028. enable_shared=yes
  3029. fi
  3030. done
  3031. IFS="$ac_save_ifs"
  3032. ;;
  3033. esac],
  3034. enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
  3035. ])
  3036. # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
  3037. AC_DEFUN([AC_DISABLE_SHARED],
  3038. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3039. AC_ENABLE_SHARED(no)])
  3040. # AC_ENABLE_STATIC - implement the --enable-static flag
  3041. # Usage: AC_ENABLE_STATIC[(DEFAULT)]
  3042. # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
  3043. # `yes'.
  3044. AC_DEFUN([AC_ENABLE_STATIC],
  3045. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  3046. AC_ARG_ENABLE(static,
  3047. changequote(<<, >>)dnl
  3048. << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
  3049. changequote([, ])dnl
  3050. [p=${PACKAGE-default}
  3051. case $enableval in
  3052. yes) enable_static=yes ;;
  3053. no) enable_static=no ;;
  3054. *)
  3055. enable_static=no
  3056. # Look at the argument we got. We use all the common list separators.
  3057. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  3058. for pkg in $enableval; do
  3059. if test "X$pkg" = "X$p"; then
  3060. enable_static=yes
  3061. fi
  3062. done
  3063. IFS="$ac_save_ifs"
  3064. ;;
  3065. esac],
  3066. enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
  3067. ])
  3068. # AC_DISABLE_STATIC - set the default static flag to --disable-static
  3069. AC_DEFUN([AC_DISABLE_STATIC],
  3070. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3071. AC_ENABLE_STATIC(no)])
  3072. # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
  3073. # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
  3074. # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
  3075. # `yes'.
  3076. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  3077. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  3078. AC_ARG_ENABLE(fast-install,
  3079. changequote(<<, >>)dnl
  3080. << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
  3081. changequote([, ])dnl
  3082. [p=${PACKAGE-default}
  3083. case $enableval in
  3084. yes) enable_fast_install=yes ;;
  3085. no) enable_fast_install=no ;;
  3086. *)
  3087. enable_fast_install=no
  3088. # Look at the argument we got. We use all the common list separators.
  3089. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  3090. for pkg in $enableval; do
  3091. if test "X$pkg" = "X$p"; then
  3092. enable_fast_install=yes
  3093. fi
  3094. done
  3095. IFS="$ac_save_ifs"
  3096. ;;
  3097. esac],
  3098. enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
  3099. ])
  3100. # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
  3101. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  3102. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3103. AC_ENABLE_FAST_INSTALL(no)])
  3104. # AC_LIBTOOL_PICMODE - implement the --with-pic flag
  3105. # Usage: AC_LIBTOOL_PICMODE[(MODE)]
  3106. # Where MODE is either `yes' or `no'. If omitted, it defaults to
  3107. # `both'.
  3108. AC_DEFUN([AC_LIBTOOL_PICMODE],
  3109. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3110. pic_mode=ifelse($#,1,$1,default)])
  3111. # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
  3112. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  3113. [AC_MSG_CHECKING([for $1])
  3114. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  3115. [case $MAGIC_CMD in
  3116. /*)
  3117. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  3118. ;;
  3119. ?:/*)
  3120. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
  3121. ;;
  3122. *)
  3123. ac_save_MAGIC_CMD="$MAGIC_CMD"
  3124. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3125. dnl $ac_dummy forces splitting on constant user-supplied paths.
  3126. dnl POSIX.2 word splitting is done only on the output of word expansions,
  3127. dnl not every word. This closes a longstanding sh security hole.
  3128. ac_dummy="ifelse([$2], , $PATH, [$2])"
  3129. for ac_dir in $ac_dummy; do
  3130. test -z "$ac_dir" && ac_dir=.
  3131. if test -f $ac_dir/$1; then
  3132. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  3133. if test -n "$file_magic_test_file"; then
  3134. case $deplibs_check_method in
  3135. "file_magic "*)
  3136. file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
  3137. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3138. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  3139. egrep "$file_magic_regex" > /dev/null; then
  3140. :
  3141. else
  3142. cat <<EOF 1>&2
  3143. *** Warning: the command libtool uses to detect shared libraries,
  3144. *** $file_magic_cmd, produces output that libtool cannot recognize.
  3145. *** The result is that libtool may fail to recognize shared libraries
  3146. *** as such. This will affect the creation of libtool libraries that
  3147. *** depend on shared libraries, but programs linked with such libtool
  3148. *** libraries will work regardless of this problem. Nevertheless, you
  3149. *** may want to report the problem to your system manager and/or to
  3150. *** bug-libtool@gnu.org
  3151. EOF
  3152. fi ;;
  3153. esac
  3154. fi
  3155. break
  3156. fi
  3157. done
  3158. IFS="$ac_save_ifs"
  3159. MAGIC_CMD="$ac_save_MAGIC_CMD"
  3160. ;;
  3161. esac])
  3162. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3163. if test -n "$MAGIC_CMD"; then
  3164. AC_MSG_RESULT($MAGIC_CMD)
  3165. else
  3166. AC_MSG_RESULT(no)
  3167. fi
  3168. ])
  3169. # AC_PATH_MAGIC - find a file program which can recognise a shared library
  3170. AC_DEFUN([AC_PATH_MAGIC],
  3171. [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
  3172. AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
  3173. if test -z "$lt_cv_path_MAGIC_CMD"; then
  3174. if test -n "$ac_tool_prefix"; then
  3175. AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
  3176. else
  3177. MAGIC_CMD=:
  3178. fi
  3179. fi
  3180. ])
  3181. # AC_PROG_LD - find the path to the GNU or non-GNU linker
  3182. AC_DEFUN([AC_PROG_LD],
  3183. [AC_ARG_WITH(gnu-ld,
  3184. [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
  3185. test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
  3186. AC_REQUIRE([AC_PROG_CC])dnl
  3187. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3188. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  3189. AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
  3190. ac_prog=ld
  3191. if test "$GCC" = yes; then
  3192. # Check if gcc -print-prog-name=ld gives a path.
  3193. AC_MSG_CHECKING([for ld used by GCC])
  3194. case $host in
  3195. *-*-mingw*)
  3196. # gcc leaves a trailing carriage return which upsets mingw
  3197. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  3198. *)
  3199. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  3200. esac
  3201. case $ac_prog in
  3202. # Accept absolute paths.
  3203. [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
  3204. re_direlt='/[[^/]][[^/]]*/\.\./'
  3205. # Canonicalize the path of ld
  3206. ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
  3207. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  3208. ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
  3209. done
  3210. test -z "$LD" && LD="$ac_prog"
  3211. ;;
  3212. "")
  3213. # If it fails, then pretend we aren't using GCC.
  3214. ac_prog=ld
  3215. ;;
  3216. *)
  3217. # If it is relative, then search for the first ld in PATH.
  3218. with_gnu_ld=unknown
  3219. ;;
  3220. esac
  3221. elif test "$with_gnu_ld" = yes; then
  3222. AC_MSG_CHECKING([for GNU ld])
  3223. else
  3224. AC_MSG_CHECKING([for non-GNU ld])
  3225. fi
  3226. AC_CACHE_VAL(lt_cv_path_LD,
  3227. [if test -z "$LD"; then
  3228. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3229. for ac_dir in $PATH; do
  3230. test -z "$ac_dir" && ac_dir=.
  3231. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  3232. lt_cv_path_LD="$ac_dir/$ac_prog"
  3233. # Check to see if the program is GNU ld. I'd rather use --version,
  3234. # but apparently some GNU ld's only accept -v.
  3235. # Break only if it was the GNU/non-GNU ld that we prefer.
  3236. if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
  3237. test "$with_gnu_ld" != no && break
  3238. else
  3239. test "$with_gnu_ld" != yes && break
  3240. fi
  3241. fi
  3242. done
  3243. IFS="$ac_save_ifs"
  3244. else
  3245. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  3246. fi])
  3247. LD="$lt_cv_path_LD"
  3248. if test -n "$LD"; then
  3249. AC_MSG_RESULT($LD)
  3250. else
  3251. AC_MSG_RESULT(no)
  3252. fi
  3253. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3254. AC_PROG_LD_GNU
  3255. ])
  3256. # AC_PROG_LD_GNU -
  3257. AC_DEFUN([AC_PROG_LD_GNU],
  3258. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3259. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  3260. if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  3261. lt_cv_prog_gnu_ld=yes
  3262. else
  3263. lt_cv_prog_gnu_ld=no
  3264. fi])
  3265. with_gnu_ld=$lt_cv_prog_gnu_ld
  3266. ])
  3267. # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
  3268. # -- PORTME Some linkers may need a different reload flag.
  3269. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
  3270. [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
  3271. [lt_cv_ld_reload_flag='-r'])
  3272. reload_flag=$lt_cv_ld_reload_flag
  3273. test -n "$reload_flag" && reload_flag=" $reload_flag"
  3274. ])
  3275. # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
  3276. # -- PORTME fill in with the dynamic library characteristics
  3277. AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
  3278. [AC_CACHE_CHECK([how to recognise dependent libraries],
  3279. lt_cv_deplibs_check_method,
  3280. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3281. lt_cv_file_magic_test_file=
  3282. lt_cv_deplibs_check_method='unknown'
  3283. # Need to set the preceding variable on all platforms that support
  3284. # interlibrary dependencies.
  3285. # 'none' -- dependencies not supported.
  3286. # `unknown' -- same as none, but documents that we really don't know.
  3287. # 'pass_all' -- all dependencies passed with no checks.
  3288. # 'test_compile' -- check by making test program.
  3289. # 'file_magic [[regex]]' -- check by looking for files in library path
  3290. # which responds to the $file_magic_cmd with a given egrep regex.
  3291. # If you have `file' or equivalent on your system and you're not sure
  3292. # whether `pass_all' will *always* work, you probably want this one.
  3293. case $host_os in
  3294. aix4* | aix5*)
  3295. lt_cv_deplibs_check_method=pass_all
  3296. ;;
  3297. beos*)
  3298. lt_cv_deplibs_check_method=pass_all
  3299. ;;
  3300. bsdi4*)
  3301. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3302. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3303. lt_cv_file_magic_test_file=/shlib/libc.so
  3304. ;;
  3305. cygwin* | mingw* | pw32*)
  3306. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  3307. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3308. ;;
  3309. darwin* | rhapsody*)
  3310. lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
  3311. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3312. case "$host_os" in
  3313. rhapsody* | darwin1.[[012]])
  3314. lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
  3315. ;;
  3316. *) # Darwin 1.3 on
  3317. lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
  3318. ;;
  3319. esac
  3320. ;;
  3321. freebsd*)
  3322. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  3323. case $host_cpu in
  3324. i*86 )
  3325. # Not sure whether the presence of OpenBSD here was a mistake.
  3326. # Let's accept both of them until this is cleared up.
  3327. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
  3328. lt_cv_file_magic_cmd=/usr/bin/file
  3329. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3330. ;;
  3331. esac
  3332. else
  3333. lt_cv_deplibs_check_method=pass_all
  3334. fi
  3335. ;;
  3336. gnu*)
  3337. lt_cv_deplibs_check_method=pass_all
  3338. ;;
  3339. hpux10.20*|hpux11*)
  3340. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  3341. lt_cv_file_magic_cmd=/usr/bin/file
  3342. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3343. ;;
  3344. irix5* | irix6* | nonstopux*)
  3345. case $host_os in
  3346. irix5* | nonstopux*)
  3347. # this will be overridden with pass_all, but let us keep it just in case
  3348. lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
  3349. ;;
  3350. *)
  3351. case $LD in
  3352. *-32|*"-32 ") libmagic=32-bit;;
  3353. *-n32|*"-n32 ") libmagic=N32;;
  3354. *-64|*"-64 ") libmagic=64-bit;;
  3355. *) libmagic=never-match;;
  3356. esac
  3357. # this will be overridden with pass_all, but let us keep it just in case
  3358. lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
  3359. ;;
  3360. esac
  3361. lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
  3362. lt_cv_deplibs_check_method=pass_all
  3363. ;;
  3364. # This must be Linux ELF.
  3365. linux-gnu*)
  3366. case $host_cpu in
  3367. alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
  3368. lt_cv_deplibs_check_method=pass_all ;;
  3369. *)
  3370. # glibc up to 2.1.1 does not perform some relocations on ARM
  3371. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
  3372. esac
  3373. lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  3374. ;;
  3375. netbsd*)
  3376. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  3377. lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
  3378. else
  3379. lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
  3380. fi
  3381. ;;
  3382. newos6*)
  3383. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3384. lt_cv_file_magic_cmd=/usr/bin/file
  3385. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3386. ;;
  3387. openbsd*)
  3388. lt_cv_file_magic_cmd=/usr/bin/file
  3389. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3390. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3391. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
  3392. else
  3393. lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
  3394. fi
  3395. ;;
  3396. osf3* | osf4* | osf5*)
  3397. # this will be overridden with pass_all, but let us keep it just in case
  3398. lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
  3399. lt_cv_file_magic_test_file=/shlib/libc.so
  3400. lt_cv_deplibs_check_method=pass_all
  3401. ;;
  3402. sco3.2v5*)
  3403. lt_cv_deplibs_check_method=pass_all
  3404. ;;
  3405. solaris*)
  3406. lt_cv_deplibs_check_method=pass_all
  3407. lt_cv_file_magic_test_file=/lib/libc.so
  3408. ;;
  3409. sysv5uw[[78]]* | sysv4*uw2*)
  3410. lt_cv_deplibs_check_method=pass_all
  3411. ;;
  3412. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  3413. case $host_vendor in
  3414. motorola)
  3415. 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]]'
  3416. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3417. ;;
  3418. ncr)
  3419. lt_cv_deplibs_check_method=pass_all
  3420. ;;
  3421. sequent)
  3422. lt_cv_file_magic_cmd='/bin/file'
  3423. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3424. ;;
  3425. sni)
  3426. lt_cv_file_magic_cmd='/bin/file'
  3427. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3428. lt_cv_file_magic_test_file=/lib/libc.so
  3429. ;;
  3430. siemens)
  3431. lt_cv_deplibs_check_method=pass_all
  3432. ;;
  3433. esac
  3434. ;;
  3435. esac
  3436. ])
  3437. file_magic_cmd=$lt_cv_file_magic_cmd
  3438. deplibs_check_method=$lt_cv_deplibs_check_method
  3439. ])
  3440. # AC_PROG_NM - find the path to a BSD-compatible name lister
  3441. AC_DEFUN([AC_PROG_NM],
  3442. [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
  3443. AC_MSG_CHECKING([for BSD-compatible nm])
  3444. AC_CACHE_VAL(lt_cv_path_NM,
  3445. [if test -n "$NM"; then
  3446. # Let the user override the test.
  3447. lt_cv_path_NM="$NM"
  3448. else
  3449. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3450. for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
  3451. test -z "$ac_dir" && ac_dir=.
  3452. tmp_nm=$ac_dir/${ac_tool_prefix}nm
  3453. if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
  3454. # Check to see if the nm accepts a BSD-compat flag.
  3455. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3456. # nm: unknown option "B" ignored
  3457. # Tru64's nm complains that /dev/null is an invalid object file
  3458. if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
  3459. lt_cv_path_NM="$tmp_nm -B"
  3460. break
  3461. elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  3462. lt_cv_path_NM="$tmp_nm -p"
  3463. break
  3464. else
  3465. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3466. continue # so that we can try to find one that supports BSD flags
  3467. fi
  3468. fi
  3469. done
  3470. IFS="$ac_save_ifs"
  3471. test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  3472. fi])
  3473. NM="$lt_cv_path_NM"
  3474. AC_MSG_RESULT([$NM])
  3475. ])
  3476. # AC_CHECK_LIBM - check for math library
  3477. AC_DEFUN([AC_CHECK_LIBM],
  3478. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3479. LIBM=
  3480. case $host in
  3481. *-*-beos* | *-*-cygwin* | *-*-pw32*)
  3482. # These system don't have libm
  3483. ;;
  3484. *-ncr-sysv4.3*)
  3485. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3486. AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
  3487. ;;
  3488. *)
  3489. AC_CHECK_LIB(m, main, LIBM="-lm")
  3490. ;;
  3491. esac
  3492. ])
  3493. # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
  3494. # the libltdl convenience library and LTDLINCL to the include flags for
  3495. # the libltdl header and adds --enable-ltdl-convenience to the
  3496. # configure arguments. Note that LIBLTDL and LTDLINCL are not
  3497. # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
  3498. # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
  3499. # with '${top_builddir}/' and LTDLINCL will be prefixed with
  3500. # '${top_srcdir}/' (note the single quotes!). If your package is not
  3501. # flat and you're not using automake, define top_builddir and
  3502. # top_srcdir appropriately in the Makefiles.
  3503. AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  3504. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3505. case $enable_ltdl_convenience in
  3506. no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  3507. "") enable_ltdl_convenience=yes
  3508. ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  3509. esac
  3510. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
  3511. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  3512. # For backwards non-gettext consistent compatibility...
  3513. INCLTDL="$LTDLINCL"
  3514. ])
  3515. # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
  3516. # the libltdl installable library and LTDLINCL to the include flags for
  3517. # the libltdl header and adds --enable-ltdl-install to the configure
  3518. # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
  3519. # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
  3520. # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
  3521. # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
  3522. # with '${top_srcdir}/' (note the single quotes!). If your package is
  3523. # not flat and you're not using automake, define top_builddir and
  3524. # top_srcdir appropriately in the Makefiles.
  3525. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  3526. AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  3527. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3528. AC_CHECK_LIB(ltdl, main,
  3529. [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  3530. [if test x"$enable_ltdl_install" = xno; then
  3531. AC_MSG_WARN([libltdl not installed, but installation disabled])
  3532. else
  3533. enable_ltdl_install=yes
  3534. fi
  3535. ])
  3536. if test x"$enable_ltdl_install" = x"yes"; then
  3537. ac_configure_args="$ac_configure_args --enable-ltdl-install"
  3538. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
  3539. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  3540. else
  3541. ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  3542. LIBLTDL="-lltdl"
  3543. LTDLINCL=
  3544. fi
  3545. # For backwards non-gettext consistent compatibility...
  3546. INCLTDL="$LTDLINCL"
  3547. ])
  3548. # old names
  3549. AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
  3550. AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  3551. AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  3552. AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  3553. AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  3554. AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
  3555. AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
  3556. # This is just to silence aclocal about the macro not being used
  3557. ifelse([AC_DISABLE_FAST_INSTALL])
  3558. # NOTE: This macro has been submitted for inclusion into #
  3559. # GNU Autoconf as AC_PROG_SED. When it is available in #
  3560. # a released version of Autoconf we should remove this #
  3561. # macro and use it instead. #
  3562. # LT_AC_PROG_SED
  3563. # --------------
  3564. # Check for a fully-functional sed program, that truncates
  3565. # as few characters as possible. Prefer GNU sed if found.
  3566. AC_DEFUN([LT_AC_PROG_SED],
  3567. [AC_MSG_CHECKING([for a sed that does not truncate output])
  3568. AC_CACHE_VAL(lt_cv_path_SED,
  3569. [# Loop through the user's path and test for sed and gsed.
  3570. # Then use that list of sed's as ones to test for truncation.
  3571. as_executable_p="test -f"
  3572. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3573. for as_dir in $PATH
  3574. do
  3575. IFS=$as_save_IFS
  3576. test -z "$as_dir" && as_dir=.
  3577. for ac_prog in sed gsed; do
  3578. for ac_exec_ext in '' $ac_executable_extensions; do
  3579. if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
  3580. _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
  3581. fi
  3582. done
  3583. done
  3584. done
  3585. # Create a temporary directory, and hook for its removal unless debugging.
  3586. $debug ||
  3587. {
  3588. trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
  3589. trap '{ (exit 1); exit 1; }' 1 2 13 15
  3590. }
  3591. # Create a (secure) tmp directory for tmp files.
  3592. : ${TMPDIR=/tmp}
  3593. {
  3594. tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
  3595. test -n "$tmp" && test -d "$tmp"
  3596. } ||
  3597. {
  3598. tmp=$TMPDIR/sed$$-$RANDOM
  3599. (umask 077 && mkdir $tmp)
  3600. } ||
  3601. {
  3602. echo "$me: cannot create a temporary directory in $TMPDIR" >&2
  3603. { (exit 1); exit 1; }
  3604. }
  3605. _max=0
  3606. _count=0
  3607. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  3608. # along with /bin/sed that truncates output.
  3609. for _sed in $_sed_list /usr/xpg4/bin/sed; do
  3610. test ! -f ${_sed} && break
  3611. cat /dev/null > "$tmp/sed.in"
  3612. _count=0
  3613. echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
  3614. # Check for GNU sed and select it if it is found.
  3615. if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
  3616. lt_cv_path_SED=${_sed}
  3617. break
  3618. fi
  3619. while true; do
  3620. cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
  3621. mv "$tmp/sed.tmp" "$tmp/sed.in"
  3622. cp "$tmp/sed.in" "$tmp/sed.nl"
  3623. echo >>"$tmp/sed.nl"
  3624. ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
  3625. cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
  3626. # 40000 chars as input seems more than enough
  3627. test $_count -gt 10 && break
  3628. _count=`expr $_count + 1`
  3629. if test $_count -gt $_max; then
  3630. _max=$_count
  3631. lt_cv_path_SED=$_sed
  3632. fi
  3633. done
  3634. done
  3635. rm -rf "$tmp"
  3636. ])
  3637. if test "X$SED" != "X"; then
  3638. lt_cv_path_SED=$SED
  3639. else
  3640. SED=$lt_cv_path_SED
  3641. fi
  3642. AC_MSG_RESULT([$SED])
  3643. ])
  3644. dnl -*- Autoconf -*-
  3645. dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
  3646. dnl This file is free software, distributed under the terms of the GNU
  3647. dnl General Public License. As a special exception to the GNU General
  3648. dnl Public License, this file may be distributed as part of a program
  3649. dnl that contains a configuration script generated by Autoconf, under
  3650. dnl the same distribution terms as the rest of that program.
  3651. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  3652. AC_PREREQ(2.57)
  3653. AC_DEFUN([CL_LONGLONG],
  3654. [AC_CACHE_CHECK(for long long type, cl_cv_c_longlong, [
  3655. AC_TRY_RUN([int main()
  3656. {
  3657. /* long longs don't work right with gcc-2.7.2 on m68k */
  3658. /* long longs don't work right with gcc-2.7.2 on rs6000: avcall/tests.c gets
  3659. miscompiled. */
  3660. #if defined(__m68k__) || (defined(_IBMR2) || defined(__powerpc))
  3661. #if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)
  3662. exit(1);
  3663. #endif
  3664. #endif
  3665. { long x = 944938507; long y = 737962842; long z = 162359677;
  3666. exit(!(((long long) x)*((long long) y)>>32 == z));
  3667. }
  3668. }],
  3669. cl_cv_c_longlong=yes, cl_cv_c_longlong=no,
  3670. dnl When cross-compiling, don't assume anything.
  3671. cl_cv_c_longlong="guessing no")
  3672. ])
  3673. case "$cl_cv_c_longlong" in
  3674. *yes) AC_DEFINE(HAVE_LONGLONG,,[compiler supports the `long long' type]) ;;
  3675. *no) ;;
  3676. esac
  3677. ])
  3678. dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
  3679. dnl This file is free software, distributed under the terms of the GNU
  3680. dnl General Public License. As a special exception to the GNU General
  3681. dnl Public License, this file may be distributed as part of a program
  3682. dnl that contains a configuration script generated by Autoconf, under
  3683. dnl the same distribution terms as the rest of that program.
  3684. dnl From Bruno Haible, Marcus Daniels.
  3685. AC_PREREQ(2.13)
  3686. AC_DEFUN([CL_LONGDOUBLE],
  3687. [AC_CACHE_CHECK(for long double type, cl_cv_c_longdouble, [
  3688. AC_TRY_RUN([int main()
  3689. { long double x = 2.7182818284590452354L; x = x*x; exit (x==0.0L); }],
  3690. cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no,
  3691. dnl When cross-compiling, don't assume anything.
  3692. cl_cv_c_longdouble="guessing no")
  3693. ])
  3694. case "$cl_cv_c_longdouble" in
  3695. *yes) AC_DEFINE(HAVE_LONGDOUBLE) ;;
  3696. *no) ;;
  3697. esac
  3698. ])
  3699. dnl -*- Autoconf -*-
  3700. dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
  3701. dnl This file is free software, distributed under the terms of the GNU
  3702. dnl General Public License. As a special exception to the GNU General
  3703. dnl Public License, this file may be distributed as part of a program
  3704. dnl that contains a configuration script generated by Autoconf, under
  3705. dnl the same distribution terms as the rest of that program.
  3706. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  3707. AC_PREREQ(2.57)
  3708. AC_DEFUN([CL_ALLOCA],
  3709. [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  3710. # for constant arguments. Useless!
  3711. CL_LINK_CHECK(working alloca.h, cl_cv_header_alloca_h,
  3712. [#include <alloca.h>], [char *p = (char *) alloca(2 * sizeof(int));],
  3713. AC_DEFINE(HAVE_ALLOCA_H,,[have <alloca.h> and it should be used (not Ultrix)]))
  3714. decl="#ifdef __GNUC__
  3715. #define alloca __builtin_alloca
  3716. #else
  3717. #ifdef _MSC_VER
  3718. #include <malloc.h>
  3719. #define alloca _alloca
  3720. #else
  3721. #ifdef HAVE_ALLOCA_H
  3722. #include <alloca.h>
  3723. #else
  3724. #ifdef _AIX
  3725. #pragma alloca
  3726. #else
  3727. #ifndef alloca
  3728. char *alloca ();
  3729. #endif
  3730. #endif
  3731. #endif
  3732. #endif
  3733. #endif
  3734. "
  3735. CL_LINK_CHECK([alloca], cl_cv_func_alloca,
  3736. $decl, [char *p = (char *) alloca(1);],
  3737. , [alloca_missing=1])dnl
  3738. if test -n "$alloca_missing"; then
  3739. # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  3740. # that cause trouble. Some versions do not even contain alloca or
  3741. # contain a buggy version. If you still want to use their alloca,
  3742. # use ar to extract alloca.o from them instead of compiling alloca.c.
  3743. ALLOCA=alloca.${ac_objext}
  3744. AC_DEFINE(NO_ALLOCA,,[need to link with an external alloca.o when using alloca()])
  3745. fi
  3746. AC_SUBST(ALLOCA)dnl
  3747. ])
  3748. dnl -*- Autoconf -*-
  3749. dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
  3750. dnl This file is free software, distributed under the terms of the GNU
  3751. dnl General Public License. As a special exception to the GNU General
  3752. dnl Public License, this file may be distributed as part of a program
  3753. dnl that contains a configuration script generated by Autoconf, under
  3754. dnl the same distribution terms as the rest of that program.
  3755. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  3756. AC_PREREQ(2.57)
  3757. AC_DEFUN([CL_FPU_CONTROL],
  3758. [dnl Check for Linux with <fpu_control.h> and fpu_control_t or __setfpucw().
  3759. dnl glibc versions since October 1998 define fpu_control_t. Earlier versions
  3760. dnl define and declare __setfpucw(). Very early Linux libc versions have none,
  3761. dnl and __fpu_control is of type `unsigned short'.
  3762. CL_COMPILE_CHECK([fpu_control_t], cl_cv_type_fpu_control_t,
  3763. [#include <fpu_control.h>], [fpu_control_t x;],
  3764. AC_DEFINE(HAVE_FPU_CONTROL_T,,[have <fpu_control.h> and it defines the fpu_control_t type]))
  3765. CL_COMPILE_CHECK([__setfpucw], cl_cv_func_setfpucw,
  3766. [#include <fpu_control.h>], [__setfpucw(_FPU_IEEE);],
  3767. AC_DEFINE(HAVE_SETFPUCW,,[have <fpu_control.h> and it declares the __setfpucw() function]))
  3768. ])
  3769. dnl -*- Autoconf -*-
  3770. dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
  3771. dnl This file is free software, distributed under the terms of the GNU
  3772. dnl General Public License. As a special exception to the GNU General
  3773. dnl Public License, this file may be distributed as part of a program
  3774. dnl that contains a configuration script generated by Autoconf, under
  3775. dnl the same distribution terms as the rest of that program.
  3776. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  3777. AC_PREREQ(2.57)
  3778. AC_DEFUN([CL_GETTIMEOFDAY],
  3779. [AC_BEFORE([$0], [CL_TIMES_CLOCK])
  3780. AC_CHECK_FUNCS(gettimeofday)dnl
  3781. if test $ac_cv_func_gettimeofday = yes; then
  3782. dnl HAVE_GETTIMEOFDAY is defined
  3783. CL_PROTO([gettimeofday], [
  3784. CL_PROTO_TRY([
  3785. #include <sys/types.h>
  3786. #include <sys/time.h>
  3787. ], [int gettimeofday (struct timeval * tp, struct timezone * tzp);],
  3788. [int gettimeofday();],
  3789. cl_cv_proto_gettimeofday_dots=no
  3790. cl_cv_proto_gettimeofday_arg2="struct timezone *",
  3791. CL_PROTO_TRY([
  3792. #include <sys/types.h>
  3793. #include <sys/time.h>
  3794. ], [int gettimeofday (struct timeval * tp, void * tzp);],
  3795. [int gettimeofday();],
  3796. cl_cv_proto_gettimeofday_dots=no
  3797. cl_cv_proto_gettimeofday_arg2="void *",
  3798. cl_cv_proto_gettimeofday_dots=yes
  3799. cl_cv_proto_gettimeofday_arg2="..."))
  3800. ], [extern int gettimeofday (struct timeval *, $cl_cv_proto_gettimeofday_arg2);])
  3801. if test $cl_cv_proto_gettimeofday_dots = yes; then
  3802. AC_DEFINE(GETTIMEOFDAY_DOTS,,[declaration of gettimeofday() needs dots])
  3803. else
  3804. AC_DEFINE_UNQUOTED(GETTIMEOFDAY_TZP_T,$cl_cv_proto_gettimeofday_arg2,[type of `tzp' in gettimeofday() declaration])
  3805. fi
  3806. fi
  3807. ])
  3808. dnl -*- Autoconf -*-
  3809. dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
  3810. dnl This file is free software, distributed under the terms of the GNU
  3811. dnl General Public License. As a special exception to the GNU General
  3812. dnl Public License, this file may be distributed as part of a program
  3813. dnl that contains a configuration script generated by Autoconf, under
  3814. dnl the same distribution terms as the rest of that program.
  3815. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  3816. AC_PREREQ(2.57)
  3817. AC_DEFUN([CL_TIMES_CLOCK],
  3818. [AC_REQUIRE([CL_GETTIMEOFDAY])dnl
  3819. if test $ac_cv_func_gettimeofday = no -a $ac_cv_func_ftime = no; then
  3820. AC_CHECK_FUNC(times, , no_times=1)dnl
  3821. if test -z "$no_times"; then
  3822. AC_CACHE_CHECK(for times return value, cl_cv_func_times_return, [
  3823. AC_TRY_RUN([
  3824. #include <sys/types.h>
  3825. #include <time.h> /* needed for CLK_TCK */
  3826. #ifndef CLK_TCK
  3827. #include <sys/time.h> /* needed for CLK_TCK on SYSV PTX */
  3828. #endif
  3829. #include <sys/times.h>
  3830. int main ()
  3831. { struct tms buffer;
  3832. clock_t result1;
  3833. clock_t result2;
  3834. int ticks;
  3835. result1 = times(&buffer);
  3836. if ((result1 == (clock_t)0) || (result1 == (clock_t)(-1))) exit(1);
  3837. sleep(1);
  3838. result2 = times(&buffer);
  3839. if ((result2 == (clock_t)0) || (result2 == (clock_t)(-1))) exit(1);
  3840. ticks = result2 - result1;
  3841. exit(!((ticks >= CLK_TCK/2) && (ticks <= 3*CLK_TCK/2)));
  3842. }], cl_cv_func_times_return=yes, cl_cv_func_times_return=no,
  3843. dnl When cross-compiling, don't assume anything.
  3844. cl_cv_func_times_return="guessing no")
  3845. ])
  3846. case "$cl_cv_func_times_return" in
  3847. *yes) AC_DEFINE(HAVE_TIMES_CLOCK,,[have the times() function and it returns the real time, but do not have the gettimeofday() or ftime() function]) ;;
  3848. *no) ;;
  3849. esac
  3850. fi
  3851. fi
  3852. ])
  3853. dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
  3854. dnl This file is free software, distributed under the terms of the GNU
  3855. dnl General Public License. As a special exception to the GNU General
  3856. dnl Public License, this file may be distributed as part of a program
  3857. dnl that contains a configuration script generated by Autoconf, under
  3858. dnl the same distribution terms as the rest of that program.
  3859. dnl From Bruno Haible, Marcus Daniels.
  3860. AC_PREREQ(2.13)
  3861. dnl CL_PROTO(IDENTIFIER, ACTION-IF-NOT-FOUND, FINAL-PROTOTYPE)
  3862. AC_DEFUN([CL_PROTO],
  3863. [AC_MSG_CHECKING([for $1 declaration])
  3864. AC_CACHE_VAL(cl_cv_proto_[$1], [$2
  3865. cl_cv_proto_$1="$3"])
  3866. cl_cv_proto_$1=`echo "[$]cl_cv_proto_$1" | tr -s ' ' | sed -e 's/( /(/'`
  3867. AC_MSG_RESULT([$]{ac_t:-
  3868. }[$]cl_cv_proto_$1)
  3869. ])
  3870. dnl CL_PROTO_RET(INCLUDES, ANSI-DECL, TRAD-DECL, CACHE-ID, TYPE-IF-OK, TYPE-IF-FAILS)
  3871. AC_DEFUN([CL_PROTO_RET],
  3872. [AC_TRY_COMPILE([$1]
  3873. AC_LANG_EXTERN
  3874. [#if defined(__STDC__) || defined(__cplusplus)
  3875. $2
  3876. #else
  3877. $3
  3878. #endif
  3879. ], [], $4="$5", $4="$6")
  3880. ])
  3881. dnl CL_PROTO_TRY(INCLUDES, ANSI-DECL, TRAD-DECL, ACTION-IF-OK, ACTION-IF-FAILS)
  3882. AC_DEFUN([CL_PROTO_TRY],
  3883. [AC_TRY_COMPILE([$1]
  3884. AC_LANG_EXTERN
  3885. [#if defined(__STDC__) || defined(__cplusplus)
  3886. $2
  3887. #else
  3888. $3
  3889. #endif
  3890. ], [], [$4], [$5])
  3891. ])
  3892. dnl CL_PROTO_CONST(INCLUDES, ANSI-DECL, TRAD-DECL, CACHE-ID)
  3893. AC_DEFUN([CL_PROTO_CONST],
  3894. [CL_PROTO_TRY([$1], [$2], [$3], $4="", $4="const")]
  3895. )
  3896. dnl -*- Autoconf -*-
  3897. dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
  3898. dnl This file is free software, distributed under the terms of the GNU
  3899. dnl General Public License. As a special exception to the GNU General
  3900. dnl Public License, this file may be distributed as part of a program
  3901. dnl that contains a configuration script generated by Autoconf, under
  3902. dnl the same distribution terms as the rest of that program.
  3903. dnl From Bruno Haible, Marcus Daniels, Sam Steingold, Peter Burwood, Sam Steingold.
  3904. AC_PREREQ(2.57)
  3905. AC_DEFUN([CL_RUSAGE],
  3906. [AC_CHECK_HEADERS(sys/resource.h sys/times.h)dnl
  3907. if test $ac_cv_header_sys_resource_h = yes; then
  3908. dnl HAVE_SYS_RESOURCE_H defined
  3909. CL_LINK_CHECK([getrusage], cl_cv_func_getrusage,
  3910. [#include <sys/types.h> /* NetBSD 1.0 needs this */
  3911. #include <sys/time.h>
  3912. #include <sys/resource.h>],
  3913. [struct rusage x; int y = RUSAGE_SELF; getrusage(y,&x); x.ru_utime.tv_sec;])dnl
  3914. if test $cl_cv_func_getrusage = yes; then
  3915. CL_PROTO([getrusage], [
  3916. CL_PROTO_TRY([
  3917. #include <stdlib.h>
  3918. #ifdef HAVE_UNISTD_H
  3919. #include <unistd.h>
  3920. #endif
  3921. #include <sys/types.h> /* NetBSD 1.0 needs this */
  3922. #include <sys/time.h>
  3923. #include <sys/resource.h>
  3924. ],
  3925. [int getrusage (int who, struct rusage * rusage);],
  3926. [int getrusage();],
  3927. [cl_cv_proto_getrusage_arg1="int"],
  3928. [cl_cv_proto_getrusage_arg1="enum __rusage_who"])
  3929. ], [extern int getrusage ($cl_cv_proto_getrusage_arg1, struct rusage *);])dnl
  3930. AC_CACHE_CHECK(whether getrusage works, cl_cv_func_getrusage_works, [
  3931. AC_TRY_RUN([
  3932. #include <stdio.h>
  3933. #include <sys/types.h> /* NetBSD 1.0 needs this */
  3934. #include <sys/time.h>
  3935. #include <time.h> /* for time(2) */
  3936. #include <sys/resource.h>
  3937. int main ()
  3938. {
  3939. struct rusage used, prev;
  3940. time_t end = time(NULL)+2;
  3941. int count = 0;
  3942. if ((count = getrusage(RUSAGE_SELF, &prev))) {
  3943. /* getrusage is defined but does not do anything. */
  3944. /*fprintf(stderr,"getrusage failed: return=%d\n",count);*/
  3945. return 1;
  3946. }
  3947. while (time(NULL) < end) {
  3948. count++;
  3949. getrusage(RUSAGE_SELF, &used);
  3950. if ((used.ru_utime.tv_usec != prev.ru_utime.tv_usec)
  3951. || (used.ru_utime.tv_sec != prev.ru_utime.tv_sec)
  3952. || (used.ru_stime.tv_usec != prev.ru_stime.tv_usec)
  3953. || (used.ru_stime.tv_sec != prev.ru_stime.tv_sec)) {
  3954. /*fprintf(stderr,"success after %d runs\n",count);*/
  3955. return 0;
  3956. }
  3957. }
  3958. /* getrusage is defined but does not work. */
  3959. /*fprintf(stderr,"failure after %d runs\n",count);*/
  3960. return 1;
  3961. }],
  3962. cl_cv_func_getrusage_works=yes,
  3963. cl_cv_func_getrusage_works=no,
  3964. dnl When cross-compiling, don't assume anything.
  3965. cl_cv_func_getrusage_works="guessing no")])
  3966. fi
  3967. if test $cl_cv_func_getrusage_works = yes; then
  3968. AC_DEFINE(HAVE_GETRUSAGE,,[have <sys/time.h>, the getrusage() function, the struct rusage type, and <sys/resource.h> defines RUSAGE_SELF])
  3969. AC_DEFINE_UNQUOTED(RUSAGE_WHO_T,$cl_cv_proto_getrusage_arg1,[type of `who' in getrusage() declaration])
  3970. fi
  3971. fi
  3972. ])
  3973. dnl -*- Autoconf -*-
  3974. dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
  3975. dnl This file is free software, distributed under the terms of the GNU
  3976. dnl General Public License. As a special exception to the GNU General
  3977. dnl Public License, this file may be distributed as part of a program
  3978. dnl that contains a configuration script generated by Autoconf, under
  3979. dnl the same distribution terms as the rest of that program.
  3980. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  3981. AC_PREREQ(2.57)
  3982. AC_DEFUN([CL_PERROR],
  3983. [AC_MSG_CHECKING(for perror declaration)
  3984. AC_CACHE_VAL(cl_cv_proto_perror, [
  3985. AC_TRY_COMPILE([
  3986. /* Some systems declare perror() in <errno.h>, some in <stdio.h>, some don't
  3987. declare it at all. */
  3988. #include <stdio.h>
  3989. #include <errno.h>
  3990. ]AC_LANG_EXTERN[double perror ();], [],
  3991. cl_cv_proto_perror=no, cl_cv_proto_perror=yes)
  3992. ])
  3993. AC_MSG_RESULT([$cl_cv_proto_perror])
  3994. if test $cl_cv_proto_perror = yes; then
  3995. AC_DEFINE(HAVE_PERROR_DECL,,[<errno.h> or <stdio.h> contains a declaration for perror()])
  3996. fi
  3997. ])
  3998. dnl -*- Autoconf -*-
  3999. dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
  4000. dnl This file is free software, distributed under the terms of the GNU
  4001. dnl General Public License. As a special exception to the GNU General
  4002. dnl Public License, this file may be distributed as part of a program
  4003. dnl that contains a configuration script generated by Autoconf, under
  4004. dnl the same distribution terms as the rest of that program.
  4005. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  4006. AC_PREREQ(2.13)
  4007. AC_DEFUN([CL_MACHINE],
  4008. [AC_REQUIRE([AC_PROG_CC])dnl
  4009. AC_REQUIRE([AC_C_CHAR_UNSIGNED])dnl
  4010. cl_machine_file_c=$2
  4011. cl_machine_file_h=$3
  4012. if test $cross_compiling = no; then
  4013. if test -z "$[$4]"; then
  4014. AC_CHECKING(for [$1])
  4015. cat > conftest.$ac_ext <<EOF
  4016. #include "confdefs.h"
  4017. EOF
  4018. cat "$cl_machine_file_c" >> conftest.$ac_ext
  4019. ORIGCC="$CC"
  4020. if test $ac_cv_prog_gcc = yes; then
  4021. # gcc -O (gcc version <= 2.3.2) crashes when compiling long long shifts for
  4022. # target 80386. Strip "-O".
  4023. CC=`echo "$CC " | sed -e 's/-O //g'`
  4024. fi
  4025. AC_TRY_EVAL(ac_link)
  4026. CC="$ORIGCC"
  4027. if test -s conftest; then
  4028. echo "creating $cl_machine_file_h"
  4029. ./conftest > conftest.h
  4030. if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
  4031. # The file exists and we would not be changing it
  4032. rm -f conftest.h
  4033. else
  4034. rm -f "$cl_machine_file_h"
  4035. mv conftest.h "$cl_machine_file_h"
  4036. fi
  4037. [$4]=1
  4038. else
  4039. echo "creation of $cl_machine_file_h failed"
  4040. fi
  4041. rm -f conftest*
  4042. fi
  4043. else
  4044. echo "cross-compiling - cannot create $cl_machine_file_h"
  4045. fi
  4046. ])
  4047. dnl -*- Autoconf -*-
  4048. dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
  4049. dnl This file is free software, distributed under the terms of the GNU
  4050. dnl General Public License. As a special exception to the GNU General
  4051. dnl Public License, this file may be distributed as part of a program
  4052. dnl that contains a configuration script generated by Autoconf, under
  4053. dnl the same distribution terms as the rest of that program.
  4054. dnl From Richard B. Kreckel.
  4055. AC_PREREQ(2.13)
  4056. dnl Is the gmp header file new enough? (should be implemented with an argument)
  4057. AC_DEFUN([CL_GMP_H_VERSION],
  4058. [AC_CACHE_CHECK([for recent enough gmp.h], cl_cv_new_gmp_h, [
  4059. AC_TRY_CPP([#include <gmp.h>
  4060. #if !defined(__GNU_MP_VERSION) || (__GNU_MP_VERSION < 3)
  4061. #error "ancient gmp.h"
  4062. #endif],
  4063. cl_cv_new_gmp_h="yes", cl_cv_new_gmp_h="no")
  4064. ])])dnl
  4065. dnl Does libgmp provide some functionality introduced in version 3.0?
  4066. AC_DEFUN([CL_GMP_CHECK],
  4067. [AC_CACHE_CHECK([for working libgmp], cl_cv_new_libgmp, [
  4068. SAVELIBS=$LIBS
  4069. LIBS="$LIBS -lgmp"
  4070. AC_TRY_LINK([#include <gmp.h>],[mpn_divexact_by3(0,0,0)],
  4071. cl_cv_new_libgmp="yes", cl_cv_new_libgmp="no")
  4072. LIBS=$SAVELIBS])
  4073. if test x"$cl_cv_new_libgmp" = xyes; then
  4074. LIBS="$LIBS -lgmp"
  4075. fi
  4076. ])
  4077. dnl What is sizeof(mp_limb_t)? (It has to match sizeof(uintD) later.)
  4078. AC_DEFUN([CL_GMP_SET_UINTD],
  4079. [AC_CACHE_CHECK([how large gmp demands uintD to be], cl_cv_gmp_set_uintd, [
  4080. AC_TRY_RUN([#include <stdio.h>
  4081. #include <gmp.h>
  4082. int main() {
  4083. FILE *f=fopen("conftestval", "w");
  4084. if (!f) return(255);
  4085. if (sizeof(mp_limb_t) > sizeof(long))
  4086. fprintf(f, "long long");
  4087. else if (sizeof(mp_limb_t) == sizeof(long))
  4088. fprintf(f, "long");
  4089. else if (sizeof(mp_limb_t) == sizeof(int))
  4090. fprintf(f, "int");
  4091. else return(sizeof(mp_limb_t));
  4092. #if defined(__GMP_BITS_PER_MP_LIMB)
  4093. /* Is there a nail in a limb? */
  4094. if (8*sizeof(mp_limb_t)!=__GMP_BITS_PER_MP_LIMB)
  4095. return(254);
  4096. #endif
  4097. return(0);
  4098. }], cl_cv_gmp_set_uintd=`cat conftestval`
  4099. cl_gmp_demands="GMP_DEMANDS_UINTD_`echo ${cl_cv_gmp_set_uintd} | sed -e 'y/ gilnot/_GILNOT/'`",
  4100. gmp_retval="$ac_status"
  4101. if test x$gmp_retval = "x255"; then AC_MSG_ERROR([error opening output file.]); fi
  4102. if test x$gmp_retval = "x254"; then AC_MSG_ERROR([nails in MP limbs are unsupported.]); fi
  4103. AC_MSG_ERROR([Don't know which C-type has sizeof $gmp_retval.]),
  4104. AC_MSG_ERROR([cross-compiling - cannot determine]))
  4105. ])
  4106. AC_DEFINE_UNQUOTED($cl_gmp_demands)
  4107. ])