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.

3189 lines
91 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
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
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. #! /bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 2.13
  4. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  5. #
  6. # This configure script is free software; the Free Software Foundation
  7. # gives unlimited permission to copy, distribute and modify it.
  8. # Defaults:
  9. ac_help=
  10. ac_default_prefix=/usr/local
  11. # Any additions from configure.in:
  12. ac_help="$ac_help
  13. --enable-shared build shared libraries [default=no]
  14. --enable-shared=PKGS only build shared libraries if the current package
  15. appears as an element in the PKGS list"
  16. ac_help="$ac_help
  17. --enable-static build static libraries [default=yes]
  18. --enable-static=PKGS only build shared libraries if the current package
  19. appears as an element in the PKGS list"
  20. ac_help="$ac_help
  21. --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
  22. ac_help="$ac_help
  23. --with-gmp use external fast GNU gmp low-level functions"
  24. # Initialize some variables set by options.
  25. # The variables have the same names as the options, with
  26. # dashes changed to underlines.
  27. build=NONE
  28. cache_file=./config.cache
  29. exec_prefix=NONE
  30. host=NONE
  31. no_create=
  32. nonopt=NONE
  33. no_recursion=
  34. prefix=NONE
  35. program_prefix=NONE
  36. program_suffix=NONE
  37. program_transform_name=s,x,x,
  38. silent=
  39. site=
  40. srcdir=
  41. target=NONE
  42. verbose=
  43. x_includes=NONE
  44. x_libraries=NONE
  45. bindir='${exec_prefix}/bin'
  46. sbindir='${exec_prefix}/sbin'
  47. libexecdir='${exec_prefix}/libexec'
  48. datadir='${prefix}/share'
  49. sysconfdir='${prefix}/etc'
  50. sharedstatedir='${prefix}/com'
  51. localstatedir='${prefix}/var'
  52. libdir='${exec_prefix}/lib'
  53. includedir='${prefix}/include'
  54. oldincludedir='/usr/include'
  55. infodir='${prefix}/info'
  56. mandir='${prefix}/man'
  57. # Initialize some other variables.
  58. subdirs=
  59. MFLAGS= MAKEFLAGS=
  60. SHELL=${CONFIG_SHELL-/bin/sh}
  61. # Maximum number of lines to put in a shell here document.
  62. ac_max_here_lines=12
  63. ac_prev=
  64. for ac_option
  65. do
  66. # If the previous option needs an argument, assign it.
  67. if test -n "$ac_prev"; then
  68. eval "$ac_prev=\$ac_option"
  69. ac_prev=
  70. continue
  71. fi
  72. case "$ac_option" in
  73. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  74. *) ac_optarg= ;;
  75. esac
  76. # Accept the important Cygnus configure options, so we can diagnose typos.
  77. case "$ac_option" in
  78. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  79. ac_prev=bindir ;;
  80. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  81. bindir="$ac_optarg" ;;
  82. -build | --build | --buil | --bui | --bu)
  83. ac_prev=build ;;
  84. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  85. build="$ac_optarg" ;;
  86. -cache-file | --cache-file | --cache-fil | --cache-fi \
  87. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  88. ac_prev=cache_file ;;
  89. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  90. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  91. cache_file="$ac_optarg" ;;
  92. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  93. ac_prev=datadir ;;
  94. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  95. | --da=*)
  96. datadir="$ac_optarg" ;;
  97. -disable-* | --disable-*)
  98. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  99. # Reject names that are not valid shell variable names.
  100. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  101. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  102. fi
  103. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  104. eval "enable_${ac_feature}=no" ;;
  105. -enable-* | --enable-*)
  106. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  107. # Reject names that are not valid shell variable names.
  108. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  109. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  110. fi
  111. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  112. case "$ac_option" in
  113. *=*) ;;
  114. *) ac_optarg=yes ;;
  115. esac
  116. eval "enable_${ac_feature}='$ac_optarg'" ;;
  117. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  118. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  119. | --exec | --exe | --ex)
  120. ac_prev=exec_prefix ;;
  121. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  122. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  123. | --exec=* | --exe=* | --ex=*)
  124. exec_prefix="$ac_optarg" ;;
  125. -gas | --gas | --ga | --g)
  126. # Obsolete; use --with-gas.
  127. with_gas=yes ;;
  128. -help | --help | --hel | --he)
  129. # Omit some internal or obsolete options to make the list less imposing.
  130. # This message is too long to be a string in the A/UX 3.1 sh.
  131. cat << EOF
  132. Usage: configure [options] [host]
  133. Options: [defaults in brackets after descriptions]
  134. Configuration:
  135. --cache-file=FILE cache test results in FILE
  136. --help print this message
  137. --no-create do not create output files
  138. --quiet, --silent do not print \`checking...' messages
  139. --version print the version of autoconf that created configure
  140. Directory and file names:
  141. --prefix=PREFIX install architecture-independent files in PREFIX
  142. [$ac_default_prefix]
  143. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  144. [same as prefix]
  145. --bindir=DIR user executables in DIR [EPREFIX/bin]
  146. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  147. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  148. --datadir=DIR read-only architecture-independent data in DIR
  149. [PREFIX/share]
  150. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  151. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  152. [PREFIX/com]
  153. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  154. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  155. --includedir=DIR C header files in DIR [PREFIX/include]
  156. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  157. --infodir=DIR info documentation in DIR [PREFIX/info]
  158. --mandir=DIR man documentation in DIR [PREFIX/man]
  159. --srcdir=DIR find the sources in DIR [configure dir or ..]
  160. --program-prefix=PREFIX prepend PREFIX to installed program names
  161. --program-suffix=SUFFIX append SUFFIX to installed program names
  162. --program-transform-name=PROGRAM
  163. run sed PROGRAM on installed program names
  164. EOF
  165. cat << EOF
  166. Host type:
  167. --build=BUILD configure for building on BUILD [BUILD=HOST]
  168. --host=HOST configure for HOST [guessed]
  169. --target=TARGET configure for TARGET [TARGET=HOST]
  170. Features and packages:
  171. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  172. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  173. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  174. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  175. --x-includes=DIR X include files are in DIR
  176. --x-libraries=DIR X library files are in DIR
  177. EOF
  178. if test -n "$ac_help"; then
  179. echo "--enable and --with options recognized:$ac_help"
  180. fi
  181. exit 0 ;;
  182. -host | --host | --hos | --ho)
  183. ac_prev=host ;;
  184. -host=* | --host=* | --hos=* | --ho=*)
  185. host="$ac_optarg" ;;
  186. -includedir | --includedir | --includedi | --included | --include \
  187. | --includ | --inclu | --incl | --inc)
  188. ac_prev=includedir ;;
  189. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  190. | --includ=* | --inclu=* | --incl=* | --inc=*)
  191. includedir="$ac_optarg" ;;
  192. -infodir | --infodir | --infodi | --infod | --info | --inf)
  193. ac_prev=infodir ;;
  194. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  195. infodir="$ac_optarg" ;;
  196. -libdir | --libdir | --libdi | --libd)
  197. ac_prev=libdir ;;
  198. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  199. libdir="$ac_optarg" ;;
  200. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  201. | --libexe | --libex | --libe)
  202. ac_prev=libexecdir ;;
  203. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  204. | --libexe=* | --libex=* | --libe=*)
  205. libexecdir="$ac_optarg" ;;
  206. -localstatedir | --localstatedir | --localstatedi | --localstated \
  207. | --localstate | --localstat | --localsta | --localst \
  208. | --locals | --local | --loca | --loc | --lo)
  209. ac_prev=localstatedir ;;
  210. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  211. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  212. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  213. localstatedir="$ac_optarg" ;;
  214. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  215. ac_prev=mandir ;;
  216. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  217. mandir="$ac_optarg" ;;
  218. -nfp | --nfp | --nf)
  219. # Obsolete; use --without-fp.
  220. with_fp=no ;;
  221. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  222. | --no-cr | --no-c)
  223. no_create=yes ;;
  224. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  225. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  226. no_recursion=yes ;;
  227. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  228. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  229. | --oldin | --oldi | --old | --ol | --o)
  230. ac_prev=oldincludedir ;;
  231. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  232. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  233. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  234. oldincludedir="$ac_optarg" ;;
  235. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  236. ac_prev=prefix ;;
  237. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  238. prefix="$ac_optarg" ;;
  239. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  240. | --program-pre | --program-pr | --program-p)
  241. ac_prev=program_prefix ;;
  242. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  243. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  244. program_prefix="$ac_optarg" ;;
  245. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  246. | --program-suf | --program-su | --program-s)
  247. ac_prev=program_suffix ;;
  248. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  249. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  250. program_suffix="$ac_optarg" ;;
  251. -program-transform-name | --program-transform-name \
  252. | --program-transform-nam | --program-transform-na \
  253. | --program-transform-n | --program-transform- \
  254. | --program-transform | --program-transfor \
  255. | --program-transfo | --program-transf \
  256. | --program-trans | --program-tran \
  257. | --progr-tra | --program-tr | --program-t)
  258. ac_prev=program_transform_name ;;
  259. -program-transform-name=* | --program-transform-name=* \
  260. | --program-transform-nam=* | --program-transform-na=* \
  261. | --program-transform-n=* | --program-transform-=* \
  262. | --program-transform=* | --program-transfor=* \
  263. | --program-transfo=* | --program-transf=* \
  264. | --program-trans=* | --program-tran=* \
  265. | --progr-tra=* | --program-tr=* | --program-t=*)
  266. program_transform_name="$ac_optarg" ;;
  267. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  268. | -silent | --silent | --silen | --sile | --sil)
  269. silent=yes ;;
  270. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  271. ac_prev=sbindir ;;
  272. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  273. | --sbi=* | --sb=*)
  274. sbindir="$ac_optarg" ;;
  275. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  276. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  277. | --sharedst | --shareds | --shared | --share | --shar \
  278. | --sha | --sh)
  279. ac_prev=sharedstatedir ;;
  280. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  281. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  282. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  283. | --sha=* | --sh=*)
  284. sharedstatedir="$ac_optarg" ;;
  285. -site | --site | --sit)
  286. ac_prev=site ;;
  287. -site=* | --site=* | --sit=*)
  288. site="$ac_optarg" ;;
  289. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  290. ac_prev=srcdir ;;
  291. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  292. srcdir="$ac_optarg" ;;
  293. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  294. | --syscon | --sysco | --sysc | --sys | --sy)
  295. ac_prev=sysconfdir ;;
  296. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  297. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  298. sysconfdir="$ac_optarg" ;;
  299. -target | --target | --targe | --targ | --tar | --ta | --t)
  300. ac_prev=target ;;
  301. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  302. target="$ac_optarg" ;;
  303. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  304. verbose=yes ;;
  305. -version | --version | --versio | --versi | --vers)
  306. echo "configure generated by autoconf version 2.13"
  307. exit 0 ;;
  308. -with-* | --with-*)
  309. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  310. # Reject names that are not valid shell variable names.
  311. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  312. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  313. fi
  314. ac_package=`echo $ac_package| sed 's/-/_/g'`
  315. case "$ac_option" in
  316. *=*) ;;
  317. *) ac_optarg=yes ;;
  318. esac
  319. eval "with_${ac_package}='$ac_optarg'" ;;
  320. -without-* | --without-*)
  321. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  322. # Reject names that are not valid shell variable names.
  323. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  324. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  325. fi
  326. ac_package=`echo $ac_package| sed 's/-/_/g'`
  327. eval "with_${ac_package}=no" ;;
  328. --x)
  329. # Obsolete; use --with-x.
  330. with_x=yes ;;
  331. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  332. | --x-incl | --x-inc | --x-in | --x-i)
  333. ac_prev=x_includes ;;
  334. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  335. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  336. x_includes="$ac_optarg" ;;
  337. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  338. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  339. ac_prev=x_libraries ;;
  340. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  341. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  342. x_libraries="$ac_optarg" ;;
  343. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  344. ;;
  345. *)
  346. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  347. echo "configure: warning: $ac_option: invalid host type" 1>&2
  348. fi
  349. if test "x$nonopt" != xNONE; then
  350. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  351. fi
  352. nonopt="$ac_option"
  353. ;;
  354. esac
  355. done
  356. if test -n "$ac_prev"; then
  357. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  358. fi
  359. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  360. # File descriptor usage:
  361. # 0 standard input
  362. # 1 file creation
  363. # 2 errors and warnings
  364. # 3 some systems may open it to /dev/tty
  365. # 4 used on the Kubota Titan
  366. # 6 checking for... messages and results
  367. # 5 compiler messages saved in config.log
  368. if test "$silent" = yes; then
  369. exec 6>/dev/null
  370. else
  371. exec 6>&1
  372. fi
  373. exec 5>./config.log
  374. echo "\
  375. This file contains any messages produced by compilers while
  376. running configure, to aid debugging if configure makes a mistake.
  377. " 1>&5
  378. # Strip out --no-create and --no-recursion so they do not pile up.
  379. # Also quote any args containing shell metacharacters.
  380. ac_configure_args=
  381. for ac_arg
  382. do
  383. case "$ac_arg" in
  384. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  385. | --no-cr | --no-c) ;;
  386. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  387. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  388. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  389. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  390. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  391. esac
  392. done
  393. # NLS nuisances.
  394. # Only set these to C if already set. These must not be set unconditionally
  395. # because not all systems understand e.g. LANG=C (notably SCO).
  396. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  397. # Non-C LC_CTYPE values break the ctype check.
  398. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  399. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  400. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  401. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  402. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  403. rm -rf conftest* confdefs.h
  404. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  405. echo > confdefs.h
  406. # A filename unique to this package, relative to the directory that
  407. # configure is in, which we can look for to find out if srcdir is correct.
  408. ac_unique_file=src/integer/gcd/cl_I_gcd.cc
  409. # Find the source files, if location was not specified.
  410. if test -z "$srcdir"; then
  411. ac_srcdir_defaulted=yes
  412. # Try the directory containing this script, then its parent.
  413. ac_prog=$0
  414. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  415. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  416. srcdir=$ac_confdir
  417. if test ! -r $srcdir/$ac_unique_file; then
  418. srcdir=..
  419. fi
  420. else
  421. ac_srcdir_defaulted=no
  422. fi
  423. if test ! -r $srcdir/$ac_unique_file; then
  424. if test "$ac_srcdir_defaulted" = yes; then
  425. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  426. else
  427. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  428. fi
  429. fi
  430. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  431. # Prefer explicitly selected file to automatically selected ones.
  432. if test -z "$CONFIG_SITE"; then
  433. if test "x$prefix" != xNONE; then
  434. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  435. else
  436. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  437. fi
  438. fi
  439. for ac_site_file in $CONFIG_SITE; do
  440. if test -r "$ac_site_file"; then
  441. echo "loading site script $ac_site_file"
  442. . "$ac_site_file"
  443. fi
  444. done
  445. if test -r "$cache_file"; then
  446. echo "loading cache $cache_file"
  447. . $cache_file
  448. else
  449. echo "creating cache $cache_file"
  450. > $cache_file
  451. fi
  452. ac_ext=c
  453. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  454. ac_cpp='$CPP $CPPFLAGS'
  455. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  456. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  457. cross_compiling=$ac_cv_prog_cc_cross
  458. ac_exeext=
  459. ac_objext=o
  460. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  461. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  462. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  463. ac_n= ac_c='
  464. ' ac_t=' ' ac_tt=
  465. else
  466. ac_n=-n ac_c= ac_t= ac_tt='
  467. '
  468. fi
  469. else
  470. ac_n= ac_c='\c' ac_t= ac_tt='
  471. '
  472. fi
  473. echo $ac_n "checking whether ${MAKE-make} sets \$(MAKE)""... $ac_c" 1>&6
  474. echo "configure:541: checking whether ${MAKE-make} sets \$(MAKE)" >&5
  475. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  476. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  477. echo $ac_n "(cached) $ac_c" 1>&6
  478. else
  479. cat > conftestmake <<\EOF
  480. all:
  481. @echo 'ac_maketemp="${MAKE}"'
  482. EOF
  483. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  484. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  485. if test -n "$ac_maketemp"; then
  486. eval ac_cv_prog_make_${ac_make}_set=yes
  487. else
  488. eval ac_cv_prog_make_${ac_make}_set=no
  489. fi
  490. rm -f conftestmake
  491. fi
  492. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  493. echo "$ac_t""yes" 1>&6
  494. SET_MAKE=
  495. else
  496. echo "$ac_t""no" 1>&6
  497. SET_MAKE="MAKE=${MAKE-make}"
  498. fi
  499. extrasub="$extrasub"'
  500. /@subdir@/{
  501. h
  502. g
  503. s/@subdir@/src/
  504. p
  505. g
  506. s/@subdir@/tests/
  507. p
  508. g
  509. s/@subdir@/benchmarks/
  510. p
  511. g
  512. s/@subdir@/examples/
  513. p
  514. g
  515. s/@subdir@/doc/
  516. p
  517. d
  518. }
  519. '
  520. # Extract the first word of "gcc", so it can be a program name with args.
  521. set dummy gcc; ac_word=$2
  522. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  523. echo "configure:591: checking for $ac_word" >&5
  524. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  525. echo $ac_n "(cached) $ac_c" 1>&6
  526. else
  527. if test -n "$CC"; then
  528. ac_cv_prog_CC="$CC" # Let the user override the test.
  529. else
  530. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  531. ac_dummy="$PATH"
  532. for ac_dir in $ac_dummy; do
  533. test -z "$ac_dir" && ac_dir=.
  534. if test -f $ac_dir/$ac_word; then
  535. ac_cv_prog_CC="gcc"
  536. break
  537. fi
  538. done
  539. IFS="$ac_save_ifs"
  540. fi
  541. fi
  542. CC="$ac_cv_prog_CC"
  543. if test -n "$CC"; then
  544. echo "$ac_t""$CC" 1>&6
  545. else
  546. echo "$ac_t""no" 1>&6
  547. fi
  548. if test -z "$CC"; then
  549. # Extract the first word of "cc", so it can be a program name with args.
  550. set dummy cc; ac_word=$2
  551. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  552. echo "configure:621: checking for $ac_word" >&5
  553. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  554. echo $ac_n "(cached) $ac_c" 1>&6
  555. else
  556. if test -n "$CC"; then
  557. ac_cv_prog_CC="$CC" # Let the user override the test.
  558. else
  559. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  560. ac_prog_rejected=no
  561. ac_dummy="$PATH"
  562. for ac_dir in $ac_dummy; do
  563. test -z "$ac_dir" && ac_dir=.
  564. if test -f $ac_dir/$ac_word; then
  565. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  566. ac_prog_rejected=yes
  567. continue
  568. fi
  569. ac_cv_prog_CC="cc"
  570. break
  571. fi
  572. done
  573. IFS="$ac_save_ifs"
  574. if test $ac_prog_rejected = yes; then
  575. # We found a bogon in the path, so make sure we never use it.
  576. set dummy $ac_cv_prog_CC
  577. shift
  578. if test $# -gt 0; then
  579. # We chose a different compiler from the bogus one.
  580. # However, it has the same basename, so the bogon will be chosen
  581. # first if we set CC to just the basename; use the full file name.
  582. shift
  583. set dummy "$ac_dir/$ac_word" "$@"
  584. shift
  585. ac_cv_prog_CC="$@"
  586. fi
  587. fi
  588. fi
  589. fi
  590. CC="$ac_cv_prog_CC"
  591. if test -n "$CC"; then
  592. echo "$ac_t""$CC" 1>&6
  593. else
  594. echo "$ac_t""no" 1>&6
  595. fi
  596. if test -z "$CC"; then
  597. case "`uname -s`" in
  598. *win32* | *WIN32*)
  599. # Extract the first word of "cl", so it can be a program name with args.
  600. set dummy cl; ac_word=$2
  601. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  602. echo "configure:672: checking for $ac_word" >&5
  603. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  604. echo $ac_n "(cached) $ac_c" 1>&6
  605. else
  606. if test -n "$CC"; then
  607. ac_cv_prog_CC="$CC" # Let the user override the test.
  608. else
  609. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  610. ac_dummy="$PATH"
  611. for ac_dir in $ac_dummy; do
  612. test -z "$ac_dir" && ac_dir=.
  613. if test -f $ac_dir/$ac_word; then
  614. ac_cv_prog_CC="cl"
  615. break
  616. fi
  617. done
  618. IFS="$ac_save_ifs"
  619. fi
  620. fi
  621. CC="$ac_cv_prog_CC"
  622. if test -n "$CC"; then
  623. echo "$ac_t""$CC" 1>&6
  624. else
  625. echo "$ac_t""no" 1>&6
  626. fi
  627. ;;
  628. esac
  629. fi
  630. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  631. fi
  632. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  633. echo "configure:704: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  634. ac_ext=c
  635. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  636. ac_cpp='$CPP $CPPFLAGS'
  637. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  638. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  639. cross_compiling=$ac_cv_prog_cc_cross
  640. cat > conftest.$ac_ext << EOF
  641. #line 715 "configure"
  642. #include "confdefs.h"
  643. int main(){return(0);}
  644. EOF
  645. if { (eval echo configure:720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  646. ac_cv_prog_cc_works=yes
  647. # If we can't run a trivial program, we are probably using a cross compiler.
  648. if (./conftest; exit) 2>/dev/null; then
  649. ac_cv_prog_cc_cross=no
  650. else
  651. ac_cv_prog_cc_cross=yes
  652. fi
  653. else
  654. echo "configure: failed program was:" >&5
  655. cat conftest.$ac_ext >&5
  656. ac_cv_prog_cc_works=no
  657. fi
  658. rm -fr conftest*
  659. ac_ext=c
  660. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  661. ac_cpp='$CPP $CPPFLAGS'
  662. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  663. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  664. cross_compiling=$ac_cv_prog_cc_cross
  665. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  666. if test $ac_cv_prog_cc_works = no; then
  667. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  668. fi
  669. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  670. echo "configure:746: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  671. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  672. cross_compiling=$ac_cv_prog_cc_cross
  673. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  674. echo "configure:751: checking whether we are using GNU C" >&5
  675. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  676. echo $ac_n "(cached) $ac_c" 1>&6
  677. else
  678. cat > conftest.c <<EOF
  679. #ifdef __GNUC__
  680. yes;
  681. #endif
  682. EOF
  683. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  684. ac_cv_prog_gcc=yes
  685. else
  686. ac_cv_prog_gcc=no
  687. fi
  688. fi
  689. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  690. if test $ac_cv_prog_gcc = yes; then
  691. GCC=yes
  692. else
  693. GCC=
  694. fi
  695. ac_test_CFLAGS="${CFLAGS+set}"
  696. ac_save_CFLAGS="$CFLAGS"
  697. CFLAGS=
  698. if test "$ac_test_CFLAGS" = set; then
  699. CFLAGS="$ac_save_CFLAGS"
  700. else
  701. if test "$GCC" = yes; then
  702. # Add "-O" to both the CC and CPP commands, to eliminate possible confusion
  703. # that results from __OPTIMIZE__ being defined for CC but not CPP.
  704. if echo "$CC " | grep ' -O[1-9 ]' > /dev/null 2>&1; then
  705. : # already optimizing
  706. else
  707. CC="$CC -O"
  708. ac_cv_prog_CC="$CC"
  709. fi
  710. else
  711. CFLAGS=
  712. fi
  713. fi
  714. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  715. echo "configure:795: checking how to run the C preprocessor" >&5
  716. # On Suns, sometimes $CPP names a directory.
  717. if test -n "$CPP" && test -d "$CPP"; then
  718. CPP=
  719. fi
  720. if test -z "$CPP"; then
  721. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  722. echo $ac_n "(cached) $ac_c" 1>&6
  723. else
  724. # This must be in double quotes, not single quotes, because CPP may get
  725. # substituted into the Makefile and "${CC-cc}" will confuse make.
  726. CPP="${CC-cc} -E"
  727. if test -n "$GCC"; then
  728. # Suppress warning messages.
  729. CPP="$CPP -w"
  730. fi
  731. # On the NeXT, cc -E runs the code through the compiler's parser,
  732. # not just through cpp. On NeXTstep 3.1 the same holds for /lib/cpp; use
  733. # "cc -E -traditional-cpp" instead.
  734. cat > conftest.$ac_ext <<EOF
  735. #line 815 "configure"
  736. #include "confdefs.h"
  737. #include <assert.h>
  738. Syntax Error
  739. EOF
  740. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  741. { (eval echo configure:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  742. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  743. if test -z "$ac_err"; then
  744. rm -rf conftest*
  745. ac_have_cpp=1
  746. else
  747. echo "$ac_err" >&5
  748. echo "configure: failed program was:" >&5
  749. cat conftest.$ac_ext >&5
  750. fi
  751. rm -f conftest*
  752. if test -z "$ac_have_cpp"; then
  753. CPP="${CC-cc} -E -traditional-cpp"
  754. cat > conftest.$ac_ext <<EOF
  755. #line 835 "configure"
  756. #include "confdefs.h"
  757. #include <assert.h>
  758. Syntax Error
  759. EOF
  760. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  761. { (eval echo configure:841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  762. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  763. if test -z "$ac_err"; then
  764. rm -rf conftest*
  765. ac_have_cpp=1
  766. else
  767. echo "$ac_err" >&5
  768. echo "configure: failed program was:" >&5
  769. cat conftest.$ac_ext >&5
  770. fi
  771. rm -f conftest*
  772. if test -n "$ac_have_cpp"; then
  773. CC="${CC-cc} -traditional-cpp"
  774. else
  775. CPP="${CC-cc} -nologo -E"
  776. cat > conftest.$ac_ext <<EOF
  777. #line 857 "configure"
  778. #include "confdefs.h"
  779. #include <assert.h>
  780. Syntax Error
  781. EOF
  782. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  783. { (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  784. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  785. if test -z "$ac_err"; then
  786. rm -rf conftest*
  787. ac_have_cpp=1
  788. else
  789. echo "$ac_err" >&5
  790. echo "configure: failed program was:" >&5
  791. cat conftest.$ac_ext >&5
  792. fi
  793. rm -f conftest*
  794. if test -n "$ac_have_cpp"; then
  795. CC="${CC-cc} -nologo"
  796. else
  797. CPP=/lib/cpp
  798. fi
  799. fi
  800. fi
  801. ac_cv_prog_CC="$CC"
  802. ac_cv_prog_CPP="$CPP"
  803. fi
  804. CPP="$ac_cv_prog_CPP"
  805. else
  806. ac_cv_prog_CPP="$CPP"
  807. fi
  808. echo "$ac_t""$CPP" 1>&6
  809. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  810. do
  811. # Extract the first word of "$ac_prog", so it can be a program name with args.
  812. set dummy $ac_prog; ac_word=$2
  813. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  814. echo "configure:895: checking for $ac_word" >&5
  815. if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  816. echo $ac_n "(cached) $ac_c" 1>&6
  817. else
  818. if test -n "$CXX"; then
  819. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  820. else
  821. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  822. ac_dummy="$PATH"
  823. for ac_dir in $ac_dummy; do
  824. test -z "$ac_dir" && ac_dir=.
  825. if test -f $ac_dir/$ac_word; then
  826. ac_cv_prog_CXX="$ac_prog"
  827. break
  828. fi
  829. done
  830. IFS="$ac_save_ifs"
  831. fi
  832. fi
  833. CXX="$ac_cv_prog_CXX"
  834. if test -n "$CXX"; then
  835. echo "$ac_t""$CXX" 1>&6
  836. else
  837. echo "$ac_t""no" 1>&6
  838. fi
  839. test -n "$CXX" && break
  840. done
  841. test -n "$CXX" || CXX="gcc"
  842. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  843. echo "configure:927: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  844. ac_ext=C
  845. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  846. ac_cpp='$CXXCPP $CPPFLAGS'
  847. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  848. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  849. cross_compiling=$ac_cv_prog_cxx_cross
  850. cat > conftest.$ac_ext << EOF
  851. #line 938 "configure"
  852. #include "confdefs.h"
  853. int main(){return(0);}
  854. EOF
  855. if { (eval echo configure:943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  856. ac_cv_prog_cxx_works=yes
  857. # If we can't run a trivial program, we are probably using a cross compiler.
  858. if (./conftest; exit) 2>/dev/null; then
  859. ac_cv_prog_cxx_cross=no
  860. else
  861. ac_cv_prog_cxx_cross=yes
  862. fi
  863. else
  864. echo "configure: failed program was:" >&5
  865. cat conftest.$ac_ext >&5
  866. ac_cv_prog_cxx_works=no
  867. fi
  868. rm -fr conftest*
  869. ac_ext=c
  870. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  871. ac_cpp='$CPP $CPPFLAGS'
  872. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  873. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  874. cross_compiling=$ac_cv_prog_cc_cross
  875. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  876. if test $ac_cv_prog_cxx_works = no; then
  877. { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  878. fi
  879. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  880. echo "configure:969: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  881. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  882. cross_compiling=$ac_cv_prog_cxx_cross
  883. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  884. echo "configure:974: checking whether we are using GNU C++" >&5
  885. if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  886. echo $ac_n "(cached) $ac_c" 1>&6
  887. else
  888. cat > conftest.C <<EOF
  889. #ifdef __GNUC__
  890. yes;
  891. #endif
  892. EOF
  893. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  894. ac_cv_prog_gxx=yes
  895. else
  896. ac_cv_prog_gxx=no
  897. fi
  898. fi
  899. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  900. if test $ac_cv_prog_gxx = yes; then
  901. GXX=yes
  902. else
  903. GXX=
  904. fi
  905. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  906. ac_save_CXXFLAGS="$CXXFLAGS"
  907. CXXFLAGS=
  908. if test "$ac_test_CXXFLAGS" = set; then
  909. CXXFLAGS="$ac_save_CXXFLAGS"
  910. else
  911. if test "$GXX" = yes; then
  912. # Add "-O" to both the CXX and CXXCPP commands, to eliminate possible confu-
  913. # sion that results from __OPTIMIZE__ being defined for CXX but not CXXCPP.
  914. if echo "$CXX " | grep ' -O[1-9 ]' > /dev/null; then
  915. : # already optimizing
  916. else
  917. CXX="$CXX -O"
  918. ac_cv_prog_CXX="$CXX"
  919. fi
  920. else
  921. CXXFLAGS=
  922. fi
  923. fi
  924. echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
  925. echo "configure:1018: checking how to run the C++ preprocessor" >&5
  926. if test -z "$CXXCPP"; then
  927. if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
  928. echo $ac_n "(cached) $ac_c" 1>&6
  929. else
  930. ac_ext=C
  931. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  932. ac_cpp='$CXXCPP $CPPFLAGS'
  933. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  934. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  935. cross_compiling=$ac_cv_prog_cxx_cross
  936. CXXCPP="${CXX-g++} -E"
  937. cat > conftest.$ac_ext <<EOF
  938. #line 1031 "configure"
  939. #include "confdefs.h"
  940. #include <stdlib.h>
  941. EOF
  942. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  943. { (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  944. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  945. if test -z "$ac_err"; then
  946. :
  947. else
  948. echo "$ac_err" >&5
  949. echo "configure: failed program was:" >&5
  950. cat conftest.$ac_ext >&5
  951. rm -rf conftest*
  952. CXXCPP=/lib/cpp
  953. fi
  954. rm -f conftest*
  955. ac_cv_prog_CXXCPP="$CXXCPP"
  956. ac_ext=c
  957. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  958. ac_cpp='$CPP $CPPFLAGS'
  959. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  960. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  961. cross_compiling=$ac_cv_prog_cc_cross
  962. fi
  963. fi
  964. CXXCPP="$ac_cv_prog_CXXCPP"
  965. echo "$ac_t""$CXXCPP" 1>&6
  966. echo $ac_n "checking for underscore in external names""... $ac_c" 1>&6
  967. echo "configure:1062: checking for underscore in external names" >&5
  968. if eval "test \"`echo '$''{'cl_cv_prog_as_underscore'+set}'`\" = set"; then
  969. echo $ac_n "(cached) $ac_c" 1>&6
  970. else
  971. cat > conftest.c <<EOF
  972. int foo() { return 0; }
  973. EOF
  974. # look for the assembly language name in the .s file
  975. { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } >/dev/null 2>&1
  976. if grep _foo conftest.s >/dev/null ; then
  977. cl_cv_prog_as_underscore=yes
  978. else
  979. cl_cv_prog_as_underscore=no
  980. fi
  981. rm -f conftest*
  982. fi
  983. echo "$ac_t""$cl_cv_prog_as_underscore" 1>&6
  984. if test $cl_cv_prog_as_underscore = yes; then
  985. AS_UNDERSCORE=true
  986. cat >> confdefs.h <<\EOF
  987. #define ASM_UNDERSCORE 1
  988. EOF
  989. else
  990. AS_UNDERSCORE=false
  991. fi
  992. # Extract the first word of "ranlib", so it can be a program name with args.
  993. set dummy ranlib; ac_word=$2
  994. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  995. echo "configure:1094: checking for $ac_word" >&5
  996. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  997. echo $ac_n "(cached) $ac_c" 1>&6
  998. else
  999. if test -n "$RANLIB"; then
  1000. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1001. else
  1002. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1003. ac_dummy="$PATH"
  1004. for ac_dir in $ac_dummy; do
  1005. test -z "$ac_dir" && ac_dir=.
  1006. if test -f $ac_dir/$ac_word; then
  1007. ac_cv_prog_RANLIB="ranlib"
  1008. break
  1009. fi
  1010. done
  1011. IFS="$ac_save_ifs"
  1012. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="true"
  1013. fi
  1014. fi
  1015. RANLIB="$ac_cv_prog_RANLIB"
  1016. if test -n "$RANLIB"; then
  1017. echo "$ac_t""$RANLIB" 1>&6
  1018. else
  1019. echo "$ac_t""no" 1>&6
  1020. fi
  1021. # Find a good install program. We prefer a C program (faster),
  1022. # so one script is as good as another. But avoid the broken or
  1023. # incompatible versions:
  1024. # SysV /etc/install, /usr/sbin/install
  1025. # SunOS /usr/etc/install
  1026. # IRIX /sbin/install
  1027. # AIX /bin/install
  1028. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1029. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1030. # ./install, which can be erroneously created by make from ./install.sh.
  1031. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1032. echo "configure:1132: checking for a BSD compatible install" >&5
  1033. if test -z "$INSTALL"; then
  1034. if eval "test \"`echo '$''{'cl_cv_path_install'+set}'`\" = set"; then
  1035. echo $ac_n "(cached) $ac_c" 1>&6
  1036. else
  1037. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1038. for ac_dir in $PATH; do
  1039. # Account for people who put trailing slashes in PATH elements.
  1040. case "$ac_dir/" in
  1041. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1042. *)
  1043. # OSF1 and SCO ODT 3.0 have their own names for install.
  1044. for ac_prog in ginstall installbsd scoinst install; do
  1045. if test -f $ac_dir/$ac_prog; then
  1046. if test $ac_prog = install &&
  1047. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1048. # AIX install. It has an incompatible calling convention.
  1049. # OSF/1 installbsd also uses dspmsg, but is usable.
  1050. :
  1051. else
  1052. if test $ac_prog = installbsd &&
  1053. grep src/bos $ac_dir/$ac_prog >/dev/null 2>&1; then
  1054. # AIX installbsd doesn't work without option "-g".
  1055. :
  1056. else
  1057. ac_cv_path_install="$ac_dir/$ac_prog -c"
  1058. break 2
  1059. fi
  1060. fi
  1061. fi
  1062. done
  1063. ;;
  1064. esac
  1065. done
  1066. IFS="$ac_save_ifs"
  1067. # As a last resort, use cp.
  1068. test -z "$cl_cv_path_install" && cl_cv_path_install="cp"
  1069. fi
  1070. INSTALL="$cl_cv_path_install"
  1071. fi
  1072. echo "$ac_t""$INSTALL" 1>&6
  1073. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1074. # It thinks the first close brace ends the variable substitution.
  1075. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='$(INSTALL)'
  1076. if test -z "$INSTALL_DATA"; then
  1077. case "$INSTALL" in
  1078. cp | */cp ) INSTALL_DATA='$(INSTALL)' ;;
  1079. * ) INSTALL_DATA='$(INSTALL) -m 644' ;;
  1080. esac
  1081. fi
  1082. ac_aux_dir=${srcdir}/autoconf
  1083. echo $ac_n "checking host system type""... $ac_c" 1>&6
  1084. echo "configure:1186: checking host system type" >&5
  1085. if eval "test \"`echo '$''{'cl_cv_host'+set}'`\" = set"; then
  1086. echo $ac_n "(cached) $ac_c" 1>&6
  1087. else
  1088. ac_config_guess=$ac_aux_dir/config.guess
  1089. ac_config_sub=$ac_aux_dir/config.sub
  1090. # Make sure we can run config.sub.
  1091. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  1092. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  1093. fi
  1094. host_alias=$host
  1095. case "$host_alias" in
  1096. NONE)
  1097. case $nonopt in
  1098. NONE) host_alias=`export CC; $ac_config_guess` ;;
  1099. *) host_alias=$nonopt ;;
  1100. esac ;;
  1101. esac
  1102. # Don't fail just because the system is not listed in GNU's database.
  1103. if test -n "$host_alias"; then
  1104. host=`$ac_config_sub $host_alias`
  1105. else
  1106. host=unknown-unknown-unknown
  1107. fi
  1108. cl_cv_host="$host"
  1109. fi
  1110. echo "$ac_t""$cl_cv_host" 1>&6
  1111. host="$cl_cv_host"
  1112. host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  1113. host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  1114. host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  1115. case "$host_cpu" in
  1116. i[4567]86 )
  1117. host_cpu=i386
  1118. ;;
  1119. alphaev[4-7] | alphaev56 | alphapca5[67] )
  1120. host_cpu=alpha
  1121. ;;
  1122. hppa1.0 | hppa1.1 | hppa2.0 )
  1123. host_cpu=hppa
  1124. ;;
  1125. powerpc )
  1126. host_cpu=rs6000
  1127. ;;
  1128. c1 | c2 | c32 | c34 | c38 | c4 )
  1129. host_cpu=convex
  1130. ;;
  1131. mips )
  1132. echo $ac_n "checking for 64-bit MIPS""... $ac_c" 1>&6
  1133. echo "configure:1239: checking for 64-bit MIPS" >&5
  1134. if eval "test \"`echo '$''{'cl_cv_host_mips64'+set}'`\" = set"; then
  1135. echo $ac_n "(cached) $ac_c" 1>&6
  1136. else
  1137. cat > conftest.$ac_ext <<EOF
  1138. #line 1245 "configure"
  1139. #include "confdefs.h"
  1140. #if defined(_MIPS_SZLONG)
  1141. #if (_MIPS_SZLONG == 64)
  1142. /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */
  1143. yes
  1144. #endif
  1145. #endif
  1146. EOF
  1147. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1148. egrep "yes" >/dev/null 2>&1; then
  1149. rm -rf conftest*
  1150. cl_cv_host_mips64=yes
  1151. else
  1152. rm -rf conftest*
  1153. cl_cv_host_mips64=no
  1154. fi
  1155. rm -f conftest*
  1156. fi
  1157. echo "$ac_t""$cl_cv_host_mips64" 1>&6
  1158. if test $cl_cv_host_mips64 = yes; then
  1159. host_cpu=mips64
  1160. fi
  1161. ;;
  1162. sparc | sparc64 )
  1163. echo $ac_n "checking for 64-bit SPARC""... $ac_c" 1>&6
  1164. echo "configure:1274: checking for 64-bit SPARC" >&5
  1165. if eval "test \"`echo '$''{'cl_cv_host_sparc64'+set}'`\" = set"; then
  1166. echo $ac_n "(cached) $ac_c" 1>&6
  1167. else
  1168. cat > conftest.$ac_ext <<EOF
  1169. #line 1280 "configure"
  1170. #include "confdefs.h"
  1171. #if defined(__sparcv9) || defined(__arch64__)
  1172. yes
  1173. #endif
  1174. EOF
  1175. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1176. egrep "yes" >/dev/null 2>&1; then
  1177. rm -rf conftest*
  1178. cl_cv_host_sparc64=yes
  1179. else
  1180. rm -rf conftest*
  1181. cl_cv_host_sparc64=no
  1182. fi
  1183. rm -f conftest*
  1184. fi
  1185. echo "$ac_t""$cl_cv_host_sparc64" 1>&6
  1186. if test $cl_cv_host_sparc64 = yes; then
  1187. host_cpu=sparc64
  1188. else
  1189. host_cpu=sparc
  1190. fi
  1191. ;;
  1192. esac
  1193. cat >> confdefs.h <<EOF
  1194. #ifndef __${host_cpu}__
  1195. #define __${host_cpu}__ 1
  1196. #endif
  1197. EOF
  1198. PACKAGE=cln
  1199. # Check whether --enable-shared or --disable-shared was given.
  1200. if test "${enable_shared+set}" = set; then
  1201. enableval="$enable_shared"
  1202. p=${PACKAGE-default}
  1203. case "$enableval" in
  1204. yes) enable_shared=yes ;;
  1205. no) enable_shared=no ;;
  1206. *)
  1207. enable_shared=no
  1208. # Look at the argument we got. We use all the common list separators.
  1209. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  1210. for pkg in $enableval; do
  1211. if test "X$pkg" = "X$p"; then
  1212. enable_shared=yes
  1213. fi
  1214. done
  1215. IFS="$ac_save_ifs"
  1216. ;;
  1217. esac
  1218. else
  1219. enable_shared=no
  1220. fi
  1221. # Check whether --enable-static or --disable-static was given.
  1222. if test "${enable_static+set}" = set; then
  1223. enableval="$enable_static"
  1224. p=${PACKAGE-default}
  1225. case "$enableval" in
  1226. yes) enable_static=yes ;;
  1227. no) enable_static=no ;;
  1228. *)
  1229. enable_static=no
  1230. # Look at the argument we got. We use all the common list separators.
  1231. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  1232. for pkg in $enableval; do
  1233. if test "X$pkg" = "X$p"; then
  1234. enable_static=yes
  1235. fi
  1236. done
  1237. IFS="$ac_save_ifs"
  1238. ;;
  1239. esac
  1240. else
  1241. enable_static=yes
  1242. fi
  1243. # Check whether --with-gnu-ld or --without-gnu-ld was given.
  1244. if test "${with_gnu_ld+set}" = set; then
  1245. withval="$with_gnu_ld"
  1246. test "$withval" = no || with_gnu_ld=yes
  1247. else
  1248. with_gnu_ld=no
  1249. fi
  1250. ac_prog=ld
  1251. if test "$ac_cv_prog_gcc" = yes; then
  1252. # Check if gcc -print-prog-name=ld gives a path.
  1253. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
  1254. echo "configure:1373: checking for ld used by GCC" >&5
  1255. ac_prog=`($CC -print-prog-name=ld) 2>&5`
  1256. case "$ac_prog" in
  1257. # Accept absolute paths.
  1258. /* | A-Za-z:\\*)
  1259. test -z "$LD" && LD="$ac_prog"
  1260. ;;
  1261. "")
  1262. # If it fails, then pretend we aren't using GCC.
  1263. ac_prog=ld
  1264. ;;
  1265. *)
  1266. # If it is relative, then search for the first ld in PATH.
  1267. with_gnu_ld=unknown
  1268. ;;
  1269. esac
  1270. elif test "$with_gnu_ld" = yes; then
  1271. echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
  1272. echo "configure:1391: checking for GNU ld" >&5
  1273. else
  1274. echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
  1275. echo "configure:1394: checking for non-GNU ld" >&5
  1276. fi
  1277. if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
  1278. echo $ac_n "(cached) $ac_c" 1>&6
  1279. else
  1280. if test -z "$LD"; then
  1281. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1282. for ac_dir in $PATH; do
  1283. test -z "$ac_dir" && ac_dir=.
  1284. if test -f "$ac_dir/$ac_prog"; then
  1285. ac_cv_path_LD="$ac_dir/$ac_prog"
  1286. # Check to see if the program is GNU ld. I'd rather use --version,
  1287. # but apparently some GNU ld's only accept -v.
  1288. # Break only if it was the GNU/non-GNU ld that we prefer.
  1289. if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
  1290. test "$with_gnu_ld" != no && break
  1291. else
  1292. test "$with_gnu_ld" != yes && break
  1293. fi
  1294. fi
  1295. done
  1296. IFS="$ac_save_ifs"
  1297. else
  1298. ac_cv_path_LD="$LD" # Let the user override the test with a path.
  1299. fi
  1300. fi
  1301. LD="$ac_cv_path_LD"
  1302. if test -n "$LD"; then
  1303. echo "$ac_t""$LD" 1>&6
  1304. else
  1305. echo "$ac_t""no" 1>&6
  1306. fi
  1307. test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
  1308. echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
  1309. echo "configure:1430: checking if the linker ($LD) is GNU ld" >&5
  1310. if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
  1311. echo $ac_n "(cached) $ac_c" 1>&6
  1312. else
  1313. # I'd rather use --version here, but apparently some GNU ld's only accept -v.
  1314. if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  1315. ac_cv_prog_gnu_ld=yes
  1316. else
  1317. ac_cv_prog_gnu_ld=no
  1318. fi
  1319. fi
  1320. echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
  1321. echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
  1322. echo "configure:1445: checking for BSD-compatible nm" >&5
  1323. if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
  1324. echo $ac_n "(cached) $ac_c" 1>&6
  1325. else
  1326. case "$NM" in
  1327. /* | A-Za-z:\\*)
  1328. ac_cv_path_NM="$NM" # Let the user override the test with a path.
  1329. ;;
  1330. *)
  1331. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1332. for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
  1333. test -z "$ac_dir" && ac_dir=.
  1334. if test -f $ac_dir/nm; then
  1335. # Check to see if the nm accepts a BSD-compat flag.
  1336. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  1337. # nm: unknown option "B" ignored
  1338. if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  1339. ac_cv_path_NM="$ac_dir/nm -B"
  1340. elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  1341. ac_cv_path_NM="$ac_dir/nm -p"
  1342. else
  1343. ac_cv_path_NM="$ac_dir/nm"
  1344. fi
  1345. break
  1346. fi
  1347. done
  1348. IFS="$ac_save_ifs"
  1349. test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
  1350. ;;
  1351. esac
  1352. fi
  1353. NM="$ac_cv_path_NM"
  1354. echo "$ac_t""$NM" 1>&6
  1355. echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
  1356. echo "configure:1482: checking whether ln -s works" >&5
  1357. if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  1358. echo $ac_n "(cached) $ac_c" 1>&6
  1359. else
  1360. rm -f conftestdata
  1361. if ln -s X conftestdata 2>/dev/null
  1362. then
  1363. rm -f conftestdata
  1364. ac_cv_prog_LN_S="ln -s"
  1365. else
  1366. ac_cv_prog_LN_S=ln
  1367. fi
  1368. fi
  1369. LN_S="$ac_cv_prog_LN_S"
  1370. if test "$ac_cv_prog_LN_S" = "ln -s"; then
  1371. echo "$ac_t""yes" 1>&6
  1372. else
  1373. echo "$ac_t""no" 1>&6
  1374. fi
  1375. # Always use our own libtool.
  1376. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  1377. # Check for any special flags to pass to ltconfig.
  1378. libtool_flags=
  1379. test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
  1380. test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
  1381. test "$silent" = yes && libtool_flags="$libtool_flags --silent"
  1382. test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
  1383. test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
  1384. # Some flags need to be propagated to the compiler or linker for good
  1385. # libtool support.
  1386. case "$host" in
  1387. *-*-irix6*)
  1388. # Find out which ABI we are using.
  1389. echo '#line 1518 "configure"' > conftest.$ac_ext
  1390. if { (eval echo configure:1519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1391. case "`/usr/bin/file conftest.o`" in
  1392. *32-bit*)
  1393. LD="${LD-ld} -32"
  1394. ;;
  1395. *N32*)
  1396. LD="${LD-ld} -n32"
  1397. ;;
  1398. *64-bit*)
  1399. LD="${LD-ld} -64"
  1400. ;;
  1401. esac
  1402. fi
  1403. rm -rf conftest*
  1404. ;;
  1405. *-*-sco3.2v5*)
  1406. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1407. CFLAGS="$CFLAGS -belf"
  1408. ;;
  1409. esac
  1410. # Actually configure libtool. ac_aux_dir is where install-sh is found.
  1411. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
  1412. LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
  1413. ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
  1414. $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
  1415. || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
  1416. CLN_CURRENT=1
  1417. CLN_REVISION=0
  1418. CLN_AGE=1
  1419. ac_ext=C
  1420. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1421. ac_cpp='$CXXCPP $CPPFLAGS'
  1422. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1423. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1424. cross_compiling=$ac_cv_prog_cxx_cross
  1425. ac_ext=C
  1426. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1427. ac_cpp='$CXXCPP $CPPFLAGS'
  1428. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1429. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1430. cross_compiling=$ac_cv_prog_cxx_cross
  1431. echo $ac_n "checking for bool type""... $ac_c" 1>&6
  1432. echo "configure:1570: checking for bool type" >&5
  1433. if eval "test \"`echo '$''{'cl_cv_cplusplus_bool'+set}'`\" = set"; then
  1434. echo $ac_n "(cached) $ac_c" 1>&6
  1435. else
  1436. cat > conftest.$ac_ext <<EOF
  1437. #line 1576 "configure"
  1438. #include "confdefs.h"
  1439. int main() {
  1440. bool x;
  1441. ; return 0; }
  1442. EOF
  1443. if { (eval echo configure:1583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1444. rm -rf conftest*
  1445. cl_cv_cplusplus_bool=yes
  1446. else
  1447. echo "configure: failed program was:" >&5
  1448. cat conftest.$ac_ext >&5
  1449. rm -rf conftest*
  1450. cl_cv_cplusplus_bool=no
  1451. fi
  1452. rm -f conftest*
  1453. fi
  1454. echo "$ac_t""$cl_cv_cplusplus_bool" 1>&6
  1455. if test $cl_cv_cplusplus_bool = yes; then
  1456. cat >> confdefs.h <<\EOF
  1457. #define HAVE_BOOL 1
  1458. EOF
  1459. else
  1460. cat >> confdefs.h <<\EOF
  1461. #define bool int
  1462. EOF
  1463. fi
  1464. ac_ext=C
  1465. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1466. ac_cpp='$CXXCPP $CPPFLAGS'
  1467. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  1468. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  1469. cross_compiling=$ac_cv_prog_cxx_cross
  1470. echo $ac_n "checking for long long type""... $ac_c" 1>&6
  1471. echo "configure:1617: checking for long long type" >&5
  1472. if eval "test \"`echo '$''{'cl_cv_c_longlong'+set}'`\" = set"; then
  1473. echo $ac_n "(cached) $ac_c" 1>&6
  1474. else
  1475. if test "$cross_compiling" = yes; then
  1476. cl_cv_c_longlong="guessing no"
  1477. else
  1478. cat > conftest.$ac_ext <<EOF
  1479. #line 1626 "configure"
  1480. #include "confdefs.h"
  1481. #ifdef __cplusplus
  1482. extern "C" void exit(int);
  1483. #endif
  1484. int main()
  1485. {
  1486. /* long longs don't work right with gcc-2.7.2 on m68k */
  1487. /* long longs don't work right with gcc-2.7.2 on rs6000: avcall/tests.c gets
  1488. miscompiled. */
  1489. #ifdef __GNUC__
  1490. #if defined(__m68k__) || (defined(_IBMR2) || defined(__powerpc))
  1491. #if (__GNUC__ == 2)
  1492. #if (__GNUC_MINOR__ <= 7)
  1493. exit(1);
  1494. #endif
  1495. #endif
  1496. #endif
  1497. #endif
  1498. { long x = 944938507; long y = 737962842; long z = 162359677;
  1499. exit(!(((long long) x)*((long long) y)>>32 == z));
  1500. }
  1501. }
  1502. EOF
  1503. if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1504. then
  1505. cl_cv_c_longlong=yes
  1506. else
  1507. echo "configure: failed program was:" >&5
  1508. cat conftest.$ac_ext >&5
  1509. rm -fr conftest*
  1510. cl_cv_c_longlong=no
  1511. fi
  1512. if test -f core; then
  1513. coredir=core`/bin/sh -c 'echo $$'`
  1514. mkdir $coredir
  1515. cp confdefs.h $coredir/confdefs.h
  1516. mv conftest.c $coredir/conftest.c
  1517. mv conftest $coredir/conftest
  1518. mv core $coredir/core
  1519. echo "warning: test program dumped core -- see subdirectory $coredir"
  1520. fi
  1521. rm -fr conftest*
  1522. fi
  1523. fi
  1524. echo "$ac_t""$cl_cv_c_longlong" 1>&6
  1525. case "$cl_cv_c_longlong" in
  1526. *yes) cat >> confdefs.h <<\EOF
  1527. #define HAVE_LONGLONG 1
  1528. EOF
  1529. ;;
  1530. *no) ;;
  1531. esac
  1532. echo $ac_n "checking for long double type""... $ac_c" 1>&6
  1533. echo "configure:1683: checking for long double type" >&5
  1534. if eval "test \"`echo '$''{'cl_cv_c_longdouble'+set}'`\" = set"; then
  1535. echo $ac_n "(cached) $ac_c" 1>&6
  1536. else
  1537. if test "$cross_compiling" = yes; then
  1538. cl_cv_c_longdouble="guessing no"
  1539. else
  1540. cat > conftest.$ac_ext <<EOF
  1541. #line 1692 "configure"
  1542. #include "confdefs.h"
  1543. #ifdef __cplusplus
  1544. extern "C" void exit(int);
  1545. #endif
  1546. int main()
  1547. { long double x = 2.7182818284590452354L; x = x*x; exit (x==0.0L); }
  1548. EOF
  1549. if { (eval echo configure:1700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1550. then
  1551. cl_cv_c_longdouble=yes
  1552. else
  1553. echo "configure: failed program was:" >&5
  1554. cat conftest.$ac_ext >&5
  1555. rm -fr conftest*
  1556. cl_cv_c_longdouble=no
  1557. fi
  1558. if test -f core; then
  1559. coredir=core`/bin/sh -c 'echo $$'`
  1560. mkdir $coredir
  1561. cp confdefs.h $coredir/confdefs.h
  1562. mv conftest.c $coredir/conftest.c
  1563. mv conftest $coredir/conftest
  1564. mv core $coredir/core
  1565. echo "warning: test program dumped core -- see subdirectory $coredir"
  1566. fi
  1567. rm -fr conftest*
  1568. fi
  1569. fi
  1570. echo "$ac_t""$cl_cv_c_longdouble" 1>&6
  1571. case "$cl_cv_c_longdouble" in
  1572. *yes) cat >> confdefs.h <<\EOF
  1573. #define HAVE_LONGDOUBLE 1
  1574. EOF
  1575. ;;
  1576. *no) ;;
  1577. esac
  1578. echo $ac_n "checking for working template<>""... $ac_c" 1>&6
  1579. echo "configure:1733: checking for working template<>" >&5
  1580. if eval "test \"`echo '$''{'cl_cv_c_templatenull'+set}'`\" = set"; then
  1581. echo $ac_n "(cached) $ac_c" 1>&6
  1582. else
  1583. cat > conftest.$ac_ext <<EOF
  1584. #line 1739 "configure"
  1585. #include "confdefs.h"
  1586. template <class T> class c {}; template <> class c<int> { int x; };
  1587. int main() {
  1588. ; return 0; }
  1589. EOF
  1590. if { (eval echo configure:1746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1591. rm -rf conftest*
  1592. cl_cv_c_templatenull=yes
  1593. else
  1594. echo "configure: failed program was:" >&5
  1595. cat conftest.$ac_ext >&5
  1596. rm -rf conftest*
  1597. cl_cv_c_templatenull=no
  1598. fi
  1599. rm -f conftest*
  1600. fi
  1601. echo "$ac_t""$cl_cv_c_templatenull" 1>&6
  1602. if test $cl_cv_c_templatenull = yes; then
  1603. cat >> confdefs.h <<\EOF
  1604. #define HAVE_TEMPLATE_NULL 1
  1605. EOF
  1606. fi
  1607. if test -n "$GCC"; then
  1608. echo $ac_n "checking for the global constructors function prefix""... $ac_c" 1>&6
  1609. echo "configure:1770: checking for the global constructors function prefix" >&5
  1610. if eval "test \"`echo '$''{'cl_cv_cplusplus_ctorprefix'+set}'`\" = set"; then
  1611. echo $ac_n "(cached) $ac_c" 1>&6
  1612. else
  1613. cat > conftest.cc << EOF
  1614. struct foo { foo (); };
  1615. foo foobar;
  1616. EOF
  1617. # look for the assembly language name in the .s file
  1618. { ac_try='${CXX-g++} $CXXFLAGS -S conftest.cc'; { (eval echo configure:1780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } >/dev/null 2>&1
  1619. if grep '_GLOBAL_\$I\$foobar' conftest.s >/dev/null ; then
  1620. cl_cv_cplusplus_ctorprefix='_GLOBAL_$I$'
  1621. else
  1622. if grep '_GLOBAL_\.I\.foobar' conftest.s >/dev/null ; then
  1623. cl_cv_cplusplus_ctorprefix='_GLOBAL_.I.'
  1624. else
  1625. if grep '_GLOBAL__I_foobar' conftest.s >/dev/null ; then
  1626. cl_cv_cplusplus_ctorprefix='_GLOBAL__I_'
  1627. else
  1628. cl_cv_cplusplus_ctorprefix=unknown
  1629. fi
  1630. fi
  1631. fi
  1632. rm -f conftest*
  1633. fi
  1634. echo "$ac_t""$cl_cv_cplusplus_ctorprefix" 1>&6
  1635. if test "$cl_cv_cplusplus_ctorprefix" '!=' unknown; then
  1636. ac_value='"'"$cl_cv_cplusplus_ctorprefix"'"'
  1637. cat >> confdefs.h <<EOF
  1638. #define CL_GLOBAL_CONSTRUCTOR_PREFIX $ac_value
  1639. EOF
  1640. ac_value=`echo "$ac_value" | sed -e 's,I,D,'`
  1641. cat >> confdefs.h <<EOF
  1642. #define CL_GLOBAL_DESTRUCTOR_PREFIX $ac_value
  1643. EOF
  1644. echo $ac_n "checking whether the global constructors function need to be exported""... $ac_c" 1>&6
  1645. echo "configure:1810: checking whether the global constructors function need to be exported" >&5
  1646. if eval "test \"`echo '$''{'cl_cv_cplusplus_ctorexport'+set}'`\" = set"; then
  1647. echo $ac_n "(cached) $ac_c" 1>&6
  1648. else
  1649. cat > conftest1.cc << EOF
  1650. struct foo { foo (); };
  1651. foo foobar;
  1652. EOF
  1653. cat > conftest2.cc << EOF
  1654. #include "confdefs.h"
  1655. #ifdef ASM_UNDERSCORE
  1656. #define ASM_UNDERSCORE_PREFIX "_"
  1657. #else
  1658. #define ASM_UNDERSCORE_PREFIX ""
  1659. #endif
  1660. struct foo { foo (); };
  1661. foo::foo () {}
  1662. extern "C" void ctor (void) __asm__ (ASM_UNDERSCORE_PREFIX CL_GLOBAL_CONSTRUCTOR_PREFIX "foobar");
  1663. int main() { ctor(); return 0; }
  1664. EOF
  1665. if { ac_try='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest1.cc conftest2.cc $LIBS 1>&5'; { (eval echo configure:1831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } >/dev/null 2>&1 && test -s conftest${ac_exeext}; then
  1666. cl_cv_cplusplus_ctorexport=no
  1667. else
  1668. cl_cv_cplusplus_ctorexport=yes
  1669. fi
  1670. rm -f conftest*
  1671. fi
  1672. echo "$ac_t""$cl_cv_cplusplus_ctorexport" 1>&6
  1673. if test "$cl_cv_cplusplus_ctorexport" = yes; then
  1674. cat >> confdefs.h <<\EOF
  1675. #define CL_NEED_GLOBALIZE_CTORDTOR 1
  1676. EOF
  1677. fi
  1678. fi
  1679. fi
  1680. for ac_hdr in unistd.h
  1681. do
  1682. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1683. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1684. echo "configure:1853: checking for $ac_hdr" >&5
  1685. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1686. echo $ac_n "(cached) $ac_c" 1>&6
  1687. else
  1688. cat > conftest.$ac_ext <<EOF
  1689. #line 1858 "configure"
  1690. #include "confdefs.h"
  1691. #include <$ac_hdr>
  1692. EOF
  1693. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1694. { (eval echo configure:1863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1695. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1696. if test -z "$ac_err"; then
  1697. rm -rf conftest*
  1698. eval "ac_cv_header_$ac_safe=yes"
  1699. else
  1700. echo "$ac_err" >&5
  1701. echo "configure: failed program was:" >&5
  1702. cat conftest.$ac_ext >&5
  1703. rm -rf conftest*
  1704. eval "ac_cv_header_$ac_safe=no"
  1705. fi
  1706. rm -f conftest*
  1707. fi
  1708. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1709. echo "$ac_t""yes" 1>&6
  1710. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1711. cat >> confdefs.h <<EOF
  1712. #define $ac_tr_hdr 1
  1713. EOF
  1714. else
  1715. echo "$ac_t""no" 1>&6
  1716. fi
  1717. done
  1718. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1719. # for constant arguments. Useless!
  1720. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
  1721. echo "configure:1893: checking for working alloca.h" >&5
  1722. if eval "test \"`echo '$''{'cl_cv_header_alloca_h'+set}'`\" = set"; then
  1723. echo $ac_n "(cached) $ac_c" 1>&6
  1724. else
  1725. cat > conftest.$ac_ext <<EOF
  1726. #line 1899 "configure"
  1727. #include "confdefs.h"
  1728. #include <alloca.h>
  1729. int main() {
  1730. char *p = (char *) alloca(2 * sizeof(int));
  1731. ; return 0; }
  1732. EOF
  1733. if { (eval echo configure:1906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1734. rm -rf conftest*
  1735. cl_cv_header_alloca_h=yes
  1736. else
  1737. echo "configure: failed program was:" >&5
  1738. cat conftest.$ac_ext >&5
  1739. rm -rf conftest*
  1740. cl_cv_header_alloca_h=no
  1741. fi
  1742. rm -f conftest*
  1743. fi
  1744. echo "$ac_t""$cl_cv_header_alloca_h" 1>&6
  1745. if test $cl_cv_header_alloca_h = yes; then
  1746. cat >> confdefs.h <<\EOF
  1747. #define HAVE_ALLOCA_H 1
  1748. EOF
  1749. fi
  1750. decl="#ifdef __GNUC__
  1751. #define alloca __builtin_alloca
  1752. #else
  1753. #ifdef _MSC_VER
  1754. #include <malloc.h>
  1755. #define alloca _alloca
  1756. #else
  1757. #ifdef HAVE_ALLOCA_H
  1758. #include <alloca.h>
  1759. #else
  1760. #ifdef _AIX
  1761. #pragma alloca
  1762. #else
  1763. #ifndef alloca
  1764. char *alloca ();
  1765. #endif
  1766. #endif
  1767. #endif
  1768. #endif
  1769. #endif
  1770. "
  1771. echo $ac_n "checking for alloca""... $ac_c" 1>&6
  1772. echo "configure:1948: checking for alloca" >&5
  1773. if eval "test \"`echo '$''{'cl_cv_func_alloca'+set}'`\" = set"; then
  1774. echo $ac_n "(cached) $ac_c" 1>&6
  1775. else
  1776. cat > conftest.$ac_ext <<EOF
  1777. #line 1954 "configure"
  1778. #include "confdefs.h"
  1779. $decl
  1780. int main() {
  1781. char *p = (char *) alloca(1);
  1782. ; return 0; }
  1783. EOF
  1784. if { (eval echo configure:1961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1785. rm -rf conftest*
  1786. cl_cv_func_alloca=yes
  1787. else
  1788. echo "configure: failed program was:" >&5
  1789. cat conftest.$ac_ext >&5
  1790. rm -rf conftest*
  1791. cl_cv_func_alloca=no
  1792. fi
  1793. rm -f conftest*
  1794. fi
  1795. echo "$ac_t""$cl_cv_func_alloca" 1>&6
  1796. if test $cl_cv_func_alloca = yes; then
  1797. :
  1798. else
  1799. alloca_missing=1
  1800. fi
  1801. if test -n "$alloca_missing"; then
  1802. # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1803. # that cause trouble. Some versions do not even contain alloca or
  1804. # contain a buggy version. If you still want to use their alloca,
  1805. # use ar to extract alloca.o from them instead of compiling alloca.c.
  1806. ALLOCA=alloca.${ac_objext}
  1807. cat >> confdefs.h <<\EOF
  1808. #define NO_ALLOCA 1
  1809. EOF
  1810. fi
  1811. echo $ac_n "checking for fpu_control_t""... $ac_c" 1>&6
  1812. echo "configure:1993: checking for fpu_control_t" >&5
  1813. if eval "test \"`echo '$''{'cl_cv_type_fpu_control_t'+set}'`\" = set"; then
  1814. echo $ac_n "(cached) $ac_c" 1>&6
  1815. else
  1816. cat > conftest.$ac_ext <<EOF
  1817. #line 1999 "configure"
  1818. #include "confdefs.h"
  1819. #include <fpu_control.h>
  1820. int main() {
  1821. fpu_control_t x;
  1822. ; return 0; }
  1823. EOF
  1824. if { (eval echo configure:2006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1825. rm -rf conftest*
  1826. cl_cv_type_fpu_control_t=yes
  1827. else
  1828. echo "configure: failed program was:" >&5
  1829. cat conftest.$ac_ext >&5
  1830. rm -rf conftest*
  1831. cl_cv_type_fpu_control_t=no
  1832. fi
  1833. rm -f conftest*
  1834. fi
  1835. echo "$ac_t""$cl_cv_type_fpu_control_t" 1>&6
  1836. if test $cl_cv_type_fpu_control_t = yes; then
  1837. cat >> confdefs.h <<\EOF
  1838. #define HAVE_FPU_CONTROL_T 1
  1839. EOF
  1840. fi
  1841. echo $ac_n "checking for __setfpucw""... $ac_c" 1>&6
  1842. echo "configure:2028: checking for __setfpucw" >&5
  1843. if eval "test \"`echo '$''{'cl_cv_func_setfpucw'+set}'`\" = set"; then
  1844. echo $ac_n "(cached) $ac_c" 1>&6
  1845. else
  1846. cat > conftest.$ac_ext <<EOF
  1847. #line 2034 "configure"
  1848. #include "confdefs.h"
  1849. #include <fpu_control.h>
  1850. int main() {
  1851. __setfpucw(_FPU_IEEE);
  1852. ; return 0; }
  1853. EOF
  1854. if { (eval echo configure:2041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1855. rm -rf conftest*
  1856. cl_cv_func_setfpucw=yes
  1857. else
  1858. echo "configure: failed program was:" >&5
  1859. cat conftest.$ac_ext >&5
  1860. rm -rf conftest*
  1861. cl_cv_func_setfpucw=no
  1862. fi
  1863. rm -f conftest*
  1864. fi
  1865. echo "$ac_t""$cl_cv_func_setfpucw" 1>&6
  1866. if test $cl_cv_func_setfpucw = yes; then
  1867. cat >> confdefs.h <<\EOF
  1868. #define HAVE_SETFPUCW 1
  1869. EOF
  1870. fi
  1871. for ac_func in gettimeofday
  1872. do
  1873. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1874. echo "configure:2067: checking for $ac_func" >&5
  1875. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1876. echo $ac_n "(cached) $ac_c" 1>&6
  1877. else
  1878. cat > conftest.$ac_ext <<EOF
  1879. #line 2072 "configure"
  1880. #include "confdefs.h"
  1881. /* System header to define __stub macros and hopefully few prototypes,
  1882. which can conflict with char $ac_func(); below. */
  1883. #include <assert.h>
  1884. /* Override any gcc2 internal prototype to avoid an error. */
  1885. #ifdef __cplusplus
  1886. extern "C"
  1887. #endif
  1888. /* We use char because int might match the return type of a gcc2
  1889. builtin and then its argument prototype would still apply. */
  1890. char $ac_func();
  1891. int main() {
  1892. /* The GNU C library defines this for functions which it implements
  1893. to always fail with ENOSYS. Some functions are actually named
  1894. something starting with __ and the normal name is an alias. */
  1895. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1896. choke me
  1897. #else
  1898. $ac_func();
  1899. #endif
  1900. ; return 0; }
  1901. EOF
  1902. if { (eval echo configure:2098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1903. rm -rf conftest*
  1904. eval "ac_cv_func_$ac_func=yes"
  1905. else
  1906. echo "configure: failed program was:" >&5
  1907. cat conftest.$ac_ext >&5
  1908. rm -rf conftest*
  1909. eval "ac_cv_func_$ac_func=no"
  1910. fi
  1911. rm -f conftest*
  1912. fi
  1913. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1914. echo "$ac_t""yes" 1>&6
  1915. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1916. cat >> confdefs.h <<EOF
  1917. #define $ac_tr_func 1
  1918. EOF
  1919. else
  1920. echo "$ac_t""no" 1>&6
  1921. fi
  1922. done
  1923. if test $ac_cv_func_gettimeofday = yes; then
  1924. echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
  1925. echo "configure:2123: checking for gettimeofday declaration" >&5
  1926. if eval "test \"`echo '$''{'cl_cv_proto_gettimeofday'+set}'`\" = set"; then
  1927. echo $ac_n "(cached) $ac_c" 1>&6
  1928. else
  1929. cat > conftest.$ac_ext <<EOF
  1930. #line 2129 "configure"
  1931. #include "confdefs.h"
  1932. #include <sys/types.h>
  1933. #include <sys/time.h>
  1934. extern
  1935. #ifdef __cplusplus
  1936. "C"
  1937. #endif
  1938. #if defined(__STDC__) || defined(__cplusplus)
  1939. int gettimeofday (struct timeval * tp, struct timezone * tzp);
  1940. #else
  1941. int gettimeofday();
  1942. #endif
  1943. int main() {
  1944. ; return 0; }
  1945. EOF
  1946. if { (eval echo configure:2150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1947. rm -rf conftest*
  1948. cl_cv_proto_gettimeofday_dots=no
  1949. cl_cv_proto_gettimeofday_arg2="struct timezone *"
  1950. else
  1951. echo "configure: failed program was:" >&5
  1952. cat conftest.$ac_ext >&5
  1953. rm -rf conftest*
  1954. cat > conftest.$ac_ext <<EOF
  1955. #line 2159 "configure"
  1956. #include "confdefs.h"
  1957. #include <sys/types.h>
  1958. #include <sys/time.h>
  1959. extern
  1960. #ifdef __cplusplus
  1961. "C"
  1962. #endif
  1963. #if defined(__STDC__) || defined(__cplusplus)
  1964. int gettimeofday (struct timeval * tp, void * tzp);
  1965. #else
  1966. int gettimeofday();
  1967. #endif
  1968. int main() {
  1969. ; return 0; }
  1970. EOF
  1971. if { (eval echo configure:2180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1972. rm -rf conftest*
  1973. cl_cv_proto_gettimeofday_dots=no
  1974. cl_cv_proto_gettimeofday_arg2="void *"
  1975. else
  1976. echo "configure: failed program was:" >&5
  1977. cat conftest.$ac_ext >&5
  1978. rm -rf conftest*
  1979. cl_cv_proto_gettimeofday_dots=yes
  1980. cl_cv_proto_gettimeofday_arg2="..."
  1981. fi
  1982. rm -f conftest*
  1983. fi
  1984. rm -f conftest*
  1985. cl_cv_proto_gettimeofday="extern int gettimeofday (struct timeval *, $cl_cv_proto_gettimeofday_arg2);"
  1986. fi
  1987. cl_cv_proto_gettimeofday=`echo "$cl_cv_proto_gettimeofday" | tr -s ' ' | sed -e 's/( /(/'`
  1988. echo "$ac_t""${ac_tt}$cl_cv_proto_gettimeofday" 1>&6
  1989. if test $cl_cv_proto_gettimeofday_dots = yes; then
  1990. cat >> confdefs.h <<\EOF
  1991. #define GETTIMEOFDAY_DOTS 1
  1992. EOF
  1993. else
  1994. cat >> confdefs.h <<EOF
  1995. #define GETTIMEOFDAY_TZP_T $cl_cv_proto_gettimeofday_arg2
  1996. EOF
  1997. fi
  1998. fi
  1999. for ac_func in ftime
  2000. do
  2001. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2002. echo "configure:2221: checking for $ac_func" >&5
  2003. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2004. echo $ac_n "(cached) $ac_c" 1>&6
  2005. else
  2006. cat > conftest.$ac_ext <<EOF
  2007. #line 2226 "configure"
  2008. #include "confdefs.h"
  2009. /* System header to define __stub macros and hopefully few prototypes,
  2010. which can conflict with char $ac_func(); below. */
  2011. #include <assert.h>
  2012. /* Override any gcc2 internal prototype to avoid an error. */
  2013. #ifdef __cplusplus
  2014. extern "C"
  2015. #endif
  2016. /* We use char because int might match the return type of a gcc2
  2017. builtin and then its argument prototype would still apply. */
  2018. char $ac_func();
  2019. int main() {
  2020. /* The GNU C library defines this for functions which it implements
  2021. to always fail with ENOSYS. Some functions are actually named
  2022. something starting with __ and the normal name is an alias. */
  2023. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2024. choke me
  2025. #else
  2026. $ac_func();
  2027. #endif
  2028. ; return 0; }
  2029. EOF
  2030. if { (eval echo configure:2252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2031. rm -rf conftest*
  2032. eval "ac_cv_func_$ac_func=yes"
  2033. else
  2034. echo "configure: failed program was:" >&5
  2035. cat conftest.$ac_ext >&5
  2036. rm -rf conftest*
  2037. eval "ac_cv_func_$ac_func=no"
  2038. fi
  2039. rm -f conftest*
  2040. fi
  2041. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2042. echo "$ac_t""yes" 1>&6
  2043. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2044. cat >> confdefs.h <<EOF
  2045. #define $ac_tr_func 1
  2046. EOF
  2047. else
  2048. echo "$ac_t""no" 1>&6
  2049. fi
  2050. done
  2051. if test $ac_cv_func_gettimeofday = no -a $ac_cv_func_ftime = no; then
  2052. echo $ac_n "checking for times""... $ac_c" 1>&6
  2053. echo "configure:2278: checking for times" >&5
  2054. if eval "test \"`echo '$''{'ac_cv_func_times'+set}'`\" = set"; then
  2055. echo $ac_n "(cached) $ac_c" 1>&6
  2056. else
  2057. cat > conftest.$ac_ext <<EOF
  2058. #line 2283 "configure"
  2059. #include "confdefs.h"
  2060. /* System header to define __stub macros and hopefully few prototypes,
  2061. which can conflict with char times(); below. */
  2062. #include <assert.h>
  2063. /* Override any gcc2 internal prototype to avoid an error. */
  2064. #ifdef __cplusplus
  2065. extern "C"
  2066. #endif
  2067. /* We use char because int might match the return type of a gcc2
  2068. builtin and then its argument prototype would still apply. */
  2069. char times();
  2070. int main() {
  2071. /* The GNU C library defines this for functions which it implements
  2072. to always fail with ENOSYS. Some functions are actually named
  2073. something starting with __ and the normal name is an alias. */
  2074. #if defined (__stub_times) || defined (__stub___times)
  2075. choke me
  2076. #else
  2077. times();
  2078. #endif
  2079. ; return 0; }
  2080. EOF
  2081. if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2082. rm -rf conftest*
  2083. eval "ac_cv_func_times=yes"
  2084. else
  2085. echo "configure: failed program was:" >&5
  2086. cat conftest.$ac_ext >&5
  2087. rm -rf conftest*
  2088. eval "ac_cv_func_times=no"
  2089. fi
  2090. rm -f conftest*
  2091. fi
  2092. if eval "test \"`echo '$ac_cv_func_'times`\" = yes"; then
  2093. echo "$ac_t""yes" 1>&6
  2094. :
  2095. else
  2096. echo "$ac_t""no" 1>&6
  2097. no_times=1
  2098. fi
  2099. if test -z "$no_times"; then
  2100. echo $ac_n "checking for times return value""... $ac_c" 1>&6
  2101. echo "configure:2330: checking for times return value" >&5
  2102. if eval "test \"`echo '$''{'cl_cv_func_times_return'+set}'`\" = set"; then
  2103. echo $ac_n "(cached) $ac_c" 1>&6
  2104. else
  2105. if test "$cross_compiling" = yes; then
  2106. cl_cv_func_times_return="guessing no"
  2107. else
  2108. cat > conftest.$ac_ext <<EOF
  2109. #line 2339 "configure"
  2110. #include "confdefs.h"
  2111. #ifdef __cplusplus
  2112. extern "C" void exit(int);
  2113. #endif
  2114. #include <sys/types.h>
  2115. #include <time.h> /* needed for CLK_TCK */
  2116. #ifndef CLK_TCK
  2117. #include <sys/time.h> /* needed for CLK_TCK on SYSV PTX */
  2118. #endif
  2119. #include <sys/times.h>
  2120. int main ()
  2121. { struct tms buffer;
  2122. clock_t result1;
  2123. clock_t result2;
  2124. int ticks;
  2125. result1 = times(&buffer);
  2126. if ((result1 == (clock_t)0) || (result1 == (clock_t)(-1))) exit(1);
  2127. sleep(1);
  2128. result2 = times(&buffer);
  2129. if ((result2 == (clock_t)0) || (result2 == (clock_t)(-1))) exit(1);
  2130. ticks = result2 - result1;
  2131. exit(!((ticks >= CLK_TCK/2) && (ticks <= 3*CLK_TCK/2)));
  2132. }
  2133. EOF
  2134. if { (eval echo configure:2365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2135. then
  2136. cl_cv_func_times_return=yes
  2137. else
  2138. echo "configure: failed program was:" >&5
  2139. cat conftest.$ac_ext >&5
  2140. rm -fr conftest*
  2141. cl_cv_func_times_return=no
  2142. fi
  2143. if test -f core; then
  2144. coredir=core`/bin/sh -c 'echo $$'`
  2145. mkdir $coredir
  2146. cp confdefs.h $coredir/confdefs.h
  2147. mv conftest.c $coredir/conftest.c
  2148. mv conftest $coredir/conftest
  2149. mv core $coredir/core
  2150. echo "warning: test program dumped core -- see subdirectory $coredir"
  2151. fi
  2152. rm -fr conftest*
  2153. fi
  2154. fi
  2155. echo "$ac_t""$cl_cv_func_times_return" 1>&6
  2156. case "$cl_cv_func_times_return" in
  2157. *yes) cat >> confdefs.h <<\EOF
  2158. #define HAVE_TIMES_CLOCK 1
  2159. EOF
  2160. ;;
  2161. *no) ;;
  2162. esac
  2163. fi
  2164. fi
  2165. for ac_hdr in sys/resource.h sys/times.h
  2166. do
  2167. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2168. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2169. echo "configure:2403: checking for $ac_hdr" >&5
  2170. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2171. echo $ac_n "(cached) $ac_c" 1>&6
  2172. else
  2173. cat > conftest.$ac_ext <<EOF
  2174. #line 2408 "configure"
  2175. #include "confdefs.h"
  2176. #include <$ac_hdr>
  2177. EOF
  2178. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2179. { (eval echo configure:2413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2180. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2181. if test -z "$ac_err"; then
  2182. rm -rf conftest*
  2183. eval "ac_cv_header_$ac_safe=yes"
  2184. else
  2185. echo "$ac_err" >&5
  2186. echo "configure: failed program was:" >&5
  2187. cat conftest.$ac_ext >&5
  2188. rm -rf conftest*
  2189. eval "ac_cv_header_$ac_safe=no"
  2190. fi
  2191. rm -f conftest*
  2192. fi
  2193. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2194. echo "$ac_t""yes" 1>&6
  2195. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2196. cat >> confdefs.h <<EOF
  2197. #define $ac_tr_hdr 1
  2198. EOF
  2199. else
  2200. echo "$ac_t""no" 1>&6
  2201. fi
  2202. done
  2203. if test $ac_cv_header_sys_resource_h = yes; then
  2204. echo $ac_n "checking for getrusage""... $ac_c" 1>&6
  2205. echo "configure:2440: checking for getrusage" >&5
  2206. if eval "test \"`echo '$''{'cl_cv_func_getrusage'+set}'`\" = set"; then
  2207. echo $ac_n "(cached) $ac_c" 1>&6
  2208. else
  2209. cat > conftest.$ac_ext <<EOF
  2210. #line 2446 "configure"
  2211. #include "confdefs.h"
  2212. #include <sys/types.h> /* NetBSD 1.0 needs this */
  2213. #include <sys/time.h>
  2214. #include <sys/resource.h>
  2215. int main() {
  2216. struct rusage x; int y = RUSAGE_SELF; getrusage(y,&x); x.ru_utime.tv_sec;
  2217. ; return 0; }
  2218. EOF
  2219. if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2220. rm -rf conftest*
  2221. cl_cv_func_getrusage=yes
  2222. else
  2223. echo "configure: failed program was:" >&5
  2224. cat conftest.$ac_ext >&5
  2225. rm -rf conftest*
  2226. cl_cv_func_getrusage=no
  2227. fi
  2228. rm -f conftest*
  2229. fi
  2230. echo "$ac_t""$cl_cv_func_getrusage" 1>&6
  2231. if test $cl_cv_func_getrusage = yes; then
  2232. cat >> confdefs.h <<\EOF
  2233. #define HAVE_GETRUSAGE 1
  2234. EOF
  2235. fi
  2236. if test $cl_cv_func_getrusage = yes; then
  2237. echo $ac_n "checking for getrusage declaration""... $ac_c" 1>&6
  2238. echo "configure:2477: checking for getrusage declaration" >&5
  2239. if eval "test \"`echo '$''{'cl_cv_proto_getrusage'+set}'`\" = set"; then
  2240. echo $ac_n "(cached) $ac_c" 1>&6
  2241. else
  2242. cat > conftest.$ac_ext <<EOF
  2243. #line 2483 "configure"
  2244. #include "confdefs.h"
  2245. #include <stdlib.h>
  2246. #ifdef HAVE_UNISTD_H
  2247. #include <unistd.h>
  2248. #endif
  2249. #include <sys/types.h> /* NetBSD 1.0 needs this */
  2250. #include <sys/time.h>
  2251. #include <sys/resource.h>
  2252. extern
  2253. #ifdef __cplusplus
  2254. "C"
  2255. #endif
  2256. #if defined(__STDC__) || defined(__cplusplus)
  2257. int getrusage (int who, struct rusage * rusage);
  2258. #else
  2259. int getrusage();
  2260. #endif
  2261. int main() {
  2262. ; return 0; }
  2263. EOF
  2264. if { (eval echo configure:2509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2265. rm -rf conftest*
  2266. cl_cv_proto_getrusage_arg1="int"
  2267. else
  2268. echo "configure: failed program was:" >&5
  2269. cat conftest.$ac_ext >&5
  2270. rm -rf conftest*
  2271. cl_cv_proto_getrusage_arg1="enum __rusage_who"
  2272. fi
  2273. rm -f conftest*
  2274. cl_cv_proto_getrusage="extern int getrusage ($cl_cv_proto_getrusage_arg1, struct rusage *);"
  2275. fi
  2276. cl_cv_proto_getrusage=`echo "$cl_cv_proto_getrusage" | tr -s ' ' | sed -e 's/( /(/'`
  2277. echo "$ac_t""${ac_tt}$cl_cv_proto_getrusage" 1>&6
  2278. cat >> confdefs.h <<EOF
  2279. #define RUSAGE_WHO_T $cl_cv_proto_getrusage_arg1
  2280. EOF
  2281. fi
  2282. fi
  2283. echo $ac_n "checking for perror declaration""... $ac_c" 1>&6
  2284. echo "configure:2536: checking for perror declaration" >&5
  2285. if eval "test \"`echo '$''{'cl_cv_proto_perror'+set}'`\" = set"; then
  2286. echo $ac_n "(cached) $ac_c" 1>&6
  2287. else
  2288. cat > conftest.$ac_ext <<EOF
  2289. #line 2542 "configure"
  2290. #include "confdefs.h"
  2291. /* Some systems declare perror() in <errno.h>, some in <stdio.h>, some don't
  2292. declare it at all. */
  2293. #include <stdio.h>
  2294. #include <errno.h>
  2295. extern
  2296. #ifdef __cplusplus
  2297. "C"
  2298. #endif
  2299. double perror ();
  2300. int main() {
  2301. ; return 0; }
  2302. EOF
  2303. if { (eval echo configure:2558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2304. rm -rf conftest*
  2305. cl_cv_proto_perror=no
  2306. else
  2307. echo "configure: failed program was:" >&5
  2308. cat conftest.$ac_ext >&5
  2309. rm -rf conftest*
  2310. cl_cv_proto_perror=yes
  2311. fi
  2312. rm -f conftest*
  2313. fi
  2314. echo "$ac_t""$cl_cv_proto_perror" 1>&6
  2315. if test $cl_cv_proto_perror = yes; then
  2316. cat >> confdefs.h <<\EOF
  2317. #define HAVE_PERROR_DECL 1
  2318. EOF
  2319. fi
  2320. echo $ac_n "checking whether characters are unsigned""... $ac_c" 1>&6
  2321. echo "configure:2580: checking whether characters are unsigned" >&5
  2322. if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
  2323. echo $ac_n "(cached) $ac_c" 1>&6
  2324. else
  2325. if test $ac_cv_prog_gcc = yes; then
  2326. # GCC predefines this symbol on systems where it applies.
  2327. cat > conftest.$ac_ext <<EOF
  2328. #line 2588 "configure"
  2329. #include "confdefs.h"
  2330. #ifdef __CHAR_UNSIGNED__
  2331. yes
  2332. #endif
  2333. EOF
  2334. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2335. egrep "yes" >/dev/null 2>&1; then
  2336. rm -rf conftest*
  2337. ac_cv_c_char_unsigned=yes
  2338. else
  2339. rm -rf conftest*
  2340. ac_cv_c_char_unsigned=no
  2341. fi
  2342. rm -f conftest*
  2343. else
  2344. if test "$cross_compiling" = yes; then
  2345. ac_cv_c_char_unsigned="guessing no"
  2346. else
  2347. cat > conftest.$ac_ext <<EOF
  2348. #line 2610 "configure"
  2349. #include "confdefs.h"
  2350. #ifdef __cplusplus
  2351. extern "C" void exit(int);
  2352. #endif
  2353. /* volatile prevents gcc2 from optimizing the test away on sparcs. */
  2354. #if !defined(__STDC__) || __STDC__ != 1
  2355. #define volatile
  2356. #endif
  2357. int main() {
  2358. volatile char c = 255; exit(c < 0);
  2359. }
  2360. EOF
  2361. if { (eval echo configure:2623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2362. then
  2363. ac_cv_c_char_unsigned=yes
  2364. else
  2365. echo "configure: failed program was:" >&5
  2366. cat conftest.$ac_ext >&5
  2367. rm -fr conftest*
  2368. ac_cv_c_char_unsigned=no
  2369. fi
  2370. if test -f core; then
  2371. coredir=core`/bin/sh -c 'echo $$'`
  2372. mkdir $coredir
  2373. cp confdefs.h $coredir/confdefs.h
  2374. mv conftest.c $coredir/conftest.c
  2375. mv conftest $coredir/conftest
  2376. mv core $coredir/core
  2377. echo "warning: test program dumped core -- see subdirectory $coredir"
  2378. fi
  2379. rm -fr conftest*
  2380. fi
  2381. fi
  2382. fi
  2383. echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
  2384. if test $ac_cv_prog_gcc = no; then
  2385. # GCC defines __CHAR_UNSIGNED__ by itself, no need to fix up.
  2386. case "$ac_cv_c_char_unsigned" in
  2387. *yes) cat >> confdefs.h <<\EOF
  2388. #define __CHAR_UNSIGNED__ 1
  2389. EOF
  2390. ;;
  2391. *no) ;;
  2392. esac
  2393. fi
  2394. test -d 'include' || mkdir 'include'
  2395. cl_machine_file_c=${srcdir}/autoconf/intparam.c
  2396. cl_machine_file_h=include/cl_intparam.h
  2397. if test $cross_compiling = no; then
  2398. if test -z "$cl_cv_file_intparam_h"; then
  2399. echo "checking for integer types and behaviour" 1>&6
  2400. echo "configure:2664: checking for integer types and behaviour" >&5
  2401. cat > conftest.$ac_ext <<EOF
  2402. #include "confdefs.h"
  2403. EOF
  2404. cat "$cl_machine_file_c" >> conftest.$ac_ext
  2405. ORIGCC="$CC"
  2406. if test $ac_cv_prog_gcc = yes; then
  2407. # gcc -O (gcc version <= 2.3.2) crashes when compiling long long shifts for
  2408. # target 80386. Strip "-O".
  2409. CC=`echo "$CC " | sed -e 's/-O //g'`
  2410. fi
  2411. { (eval echo configure:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  2412. CC="$ORIGCC"
  2413. if test -s conftest; then
  2414. echo "creating $cl_machine_file_h"
  2415. ./conftest > conftest.h
  2416. if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
  2417. # The file exists and we would not be changing it
  2418. rm -f conftest.h
  2419. else
  2420. rm -f "$cl_machine_file_h"
  2421. mv conftest.h "$cl_machine_file_h"
  2422. fi
  2423. cl_cv_file_intparam_h=1
  2424. else
  2425. echo "creation of $cl_machine_file_h failed"
  2426. fi
  2427. rm -f conftest*
  2428. fi
  2429. else
  2430. echo "cross-compiling - cannot create $cl_machine_file_h"
  2431. fi
  2432. cl_machine_file_c=${srcdir}/autoconf/floatparam.c
  2433. cl_machine_file_h=include/cl_floatparam.h
  2434. if test $cross_compiling = no; then
  2435. if test -z "$cl_cv_file_floatparam_h"; then
  2436. echo "checking for floating-point types and behaviour" 1>&6
  2437. echo "configure:2702: checking for floating-point types and behaviour" >&5
  2438. cat > conftest.$ac_ext <<EOF
  2439. #include "confdefs.h"
  2440. EOF
  2441. cat "$cl_machine_file_c" >> conftest.$ac_ext
  2442. ORIGCC="$CC"
  2443. if test $ac_cv_prog_gcc = yes; then
  2444. # gcc -O (gcc version <= 2.3.2) crashes when compiling long long shifts for
  2445. # target 80386. Strip "-O".
  2446. CC=`echo "$CC " | sed -e 's/-O //g'`
  2447. fi
  2448. { (eval echo configure:2713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  2449. CC="$ORIGCC"
  2450. if test -s conftest; then
  2451. echo "creating $cl_machine_file_h"
  2452. ./conftest > conftest.h
  2453. if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
  2454. # The file exists and we would not be changing it
  2455. rm -f conftest.h
  2456. else
  2457. rm -f "$cl_machine_file_h"
  2458. mv conftest.h "$cl_machine_file_h"
  2459. fi
  2460. cl_cv_file_floatparam_h=1
  2461. else
  2462. echo "creation of $cl_machine_file_h failed"
  2463. fi
  2464. rm -f conftest*
  2465. fi
  2466. else
  2467. echo "cross-compiling - cannot create $cl_machine_file_h"
  2468. fi
  2469. # Check whether --with-gmp or --without-gmp was given.
  2470. if test "${with_gmp+set}" = set; then
  2471. withval="$with_gmp"
  2472. :
  2473. fi
  2474. if test "$with_gmp" = yes; then
  2475. echo $ac_n "checking for recent enough gmp.h""... $ac_c" 1>&6
  2476. echo "configure:2743: checking for recent enough gmp.h" >&5
  2477. if eval "test \"`echo '$''{'cl_cv_new_gmp_h'+set}'`\" = set"; then
  2478. echo $ac_n "(cached) $ac_c" 1>&6
  2479. else
  2480. cat > conftest.$ac_ext <<EOF
  2481. #line 2749 "configure"
  2482. #include "confdefs.h"
  2483. #include <gmp.h>
  2484. #if !defined(__GNU_MP_VERSION) || (__GNU_MP_VERSION < 3)
  2485. #error "ancient gmp.h"
  2486. #endif
  2487. EOF
  2488. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2489. { (eval echo configure:2757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2490. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2491. if test -z "$ac_err"; then
  2492. rm -rf conftest*
  2493. cl_cv_new_gmp_h="yes"
  2494. else
  2495. echo "$ac_err" >&5
  2496. echo "configure: failed program was:" >&5
  2497. cat conftest.$ac_ext >&5
  2498. rm -rf conftest*
  2499. cl_cv_new_gmp_h="no"
  2500. fi
  2501. rm -f conftest*
  2502. fi
  2503. echo "$ac_t""$cl_cv_new_gmp_h" 1>&6
  2504. if test "$cl_cv_new_gmp_h" = no; then with_gmp="no"; fi
  2505. if test "$with_gmp" = yes; then
  2506. echo $ac_n "checking for working libgmp""... $ac_c" 1>&6
  2507. echo "configure:2776: checking for working libgmp" >&5
  2508. if eval "test \"`echo '$''{'cl_cv_new_libgmp'+set}'`\" = set"; then
  2509. echo $ac_n "(cached) $ac_c" 1>&6
  2510. else
  2511. SAVELIBS=$LIBS
  2512. LIBS="$LIBS -lgmp"
  2513. cat > conftest.$ac_ext <<EOF
  2514. #line 2784 "configure"
  2515. #include "confdefs.h"
  2516. #include <gmp.h>
  2517. int main() {
  2518. mpn_divexact_by3(0,0,0)
  2519. ; return 0; }
  2520. EOF
  2521. if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2522. rm -rf conftest*
  2523. cl_cv_new_libgmp="yes"
  2524. else
  2525. echo "configure: failed program was:" >&5
  2526. cat conftest.$ac_ext >&5
  2527. rm -rf conftest*
  2528. cl_cv_new_libgmp="no"; LIBS=$SAVELIBS
  2529. fi
  2530. rm -f conftest*
  2531. fi
  2532. echo "$ac_t""$cl_cv_new_libgmp" 1>&6
  2533. if test "$cl_cv_new_libgmp" = no; then with_gmp="no"; fi
  2534. fi
  2535. fi
  2536. if test "$with_gmp" = yes; then
  2537. cat >> confdefs.h <<\EOF
  2538. #define CL_USE_GMP 1
  2539. EOF
  2540. else
  2541. echo "configure: warning: disabling external GNU MP library" 1>&2
  2542. fi
  2543. for f in 'tests/.gdbinit'; do
  2544. if test '!' -f "$f"; then
  2545. echo "creating $f"
  2546. g=`echo "$f" | sed -e 's,/[^/]*$,,'`
  2547. test "$g" = "$f" || test -d "$g" || mkdir "$g"
  2548. cp "$srcdir/$f" "$f"
  2549. fi
  2550. done
  2551. trap '' 1 2 15
  2552. cat > confcache <<\EOF
  2553. # This file is a shell script that caches the results of configure
  2554. # tests run on this system so they can be shared between configure
  2555. # scripts and configure runs. It is not useful on other systems.
  2556. # If it contains results you don't want to keep, you may remove or edit it.
  2557. #
  2558. # By default, configure uses ./config.cache as the cache file,
  2559. # creating it if it does not exist already. You can give configure
  2560. # the --cache-file=FILE option to use a different cache file; that is
  2561. # what configure does when it calls configure scripts in
  2562. # subdirectories, so they share the cache.
  2563. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2564. # config.status only pays attention to the cache file if you give it the
  2565. # --recheck option to rerun configure.
  2566. #
  2567. EOF
  2568. # The following way of writing the cache mishandles newlines in values,
  2569. # but we know of no workaround that is simple, portable, and efficient.
  2570. # So, don't put newlines in cache variables' values.
  2571. # Ultrix sh set writes to stderr and can't be redirected directly,
  2572. # and sets the high bit in the cache file unless we assign to the vars.
  2573. (set) 2>&1 |
  2574. case `(ac_space=' '; set | grep ac_space) 2>&1` in
  2575. *ac_space=\ *)
  2576. # `set' does not quote correctly, so add quotes (double-quote substitution
  2577. # turns \\\\ into \\, and sed turns \\ into \).
  2578. sed -n \
  2579. -e "s/'/'\\\\''/g" \
  2580. -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2581. ;;
  2582. *)
  2583. # `set' quotes correctly as required by POSIX, so do not add quotes.
  2584. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2585. ;;
  2586. esac >> confcache
  2587. if cmp -s $cache_file confcache; then
  2588. :
  2589. else
  2590. if test -w $cache_file; then
  2591. echo "updating cache $cache_file"
  2592. cat confcache > $cache_file
  2593. else
  2594. echo "not updating unwritable cache $cache_file"
  2595. fi
  2596. fi
  2597. rm -f confcache
  2598. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  2599. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2600. # Let make expand exec_prefix.
  2601. test "x$exec_prefix" = xNONE && exec_prefix='$(prefix)'
  2602. # Any assignment to VPATH causes Sun make to only execute
  2603. # the first set of double-colon rules, so remove it if not needed.
  2604. # If there is a colon in the path, we need to keep it.
  2605. if test "x$srcdir" = x.; then
  2606. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  2607. fi
  2608. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2609. DEFS=-DHAVE_CONFIG_H
  2610. # Without the "./", some shells look in PATH for config.status.
  2611. : ${CONFIG_STATUS=./config.status}
  2612. echo creating $CONFIG_STATUS
  2613. rm -f $CONFIG_STATUS
  2614. cat > $CONFIG_STATUS <<EOF
  2615. #! /bin/sh
  2616. # Generated automatically by configure.
  2617. # Run this file to recreate the current configuration.
  2618. # This directory was configured as follows,
  2619. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2620. #
  2621. # $0 $ac_configure_args
  2622. #
  2623. # Compiler output produced by configure, useful for debugging
  2624. # configure, is in ./config.log if it exists.
  2625. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2626. for ac_option
  2627. do
  2628. case "\$ac_option" in
  2629. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2630. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2631. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2632. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2633. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  2634. exit 0 ;;
  2635. -help | --help | --hel | --he | --h)
  2636. echo "\$ac_cs_usage"; exit 0 ;;
  2637. *) echo "\$ac_cs_usage"; exit 1 ;;
  2638. esac
  2639. done
  2640. ac_given_srcdir=$srcdir
  2641. trap 'rm -fr `echo "Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile include/cl_config.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2642. EOF
  2643. cat >> $CONFIG_STATUS <<EOF
  2644. # Protect against being on the right side of a sed subst in config.status.
  2645. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2646. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2647. $ac_vpsub
  2648. $extrasub
  2649. s%@SHELL@%$SHELL%g
  2650. s%@CFLAGS@%$CFLAGS%g
  2651. s%@CPPFLAGS@%$CPPFLAGS%g
  2652. s%@CXXFLAGS@%$CXXFLAGS%g
  2653. s%@FFLAGS@%$FFLAGS%g
  2654. s%@DEFS@%$DEFS%g
  2655. s%@LDFLAGS@%$LDFLAGS%g
  2656. s%@LIBS@%$LIBS%g
  2657. s%@exec_prefix@%$exec_prefix%g
  2658. s%@prefix@%$prefix%g
  2659. s%@program_transform_name@%$program_transform_name%g
  2660. s%@bindir@%$bindir%g
  2661. s%@sbindir@%$sbindir%g
  2662. s%@libexecdir@%$libexecdir%g
  2663. s%@datadir@%$datadir%g
  2664. s%@sysconfdir@%$sysconfdir%g
  2665. s%@sharedstatedir@%$sharedstatedir%g
  2666. s%@localstatedir@%$localstatedir%g
  2667. s%@libdir@%$libdir%g
  2668. s%@includedir@%$includedir%g
  2669. s%@oldincludedir@%$oldincludedir%g
  2670. s%@infodir@%$infodir%g
  2671. s%@mandir@%$mandir%g
  2672. s%@SET_MAKE@%$SET_MAKE%g
  2673. s%@CC@%$CC%g
  2674. s%@CPP@%$CPP%g
  2675. s%@CXX@%$CXX%g
  2676. s%@CXXCPP@%$CXXCPP%g
  2677. s%@AS_UNDERSCORE@%$AS_UNDERSCORE%g
  2678. s%@RANLIB@%$RANLIB%g
  2679. s%@INSTALL@%$INSTALL%g
  2680. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2681. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2682. s%@host@%$host%g
  2683. s%@host_cpu@%$host_cpu%g
  2684. s%@host_vendor@%$host_vendor%g
  2685. s%@host_os@%$host_os%g
  2686. s%@LD@%$LD%g
  2687. s%@NM@%$NM%g
  2688. s%@LN_S@%$LN_S%g
  2689. s%@LIBTOOL@%$LIBTOOL%g
  2690. s%@CLN_CURRENT@%$CLN_CURRENT%g
  2691. s%@CLN_REVISION@%$CLN_REVISION%g
  2692. s%@CLN_AGE@%$CLN_AGE%g
  2693. s%@ALLOCA@%$ALLOCA%g
  2694. CEOF
  2695. EOF
  2696. cat >> $CONFIG_STATUS <<\EOF
  2697. # Split the substitutions into bite-sized pieces for seds with
  2698. # small command number limits, like on Digital OSF/1 and HP-UX.
  2699. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  2700. ac_file=1 # Number of current file.
  2701. ac_beg=1 # First line for current file.
  2702. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  2703. ac_more_lines=:
  2704. ac_sed_cmds=""
  2705. while $ac_more_lines; do
  2706. if test $ac_beg -gt 1; then
  2707. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  2708. else
  2709. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  2710. fi
  2711. if test ! -s conftest.s$ac_file; then
  2712. ac_more_lines=false
  2713. rm -f conftest.s$ac_file
  2714. else
  2715. if test -z "$ac_sed_cmds"; then
  2716. ac_sed_cmds="sed -f conftest.s$ac_file"
  2717. else
  2718. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  2719. fi
  2720. ac_file=`expr $ac_file + 1`
  2721. ac_beg=$ac_end
  2722. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  2723. fi
  2724. done
  2725. if test -z "$ac_sed_cmds"; then
  2726. ac_sed_cmds=cat
  2727. fi
  2728. EOF
  2729. cat >> $CONFIG_STATUS <<EOF
  2730. CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile"}
  2731. EOF
  2732. cat >> $CONFIG_STATUS <<\EOF
  2733. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2734. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2735. case "$ac_file" in
  2736. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2737. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2738. *) ac_file_in="${ac_file}.in" ;;
  2739. esac
  2740. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  2741. # Remove last slash and all that follows it. Not all systems have dirname.
  2742. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2743. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2744. # The file is in a subdirectory.
  2745. test ! -d "$ac_dir" && mkdir "$ac_dir"
  2746. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2747. # A "../" for each directory in $ac_dir_suffix.
  2748. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2749. else
  2750. ac_dir_suffix= ac_dots=
  2751. fi
  2752. case "$ac_given_srcdir" in
  2753. .) srcdir=.
  2754. if test -z "$ac_dots"; then top_srcdir=.
  2755. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2756. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2757. *) # Relative path.
  2758. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2759. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2760. esac
  2761. echo creating "$ac_file"
  2762. rm -f "$ac_file"
  2763. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2764. case "$ac_file" in
  2765. *Makefile*) ac_comsub="1i\\
  2766. # $configure_input" ;;
  2767. *) ac_comsub= ;;
  2768. esac
  2769. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2770. sed -e "$ac_comsub
  2771. s%@configure_input@%$configure_input%g
  2772. s%@srcdir@%$srcdir%g
  2773. s%@top_srcdir@%$top_srcdir%g
  2774. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  2775. fi; done
  2776. rm -f conftest.s*
  2777. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2778. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2779. #
  2780. # ac_d sets the value in "#define NAME VALUE" lines.
  2781. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  2782. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  2783. ac_dC='\3'
  2784. ac_dD='%g'
  2785. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2786. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  2787. ac_uB='\([ ]\)%\1#\2define\3'
  2788. ac_uC=' '
  2789. ac_uD='\4%g'
  2790. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2791. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  2792. ac_eB='$%\1#\2define\3'
  2793. ac_eC=' '
  2794. ac_eD='%g'
  2795. # ac_f turns "#define NAME" without trailing blanks into "#define NAME VALUE".
  2796. ac_fA='s%^\([ ]*\)#\([ ]*\)define\([ ][ ]*\)'
  2797. ac_fB='$%\1#\2define\3'
  2798. ac_fC=' '
  2799. ac_fD='%g'
  2800. if test "${CONFIG_HEADERS+set}" != set; then
  2801. EOF
  2802. cat >> $CONFIG_STATUS <<EOF
  2803. CONFIG_HEADERS="include/cl_config.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h"
  2804. EOF
  2805. cat >> $CONFIG_STATUS <<\EOF
  2806. fi
  2807. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2808. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2809. case "$ac_file" in
  2810. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2811. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2812. *) ac_file_in="${ac_file}.in" ;;
  2813. esac
  2814. echo creating $ac_file
  2815. rm -f conftest.frag conftest.in conftest.out
  2816. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2817. cat $ac_file_inputs > conftest.in
  2818. EOF
  2819. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2820. # the proper values into config.h.in to produce config.h. And first:
  2821. # Protect against being on the right side of a sed subst in config.status.
  2822. # Protect against being in an unquoted here document in config.status.
  2823. rm -f conftest.vals
  2824. cat > conftest.hdr <<\EOF
  2825. s/[\\&%]/\\&/g
  2826. s%[\\$`]%\\&%g
  2827. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2828. s%ac_d%ac_u%gp
  2829. s%ac_u%ac_e%gp
  2830. s%ac_e%ac_f%gp
  2831. EOF
  2832. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2833. rm -f conftest.hdr
  2834. # Break up conftest.vals because some shells have a limit on
  2835. # the size of here documents, and old seds have small limits too.
  2836. rm -f conftest.tail
  2837. while :
  2838. do
  2839. ac_lines=`grep -c . conftest.vals`
  2840. # grep -c gives empty output for an empty file on some AIX systems.
  2841. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2842. # Write a limited-size here document to conftest.frag.
  2843. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2844. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2845. echo 'CEOF
  2846. sed -f conftest.frag conftest.in > conftest.out
  2847. rm -f conftest.in
  2848. mv conftest.out conftest.in
  2849. ' >> $CONFIG_STATUS
  2850. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2851. rm -f conftest.vals
  2852. mv conftest.tail conftest.vals
  2853. done
  2854. rm -f conftest.vals
  2855. cat >> $CONFIG_STATUS <<\EOF
  2856. rm -f conftest.frag conftest.h
  2857. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  2858. cat conftest.in >> conftest.h
  2859. rm -f conftest.in
  2860. if cmp -s $ac_file conftest.h 2>/dev/null; then
  2861. echo "$ac_file is unchanged"
  2862. rm -f conftest.h
  2863. else
  2864. # Remove last slash and all that follows it. Not all systems have dirname.
  2865. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2866. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2867. # The file is in a subdirectory.
  2868. test ! -d "$ac_dir" && mkdir "$ac_dir"
  2869. fi
  2870. rm -f $ac_file
  2871. mv conftest.h $ac_file
  2872. fi
  2873. fi; done
  2874. EOF
  2875. cat >> $CONFIG_STATUS <<EOF
  2876. EOF
  2877. cat >> $CONFIG_STATUS <<\EOF
  2878. exit 0
  2879. EOF
  2880. chmod +x $CONFIG_STATUS
  2881. rm -fr confdefs* $ac_clean_files
  2882. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1