avcall.m4
上传用户:shenzhenrh
上传日期:2013-05-12
资源大小:2904k
文件大小:138k
源码类别:

信息检索与抽取

开发平台:

Unix_Linux

  1. # generated automatically by aclocal 1.9.2 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
  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_CC_GCC],
  56. [AC_REQUIRE([AC_PROG_CPP])
  57. AC_CACHE_CHECK(whether using GNU C, cl_cv_prog_cc_gcc, [
  58. AC_EGREP_CPP(yes,[#ifdef __GNUC__
  59.   yes
  60. #endif
  61. ], cl_cv_prog_cc_gcc=yes, cl_cv_prog_cc_gcc=no)
  62. ])
  63. if test $cl_cv_prog_cc_gcc = yes; then
  64.   CC_GCC=true
  65.   GCC_X_NONE='-x none'
  66. else
  67.   CC_GCC=false
  68.   GCC_X_NONE=''
  69. fi
  70. AC_SUBST(CC_GCC)dnl
  71. AC_SUBST(GCC_X_NONE)dnl
  72. ])
  73. dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
  74. dnl This file is free software, distributed under the terms of the GNU
  75. dnl General Public License.  As a special exception to the GNU General
  76. dnl Public License, this file may be distributed as part of a program
  77. dnl that contains a configuration script generated by Autoconf, under
  78. dnl the same distribution terms as the rest of that program.
  79. dnl From Bruno Haible, Marcus Daniels.
  80. AC_PREREQ(2.13)
  81. AC_DEFUN([CL_PROG_CP],
  82. [AC_CACHE_CHECK(how to copy files, cl_cv_prog_cp, [
  83. echo "blabla" > conftest.x
  84. err=`/bin/sh -c "cp -p conftest.x conftest.y 2>&1"`
  85. if test -z "$err"; then
  86.   cl_cv_prog_cp='cp -p'
  87. else
  88.   cl_cv_prog_cp='cp'
  89. fi
  90. rm -f conftest*
  91. ])
  92. CP="$cl_cv_prog_cp"
  93. AC_SUBST(CP)dnl
  94. ])
  95. dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
  96. dnl This file is free software, distributed under the terms of the GNU
  97. dnl General Public License.  As a special exception to the GNU General
  98. dnl Public License, this file may be distributed as part of a program
  99. dnl that contains a configuration script generated by Autoconf, under
  100. dnl the same distribution terms as the rest of that program.
  101. dnl From Bruno Haible, Marcus Daniels.
  102. AC_PREREQ(2.13)
  103. AC_DEFUN([CL_IREG_FLOAT_RETURN],
  104. [AC_CACHE_CHECK([whether floats are returned in integer registers], cl_cv_c_float_return_ireg, [
  105. AC_TRY_RUN([float x = (float)1.2;
  106. float y = (float)1.3;
  107. float fun () { return x*y; }
  108. int main()
  109. { int val = (* (int (*) ()) fun) ();
  110.   exit (!(val == 0x3FC7AE15 || val == 0x15AEC73F));
  111. }], cl_cv_c_float_return_ireg=yes, rm -f core
  112. cl_cv_c_float_return_ireg=no,
  113. dnl When cross-compiling, assume no, because that's how it comes out on
  114. dnl most platforms with floating-point unit, including m68k-linux.
  115. cl_cv_c_float_return_ireg="guessing no")
  116. ])
  117. case "$cl_cv_c_float_return_ireg" in
  118.   *yes) AC_DEFINE(__IREG_FLOAT_RETURN__) ;;
  119.   *no) ;;
  120. esac
  121. ])
  122. dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
  123. dnl This file is free software, distributed under the terms of the GNU
  124. dnl General Public License.  As a special exception to the GNU General
  125. dnl Public License, this file may be distributed as part of a program
  126. dnl that contains a configuration script generated by Autoconf, under
  127. dnl the same distribution terms as the rest of that program.
  128. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  129. AC_PREREQ(2.13)
  130. AC_DEFUN([CL_PCC_STRUCT_RETURN],
  131. [AC_CACHE_CHECK([for pcc non-reentrant struct return convention], cl_cv_c_struct_return_static, [
  132. save_CFLAGS="$CFLAGS"
  133. test $CC_GCC = true && CFLAGS="$CFLAGS -O0"
  134. AC_TRY_RUN([typedef struct { int a; int b; int c; int d; int e; } foo;
  135. foo foofun () { static foo foopi = {3141,5926,5358,9793,2385}; return foopi; }
  136. foo* (*fun) () = (foo* (*) ()) foofun;
  137. int main()
  138. { foo foo1;
  139.   foo* fooptr1;
  140.   foo foo2;
  141.   foo* fooptr2;
  142.   foo1 = foofun(); fooptr1 = (*fun)(&foo1);
  143.   foo2 = foofun(); fooptr2 = (*fun)(&foo2);
  144.   exit(!(fooptr1 == fooptr2 && fooptr1->c == 5358));
  145. }], cl_cv_c_struct_return_static=yes, rm -f core
  146. cl_cv_c_struct_return_static=no,
  147. dnl When cross-compiling, don't assume anything.
  148. dnl There are even weirder return value passing conventions than pcc.
  149. cl_cv_c_struct_return_static="guessing no")
  150. CFLAGS="$save_CFLAGS"
  151. ])
  152. case "$cl_cv_c_struct_return_static" in
  153.   *yes) AC_DEFINE(__PCC_STRUCT_RETURN__) ;;
  154.   *no) ;;
  155. esac
  156. ])
  157. dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
  158. dnl This file is free software, distributed under the terms of the GNU
  159. dnl General Public License.  As a special exception to the GNU General
  160. dnl Public License, this file may be distributed as part of a program
  161. dnl that contains a configuration script generated by Autoconf, under
  162. dnl the same distribution terms as the rest of that program.
  163. dnl From Bruno Haible, Marcus Daniels.
  164. AC_PREREQ(2.13)
  165. AC_DEFUN([CL_SMALL_STRUCT_RETURN],
  166. [AC_CACHE_CHECK([whether small structs are returned in registers], cl_cv_c_struct_return_small, [
  167. AC_TRY_RUN([typedef struct { int x; } foo; int y;
  168. foo foofun () { foo f; f.x = y; return f; }
  169. int (*fun) () = (int (*) ()) foofun;
  170. int main()
  171. { y = 37; if ((*fun)() != 37) exit(1);
  172.   y = 55; if ((*fun)() != 55) exit(1);
  173.   exit(0);
  174. }], cl_cv_c_struct_return_small=yes, rm -f core
  175. cl_cv_c_struct_return_small=no,
  176. dnl When cross-compiling, don't assume anything.
  177. dnl There are even weirder return value passing conventions than pcc.
  178. cl_cv_c_struct_return_small="guessing no")
  179. ])
  180. case "$cl_cv_c_struct_return_small" in
  181.   *yes) AC_DEFINE(__SMALL_STRUCT_RETURN__) ;;
  182.   *no) ;;
  183. esac
  184. ])
  185. dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
  186. dnl This file is free software, distributed under the terms of the GNU
  187. dnl General Public License.  As a special exception to the GNU General
  188. dnl Public License, this file may be distributed as part of a program
  189. dnl that contains a configuration script generated by Autoconf, under
  190. dnl the same distribution terms as the rest of that program.
  191. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  192. AC_PREREQ(2.13)
  193. dnl without AC_MSG_...:   with AC_MSG_... and caching:
  194. dnl   AC_TRY_CPP          CL_CPP_CHECK
  195. dnl   AC_TRY_COMPILE      CL_COMPILE_CHECK
  196. dnl   AC_TRY_LINK         CL_LINK_CHECK
  197. dnl   AC_TRY_RUN          CL_RUN_CHECK - would require cross-compiling support
  198. dnl Usage:
  199. dnl AC_TRY_CPP(INCLUDES,
  200. dnl            ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  201. dnl CL_CPP_CHECK(ECHO-TEXT, CACHE-ID,
  202. dnl              INCLUDES,
  203. dnl              ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  204. dnl AC_TRY_xxx(INCLUDES, FUNCTION-BODY,
  205. dnl            ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  206. dnl CL_xxx_CHECK(ECHO-TEXT, CACHE-ID,
  207. dnl              INCLUDES, FUNCTION-BODY,
  208. dnl              ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  209. AC_DEFUN([CL_CPP_CHECK],
  210. [AC_MSG_CHECKING(for $1)
  211. AC_CACHE_VAL($2,[
  212. AC_TRY_CPP([$3], $2=yes, $2=no)
  213. ])
  214. AC_MSG_RESULT([$]$2)
  215. if test [$]$2 = yes; then
  216.   ifelse([$4], , :, [$4])
  217. ifelse([$5], , , [else
  218.   $5
  219. ])dnl
  220. fi
  221. ])
  222. AC_DEFUN([CL_COMPILE_CHECK],
  223. [AC_MSG_CHECKING(for $1)
  224. AC_CACHE_VAL($2,[
  225. AC_TRY_COMPILE([$3],[$4], $2=yes, $2=no)
  226. ])
  227. AC_MSG_RESULT([$]$2)
  228. if test [$]$2 = yes; then
  229.   ifelse([$5], , :, [$5])
  230. ifelse([$6], , , [else
  231.   $6
  232. ])dnl
  233. fi
  234. ])
  235. AC_DEFUN([CL_LINK_CHECK],
  236. [AC_MSG_CHECKING(for $1)
  237. AC_CACHE_VAL($2,[
  238. AC_TRY_LINK([$3],[$4], $2=yes, $2=no)
  239. ])
  240. AC_MSG_RESULT([$]$2)
  241. if test [$]$2 = yes; then
  242.   ifelse([$5], , :, [$5])
  243. ifelse([$6], , , [else
  244.   $6
  245. ])dnl
  246. fi
  247. ])
  248. dnl CL_SILENT(ACTION)
  249. dnl performs ACTION, with AC_MSG_CHECKING and AC_MSG_RESULT being defined away.
  250. AC_DEFUN([CL_SILENT],
  251. [pushdef([AC_MSG_CHECKING],[:])dnl
  252. pushdef([AC_CHECKING],[:])dnl
  253. pushdef([AC_MSG_RESULT],[:])dnl
  254. $1[]dnl
  255. popdef([AC_MSG_RESULT])dnl
  256. popdef([AC_CHECKING])dnl
  257. popdef([AC_MSG_CHECKING])dnl
  258. ])
  259. dnl Expands to the "extern ..." prefix used for system declarations.
  260. dnl AC_LANG_EXTERN()
  261. AC_DEFUN([AC_LANG_EXTERN],
  262. [extern
  263. #ifdef __cplusplus
  264. "C"
  265. #endif
  266. ])
  267. AC_DEFUN([CL_CC_WORKS],
  268. [AC_CACHE_CHECK(whether CC works at all, cl_cv_prog_cc_works, [
  269. AC_LANG_SAVE()
  270. AC_LANG_C()
  271. AC_TRY_RUN([int main() { exit(0); }],
  272. cl_cv_prog_cc_works=yes, cl_cv_prog_cc_works=no,
  273. AC_TRY_LINK([], [], cl_cv_prog_cc_works=yes, cl_cv_prog_cc_works=no))
  274. AC_LANG_RESTORE()
  275. ])
  276. case "$cl_cv_prog_cc_works" in
  277.   *no) echo "Installation or configuration problem: C compiler cannot create executables."; exit 1;;
  278.   *yes) ;;
  279. esac
  280. ])
  281. AC_DEFUN([CL_CONFIG_SUBDIRS],
  282. [dnl No AC_CONFIG_AUX_DIR_DEFAULT, so we don't need install.sh.
  283. AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])
  284. AC_CONFIG_SUBDIRS([$1])dnl
  285. ])
  286. AC_DEFUN([CL_CANONICAL_HOST],
  287. [AC_REQUIRE([AC_PROG_CC]) dnl Actually: AC_REQUIRE([CL_CC_WORKS])
  288. dnl Set ac_aux_dir before the cache check, because AM_PROG_LIBTOOL needs it.
  289. ac_aux_dir=${srcdir}/$1
  290. dnl A substitute for AC_CONFIG_AUX_DIR_DEFAULT, so we don't need install.sh.
  291. ac_config_guess="$SHELL $ac_aux_dir/config.guess"
  292. ac_config_sub="$SHELL $ac_aux_dir/config.sub"
  293. dnl We have defined $ac_aux_dir.
  294. AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  295. dnl In autoconf-2.52, a single AC_CANONICAL_HOST has the effect of inserting
  296. dnl the code of AC_CANONICAL_BUILD *before* CL_CANONICAL_HOST, i.e. before
  297. dnl ac_aux_dir has been set. To work around this, we list AC_CANONICAL_BUILD
  298. dnl explicitly.
  299. AC_CANONICAL_BUILD
  300. AC_CANONICAL_HOST
  301. ])
  302. AC_DEFUN([CL_CANONICAL_HOST_CPU],
  303. [AC_REQUIRE([CL_CANONICAL_HOST])AC_REQUIRE([AC_PROG_CC])
  304. case "$host_cpu" in
  305. changequote(,)dnl
  306.   i[4567]86 )
  307.     host_cpu=i386
  308.     ;;
  309.   alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
  310.     host_cpu=alpha
  311.     ;;
  312.   hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
  313.     host_cpu=hppa
  314.     ;;
  315.   powerpc )
  316.     host_cpu=rs6000
  317.     ;;
  318.   c1 | c2 | c32 | c34 | c38 | c4 )
  319.     host_cpu=convex
  320.     ;;
  321.   arm* )
  322.     host_cpu=arm
  323.     ;;
  324. changequote([,])dnl
  325.   mips )
  326.     AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [
  327. AC_EGREP_CPP(yes,
  328. [#if defined(_MIPS_SZLONG)
  329. #if (_MIPS_SZLONG == 64)
  330. /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */
  331.   yes
  332. #endif
  333. #endif
  334. ], cl_cv_host_mips64=yes, cl_cv_host_mips64=no)
  335. ])
  336. if test $cl_cv_host_mips64 = yes; then
  337.   host_cpu=mips64
  338. fi
  339.     ;;
  340. dnl UltraSPARCs running Linux have `uname -m` = "sparc64", but the C compiler
  341. dnl still generates 32-bit code.
  342.   sparc | sparc64 )
  343.     AC_CACHE_CHECK([for 64-bit SPARC], cl_cv_host_sparc64, [
  344. AC_EGREP_CPP(yes,
  345. [#if defined(__sparcv9) || defined(__arch64__)
  346.   yes
  347. #endif
  348. ], cl_cv_host_sparc64=yes, cl_cv_host_sparc64=no)
  349. ])
  350. if test $cl_cv_host_sparc64 = yes; then
  351.   host_cpu=sparc64
  352. else
  353.   host_cpu=sparc
  354. fi
  355.     ;;
  356. esac
  357. dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this
  358. cat >> confdefs.h <<EOF
  359. #ifndef __${host_cpu}__
  360. #define __${host_cpu}__ 1
  361. #endif
  362. EOF
  363. ])
  364. AC_DEFUN([CL_CANONICAL_HOST_CPU_FOR_FFCALL],
  365. [AC_REQUIRE([CL_CANONICAL_HOST])AC_REQUIRE([AC_PROG_CC])
  366. case "$host_cpu" in
  367. changequote(,)dnl
  368.   i[4567]86 )
  369.     host_cpu=i386
  370.     ;;
  371.   alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
  372.     host_cpu=alpha
  373.     ;;
  374.   hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
  375.     host_cpu=hppa
  376.     ;;
  377.   powerpc )
  378.     host_cpu=rs6000
  379.     ;;
  380.   c1 | c2 | c32 | c34 | c38 | c4 )
  381.     host_cpu=convex
  382.     ;;
  383.   arm* )
  384.     host_cpu=arm
  385.     ;;
  386. changequote([,])dnl
  387.   mips )
  388.     AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [
  389. AC_EGREP_CPP(yes,
  390. [#if defined(_MIPS_SZLONG)
  391. #if (_MIPS_SZLONG == 64)
  392. /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */
  393.   yes
  394. #endif
  395. #endif
  396. ], cl_cv_host_mips64=yes, cl_cv_host_mips64=no)
  397. ])
  398. if test $cl_cv_host_mips64 = yes; then
  399.   host_cpu=mips64
  400. else
  401.   AC_CACHE_CHECK([for MIPS with n32 ABI], cl_cv_host_mipsn32, [
  402. dnl Strictly speaking, the MIPS ABI (-32 or -n32) is independent from the CPU
  403. dnl identification (-mips[12] or -mips[34]). But -n32 is commonly used together
  404. dnl with -mips3, and it's easier to test the CPU identification.
  405. AC_EGREP_CPP(yes,
  406. [#if __mips >= 3
  407.   yes
  408. #endif
  409. ], cl_cv_host_mipsn32=yes, cl_cv_host_mipsn32=no)
  410. ])
  411. if test $cl_cv_host_mipsn32 = yes; then
  412.   host_cpu=mipsn32
  413. fi
  414. fi
  415.     ;;
  416. dnl UltraSPARCs running Linux have `uname -m` = "sparc64", but the C compiler
  417. dnl still generates 32-bit code.
  418.   sparc | sparc64 )
  419.     AC_CACHE_CHECK([for 64-bit SPARC], cl_cv_host_sparc64, [
  420. AC_EGREP_CPP(yes,
  421. [#if defined(__sparcv9) || defined(__arch64__)
  422.   yes
  423. #endif
  424. ], cl_cv_host_sparc64=yes, cl_cv_host_sparc64=no)
  425. ])
  426. if test $cl_cv_host_sparc64 = yes; then
  427.   host_cpu=sparc64
  428. else
  429.   host_cpu=sparc
  430. fi
  431.     ;;
  432. esac
  433. dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this
  434. cat >> confdefs.h <<EOF
  435. #ifndef __${host_cpu}__
  436. #define __${host_cpu}__ 1
  437. #endif
  438. EOF
  439. ])
  440. dnl Copyright (C) 1993-2004 Free Software Foundation, Inc.
  441. dnl This file is free software, distributed under the terms of the GNU
  442. dnl General Public License.  As a special exception to the GNU General
  443. dnl Public License, this file may be distributed as part of a program
  444. dnl that contains a configuration script generated by Autoconf, under
  445. dnl the same distribution terms as the rest of that program.
  446. dnl From Bruno Haible, Marcus Daniels.
  447. AC_PREREQ(2.13)
  448. AC_DEFUN([CL_PROG_INSTALL],
  449. [dnl This is mostly copied from AC_PROG_INSTALL.
  450. # Find a good install program.  We prefer a C program (faster),
  451. # so one script is as good as another.  But avoid the broken or
  452. # incompatible versions:
  453. # SysV /etc/install, /usr/sbin/install
  454. # SunOS /usr/etc/install
  455. # IRIX /sbin/install
  456. # AIX /bin/install
  457. # AFS /usr/afsws/bin/install, which mis-handles nonexistent args
  458. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  459. # ./install, which can be erroneously created by make from ./install.sh.
  460. AC_MSG_CHECKING(for a BSD compatible install)
  461. if test -z "$INSTALL"; then
  462. AC_CACHE_VAL(cl_cv_path_install,
  463. [  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  464.   for ac_dir in $PATH; do
  465.     # Account for people who put trailing slashes in PATH elements.
  466.     case "$ac_dir/" in
  467.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  468.     *)
  469.       # OSF1 and SCO ODT 3.0 have their own names for install.
  470.       # Don't use installbsd from OSF since it installs stuff as root
  471.       # by default.
  472.       for ac_prog in ginstall scoinst install; do
  473.         if test -f $ac_dir/$ac_prog; then
  474.   if test $ac_prog = install &&
  475.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  476.     # AIX install.  It has an incompatible calling convention.
  477.     :
  478.   else
  479.     cl_cv_path_install="$ac_dir/$ac_prog -c"
  480.     break 2
  481.   fi
  482. fi
  483.       done
  484.       ;;
  485.     esac
  486.   done
  487.   IFS="$ac_save_ifs"
  488.   # As a last resort, use the absolute pathname of cp.
  489.   if test -z "$cl_cv_path_install"; then
  490.     cl_cv_path_install="cp"
  491.     IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  492.     for ac_dir in $PATH; do
  493.       if test -f $ac_dir/cp; then
  494.         cl_cv_path_install="$ac_dir/cp"
  495.         break
  496.       fi
  497.     done
  498.     IFS="$ac_save_ifs"
  499.   fi
  500. ])dnl
  501.   INSTALL="$cl_cv_path_install"
  502. fi
  503. dnl We do special magic for INSTALL instead of AC_SUBST, to get
  504. dnl relative paths right.
  505. AC_MSG_RESULT($INSTALL)
  506. AC_SUBST(INSTALL)dnl
  507. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  508. # It thinks the first close brace ends the variable substitution.
  509. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='$(INSTALL)'
  510. AC_SUBST(INSTALL_PROGRAM)dnl
  511. if test -z "$INSTALL_DATA"; then
  512.   case "$INSTALL" in
  513.     cp | */cp ) INSTALL_DATA='$(INSTALL)' ;;
  514.     * )         INSTALL_DATA='$(INSTALL) -m 644' ;;
  515.   esac
  516. fi
  517. AC_SUBST(INSTALL_DATA)dnl
  518. ])
  519. # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
  520. # serial 46 AC_PROG_LIBTOOL
  521. AC_DEFUN([AC_PROG_LIBTOOL],
  522. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  523. # This can be used to rebuild libtool when needed
  524. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  525. # Always use our own libtool.
  526. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  527. AC_SUBST(LIBTOOL)dnl
  528. # Prevent multiple expansion
  529. define([AC_PROG_LIBTOOL], [])
  530. ])
  531. AC_DEFUN([AC_LIBTOOL_SETUP],
  532. [AC_PREREQ(2.13)dnl
  533. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  534. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  535. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  536. AC_REQUIRE([CL_CANONICAL_HOST])dnl
  537. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  538. AC_REQUIRE([AC_PROG_CC])dnl
  539. AC_REQUIRE([AC_PROG_LD])dnl
  540. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  541. AC_REQUIRE([AC_PROG_NM])dnl
  542. AC_REQUIRE([LT_AC_PROG_SED])dnl
  543. AC_REQUIRE([CL_PROG_LN_S])dnl
  544. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  545. AC_REQUIRE([AC_OBJEXT])dnl
  546. AC_REQUIRE([AC_EXEEXT])dnl
  547. dnl
  548. _LT_AC_PROG_ECHO_BACKSLASH
  549. # Only perform the check for file, if the check method requires it
  550. case $deplibs_check_method in
  551. file_magic*)
  552.   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  553.     AC_PATH_MAGIC
  554.   fi
  555.   ;;
  556. esac
  557. AC_CHECK_TOOL(RANLIB, ranlib, :)
  558. AC_CHECK_TOOL(STRIP, strip, :)
  559. ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  560. ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  561. enable_win32_dll=yes, enable_win32_dll=no)
  562. AC_ARG_ENABLE(libtool-lock,
  563.   [  --disable-libtool-lock  avoid locking (might break parallel builds)])
  564. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  565. # Some flags need to be propagated to the compiler or linker for good
  566. # libtool support.
  567. case $host in
  568. *-*-irix6*)
  569.   # Find out which ABI we are using.
  570.   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  571.   if AC_TRY_EVAL(ac_compile); then
  572.     case `/usr/bin/file conftest.$ac_objext` in
  573.     *32-bit*)
  574.       LD="${LD-ld} -32"
  575.       ;;
  576.     *N32*)
  577.       LD="${LD-ld} -n32"
  578.       ;;
  579.     *64-bit*)
  580.       LD="${LD-ld} -64"
  581.       ;;
  582.     esac
  583.   fi
  584.   rm -rf conftest*
  585.   ;;
  586. *-*-sco3.2v5*)
  587.   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  588.   SAVE_CFLAGS="$CFLAGS"
  589.   CFLAGS="$CFLAGS -belf"
  590.   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  591.     [AC_LANG_SAVE
  592.      AC_LANG_C
  593.      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  594.      AC_LANG_RESTORE])
  595.   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  596.     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  597.     CFLAGS="$SAVE_CFLAGS"
  598.   fi
  599.   ;;
  600. ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  601. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  602.   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  603.   AC_CHECK_TOOL(AS, as, false)
  604.   AC_CHECK_TOOL(OBJDUMP, objdump, false)
  605.   # recent cygwin and mingw systems supply a stub DllMain which the user
  606.   # can override, but on older systems we have to supply one
  607.   AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
  608.     [AC_TRY_LINK([],
  609.       [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
  610.       DllMain (0, 0, 0);],
  611.       [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
  612.   case $host/$CC in
  613.   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
  614.     # old mingw systems require "-dll" to link a DLL, while more recent ones
  615.     # require "-mdll"
  616.     SAVE_CFLAGS="$CFLAGS"
  617.     CFLAGS="$CFLAGS -mdll"
  618.     AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
  619.       [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
  620.     CFLAGS="$SAVE_CFLAGS" ;;
  621.   *-*-cygwin* | *-*-pw32*)
  622.     # cygwin systems need to pass --dll to the linker, and not link
  623.     # crt.o which will require a WinMain@16 definition.
  624.     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
  625.   esac
  626.   ;;
  627.   ])
  628. esac
  629. _LT_AC_LTCONFIG_HACK
  630. ])
  631. # AC_LIBTOOL_HEADER_ASSERT
  632. # ------------------------
  633. AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
  634. [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
  635.     [lt_cv_func_assert_works],
  636.     [case $host in
  637.     *-*-solaris*)
  638.       if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
  639.         case `$CC --version 2>/dev/null` in
  640.         [[12]].*) lt_cv_func_assert_works=no ;;
  641.         *)        lt_cv_func_assert_works=yes ;;
  642.         esac
  643.       fi
  644.       ;;
  645.     esac])
  646. if test "x$lt_cv_func_assert_works" = xyes; then
  647.   AC_CHECK_HEADERS(assert.h)
  648. fi
  649. ])# AC_LIBTOOL_HEADER_ASSERT
  650. # _LT_AC_CHECK_DLFCN
  651. # --------------------
  652. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  653. [AC_CHECK_HEADERS(dlfcn.h)
  654. ])# _LT_AC_CHECK_DLFCN
  655. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  656. # ---------------------------------
  657. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  658. [AC_REQUIRE([CL_CANONICAL_HOST])
  659. AC_REQUIRE([AC_PROG_NM])
  660. AC_REQUIRE([AC_OBJEXT])
  661. # Check for command to grab the raw symbol name followed by C symbol from nm.
  662. AC_MSG_CHECKING([command to parse $NM output])
  663. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
  664. # These are sane defaults that work on at least a few old systems.
  665. # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
  666. # Character class describing NM global symbol codes.
  667. symcode='[[BCDEGRST]]'
  668. # Regexp to match symbols that can be accessed directly from C.
  669. sympat='([[_A-Za-z]][[_A-Za-z0-9]]*)'
  670. # Transform the above into a raw symbol and a C symbol.
  671. symxfrm='1 23 3'
  672. # Transform an extracted symbol line into a proper C declaration
  673. lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* (.*)$/extern char 1;/p'"
  674. # Transform an extracted symbol line into symbol name and symbol address
  675. 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'"
  676. # Define system-specific variables.
  677. case $host_os in
  678. aix*)
  679.   symcode='[[BCDT]]'
  680.   ;;
  681. cygwin* | mingw* | pw32*)
  682.   symcode='[[ABCDGISTW]]'
  683.   ;;
  684. hpux*) # Its linker distinguishes data from code symbols
  685.   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* (.*)$/extern char 1();/p' -e 's/^$symcode* .* (.*)$/extern char 1;/p'"
  686.   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'"
  687.   ;;
  688. irix* | nonstopux*)
  689.   symcode='[[BCDEGRST]]'
  690.   ;;
  691. osf*)
  692.   symcode='[[BCDEGQRST]]'
  693.   ;;
  694. solaris* | sysv5*)
  695.   symcode='[[BDT]]'
  696.   ;;
  697. sysv4)
  698.   symcode='[[DFNSTU]]'
  699.   ;;
  700. esac
  701. # Handle CRLF in mingw tool chain
  702. opt_cr=
  703. case $host_os in
  704. mingw*)
  705.   opt_cr=`echo 'x{0,1}' | tr x '15'` # option cr in regexp
  706.   ;;
  707. esac
  708. # If we're using GNU nm, then use its standard symbol codes.
  709. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
  710.   symcode='[[ABCDGISTW]]'
  711. fi
  712. # Try without a prefix undercore, then with it.
  713. for ac_symprfx in "" "_"; do
  714.   # Write the raw and C identifiers.
  715. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[  ]]($symcode$symcode*)[[  ]][[  ]]*($ac_symprfx)$sympat$opt_cr$/$symxfrm/p'"
  716.   # Check to see that the pipe works correctly.
  717.   pipe_works=no
  718.   rm -f conftest*
  719.   cat > conftest.$ac_ext <<EOF
  720. #ifdef __cplusplus
  721. extern "C" {
  722. #endif
  723. char nm_test_var;
  724. void nm_test_func(){}
  725. #ifdef __cplusplus
  726. }
  727. #endif
  728. int main(){nm_test_var='a';nm_test_func();return(0);}
  729. EOF
  730.   if AC_TRY_EVAL(ac_compile); then
  731.     # Now try to grab the symbols.
  732.     nlist=conftest.nm
  733.     if AC_TRY_EVAL(NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist) && test -s "$nlist"; then
  734.       # Try sorting and uniquifying the output.
  735.       if sort "$nlist" | uniq > "$nlist"T; then
  736. mv -f "$nlist"T "$nlist"
  737.       else
  738. rm -f "$nlist"T
  739.       fi
  740.       # Make sure that we snagged all the symbols we need.
  741.       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
  742. if egrep ' nm_test_func$' "$nlist" >/dev/null; then
  743.   cat <<EOF > conftest.$ac_ext
  744. #ifdef __cplusplus
  745. extern "C" {
  746. #endif
  747. EOF
  748.   # Now generate the symbol file.
  749.   eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
  750.   cat <<EOF >> conftest.$ac_ext
  751. #if defined (__STDC__) && __STDC__
  752. # define lt_ptr void *
  753. #else
  754. # define lt_ptr char *
  755. # define const
  756. #endif
  757. /* The mapping between symbol names and symbols. */
  758. const struct {
  759.   const char *name;
  760.   lt_ptr address;
  761. }
  762. lt_preloaded_symbols[[]] =
  763. {
  764. EOF
  765.   sed "s/^$symcode$symcode* (.*) (.*)$/  {"2", (lt_ptr) &2},/" < "$nlist" >> conftest.$ac_ext
  766.   cat <<EOF >> conftest.$ac_ext
  767.   {0, (lt_ptr) 0}
  768. };
  769. #ifdef __cplusplus
  770. }
  771. #endif
  772. EOF
  773.   # Now try linking the two files.
  774.   mv conftest.$ac_objext conftstm.$ac_objext
  775.   save_LIBS="$LIBS"
  776.   save_CFLAGS="$CFLAGS"
  777.   LIBS="conftstm.$ac_objext"
  778.   CFLAGS="$CFLAGS$no_builtin_flag"
  779.   if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  780.     pipe_works=yes
  781.   fi
  782.   LIBS="$save_LIBS"
  783.   CFLAGS="$save_CFLAGS"
  784. else
  785.   echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
  786. fi
  787.       else
  788. echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
  789.       fi
  790.     else
  791.       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
  792.     fi
  793.   else
  794.     echo "$progname: failed program was:" >&AC_FD_CC
  795.     cat conftest.$ac_ext >&5
  796.   fi
  797.   rm -f conftest* conftst*
  798.   # Do not use the global_symbol_pipe unless it works.
  799.   if test "$pipe_works" = yes; then
  800.     break
  801.   else
  802.     lt_cv_sys_global_symbol_pipe=
  803.   fi
  804. done
  805. ])
  806. global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
  807. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  808.   global_symbol_to_cdecl=
  809.   global_symbol_to_c_name_address=
  810. else
  811.   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
  812.   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
  813. fi
  814. if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
  815. then
  816.   AC_MSG_RESULT(failed)
  817. else
  818.   AC_MSG_RESULT(ok)
  819. fi
  820. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  821. # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  822. # ---------------------------------
  823. AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
  824. [# Find the correct PATH separator.  Usually this is `:', but
  825. # DJGPP uses `;' like DOS.
  826. if test "X${PATH_SEPARATOR+set}" != Xset; then
  827.   UNAME=${UNAME-`uname 2>/dev/null`}
  828.   case X$UNAME in
  829.     *-DOS) lt_cv_sys_path_separator=';' ;;
  830.     *)     lt_cv_sys_path_separator=':' ;;
  831.   esac
  832.   PATH_SEPARATOR=$lt_cv_sys_path_separator
  833. fi
  834. ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  835. # _LT_AC_PROG_ECHO_BACKSLASH
  836. # --------------------------
  837. # Add some code to the start of the generated configure script which
  838. # will find an echo command which doesn't interpret backslashes.
  839. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  840. [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  841.       [AC_DIVERT_PUSH(NOTICE)])
  842. _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  843. # Check that we are running under the correct shell.
  844. SHELL=${CONFIG_SHELL-/bin/sh}
  845. case X$ECHO in
  846. X*--fallback-echo)
  847.   # Remove one level of quotation (which was required for Make).
  848.   ECHO=`echo "$ECHO" | sed 's,\\[$]\[$]0,'[$]0','`
  849.   ;;
  850. esac
  851. echo=${ECHO-echo}
  852. if test "X[$]1" = X--no-reexec; then
  853.   # Discard the --no-reexec flag, and continue.
  854.   shift
  855. elif test "X[$]1" = X--fallback-echo; then
  856.   # Avoid inline document here, it may be left over
  857.   :
  858. elif test "X`($echo 't') 2>/dev/null`" = 'Xt'; then
  859.   # Yippee, $echo works!
  860.   :
  861. else
  862.   # Restart under the correct shell.
  863.   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  864. fi
  865. if test "X[$]1" = X--fallback-echo; then
  866.   # used as fallback echo
  867.   shift
  868.   cat <<EOF
  869. $*
  870. EOF
  871.   exit 0
  872. fi
  873. # The HP-UX ksh and POSIX shell print the target directory to stdout
  874. # if CDPATH is set.
  875. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  876. if test -z "$ECHO"; then
  877. if test "X${echo_test_string+set}" != Xset; then
  878. # find a string as large as possible, as long as the shell can cope with it
  879.   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  880.     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  881.     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  882.        echo_test_string="`eval $cmd`" &&
  883.        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  884.     then
  885.       break
  886.     fi
  887.   done
  888. fi
  889. if test "X`($echo 't') 2>/dev/null`" = 'Xt' &&
  890.    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  891.    test "X$echo_testing_string" = "X$echo_test_string"; then
  892.   :
  893. else
  894.   # The Solaris, AIX, and Digital Unix default echo programs unquote
  895.   # backslashes.  This makes it impossible to quote backslashes using
  896.   #   echo "$something" | sed 's/\/\\/g'
  897.   #
  898.   # So, first we look for a working echo in the user's PATH.
  899.   IFS="${IFS=  }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  900.   for dir in $PATH /usr/ucb; do
  901.     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  902.        test "X`($dir/echo 't') 2>/dev/null`" = 'Xt' &&
  903.        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  904.        test "X$echo_testing_string" = "X$echo_test_string"; then
  905.       echo="$dir/echo"
  906.       break
  907.     fi
  908.   done
  909.   IFS="$save_ifs"
  910.   if test "X$echo" = Xecho; then
  911.     # We didn't find a better echo, so look for alternatives.
  912.     if test "X`(print -r 't') 2>/dev/null`" = 'Xt' &&
  913.        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  914.        test "X$echo_testing_string" = "X$echo_test_string"; then
  915.       # This shell has a builtin print -r that does the trick.
  916.       echo='print -r'
  917.     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  918.  test "X$CONFIG_SHELL" != X/bin/ksh; then
  919.       # If we have ksh, try running configure again with it.
  920.       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  921.       export ORIGINAL_CONFIG_SHELL
  922.       CONFIG_SHELL=/bin/ksh
  923.       export CONFIG_SHELL
  924.       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  925.     else
  926.       # Try using printf.
  927.       echo='printf %sn'
  928.       if test "X`($echo 't') 2>/dev/null`" = 'Xt' &&
  929.  echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  930.  test "X$echo_testing_string" = "X$echo_test_string"; then
  931. # Cool, printf works
  932. :
  933.       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo 't') 2>/dev/null` &&
  934.    test "X$echo_testing_string" = 'Xt' &&
  935.    echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  936.    test "X$echo_testing_string" = "X$echo_test_string"; then
  937. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  938. export CONFIG_SHELL
  939. SHELL="$CONFIG_SHELL"
  940. export SHELL
  941. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  942.       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo 't') 2>/dev/null` &&
  943.    test "X$echo_testing_string" = 'Xt' &&
  944.    echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  945.    test "X$echo_testing_string" = "X$echo_test_string"; then
  946. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  947.       else
  948. # maybe with a smaller string...
  949. prev=:
  950. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  951.   if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  952.   then
  953.     break
  954.   fi
  955.   prev="$cmd"
  956. done
  957. if test "$prev" != 'sed 50q "[$]0"'; then
  958.   echo_test_string=`eval $prev`
  959.   export echo_test_string
  960.   exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  961. else
  962.   # Oops.  We lost completely, so just stick with echo.
  963.   echo=echo
  964. fi
  965.       fi
  966.     fi
  967.   fi
  968. fi
  969. fi
  970. # Copy echo and quote the copy suitably for passing to libtool from
  971. # the Makefile, instead of quoting the original, which is used later.
  972. ECHO=$echo
  973. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  974.    ECHO="$CONFIG_SHELL \$[$]0 --fallback-echo"
  975. fi
  976. AC_SUBST(ECHO)
  977. AC_DIVERT_POP
  978. ])# _LT_AC_PROG_ECHO_BACKSLASH
  979. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  980. #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  981. # ------------------------------------------------------------------
  982. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  983. [if test "$cross_compiling" = yes; then :
  984.   [$4]
  985. else
  986.   AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  987.   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  988.   lt_status=$lt_dlunknown
  989.   cat > conftest.$ac_ext <<EOF
  990. [#line __oline__ "configure"
  991. #include "confdefs.h"
  992. #if HAVE_DLFCN_H
  993. #include <dlfcn.h>
  994. #endif
  995. #include <stdio.h>
  996. #ifdef RTLD_GLOBAL
  997. #  define LT_DLGLOBAL RTLD_GLOBAL
  998. #else
  999. #  ifdef DL_GLOBAL
  1000. #    define LT_DLGLOBAL DL_GLOBAL
  1001. #  else
  1002. #    define LT_DLGLOBAL 0
  1003. #  endif
  1004. #endif
  1005. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1006.    find out it does not work in some platform. */
  1007. #ifndef LT_DLLAZY_OR_NOW
  1008. #  ifdef RTLD_LAZY
  1009. #    define LT_DLLAZY_OR_NOW RTLD_LAZY
  1010. #  else
  1011. #    ifdef DL_LAZY
  1012. #      define LT_DLLAZY_OR_NOW DL_LAZY
  1013. #    else
  1014. #      ifdef RTLD_NOW
  1015. #        define LT_DLLAZY_OR_NOW RTLD_NOW
  1016. #      else
  1017. #        ifdef DL_NOW
  1018. #          define LT_DLLAZY_OR_NOW DL_NOW
  1019. #        else
  1020. #          define LT_DLLAZY_OR_NOW 0
  1021. #        endif
  1022. #      endif
  1023. #    endif
  1024. #  endif
  1025. #endif
  1026. #ifdef __cplusplus
  1027. extern "C" void exit (int);
  1028. #endif
  1029. void fnord() { int i=42;}
  1030. int main ()
  1031. {
  1032.   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1033.   int status = $lt_dlunknown;
  1034.   if (self)
  1035.     {
  1036.       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
  1037.       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1038.       /* dlclose (self); */
  1039.     }
  1040.     exit (status);
  1041. }]
  1042. EOF
  1043.   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  1044.     (./conftest; exit; ) 2>/dev/null
  1045.     lt_status=$?
  1046.     case x$lt_status in
  1047.       x$lt_dlno_uscore) $1 ;;
  1048.       x$lt_dlneed_uscore) $2 ;;
  1049.       x$lt_unknown|x*) $3 ;;
  1050.     esac
  1051.   else :
  1052.     # compilation failed
  1053.     $3
  1054.   fi
  1055. fi
  1056. rm -fr conftest*
  1057. ])# _LT_AC_TRY_DLOPEN_SELF
  1058. # AC_LIBTOOL_DLOPEN_SELF
  1059. # -------------------
  1060. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  1061. [if test "x$enable_dlopen" != xyes; then
  1062.   enable_dlopen=unknown
  1063.   enable_dlopen_self=unknown
  1064.   enable_dlopen_self_static=unknown
  1065. else
  1066.   lt_cv_dlopen=no
  1067.   lt_cv_dlopen_libs=
  1068.   case $host_os in
  1069.   beos*)
  1070.     lt_cv_dlopen="load_add_on"
  1071.     lt_cv_dlopen_libs=
  1072.     lt_cv_dlopen_self=yes
  1073.     ;;
  1074.   cygwin* | mingw* | pw32*)
  1075.     lt_cv_dlopen="LoadLibrary"
  1076.     lt_cv_dlopen_libs=
  1077.    ;;
  1078.   *)
  1079.     AC_CHECK_FUNC([shl_load],
  1080.           [lt_cv_dlopen="shl_load"],
  1081.       [AC_CHECK_LIB([dld], [shl_load],
  1082.             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  1083. [AC_CHECK_FUNC([dlopen],
  1084.       [lt_cv_dlopen="dlopen"],
  1085.   [AC_CHECK_LIB([dl], [dlopen],
  1086.         [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  1087.     [AC_CHECK_LIB([svld], [dlopen],
  1088.           [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  1089.       [AC_CHECK_LIB([dld], [dld_link],
  1090.             [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  1091.       ])
  1092.     ])
  1093.   ])
  1094. ])
  1095.       ])
  1096.     ;;
  1097.   esac
  1098.   if test "x$lt_cv_dlopen" != xno; then
  1099.     enable_dlopen=yes
  1100.   else
  1101.     enable_dlopen=no
  1102.   fi
  1103.   case $lt_cv_dlopen in
  1104.   dlopen)
  1105.     save_CPPFLAGS="$CPPFLAGS"
  1106.     AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  1107.     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1108.     save_LDFLAGS="$LDFLAGS"
  1109.     eval LDFLAGS="$LDFLAGS $export_dynamic_flag_spec"
  1110.     save_LIBS="$LIBS"
  1111.     LIBS="$lt_cv_dlopen_libs $LIBS"
  1112.     AC_CACHE_CHECK([whether a program can dlopen itself],
  1113.   lt_cv_dlopen_self, [dnl
  1114.   _LT_AC_TRY_DLOPEN_SELF(
  1115.     lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1116.     lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1117.     ])
  1118.     if test "x$lt_cv_dlopen_self" = xyes; then
  1119.       LDFLAGS="$LDFLAGS $link_static_flag"
  1120.       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1121.        lt_cv_dlopen_self_static, [dnl
  1122.   _LT_AC_TRY_DLOPEN_SELF(
  1123.     lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1124.     lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
  1125.       ])
  1126.     fi
  1127.     CPPFLAGS="$save_CPPFLAGS"
  1128.     LDFLAGS="$save_LDFLAGS"
  1129.     LIBS="$save_LIBS"
  1130.     ;;
  1131.   esac
  1132.   case $lt_cv_dlopen_self in
  1133.   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1134.   *) enable_dlopen_self=unknown ;;
  1135.   esac
  1136.   case $lt_cv_dlopen_self_static in
  1137.   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1138.   *) enable_dlopen_self_static=unknown ;;
  1139.   esac
  1140. fi
  1141. ])# AC_LIBTOOL_DLOPEN_SELF
  1142. AC_DEFUN([_LT_AC_LTCONFIG_HACK],
  1143. [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
  1144. # Sed substitution that helps us do robust quoting.  It backslashifies
  1145. # metacharacters that are still active within double-quoted strings.
  1146. Xsed='sed -e s/^X//'
  1147. sed_quote_subst='s/([[\"\`$\\]])/\1/g'
  1148. # Same as above, but do not quote variable references.
  1149. double_quote_subst='s/([[\"\`\\]])/\1/g'
  1150. # Sed substitution to delay expansion of an escaped shell variable in a
  1151. # double_quote_subst'ed string.
  1152. delay_variable_subst='s/\\\\\$/\\\$/g'
  1153. # Constants:
  1154. rm="rm -f"
  1155. # Global variables:
  1156. default_ofile=libtool
  1157. can_build_shared=yes
  1158. # All known linkers require a `.a' archive for static linking (except M$VC,
  1159. # which needs '.lib').
  1160. libext=a
  1161. ltmain="$ac_aux_dir/ltmain.sh"
  1162. ofile="$default_ofile"
  1163. with_gnu_ld="$lt_cv_prog_gnu_ld"
  1164. need_locks="$enable_libtool_lock"
  1165. old_CC="$CC"
  1166. old_CFLAGS="$CFLAGS"
  1167. # Set sane defaults for various variables
  1168. test -z "$AR" && AR=ar
  1169. test -z "$AR_FLAGS" && AR_FLAGS=cru
  1170. test -z "$AS" && AS=as
  1171. test -z "$CC" && CC=cc
  1172. test -z "$DLLTOOL" && DLLTOOL=dlltool
  1173. test -z "$LD" && LD=ld
  1174. test -z "$LN_S" && LN_S="ln -s"
  1175. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  1176. test -z "$NM" && NM=nm
  1177. test -z "$OBJDUMP" && OBJDUMP=objdump
  1178. test -z "$RANLIB" && RANLIB=:
  1179. test -z "$STRIP" && STRIP=:
  1180. test -z "$ac_objext" && ac_objext=o
  1181. if test x"$host" != x"$build"; then
  1182.   ac_tool_prefix=${host_alias}-
  1183. else
  1184.   ac_tool_prefix=
  1185. fi
  1186. # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  1187. case $host_os in
  1188. linux-gnu*) ;;
  1189. linux*) host=`echo $host | sed 's/^(.*-.*-linux)(.*)$/1-gnu2/'`
  1190. esac
  1191. case $host_os in
  1192. aix3*)
  1193.   # AIX sometimes has problems with the GCC collect2 program.  For some
  1194.   # reason, if we set the COLLECT_NAMES environment variable, the problems
  1195.   # vanish in a puff of smoke.
  1196.   if test "X${COLLECT_NAMES+set}" != Xset; then
  1197.     COLLECT_NAMES=
  1198.     export COLLECT_NAMES
  1199.   fi
  1200.   ;;
  1201. esac
  1202. # Determine commands to create old-style static archives.
  1203. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  1204. old_postinstall_cmds='chmod 644 $oldlib'
  1205. old_postuninstall_cmds=
  1206. if test -n "$RANLIB"; then
  1207.   case $host_os in
  1208.   openbsd*)
  1209.     old_postinstall_cmds="$RANLIB -t $oldlib~$old_postinstall_cmds"
  1210.     ;;
  1211.   *)
  1212.     old_postinstall_cmds="$RANLIB $oldlib~$old_postinstall_cmds"
  1213.     ;;
  1214.   esac
  1215.   old_archive_cmds="$old_archive_cmds~$RANLIB $oldlib"
  1216. fi
  1217. # Allow CC to be a program name with arguments.
  1218. set dummy $CC
  1219. compiler="[$]2"
  1220. AC_MSG_CHECKING([for objdir])
  1221. rm -f .libs 2>/dev/null
  1222. mkdir .libs 2>/dev/null
  1223. if test -d .libs; then
  1224.   objdir=.libs
  1225. else
  1226.   # MS-DOS does not allow filenames that begin with a dot.
  1227.   objdir=_libs
  1228. fi
  1229. rmdir .libs 2>/dev/null
  1230. AC_MSG_RESULT($objdir)
  1231. AC_ARG_WITH(pic,
  1232. [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
  1233. pic_mode="$withval", pic_mode=default)
  1234. test -z "$pic_mode" && pic_mode=default
  1235. # We assume here that the value for lt_cv_prog_cc_pic will not be cached
  1236. # in isolation, and that seeing it set (from the cache) indicates that
  1237. # the associated values are set (in the cache) correctly too.
  1238. AC_MSG_CHECKING([for $compiler option to produce PIC])
  1239. AC_CACHE_VAL(lt_cv_prog_cc_pic,
  1240. [ lt_cv_prog_cc_pic=
  1241.   lt_cv_prog_cc_shlib=
  1242.   lt_cv_prog_cc_wl=
  1243.   lt_cv_prog_cc_static=
  1244.   lt_cv_prog_cc_no_builtin=
  1245.   lt_cv_prog_cc_can_build_shared=$can_build_shared
  1246.   if test "$GCC" = yes; then
  1247.     lt_cv_prog_cc_wl='-Wl,'
  1248.     lt_cv_prog_cc_static='-static'
  1249.     case $host_os in
  1250.     aix*)
  1251.       # Below there is a dirty hack to force normal static linking with -ldl
  1252.       # The problem is because libdl dynamically linked with both libc and
  1253.       # libC (AIX C++ library), which obviously doesn't included in libraries
  1254.       # list by gcc. This cause undefined symbols with -static flags.
  1255.       # This hack allows C programs to be linked with "-static -ldl", but
  1256.       # not sure about C++ programs.
  1257.       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
  1258.       ;;
  1259.     amigaos*)
  1260.       # FIXME: we need at least 68020 code to build shared libraries, but
  1261.       # adding the `-m68020' flag to GCC prevents building anything better,
  1262.       # like `-m68040'.
  1263.       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
  1264.       ;;
  1265.     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  1266.       # PIC is the default for these OSes.
  1267.       ;;
  1268.     darwin* | rhapsody*)
  1269.       # PIC is the default on this platform
  1270.       # Common symbols not allowed in MH_DYLIB files
  1271.       lt_cv_prog_cc_pic='-fno-common'
  1272.       ;;
  1273.     cygwin* | mingw* | pw32* | os2*)
  1274.       # This hack is so that the source file can tell whether it is being
  1275.       # built for inclusion in a dll (and should export symbols for example).
  1276.       lt_cv_prog_cc_pic='-DDLL_EXPORT'
  1277.       ;;
  1278.     sysv4*MP*)
  1279.       if test -d /usr/nec; then
  1280.  lt_cv_prog_cc_pic=-Kconform_pic
  1281.       fi
  1282.       ;;
  1283.     *)
  1284.       lt_cv_prog_cc_pic='-fPIC'
  1285.       ;;
  1286.     esac
  1287.   else
  1288.     # PORTME Check for PIC flags for the system compiler.
  1289.     case $host_os in
  1290.     aix3* | aix4* | aix5*)
  1291.       lt_cv_prog_cc_wl='-Wl,'
  1292.       # All AIX code is PIC.
  1293.       if test "$host_cpu" = ia64; then
  1294. # AIX 5 now supports IA64 processor
  1295. lt_cv_prog_cc_static='-Bstatic'
  1296.       else
  1297. lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
  1298.       fi
  1299.       ;;
  1300.     hpux9* | hpux10* | hpux11*)
  1301.       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
  1302.       lt_cv_prog_cc_wl='-Wl,'
  1303.       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
  1304.       lt_cv_prog_cc_pic='+Z'
  1305.       ;;
  1306.     irix5* | irix6* | nonstopux*)
  1307.       lt_cv_prog_cc_wl='-Wl,'
  1308.       lt_cv_prog_cc_static='-non_shared'
  1309.       # PIC (with -KPIC) is the default.
  1310.       ;;
  1311.     cygwin* | mingw* | pw32* | os2*)
  1312.       # This hack is so that the source file can tell whether it is being
  1313.       # built for inclusion in a dll (and should export symbols for example).
  1314.       lt_cv_prog_cc_pic='-DDLL_EXPORT'
  1315.       ;;
  1316.     newsos6)
  1317.       lt_cv_prog_cc_pic='-KPIC'
  1318.       lt_cv_prog_cc_static='-Bstatic'
  1319.       ;;
  1320.     osf3* | osf4* | osf5*)
  1321.       # All OSF/1 code is PIC.
  1322.       lt_cv_prog_cc_wl='-Wl,'
  1323.       lt_cv_prog_cc_static='-non_shared'
  1324.       ;;
  1325.     sco3.2v5*)
  1326.       lt_cv_prog_cc_pic='-Kpic'
  1327.       lt_cv_prog_cc_static='-dn'
  1328.       lt_cv_prog_cc_shlib='-belf'
  1329.       ;;
  1330.     solaris*)
  1331.       lt_cv_prog_cc_pic='-KPIC'
  1332.       lt_cv_prog_cc_static='-Bstatic'
  1333.       lt_cv_prog_cc_wl='-Wl,'
  1334.       ;;
  1335.     sunos4*)
  1336.       lt_cv_prog_cc_pic='-PIC'
  1337.       lt_cv_prog_cc_static='-Bstatic'
  1338.       lt_cv_prog_cc_wl='-Qoption ld '
  1339.       ;;
  1340.     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1341.       lt_cv_prog_cc_pic='-KPIC'
  1342.       lt_cv_prog_cc_static='-Bstatic'
  1343.       lt_cv_prog_cc_wl='-Wl,'
  1344.       ;;
  1345.     uts4*)
  1346.       lt_cv_prog_cc_pic='-pic'
  1347.       lt_cv_prog_cc_static='-Bstatic'
  1348.       ;;
  1349.     sysv4*MP*)
  1350.       if test -d /usr/nec ;then
  1351. lt_cv_prog_cc_pic='-Kconform_pic'
  1352. lt_cv_prog_cc_static='-Bstatic'
  1353.       fi
  1354.       ;;
  1355.     *)
  1356.       lt_cv_prog_cc_can_build_shared=no
  1357.       ;;
  1358.     esac
  1359.   fi
  1360. ])
  1361. if test -z "$lt_cv_prog_cc_pic"; then
  1362.   AC_MSG_RESULT([none])
  1363. else
  1364.   AC_MSG_RESULT([$lt_cv_prog_cc_pic])
  1365.   # Check to make sure the pic_flag actually works.
  1366.   AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
  1367.   AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
  1368.     save_CFLAGS="$CFLAGS"
  1369.     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
  1370.     AC_TRY_COMPILE([], [], [dnl
  1371.       case $host_os in
  1372.       hpux9* | hpux10* | hpux11*)
  1373. # On HP-UX, both CC and GCC only warn that PIC is supported... then
  1374. # they create non-PIC objects.  So, if there were any warnings, we
  1375. # assume that PIC is not supported.
  1376. if test -s conftest.err; then
  1377.   lt_cv_prog_cc_pic_works=no
  1378. else
  1379.   lt_cv_prog_cc_pic_works=yes
  1380. fi
  1381. ;;
  1382.       *)
  1383. lt_cv_prog_cc_pic_works=yes
  1384. ;;
  1385.       esac
  1386.     ], [dnl
  1387.       lt_cv_prog_cc_pic_works=no
  1388.     ])
  1389.     CFLAGS="$save_CFLAGS"
  1390.   ])
  1391.   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
  1392.     lt_cv_prog_cc_pic=
  1393.     lt_cv_prog_cc_can_build_shared=no
  1394.   else
  1395.     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
  1396.   fi
  1397.   AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
  1398. fi
  1399. # Check for any special shared library compilation flags.
  1400. if test -n "$lt_cv_prog_cc_shlib"; then
  1401.   AC_MSG_WARN([`$CC' requires `$lt_cv_prog_cc_shlib' to build shared libraries])
  1402.   if echo "$old_CC $old_CFLAGS " | egrep -e "[[  ]]$lt_cv_prog_cc_shlib[[  ]]" >/dev/null; then :
  1403.   else
  1404.    AC_MSG_WARN([add `$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
  1405.     lt_cv_prog_cc_can_build_shared=no
  1406.   fi
  1407. fi
  1408. AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
  1409. AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
  1410.   lt_cv_prog_cc_static_works=no
  1411.   save_LDFLAGS="$LDFLAGS"
  1412.   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
  1413.   AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
  1414.   LDFLAGS="$save_LDFLAGS"
  1415. ])
  1416. # Belt *and* braces to stop my trousers falling down:
  1417. test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
  1418. AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
  1419. pic_flag="$lt_cv_prog_cc_pic"
  1420. special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
  1421. wl="$lt_cv_prog_cc_wl"
  1422. link_static_flag="$lt_cv_prog_cc_static"
  1423. no_builtin_flag="$lt_cv_prog_cc_no_builtin"
  1424. can_build_shared="$lt_cv_prog_cc_can_build_shared"
  1425. # Check to see if options -o and -c are simultaneously supported by compiler
  1426. AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
  1427. AC_CACHE_VAL([lt_cv_compiler_c_o], [
  1428. $rm -r conftest 2>/dev/null
  1429. mkdir conftest
  1430. cd conftest
  1431. echo "int some_variable = 0;" > conftest.$ac_ext
  1432. mkdir out
  1433. # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
  1434. # that will create temporary files in the current directory regardless of
  1435. # the output directory.  Thus, making CWD read-only will cause this test
  1436. # to fail, enabling locking or at least warning the user not to do parallel
  1437. # builds.
  1438. chmod -w .
  1439. save_CFLAGS="$CFLAGS"
  1440. CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
  1441. compiler_c_o=no
  1442. if { (eval echo configure:__oline__: "$ac_compile") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
  1443.   # The compiler can only warn and ignore the option if not recognized
  1444.   # So say no if there are warnings
  1445.   if test -s out/conftest.err; then
  1446.     lt_cv_compiler_c_o=no
  1447.   else
  1448.     lt_cv_compiler_c_o=yes
  1449.   fi
  1450. else
  1451.   # Append any errors to the config.log.
  1452.   cat out/conftest.err 1>&AC_FD_CC
  1453.   lt_cv_compiler_c_o=no
  1454. fi
  1455. CFLAGS="$save_CFLAGS"
  1456. chmod u+w .
  1457. $rm conftest* out/*
  1458. rmdir out
  1459. cd ..
  1460. rmdir conftest
  1461. $rm -r conftest 2>/dev/null
  1462. ])
  1463. compiler_c_o=$lt_cv_compiler_c_o
  1464. AC_MSG_RESULT([$compiler_c_o])
  1465. if test x"$compiler_c_o" = x"yes"; then
  1466.   # Check to see if we can write to a .lo
  1467.   AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
  1468.   AC_CACHE_VAL([lt_cv_compiler_o_lo], [
  1469.   lt_cv_compiler_o_lo=no
  1470.   save_CFLAGS="$CFLAGS"
  1471.   CFLAGS="$CFLAGS -c -o conftest.lo"
  1472.   save_objext="$ac_objext"
  1473.   ac_objext=lo
  1474.   AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
  1475.     # The compiler can only warn and ignore the option if not recognized
  1476.     # So say no if there are warnings
  1477.     if test -s conftest.err; then
  1478.       lt_cv_compiler_o_lo=no
  1479.     else
  1480.       lt_cv_compiler_o_lo=yes
  1481.     fi
  1482.   ])
  1483.   ac_objext="$save_objext"
  1484.   CFLAGS="$save_CFLAGS"
  1485.   ])
  1486.   compiler_o_lo=$lt_cv_compiler_o_lo
  1487.   AC_MSG_RESULT([$compiler_o_lo])
  1488. else
  1489.   compiler_o_lo=no
  1490. fi
  1491. # Check to see if we can do hard links to lock some files if needed
  1492. hard_links="nottested"
  1493. if test "$compiler_c_o" = no && test "$need_locks" != no; then
  1494.   # do not overwrite the value of need_locks provided by the user
  1495.   AC_MSG_CHECKING([if we can lock with hard links])
  1496.   hard_links=yes
  1497.   $rm conftest*
  1498.   ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1499.   touch conftest.a
  1500.   ln conftest.a conftest.b 2>&5 || hard_links=no
  1501.   ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1502.   AC_MSG_RESULT([$hard_links])
  1503.   if test "$hard_links" = no; then
  1504.     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  1505.     need_locks=warn
  1506.   fi
  1507. else
  1508.   need_locks=no
  1509. fi
  1510. if test "$GCC" = yes; then
  1511.   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
  1512.   AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
  1513.   echo "int some_variable = 0;" > conftest.$ac_ext
  1514.   save_CFLAGS="$CFLAGS"
  1515.   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
  1516.   compiler_rtti_exceptions=no
  1517.   AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
  1518.     # The compiler can only warn and ignore the option if not recognized
  1519.     # So say no if there are warnings
  1520.     if test -s conftest.err; then
  1521.       compiler_rtti_exceptions=no
  1522.     else
  1523.       compiler_rtti_exceptions=yes
  1524.     fi
  1525.   ])
  1526.   CFLAGS="$save_CFLAGS"
  1527.   AC_MSG_RESULT([$compiler_rtti_exceptions])
  1528.   if test "$compiler_rtti_exceptions" = "yes"; then
  1529.     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
  1530.   else
  1531.     no_builtin_flag=' -fno-builtin'
  1532.   fi
  1533. fi
  1534. # See if the linker supports building shared libraries.
  1535. AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
  1536. allow_undefined_flag=
  1537. no_undefined_flag=
  1538. need_lib_prefix=unknown
  1539. need_version=unknown
  1540. # when you set need_version to no, make sure it does not cause -set_version
  1541. # flags to be left without arguments
  1542. archive_cmds=
  1543. archive_expsym_cmds=
  1544. old_archive_from_new_cmds=
  1545. old_archive_from_expsyms_cmds=
  1546. export_dynamic_flag_spec=
  1547. whole_archive_flag_spec=
  1548. thread_safe_flag_spec=
  1549. hardcode_into_libs=no
  1550. hardcode_libdir_flag_spec=
  1551. hardcode_libdir_separator=
  1552. hardcode_direct=no
  1553. hardcode_minus_L=no
  1554. hardcode_shlibpath_var=unsupported
  1555. runpath_var=
  1556. link_all_deplibs=unknown
  1557. always_export_symbols=no
  1558. export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '''s/.* //''' | sort | uniq > $export_symbols'
  1559. # include_expsyms should be a list of space-separated symbols to be *always*
  1560. # included in the symbol list
  1561. include_expsyms=
  1562. # exclude_expsyms can be an egrep regular expression of symbols to exclude
  1563. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  1564. # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  1565. # as well as any symbol that contains `d'.
  1566. exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  1567. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  1568. # platforms (ab)use it in PIC code, but their linkers get confused if
  1569. # the symbol is explicitly referenced.  Since portable code cannot
  1570. # rely on this symbol name, it's probably fine to never include it in
  1571. # preloaded symbol tables.
  1572. extract_expsyms_cmds=
  1573. case $host_os in
  1574. cygwin* | mingw* | pw32*)
  1575.   # FIXME: the MSVC++ port hasn't been tested in a loooong time
  1576.   # When not using gcc, we currently assume that we are using
  1577.   # Microsoft Visual C++.
  1578.   if test "$GCC" != yes; then
  1579.     with_gnu_ld=no
  1580.   fi
  1581.   ;;
  1582. openbsd*)
  1583.   with_gnu_ld=no
  1584.   ;;
  1585. esac
  1586. ld_shlibs=yes
  1587. if test "$with_gnu_ld" = yes; then
  1588.   # If archive_cmds runs LD, not CC, wlarc should be empty
  1589.   wlarc='${wl}'
  1590.   # See if GNU ld supports shared libraries.
  1591.   case $host_os in
  1592.   aix3* | aix4* | aix5*)
  1593.     # On AIX, the GNU linker is very broken
  1594.     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
  1595.     ld_shlibs=no
  1596.     cat <<EOF 1>&2
  1597. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  1598. *** to be unable to reliably create shared libraries on AIX.
  1599. *** Therefore, libtool is disabling shared libraries support.  If you
  1600. *** really care for shared libraries, you may want to modify your PATH
  1601. *** so that a non-GNU linker is found, and then restart.
  1602. EOF
  1603.     ;;
  1604.   amigaos*)
  1605.     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)'
  1606.     hardcode_libdir_flag_spec='-L$libdir'
  1607.     hardcode_minus_L=yes
  1608.     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  1609.     # that the semantics of dynamic libraries on AmigaOS, at least up
  1610.     # to version 4, is to share data among multiple programs linked
  1611.     # with the same dynamic library.  Since this doesn't match the
  1612.     # behavior of shared libraries on other platforms, we can use
  1613.     # them.
  1614.     ld_shlibs=no
  1615.     ;;
  1616.   beos*)
  1617.     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1618.       allow_undefined_flag=unsupported
  1619.       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  1620.       # support --undefined.  This deserves some investigation.  FIXME
  1621.       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1622.     else
  1623.       ld_shlibs=no
  1624.     fi
  1625.     ;;
  1626.   cygwin* | mingw* | pw32*)
  1627.     # hardcode_libdir_flag_spec is actually meaningless, as there is
  1628.     # no search path for DLLs.
  1629.     hardcode_libdir_flag_spec='-L$libdir'
  1630.     allow_undefined_flag=unsupported
  1631.     always_export_symbols=yes
  1632.     extract_expsyms_cmds='test -f $output_objdir/impgen.c || 
  1633.       sed -e "/^# /* impgen.c starts here *//,/^# /* impgen.c ends here *// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
  1634.       test -f $output_objdir/impgen.exe || (cd $output_objdir && 
  1635.       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; 
  1636.       else $CC -o impgen impgen.c ; fi)~
  1637.       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
  1638.     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
  1639.     # cygwin and mingw dlls have different entry points and sets of symbols
  1640.     # to exclude.
  1641.     # FIXME: what about values for MSVC?
  1642.     dll_entry=__cygwin_dll_entry@12
  1643.     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
  1644.     case $host_os in
  1645.     mingw*)
  1646.       # mingw values
  1647.       dll_entry=_DllMainCRTStartup@12
  1648.       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
  1649.       ;;
  1650.     esac
  1651.     # mingw and cygwin differ, and it's simplest to just exclude the union
  1652.     # of the two symbol sets.
  1653.     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
  1654.     # recent cygwin and mingw systems supply a stub DllMain which the user
  1655.     # can override, but on older systems we have to supply one (in ltdll.c)
  1656.     if test "x$lt_cv_need_dllmain" = "xyes"; then
  1657.       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
  1658.       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~
  1659. test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
  1660.     else
  1661.       ltdll_obj=
  1662.       ltdll_cmds=
  1663.     fi
  1664.     # Extract the symbol export list from an `--export-all' def file,
  1665.     # then regenerate the def file from the symbol export list, so that
  1666.     # the compiled dll only exports the symbol export list.
  1667.     # Be careful not to strip the DATA tag left be newer dlltools.
  1668.     export_symbols_cmds="$ltdll_cmds"'
  1669.       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
  1670.       sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
  1671.     # If the export-symbols file already is a .def file (1st line
  1672.     # is EXPORTS), use it as is.
  1673.     # If DATA tags from a recent dlltool are present, honour them!
  1674.     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
  1675. cp $export_symbols $output_objdir/$soname-def;
  1676.       else
  1677. echo EXPORTS > $output_objdir/$soname-def;
  1678. _lt_hint=1;
  1679. cat $export_symbols | while read symbol; do
  1680.  set dummy $symbol;
  1681.  case [$]# in
  1682.    2) echo "   [$]2 @ $_lt_hint ; " >> $output_objdir/$soname-def;;
  1683.    4) echo "   [$]2 [$]3 [$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr $_lt_hint - 1`;;
  1684.    *) echo "     [$]2 @ $_lt_hint [$]3 ; " >> $output_objdir/$soname-def;;
  1685.  esac;
  1686.  _lt_hint=`expr 1 + $_lt_hint`;
  1687. done;
  1688.       fi~
  1689.       '"$ltdll_cmds"'
  1690.       $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~
  1691.       $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~
  1692.       $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~
  1693.       $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~
  1694.       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
  1695.     ;;
  1696.   netbsd*)
  1697.     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1698.       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  1699.       wlarc=
  1700.     else
  1701.       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1702.       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1703.     fi
  1704.     ;;
  1705.   solaris* | sysv5*)
  1706.     if $LD -v 2>&1 | egrep 'BFD 2.8' > /dev/null; then
  1707.       ld_shlibs=no
  1708.       cat <<EOF 1>&2
  1709. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  1710. *** create shared libraries on Solaris systems.  Therefore, libtool
  1711. *** is disabling shared libraries support.  We urge you to upgrade GNU
  1712. *** binutils to release 2.9.1 or newer.  Another option is to modify
  1713. *** your PATH or compiler configuration so that the native linker is
  1714. *** used, and then restart.
  1715. EOF
  1716.     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1717.       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1718.       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1719.     else
  1720.       ld_shlibs=no
  1721.     fi
  1722.     ;;
  1723.   sunos4*)
  1724.     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  1725.     wlarc=
  1726.     hardcode_direct=yes
  1727.     hardcode_shlibpath_var=no
  1728.     ;;
  1729.   *)
  1730.     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1731.       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1732.       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1733.     else
  1734.       ld_shlibs=no
  1735.     fi
  1736.     ;;
  1737.   esac
  1738.   if test "$ld_shlibs" = yes; then
  1739.     runpath_var=LD_RUN_PATH
  1740.     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
  1741.     export_dynamic_flag_spec='${wl}--export-dynamic'
  1742.     case $host_os in
  1743.     cygwin* | mingw* | pw32*)
  1744.       # dlltool doesn't understand --whole-archive et. al.
  1745.       whole_archive_flag_spec=
  1746.       ;;
  1747.     *)
  1748.       # ancient GNU ld didn't support --whole-archive et. al.
  1749.       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
  1750. whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  1751.       else
  1752. whole_archive_flag_spec=
  1753.       fi
  1754.       ;;
  1755.     esac
  1756.   fi
  1757. else
  1758.   # PORTME fill in a description of your system's linker (not GNU ld)
  1759.   case $host_os in
  1760.   aix3*)
  1761.     allow_undefined_flag=unsupported
  1762.     always_export_symbols=yes
  1763.     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'
  1764.     # Note: this linker hardcodes the directories in LIBPATH if there
  1765.     # are no directories specified by -L.
  1766.     hardcode_minus_L=yes
  1767.     if test "$GCC" = yes && test -z "$link_static_flag"; then
  1768.       # Neither direct hardcoding nor static linking is supported with a
  1769.       # broken collect2.
  1770.       hardcode_direct=unsupported
  1771.     fi
  1772.     ;;
  1773.   aix4* | aix5*)
  1774.     if test "$host_cpu" = ia64; then
  1775.       # On IA64, the linker does run time linking by default, so we don't
  1776.       # have to do anything special.
  1777.       aix_use_runtimelinking=no
  1778.       exp_sym_flag='-Bexport'
  1779.       no_entry_flag=""
  1780.     else
  1781.       aix_use_runtimelinking=no
  1782.       # Test if we are trying to use run time linking or normal
  1783.       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  1784.       # need to do runtime linking.
  1785.       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  1786. for ld_flag in $LDFLAGS; do
  1787.   case $ld_flag in
  1788.   *-brtl*)
  1789.     aix_use_runtimelinking=yes
  1790.     break
  1791.   ;;
  1792.   esac
  1793. done
  1794.       esac
  1795.       exp_sym_flag='-bexport'
  1796.       no_entry_flag='-bnoentry'
  1797.     fi
  1798.     # When large executables or shared objects are built, AIX ld can
  1799.     # have problems creating the table of contents.  If linking a library
  1800.     # or program results in "error TOC overflow" add -mminimal-toc to
  1801.     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
  1802.     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  1803.     hardcode_direct=yes
  1804.     archive_cmds=''
  1805.     hardcode_libdir_separator=':'
  1806.     if test "$GCC" = yes; then
  1807.       case $host_os in aix4.[[012]]|aix4.[[012]].*)
  1808. collect2name=`${CC} -print-prog-name=collect2`
  1809. if test -f "$collect2name" && 
  1810.   strings "$collect2name" | grep resolve_lib_name >/dev/null
  1811. then
  1812.   # We have reworked collect2
  1813.   hardcode_direct=yes
  1814. else
  1815.   # We have old collect2
  1816.   hardcode_direct=unsupported
  1817.   # It fails to find uninstalled libraries when the uninstalled
  1818.   # path is not listed in the libpath.  Setting hardcode_minus_L
  1819.   # to unsupported forces relinking
  1820.   hardcode_minus_L=yes
  1821.   hardcode_libdir_flag_spec='-L$libdir'
  1822.   hardcode_libdir_separator=
  1823. fi
  1824.       esac
  1825.       shared_flag='-shared'
  1826.     else
  1827.       # not using gcc
  1828.       if test "$host_cpu" = ia64; then
  1829. shared_flag='${wl}-G'
  1830.       else
  1831. if test "$aix_use_runtimelinking" = yes; then
  1832.   shared_flag='${wl}-G'
  1833. else
  1834.   shared_flag='${wl}-bM:SRE'
  1835. fi
  1836.       fi
  1837.     fi
  1838.     # It seems that -bexpall can do strange things, so it is better to
  1839.     # generate a list of symbols to export.
  1840.     always_export_symbols=yes
  1841.     if test "$aix_use_runtimelinking" = yes; then
  1842.       # Warning - without using the other runtime loading flags (-brtl),
  1843.       # -berok will link without error, but may produce a broken library.
  1844.       allow_undefined_flag='-berok'
  1845.       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
  1846.       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"
  1847.     else
  1848.       if test "$host_cpu" = ia64; then
  1849. hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
  1850. allow_undefined_flag="-z nodefs"
  1851. 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"
  1852.       else
  1853. hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
  1854. # Warning - without using the other run time loading flags,
  1855. # -berok will link without error, but may produce a broken library.
  1856. allow_undefined_flag='${wl}-berok'
  1857. # This is a bit strange, but is similar to how AIX traditionally builds
  1858. # it's shared libraries.
  1859. 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'
  1860.       fi
  1861.     fi
  1862.     ;;
  1863.   amigaos*)
  1864.     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)'
  1865.     hardcode_libdir_flag_spec='-L$libdir'
  1866.     hardcode_minus_L=yes
  1867.     # see comment about different semantics on the GNU ld section
  1868.     ld_shlibs=no
  1869.     ;;
  1870.   cygwin* | mingw* | pw32*)
  1871.     # When not using gcc, we currently assume that we are using
  1872.     # Microsoft Visual C++.
  1873.     # hardcode_libdir_flag_spec is actually meaningless, as there is
  1874.     # no search path for DLLs.
  1875.     hardcode_libdir_flag_spec=' '
  1876.     allow_undefined_flag=unsupported
  1877.     # Tell ltmain to make .lib files, not .a files.
  1878.     libext=lib
  1879.     # FIXME: Setting linknames here is a bad hack.
  1880.     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '''s/ -lc$//'''` -link -dll~linknames='
  1881.     # The linker will automatically build a .lib file if we build a DLL.
  1882.     old_archive_from_new_cmds='true'
  1883.     # FIXME: Should let the user specify the lib program.
  1884.     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
  1885.     fix_srcfile_path='`cygpath -w "$srcfile"`'
  1886.     ;;
  1887.   darwin* | rhapsody*)
  1888.     case "$host_os" in
  1889.     rhapsody* | darwin1.[[012]])
  1890.       allow_undefined_flag='-undefined suppress'
  1891.       ;;
  1892.     *) # Darwin 1.3 on
  1893.       allow_undefined_flag='-flat_namespace -undefined suppress'
  1894.       ;;
  1895.     esac
  1896.     # FIXME: Relying on posixy $() will cause problems for
  1897.     #        cross-compilation, but unfortunately the echo tests do not
  1898.     #        yet detect zsh echo's removal of  escapes.  Also zsh mangles
  1899.     #      `"' quotes if we put them in here... so don't!
  1900.     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)'
  1901.     # We need to add '_' to the symbols in $export_symbols first
  1902.     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
  1903.     hardcode_direct=yes
  1904.     hardcode_shlibpath_var=no
  1905.     whole_archive_flag_spec='-all_load $convenience'
  1906.     ;;
  1907.   freebsd1*)
  1908.     ld_shlibs=no
  1909.     ;;
  1910.   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  1911.   # support.  Future versions do this automatically, but an explicit c++rt0.o
  1912.   # does not break anything, and helps significantly (at the cost of a little
  1913.   # extra space).
  1914.   freebsd2.2*)
  1915.     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  1916.     hardcode_libdir_flag_spec='-R$libdir'
  1917.     hardcode_direct=yes
  1918.     hardcode_shlibpath_var=no
  1919.     ;;
  1920.   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  1921.   freebsd2*)
  1922.     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  1923.     hardcode_direct=yes
  1924.     hardcode_minus_L=yes
  1925.     hardcode_shlibpath_var=no
  1926.     ;;
  1927.   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  1928.   freebsd*)
  1929.     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  1930.     hardcode_libdir_flag_spec='-R$libdir'
  1931.     hardcode_direct=yes
  1932.     hardcode_shlibpath_var=no
  1933.     ;;
  1934.   hpux9* | hpux10* | hpux11*)
  1935.     case $host_os in
  1936.     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' ;;
  1937.     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
  1938.     esac
  1939.     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  1940.     hardcode_libdir_separator=:
  1941.     hardcode_direct=yes
  1942.     hardcode_minus_L=yes # Not in the search PATH, but as the default
  1943.  # location of the library.
  1944.     export_dynamic_flag_spec='${wl}-E'
  1945.     ;;
  1946.   irix5* | irix6* | nonstopux*)
  1947.     if test "$GCC" = yes; then
  1948.       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'
  1949.       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1950.     else
  1951.       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'
  1952.       hardcode_libdir_flag_spec='-rpath $libdir'
  1953.     fi
  1954.     hardcode_libdir_separator=: