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.

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