1 | #! /bin/sh |
---|
2 | |
---|
3 | # Guess values for system-dependent variables and create Makefiles. |
---|
4 | # Generated automatically using autoconf version 2.13 |
---|
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
---|
6 | # |
---|
7 | # This configure script is free software; the Free Software Foundation |
---|
8 | # gives unlimited permission to copy, distribute and modify it. |
---|
9 | |
---|
10 | # Defaults: |
---|
11 | ac_help= |
---|
12 | ac_default_prefix=/usr/local |
---|
13 | # Any additions from configure.in: |
---|
14 | ac_default_prefix=`pwd`/.. |
---|
15 | ac_help="$ac_help |
---|
16 | --with-rootdir=DIR use DIR ass compiled-in root directory |
---|
17 | (default is PREFIX)" |
---|
18 | ac_help="$ac_help |
---|
19 | --with-lex=[LEX,no] uses LEX as lex program, default is flex" |
---|
20 | ac_help="$ac_help |
---|
21 | --with-readline do use static readline for fancy display" |
---|
22 | ac_help="$ac_help |
---|
23 | --without-MP do not use MP (no MP links)" |
---|
24 | ac_help="$ac_help |
---|
25 | --without-dbm do not use dbm (no DBM links)" |
---|
26 | ac_help="$ac_help |
---|
27 | --without-factory do not use factory (no poly factorization)" |
---|
28 | ac_help="$ac_help |
---|
29 | --without-libfac do not use libfac (no primary decompositions)" |
---|
30 | ac_help="$ac_help |
---|
31 | --with-namespaces do compile namespace support" |
---|
32 | ac_help="$ac_help |
---|
33 | --with-dl do use dl (dynamic linking)" |
---|
34 | ac_help="$ac_help |
---|
35 | --with-apint=PACKAGE use PACKAGE for arbitary integer arithmetic" |
---|
36 | ac_help="$ac_help |
---|
37 | --with-exp_type=TYPE uses TYPE as type of exponents in polynomials |
---|
38 | -- default type is short |
---|
39 | -- possible other types are char and int" |
---|
40 | ac_help="$ac_help |
---|
41 | --with-gmalloc use our own gmalloc routines, instead of the ones |
---|
42 | provided by the system" |
---|
43 | |
---|
44 | # Initialize some variables set by options. |
---|
45 | # The variables have the same names as the options, with |
---|
46 | # dashes changed to underlines. |
---|
47 | build=NONE |
---|
48 | cache_file=./config.cache |
---|
49 | exec_prefix=NONE |
---|
50 | host=NONE |
---|
51 | no_create= |
---|
52 | nonopt=NONE |
---|
53 | no_recursion= |
---|
54 | prefix=NONE |
---|
55 | program_prefix=NONE |
---|
56 | program_suffix=NONE |
---|
57 | program_transform_name=s,x,x, |
---|
58 | silent= |
---|
59 | site= |
---|
60 | srcdir= |
---|
61 | target=NONE |
---|
62 | verbose= |
---|
63 | x_includes=NONE |
---|
64 | x_libraries=NONE |
---|
65 | bindir='${exec_prefix}/bin' |
---|
66 | sbindir='${exec_prefix}/sbin' |
---|
67 | libexecdir='${exec_prefix}/libexec' |
---|
68 | datadir='${prefix}/share' |
---|
69 | sysconfdir='${prefix}/etc' |
---|
70 | sharedstatedir='${prefix}/com' |
---|
71 | localstatedir='${prefix}/var' |
---|
72 | libdir='${exec_prefix}/lib' |
---|
73 | includedir='${prefix}/include' |
---|
74 | oldincludedir='/usr/include' |
---|
75 | infodir='${prefix}/info' |
---|
76 | mandir='${prefix}/man' |
---|
77 | |
---|
78 | # Initialize some other variables. |
---|
79 | subdirs= |
---|
80 | MFLAGS= MAKEFLAGS= |
---|
81 | SHELL=${CONFIG_SHELL-/bin/sh} |
---|
82 | # Maximum number of lines to put in a shell here document. |
---|
83 | ac_max_here_lines=12 |
---|
84 | |
---|
85 | ac_prev= |
---|
86 | for ac_option |
---|
87 | do |
---|
88 | |
---|
89 | # If the previous option needs an argument, assign it. |
---|
90 | if test -n "$ac_prev"; then |
---|
91 | eval "$ac_prev=\$ac_option" |
---|
92 | ac_prev= |
---|
93 | continue |
---|
94 | fi |
---|
95 | |
---|
96 | case "$ac_option" in |
---|
97 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
---|
98 | *) ac_optarg= ;; |
---|
99 | esac |
---|
100 | |
---|
101 | # Accept the important Cygnus configure options, so we can diagnose typos. |
---|
102 | |
---|
103 | case "$ac_option" in |
---|
104 | |
---|
105 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
---|
106 | ac_prev=bindir ;; |
---|
107 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
---|
108 | bindir="$ac_optarg" ;; |
---|
109 | |
---|
110 | -build | --build | --buil | --bui | --bu) |
---|
111 | ac_prev=build ;; |
---|
112 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
---|
113 | build="$ac_optarg" ;; |
---|
114 | |
---|
115 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
---|
116 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
---|
117 | ac_prev=cache_file ;; |
---|
118 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
---|
119 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
---|
120 | cache_file="$ac_optarg" ;; |
---|
121 | |
---|
122 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
---|
123 | ac_prev=datadir ;; |
---|
124 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
---|
125 | | --da=*) |
---|
126 | datadir="$ac_optarg" ;; |
---|
127 | |
---|
128 | -disable-* | --disable-*) |
---|
129 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
---|
130 | # Reject names that are not valid shell variable names. |
---|
131 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
---|
132 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
---|
133 | fi |
---|
134 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
---|
135 | eval "enable_${ac_feature}=no" ;; |
---|
136 | |
---|
137 | -enable-* | --enable-*) |
---|
138 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
---|
139 | # Reject names that are not valid shell variable names. |
---|
140 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
---|
141 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
---|
142 | fi |
---|
143 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
---|
144 | case "$ac_option" in |
---|
145 | *=*) ;; |
---|
146 | *) ac_optarg=yes ;; |
---|
147 | esac |
---|
148 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
---|
149 | |
---|
150 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
---|
151 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
---|
152 | | --exec | --exe | --ex) |
---|
153 | ac_prev=exec_prefix ;; |
---|
154 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
---|
155 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
---|
156 | | --exec=* | --exe=* | --ex=*) |
---|
157 | exec_prefix="$ac_optarg" ;; |
---|
158 | |
---|
159 | -gas | --gas | --ga | --g) |
---|
160 | # Obsolete; use --with-gas. |
---|
161 | with_gas=yes ;; |
---|
162 | |
---|
163 | -help | --help | --hel | --he) |
---|
164 | # Omit some internal or obsolete options to make the list less imposing. |
---|
165 | # This message is too long to be a string in the A/UX 3.1 sh. |
---|
166 | cat << EOF |
---|
167 | Usage: configure [options] [host] |
---|
168 | Options: [defaults in brackets after descriptions] |
---|
169 | Configuration: |
---|
170 | --cache-file=FILE cache test results in FILE |
---|
171 | --help print this message |
---|
172 | --no-create do not create output files |
---|
173 | --quiet, --silent do not print \`checking...' messages |
---|
174 | --version print the version of autoconf that created configure |
---|
175 | Directory and file names: |
---|
176 | --prefix=PREFIX install architecture-independent files in PREFIX |
---|
177 | [$ac_default_prefix] |
---|
178 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
---|
179 | [same as prefix] |
---|
180 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
---|
181 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] |
---|
182 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] |
---|
183 | --datadir=DIR read-only architecture-independent data in DIR |
---|
184 | [PREFIX/share] |
---|
185 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
---|
186 | --sharedstatedir=DIR modifiable architecture-independent data in DIR |
---|
187 | [PREFIX/com] |
---|
188 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
---|
189 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] |
---|
190 | --includedir=DIR C header files in DIR [PREFIX/include] |
---|
191 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] |
---|
192 | --infodir=DIR info documentation in DIR [PREFIX/info] |
---|
193 | --mandir=DIR man documentation in DIR [PREFIX/man] |
---|
194 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
---|
195 | --program-prefix=PREFIX prepend PREFIX to installed program names |
---|
196 | --program-suffix=SUFFIX append SUFFIX to installed program names |
---|
197 | --program-transform-name=PROGRAM |
---|
198 | run sed PROGRAM on installed program names |
---|
199 | EOF |
---|
200 | cat << EOF |
---|
201 | Host type: |
---|
202 | --build=BUILD configure for building on BUILD [BUILD=HOST] |
---|
203 | --host=HOST configure for HOST [guessed] |
---|
204 | --target=TARGET configure for TARGET [TARGET=HOST] |
---|
205 | Features and packages: |
---|
206 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
---|
207 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
---|
208 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
---|
209 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
---|
210 | --x-includes=DIR X include files are in DIR |
---|
211 | --x-libraries=DIR X library files are in DIR |
---|
212 | EOF |
---|
213 | if test -n "$ac_help"; then |
---|
214 | echo "--enable and --with options recognized:$ac_help" |
---|
215 | fi |
---|
216 | exit 0 ;; |
---|
217 | |
---|
218 | -host | --host | --hos | --ho) |
---|
219 | ac_prev=host ;; |
---|
220 | -host=* | --host=* | --hos=* | --ho=*) |
---|
221 | host="$ac_optarg" ;; |
---|
222 | |
---|
223 | -includedir | --includedir | --includedi | --included | --include \ |
---|
224 | | --includ | --inclu | --incl | --inc) |
---|
225 | ac_prev=includedir ;; |
---|
226 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
---|
227 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
---|
228 | includedir="$ac_optarg" ;; |
---|
229 | |
---|
230 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
---|
231 | ac_prev=infodir ;; |
---|
232 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
---|
233 | infodir="$ac_optarg" ;; |
---|
234 | |
---|
235 | -libdir | --libdir | --libdi | --libd) |
---|
236 | ac_prev=libdir ;; |
---|
237 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
---|
238 | libdir="$ac_optarg" ;; |
---|
239 | |
---|
240 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
---|
241 | | --libexe | --libex | --libe) |
---|
242 | ac_prev=libexecdir ;; |
---|
243 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
---|
244 | | --libexe=* | --libex=* | --libe=*) |
---|
245 | libexecdir="$ac_optarg" ;; |
---|
246 | |
---|
247 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
---|
248 | | --localstate | --localstat | --localsta | --localst \ |
---|
249 | | --locals | --local | --loca | --loc | --lo) |
---|
250 | ac_prev=localstatedir ;; |
---|
251 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
---|
252 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
---|
253 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) |
---|
254 | localstatedir="$ac_optarg" ;; |
---|
255 | |
---|
256 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
---|
257 | ac_prev=mandir ;; |
---|
258 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
---|
259 | mandir="$ac_optarg" ;; |
---|
260 | |
---|
261 | -nfp | --nfp | --nf) |
---|
262 | # Obsolete; use --without-fp. |
---|
263 | with_fp=no ;; |
---|
264 | |
---|
265 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
---|
266 | | --no-cr | --no-c) |
---|
267 | no_create=yes ;; |
---|
268 | |
---|
269 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
---|
270 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
---|
271 | no_recursion=yes ;; |
---|
272 | |
---|
273 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
---|
274 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
---|
275 | | --oldin | --oldi | --old | --ol | --o) |
---|
276 | ac_prev=oldincludedir ;; |
---|
277 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
---|
278 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
---|
279 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
---|
280 | oldincludedir="$ac_optarg" ;; |
---|
281 | |
---|
282 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
---|
283 | ac_prev=prefix ;; |
---|
284 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
---|
285 | prefix="$ac_optarg" ;; |
---|
286 | |
---|
287 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
---|
288 | | --program-pre | --program-pr | --program-p) |
---|
289 | ac_prev=program_prefix ;; |
---|
290 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
---|
291 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
---|
292 | program_prefix="$ac_optarg" ;; |
---|
293 | |
---|
294 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
---|
295 | | --program-suf | --program-su | --program-s) |
---|
296 | ac_prev=program_suffix ;; |
---|
297 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
---|
298 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
---|
299 | program_suffix="$ac_optarg" ;; |
---|
300 | |
---|
301 | -program-transform-name | --program-transform-name \ |
---|
302 | | --program-transform-nam | --program-transform-na \ |
---|
303 | | --program-transform-n | --program-transform- \ |
---|
304 | | --program-transform | --program-transfor \ |
---|
305 | | --program-transfo | --program-transf \ |
---|
306 | | --program-trans | --program-tran \ |
---|
307 | | --progr-tra | --program-tr | --program-t) |
---|
308 | ac_prev=program_transform_name ;; |
---|
309 | -program-transform-name=* | --program-transform-name=* \ |
---|
310 | | --program-transform-nam=* | --program-transform-na=* \ |
---|
311 | | --program-transform-n=* | --program-transform-=* \ |
---|
312 | | --program-transform=* | --program-transfor=* \ |
---|
313 | | --program-transfo=* | --program-transf=* \ |
---|
314 | | --program-trans=* | --program-tran=* \ |
---|
315 | | --progr-tra=* | --program-tr=* | --program-t=*) |
---|
316 | program_transform_name="$ac_optarg" ;; |
---|
317 | |
---|
318 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
---|
319 | | -silent | --silent | --silen | --sile | --sil) |
---|
320 | silent=yes ;; |
---|
321 | |
---|
322 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
---|
323 | ac_prev=sbindir ;; |
---|
324 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
---|
325 | | --sbi=* | --sb=*) |
---|
326 | sbindir="$ac_optarg" ;; |
---|
327 | |
---|
328 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
---|
329 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
---|
330 | | --sharedst | --shareds | --shared | --share | --shar \ |
---|
331 | | --sha | --sh) |
---|
332 | ac_prev=sharedstatedir ;; |
---|
333 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
---|
334 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
---|
335 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
---|
336 | | --sha=* | --sh=*) |
---|
337 | sharedstatedir="$ac_optarg" ;; |
---|
338 | |
---|
339 | -site | --site | --sit) |
---|
340 | ac_prev=site ;; |
---|
341 | -site=* | --site=* | --sit=*) |
---|
342 | site="$ac_optarg" ;; |
---|
343 | |
---|
344 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
---|
345 | ac_prev=srcdir ;; |
---|
346 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
---|
347 | srcdir="$ac_optarg" ;; |
---|
348 | |
---|
349 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
---|
350 | | --syscon | --sysco | --sysc | --sys | --sy) |
---|
351 | ac_prev=sysconfdir ;; |
---|
352 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
---|
353 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
---|
354 | sysconfdir="$ac_optarg" ;; |
---|
355 | |
---|
356 | -target | --target | --targe | --targ | --tar | --ta | --t) |
---|
357 | ac_prev=target ;; |
---|
358 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
---|
359 | target="$ac_optarg" ;; |
---|
360 | |
---|
361 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
---|
362 | verbose=yes ;; |
---|
363 | |
---|
364 | -version | --version | --versio | --versi | --vers) |
---|
365 | echo "configure generated by autoconf version 2.13" |
---|
366 | exit 0 ;; |
---|
367 | |
---|
368 | -with-* | --with-*) |
---|
369 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
---|
370 | # Reject names that are not valid shell variable names. |
---|
371 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
---|
372 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
---|
373 | fi |
---|
374 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
---|
375 | case "$ac_option" in |
---|
376 | *=*) ;; |
---|
377 | *) ac_optarg=yes ;; |
---|
378 | esac |
---|
379 | eval "with_${ac_package}='$ac_optarg'" ;; |
---|
380 | |
---|
381 | -without-* | --without-*) |
---|
382 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
---|
383 | # Reject names that are not valid shell variable names. |
---|
384 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
---|
385 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
---|
386 | fi |
---|
387 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
---|
388 | eval "with_${ac_package}=no" ;; |
---|
389 | |
---|
390 | --x) |
---|
391 | # Obsolete; use --with-x. |
---|
392 | with_x=yes ;; |
---|
393 | |
---|
394 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
---|
395 | | --x-incl | --x-inc | --x-in | --x-i) |
---|
396 | ac_prev=x_includes ;; |
---|
397 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
---|
398 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
---|
399 | x_includes="$ac_optarg" ;; |
---|
400 | |
---|
401 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
---|
402 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
---|
403 | ac_prev=x_libraries ;; |
---|
404 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
---|
405 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
---|
406 | x_libraries="$ac_optarg" ;; |
---|
407 | |
---|
408 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
---|
409 | ;; |
---|
410 | |
---|
411 | *) |
---|
412 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
---|
413 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
---|
414 | fi |
---|
415 | if test "x$nonopt" != xNONE; then |
---|
416 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
---|
417 | fi |
---|
418 | nonopt="$ac_option" |
---|
419 | ;; |
---|
420 | |
---|
421 | esac |
---|
422 | done |
---|
423 | |
---|
424 | if test -n "$ac_prev"; then |
---|
425 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
---|
426 | fi |
---|
427 | |
---|
428 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
---|
429 | |
---|
430 | # File descriptor usage: |
---|
431 | # 0 standard input |
---|
432 | # 1 file creation |
---|
433 | # 2 errors and warnings |
---|
434 | # 3 some systems may open it to /dev/tty |
---|
435 | # 4 used on the Kubota Titan |
---|
436 | # 6 checking for... messages and results |
---|
437 | # 5 compiler messages saved in config.log |
---|
438 | if test "$silent" = yes; then |
---|
439 | exec 6>/dev/null |
---|
440 | else |
---|
441 | exec 6>&1 |
---|
442 | fi |
---|
443 | exec 5>./config.log |
---|
444 | |
---|
445 | echo "\ |
---|
446 | This file contains any messages produced by compilers while |
---|
447 | running configure, to aid debugging if configure makes a mistake. |
---|
448 | " 1>&5 |
---|
449 | |
---|
450 | # Strip out --no-create and --no-recursion so they do not pile up. |
---|
451 | # Also quote any args containing shell metacharacters. |
---|
452 | ac_configure_args= |
---|
453 | for ac_arg |
---|
454 | do |
---|
455 | case "$ac_arg" in |
---|
456 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
---|
457 | | --no-cr | --no-c) ;; |
---|
458 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
---|
459 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; |
---|
460 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
---|
461 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; |
---|
462 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; |
---|
463 | esac |
---|
464 | done |
---|
465 | |
---|
466 | # NLS nuisances. |
---|
467 | # Only set these to C if already set. These must not be set unconditionally |
---|
468 | # because not all systems understand e.g. LANG=C (notably SCO). |
---|
469 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! |
---|
470 | # Non-C LC_CTYPE values break the ctype check. |
---|
471 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
---|
472 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
---|
473 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
---|
474 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi |
---|
475 | |
---|
476 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
---|
477 | rm -rf conftest* confdefs.h |
---|
478 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
---|
479 | echo > confdefs.h |
---|
480 | |
---|
481 | # A filename unique to this package, relative to the directory that |
---|
482 | # configure is in, which we can look for to find out if srcdir is correct. |
---|
483 | ac_unique_file=gmalloc.c |
---|
484 | |
---|
485 | # Find the source files, if location was not specified. |
---|
486 | if test -z "$srcdir"; then |
---|
487 | ac_srcdir_defaulted=yes |
---|
488 | # Try the directory containing this script, then its parent. |
---|
489 | ac_prog=$0 |
---|
490 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
---|
491 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
---|
492 | srcdir=$ac_confdir |
---|
493 | if test ! -r $srcdir/$ac_unique_file; then |
---|
494 | srcdir=.. |
---|
495 | fi |
---|
496 | else |
---|
497 | ac_srcdir_defaulted=no |
---|
498 | fi |
---|
499 | if test ! -r $srcdir/$ac_unique_file; then |
---|
500 | if test "$ac_srcdir_defaulted" = yes; then |
---|
501 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
---|
502 | else |
---|
503 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
---|
504 | fi |
---|
505 | fi |
---|
506 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
---|
507 | |
---|
508 | # Prefer explicitly selected file to automatically selected ones. |
---|
509 | if test -z "$CONFIG_SITE"; then |
---|
510 | if test "x$prefix" != xNONE; then |
---|
511 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
---|
512 | else |
---|
513 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
---|
514 | fi |
---|
515 | fi |
---|
516 | for ac_site_file in $CONFIG_SITE; do |
---|
517 | if test -r "$ac_site_file"; then |
---|
518 | echo "loading site script $ac_site_file" |
---|
519 | . "$ac_site_file" |
---|
520 | fi |
---|
521 | done |
---|
522 | |
---|
523 | if test -r "$cache_file"; then |
---|
524 | echo "loading cache $cache_file" |
---|
525 | . $cache_file |
---|
526 | else |
---|
527 | echo "creating cache $cache_file" |
---|
528 | > $cache_file |
---|
529 | fi |
---|
530 | |
---|
531 | ac_ext=c |
---|
532 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
---|
533 | ac_cpp='$CPP $CPPFLAGS' |
---|
534 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
---|
535 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
---|
536 | cross_compiling=$ac_cv_prog_cc_cross |
---|
537 | |
---|
538 | ac_exeext= |
---|
539 | ac_objext=o |
---|
540 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
---|
541 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
---|
542 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then |
---|
543 | ac_n= ac_c=' |
---|
544 | ' ac_t=' ' |
---|
545 | else |
---|
546 | ac_n=-n ac_c= ac_t= |
---|
547 | fi |
---|
548 | else |
---|
549 | ac_n= ac_c='\c' ac_t= |
---|
550 | fi |
---|
551 | |
---|
552 | |
---|
553 | |
---|
554 | |
---|
555 | |
---|
556 | echo $ac_n "checking uname for singular""... $ac_c" 1>&6 |
---|
557 | echo "configure:558: checking uname for singular" >&5 |
---|
558 | if eval "test \"`echo '$''{'ac_cv_singuname'+set}'`\" = set"; then |
---|
559 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
560 | else |
---|
561 | ac_cv_singuname="unknown" |
---|
562 | if test -r "singuname.sh"; then |
---|
563 | if (/bin/sh singuname.sh >/dev/null 2>&1) then |
---|
564 | ac_cv_singuname=`/bin/sh singuname.sh` |
---|
565 | fi |
---|
566 | fi |
---|
567 | if test "$ac_cv_singuname" = unknown && test -r "../singuname.sh"; then |
---|
568 | if (/bin/sh ../singuname.sh >/dev/null 2>&1) then |
---|
569 | ac_cv_singuname=`/bin/sh ../singuname.sh` |
---|
570 | fi |
---|
571 | fi |
---|
572 | |
---|
573 | fi |
---|
574 | |
---|
575 | echo "$ac_t""$ac_cv_singuname" 1>&6 |
---|
576 | if test "$ac_cv_singuname" = unknown; then |
---|
577 | echo "configure: warning: Unknown architecture: Check singuname.sh" 1>&2 |
---|
578 | ac_cv_singuname="unknown" |
---|
579 | fi |
---|
580 | cat >> confdefs.h <<EOF |
---|
581 | #define S_UNAME "$ac_cv_singuname" |
---|
582 | EOF |
---|
583 | |
---|
584 | SINGUNAME=$ac_cv_singuname |
---|
585 | |
---|
586 | |
---|
587 | if test "$ac_cv_singuname" = ix86-Win; then |
---|
588 | EXEC_EXT=".exe" |
---|
589 | fi |
---|
590 | |
---|
591 | |
---|
592 | SING_UNAME=`echo $SINGUNAME | tr '-' '_' ` |
---|
593 | |
---|
594 | |
---|
595 | # stupid Win programs do not like dots in their pathnames |
---|
596 | VERSION_SEP="-" |
---|
597 | |
---|
598 | |
---|
599 | SINGULAR_MAJOR_VERSION=${SINGULAR_MAJOR_VERSION:-1} |
---|
600 | SINGULAR_MINOR_VERSION=${SINGULAR_MINOR_VERSION:-3} |
---|
601 | SINGULAR_SUB_VERSION=${SINGULAR_SUB_VERSION:-9} |
---|
602 | SINGULAR_VERSION="${SINGULAR_VERSION:-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION}" |
---|
603 | VERSION_DATE=${VERSION_DATE:-"September 2000"} |
---|
604 | |
---|
605 | |
---|
606 | |
---|
607 | |
---|
608 | |
---|
609 | |
---|
610 | cat >> confdefs.h <<EOF |
---|
611 | #define SINGULAR_MAJOR_VERSION ${SINGULAR_MAJOR_VERSION} |
---|
612 | EOF |
---|
613 | |
---|
614 | cat >> confdefs.h <<EOF |
---|
615 | #define SINGULAR_MINOR_VERSION ${SINGULAR_MINOR_VERSION} |
---|
616 | EOF |
---|
617 | |
---|
618 | cat >> confdefs.h <<EOF |
---|
619 | #define SINGULAR_SUB_VERSION ${SINGULAR_SUB_VERSION} |
---|
620 | EOF |
---|
621 | |
---|
622 | cat >> confdefs.h <<EOF |
---|
623 | #define S_VERSION1 "${SINGULAR_MAJOR_VERSION}${VERSION_SEP}${SINGULAR_MINOR_VERSION}${VERSION_SEP}${SINGULAR_SUB_VERSION}" |
---|
624 | EOF |
---|
625 | |
---|
626 | cat >> confdefs.h <<EOF |
---|
627 | #define S_VERSION2 "${VERSION_DATE}" |
---|
628 | EOF |
---|
629 | |
---|
630 | cat >> confdefs.h <<EOF |
---|
631 | #define SINGULAR_SUB_VERSION ${SINGULAR_SUB_VERSION} |
---|
632 | EOF |
---|
633 | |
---|
634 | |
---|
635 | |
---|
636 | if test "${CXXFLAGS+set}" != set; then |
---|
637 | ac_cxxflags_set=no |
---|
638 | CXXFLAGS="-O" |
---|
639 | fi |
---|
640 | if test "${CFLAGS+set}" != set; then |
---|
641 | CFLAGS="-O" |
---|
642 | ac_cflags_set=no |
---|
643 | fi |
---|
644 | |
---|
645 | # check whether CXX was set by user as env variable |
---|
646 | if test "${CXX+set}" != set; then |
---|
647 | ac_cxx_set=no |
---|
648 | else |
---|
649 | ac_cxx_set=yes |
---|
650 | fi |
---|
651 | # Extract the first word of "gcc", so it can be a program name with args. |
---|
652 | set dummy gcc; ac_word=$2 |
---|
653 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
---|
654 | echo "configure:655: checking for $ac_word" >&5 |
---|
655 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
---|
656 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
657 | else |
---|
658 | if test -n "$CC"; then |
---|
659 | ac_cv_prog_CC="$CC" # Let the user override the test. |
---|
660 | else |
---|
661 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
---|
662 | ac_dummy="$PATH" |
---|
663 | for ac_dir in $ac_dummy; do |
---|
664 | test -z "$ac_dir" && ac_dir=. |
---|
665 | if test -f $ac_dir/$ac_word; then |
---|
666 | ac_cv_prog_CC="gcc" |
---|
667 | break |
---|
668 | fi |
---|
669 | done |
---|
670 | IFS="$ac_save_ifs" |
---|
671 | fi |
---|
672 | fi |
---|
673 | CC="$ac_cv_prog_CC" |
---|
674 | if test -n "$CC"; then |
---|
675 | echo "$ac_t""$CC" 1>&6 |
---|
676 | else |
---|
677 | echo "$ac_t""no" 1>&6 |
---|
678 | fi |
---|
679 | |
---|
680 | if test -z "$CC"; then |
---|
681 | # Extract the first word of "cc", so it can be a program name with args. |
---|
682 | set dummy cc; ac_word=$2 |
---|
683 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
---|
684 | echo "configure:685: checking for $ac_word" >&5 |
---|
685 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
---|
686 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
687 | else |
---|
688 | if test -n "$CC"; then |
---|
689 | ac_cv_prog_CC="$CC" # Let the user override the test. |
---|
690 | else |
---|
691 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
---|
692 | ac_prog_rejected=no |
---|
693 | ac_dummy="$PATH" |
---|
694 | for ac_dir in $ac_dummy; do |
---|
695 | test -z "$ac_dir" && ac_dir=. |
---|
696 | if test -f $ac_dir/$ac_word; then |
---|
697 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
---|
698 | ac_prog_rejected=yes |
---|
699 | continue |
---|
700 | fi |
---|
701 | ac_cv_prog_CC="cc" |
---|
702 | break |
---|
703 | fi |
---|
704 | done |
---|
705 | IFS="$ac_save_ifs" |
---|
706 | if test $ac_prog_rejected = yes; then |
---|
707 | # We found a bogon in the path, so make sure we never use it. |
---|
708 | set dummy $ac_cv_prog_CC |
---|
709 | shift |
---|
710 | if test $# -gt 0; then |
---|
711 | # We chose a different compiler from the bogus one. |
---|
712 | # However, it has the same basename, so the bogon will be chosen |
---|
713 | # first if we set CC to just the basename; use the full file name. |
---|
714 | shift |
---|
715 | set dummy "$ac_dir/$ac_word" "$@" |
---|
716 | shift |
---|
717 | ac_cv_prog_CC="$@" |
---|
718 | fi |
---|
719 | fi |
---|
720 | fi |
---|
721 | fi |
---|
722 | CC="$ac_cv_prog_CC" |
---|
723 | if test -n "$CC"; then |
---|
724 | echo "$ac_t""$CC" 1>&6 |
---|
725 | else |
---|
726 | echo "$ac_t""no" 1>&6 |
---|
727 | fi |
---|
728 | |
---|
729 | if test -z "$CC"; then |
---|
730 | case "`uname -s`" in |
---|
731 | *win32* | *WIN32*) |
---|
732 | # Extract the first word of "cl", so it can be a program name with args. |
---|
733 | set dummy cl; ac_word=$2 |
---|
734 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
---|
735 | echo "configure:736: checking for $ac_word" >&5 |
---|
736 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
---|
737 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
738 | else |
---|
739 | if test -n "$CC"; then |
---|
740 | ac_cv_prog_CC="$CC" # Let the user override the test. |
---|
741 | else |
---|
742 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
---|
743 | ac_dummy="$PATH" |
---|
744 | for ac_dir in $ac_dummy; do |
---|
745 | test -z "$ac_dir" && ac_dir=. |
---|
746 | if test -f $ac_dir/$ac_word; then |
---|
747 | ac_cv_prog_CC="cl" |
---|
748 | break |
---|
749 | fi |
---|
750 | done |
---|
751 | IFS="$ac_save_ifs" |
---|
752 | fi |
---|
753 | fi |
---|
754 | CC="$ac_cv_prog_CC" |
---|
755 | if test -n "$CC"; then |
---|
756 | echo "$ac_t""$CC" 1>&6 |
---|
757 | else |
---|
758 | echo "$ac_t""no" 1>&6 |
---|
759 | fi |
---|
760 | ;; |
---|
761 | esac |
---|
762 | fi |
---|
763 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
---|
764 | fi |
---|
765 | |
---|
766 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
---|
767 | echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
---|
768 | |
---|
769 | ac_ext=c |
---|
770 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
---|
771 | ac_cpp='$CPP $CPPFLAGS' |
---|
772 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
---|
773 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
---|
774 | cross_compiling=$ac_cv_prog_cc_cross |
---|
775 | |
---|
776 | cat > conftest.$ac_ext << EOF |
---|
777 | |
---|
778 | #line 779 "configure" |
---|
779 | #include "confdefs.h" |
---|
780 | |
---|
781 | main(){return(0);} |
---|
782 | EOF |
---|
783 | if { (eval echo configure:784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
784 | ac_cv_prog_cc_works=yes |
---|
785 | # If we can't run a trivial program, we are probably using a cross compiler. |
---|
786 | if (./conftest; exit) 2>/dev/null; then |
---|
787 | ac_cv_prog_cc_cross=no |
---|
788 | else |
---|
789 | ac_cv_prog_cc_cross=yes |
---|
790 | fi |
---|
791 | else |
---|
792 | echo "configure: failed program was:" >&5 |
---|
793 | cat conftest.$ac_ext >&5 |
---|
794 | ac_cv_prog_cc_works=no |
---|
795 | fi |
---|
796 | rm -fr conftest* |
---|
797 | ac_ext=c |
---|
798 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
---|
799 | ac_cpp='$CPP $CPPFLAGS' |
---|
800 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
---|
801 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
---|
802 | cross_compiling=$ac_cv_prog_cc_cross |
---|
803 | |
---|
804 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
---|
805 | if test $ac_cv_prog_cc_works = no; then |
---|
806 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
---|
807 | fi |
---|
808 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
---|
809 | echo "configure:810: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
---|
810 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
---|
811 | cross_compiling=$ac_cv_prog_cc_cross |
---|
812 | |
---|
813 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
---|
814 | echo "configure:815: checking whether we are using GNU C" >&5 |
---|
815 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
---|
816 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
817 | else |
---|
818 | cat > conftest.c <<EOF |
---|
819 | #ifdef __GNUC__ |
---|
820 | yes; |
---|
821 | #endif |
---|
822 | EOF |
---|
823 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
---|
824 | ac_cv_prog_gcc=yes |
---|
825 | else |
---|
826 | ac_cv_prog_gcc=no |
---|
827 | fi |
---|
828 | fi |
---|
829 | |
---|
830 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
---|
831 | |
---|
832 | if test $ac_cv_prog_gcc = yes; then |
---|
833 | GCC=yes |
---|
834 | else |
---|
835 | GCC= |
---|
836 | fi |
---|
837 | |
---|
838 | ac_test_CFLAGS="${CFLAGS+set}" |
---|
839 | ac_save_CFLAGS="$CFLAGS" |
---|
840 | CFLAGS= |
---|
841 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
---|
842 | echo "configure:843: checking whether ${CC-cc} accepts -g" >&5 |
---|
843 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
---|
844 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
845 | else |
---|
846 | echo 'void f(){}' > conftest.c |
---|
847 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then |
---|
848 | ac_cv_prog_cc_g=yes |
---|
849 | else |
---|
850 | ac_cv_prog_cc_g=no |
---|
851 | fi |
---|
852 | rm -f conftest* |
---|
853 | |
---|
854 | fi |
---|
855 | |
---|
856 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
---|
857 | if test "$ac_test_CFLAGS" = set; then |
---|
858 | CFLAGS="$ac_save_CFLAGS" |
---|
859 | elif test $ac_cv_prog_cc_g = yes; then |
---|
860 | if test "$GCC" = yes; then |
---|
861 | CFLAGS="-g -O2" |
---|
862 | else |
---|
863 | CFLAGS="-g" |
---|
864 | fi |
---|
865 | else |
---|
866 | if test "$GCC" = yes; then |
---|
867 | CFLAGS="-O2" |
---|
868 | else |
---|
869 | CFLAGS= |
---|
870 | fi |
---|
871 | fi |
---|
872 | |
---|
873 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
---|
874 | echo "configure:875: checking how to run the C preprocessor" >&5 |
---|
875 | # On Suns, sometimes $CPP names a directory. |
---|
876 | if test -n "$CPP" && test -d "$CPP"; then |
---|
877 | CPP= |
---|
878 | fi |
---|
879 | if test -z "$CPP"; then |
---|
880 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
---|
881 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
882 | else |
---|
883 | # This must be in double quotes, not single quotes, because CPP may get |
---|
884 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
---|
885 | CPP="${CC-cc} -E" |
---|
886 | # On the NeXT, cc -E runs the code through the compiler's parser, |
---|
887 | # not just through cpp. |
---|
888 | cat > conftest.$ac_ext <<EOF |
---|
889 | #line 890 "configure" |
---|
890 | #include "confdefs.h" |
---|
891 | #include <assert.h> |
---|
892 | Syntax Error |
---|
893 | EOF |
---|
894 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
---|
895 | { (eval echo configure:896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
---|
896 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
---|
897 | if test -z "$ac_err"; then |
---|
898 | : |
---|
899 | else |
---|
900 | echo "$ac_err" >&5 |
---|
901 | echo "configure: failed program was:" >&5 |
---|
902 | cat conftest.$ac_ext >&5 |
---|
903 | rm -rf conftest* |
---|
904 | CPP="${CC-cc} -E -traditional-cpp" |
---|
905 | cat > conftest.$ac_ext <<EOF |
---|
906 | #line 907 "configure" |
---|
907 | #include "confdefs.h" |
---|
908 | #include <assert.h> |
---|
909 | Syntax Error |
---|
910 | EOF |
---|
911 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
---|
912 | { (eval echo configure:913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
---|
913 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
---|
914 | if test -z "$ac_err"; then |
---|
915 | : |
---|
916 | else |
---|
917 | echo "$ac_err" >&5 |
---|
918 | echo "configure: failed program was:" >&5 |
---|
919 | cat conftest.$ac_ext >&5 |
---|
920 | rm -rf conftest* |
---|
921 | CPP="${CC-cc} -nologo -E" |
---|
922 | cat > conftest.$ac_ext <<EOF |
---|
923 | #line 924 "configure" |
---|
924 | #include "confdefs.h" |
---|
925 | #include <assert.h> |
---|
926 | Syntax Error |
---|
927 | EOF |
---|
928 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
---|
929 | { (eval echo configure:930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
---|
930 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
---|
931 | if test -z "$ac_err"; then |
---|
932 | : |
---|
933 | else |
---|
934 | echo "$ac_err" >&5 |
---|
935 | echo "configure: failed program was:" >&5 |
---|
936 | cat conftest.$ac_ext >&5 |
---|
937 | rm -rf conftest* |
---|
938 | CPP=/lib/cpp |
---|
939 | fi |
---|
940 | rm -f conftest* |
---|
941 | fi |
---|
942 | rm -f conftest* |
---|
943 | fi |
---|
944 | rm -f conftest* |
---|
945 | ac_cv_prog_CPP="$CPP" |
---|
946 | fi |
---|
947 | CPP="$ac_cv_prog_CPP" |
---|
948 | else |
---|
949 | ac_cv_prog_CPP="$CPP" |
---|
950 | fi |
---|
951 | echo "$ac_t""$CPP" 1>&6 |
---|
952 | |
---|
953 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
---|
954 | do |
---|
955 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
---|
956 | set dummy $ac_prog; ac_word=$2 |
---|
957 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
---|
958 | echo "configure:959: checking for $ac_word" >&5 |
---|
959 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
---|
960 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
961 | else |
---|
962 | if test -n "$CXX"; then |
---|
963 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
---|
964 | else |
---|
965 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
---|
966 | ac_dummy="$PATH" |
---|
967 | for ac_dir in $ac_dummy; do |
---|
968 | test -z "$ac_dir" && ac_dir=. |
---|
969 | if test -f $ac_dir/$ac_word; then |
---|
970 | ac_cv_prog_CXX="$ac_prog" |
---|
971 | break |
---|
972 | fi |
---|
973 | done |
---|
974 | IFS="$ac_save_ifs" |
---|
975 | fi |
---|
976 | fi |
---|
977 | CXX="$ac_cv_prog_CXX" |
---|
978 | if test -n "$CXX"; then |
---|
979 | echo "$ac_t""$CXX" 1>&6 |
---|
980 | else |
---|
981 | echo "$ac_t""no" 1>&6 |
---|
982 | fi |
---|
983 | |
---|
984 | test -n "$CXX" && break |
---|
985 | done |
---|
986 | test -n "$CXX" || CXX="gcc" |
---|
987 | |
---|
988 | |
---|
989 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
---|
990 | echo "configure:991: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
---|
991 | |
---|
992 | ac_ext=C |
---|
993 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
---|
994 | ac_cpp='$CXXCPP $CPPFLAGS' |
---|
995 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
---|
996 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
---|
997 | cross_compiling=$ac_cv_prog_cxx_cross |
---|
998 | |
---|
999 | cat > conftest.$ac_ext << EOF |
---|
1000 | |
---|
1001 | #line 1002 "configure" |
---|
1002 | #include "confdefs.h" |
---|
1003 | |
---|
1004 | int main(){return(0);} |
---|
1005 | EOF |
---|
1006 | if { (eval echo configure:1007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
1007 | ac_cv_prog_cxx_works=yes |
---|
1008 | # If we can't run a trivial program, we are probably using a cross compiler. |
---|
1009 | if (./conftest; exit) 2>/dev/null; then |
---|
1010 | ac_cv_prog_cxx_cross=no |
---|
1011 | else |
---|
1012 | ac_cv_prog_cxx_cross=yes |
---|
1013 | fi |
---|
1014 | else |
---|
1015 | echo "configure: failed program was:" >&5 |
---|
1016 | cat conftest.$ac_ext >&5 |
---|
1017 | ac_cv_prog_cxx_works=no |
---|
1018 | fi |
---|
1019 | rm -fr conftest* |
---|
1020 | ac_ext=c |
---|
1021 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
---|
1022 | ac_cpp='$CPP $CPPFLAGS' |
---|
1023 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
---|
1024 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
---|
1025 | cross_compiling=$ac_cv_prog_cc_cross |
---|
1026 | |
---|
1027 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
---|
1028 | if test $ac_cv_prog_cxx_works = no; then |
---|
1029 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
---|
1030 | fi |
---|
1031 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
---|
1032 | echo "configure:1033: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 |
---|
1033 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
---|
1034 | cross_compiling=$ac_cv_prog_cxx_cross |
---|
1035 | |
---|
1036 | echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 |
---|
1037 | echo "configure:1038: checking whether we are using GNU C++" >&5 |
---|
1038 | if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then |
---|
1039 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1040 | else |
---|
1041 | cat > conftest.C <<EOF |
---|
1042 | #ifdef __GNUC__ |
---|
1043 | yes; |
---|
1044 | #endif |
---|
1045 | EOF |
---|
1046 | if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
---|
1047 | ac_cv_prog_gxx=yes |
---|
1048 | else |
---|
1049 | ac_cv_prog_gxx=no |
---|
1050 | fi |
---|
1051 | fi |
---|
1052 | |
---|
1053 | echo "$ac_t""$ac_cv_prog_gxx" 1>&6 |
---|
1054 | |
---|
1055 | if test $ac_cv_prog_gxx = yes; then |
---|
1056 | GXX=yes |
---|
1057 | else |
---|
1058 | GXX= |
---|
1059 | fi |
---|
1060 | |
---|
1061 | ac_test_CXXFLAGS="${CXXFLAGS+set}" |
---|
1062 | ac_save_CXXFLAGS="$CXXFLAGS" |
---|
1063 | CXXFLAGS= |
---|
1064 | echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 |
---|
1065 | echo "configure:1066: checking whether ${CXX-g++} accepts -g" >&5 |
---|
1066 | if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then |
---|
1067 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1068 | else |
---|
1069 | echo 'void f(){}' > conftest.cc |
---|
1070 | if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then |
---|
1071 | ac_cv_prog_cxx_g=yes |
---|
1072 | else |
---|
1073 | ac_cv_prog_cxx_g=no |
---|
1074 | fi |
---|
1075 | rm -f conftest* |
---|
1076 | |
---|
1077 | fi |
---|
1078 | |
---|
1079 | echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 |
---|
1080 | if test "$ac_test_CXXFLAGS" = set; then |
---|
1081 | CXXFLAGS="$ac_save_CXXFLAGS" |
---|
1082 | elif test $ac_cv_prog_cxx_g = yes; then |
---|
1083 | if test "$GXX" = yes; then |
---|
1084 | CXXFLAGS="-g -O2" |
---|
1085 | else |
---|
1086 | CXXFLAGS="-g" |
---|
1087 | fi |
---|
1088 | else |
---|
1089 | if test "$GXX" = yes; then |
---|
1090 | CXXFLAGS="-O2" |
---|
1091 | else |
---|
1092 | CXXFLAGS= |
---|
1093 | fi |
---|
1094 | fi |
---|
1095 | |
---|
1096 | ac_aux_dir= |
---|
1097 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
---|
1098 | if test -f $ac_dir/install-sh; then |
---|
1099 | ac_aux_dir=$ac_dir |
---|
1100 | ac_install_sh="$ac_aux_dir/install-sh -c" |
---|
1101 | break |
---|
1102 | elif test -f $ac_dir/install.sh; then |
---|
1103 | ac_aux_dir=$ac_dir |
---|
1104 | ac_install_sh="$ac_aux_dir/install.sh -c" |
---|
1105 | break |
---|
1106 | fi |
---|
1107 | done |
---|
1108 | if test -z "$ac_aux_dir"; then |
---|
1109 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
---|
1110 | fi |
---|
1111 | ac_config_guess=$ac_aux_dir/config.guess |
---|
1112 | ac_config_sub=$ac_aux_dir/config.sub |
---|
1113 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
---|
1114 | |
---|
1115 | # Find a good install program. We prefer a C program (faster), |
---|
1116 | # so one script is as good as another. But avoid the broken or |
---|
1117 | # incompatible versions: |
---|
1118 | # SysV /etc/install, /usr/sbin/install |
---|
1119 | # SunOS /usr/etc/install |
---|
1120 | # IRIX /sbin/install |
---|
1121 | # AIX /bin/install |
---|
1122 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
---|
1123 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
---|
1124 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
---|
1125 | # ./install, which can be erroneously created by make from ./install.sh. |
---|
1126 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
---|
1127 | echo "configure:1128: checking for a BSD compatible install" >&5 |
---|
1128 | if test -z "$INSTALL"; then |
---|
1129 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
---|
1130 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1131 | else |
---|
1132 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
---|
1133 | for ac_dir in $PATH; do |
---|
1134 | # Account for people who put trailing slashes in PATH elements. |
---|
1135 | case "$ac_dir/" in |
---|
1136 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
---|
1137 | *) |
---|
1138 | # OSF1 and SCO ODT 3.0 have their own names for install. |
---|
1139 | # Don't use installbsd from OSF since it installs stuff as root |
---|
1140 | # by default. |
---|
1141 | for ac_prog in ginstall scoinst install; do |
---|
1142 | if test -f $ac_dir/$ac_prog; then |
---|
1143 | if test $ac_prog = install && |
---|
1144 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
---|
1145 | # AIX install. It has an incompatible calling convention. |
---|
1146 | : |
---|
1147 | else |
---|
1148 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
---|
1149 | break 2 |
---|
1150 | fi |
---|
1151 | fi |
---|
1152 | done |
---|
1153 | ;; |
---|
1154 | esac |
---|
1155 | done |
---|
1156 | IFS="$ac_save_IFS" |
---|
1157 | |
---|
1158 | fi |
---|
1159 | if test "${ac_cv_path_install+set}" = set; then |
---|
1160 | INSTALL="$ac_cv_path_install" |
---|
1161 | else |
---|
1162 | # As a last resort, use the slow shell script. We don't cache a |
---|
1163 | # path for INSTALL within a source directory, because that will |
---|
1164 | # break other packages using the cache if that directory is |
---|
1165 | # removed, or if the path is relative. |
---|
1166 | INSTALL="$ac_install_sh" |
---|
1167 | fi |
---|
1168 | fi |
---|
1169 | echo "$ac_t""$INSTALL" 1>&6 |
---|
1170 | |
---|
1171 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
---|
1172 | # It thinks the first close brace ends the variable substitution. |
---|
1173 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
---|
1174 | |
---|
1175 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
---|
1176 | |
---|
1177 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
---|
1178 | |
---|
1179 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
---|
1180 | echo "configure:1181: checking for AIX" >&5 |
---|
1181 | cat > conftest.$ac_ext <<EOF |
---|
1182 | #line 1183 "configure" |
---|
1183 | #include "confdefs.h" |
---|
1184 | #ifdef _AIX |
---|
1185 | yes |
---|
1186 | #endif |
---|
1187 | |
---|
1188 | EOF |
---|
1189 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
---|
1190 | egrep "yes" >/dev/null 2>&1; then |
---|
1191 | rm -rf conftest* |
---|
1192 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
---|
1193 | #define _ALL_SOURCE 1 |
---|
1194 | EOF |
---|
1195 | |
---|
1196 | else |
---|
1197 | rm -rf conftest* |
---|
1198 | echo "$ac_t""no" 1>&6 |
---|
1199 | fi |
---|
1200 | rm -f conftest* |
---|
1201 | |
---|
1202 | |
---|
1203 | |
---|
1204 | # we prefer using gcc for compiling C++ files, provided the user did |
---|
1205 | # not overwrite it explicitely |
---|
1206 | if test "${GXX}" = yes && test "${ac_cxx_set}" = no; then |
---|
1207 | CXX=gcc |
---|
1208 | fi |
---|
1209 | |
---|
1210 | # check whether the compiler accepts -pipe |
---|
1211 | echo $ac_n "checking whether compiler accepts -pipe""... $ac_c" 1>&6 |
---|
1212 | echo "configure:1213: checking whether compiler accepts -pipe" >&5 |
---|
1213 | temp_cflags=${CFLAGS} |
---|
1214 | CFLAGS="${CFLAGS} -pipe" |
---|
1215 | if eval "test \"`echo '$''{'ac_cv_cxx_have_pipe'+set}'`\" = set"; then |
---|
1216 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1217 | else |
---|
1218 | cat > conftest.$ac_ext <<EOF |
---|
1219 | #line 1220 "configure" |
---|
1220 | #include "confdefs.h" |
---|
1221 | |
---|
1222 | int main() { |
---|
1223 | |
---|
1224 | ; return 0; } |
---|
1225 | EOF |
---|
1226 | if { (eval echo configure:1227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
---|
1227 | rm -rf conftest* |
---|
1228 | ac_cv_cxx_have_pipe=yes |
---|
1229 | else |
---|
1230 | echo "configure: failed program was:" >&5 |
---|
1231 | cat conftest.$ac_ext >&5 |
---|
1232 | rm -rf conftest* |
---|
1233 | ac_cv_cxx_have_pipe=no |
---|
1234 | fi |
---|
1235 | rm -f conftest* |
---|
1236 | |
---|
1237 | fi |
---|
1238 | |
---|
1239 | echo "$ac_t""${ac_cv_cxx_have_pipe}" 1>&6 |
---|
1240 | CFLAGS=${temp_cflags} |
---|
1241 | if test "${ac_cv_cxx_have_pipe}" != yes; then |
---|
1242 | PIPE= |
---|
1243 | else |
---|
1244 | PIPE="-pipe" |
---|
1245 | fi |
---|
1246 | |
---|
1247 | |
---|
1248 | # Customize CFLAGS |
---|
1249 | echo $ac_n "checking whether _AIX is defined""... $ac_c" 1>&6 |
---|
1250 | echo "configure:1251: checking whether _AIX is defined" >&5 |
---|
1251 | if eval "test \"`echo '$''{'ac_cv_is_aix'+set}'`\" = set"; then |
---|
1252 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1253 | else |
---|
1254 | cat > conftest.$ac_ext <<EOF |
---|
1255 | #line 1256 "configure" |
---|
1256 | #include "confdefs.h" |
---|
1257 | #ifdef _AIX |
---|
1258 | yes |
---|
1259 | #endif |
---|
1260 | |
---|
1261 | EOF |
---|
1262 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
---|
1263 | egrep "yes" >/dev/null 2>&1; then |
---|
1264 | rm -rf conftest* |
---|
1265 | ac_cv_is_aix=yes |
---|
1266 | else |
---|
1267 | rm -rf conftest* |
---|
1268 | ac_cv_is_aix=no |
---|
1269 | fi |
---|
1270 | rm -f conftest* |
---|
1271 | |
---|
1272 | fi |
---|
1273 | |
---|
1274 | if test "$ac_cv_is_aix" = yes; then |
---|
1275 | echo "$ac_t""yes" 1>&6 |
---|
1276 | else |
---|
1277 | echo "$ac_t""no" 1>&6 |
---|
1278 | fi |
---|
1279 | |
---|
1280 | # we know best when compiling with gcc |
---|
1281 | if test "${GXX}" = yes; then |
---|
1282 | if test "$ac_cxxflags_set" = no; then |
---|
1283 | CXXFLAGS="-O3 -w -fomit-frame-pointer" |
---|
1284 | fi |
---|
1285 | CXXTEMPLFLAGS="-fno-implicit-templates" |
---|
1286 | if test "$ac_cv_is_aix" = yes; then |
---|
1287 | CXXNOOPTFLAGS="-w" |
---|
1288 | else |
---|
1289 | CXXNOOPTFLAGS=$CXXFLAGS |
---|
1290 | fi |
---|
1291 | STATIC_LDFLAGS="-static" |
---|
1292 | else |
---|
1293 | CXXTEMPFLAGS="" |
---|
1294 | CXXNOOPTFLAGS=$CXXFLAGS |
---|
1295 | STATIC_LDFLAGS="" |
---|
1296 | fi |
---|
1297 | |
---|
1298 | |
---|
1299 | |
---|
1300 | |
---|
1301 | if test "${GCC}" = yes && test "$ac_cflags_set" = no ; then |
---|
1302 | CFLAGS="-O3 -w -fomit-frame-pointer" |
---|
1303 | fi |
---|
1304 | |
---|
1305 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
---|
1306 | echo "configure:1307: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
---|
1307 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
---|
1308 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then |
---|
1309 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1310 | else |
---|
1311 | cat > conftestmake <<\EOF |
---|
1312 | all: |
---|
1313 | @echo 'ac_maketemp="${MAKE}"' |
---|
1314 | EOF |
---|
1315 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
---|
1316 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` |
---|
1317 | if test -n "$ac_maketemp"; then |
---|
1318 | eval ac_cv_prog_make_${ac_make}_set=yes |
---|
1319 | else |
---|
1320 | eval ac_cv_prog_make_${ac_make}_set=no |
---|
1321 | fi |
---|
1322 | rm -f conftestmake |
---|
1323 | fi |
---|
1324 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then |
---|
1325 | echo "$ac_t""yes" 1>&6 |
---|
1326 | SET_MAKE= |
---|
1327 | else |
---|
1328 | echo "$ac_t""no" 1>&6 |
---|
1329 | SET_MAKE="MAKE=${MAKE-make}" |
---|
1330 | fi |
---|
1331 | |
---|
1332 | |
---|
1333 | |
---|
1334 | |
---|
1335 | |
---|
1336 | # expand prefix |
---|
1337 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
---|
1338 | if test "${with_rootdir+set}" != set; then |
---|
1339 | cat >> confdefs.h <<EOF |
---|
1340 | #define S_ROOT_DIR "${prefix}" |
---|
1341 | EOF |
---|
1342 | |
---|
1343 | else |
---|
1344 | cat >> confdefs.h <<EOF |
---|
1345 | #define S_ROOT_DIR "${with_rootdir}" |
---|
1346 | EOF |
---|
1347 | |
---|
1348 | fi |
---|
1349 | |
---|
1350 | # expand exec_prefixad |
---|
1351 | if test "x$exec_prefix" = xNONE; then |
---|
1352 | exec_prefix=${prefix}/${ac_cv_singuname} |
---|
1353 | fi |
---|
1354 | |
---|
1355 | # expand bindir |
---|
1356 | test "x$bindir" = 'x${exec_prefix}/bin' && bindir="${exec_prefix}" |
---|
1357 | SINGULAR=${SINGULAR:-$bindir/Singular-$SINGULAR_MAJOR_VERSION${VERSION_SEP}$SINGULAR_MINOR_VERSION${VERSION_SEP}$SINGULAR_SUB_VERSION} |
---|
1358 | |
---|
1359 | cat >> confdefs.h <<EOF |
---|
1360 | #define S_BIN_DIR "${bindir}" |
---|
1361 | EOF |
---|
1362 | |
---|
1363 | |
---|
1364 | # expand libdir |
---|
1365 | test "x$libdir" = 'x${exec_prefix}/lib'&& libdir="${exec_prefix}/lib" |
---|
1366 | |
---|
1367 | # expand includedir |
---|
1368 | test "x$includedir" = 'x${prefix}/include' && includedir="${exec_prefix}/include" |
---|
1369 | |
---|
1370 | # add to -I to CPPFLAGS and and -L to LDFLAGS, just to be sure |
---|
1371 | LDFLAGS="-L${libdir} ${LDFLAGS} -L/usr/local/lib" |
---|
1372 | CPPFLAGS="-I${includedir} ${CPPFLAGS} -I/usr/local/include" |
---|
1373 | |
---|
1374 | # this is a work-around to include the right term.h |
---|
1375 | if test "$ac_cv_singuname" = SunOS-5; then |
---|
1376 | CPPFLAGS="-I/usr/xpg4/include ${CPPFLAGS}" |
---|
1377 | fi |
---|
1378 | |
---|
1379 | |
---|
1380 | |
---|
1381 | # lex |
---|
1382 | if test "${with_lex+set}" != set; then |
---|
1383 | echo $ac_n "checking for flex""... $ac_c" 1>&6 |
---|
1384 | echo "configure:1385: checking for flex" >&5 |
---|
1385 | if eval "test \"`echo '$''{'ac_cv_prog_flex'+set}'`\" = set"; then |
---|
1386 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1387 | else |
---|
1388 | if (flex --version >/dev/null 2>&1) |
---|
1389 | then |
---|
1390 | if (flex --version | egrep "[2-9]\.[5-9]" >/dev/null 2>&1) |
---|
1391 | then |
---|
1392 | ac_cv_prog_flex=flex |
---|
1393 | fi |
---|
1394 | fi |
---|
1395 | |
---|
1396 | fi |
---|
1397 | |
---|
1398 | if test "${ac_cv_prog_flex+set}" = set; then |
---|
1399 | echo "$ac_t""flex" 1>&6 |
---|
1400 | LEX=flex |
---|
1401 | |
---|
1402 | else |
---|
1403 | { echo "configure: error: can not find flex with version greater 2.4" 1>&2; exit 1; } |
---|
1404 | fi |
---|
1405 | elif test "${with_lex}" = no; then |
---|
1406 | echo "configure: warning: building without lex -- make might fail" 1>&2 |
---|
1407 | else |
---|
1408 | unset LEX |
---|
1409 | unset ac_cv_prog_LEX |
---|
1410 | for ac_prog in ${with_lex} |
---|
1411 | do |
---|
1412 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
---|
1413 | set dummy $ac_prog; ac_word=$2 |
---|
1414 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
---|
1415 | echo "configure:1416: checking for $ac_word" >&5 |
---|
1416 | if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then |
---|
1417 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1418 | else |
---|
1419 | if test -n "$LEX"; then |
---|
1420 | ac_cv_prog_LEX="$LEX" # Let the user override the test. |
---|
1421 | else |
---|
1422 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
---|
1423 | ac_dummy="$PATH" |
---|
1424 | for ac_dir in $ac_dummy; do |
---|
1425 | test -z "$ac_dir" && ac_dir=. |
---|
1426 | if test -f $ac_dir/$ac_word; then |
---|
1427 | ac_cv_prog_LEX="$ac_prog" |
---|
1428 | break |
---|
1429 | fi |
---|
1430 | done |
---|
1431 | IFS="$ac_save_ifs" |
---|
1432 | fi |
---|
1433 | fi |
---|
1434 | LEX="$ac_cv_prog_LEX" |
---|
1435 | if test -n "$LEX"; then |
---|
1436 | echo "$ac_t""$LEX" 1>&6 |
---|
1437 | else |
---|
1438 | echo "$ac_t""no" 1>&6 |
---|
1439 | fi |
---|
1440 | |
---|
1441 | test -n "$LEX" && break |
---|
1442 | done |
---|
1443 | |
---|
1444 | if test "x${LEX}" = x; then |
---|
1445 | echo "configure: warning: building without lex -- make might fail" 1>&2 |
---|
1446 | fi |
---|
1447 | fi |
---|
1448 | |
---|
1449 | # bison |
---|
1450 | for ac_prog in bison |
---|
1451 | do |
---|
1452 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
---|
1453 | set dummy $ac_prog; ac_word=$2 |
---|
1454 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
---|
1455 | echo "configure:1456: checking for $ac_word" >&5 |
---|
1456 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
---|
1457 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1458 | else |
---|
1459 | if test -n "$BISON"; then |
---|
1460 | ac_cv_prog_BISON="$BISON" # Let the user override the test. |
---|
1461 | else |
---|
1462 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
---|
1463 | ac_dummy="$PATH" |
---|
1464 | for ac_dir in $ac_dummy; do |
---|
1465 | test -z "$ac_dir" && ac_dir=. |
---|
1466 | if test -f $ac_dir/$ac_word; then |
---|
1467 | ac_cv_prog_BISON="$ac_prog" |
---|
1468 | break |
---|
1469 | fi |
---|
1470 | done |
---|
1471 | IFS="$ac_save_ifs" |
---|
1472 | fi |
---|
1473 | fi |
---|
1474 | BISON="$ac_cv_prog_BISON" |
---|
1475 | if test -n "$BISON"; then |
---|
1476 | echo "$ac_t""$BISON" 1>&6 |
---|
1477 | else |
---|
1478 | echo "$ac_t""no" 1>&6 |
---|
1479 | fi |
---|
1480 | |
---|
1481 | test -n "$BISON" && break |
---|
1482 | done |
---|
1483 | |
---|
1484 | if test "${BISON+set}" != set; then |
---|
1485 | echo "configure: warning: did not find bison -- make might fail" 1>&2 |
---|
1486 | fi |
---|
1487 | |
---|
1488 | # ln -s |
---|
1489 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
---|
1490 | echo "configure:1491: checking whether ln -s works" >&5 |
---|
1491 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
---|
1492 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1493 | else |
---|
1494 | rm -f conftestdata |
---|
1495 | if ln -s X conftestdata 2>/dev/null |
---|
1496 | then |
---|
1497 | rm -f conftestdata |
---|
1498 | ac_cv_prog_LN_S="ln -s" |
---|
1499 | else |
---|
1500 | ac_cv_prog_LN_S=ln |
---|
1501 | fi |
---|
1502 | fi |
---|
1503 | LN_S="$ac_cv_prog_LN_S" |
---|
1504 | if test "$ac_cv_prog_LN_S" = "ln -s"; then |
---|
1505 | echo "$ac_t""yes" 1>&6 |
---|
1506 | else |
---|
1507 | echo "$ac_t""no" 1>&6 |
---|
1508 | fi |
---|
1509 | |
---|
1510 | |
---|
1511 | for ac_prog in perl5 perl |
---|
1512 | do |
---|
1513 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
---|
1514 | set dummy $ac_prog; ac_word=$2 |
---|
1515 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
---|
1516 | echo "configure:1517: checking for $ac_word" >&5 |
---|
1517 | if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then |
---|
1518 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1519 | else |
---|
1520 | if test -n "$PERL"; then |
---|
1521 | ac_cv_prog_PERL="$PERL" # Let the user override the test. |
---|
1522 | else |
---|
1523 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
---|
1524 | ac_dummy="$PATH" |
---|
1525 | for ac_dir in $ac_dummy; do |
---|
1526 | test -z "$ac_dir" && ac_dir=. |
---|
1527 | if test -f $ac_dir/$ac_word; then |
---|
1528 | ac_cv_prog_PERL="$ac_prog" |
---|
1529 | break |
---|
1530 | fi |
---|
1531 | done |
---|
1532 | IFS="$ac_save_ifs" |
---|
1533 | fi |
---|
1534 | fi |
---|
1535 | PERL="$ac_cv_prog_PERL" |
---|
1536 | if test -n "$PERL"; then |
---|
1537 | echo "$ac_t""$PERL" 1>&6 |
---|
1538 | else |
---|
1539 | echo "$ac_t""no" 1>&6 |
---|
1540 | fi |
---|
1541 | |
---|
1542 | test -n "$PERL" && break |
---|
1543 | done |
---|
1544 | |
---|
1545 | |
---|
1546 | # lib checks |
---|
1547 | echo $ac_n "checking for atof in -lm""... $ac_c" 1>&6 |
---|
1548 | echo "configure:1549: checking for atof in -lm" >&5 |
---|
1549 | ac_lib_var=`echo m'_'atof | sed 'y%./+-%__p_%'` |
---|
1550 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
1551 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1552 | else |
---|
1553 | ac_save_LIBS="$LIBS" |
---|
1554 | LIBS="-lm $LIBS" |
---|
1555 | cat > conftest.$ac_ext <<EOF |
---|
1556 | #line 1557 "configure" |
---|
1557 | #include "confdefs.h" |
---|
1558 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
1559 | /* We use char because int might match the return type of a gcc2 |
---|
1560 | builtin and then its argument prototype would still apply. */ |
---|
1561 | char atof(); |
---|
1562 | |
---|
1563 | int main() { |
---|
1564 | atof() |
---|
1565 | ; return 0; } |
---|
1566 | EOF |
---|
1567 | if { (eval echo configure:1568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
1568 | rm -rf conftest* |
---|
1569 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
1570 | else |
---|
1571 | echo "configure: failed program was:" >&5 |
---|
1572 | cat conftest.$ac_ext >&5 |
---|
1573 | rm -rf conftest* |
---|
1574 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
1575 | fi |
---|
1576 | rm -f conftest* |
---|
1577 | LIBS="$ac_save_LIBS" |
---|
1578 | |
---|
1579 | fi |
---|
1580 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
1581 | echo "$ac_t""yes" 1>&6 |
---|
1582 | ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
1583 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
1584 | cat >> confdefs.h <<EOF |
---|
1585 | #define $ac_tr_lib 1 |
---|
1586 | EOF |
---|
1587 | |
---|
1588 | LIBS="-lm $LIBS" |
---|
1589 | |
---|
1590 | else |
---|
1591 | echo "$ac_t""no" 1>&6 |
---|
1592 | fi |
---|
1593 | |
---|
1594 | echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6 |
---|
1595 | echo "configure:1596: checking for socket in -lbsd" >&5 |
---|
1596 | ac_lib_var=`echo bsd'_'socket | sed 'y%./+-%__p_%'` |
---|
1597 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
1598 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1599 | else |
---|
1600 | ac_save_LIBS="$LIBS" |
---|
1601 | LIBS="-lbsd $LIBS" |
---|
1602 | cat > conftest.$ac_ext <<EOF |
---|
1603 | #line 1604 "configure" |
---|
1604 | #include "confdefs.h" |
---|
1605 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
1606 | /* We use char because int might match the return type of a gcc2 |
---|
1607 | builtin and then its argument prototype would still apply. */ |
---|
1608 | char socket(); |
---|
1609 | |
---|
1610 | int main() { |
---|
1611 | socket() |
---|
1612 | ; return 0; } |
---|
1613 | EOF |
---|
1614 | if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
1615 | rm -rf conftest* |
---|
1616 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
1617 | else |
---|
1618 | echo "configure: failed program was:" >&5 |
---|
1619 | cat conftest.$ac_ext >&5 |
---|
1620 | rm -rf conftest* |
---|
1621 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
1622 | fi |
---|
1623 | rm -f conftest* |
---|
1624 | LIBS="$ac_save_LIBS" |
---|
1625 | |
---|
1626 | fi |
---|
1627 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
1628 | echo "$ac_t""yes" 1>&6 |
---|
1629 | ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
1630 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
1631 | cat >> confdefs.h <<EOF |
---|
1632 | #define $ac_tr_lib 1 |
---|
1633 | EOF |
---|
1634 | |
---|
1635 | LIBS="-lbsd $LIBS" |
---|
1636 | |
---|
1637 | else |
---|
1638 | echo "$ac_t""no" 1>&6 |
---|
1639 | fi |
---|
1640 | |
---|
1641 | echo $ac_n "checking for listen in -lsocket""... $ac_c" 1>&6 |
---|
1642 | echo "configure:1643: checking for listen in -lsocket" >&5 |
---|
1643 | ac_lib_var=`echo socket'_'listen | sed 'y%./+-%__p_%'` |
---|
1644 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
1645 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1646 | else |
---|
1647 | ac_save_LIBS="$LIBS" |
---|
1648 | LIBS="-lsocket $LIBS" |
---|
1649 | cat > conftest.$ac_ext <<EOF |
---|
1650 | #line 1651 "configure" |
---|
1651 | #include "confdefs.h" |
---|
1652 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
1653 | /* We use char because int might match the return type of a gcc2 |
---|
1654 | builtin and then its argument prototype would still apply. */ |
---|
1655 | char listen(); |
---|
1656 | |
---|
1657 | int main() { |
---|
1658 | listen() |
---|
1659 | ; return 0; } |
---|
1660 | EOF |
---|
1661 | if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
1662 | rm -rf conftest* |
---|
1663 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
1664 | else |
---|
1665 | echo "configure: failed program was:" >&5 |
---|
1666 | cat conftest.$ac_ext >&5 |
---|
1667 | rm -rf conftest* |
---|
1668 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
1669 | fi |
---|
1670 | rm -f conftest* |
---|
1671 | LIBS="$ac_save_LIBS" |
---|
1672 | |
---|
1673 | fi |
---|
1674 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
1675 | echo "$ac_t""yes" 1>&6 |
---|
1676 | ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
1677 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
1678 | cat >> confdefs.h <<EOF |
---|
1679 | #define $ac_tr_lib 1 |
---|
1680 | EOF |
---|
1681 | |
---|
1682 | LIBS="-lsocket $LIBS" |
---|
1683 | |
---|
1684 | else |
---|
1685 | echo "$ac_t""no" 1>&6 |
---|
1686 | fi |
---|
1687 | |
---|
1688 | echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 |
---|
1689 | echo "configure:1690: checking for gethostbyname in -lnsl" >&5 |
---|
1690 | ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` |
---|
1691 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
1692 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1693 | else |
---|
1694 | ac_save_LIBS="$LIBS" |
---|
1695 | LIBS="-lnsl $LIBS" |
---|
1696 | cat > conftest.$ac_ext <<EOF |
---|
1697 | #line 1698 "configure" |
---|
1698 | #include "confdefs.h" |
---|
1699 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
1700 | /* We use char because int might match the return type of a gcc2 |
---|
1701 | builtin and then its argument prototype would still apply. */ |
---|
1702 | char gethostbyname(); |
---|
1703 | |
---|
1704 | int main() { |
---|
1705 | gethostbyname() |
---|
1706 | ; return 0; } |
---|
1707 | EOF |
---|
1708 | if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
1709 | rm -rf conftest* |
---|
1710 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
1711 | else |
---|
1712 | echo "configure: failed program was:" >&5 |
---|
1713 | cat conftest.$ac_ext >&5 |
---|
1714 | rm -rf conftest* |
---|
1715 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
1716 | fi |
---|
1717 | rm -f conftest* |
---|
1718 | LIBS="$ac_save_LIBS" |
---|
1719 | |
---|
1720 | fi |
---|
1721 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
1722 | echo "$ac_t""yes" 1>&6 |
---|
1723 | ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
1724 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
1725 | cat >> confdefs.h <<EOF |
---|
1726 | #define $ac_tr_lib 1 |
---|
1727 | EOF |
---|
1728 | |
---|
1729 | LIBS="-lnsl $LIBS" |
---|
1730 | |
---|
1731 | else |
---|
1732 | echo "$ac_t""no" 1>&6 |
---|
1733 | fi |
---|
1734 | |
---|
1735 | echo $ac_n "checking for index in -lucb""... $ac_c" 1>&6 |
---|
1736 | echo "configure:1737: checking for index in -lucb" >&5 |
---|
1737 | ac_lib_var=`echo ucb'_'index | sed 'y%./+-%__p_%'` |
---|
1738 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
1739 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1740 | else |
---|
1741 | ac_save_LIBS="$LIBS" |
---|
1742 | LIBS="-lucb $LIBS" |
---|
1743 | cat > conftest.$ac_ext <<EOF |
---|
1744 | #line 1745 "configure" |
---|
1745 | #include "confdefs.h" |
---|
1746 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
1747 | /* We use char because int might match the return type of a gcc2 |
---|
1748 | builtin and then its argument prototype would still apply. */ |
---|
1749 | char ; |
---|
1750 | |
---|
1751 | int main() { |
---|
1752 | index() |
---|
1753 | ; return 0; } |
---|
1754 | EOF |
---|
1755 | if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
1756 | rm -rf conftest* |
---|
1757 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
1758 | else |
---|
1759 | echo "configure: failed program was:" >&5 |
---|
1760 | cat conftest.$ac_ext >&5 |
---|
1761 | rm -rf conftest* |
---|
1762 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
1763 | fi |
---|
1764 | rm -f conftest* |
---|
1765 | LIBS="$ac_save_LIBS" |
---|
1766 | |
---|
1767 | fi |
---|
1768 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
1769 | echo "$ac_t""yes" 1>&6 |
---|
1770 | ac_tr_lib=HAVE_LIB`echo ucb | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
1771 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
1772 | cat >> confdefs.h <<EOF |
---|
1773 | #define $ac_tr_lib 1 |
---|
1774 | EOF |
---|
1775 | |
---|
1776 | LIBS="-lucb $LIBS" |
---|
1777 | |
---|
1778 | else |
---|
1779 | echo "$ac_t""no" 1>&6 |
---|
1780 | fi |
---|
1781 | |
---|
1782 | |
---|
1783 | # heder file checks |
---|
1784 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
---|
1785 | echo "configure:1786: checking for ANSI C header files" >&5 |
---|
1786 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
---|
1787 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1788 | else |
---|
1789 | cat > conftest.$ac_ext <<EOF |
---|
1790 | #line 1791 "configure" |
---|
1791 | #include "confdefs.h" |
---|
1792 | #include <stdlib.h> |
---|
1793 | #include <stdarg.h> |
---|
1794 | #include <string.h> |
---|
1795 | #include <float.h> |
---|
1796 | EOF |
---|
1797 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
---|
1798 | { (eval echo configure:1799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
---|
1799 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
---|
1800 | if test -z "$ac_err"; then |
---|
1801 | rm -rf conftest* |
---|
1802 | ac_cv_header_stdc=yes |
---|
1803 | else |
---|
1804 | echo "$ac_err" >&5 |
---|
1805 | echo "configure: failed program was:" >&5 |
---|
1806 | cat conftest.$ac_ext >&5 |
---|
1807 | rm -rf conftest* |
---|
1808 | ac_cv_header_stdc=no |
---|
1809 | fi |
---|
1810 | rm -f conftest* |
---|
1811 | |
---|
1812 | if test $ac_cv_header_stdc = yes; then |
---|
1813 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
---|
1814 | cat > conftest.$ac_ext <<EOF |
---|
1815 | #line 1816 "configure" |
---|
1816 | #include "confdefs.h" |
---|
1817 | #include <string.h> |
---|
1818 | EOF |
---|
1819 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
---|
1820 | egrep "memchr" >/dev/null 2>&1; then |
---|
1821 | : |
---|
1822 | else |
---|
1823 | rm -rf conftest* |
---|
1824 | ac_cv_header_stdc=no |
---|
1825 | fi |
---|
1826 | rm -f conftest* |
---|
1827 | |
---|
1828 | fi |
---|
1829 | |
---|
1830 | if test $ac_cv_header_stdc = yes; then |
---|
1831 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
---|
1832 | cat > conftest.$ac_ext <<EOF |
---|
1833 | #line 1834 "configure" |
---|
1834 | #include "confdefs.h" |
---|
1835 | #include <stdlib.h> |
---|
1836 | EOF |
---|
1837 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
---|
1838 | egrep "free" >/dev/null 2>&1; then |
---|
1839 | : |
---|
1840 | else |
---|
1841 | rm -rf conftest* |
---|
1842 | ac_cv_header_stdc=no |
---|
1843 | fi |
---|
1844 | rm -f conftest* |
---|
1845 | |
---|
1846 | fi |
---|
1847 | |
---|
1848 | if test $ac_cv_header_stdc = yes; then |
---|
1849 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
---|
1850 | if test "$cross_compiling" = yes; then |
---|
1851 | : |
---|
1852 | else |
---|
1853 | cat > conftest.$ac_ext <<EOF |
---|
1854 | #line 1855 "configure" |
---|
1855 | #include "confdefs.h" |
---|
1856 | #include <ctype.h> |
---|
1857 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
---|
1858 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
---|
1859 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
---|
1860 | int main () { int i; for (i = 0; i < 256; i++) |
---|
1861 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
---|
1862 | exit (0); } |
---|
1863 | |
---|
1864 | EOF |
---|
1865 | if { (eval echo configure:1866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
1866 | then |
---|
1867 | : |
---|
1868 | else |
---|
1869 | echo "configure: failed program was:" >&5 |
---|
1870 | cat conftest.$ac_ext >&5 |
---|
1871 | rm -fr conftest* |
---|
1872 | ac_cv_header_stdc=no |
---|
1873 | fi |
---|
1874 | rm -fr conftest* |
---|
1875 | fi |
---|
1876 | |
---|
1877 | fi |
---|
1878 | fi |
---|
1879 | |
---|
1880 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
---|
1881 | if test $ac_cv_header_stdc = yes; then |
---|
1882 | cat >> confdefs.h <<\EOF |
---|
1883 | #define STDC_HEADERS 1 |
---|
1884 | EOF |
---|
1885 | |
---|
1886 | fi |
---|
1887 | |
---|
1888 | for ac_hdr in limits.h unistd.h |
---|
1889 | do |
---|
1890 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
---|
1891 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
---|
1892 | echo "configure:1893: checking for $ac_hdr" >&5 |
---|
1893 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
---|
1894 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1895 | else |
---|
1896 | cat > conftest.$ac_ext <<EOF |
---|
1897 | #line 1898 "configure" |
---|
1898 | #include "confdefs.h" |
---|
1899 | #include <$ac_hdr> |
---|
1900 | EOF |
---|
1901 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
---|
1902 | { (eval echo configure:1903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
---|
1903 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
---|
1904 | if test -z "$ac_err"; then |
---|
1905 | rm -rf conftest* |
---|
1906 | eval "ac_cv_header_$ac_safe=yes" |
---|
1907 | else |
---|
1908 | echo "$ac_err" >&5 |
---|
1909 | echo "configure: failed program was:" >&5 |
---|
1910 | cat conftest.$ac_ext >&5 |
---|
1911 | rm -rf conftest* |
---|
1912 | eval "ac_cv_header_$ac_safe=no" |
---|
1913 | fi |
---|
1914 | rm -f conftest* |
---|
1915 | fi |
---|
1916 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
---|
1917 | echo "$ac_t""yes" 1>&6 |
---|
1918 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
---|
1919 | cat >> confdefs.h <<EOF |
---|
1920 | #define $ac_tr_hdr 1 |
---|
1921 | EOF |
---|
1922 | |
---|
1923 | else |
---|
1924 | echo "$ac_t""no" 1>&6 |
---|
1925 | { echo "configure: error: Can not compile without limits.h unistd.h" 1>&2; exit 1; } |
---|
1926 | fi |
---|
1927 | done |
---|
1928 | |
---|
1929 | |
---|
1930 | for ac_hdr in malloc.h sys/file.h sys/ioctl.h sys/time.h sys/times.h sys/types.h sys/stat.h fcntl.h sys/param.h pwd.h asm/sigcontext.h pwd.h termcap.h termios.h term.h readline/readline.h |
---|
1931 | do |
---|
1932 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
---|
1933 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
---|
1934 | echo "configure:1935: checking for $ac_hdr" >&5 |
---|
1935 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
---|
1936 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1937 | else |
---|
1938 | cat > conftest.$ac_ext <<EOF |
---|
1939 | #line 1940 "configure" |
---|
1940 | #include "confdefs.h" |
---|
1941 | #include <$ac_hdr> |
---|
1942 | EOF |
---|
1943 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
---|
1944 | { (eval echo configure:1945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
---|
1945 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
---|
1946 | if test -z "$ac_err"; then |
---|
1947 | rm -rf conftest* |
---|
1948 | eval "ac_cv_header_$ac_safe=yes" |
---|
1949 | else |
---|
1950 | echo "$ac_err" >&5 |
---|
1951 | echo "configure: failed program was:" >&5 |
---|
1952 | cat conftest.$ac_ext >&5 |
---|
1953 | rm -rf conftest* |
---|
1954 | eval "ac_cv_header_$ac_safe=no" |
---|
1955 | fi |
---|
1956 | rm -f conftest* |
---|
1957 | fi |
---|
1958 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
---|
1959 | echo "$ac_t""yes" 1>&6 |
---|
1960 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
---|
1961 | cat >> confdefs.h <<EOF |
---|
1962 | #define $ac_tr_hdr 1 |
---|
1963 | EOF |
---|
1964 | |
---|
1965 | else |
---|
1966 | echo "$ac_t""no" 1>&6 |
---|
1967 | fi |
---|
1968 | done |
---|
1969 | |
---|
1970 | |
---|
1971 | # typedefs, structures |
---|
1972 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
---|
1973 | echo "configure:1974: checking for working const" >&5 |
---|
1974 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
---|
1975 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
1976 | else |
---|
1977 | cat > conftest.$ac_ext <<EOF |
---|
1978 | #line 1979 "configure" |
---|
1979 | #include "confdefs.h" |
---|
1980 | |
---|
1981 | int main() { |
---|
1982 | |
---|
1983 | /* Ultrix mips cc rejects this. */ |
---|
1984 | typedef int charset[2]; const charset x; |
---|
1985 | /* SunOS 4.1.1 cc rejects this. */ |
---|
1986 | char const *const *ccp; |
---|
1987 | char **p; |
---|
1988 | /* NEC SVR4.0.2 mips cc rejects this. */ |
---|
1989 | struct point {int x, y;}; |
---|
1990 | static struct point const zero = {0,0}; |
---|
1991 | /* AIX XL C 1.02.0.0 rejects this. |
---|
1992 | It does not let you subtract one const X* pointer from another in an arm |
---|
1993 | of an if-expression whose if-part is not a constant expression */ |
---|
1994 | const char *g = "string"; |
---|
1995 | ccp = &g + (g ? g-g : 0); |
---|
1996 | /* HPUX 7.0 cc rejects these. */ |
---|
1997 | ++ccp; |
---|
1998 | p = (char**) ccp; |
---|
1999 | ccp = (char const *const *) p; |
---|
2000 | { /* SCO 3.2v4 cc rejects this. */ |
---|
2001 | char *t; |
---|
2002 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
---|
2003 | |
---|
2004 | *t++ = 0; |
---|
2005 | } |
---|
2006 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
---|
2007 | int x[] = {25, 17}; |
---|
2008 | const int *foo = &x[0]; |
---|
2009 | ++foo; |
---|
2010 | } |
---|
2011 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
---|
2012 | typedef const int *iptr; |
---|
2013 | iptr p = 0; |
---|
2014 | ++p; |
---|
2015 | } |
---|
2016 | { /* AIX XL C 1.02.0.0 rejects this saying |
---|
2017 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
---|
2018 | struct s { int j; const int *ap[3]; }; |
---|
2019 | struct s *b; b->j = 5; |
---|
2020 | } |
---|
2021 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
---|
2022 | const int foo = 10; |
---|
2023 | } |
---|
2024 | |
---|
2025 | ; return 0; } |
---|
2026 | EOF |
---|
2027 | if { (eval echo configure:2028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
---|
2028 | rm -rf conftest* |
---|
2029 | ac_cv_c_const=yes |
---|
2030 | else |
---|
2031 | echo "configure: failed program was:" >&5 |
---|
2032 | cat conftest.$ac_ext >&5 |
---|
2033 | rm -rf conftest* |
---|
2034 | ac_cv_c_const=no |
---|
2035 | fi |
---|
2036 | rm -f conftest* |
---|
2037 | fi |
---|
2038 | |
---|
2039 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
---|
2040 | if test $ac_cv_c_const = no; then |
---|
2041 | cat >> confdefs.h <<\EOF |
---|
2042 | #define const |
---|
2043 | EOF |
---|
2044 | |
---|
2045 | fi |
---|
2046 | |
---|
2047 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
---|
2048 | echo "configure:2049: checking for inline" >&5 |
---|
2049 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
---|
2050 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2051 | else |
---|
2052 | ac_cv_c_inline=no |
---|
2053 | for ac_kw in inline __inline__ __inline; do |
---|
2054 | cat > conftest.$ac_ext <<EOF |
---|
2055 | #line 2056 "configure" |
---|
2056 | #include "confdefs.h" |
---|
2057 | |
---|
2058 | int main() { |
---|
2059 | } $ac_kw foo() { |
---|
2060 | ; return 0; } |
---|
2061 | EOF |
---|
2062 | if { (eval echo configure:2063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
---|
2063 | rm -rf conftest* |
---|
2064 | ac_cv_c_inline=$ac_kw; break |
---|
2065 | else |
---|
2066 | echo "configure: failed program was:" >&5 |
---|
2067 | cat conftest.$ac_ext >&5 |
---|
2068 | fi |
---|
2069 | rm -f conftest* |
---|
2070 | done |
---|
2071 | |
---|
2072 | fi |
---|
2073 | |
---|
2074 | echo "$ac_t""$ac_cv_c_inline" 1>&6 |
---|
2075 | case "$ac_cv_c_inline" in |
---|
2076 | inline | yes) ;; |
---|
2077 | no) cat >> confdefs.h <<\EOF |
---|
2078 | #define inline |
---|
2079 | EOF |
---|
2080 | ;; |
---|
2081 | *) cat >> confdefs.h <<EOF |
---|
2082 | #define inline $ac_cv_c_inline |
---|
2083 | EOF |
---|
2084 | ;; |
---|
2085 | esac |
---|
2086 | |
---|
2087 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
---|
2088 | echo "configure:2089: checking for size_t" >&5 |
---|
2089 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
---|
2090 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2091 | else |
---|
2092 | cat > conftest.$ac_ext <<EOF |
---|
2093 | #line 2094 "configure" |
---|
2094 | #include "confdefs.h" |
---|
2095 | #include <sys/types.h> |
---|
2096 | #if STDC_HEADERS |
---|
2097 | #include <stdlib.h> |
---|
2098 | #include <stddef.h> |
---|
2099 | #endif |
---|
2100 | EOF |
---|
2101 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
---|
2102 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
---|
2103 | rm -rf conftest* |
---|
2104 | ac_cv_type_size_t=yes |
---|
2105 | else |
---|
2106 | rm -rf conftest* |
---|
2107 | ac_cv_type_size_t=no |
---|
2108 | fi |
---|
2109 | rm -f conftest* |
---|
2110 | |
---|
2111 | fi |
---|
2112 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
---|
2113 | if test $ac_cv_type_size_t = no; then |
---|
2114 | cat >> confdefs.h <<\EOF |
---|
2115 | #define size_t unsigned |
---|
2116 | EOF |
---|
2117 | |
---|
2118 | fi |
---|
2119 | |
---|
2120 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
---|
2121 | echo "configure:2122: checking whether time.h and sys/time.h may both be included" >&5 |
---|
2122 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
---|
2123 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2124 | else |
---|
2125 | cat > conftest.$ac_ext <<EOF |
---|
2126 | #line 2127 "configure" |
---|
2127 | #include "confdefs.h" |
---|
2128 | #include <sys/types.h> |
---|
2129 | #include <sys/time.h> |
---|
2130 | #include <time.h> |
---|
2131 | int main() { |
---|
2132 | struct tm *tp; |
---|
2133 | ; return 0; } |
---|
2134 | EOF |
---|
2135 | if { (eval echo configure:2136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
---|
2136 | rm -rf conftest* |
---|
2137 | ac_cv_header_time=yes |
---|
2138 | else |
---|
2139 | echo "configure: failed program was:" >&5 |
---|
2140 | cat conftest.$ac_ext >&5 |
---|
2141 | rm -rf conftest* |
---|
2142 | ac_cv_header_time=no |
---|
2143 | fi |
---|
2144 | rm -f conftest* |
---|
2145 | fi |
---|
2146 | |
---|
2147 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
---|
2148 | if test $ac_cv_header_time = yes; then |
---|
2149 | cat >> confdefs.h <<\EOF |
---|
2150 | #define TIME_WITH_SYS_TIME 1 |
---|
2151 | EOF |
---|
2152 | |
---|
2153 | fi |
---|
2154 | |
---|
2155 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
---|
2156 | echo "configure:2157: checking whether struct tm is in sys/time.h or time.h" >&5 |
---|
2157 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
---|
2158 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2159 | else |
---|
2160 | cat > conftest.$ac_ext <<EOF |
---|
2161 | #line 2162 "configure" |
---|
2162 | #include "confdefs.h" |
---|
2163 | #include <sys/types.h> |
---|
2164 | #include <time.h> |
---|
2165 | int main() { |
---|
2166 | struct tm *tp; tp->tm_sec; |
---|
2167 | ; return 0; } |
---|
2168 | EOF |
---|
2169 | if { (eval echo configure:2170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
---|
2170 | rm -rf conftest* |
---|
2171 | ac_cv_struct_tm=time.h |
---|
2172 | else |
---|
2173 | echo "configure: failed program was:" >&5 |
---|
2174 | cat conftest.$ac_ext >&5 |
---|
2175 | rm -rf conftest* |
---|
2176 | ac_cv_struct_tm=sys/time.h |
---|
2177 | fi |
---|
2178 | rm -f conftest* |
---|
2179 | fi |
---|
2180 | |
---|
2181 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
---|
2182 | if test $ac_cv_struct_tm = sys/time.h; then |
---|
2183 | cat >> confdefs.h <<\EOF |
---|
2184 | #define TM_IN_SYS_TIME 1 |
---|
2185 | EOF |
---|
2186 | |
---|
2187 | fi |
---|
2188 | |
---|
2189 | |
---|
2190 | # library functions. |
---|
2191 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
---|
2192 | # for constant arguments. Useless! |
---|
2193 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
---|
2194 | echo "configure:2195: checking for working alloca.h" >&5 |
---|
2195 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
---|
2196 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2197 | else |
---|
2198 | cat > conftest.$ac_ext <<EOF |
---|
2199 | #line 2200 "configure" |
---|
2200 | #include "confdefs.h" |
---|
2201 | #include <alloca.h> |
---|
2202 | int main() { |
---|
2203 | char *p = alloca(2 * sizeof(int)); |
---|
2204 | ; return 0; } |
---|
2205 | EOF |
---|
2206 | if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
2207 | rm -rf conftest* |
---|
2208 | ac_cv_header_alloca_h=yes |
---|
2209 | else |
---|
2210 | echo "configure: failed program was:" >&5 |
---|
2211 | cat conftest.$ac_ext >&5 |
---|
2212 | rm -rf conftest* |
---|
2213 | ac_cv_header_alloca_h=no |
---|
2214 | fi |
---|
2215 | rm -f conftest* |
---|
2216 | fi |
---|
2217 | |
---|
2218 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 |
---|
2219 | if test $ac_cv_header_alloca_h = yes; then |
---|
2220 | cat >> confdefs.h <<\EOF |
---|
2221 | #define HAVE_ALLOCA_H 1 |
---|
2222 | EOF |
---|
2223 | |
---|
2224 | fi |
---|
2225 | |
---|
2226 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
---|
2227 | echo "configure:2228: checking for alloca" >&5 |
---|
2228 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
---|
2229 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2230 | else |
---|
2231 | cat > conftest.$ac_ext <<EOF |
---|
2232 | #line 2233 "configure" |
---|
2233 | #include "confdefs.h" |
---|
2234 | |
---|
2235 | #ifdef __GNUC__ |
---|
2236 | # define alloca __builtin_alloca |
---|
2237 | #else |
---|
2238 | # ifdef _MSC_VER |
---|
2239 | # include <malloc.h> |
---|
2240 | # define alloca _alloca |
---|
2241 | # else |
---|
2242 | # if HAVE_ALLOCA_H |
---|
2243 | # include <alloca.h> |
---|
2244 | # else |
---|
2245 | # ifdef _AIX |
---|
2246 | #pragma alloca |
---|
2247 | # else |
---|
2248 | # ifndef alloca /* predefined by HP cc +Olibcalls */ |
---|
2249 | char *alloca (); |
---|
2250 | # endif |
---|
2251 | # endif |
---|
2252 | # endif |
---|
2253 | # endif |
---|
2254 | #endif |
---|
2255 | |
---|
2256 | int main() { |
---|
2257 | char *p = (char *) alloca(1); |
---|
2258 | ; return 0; } |
---|
2259 | EOF |
---|
2260 | if { (eval echo configure:2261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
2261 | rm -rf conftest* |
---|
2262 | ac_cv_func_alloca_works=yes |
---|
2263 | else |
---|
2264 | echo "configure: failed program was:" >&5 |
---|
2265 | cat conftest.$ac_ext >&5 |
---|
2266 | rm -rf conftest* |
---|
2267 | ac_cv_func_alloca_works=no |
---|
2268 | fi |
---|
2269 | rm -f conftest* |
---|
2270 | fi |
---|
2271 | |
---|
2272 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
---|
2273 | if test $ac_cv_func_alloca_works = yes; then |
---|
2274 | cat >> confdefs.h <<\EOF |
---|
2275 | #define HAVE_ALLOCA 1 |
---|
2276 | EOF |
---|
2277 | |
---|
2278 | fi |
---|
2279 | |
---|
2280 | if test $ac_cv_func_alloca_works = no; then |
---|
2281 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions |
---|
2282 | # that cause trouble. Some versions do not even contain alloca or |
---|
2283 | # contain a buggy version. If you still want to use their alloca, |
---|
2284 | # use ar to extract alloca.o from them instead of compiling alloca.c. |
---|
2285 | ALLOCA=alloca.${ac_objext} |
---|
2286 | cat >> confdefs.h <<\EOF |
---|
2287 | #define C_ALLOCA 1 |
---|
2288 | EOF |
---|
2289 | |
---|
2290 | |
---|
2291 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
---|
2292 | echo "configure:2293: checking whether alloca needs Cray hooks" >&5 |
---|
2293 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
---|
2294 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2295 | else |
---|
2296 | cat > conftest.$ac_ext <<EOF |
---|
2297 | #line 2298 "configure" |
---|
2298 | #include "confdefs.h" |
---|
2299 | #if defined(CRAY) && ! defined(CRAY2) |
---|
2300 | webecray |
---|
2301 | #else |
---|
2302 | wenotbecray |
---|
2303 | #endif |
---|
2304 | |
---|
2305 | EOF |
---|
2306 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
---|
2307 | egrep "webecray" >/dev/null 2>&1; then |
---|
2308 | rm -rf conftest* |
---|
2309 | ac_cv_os_cray=yes |
---|
2310 | else |
---|
2311 | rm -rf conftest* |
---|
2312 | ac_cv_os_cray=no |
---|
2313 | fi |
---|
2314 | rm -f conftest* |
---|
2315 | |
---|
2316 | fi |
---|
2317 | |
---|
2318 | echo "$ac_t""$ac_cv_os_cray" 1>&6 |
---|
2319 | if test $ac_cv_os_cray = yes; then |
---|
2320 | for ac_func in _getb67 GETB67 getb67; do |
---|
2321 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
---|
2322 | echo "configure:2323: checking for $ac_func" >&5 |
---|
2323 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
---|
2324 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2325 | else |
---|
2326 | cat > conftest.$ac_ext <<EOF |
---|
2327 | #line 2328 "configure" |
---|
2328 | #include "confdefs.h" |
---|
2329 | /* System header to define __stub macros and hopefully few prototypes, |
---|
2330 | which can conflict with char $ac_func(); below. */ |
---|
2331 | #include <assert.h> |
---|
2332 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
2333 | /* We use char because int might match the return type of a gcc2 |
---|
2334 | builtin and then its argument prototype would still apply. */ |
---|
2335 | char $ac_func(); |
---|
2336 | |
---|
2337 | int main() { |
---|
2338 | |
---|
2339 | /* The GNU C library defines this for functions which it implements |
---|
2340 | to always fail with ENOSYS. Some functions are actually named |
---|
2341 | something starting with __ and the normal name is an alias. */ |
---|
2342 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
---|
2343 | choke me |
---|
2344 | #else |
---|
2345 | $ac_func(); |
---|
2346 | #endif |
---|
2347 | |
---|
2348 | ; return 0; } |
---|
2349 | EOF |
---|
2350 | if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
2351 | rm -rf conftest* |
---|
2352 | eval "ac_cv_func_$ac_func=yes" |
---|
2353 | else |
---|
2354 | echo "configure: failed program was:" >&5 |
---|
2355 | cat conftest.$ac_ext >&5 |
---|
2356 | rm -rf conftest* |
---|
2357 | eval "ac_cv_func_$ac_func=no" |
---|
2358 | fi |
---|
2359 | rm -f conftest* |
---|
2360 | fi |
---|
2361 | |
---|
2362 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
---|
2363 | echo "$ac_t""yes" 1>&6 |
---|
2364 | cat >> confdefs.h <<EOF |
---|
2365 | #define CRAY_STACKSEG_END $ac_func |
---|
2366 | EOF |
---|
2367 | |
---|
2368 | break |
---|
2369 | else |
---|
2370 | echo "$ac_t""no" 1>&6 |
---|
2371 | fi |
---|
2372 | |
---|
2373 | done |
---|
2374 | fi |
---|
2375 | |
---|
2376 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
---|
2377 | echo "configure:2378: checking stack direction for C alloca" >&5 |
---|
2378 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
---|
2379 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2380 | else |
---|
2381 | if test "$cross_compiling" = yes; then |
---|
2382 | ac_cv_c_stack_direction=0 |
---|
2383 | else |
---|
2384 | cat > conftest.$ac_ext <<EOF |
---|
2385 | #line 2386 "configure" |
---|
2386 | #include "confdefs.h" |
---|
2387 | find_stack_direction () |
---|
2388 | { |
---|
2389 | static char *addr = 0; |
---|
2390 | auto char dummy; |
---|
2391 | if (addr == 0) |
---|
2392 | { |
---|
2393 | addr = &dummy; |
---|
2394 | return find_stack_direction (); |
---|
2395 | } |
---|
2396 | else |
---|
2397 | return (&dummy > addr) ? 1 : -1; |
---|
2398 | } |
---|
2399 | main () |
---|
2400 | { |
---|
2401 | exit (find_stack_direction() < 0); |
---|
2402 | } |
---|
2403 | EOF |
---|
2404 | if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
2405 | then |
---|
2406 | ac_cv_c_stack_direction=1 |
---|
2407 | else |
---|
2408 | echo "configure: failed program was:" >&5 |
---|
2409 | cat conftest.$ac_ext >&5 |
---|
2410 | rm -fr conftest* |
---|
2411 | ac_cv_c_stack_direction=-1 |
---|
2412 | fi |
---|
2413 | rm -fr conftest* |
---|
2414 | fi |
---|
2415 | |
---|
2416 | fi |
---|
2417 | |
---|
2418 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 |
---|
2419 | cat >> confdefs.h <<EOF |
---|
2420 | #define STACK_DIRECTION $ac_cv_c_stack_direction |
---|
2421 | EOF |
---|
2422 | |
---|
2423 | fi |
---|
2424 | |
---|
2425 | if test $ac_cv_prog_gcc = yes; then |
---|
2426 | echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 |
---|
2427 | echo "configure:2428: checking whether ${CC-cc} needs -traditional" >&5 |
---|
2428 | if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then |
---|
2429 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2430 | else |
---|
2431 | ac_pattern="Autoconf.*'x'" |
---|
2432 | cat > conftest.$ac_ext <<EOF |
---|
2433 | #line 2434 "configure" |
---|
2434 | #include "confdefs.h" |
---|
2435 | #include <sgtty.h> |
---|
2436 | Autoconf TIOCGETP |
---|
2437 | EOF |
---|
2438 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
---|
2439 | egrep "$ac_pattern" >/dev/null 2>&1; then |
---|
2440 | rm -rf conftest* |
---|
2441 | ac_cv_prog_gcc_traditional=yes |
---|
2442 | else |
---|
2443 | rm -rf conftest* |
---|
2444 | ac_cv_prog_gcc_traditional=no |
---|
2445 | fi |
---|
2446 | rm -f conftest* |
---|
2447 | |
---|
2448 | |
---|
2449 | if test $ac_cv_prog_gcc_traditional = no; then |
---|
2450 | cat > conftest.$ac_ext <<EOF |
---|
2451 | #line 2452 "configure" |
---|
2452 | #include "confdefs.h" |
---|
2453 | #include <termio.h> |
---|
2454 | Autoconf TCGETA |
---|
2455 | EOF |
---|
2456 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
---|
2457 | egrep "$ac_pattern" >/dev/null 2>&1; then |
---|
2458 | rm -rf conftest* |
---|
2459 | ac_cv_prog_gcc_traditional=yes |
---|
2460 | fi |
---|
2461 | rm -f conftest* |
---|
2462 | |
---|
2463 | fi |
---|
2464 | fi |
---|
2465 | |
---|
2466 | echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 |
---|
2467 | if test $ac_cv_prog_gcc_traditional = yes; then |
---|
2468 | CC="$CC -traditional" |
---|
2469 | fi |
---|
2470 | fi |
---|
2471 | |
---|
2472 | for ac_hdr in unistd.h |
---|
2473 | do |
---|
2474 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
---|
2475 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
---|
2476 | echo "configure:2477: checking for $ac_hdr" >&5 |
---|
2477 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
---|
2478 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2479 | else |
---|
2480 | cat > conftest.$ac_ext <<EOF |
---|
2481 | #line 2482 "configure" |
---|
2482 | #include "confdefs.h" |
---|
2483 | #include <$ac_hdr> |
---|
2484 | EOF |
---|
2485 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
---|
2486 | { (eval echo configure:2487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
---|
2487 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
---|
2488 | if test -z "$ac_err"; then |
---|
2489 | rm -rf conftest* |
---|
2490 | eval "ac_cv_header_$ac_safe=yes" |
---|
2491 | else |
---|
2492 | echo "$ac_err" >&5 |
---|
2493 | echo "configure: failed program was:" >&5 |
---|
2494 | cat conftest.$ac_ext >&5 |
---|
2495 | rm -rf conftest* |
---|
2496 | eval "ac_cv_header_$ac_safe=no" |
---|
2497 | fi |
---|
2498 | rm -f conftest* |
---|
2499 | fi |
---|
2500 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
---|
2501 | echo "$ac_t""yes" 1>&6 |
---|
2502 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
---|
2503 | cat >> confdefs.h <<EOF |
---|
2504 | #define $ac_tr_hdr 1 |
---|
2505 | EOF |
---|
2506 | |
---|
2507 | else |
---|
2508 | echo "$ac_t""no" 1>&6 |
---|
2509 | fi |
---|
2510 | done |
---|
2511 | |
---|
2512 | for ac_func in getpagesize |
---|
2513 | do |
---|
2514 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
---|
2515 | echo "configure:2516: checking for $ac_func" >&5 |
---|
2516 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
---|
2517 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2518 | else |
---|
2519 | cat > conftest.$ac_ext <<EOF |
---|
2520 | #line 2521 "configure" |
---|
2521 | #include "confdefs.h" |
---|
2522 | /* System header to define __stub macros and hopefully few prototypes, |
---|
2523 | which can conflict with char $ac_func(); below. */ |
---|
2524 | #include <assert.h> |
---|
2525 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
2526 | /* We use char because int might match the return type of a gcc2 |
---|
2527 | builtin and then its argument prototype would still apply. */ |
---|
2528 | char $ac_func(); |
---|
2529 | |
---|
2530 | int main() { |
---|
2531 | |
---|
2532 | /* The GNU C library defines this for functions which it implements |
---|
2533 | to always fail with ENOSYS. Some functions are actually named |
---|
2534 | something starting with __ and the normal name is an alias. */ |
---|
2535 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
---|
2536 | choke me |
---|
2537 | #else |
---|
2538 | $ac_func(); |
---|
2539 | #endif |
---|
2540 | |
---|
2541 | ; return 0; } |
---|
2542 | EOF |
---|
2543 | if { (eval echo configure:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
2544 | rm -rf conftest* |
---|
2545 | eval "ac_cv_func_$ac_func=yes" |
---|
2546 | else |
---|
2547 | echo "configure: failed program was:" >&5 |
---|
2548 | cat conftest.$ac_ext >&5 |
---|
2549 | rm -rf conftest* |
---|
2550 | eval "ac_cv_func_$ac_func=no" |
---|
2551 | fi |
---|
2552 | rm -f conftest* |
---|
2553 | fi |
---|
2554 | |
---|
2555 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
---|
2556 | echo "$ac_t""yes" 1>&6 |
---|
2557 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
---|
2558 | cat >> confdefs.h <<EOF |
---|
2559 | #define $ac_tr_func 1 |
---|
2560 | EOF |
---|
2561 | |
---|
2562 | else |
---|
2563 | echo "$ac_t""no" 1>&6 |
---|
2564 | fi |
---|
2565 | done |
---|
2566 | |
---|
2567 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
---|
2568 | echo "configure:2569: checking for working mmap" >&5 |
---|
2569 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
---|
2570 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2571 | else |
---|
2572 | if test "$cross_compiling" = yes; then |
---|
2573 | ac_cv_func_mmap_fixed_mapped=no |
---|
2574 | else |
---|
2575 | cat > conftest.$ac_ext <<EOF |
---|
2576 | #line 2577 "configure" |
---|
2577 | #include "confdefs.h" |
---|
2578 | |
---|
2579 | /* Thanks to Mike Haertel and Jim Avera for this test. |
---|
2580 | Here is a matrix of mmap possibilities: |
---|
2581 | mmap private not fixed |
---|
2582 | mmap private fixed at somewhere currently unmapped |
---|
2583 | mmap private fixed at somewhere already mapped |
---|
2584 | mmap shared not fixed |
---|
2585 | mmap shared fixed at somewhere currently unmapped |
---|
2586 | mmap shared fixed at somewhere already mapped |
---|
2587 | For private mappings, we should verify that changes cannot be read() |
---|
2588 | back from the file, nor mmap's back from the file at a different |
---|
2589 | address. (There have been systems where private was not correctly |
---|
2590 | implemented like the infamous i386 svr4.0, and systems where the |
---|
2591 | VM page cache was not coherent with the filesystem buffer cache |
---|
2592 | like early versions of FreeBSD and possibly contemporary NetBSD.) |
---|
2593 | For shared mappings, we should conversely verify that changes get |
---|
2594 | propogated back to all the places they're supposed to be. |
---|
2595 | |
---|
2596 | Grep wants private fixed already mapped. |
---|
2597 | The main things grep needs to know about mmap are: |
---|
2598 | * does it exist and is it safe to write into the mmap'd area |
---|
2599 | * how to use it (BSD variants) */ |
---|
2600 | #include <sys/types.h> |
---|
2601 | #include <fcntl.h> |
---|
2602 | #include <sys/mman.h> |
---|
2603 | |
---|
2604 | /* This mess was copied from the GNU getpagesize.h. */ |
---|
2605 | #ifndef HAVE_GETPAGESIZE |
---|
2606 | # ifdef HAVE_UNISTD_H |
---|
2607 | # include <unistd.h> |
---|
2608 | # endif |
---|
2609 | |
---|
2610 | /* Assume that all systems that can run configure have sys/param.h. */ |
---|
2611 | # ifndef HAVE_SYS_PARAM_H |
---|
2612 | # define HAVE_SYS_PARAM_H 1 |
---|
2613 | # endif |
---|
2614 | |
---|
2615 | # ifdef _SC_PAGESIZE |
---|
2616 | # define getpagesize() sysconf(_SC_PAGESIZE) |
---|
2617 | # else /* no _SC_PAGESIZE */ |
---|
2618 | # ifdef HAVE_SYS_PARAM_H |
---|
2619 | # include <sys/param.h> |
---|
2620 | # ifdef EXEC_PAGESIZE |
---|
2621 | # define getpagesize() EXEC_PAGESIZE |
---|
2622 | # else /* no EXEC_PAGESIZE */ |
---|
2623 | # ifdef NBPG |
---|
2624 | # define getpagesize() NBPG * CLSIZE |
---|
2625 | # ifndef CLSIZE |
---|
2626 | # define CLSIZE 1 |
---|
2627 | # endif /* no CLSIZE */ |
---|
2628 | # else /* no NBPG */ |
---|
2629 | # ifdef NBPC |
---|
2630 | # define getpagesize() NBPC |
---|
2631 | # else /* no NBPC */ |
---|
2632 | # ifdef PAGESIZE |
---|
2633 | # define getpagesize() PAGESIZE |
---|
2634 | # endif /* PAGESIZE */ |
---|
2635 | # endif /* no NBPC */ |
---|
2636 | # endif /* no NBPG */ |
---|
2637 | # endif /* no EXEC_PAGESIZE */ |
---|
2638 | # else /* no HAVE_SYS_PARAM_H */ |
---|
2639 | # define getpagesize() 8192 /* punt totally */ |
---|
2640 | # endif /* no HAVE_SYS_PARAM_H */ |
---|
2641 | # endif /* no _SC_PAGESIZE */ |
---|
2642 | |
---|
2643 | #endif /* no HAVE_GETPAGESIZE */ |
---|
2644 | |
---|
2645 | #ifdef __cplusplus |
---|
2646 | extern "C" { void *malloc(unsigned); } |
---|
2647 | #else |
---|
2648 | char *malloc(); |
---|
2649 | #endif |
---|
2650 | |
---|
2651 | int |
---|
2652 | main() |
---|
2653 | { |
---|
2654 | char *data, *data2, *data3; |
---|
2655 | int i, pagesize; |
---|
2656 | int fd; |
---|
2657 | |
---|
2658 | pagesize = getpagesize(); |
---|
2659 | |
---|
2660 | /* |
---|
2661 | * First, make a file with some known garbage in it. |
---|
2662 | */ |
---|
2663 | data = malloc(pagesize); |
---|
2664 | if (!data) |
---|
2665 | exit(1); |
---|
2666 | for (i = 0; i < pagesize; ++i) |
---|
2667 | *(data + i) = rand(); |
---|
2668 | umask(0); |
---|
2669 | fd = creat("conftestmmap", 0600); |
---|
2670 | if (fd < 0) |
---|
2671 | exit(1); |
---|
2672 | if (write(fd, data, pagesize) != pagesize) |
---|
2673 | exit(1); |
---|
2674 | close(fd); |
---|
2675 | |
---|
2676 | /* |
---|
2677 | * Next, try to mmap the file at a fixed address which |
---|
2678 | * already has something else allocated at it. If we can, |
---|
2679 | * also make sure that we see the same garbage. |
---|
2680 | */ |
---|
2681 | fd = open("conftestmmap", O_RDWR); |
---|
2682 | if (fd < 0) |
---|
2683 | exit(1); |
---|
2684 | data2 = malloc(2 * pagesize); |
---|
2685 | if (!data2) |
---|
2686 | exit(1); |
---|
2687 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); |
---|
2688 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, |
---|
2689 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) |
---|
2690 | exit(1); |
---|
2691 | for (i = 0; i < pagesize; ++i) |
---|
2692 | if (*(data + i) != *(data2 + i)) |
---|
2693 | exit(1); |
---|
2694 | |
---|
2695 | /* |
---|
2696 | * Finally, make sure that changes to the mapped area |
---|
2697 | * do not percolate back to the file as seen by read(). |
---|
2698 | * (This is a bug on some variants of i386 svr4.0.) |
---|
2699 | */ |
---|
2700 | for (i = 0; i < pagesize; ++i) |
---|
2701 | *(data2 + i) = *(data2 + i) + 1; |
---|
2702 | data3 = malloc(pagesize); |
---|
2703 | if (!data3) |
---|
2704 | exit(1); |
---|
2705 | if (read(fd, data3, pagesize) != pagesize) |
---|
2706 | exit(1); |
---|
2707 | for (i = 0; i < pagesize; ++i) |
---|
2708 | if (*(data + i) != *(data3 + i)) |
---|
2709 | exit(1); |
---|
2710 | close(fd); |
---|
2711 | unlink("conftestmmap"); |
---|
2712 | exit(0); |
---|
2713 | } |
---|
2714 | |
---|
2715 | EOF |
---|
2716 | if { (eval echo configure:2717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
2717 | then |
---|
2718 | ac_cv_func_mmap_fixed_mapped=yes |
---|
2719 | else |
---|
2720 | echo "configure: failed program was:" >&5 |
---|
2721 | cat conftest.$ac_ext >&5 |
---|
2722 | rm -fr conftest* |
---|
2723 | ac_cv_func_mmap_fixed_mapped=no |
---|
2724 | fi |
---|
2725 | rm -fr conftest* |
---|
2726 | fi |
---|
2727 | |
---|
2728 | fi |
---|
2729 | |
---|
2730 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
---|
2731 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
---|
2732 | cat >> confdefs.h <<\EOF |
---|
2733 | #define HAVE_MMAP 1 |
---|
2734 | EOF |
---|
2735 | |
---|
2736 | fi |
---|
2737 | |
---|
2738 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
---|
2739 | echo "configure:2740: checking return type of signal handlers" >&5 |
---|
2740 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
---|
2741 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2742 | else |
---|
2743 | cat > conftest.$ac_ext <<EOF |
---|
2744 | #line 2745 "configure" |
---|
2745 | #include "confdefs.h" |
---|
2746 | #include <sys/types.h> |
---|
2747 | #include <signal.h> |
---|
2748 | #ifdef signal |
---|
2749 | #undef signal |
---|
2750 | #endif |
---|
2751 | #ifdef __cplusplus |
---|
2752 | extern "C" void (*signal (int, void (*)(int)))(int); |
---|
2753 | #else |
---|
2754 | void (*signal ()) (); |
---|
2755 | #endif |
---|
2756 | |
---|
2757 | int main() { |
---|
2758 | int i; |
---|
2759 | ; return 0; } |
---|
2760 | EOF |
---|
2761 | if { (eval echo configure:2762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
---|
2762 | rm -rf conftest* |
---|
2763 | ac_cv_type_signal=void |
---|
2764 | else |
---|
2765 | echo "configure: failed program was:" >&5 |
---|
2766 | cat conftest.$ac_ext >&5 |
---|
2767 | rm -rf conftest* |
---|
2768 | ac_cv_type_signal=int |
---|
2769 | fi |
---|
2770 | rm -f conftest* |
---|
2771 | fi |
---|
2772 | |
---|
2773 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
---|
2774 | cat >> confdefs.h <<EOF |
---|
2775 | #define RETSIGTYPE $ac_cv_type_signal |
---|
2776 | EOF |
---|
2777 | |
---|
2778 | |
---|
2779 | echo $ac_n "checking for vprintf""... $ac_c" 1>&6 |
---|
2780 | echo "configure:2781: checking for vprintf" >&5 |
---|
2781 | if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then |
---|
2782 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2783 | else |
---|
2784 | cat > conftest.$ac_ext <<EOF |
---|
2785 | #line 2786 "configure" |
---|
2786 | #include "confdefs.h" |
---|
2787 | /* System header to define __stub macros and hopefully few prototypes, |
---|
2788 | which can conflict with char vprintf(); below. */ |
---|
2789 | #include <assert.h> |
---|
2790 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
2791 | /* We use char because int might match the return type of a gcc2 |
---|
2792 | builtin and then its argument prototype would still apply. */ |
---|
2793 | char vprintf(); |
---|
2794 | |
---|
2795 | int main() { |
---|
2796 | |
---|
2797 | /* The GNU C library defines this for functions which it implements |
---|
2798 | to always fail with ENOSYS. Some functions are actually named |
---|
2799 | something starting with __ and the normal name is an alias. */ |
---|
2800 | #if defined (__stub_vprintf) || defined (__stub___vprintf) |
---|
2801 | choke me |
---|
2802 | #else |
---|
2803 | vprintf(); |
---|
2804 | #endif |
---|
2805 | |
---|
2806 | ; return 0; } |
---|
2807 | EOF |
---|
2808 | if { (eval echo configure:2809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
2809 | rm -rf conftest* |
---|
2810 | eval "ac_cv_func_vprintf=yes" |
---|
2811 | else |
---|
2812 | echo "configure: failed program was:" >&5 |
---|
2813 | cat conftest.$ac_ext >&5 |
---|
2814 | rm -rf conftest* |
---|
2815 | eval "ac_cv_func_vprintf=no" |
---|
2816 | fi |
---|
2817 | rm -f conftest* |
---|
2818 | fi |
---|
2819 | |
---|
2820 | if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then |
---|
2821 | echo "$ac_t""yes" 1>&6 |
---|
2822 | cat >> confdefs.h <<\EOF |
---|
2823 | #define HAVE_VPRINTF 1 |
---|
2824 | EOF |
---|
2825 | |
---|
2826 | else |
---|
2827 | echo "$ac_t""no" 1>&6 |
---|
2828 | fi |
---|
2829 | |
---|
2830 | if test "$ac_cv_func_vprintf" != yes; then |
---|
2831 | echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 |
---|
2832 | echo "configure:2833: checking for _doprnt" >&5 |
---|
2833 | if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then |
---|
2834 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2835 | else |
---|
2836 | cat > conftest.$ac_ext <<EOF |
---|
2837 | #line 2838 "configure" |
---|
2838 | #include "confdefs.h" |
---|
2839 | /* System header to define __stub macros and hopefully few prototypes, |
---|
2840 | which can conflict with char _doprnt(); below. */ |
---|
2841 | #include <assert.h> |
---|
2842 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
2843 | /* We use char because int might match the return type of a gcc2 |
---|
2844 | builtin and then its argument prototype would still apply. */ |
---|
2845 | char _doprnt(); |
---|
2846 | |
---|
2847 | int main() { |
---|
2848 | |
---|
2849 | /* The GNU C library defines this for functions which it implements |
---|
2850 | to always fail with ENOSYS. Some functions are actually named |
---|
2851 | something starting with __ and the normal name is an alias. */ |
---|
2852 | #if defined (__stub__doprnt) || defined (__stub____doprnt) |
---|
2853 | choke me |
---|
2854 | #else |
---|
2855 | _doprnt(); |
---|
2856 | #endif |
---|
2857 | |
---|
2858 | ; return 0; } |
---|
2859 | EOF |
---|
2860 | if { (eval echo configure:2861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
2861 | rm -rf conftest* |
---|
2862 | eval "ac_cv_func__doprnt=yes" |
---|
2863 | else |
---|
2864 | echo "configure: failed program was:" >&5 |
---|
2865 | cat conftest.$ac_ext >&5 |
---|
2866 | rm -rf conftest* |
---|
2867 | eval "ac_cv_func__doprnt=no" |
---|
2868 | fi |
---|
2869 | rm -f conftest* |
---|
2870 | fi |
---|
2871 | |
---|
2872 | if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then |
---|
2873 | echo "$ac_t""yes" 1>&6 |
---|
2874 | cat >> confdefs.h <<\EOF |
---|
2875 | #define HAVE_DOPRNT 1 |
---|
2876 | EOF |
---|
2877 | |
---|
2878 | else |
---|
2879 | echo "$ac_t""no" 1>&6 |
---|
2880 | fi |
---|
2881 | |
---|
2882 | fi |
---|
2883 | |
---|
2884 | for ac_func in gettimeofday atexit bcopy getcwd getwd vsnprintf readlink sleep usleep valloc getpagesize setenv getpwnam |
---|
2885 | do |
---|
2886 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
---|
2887 | echo "configure:2888: checking for $ac_func" >&5 |
---|
2888 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
---|
2889 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2890 | else |
---|
2891 | cat > conftest.$ac_ext <<EOF |
---|
2892 | #line 2893 "configure" |
---|
2893 | #include "confdefs.h" |
---|
2894 | /* System header to define __stub macros and hopefully few prototypes, |
---|
2895 | which can conflict with char $ac_func(); below. */ |
---|
2896 | #include <assert.h> |
---|
2897 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
2898 | /* We use char because int might match the return type of a gcc2 |
---|
2899 | builtin and then its argument prototype would still apply. */ |
---|
2900 | char $ac_func(); |
---|
2901 | |
---|
2902 | int main() { |
---|
2903 | |
---|
2904 | /* The GNU C library defines this for functions which it implements |
---|
2905 | to always fail with ENOSYS. Some functions are actually named |
---|
2906 | something starting with __ and the normal name is an alias. */ |
---|
2907 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
---|
2908 | choke me |
---|
2909 | #else |
---|
2910 | $ac_func(); |
---|
2911 | #endif |
---|
2912 | |
---|
2913 | ; return 0; } |
---|
2914 | EOF |
---|
2915 | if { (eval echo configure:2916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
2916 | rm -rf conftest* |
---|
2917 | eval "ac_cv_func_$ac_func=yes" |
---|
2918 | else |
---|
2919 | echo "configure: failed program was:" >&5 |
---|
2920 | cat conftest.$ac_ext >&5 |
---|
2921 | rm -rf conftest* |
---|
2922 | eval "ac_cv_func_$ac_func=no" |
---|
2923 | fi |
---|
2924 | rm -f conftest* |
---|
2925 | fi |
---|
2926 | |
---|
2927 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
---|
2928 | echo "$ac_t""yes" 1>&6 |
---|
2929 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
---|
2930 | cat >> confdefs.h <<EOF |
---|
2931 | #define $ac_tr_func 1 |
---|
2932 | EOF |
---|
2933 | |
---|
2934 | else |
---|
2935 | echo "$ac_t""no" 1>&6 |
---|
2936 | fi |
---|
2937 | done |
---|
2938 | |
---|
2939 | |
---|
2940 | |
---|
2941 | # arithmetic shifts |
---|
2942 | echo $ac_n "checking whether your machine has correct arithmetic shifts""... $ac_c" 1>&6 |
---|
2943 | echo "configure:2944: checking whether your machine has correct arithmetic shifts" >&5 |
---|
2944 | if eval "test \"`echo '$''{'ac_cv_shift'+set}'`\" = set"; then |
---|
2945 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2946 | else |
---|
2947 | if test "$cross_compiling" = yes; then |
---|
2948 | if test "$ac_c_cross_dos" = yes; then |
---|
2949 | ac_cv_shift=yes; |
---|
2950 | else |
---|
2951 | echo "$ac_t""no" 1>&6 |
---|
2952 | { echo "configure: error: cross compilation without default value" 1>&2; exit 1; } |
---|
2953 | fi |
---|
2954 | else |
---|
2955 | cat > conftest.$ac_ext <<EOF |
---|
2956 | #line 2957 "configure" |
---|
2957 | #include "confdefs.h" |
---|
2958 | int main() { if (-2 >> 1 == -1) exit(0); else exit(1); } |
---|
2959 | EOF |
---|
2960 | if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
2961 | then |
---|
2962 | ac_cv_shift=yes |
---|
2963 | else |
---|
2964 | echo "configure: failed program was:" >&5 |
---|
2965 | cat conftest.$ac_ext >&5 |
---|
2966 | rm -fr conftest* |
---|
2967 | ac_cv_shift=no |
---|
2968 | fi |
---|
2969 | rm -fr conftest* |
---|
2970 | fi |
---|
2971 | |
---|
2972 | fi |
---|
2973 | |
---|
2974 | |
---|
2975 | if test "$ac_cv_shift" = yes; then |
---|
2976 | echo "$ac_t""yes" 1>&6 |
---|
2977 | else |
---|
2978 | echo "$ac_t""no" 1>&6 |
---|
2979 | { echo "configure: error: need -2 >> 1 == -1" 1>&2; exit 1; } |
---|
2980 | fi |
---|
2981 | |
---|
2982 | |
---|
2983 | # check for a peculiar constructor initialization |
---|
2984 | echo $ac_n "checking whether explicit C++ constructor calls are allowed""... $ac_c" 1>&6 |
---|
2985 | echo "configure:2986: checking whether explicit C++ constructor calls are allowed" >&5 |
---|
2986 | |
---|
2987 | ac_ext=C |
---|
2988 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
---|
2989 | ac_cpp='$CXXCPP $CPPFLAGS' |
---|
2990 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
---|
2991 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
---|
2992 | cross_compiling=$ac_cv_prog_cxx_cross |
---|
2993 | |
---|
2994 | if eval "test \"`echo '$''{'ac_cv_explicit_const'+set}'`\" = set"; then |
---|
2995 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
2996 | else |
---|
2997 | cat > conftest.$ac_ext <<EOF |
---|
2998 | #line 2999 "configure" |
---|
2999 | #include "confdefs.h" |
---|
3000 | |
---|
3001 | int main() { |
---|
3002 | class testclass |
---|
3003 | { |
---|
3004 | public: |
---|
3005 | int value; |
---|
3006 | testclass() : value(0) {} |
---|
3007 | testclass( int i ) : value(i) {} |
---|
3008 | ~testclass() { value = 0; } |
---|
3009 | }; |
---|
3010 | |
---|
3011 | testclass ptr; |
---|
3012 | ptr.testclass(1); |
---|
3013 | |
---|
3014 | ; return 0; } |
---|
3015 | EOF |
---|
3016 | if { (eval echo configure:3017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
---|
3017 | rm -rf conftest* |
---|
3018 | ac_cv_explicit_const=yes |
---|
3019 | else |
---|
3020 | echo "configure: failed program was:" >&5 |
---|
3021 | cat conftest.$ac_ext >&5 |
---|
3022 | rm -rf conftest* |
---|
3023 | ac_cv_explicit_const=no |
---|
3024 | fi |
---|
3025 | rm -f conftest* |
---|
3026 | fi |
---|
3027 | |
---|
3028 | ac_ext=c |
---|
3029 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
---|
3030 | ac_cpp='$CPP $CPPFLAGS' |
---|
3031 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
---|
3032 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
---|
3033 | cross_compiling=$ac_cv_prog_cc_cross |
---|
3034 | |
---|
3035 | echo "$ac_t""$ac_cv_explicit_const" 1>&6 |
---|
3036 | if test "$ac_cv_explicit_const" = yes; then |
---|
3037 | cat >> confdefs.h <<\EOF |
---|
3038 | #define HAVE_EXPLICIT_CONSTR 1 |
---|
3039 | EOF |
---|
3040 | |
---|
3041 | fi |
---|
3042 | |
---|
3043 | # sprintf returns number of printed chars |
---|
3044 | echo $ac_n "checking whether vsprintf returns number of printed chars""... $ac_c" 1>&6 |
---|
3045 | echo "configure:3046: checking whether vsprintf returns number of printed chars" >&5 |
---|
3046 | if eval "test \"`echo '$''{'ac_cv_returns_n_of_chars'+set}'`\" = set"; then |
---|
3047 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3048 | else |
---|
3049 | if test "$cross_compiling" = yes; then |
---|
3050 | ac_cv_returns_n_of_chars=no |
---|
3051 | else |
---|
3052 | cat > conftest.$ac_ext <<EOF |
---|
3053 | #line 3054 "configure" |
---|
3054 | #include "confdefs.h" |
---|
3055 | #include <stdio.h> |
---|
3056 | main() { char *str=(char*)malloc(20); if (((int) sprintf(str,"123456789")) == 9) exit(0); else exit(1); } |
---|
3057 | EOF |
---|
3058 | if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3059 | then |
---|
3060 | ac_cv_returns_n_of_chars=yes |
---|
3061 | else |
---|
3062 | echo "configure: failed program was:" >&5 |
---|
3063 | cat conftest.$ac_ext >&5 |
---|
3064 | rm -fr conftest* |
---|
3065 | ac_cv_returns_n_of_chars=no |
---|
3066 | fi |
---|
3067 | rm -fr conftest* |
---|
3068 | fi |
---|
3069 | |
---|
3070 | fi |
---|
3071 | |
---|
3072 | if test "$ac_cv_returns_n_of_chars" = yes; then |
---|
3073 | echo "$ac_t""yes" 1>&6 |
---|
3074 | else |
---|
3075 | echo "$ac_t""no" 1>&6 |
---|
3076 | cat >> confdefs.h <<\EOF |
---|
3077 | #define BSD_SPRINTF 1 |
---|
3078 | EOF |
---|
3079 | |
---|
3080 | fi |
---|
3081 | |
---|
3082 | # determine ALIGN_8 |
---|
3083 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
---|
3084 | echo "configure:3085: checking size of char" >&5 |
---|
3085 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
---|
3086 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3087 | else |
---|
3088 | if test "$cross_compiling" = yes; then |
---|
3089 | ac_cv_sizeof_char=1 |
---|
3090 | else |
---|
3091 | cat > conftest.$ac_ext <<EOF |
---|
3092 | #line 3093 "configure" |
---|
3093 | #include "confdefs.h" |
---|
3094 | #include <stdio.h> |
---|
3095 | main() |
---|
3096 | { |
---|
3097 | FILE *f=fopen("conftestval", "w"); |
---|
3098 | if (!f) exit(1); |
---|
3099 | fprintf(f, "%d\n", sizeof(char)); |
---|
3100 | exit(0); |
---|
3101 | } |
---|
3102 | EOF |
---|
3103 | if { (eval echo configure:3104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3104 | then |
---|
3105 | ac_cv_sizeof_char=`cat conftestval` |
---|
3106 | else |
---|
3107 | echo "configure: failed program was:" >&5 |
---|
3108 | cat conftest.$ac_ext >&5 |
---|
3109 | rm -fr conftest* |
---|
3110 | ac_cv_sizeof_char=0 |
---|
3111 | fi |
---|
3112 | rm -fr conftest* |
---|
3113 | fi |
---|
3114 | |
---|
3115 | fi |
---|
3116 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
---|
3117 | cat >> confdefs.h <<EOF |
---|
3118 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
---|
3119 | EOF |
---|
3120 | |
---|
3121 | |
---|
3122 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
---|
3123 | echo "configure:3124: checking size of short" >&5 |
---|
3124 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
---|
3125 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3126 | else |
---|
3127 | if test "$cross_compiling" = yes; then |
---|
3128 | ac_cv_sizeof_short=2 |
---|
3129 | else |
---|
3130 | cat > conftest.$ac_ext <<EOF |
---|
3131 | #line 3132 "configure" |
---|
3132 | #include "confdefs.h" |
---|
3133 | #include <stdio.h> |
---|
3134 | main() |
---|
3135 | { |
---|
3136 | FILE *f=fopen("conftestval", "w"); |
---|
3137 | if (!f) exit(1); |
---|
3138 | fprintf(f, "%d\n", sizeof(short)); |
---|
3139 | exit(0); |
---|
3140 | } |
---|
3141 | EOF |
---|
3142 | if { (eval echo configure:3143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3143 | then |
---|
3144 | ac_cv_sizeof_short=`cat conftestval` |
---|
3145 | else |
---|
3146 | echo "configure: failed program was:" >&5 |
---|
3147 | cat conftest.$ac_ext >&5 |
---|
3148 | rm -fr conftest* |
---|
3149 | ac_cv_sizeof_short=0 |
---|
3150 | fi |
---|
3151 | rm -fr conftest* |
---|
3152 | fi |
---|
3153 | |
---|
3154 | fi |
---|
3155 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
---|
3156 | cat >> confdefs.h <<EOF |
---|
3157 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
---|
3158 | EOF |
---|
3159 | |
---|
3160 | |
---|
3161 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
---|
3162 | echo "configure:3163: checking size of int" >&5 |
---|
3163 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
---|
3164 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3165 | else |
---|
3166 | if test "$cross_compiling" = yes; then |
---|
3167 | ac_cv_sizeof_int=4 |
---|
3168 | else |
---|
3169 | cat > conftest.$ac_ext <<EOF |
---|
3170 | #line 3171 "configure" |
---|
3171 | #include "confdefs.h" |
---|
3172 | #include <stdio.h> |
---|
3173 | main() |
---|
3174 | { |
---|
3175 | FILE *f=fopen("conftestval", "w"); |
---|
3176 | if (!f) exit(1); |
---|
3177 | fprintf(f, "%d\n", sizeof(int)); |
---|
3178 | exit(0); |
---|
3179 | } |
---|
3180 | EOF |
---|
3181 | if { (eval echo configure:3182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3182 | then |
---|
3183 | ac_cv_sizeof_int=`cat conftestval` |
---|
3184 | else |
---|
3185 | echo "configure: failed program was:" >&5 |
---|
3186 | cat conftest.$ac_ext >&5 |
---|
3187 | rm -fr conftest* |
---|
3188 | ac_cv_sizeof_int=0 |
---|
3189 | fi |
---|
3190 | rm -fr conftest* |
---|
3191 | fi |
---|
3192 | |
---|
3193 | fi |
---|
3194 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
---|
3195 | cat >> confdefs.h <<EOF |
---|
3196 | #define SIZEOF_INT $ac_cv_sizeof_int |
---|
3197 | EOF |
---|
3198 | |
---|
3199 | |
---|
3200 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
---|
3201 | echo "configure:3202: checking size of long" >&5 |
---|
3202 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
---|
3203 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3204 | else |
---|
3205 | if test "$cross_compiling" = yes; then |
---|
3206 | ac_cv_sizeof_long=4 |
---|
3207 | else |
---|
3208 | cat > conftest.$ac_ext <<EOF |
---|
3209 | #line 3210 "configure" |
---|
3210 | #include "confdefs.h" |
---|
3211 | #include <stdio.h> |
---|
3212 | main() |
---|
3213 | { |
---|
3214 | FILE *f=fopen("conftestval", "w"); |
---|
3215 | if (!f) exit(1); |
---|
3216 | fprintf(f, "%d\n", sizeof(long)); |
---|
3217 | exit(0); |
---|
3218 | } |
---|
3219 | EOF |
---|
3220 | if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3221 | then |
---|
3222 | ac_cv_sizeof_long=`cat conftestval` |
---|
3223 | else |
---|
3224 | echo "configure: failed program was:" >&5 |
---|
3225 | cat conftest.$ac_ext >&5 |
---|
3226 | rm -fr conftest* |
---|
3227 | ac_cv_sizeof_long=0 |
---|
3228 | fi |
---|
3229 | rm -fr conftest* |
---|
3230 | fi |
---|
3231 | |
---|
3232 | fi |
---|
3233 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
---|
3234 | cat >> confdefs.h <<EOF |
---|
3235 | #define SIZEOF_LONG $ac_cv_sizeof_long |
---|
3236 | EOF |
---|
3237 | |
---|
3238 | |
---|
3239 | echo $ac_n "checking size of void*""... $ac_c" 1>&6 |
---|
3240 | echo "configure:3241: checking size of void*" >&5 |
---|
3241 | if eval "test \"`echo '$''{'ac_cv_sizeof_voidp'+set}'`\" = set"; then |
---|
3242 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3243 | else |
---|
3244 | if test "$cross_compiling" = yes; then |
---|
3245 | ac_cv_sizeof_voidp=4 |
---|
3246 | else |
---|
3247 | cat > conftest.$ac_ext <<EOF |
---|
3248 | #line 3249 "configure" |
---|
3249 | #include "confdefs.h" |
---|
3250 | #include <stdio.h> |
---|
3251 | main() |
---|
3252 | { |
---|
3253 | FILE *f=fopen("conftestval", "w"); |
---|
3254 | if (!f) exit(1); |
---|
3255 | fprintf(f, "%d\n", sizeof(void*)); |
---|
3256 | exit(0); |
---|
3257 | } |
---|
3258 | EOF |
---|
3259 | if { (eval echo configure:3260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3260 | then |
---|
3261 | ac_cv_sizeof_voidp=`cat conftestval` |
---|
3262 | else |
---|
3263 | echo "configure: failed program was:" >&5 |
---|
3264 | cat conftest.$ac_ext >&5 |
---|
3265 | rm -fr conftest* |
---|
3266 | ac_cv_sizeof_voidp=0 |
---|
3267 | fi |
---|
3268 | rm -fr conftest* |
---|
3269 | fi |
---|
3270 | |
---|
3271 | fi |
---|
3272 | echo "$ac_t""$ac_cv_sizeof_voidp" 1>&6 |
---|
3273 | cat >> confdefs.h <<EOF |
---|
3274 | #define SIZEOF_VOIDP $ac_cv_sizeof_voidp |
---|
3275 | EOF |
---|
3276 | |
---|
3277 | |
---|
3278 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
---|
3279 | echo "configure:3280: checking size of double" >&5 |
---|
3280 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
---|
3281 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3282 | else |
---|
3283 | if test "$cross_compiling" = yes; then |
---|
3284 | ac_cv_sizeof_double=8 |
---|
3285 | else |
---|
3286 | cat > conftest.$ac_ext <<EOF |
---|
3287 | #line 3288 "configure" |
---|
3288 | #include "confdefs.h" |
---|
3289 | #include <stdio.h> |
---|
3290 | main() |
---|
3291 | { |
---|
3292 | FILE *f=fopen("conftestval", "w"); |
---|
3293 | if (!f) exit(1); |
---|
3294 | fprintf(f, "%d\n", sizeof(double)); |
---|
3295 | exit(0); |
---|
3296 | } |
---|
3297 | EOF |
---|
3298 | if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3299 | then |
---|
3300 | ac_cv_sizeof_double=`cat conftestval` |
---|
3301 | else |
---|
3302 | echo "configure: failed program was:" >&5 |
---|
3303 | cat conftest.$ac_ext >&5 |
---|
3304 | rm -fr conftest* |
---|
3305 | ac_cv_sizeof_double=0 |
---|
3306 | fi |
---|
3307 | rm -fr conftest* |
---|
3308 | fi |
---|
3309 | |
---|
3310 | fi |
---|
3311 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
---|
3312 | cat >> confdefs.h <<EOF |
---|
3313 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
---|
3314 | EOF |
---|
3315 | |
---|
3316 | |
---|
3317 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
---|
3318 | echo "configure:3319: checking whether byte ordering is bigendian" >&5 |
---|
3319 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
---|
3320 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3321 | else |
---|
3322 | ac_cv_c_bigendian=unknown |
---|
3323 | # See if sys/param.h defines the BYTE_ORDER macro. |
---|
3324 | cat > conftest.$ac_ext <<EOF |
---|
3325 | #line 3326 "configure" |
---|
3326 | #include "confdefs.h" |
---|
3327 | #include <sys/types.h> |
---|
3328 | #include <sys/param.h> |
---|
3329 | int main() { |
---|
3330 | |
---|
3331 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
---|
3332 | bogus endian macros |
---|
3333 | #endif |
---|
3334 | ; return 0; } |
---|
3335 | EOF |
---|
3336 | if { (eval echo configure:3337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
---|
3337 | rm -rf conftest* |
---|
3338 | # It does; now see whether it defined to BIG_ENDIAN or not. |
---|
3339 | cat > conftest.$ac_ext <<EOF |
---|
3340 | #line 3341 "configure" |
---|
3341 | #include "confdefs.h" |
---|
3342 | #include <sys/types.h> |
---|
3343 | #include <sys/param.h> |
---|
3344 | int main() { |
---|
3345 | |
---|
3346 | #if BYTE_ORDER != BIG_ENDIAN |
---|
3347 | not big endian |
---|
3348 | #endif |
---|
3349 | ; return 0; } |
---|
3350 | EOF |
---|
3351 | if { (eval echo configure:3352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
---|
3352 | rm -rf conftest* |
---|
3353 | ac_cv_c_bigendian=yes |
---|
3354 | else |
---|
3355 | echo "configure: failed program was:" >&5 |
---|
3356 | cat conftest.$ac_ext >&5 |
---|
3357 | rm -rf conftest* |
---|
3358 | ac_cv_c_bigendian=no |
---|
3359 | fi |
---|
3360 | rm -f conftest* |
---|
3361 | else |
---|
3362 | echo "configure: failed program was:" >&5 |
---|
3363 | cat conftest.$ac_ext >&5 |
---|
3364 | fi |
---|
3365 | rm -f conftest* |
---|
3366 | if test $ac_cv_c_bigendian = unknown; then |
---|
3367 | if test "$cross_compiling" = yes; then |
---|
3368 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
---|
3369 | else |
---|
3370 | cat > conftest.$ac_ext <<EOF |
---|
3371 | #line 3372 "configure" |
---|
3372 | #include "confdefs.h" |
---|
3373 | main () { |
---|
3374 | /* Are we little or big endian? From Harbison&Steele. */ |
---|
3375 | union |
---|
3376 | { |
---|
3377 | long l; |
---|
3378 | char c[sizeof (long)]; |
---|
3379 | } u; |
---|
3380 | u.l = 1; |
---|
3381 | exit (u.c[sizeof (long) - 1] == 1); |
---|
3382 | } |
---|
3383 | EOF |
---|
3384 | if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3385 | then |
---|
3386 | ac_cv_c_bigendian=no |
---|
3387 | else |
---|
3388 | echo "configure: failed program was:" >&5 |
---|
3389 | cat conftest.$ac_ext >&5 |
---|
3390 | rm -fr conftest* |
---|
3391 | ac_cv_c_bigendian=yes |
---|
3392 | fi |
---|
3393 | rm -fr conftest* |
---|
3394 | fi |
---|
3395 | |
---|
3396 | fi |
---|
3397 | fi |
---|
3398 | |
---|
3399 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
---|
3400 | if test $ac_cv_c_bigendian = yes; then |
---|
3401 | cat >> confdefs.h <<\EOF |
---|
3402 | #define WORDS_BIGENDIAN 1 |
---|
3403 | EOF |
---|
3404 | |
---|
3405 | fi |
---|
3406 | |
---|
3407 | if test "$ac_cv_sizeof_int" != 4; then |
---|
3408 | { echo "configure: error: need int to be four bytes long" 1>&2; exit 1; } |
---|
3409 | fi |
---|
3410 | if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then |
---|
3411 | { echo "configure: error: need equal sizes for long and void*" 1>&2; exit 1; } |
---|
3412 | fi |
---|
3413 | if test "$ac_cv_sizeof_double" != 8; then |
---|
3414 | { echo "configure: error: need double to b 8 bytes long" 1>&2; exit 1; } |
---|
3415 | fi |
---|
3416 | if test "$ac_cv_sizeof_voidp" != 4 && "$ac_cv_sizeof_voidp" != 8; then |
---|
3417 | { echo "configure: error: need void* to be 4 or 8 bytes long" 1>&2; exit 1; } |
---|
3418 | fi |
---|
3419 | |
---|
3420 | echo $ac_n "checking size of system page""... $ac_c" 1>&6 |
---|
3421 | echo "configure:3422: checking size of system page" >&5 |
---|
3422 | if eval "test \"`echo '$''{'ac_cv_pagesize'+set}'`\" = set"; then |
---|
3423 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3424 | else |
---|
3425 | if test "$cross_compiling" = yes; then |
---|
3426 | ac_cv_pagesize=0 |
---|
3427 | else |
---|
3428 | cat > conftest.$ac_ext <<EOF |
---|
3429 | #line 3430 "configure" |
---|
3430 | #include "confdefs.h" |
---|
3431 | #include <stdio.h> |
---|
3432 | #define HAVE_GMALLOC |
---|
3433 | #include "gmalloc.c" |
---|
3434 | |
---|
3435 | main() |
---|
3436 | { |
---|
3437 | FILE *f=fopen("conftestval", "w"); |
---|
3438 | if (!f) exit(1); |
---|
3439 | fprintf(f, "%d\n", getpagesize()); |
---|
3440 | exit(0); |
---|
3441 | } |
---|
3442 | EOF |
---|
3443 | if { (eval echo configure:3444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3444 | then |
---|
3445 | ac_cv_pagesize=`cat conftestval` |
---|
3446 | else |
---|
3447 | echo "configure: failed program was:" >&5 |
---|
3448 | cat conftest.$ac_ext >&5 |
---|
3449 | rm -fr conftest* |
---|
3450 | ac_cv_pagesize=0 |
---|
3451 | fi |
---|
3452 | rm -fr conftest* |
---|
3453 | fi |
---|
3454 | |
---|
3455 | fi |
---|
3456 | |
---|
3457 | echo "$ac_t""$ac_cv_pagesize" 1>&6 |
---|
3458 | if test "$ac_cv_pagesize" != 0; then |
---|
3459 | cat >> confdefs.h <<EOF |
---|
3460 | #define SIZE_OF_SYSTEM_PAGE $ac_cv_pagesize |
---|
3461 | EOF |
---|
3462 | |
---|
3463 | fi |
---|
3464 | |
---|
3465 | |
---|
3466 | echo $ac_n "checking for page aligned valloc""... $ac_c" 1>&6 |
---|
3467 | echo "configure:3468: checking for page aligned valloc" >&5 |
---|
3468 | if eval "test \"`echo '$''{'ac_cv_have_page_alignment'+set}'`\" = set"; then |
---|
3469 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3470 | else |
---|
3471 | cat > _pagetest.c << EOF |
---|
3472 | #include <stdio.h> |
---|
3473 | #ifndef ADJUSTMENT |
---|
3474 | #define ADJUSTMENT 0 |
---|
3475 | #endif |
---|
3476 | #define REPEAT 1000 |
---|
3477 | main() |
---|
3478 | { |
---|
3479 | long i; |
---|
3480 | unsigned long p1 = (unsigned long) valloc(SIZE_OF_SYSTEM_PAGE - ADJUSTMENT); |
---|
3481 | unsigned long p2; |
---|
3482 | unsigned long diffs = 0; |
---|
3483 | |
---|
3484 | if ((p1 == 0) || (p1 & (SIZE_OF_SYSTEM_PAGE - 1))) exit(1); |
---|
3485 | |
---|
3486 | for (i = 0; i<REPEAT; i++) |
---|
3487 | { |
---|
3488 | p2 = (unsigned long) valloc(SIZE_OF_SYSTEM_PAGE - ADJUSTMENT); |
---|
3489 | if ((p2 == 0) || (p2 & (SIZE_OF_SYSTEM_PAGE - 1))) exit(1); |
---|
3490 | diffs += (p2 - p1); |
---|
3491 | p1 = p2; |
---|
3492 | } |
---|
3493 | |
---|
3494 | if ( ((double) diffs)/((double)REPEAT) < ((double) SIZE_OF_SYSTEM_PAGE)*1.05 ) |
---|
3495 | { |
---|
3496 | FILE *f=fopen("conftestval", "w"); |
---|
3497 | if (!f) exit(1); |
---|
3498 | fprintf(f, "%d\n", SIZE_OF_SYSTEM_PAGE - ADJUSTMENT); |
---|
3499 | exit(0); |
---|
3500 | } |
---|
3501 | exit(1); |
---|
3502 | } |
---|
3503 | EOF |
---|
3504 | |
---|
3505 | ac_cv_have_page_alignment=no |
---|
3506 | if test "$with_gmalloc" != yes && \ |
---|
3507 | test "$ac_cv_func_valloc" = yes && \ |
---|
3508 | test "$ac_cv_pagesize" != 0; then |
---|
3509 | if test "$cross_compiling" = yes; then |
---|
3510 | ac_cv_have_page_alignment=no |
---|
3511 | else |
---|
3512 | cat > conftest.$ac_ext <<EOF |
---|
3513 | #line 3514 "configure" |
---|
3514 | #include "confdefs.h" |
---|
3515 | |
---|
3516 | #define ADJUSTMENT 0 |
---|
3517 | #include "_pagetest.c" |
---|
3518 | |
---|
3519 | EOF |
---|
3520 | if { (eval echo configure:3521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3521 | then |
---|
3522 | ac_cv_have_page_alignment="ac_cv_usable_pagesize="`cat conftestval` |
---|
3523 | else |
---|
3524 | echo "configure: failed program was:" >&5 |
---|
3525 | cat conftest.$ac_ext >&5 |
---|
3526 | rm -fr conftest* |
---|
3527 | ac_cv_have_page_alignment=no |
---|
3528 | fi |
---|
3529 | rm -fr conftest* |
---|
3530 | fi |
---|
3531 | |
---|
3532 | if test "$ac_cv_have_page_alignment" = no; then |
---|
3533 | if test "$cross_compiling" = yes; then |
---|
3534 | ac_cv_have_page_alignment=no |
---|
3535 | else |
---|
3536 | cat > conftest.$ac_ext <<EOF |
---|
3537 | #line 3538 "configure" |
---|
3538 | #include "confdefs.h" |
---|
3539 | |
---|
3540 | #define ADJUSTMENT SIZEOF_VOIDP |
---|
3541 | #include "_pagetest.c" |
---|
3542 | |
---|
3543 | EOF |
---|
3544 | if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3545 | then |
---|
3546 | ac_cv_have_page_alignment="ac_cv_usable_pagesize="`cat conftestval` |
---|
3547 | else |
---|
3548 | echo "configure: failed program was:" >&5 |
---|
3549 | cat conftest.$ac_ext >&5 |
---|
3550 | rm -fr conftest* |
---|
3551 | ac_cv_have_page_alignment=no |
---|
3552 | fi |
---|
3553 | rm -fr conftest* |
---|
3554 | fi |
---|
3555 | |
---|
3556 | fi |
---|
3557 | fi |
---|
3558 | |
---|
3559 | if test "$ac_cv_have_page_alignment" = no && test "$ac_cv_pagesize" != 0; then |
---|
3560 | if test "$cross_compiling" = yes; then |
---|
3561 | ac_cv_have_page_alignment=no |
---|
3562 | else |
---|
3563 | cat > conftest.$ac_ext <<EOF |
---|
3564 | #line 3565 "configure" |
---|
3565 | #include "confdefs.h" |
---|
3566 | |
---|
3567 | #define ADJUSTMENT 0 |
---|
3568 | #define HAVE_GMALLOC |
---|
3569 | #include "gmalloc.c" |
---|
3570 | #include "_pagetest.c" |
---|
3571 | |
---|
3572 | EOF |
---|
3573 | if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3574 | then |
---|
3575 | ac_cv_have_page_alignment="ac_cv_have_gmalloc=yes; ac_cv_usable_pagesize="`cat conftestval` |
---|
3576 | else |
---|
3577 | echo "configure: failed program was:" >&5 |
---|
3578 | cat conftest.$ac_ext >&5 |
---|
3579 | rm -fr conftest* |
---|
3580 | ac_cv_have_page_alignment=no |
---|
3581 | fi |
---|
3582 | rm -fr conftest* |
---|
3583 | fi |
---|
3584 | |
---|
3585 | if test "$ac_cv_have_page_alignment" = no; then |
---|
3586 | if test "$cross_compiling" = yes; then |
---|
3587 | ac_cv_have_page_alignment=no |
---|
3588 | else |
---|
3589 | cat > conftest.$ac_ext <<EOF |
---|
3590 | #line 3591 "configure" |
---|
3591 | #include "confdefs.h" |
---|
3592 | |
---|
3593 | #define ADJUSTMENT SIZEOF_VOIDP |
---|
3594 | #define HAVE_GMALLOC |
---|
3595 | #include "gmalloc.c" |
---|
3596 | #include "_pagetest.c" |
---|
3597 | |
---|
3598 | EOF |
---|
3599 | if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
---|
3600 | then |
---|
3601 | ac_cv_have_page_alignment="ac_cv_have_gmalloc=yes; ac_cv_usable_pagesize="`cat conftestval` |
---|
3602 | else |
---|
3603 | echo "configure: failed program was:" >&5 |
---|
3604 | cat conftest.$ac_ext >&5 |
---|
3605 | rm -fr conftest* |
---|
3606 | ac_cv_have_page_alignment=no |
---|
3607 | fi |
---|
3608 | rm -fr conftest* |
---|
3609 | fi |
---|
3610 | |
---|
3611 | fi |
---|
3612 | fi |
---|
3613 | rm -rf conftesteval _pagetest.c |
---|
3614 | |
---|
3615 | |
---|
3616 | fi |
---|
3617 | |
---|
3618 | |
---|
3619 | if test "$ac_cv_have_page_alignment" != no && test "$ac_cv_with_gmalloc" != no; then |
---|
3620 | eval $ac_cv_have_page_alignment |
---|
3621 | cat >> confdefs.h <<EOF |
---|
3622 | #define PALLOC valloc |
---|
3623 | EOF |
---|
3624 | |
---|
3625 | cat >> confdefs.h <<EOF |
---|
3626 | #define PFREE free |
---|
3627 | EOF |
---|
3628 | |
---|
3629 | if test "$ac_cv_have_gmalloc" = yes; then |
---|
3630 | cat >> confdefs.h <<\EOF |
---|
3631 | #define HAVE_GMALLOC 1 |
---|
3632 | EOF |
---|
3633 | |
---|
3634 | echo "$ac_t""from gmalloc" 1>&6 |
---|
3635 | else |
---|
3636 | echo "$ac_t""from system" 1>&6 |
---|
3637 | fi |
---|
3638 | cat >> confdefs.h <<EOF |
---|
3639 | #define SIZE_OF_PAGE $ac_cv_usable_pagesize |
---|
3640 | EOF |
---|
3641 | |
---|
3642 | else |
---|
3643 | echo "$ac_t""no" 1>&6 |
---|
3644 | echo "configure: warning: Advanced memory management disabled" 1>&2 |
---|
3645 | fi |
---|
3646 | |
---|
3647 | # Check whether --with-rootdir or --without-rootdir was given. |
---|
3648 | if test "${with_rootdir+set}" = set; then |
---|
3649 | withval="$with_rootdir" |
---|
3650 | : |
---|
3651 | fi |
---|
3652 | |
---|
3653 | # Check whether --with-lex or --without-lex was given. |
---|
3654 | if test "${with_lex+set}" = set; then |
---|
3655 | withval="$with_lex" |
---|
3656 | : |
---|
3657 | fi |
---|
3658 | |
---|
3659 | # Check whether --with-readline or --without-readline was given. |
---|
3660 | if test "${with_readline+set}" = set; then |
---|
3661 | withval="$with_readline" |
---|
3662 | : |
---|
3663 | fi |
---|
3664 | |
---|
3665 | # Check whether --with-MP or --without-MP was given. |
---|
3666 | if test "${with_MP+set}" = set; then |
---|
3667 | withval="$with_MP" |
---|
3668 | : |
---|
3669 | fi |
---|
3670 | |
---|
3671 | # Check whether --with-dbm or --without-dbm was given. |
---|
3672 | if test "${with_dbm+set}" = set; then |
---|
3673 | withval="$with_dbm" |
---|
3674 | : |
---|
3675 | fi |
---|
3676 | |
---|
3677 | # Check whether --with-factory or --without-factory was given. |
---|
3678 | if test "${with_factory+set}" = set; then |
---|
3679 | withval="$with_factory" |
---|
3680 | : |
---|
3681 | fi |
---|
3682 | |
---|
3683 | # Check whether --with-libfac or --without-libfac was given. |
---|
3684 | if test "${with_libfac+set}" = set; then |
---|
3685 | withval="$with_libfac" |
---|
3686 | : |
---|
3687 | fi |
---|
3688 | |
---|
3689 | # Check whether --with-namespaces or --without-namespaces was given. |
---|
3690 | if test "${with_namespaces+set}" = set; then |
---|
3691 | withval="$with_namespaces" |
---|
3692 | : |
---|
3693 | fi |
---|
3694 | |
---|
3695 | # Check whether --with-dl or --without-dl was given. |
---|
3696 | if test "${with_dl+set}" = set; then |
---|
3697 | withval="$with_dl" |
---|
3698 | : |
---|
3699 | fi |
---|
3700 | |
---|
3701 | # Check whether --with-apint or --without-apint was given. |
---|
3702 | if test "${with_apint+set}" = set; then |
---|
3703 | withval="$with_apint" |
---|
3704 | : |
---|
3705 | fi |
---|
3706 | |
---|
3707 | # Check whether --with-exp_type or --without-exp_type was given. |
---|
3708 | if test "${with_exp_type+set}" = set; then |
---|
3709 | withval="$with_exp_type" |
---|
3710 | : |
---|
3711 | fi |
---|
3712 | |
---|
3713 | # Check whether --with-gmalloc or --without-gmalloc was given. |
---|
3714 | if test "${with_gmalloc+set}" = set; then |
---|
3715 | withval="$with_gmalloc" |
---|
3716 | : |
---|
3717 | fi |
---|
3718 | |
---|
3719 | |
---|
3720 | echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 |
---|
3721 | echo "configure:3722: checking for tgetent in -lncurses" >&5 |
---|
3722 | ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` |
---|
3723 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
3724 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3725 | else |
---|
3726 | ac_save_LIBS="$LIBS" |
---|
3727 | LIBS="-lncurses $LIBS" |
---|
3728 | cat > conftest.$ac_ext <<EOF |
---|
3729 | #line 3730 "configure" |
---|
3730 | #include "confdefs.h" |
---|
3731 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
3732 | /* We use char because int might match the return type of a gcc2 |
---|
3733 | builtin and then its argument prototype would still apply. */ |
---|
3734 | char tgetent(); |
---|
3735 | |
---|
3736 | int main() { |
---|
3737 | tgetent() |
---|
3738 | ; return 0; } |
---|
3739 | EOF |
---|
3740 | if { (eval echo configure:3741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
3741 | rm -rf conftest* |
---|
3742 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
3743 | else |
---|
3744 | echo "configure: failed program was:" >&5 |
---|
3745 | cat conftest.$ac_ext >&5 |
---|
3746 | rm -rf conftest* |
---|
3747 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
3748 | fi |
---|
3749 | rm -f conftest* |
---|
3750 | LIBS="$ac_save_LIBS" |
---|
3751 | |
---|
3752 | fi |
---|
3753 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
3754 | echo "$ac_t""yes" 1>&6 |
---|
3755 | ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
3756 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
3757 | cat >> confdefs.h <<EOF |
---|
3758 | #define $ac_tr_lib 1 |
---|
3759 | EOF |
---|
3760 | |
---|
3761 | LIBS="-lncurses $LIBS" |
---|
3762 | |
---|
3763 | else |
---|
3764 | echo "$ac_t""no" 1>&6 |
---|
3765 | \ |
---|
3766 | echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 |
---|
3767 | echo "configure:3768: checking for tgetent in -lcurses" >&5 |
---|
3768 | ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` |
---|
3769 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
3770 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3771 | else |
---|
3772 | ac_save_LIBS="$LIBS" |
---|
3773 | LIBS="-lcurses $LIBS" |
---|
3774 | cat > conftest.$ac_ext <<EOF |
---|
3775 | #line 3776 "configure" |
---|
3776 | #include "confdefs.h" |
---|
3777 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
3778 | /* We use char because int might match the return type of a gcc2 |
---|
3779 | builtin and then its argument prototype would still apply. */ |
---|
3780 | char tgetent(); |
---|
3781 | |
---|
3782 | int main() { |
---|
3783 | tgetent() |
---|
3784 | ; return 0; } |
---|
3785 | EOF |
---|
3786 | if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
3787 | rm -rf conftest* |
---|
3788 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
3789 | else |
---|
3790 | echo "configure: failed program was:" >&5 |
---|
3791 | cat conftest.$ac_ext >&5 |
---|
3792 | rm -rf conftest* |
---|
3793 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
3794 | fi |
---|
3795 | rm -f conftest* |
---|
3796 | LIBS="$ac_save_LIBS" |
---|
3797 | |
---|
3798 | fi |
---|
3799 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
3800 | echo "$ac_t""yes" 1>&6 |
---|
3801 | ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/^a-zA-Z0-9_/_/g' \ |
---|
3802 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
3803 | cat >> confdefs.h <<EOF |
---|
3804 | #define $ac_tr_lib 1 |
---|
3805 | EOF |
---|
3806 | |
---|
3807 | LIBS="-lcurses $LIBS" |
---|
3808 | |
---|
3809 | else |
---|
3810 | echo "$ac_t""no" 1>&6 |
---|
3811 | \ |
---|
3812 | echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 |
---|
3813 | echo "configure:3814: checking for tgetent in -ltermcap" >&5 |
---|
3814 | ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` |
---|
3815 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
3816 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3817 | else |
---|
3818 | ac_save_LIBS="$LIBS" |
---|
3819 | LIBS="-ltermcap $LIBS" |
---|
3820 | cat > conftest.$ac_ext <<EOF |
---|
3821 | #line 3822 "configure" |
---|
3822 | #include "confdefs.h" |
---|
3823 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
3824 | /* We use char because int might match the return type of a gcc2 |
---|
3825 | builtin and then its argument prototype would still apply. */ |
---|
3826 | char tgetent(); |
---|
3827 | |
---|
3828 | int main() { |
---|
3829 | tgetent() |
---|
3830 | ; return 0; } |
---|
3831 | EOF |
---|
3832 | if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
3833 | rm -rf conftest* |
---|
3834 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
3835 | else |
---|
3836 | echo "configure: failed program was:" >&5 |
---|
3837 | cat conftest.$ac_ext >&5 |
---|
3838 | rm -rf conftest* |
---|
3839 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
3840 | fi |
---|
3841 | rm -f conftest* |
---|
3842 | LIBS="$ac_save_LIBS" |
---|
3843 | |
---|
3844 | fi |
---|
3845 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
3846 | echo "$ac_t""yes" 1>&6 |
---|
3847 | ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/^a-zA-Z0-9_/_/g' \ |
---|
3848 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
3849 | cat >> confdefs.h <<EOF |
---|
3850 | #define $ac_tr_lib 1 |
---|
3851 | EOF |
---|
3852 | |
---|
3853 | LIBS="-ltermcap $LIBS" |
---|
3854 | |
---|
3855 | else |
---|
3856 | echo "$ac_t""no" 1>&6 |
---|
3857 | fi |
---|
3858 | |
---|
3859 | fi |
---|
3860 | |
---|
3861 | fi |
---|
3862 | |
---|
3863 | |
---|
3864 | # readline |
---|
3865 | if test "$with_readline" = yes; then |
---|
3866 | |
---|
3867 | ac_ext=C |
---|
3868 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
---|
3869 | ac_cpp='$CXXCPP $CPPFLAGS' |
---|
3870 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
---|
3871 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
---|
3872 | cross_compiling=$ac_cv_prog_cxx_cross |
---|
3873 | |
---|
3874 | echo $ac_n "checking for rl_abort in -lreadline""... $ac_c" 1>&6 |
---|
3875 | echo "configure:3876: checking for rl_abort in -lreadline" >&5 |
---|
3876 | ac_lib_var=`echo readline'_'rl_abort | sed 'y%./+-%__p_%'` |
---|
3877 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
3878 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3879 | else |
---|
3880 | ac_save_LIBS="$LIBS" |
---|
3881 | LIBS="-lreadline $LIBS" |
---|
3882 | cat > conftest.$ac_ext <<EOF |
---|
3883 | #line 3884 "configure" |
---|
3884 | #include "confdefs.h" |
---|
3885 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
3886 | #ifdef __cplusplus |
---|
3887 | extern "C" |
---|
3888 | #endif |
---|
3889 | /* We use char because int might match the return type of a gcc2 |
---|
3890 | builtin and then its argument prototype would still apply. */ |
---|
3891 | char rl_abort(); |
---|
3892 | |
---|
3893 | int main() { |
---|
3894 | rl_abort() |
---|
3895 | ; return 0; } |
---|
3896 | EOF |
---|
3897 | if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
3898 | rm -rf conftest* |
---|
3899 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
3900 | else |
---|
3901 | echo "configure: failed program was:" >&5 |
---|
3902 | cat conftest.$ac_ext >&5 |
---|
3903 | rm -rf conftest* |
---|
3904 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
3905 | fi |
---|
3906 | rm -f conftest* |
---|
3907 | LIBS="$ac_save_LIBS" |
---|
3908 | |
---|
3909 | fi |
---|
3910 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
3911 | echo "$ac_t""yes" 1>&6 |
---|
3912 | ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
3913 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
3914 | cat >> confdefs.h <<EOF |
---|
3915 | #define $ac_tr_lib 1 |
---|
3916 | EOF |
---|
3917 | |
---|
3918 | LIBS="-lreadline $LIBS" |
---|
3919 | |
---|
3920 | else |
---|
3921 | echo "$ac_t""no" 1>&6 |
---|
3922 | fi |
---|
3923 | |
---|
3924 | echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 |
---|
3925 | echo "configure:3926: checking how to run the C++ preprocessor" >&5 |
---|
3926 | if test -z "$CXXCPP"; then |
---|
3927 | if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then |
---|
3928 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3929 | else |
---|
3930 | ac_ext=C |
---|
3931 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
---|
3932 | ac_cpp='$CXXCPP $CPPFLAGS' |
---|
3933 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
---|
3934 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
---|
3935 | cross_compiling=$ac_cv_prog_cxx_cross |
---|
3936 | CXXCPP="${CXX-g++} -E" |
---|
3937 | cat > conftest.$ac_ext <<EOF |
---|
3938 | #line 3939 "configure" |
---|
3939 | #include "confdefs.h" |
---|
3940 | #include <stdlib.h> |
---|
3941 | EOF |
---|
3942 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
---|
3943 | { (eval echo configure:3944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
---|
3944 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
---|
3945 | if test -z "$ac_err"; then |
---|
3946 | : |
---|
3947 | else |
---|
3948 | echo "$ac_err" >&5 |
---|
3949 | echo "configure: failed program was:" >&5 |
---|
3950 | cat conftest.$ac_ext >&5 |
---|
3951 | rm -rf conftest* |
---|
3952 | CXXCPP=/lib/cpp |
---|
3953 | fi |
---|
3954 | rm -f conftest* |
---|
3955 | ac_cv_prog_CXXCPP="$CXXCPP" |
---|
3956 | ac_ext=C |
---|
3957 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
---|
3958 | ac_cpp='$CXXCPP $CPPFLAGS' |
---|
3959 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
---|
3960 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
---|
3961 | cross_compiling=$ac_cv_prog_cxx_cross |
---|
3962 | fi |
---|
3963 | fi |
---|
3964 | CXXCPP="$ac_cv_prog_CXXCPP" |
---|
3965 | echo "$ac_t""$CXXCPP" 1>&6 |
---|
3966 | |
---|
3967 | for ac_hdr in readline/readline.h readline/history.h |
---|
3968 | do |
---|
3969 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
---|
3970 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
---|
3971 | echo "configure:3972: checking for $ac_hdr" >&5 |
---|
3972 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
---|
3973 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
3974 | else |
---|
3975 | cat > conftest.$ac_ext <<EOF |
---|
3976 | #line 3977 "configure" |
---|
3977 | #include "confdefs.h" |
---|
3978 | #include <$ac_hdr> |
---|
3979 | EOF |
---|
3980 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
---|
3981 | { (eval echo configure:3982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
---|
3982 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
---|
3983 | if test -z "$ac_err"; then |
---|
3984 | rm -rf conftest* |
---|
3985 | eval "ac_cv_header_$ac_safe=yes" |
---|
3986 | else |
---|
3987 | echo "$ac_err" >&5 |
---|
3988 | echo "configure: failed program was:" >&5 |
---|
3989 | cat conftest.$ac_ext >&5 |
---|
3990 | rm -rf conftest* |
---|
3991 | eval "ac_cv_header_$ac_safe=no" |
---|
3992 | fi |
---|
3993 | rm -f conftest* |
---|
3994 | fi |
---|
3995 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
---|
3996 | echo "$ac_t""yes" 1>&6 |
---|
3997 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
---|
3998 | cat >> confdefs.h <<EOF |
---|
3999 | #define $ac_tr_hdr 1 |
---|
4000 | EOF |
---|
4001 | |
---|
4002 | else |
---|
4003 | echo "$ac_t""no" 1>&6 |
---|
4004 | fi |
---|
4005 | done |
---|
4006 | |
---|
4007 | if test "$ac_cv_lib_readline_rl_abort" = yes && \ |
---|
4008 | test "$ac_cv_header_readline_readline_h" = yes; then |
---|
4009 | echo $ac_n "checking whether readline.h is ok""... $ac_c" 1>&6 |
---|
4010 | echo "configure:4011: checking whether readline.h is ok" >&5 |
---|
4011 | if eval "test \"`echo '$''{'ac_cv_header_readline_readline_h_ok'+set}'`\" = set"; then |
---|
4012 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4013 | else |
---|
4014 | cat > conftest.$ac_ext <<EOF |
---|
4015 | #line 4016 "configure" |
---|
4016 | #include "confdefs.h" |
---|
4017 | #include<unistd.h> |
---|
4018 | #include<stdio.h> |
---|
4019 | #include<readline/readline.h> |
---|
4020 | #ifdef HAVE_READLINE_HISTORY_H |
---|
4021 | #include<readline/history.h> |
---|
4022 | #endif |
---|
4023 | |
---|
4024 | int main() { |
---|
4025 | #ifndef NULL |
---|
4026 | #define NULL 0 |
---|
4027 | #endif |
---|
4028 | rl_readline_name=NULL; |
---|
4029 | *rl_line_buffer=1; |
---|
4030 | completion_matches(NULL, filename_completion_function); |
---|
4031 | rl_attempted_completion_function = (CPPFunction *) NULL; |
---|
4032 | rl_outstream=NULL; |
---|
4033 | readline(NULL); |
---|
4034 | add_history(NULL); |
---|
4035 | read_history(NULL); |
---|
4036 | write_history(NULL); |
---|
4037 | |
---|
4038 | ; return 0; } |
---|
4039 | EOF |
---|
4040 | if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4041 | rm -rf conftest* |
---|
4042 | ac_cv_header_readline_readline_h_ok="yes" |
---|
4043 | else |
---|
4044 | echo "configure: failed program was:" >&5 |
---|
4045 | cat conftest.$ac_ext >&5 |
---|
4046 | rm -rf conftest* |
---|
4047 | ac_cv_header_readline_readline_h_ok="no" |
---|
4048 | fi |
---|
4049 | rm -f conftest* |
---|
4050 | fi |
---|
4051 | |
---|
4052 | echo "$ac_t""$ac_cv_header_readline_readline_h_ok" 1>&6 |
---|
4053 | if test "$ac_cv_header_readline_readline_h_ok" != yes; then |
---|
4054 | #not ok -- try once more with explicitly declaring everything |
---|
4055 | echo $ac_n "checking whether or not we nevertheless can use readline""... $ac_c" 1>&6 |
---|
4056 | echo "configure:4057: checking whether or not we nevertheless can use readline" >&5 |
---|
4057 | if eval "test \"`echo '$''{'ac_cv_have_readline'+set}'`\" = set"; then |
---|
4058 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4059 | else |
---|
4060 | cat > conftest.$ac_ext <<EOF |
---|
4061 | #line 4062 "configure" |
---|
4062 | #include "confdefs.h" |
---|
4063 | #include <stdio.h> |
---|
4064 | extern "C" |
---|
4065 | { |
---|
4066 | extern char * rl_readline_name; |
---|
4067 | extern char *rl_line_buffer; |
---|
4068 | char *filename_completion_function(); |
---|
4069 | typedef char **CPPFunction (); |
---|
4070 | extern char ** completion_matches (); |
---|
4071 | extern CPPFunction * rl_attempted_completion_function; |
---|
4072 | extern FILE * rl_outstream; |
---|
4073 | char * readline (); |
---|
4074 | void add_history (); |
---|
4075 | int write_history (); |
---|
4076 | int read_history(); |
---|
4077 | } |
---|
4078 | #ifndef NULL |
---|
4079 | #define NULL 0 |
---|
4080 | #endif |
---|
4081 | |
---|
4082 | int main() { |
---|
4083 | rl_readline_name=NULL; |
---|
4084 | *rl_line_buffer=1; |
---|
4085 | completion_matches(NULL, filename_completion_function); |
---|
4086 | rl_attempted_completion_function = (CPPFunction *) NULL; |
---|
4087 | rl_outstream=NULL; |
---|
4088 | readline(NULL); |
---|
4089 | add_history(NULL); |
---|
4090 | read_history(NULL); |
---|
4091 | write_history(NULL); |
---|
4092 | |
---|
4093 | ; return 0; } |
---|
4094 | EOF |
---|
4095 | if { (eval echo configure:4096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4096 | rm -rf conftest* |
---|
4097 | ac_cv_have_readline="yes" |
---|
4098 | |
---|
4099 | else |
---|
4100 | echo "configure: failed program was:" >&5 |
---|
4101 | cat conftest.$ac_ext >&5 |
---|
4102 | rm -rf conftest* |
---|
4103 | ac_cv_have_readline="no" |
---|
4104 | |
---|
4105 | fi |
---|
4106 | rm -f conftest* |
---|
4107 | fi |
---|
4108 | |
---|
4109 | echo "$ac_t""$ac_cv_have_readline" 1>&6 |
---|
4110 | else |
---|
4111 | cat >> confdefs.h <<\EOF |
---|
4112 | #define READLINE_READLINE_H_OK 1 |
---|
4113 | EOF |
---|
4114 | |
---|
4115 | ac_cv_have_readline="yes" |
---|
4116 | fi |
---|
4117 | fi |
---|
4118 | if test "$ac_cv_have_readline" = yes; then |
---|
4119 | cat >> confdefs.h <<\EOF |
---|
4120 | #define HAVE_READLINE 1 |
---|
4121 | EOF |
---|
4122 | |
---|
4123 | else |
---|
4124 | echo "configure: warning: building without readline: disabling fancy display" 1>&2 |
---|
4125 | fi |
---|
4126 | ac_ext=c |
---|
4127 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
---|
4128 | ac_cpp='$CPP $CPPFLAGS' |
---|
4129 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
---|
4130 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
---|
4131 | cross_compiling=$ac_cv_prog_cc_cross |
---|
4132 | |
---|
4133 | fi |
---|
4134 | |
---|
4135 | NEED_LIBS=$LIBS |
---|
4136 | |
---|
4137 | # gmp, smallgmp, MP, MPT, factory, libfac |
---|
4138 | echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6 |
---|
4139 | echo "configure:4140: checking for main in -lgmp" >&5 |
---|
4140 | ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'` |
---|
4141 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
4142 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4143 | else |
---|
4144 | ac_save_LIBS="$LIBS" |
---|
4145 | LIBS="-lgmp $LIBS" |
---|
4146 | cat > conftest.$ac_ext <<EOF |
---|
4147 | #line 4148 "configure" |
---|
4148 | #include "confdefs.h" |
---|
4149 | |
---|
4150 | int main() { |
---|
4151 | main() |
---|
4152 | ; return 0; } |
---|
4153 | EOF |
---|
4154 | if { (eval echo configure:4155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4155 | rm -rf conftest* |
---|
4156 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
4157 | else |
---|
4158 | echo "configure: failed program was:" >&5 |
---|
4159 | cat conftest.$ac_ext >&5 |
---|
4160 | rm -rf conftest* |
---|
4161 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
4162 | fi |
---|
4163 | rm -f conftest* |
---|
4164 | LIBS="$ac_save_LIBS" |
---|
4165 | |
---|
4166 | fi |
---|
4167 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
4168 | echo "$ac_t""yes" 1>&6 |
---|
4169 | ac_tr_lib=HAVE_LIB`echo gmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
4170 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
4171 | cat >> confdefs.h <<EOF |
---|
4172 | #define $ac_tr_lib 1 |
---|
4173 | EOF |
---|
4174 | |
---|
4175 | LIBS="-lgmp $LIBS" |
---|
4176 | |
---|
4177 | else |
---|
4178 | echo "$ac_t""no" 1>&6 |
---|
4179 | fi |
---|
4180 | |
---|
4181 | if test "ac_cv_lib_gmp_main" = yes && test "$with-apint" = smallgmp; then |
---|
4182 | LIBS=NEED_LIBS |
---|
4183 | fi |
---|
4184 | echo $ac_n "checking for main in -lsmallgmp""... $ac_c" 1>&6 |
---|
4185 | echo "configure:4186: checking for main in -lsmallgmp" >&5 |
---|
4186 | ac_lib_var=`echo smallgmp'_'main | sed 'y%./+-%__p_%'` |
---|
4187 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
4188 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4189 | else |
---|
4190 | ac_save_LIBS="$LIBS" |
---|
4191 | LIBS="-lsmallgmp $LIBS" |
---|
4192 | cat > conftest.$ac_ext <<EOF |
---|
4193 | #line 4194 "configure" |
---|
4194 | #include "confdefs.h" |
---|
4195 | |
---|
4196 | int main() { |
---|
4197 | main() |
---|
4198 | ; return 0; } |
---|
4199 | EOF |
---|
4200 | if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4201 | rm -rf conftest* |
---|
4202 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
4203 | else |
---|
4204 | echo "configure: failed program was:" >&5 |
---|
4205 | cat conftest.$ac_ext >&5 |
---|
4206 | rm -rf conftest* |
---|
4207 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
4208 | fi |
---|
4209 | rm -f conftest* |
---|
4210 | LIBS="$ac_save_LIBS" |
---|
4211 | |
---|
4212 | fi |
---|
4213 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
4214 | echo "$ac_t""yes" 1>&6 |
---|
4215 | ac_tr_lib=HAVE_LIB`echo smallgmp | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
4216 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
4217 | cat >> confdefs.h <<EOF |
---|
4218 | #define $ac_tr_lib 1 |
---|
4219 | EOF |
---|
4220 | |
---|
4221 | LIBS="-lsmallgmp $LIBS" |
---|
4222 | |
---|
4223 | else |
---|
4224 | echo "$ac_t""no" 1>&6 |
---|
4225 | fi |
---|
4226 | |
---|
4227 | echo $ac_n "checking for IMP_PutGmpInt in -lMP""... $ac_c" 1>&6 |
---|
4228 | echo "configure:4229: checking for IMP_PutGmpInt in -lMP" >&5 |
---|
4229 | ac_lib_var=`echo MP'_'IMP_PutGmpInt | sed 'y%./+-%__p_%'` |
---|
4230 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
4231 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4232 | else |
---|
4233 | ac_save_LIBS="$LIBS" |
---|
4234 | LIBS="-lMP $LIBS" |
---|
4235 | cat > conftest.$ac_ext <<EOF |
---|
4236 | #line 4237 "configure" |
---|
4237 | #include "confdefs.h" |
---|
4238 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
4239 | /* We use char because int might match the return type of a gcc2 |
---|
4240 | builtin and then its argument prototype would still apply. */ |
---|
4241 | char IMP_PutGmpInt(); |
---|
4242 | |
---|
4243 | int main() { |
---|
4244 | IMP_PutGmpInt() |
---|
4245 | ; return 0; } |
---|
4246 | EOF |
---|
4247 | if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4248 | rm -rf conftest* |
---|
4249 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
4250 | else |
---|
4251 | echo "configure: failed program was:" >&5 |
---|
4252 | cat conftest.$ac_ext >&5 |
---|
4253 | rm -rf conftest* |
---|
4254 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
4255 | fi |
---|
4256 | rm -f conftest* |
---|
4257 | LIBS="$ac_save_LIBS" |
---|
4258 | |
---|
4259 | fi |
---|
4260 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
4261 | echo "$ac_t""yes" 1>&6 |
---|
4262 | ac_tr_lib=HAVE_LIB`echo MP | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
4263 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
4264 | cat >> confdefs.h <<EOF |
---|
4265 | #define $ac_tr_lib 1 |
---|
4266 | EOF |
---|
4267 | |
---|
4268 | LIBS="-lMP $LIBS" |
---|
4269 | |
---|
4270 | else |
---|
4271 | echo "$ac_t""no" 1>&6 |
---|
4272 | fi |
---|
4273 | |
---|
4274 | echo $ac_n "checking for MPT_GetTree in -lMPT""... $ac_c" 1>&6 |
---|
4275 | echo "configure:4276: checking for MPT_GetTree in -lMPT" >&5 |
---|
4276 | ac_lib_var=`echo MPT'_'MPT_GetTree | sed 'y%./+-%__p_%'` |
---|
4277 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
4278 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4279 | else |
---|
4280 | ac_save_LIBS="$LIBS" |
---|
4281 | LIBS="-lMPT $LIBS" |
---|
4282 | cat > conftest.$ac_ext <<EOF |
---|
4283 | #line 4284 "configure" |
---|
4284 | #include "confdefs.h" |
---|
4285 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
4286 | /* We use char because int might match the return type of a gcc2 |
---|
4287 | builtin and then its argument prototype would still apply. */ |
---|
4288 | char MPT_GetTree(); |
---|
4289 | |
---|
4290 | int main() { |
---|
4291 | MPT_GetTree() |
---|
4292 | ; return 0; } |
---|
4293 | EOF |
---|
4294 | if { (eval echo configure:4295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4295 | rm -rf conftest* |
---|
4296 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
4297 | else |
---|
4298 | echo "configure: failed program was:" >&5 |
---|
4299 | cat conftest.$ac_ext >&5 |
---|
4300 | rm -rf conftest* |
---|
4301 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
4302 | fi |
---|
4303 | rm -f conftest* |
---|
4304 | LIBS="$ac_save_LIBS" |
---|
4305 | |
---|
4306 | fi |
---|
4307 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
4308 | echo "$ac_t""yes" 1>&6 |
---|
4309 | ac_tr_lib=HAVE_LIB`echo MPT | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
4310 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
4311 | cat >> confdefs.h <<EOF |
---|
4312 | #define $ac_tr_lib 1 |
---|
4313 | EOF |
---|
4314 | |
---|
4315 | LIBS="-lMPT $LIBS" |
---|
4316 | |
---|
4317 | else |
---|
4318 | echo "$ac_t""no" 1>&6 |
---|
4319 | fi |
---|
4320 | |
---|
4321 | echo $ac_n "checking for atof in -lsingcf""... $ac_c" 1>&6 |
---|
4322 | echo "configure:4323: checking for atof in -lsingcf" >&5 |
---|
4323 | ac_lib_var=`echo singcf'_'atof | sed 'y%./+-%__p_%'` |
---|
4324 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
4325 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4326 | else |
---|
4327 | ac_save_LIBS="$LIBS" |
---|
4328 | LIBS="-lsingcf $LIBS" |
---|
4329 | cat > conftest.$ac_ext <<EOF |
---|
4330 | #line 4331 "configure" |
---|
4331 | #include "confdefs.h" |
---|
4332 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
4333 | /* We use char because int might match the return type of a gcc2 |
---|
4334 | builtin and then its argument prototype would still apply. */ |
---|
4335 | char atof(); |
---|
4336 | |
---|
4337 | int main() { |
---|
4338 | atof() |
---|
4339 | ; return 0; } |
---|
4340 | EOF |
---|
4341 | if { (eval echo configure:4342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4342 | rm -rf conftest* |
---|
4343 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
4344 | else |
---|
4345 | echo "configure: failed program was:" >&5 |
---|
4346 | cat conftest.$ac_ext >&5 |
---|
4347 | rm -rf conftest* |
---|
4348 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
4349 | fi |
---|
4350 | rm -f conftest* |
---|
4351 | LIBS="$ac_save_LIBS" |
---|
4352 | |
---|
4353 | fi |
---|
4354 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
4355 | echo "$ac_t""yes" 1>&6 |
---|
4356 | ac_tr_lib=HAVE_LIB`echo singcf | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
4357 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
4358 | cat >> confdefs.h <<EOF |
---|
4359 | #define $ac_tr_lib 1 |
---|
4360 | EOF |
---|
4361 | |
---|
4362 | LIBS="-lsingcf $LIBS" |
---|
4363 | |
---|
4364 | else |
---|
4365 | echo "$ac_t""no" 1>&6 |
---|
4366 | fi |
---|
4367 | |
---|
4368 | echo $ac_n "checking for atof in -lsingfac""... $ac_c" 1>&6 |
---|
4369 | echo "configure:4370: checking for atof in -lsingfac" >&5 |
---|
4370 | ac_lib_var=`echo singfac'_'atof | sed 'y%./+-%__p_%'` |
---|
4371 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
4372 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4373 | else |
---|
4374 | ac_save_LIBS="$LIBS" |
---|
4375 | LIBS="-lsingfac $LIBS" |
---|
4376 | cat > conftest.$ac_ext <<EOF |
---|
4377 | #line 4378 "configure" |
---|
4378 | #include "confdefs.h" |
---|
4379 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
4380 | /* We use char because int might match the return type of a gcc2 |
---|
4381 | builtin and then its argument prototype would still apply. */ |
---|
4382 | char atof(); |
---|
4383 | |
---|
4384 | int main() { |
---|
4385 | atof() |
---|
4386 | ; return 0; } |
---|
4387 | EOF |
---|
4388 | if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4389 | rm -rf conftest* |
---|
4390 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
4391 | else |
---|
4392 | echo "configure: failed program was:" >&5 |
---|
4393 | cat conftest.$ac_ext >&5 |
---|
4394 | rm -rf conftest* |
---|
4395 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
4396 | fi |
---|
4397 | rm -f conftest* |
---|
4398 | LIBS="$ac_save_LIBS" |
---|
4399 | |
---|
4400 | fi |
---|
4401 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
4402 | echo "$ac_t""yes" 1>&6 |
---|
4403 | ac_tr_lib=HAVE_LIB`echo singfac | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
4404 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
4405 | cat >> confdefs.h <<EOF |
---|
4406 | #define $ac_tr_lib 1 |
---|
4407 | EOF |
---|
4408 | |
---|
4409 | LIBS="-lsingfac $LIBS" |
---|
4410 | |
---|
4411 | else |
---|
4412 | echo "$ac_t""no" 1>&6 |
---|
4413 | fi |
---|
4414 | |
---|
4415 | echo $ac_n "checking for omTestAddr in -lomalloc""... $ac_c" 1>&6 |
---|
4416 | echo "configure:4417: checking for omTestAddr in -lomalloc" >&5 |
---|
4417 | ac_lib_var=`echo omalloc'_'omTestAddr | sed 'y%./+-%__p_%'` |
---|
4418 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
4419 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4420 | else |
---|
4421 | ac_save_LIBS="$LIBS" |
---|
4422 | LIBS="-lomalloc $LIBS" |
---|
4423 | cat > conftest.$ac_ext <<EOF |
---|
4424 | #line 4425 "configure" |
---|
4425 | #include "confdefs.h" |
---|
4426 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
4427 | /* We use char because int might match the return type of a gcc2 |
---|
4428 | builtin and then its argument prototype would still apply. */ |
---|
4429 | char omTestAddr(); |
---|
4430 | |
---|
4431 | int main() { |
---|
4432 | omTestAddr() |
---|
4433 | ; return 0; } |
---|
4434 | EOF |
---|
4435 | if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4436 | rm -rf conftest* |
---|
4437 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
4438 | else |
---|
4439 | echo "configure: failed program was:" >&5 |
---|
4440 | cat conftest.$ac_ext >&5 |
---|
4441 | rm -rf conftest* |
---|
4442 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
4443 | fi |
---|
4444 | rm -f conftest* |
---|
4445 | LIBS="$ac_save_LIBS" |
---|
4446 | |
---|
4447 | fi |
---|
4448 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
4449 | echo "$ac_t""yes" 1>&6 |
---|
4450 | ac_tr_lib=HAVE_LIB`echo omalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
4451 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
4452 | cat >> confdefs.h <<EOF |
---|
4453 | #define $ac_tr_lib 1 |
---|
4454 | EOF |
---|
4455 | |
---|
4456 | LIBS="-lomalloc $LIBS" |
---|
4457 | |
---|
4458 | else |
---|
4459 | echo "$ac_t""no" 1>&6 |
---|
4460 | fi |
---|
4461 | |
---|
4462 | echo $ac_n "checking for main in -lomalloc_ndebug""... $ac_c" 1>&6 |
---|
4463 | echo "configure:4464: checking for main in -lomalloc_ndebug" >&5 |
---|
4464 | ac_lib_var=`echo omalloc_ndebug'_'main | sed 'y%./+-%__p_%'` |
---|
4465 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
4466 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4467 | else |
---|
4468 | ac_save_LIBS="$LIBS" |
---|
4469 | LIBS="-lomalloc_ndebug $LIBS" |
---|
4470 | cat > conftest.$ac_ext <<EOF |
---|
4471 | #line 4472 "configure" |
---|
4472 | #include "confdefs.h" |
---|
4473 | |
---|
4474 | int main() { |
---|
4475 | main() |
---|
4476 | ; return 0; } |
---|
4477 | EOF |
---|
4478 | if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4479 | rm -rf conftest* |
---|
4480 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
4481 | else |
---|
4482 | echo "configure: failed program was:" >&5 |
---|
4483 | cat conftest.$ac_ext >&5 |
---|
4484 | rm -rf conftest* |
---|
4485 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
4486 | fi |
---|
4487 | rm -f conftest* |
---|
4488 | LIBS="$ac_save_LIBS" |
---|
4489 | |
---|
4490 | fi |
---|
4491 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
4492 | echo "$ac_t""yes" 1>&6 |
---|
4493 | ac_tr_lib=HAVE_LIB`echo omalloc_ndebug | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
4494 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
4495 | cat >> confdefs.h <<EOF |
---|
4496 | #define $ac_tr_lib 1 |
---|
4497 | EOF |
---|
4498 | |
---|
4499 | LIBS="-lomalloc_ndebug $LIBS" |
---|
4500 | |
---|
4501 | else |
---|
4502 | echo "$ac_t""no" 1>&6 |
---|
4503 | fi |
---|
4504 | |
---|
4505 | |
---|
4506 | for ac_hdr in gmp.h smallgmp.h MP.h MPT.h factory.h factor.h omalloc.h omalloc.c |
---|
4507 | do |
---|
4508 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
---|
4509 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
---|
4510 | echo "configure:4511: checking for $ac_hdr" >&5 |
---|
4511 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
---|
4512 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4513 | else |
---|
4514 | cat > conftest.$ac_ext <<EOF |
---|
4515 | #line 4516 "configure" |
---|
4516 | #include "confdefs.h" |
---|
4517 | #include <$ac_hdr> |
---|
4518 | EOF |
---|
4519 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
---|
4520 | { (eval echo configure:4521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
---|
4521 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
---|
4522 | if test -z "$ac_err"; then |
---|
4523 | rm -rf conftest* |
---|
4524 | eval "ac_cv_header_$ac_safe=yes" |
---|
4525 | else |
---|
4526 | echo "$ac_err" >&5 |
---|
4527 | echo "configure: failed program was:" >&5 |
---|
4528 | cat conftest.$ac_ext >&5 |
---|
4529 | rm -rf conftest* |
---|
4530 | eval "ac_cv_header_$ac_safe=no" |
---|
4531 | fi |
---|
4532 | rm -f conftest* |
---|
4533 | fi |
---|
4534 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
---|
4535 | echo "$ac_t""yes" 1>&6 |
---|
4536 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
---|
4537 | cat >> confdefs.h <<EOF |
---|
4538 | #define $ac_tr_hdr 1 |
---|
4539 | EOF |
---|
4540 | |
---|
4541 | else |
---|
4542 | echo "$ac_t""no" 1>&6 |
---|
4543 | fi |
---|
4544 | done |
---|
4545 | |
---|
4546 | |
---|
4547 | if test "$ac_cv_lib_gmp_main" = yes && \ |
---|
4548 | test "$ac_cv_header_gmp_h" = yes; then |
---|
4549 | ac_gmp_ok=yes |
---|
4550 | fi |
---|
4551 | |
---|
4552 | if test "$ac_cv_lib_smallgmp_main" = yes && \ |
---|
4553 | test "$ac_cv_header_smallgmp_h" = yes && \ |
---|
4554 | test "$ac_cv_header_gmp_h" = yes; then |
---|
4555 | ac_smallgmp_ok=yes |
---|
4556 | fi |
---|
4557 | |
---|
4558 | if test "$ac_cv_lib_MP_IMP_PutGmpInt" = yes && \ |
---|
4559 | test "$ac_cv_lib_MPT_MPT_GetTree" && \ |
---|
4560 | test "$ac_cv_header_MP_h" = yes && \ |
---|
4561 | test "$ac_cv_header_MPT_h" = yes; then |
---|
4562 | ac_MP_ok=yes |
---|
4563 | fi |
---|
4564 | |
---|
4565 | if test "$ac_cv_lib_singcf_atof" = yes && \ |
---|
4566 | test "$ac_cv_header_factory_h" = yes; then |
---|
4567 | ac_factory_ok=yes |
---|
4568 | fi |
---|
4569 | |
---|
4570 | if test "$ac_cv_lib_singfac_atof" = yes && \ |
---|
4571 | test "$ac_cv_header_factor_h" = yes; then |
---|
4572 | ac_libfac_ok=yes |
---|
4573 | fi |
---|
4574 | |
---|
4575 | if test "$ac_cv_lib_omalloc_omTestAddr" = yes && \ |
---|
4576 | test "$ac_cv_lib_omalloc_ndebug_main" = yes && \ |
---|
4577 | test "$ac_cv_header_omalloc_c" = yes && \ |
---|
4578 | test "$ac_cv_header_omalloc_h" = yes; then |
---|
4579 | ac_cv_omalloc_ok=yes |
---|
4580 | fi |
---|
4581 | |
---|
4582 | |
---|
4583 | # evaluate results |
---|
4584 | if test "$ac_cv_omalloc_ok" != yes && test "$enable_omalloc" != yes; then |
---|
4585 | { echo "configure: error: can not build without omalloc" 1>&2; exit 1; } |
---|
4586 | fi |
---|
4587 | |
---|
4588 | echo $ac_n "checking which apint package to use""... $ac_c" 1>&6 |
---|
4589 | echo "configure:4590: checking which apint package to use" >&5 |
---|
4590 | if test "${with_apint}" != gmp && test "${with_apint}" != smallgmp; then |
---|
4591 | if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then |
---|
4592 | echo "$ac_t""gmp" 1>&6 |
---|
4593 | will_have_gmp=yes |
---|
4594 | NEED_LIBS="-lgmp ${NEED_LIBS}" |
---|
4595 | elif test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then |
---|
4596 | echo "$ac_t""smallgmp" 1>&6 |
---|
4597 | cat >> confdefs.h <<\EOF |
---|
4598 | #define HAVE_SMALLGMP 1 |
---|
4599 | EOF |
---|
4600 | |
---|
4601 | NEED_LIBS="-lsmallgmp ${NEED_LIBS}" |
---|
4602 | else |
---|
4603 | echo "$ac_t""none" 1>&6 |
---|
4604 | { echo "configure: error: can not build without gmp or smallgmp" 1>&2; exit 1; } |
---|
4605 | fi |
---|
4606 | elif test "${with_apint}" = gmp; then |
---|
4607 | if test "$ac_gmp_ok" = yes || test "$enable_gmp" = yes; then |
---|
4608 | echo "$ac_t""gmp" 1>&6 |
---|
4609 | will_have_gmp=yes |
---|
4610 | NEED_LIBS="-lgmp ${NEED_LIBS}" |
---|
4611 | else |
---|
4612 | echo "$ac_t""none" 1>&6 |
---|
4613 | { echo "configure: error: can not build with gmp" 1>&2; exit 1; } |
---|
4614 | fi |
---|
4615 | else |
---|
4616 | if test "ac_gmp_smallgmp_ok" = yes || test "$enable_smallgmp" = "yes"; then |
---|
4617 | echo "$ac_t""smallgmp" 1>&6 |
---|
4618 | cat >> confdefs.h <<\EOF |
---|
4619 | #define HAVE_SMALLGMP 1 |
---|
4620 | EOF |
---|
4621 | |
---|
4622 | NEED_LIBS="-lsmallgmp ${NEED_LIBS}" |
---|
4623 | else |
---|
4624 | echo "$ac_t""none" 1>&6 |
---|
4625 | { echo "configure: error: can not build with smallgmp" 1>&2; exit 1; } |
---|
4626 | fi |
---|
4627 | fi |
---|
4628 | |
---|
4629 | # |
---|
4630 | echo $ac_n "checking whether to have MP""... $ac_c" 1>&6 |
---|
4631 | echo "configure:4632: checking whether to have MP" >&5 |
---|
4632 | if test "${with_MP}" != yes && test "${with_MP}" != no; then |
---|
4633 | if (test "${will_have_gmp}" = yes) && \ |
---|
4634 | (test "$ac_MP_ok" = yes || test "$enable_MP" = yes); then |
---|
4635 | echo "$ac_t""yes" 1>&6 |
---|
4636 | cat >> confdefs.h <<\EOF |
---|
4637 | #define HAVE_MPSR 1 |
---|
4638 | EOF |
---|
4639 | |
---|
4640 | NEED_LIBS="-lMPT -lMP ${NEED_LIBS}" |
---|
4641 | else |
---|
4642 | echo "$ac_t""no" 1>&6 |
---|
4643 | fi |
---|
4644 | elif test "${with_MP}" = yes; then |
---|
4645 | if (test "${will_have_gmp}" = yes) && \ |
---|
4646 | (test "$ac_MP_ok" = yes || test "$enable_MP" = yes); then |
---|
4647 | echo "$ac_t""yes" 1>&6 |
---|
4648 | cat >> confdefs.h <<\EOF |
---|
4649 | #define HAVE_MPSR 1 |
---|
4650 | EOF |
---|
4651 | |
---|
4652 | NEED_LIBS="-lMPT -lMP ${NEED_LIBS}" |
---|
4653 | else |
---|
4654 | echo "$ac_t""no" 1>&6 |
---|
4655 | { echo "configure: error: can not build with MP" 1>&2; exit 1; } |
---|
4656 | fi |
---|
4657 | else |
---|
4658 | echo "$ac_t""no" 1>&6 |
---|
4659 | fi |
---|
4660 | |
---|
4661 | echo $ac_n "checking whether to have factory""... $ac_c" 1>&6 |
---|
4662 | echo "configure:4663: checking whether to have factory" >&5 |
---|
4663 | if test "${with_factory}" != yes && test "${with_factory}" != no; then |
---|
4664 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
4665 | echo "$ac_t""yes" 1>&6 |
---|
4666 | cat >> confdefs.h <<\EOF |
---|
4667 | #define HAVE_FACTORY 1 |
---|
4668 | EOF |
---|
4669 | |
---|
4670 | will_have_factory=yes |
---|
4671 | NEED_LIBS="-lsingcf ${NEED_LIBS}" |
---|
4672 | else |
---|
4673 | echo "$ac_t""no" 1>&6 |
---|
4674 | fi |
---|
4675 | elif test "${with_factory}" = yes; then |
---|
4676 | if test "$ac_factory_ok" = yes || test "$enable_factory" = yes; then |
---|
4677 | echo "$ac_t""yes" 1>&6 |
---|
4678 | cat >> confdefs.h <<\EOF |
---|
4679 | #define HAVE_FACTORY 1 |
---|
4680 | EOF |
---|
4681 | |
---|
4682 | will_have_factory=yes |
---|
4683 | NEED_LIBS="-lsingcf ${NEED_LIBS}" |
---|
4684 | else |
---|
4685 | echo "$ac_t""no" 1>&6 |
---|
4686 | { echo "configure: error: can not build with factory" 1>&2; exit 1; } |
---|
4687 | fi |
---|
4688 | else |
---|
4689 | echo "$ac_t""no" 1>&6 |
---|
4690 | fi |
---|
4691 | |
---|
4692 | echo $ac_n "checking whether to have libfac""... $ac_c" 1>&6 |
---|
4693 | echo "configure:4694: checking whether to have libfac" >&5 |
---|
4694 | if test "${with_libfac}" != yes && test "${with_libfac}" != no; then |
---|
4695 | if (test "${will_have_factory}" = yes) && \ |
---|
4696 | (test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes); then |
---|
4697 | echo "$ac_t""yes" 1>&6 |
---|
4698 | cat >> confdefs.h <<\EOF |
---|
4699 | #define HAVE_LIBFAC_P 1 |
---|
4700 | EOF |
---|
4701 | |
---|
4702 | NEED_LIBS="-lsingfac ${NEED_LIBS}" |
---|
4703 | else |
---|
4704 | echo "$ac_t""no" 1>&6 |
---|
4705 | fi |
---|
4706 | elif test "${with_libfac}" = yes; then |
---|
4707 | if (test "${will_have_factory}" = yes) && \ |
---|
4708 | (test "$ac_libfac_ok" = yes || test "$enable_libfac" = yes); then |
---|
4709 | echo "$ac_t""yes" 1>&6 |
---|
4710 | cat >> confdefs.h <<\EOF |
---|
4711 | #define HAVE_LIBFAC_P 1 |
---|
4712 | EOF |
---|
4713 | |
---|
4714 | NEED_LIBS="-lsingfac ${NEED_LIBS}" |
---|
4715 | else |
---|
4716 | echo "$ac_t""no" 1>&6 |
---|
4717 | { echo "configure: error: can not build with libfac" 1>&2; exit 1; } |
---|
4718 | fi |
---|
4719 | else |
---|
4720 | echo "$ac_t""no" 1>&6 |
---|
4721 | fi |
---|
4722 | |
---|
4723 | |
---|
4724 | |
---|
4725 | |
---|
4726 | echo $ac_n "checking whether to have dbm links""... $ac_c" 1>&6 |
---|
4727 | echo "configure:4728: checking whether to have dbm links" >&5 |
---|
4728 | if test "$with_dbm" != no; then |
---|
4729 | cat >> confdefs.h <<\EOF |
---|
4730 | #define HAVE_DBM 1 |
---|
4731 | EOF |
---|
4732 | |
---|
4733 | echo "$ac_t""yes" 1>&6 |
---|
4734 | else |
---|
4735 | echo "$ac_t""no" 1>&6 |
---|
4736 | fi |
---|
4737 | |
---|
4738 | echo $ac_n "checking whether to have namespaces""... $ac_c" 1>&6 |
---|
4739 | echo "configure:4740: checking whether to have namespaces" >&5 |
---|
4740 | if test "$with_namespaces" != yes; then |
---|
4741 | echo "$ac_t""no" 1>&6 |
---|
4742 | else |
---|
4743 | cat >> confdefs.h <<\EOF |
---|
4744 | #define HAVE_NAMESPACES 1 |
---|
4745 | EOF |
---|
4746 | |
---|
4747 | echo "$ac_t""yes" 1>&6 |
---|
4748 | fi |
---|
4749 | |
---|
4750 | echo $ac_n "checking whether to have dl lib""... $ac_c" 1>&6 |
---|
4751 | echo "configure:4752: checking whether to have dl lib" >&5 |
---|
4752 | |
---|
4753 | case "$ac_cv_singuname" in |
---|
4754 | HPUX-9) |
---|
4755 | echo "$ac_t""dld" 1>&6 |
---|
4756 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
---|
4757 | echo "configure:4758: checking for shl_load in -ldld" >&5 |
---|
4758 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
---|
4759 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
4760 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4761 | else |
---|
4762 | ac_save_LIBS="$LIBS" |
---|
4763 | LIBS="-ldld $LIBS" |
---|
4764 | cat > conftest.$ac_ext <<EOF |
---|
4765 | #line 4766 "configure" |
---|
4766 | #include "confdefs.h" |
---|
4767 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
4768 | /* We use char because int might match the return type of a gcc2 |
---|
4769 | builtin and then its argument prototype would still apply. */ |
---|
4770 | char shl_load(); |
---|
4771 | |
---|
4772 | int main() { |
---|
4773 | shl_load() |
---|
4774 | ; return 0; } |
---|
4775 | EOF |
---|
4776 | if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4777 | rm -rf conftest* |
---|
4778 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
4779 | else |
---|
4780 | echo "configure: failed program was:" >&5 |
---|
4781 | cat conftest.$ac_ext >&5 |
---|
4782 | rm -rf conftest* |
---|
4783 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
4784 | fi |
---|
4785 | rm -f conftest* |
---|
4786 | LIBS="$ac_save_LIBS" |
---|
4787 | |
---|
4788 | fi |
---|
4789 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
4790 | echo "$ac_t""yes" 1>&6 |
---|
4791 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
4792 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
4793 | cat >> confdefs.h <<EOF |
---|
4794 | #define $ac_tr_lib 1 |
---|
4795 | EOF |
---|
4796 | |
---|
4797 | LIBS="-ldld $LIBS" |
---|
4798 | |
---|
4799 | else |
---|
4800 | echo "$ac_t""no" 1>&6 |
---|
4801 | fi |
---|
4802 | |
---|
4803 | LD_DYN_FLAGS="-ldld -Xlinker -E" |
---|
4804 | cat >> confdefs.h <<\EOF |
---|
4805 | #define HAVE_DL 1 |
---|
4806 | EOF |
---|
4807 | |
---|
4808 | ;; |
---|
4809 | HPUX-10) |
---|
4810 | echo "$ac_t""dld" 1>&6 |
---|
4811 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
---|
4812 | echo "configure:4813: checking for shl_load in -ldld" >&5 |
---|
4813 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
---|
4814 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
4815 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4816 | else |
---|
4817 | ac_save_LIBS="$LIBS" |
---|
4818 | LIBS="-ldld $LIBS" |
---|
4819 | cat > conftest.$ac_ext <<EOF |
---|
4820 | #line 4821 "configure" |
---|
4821 | #include "confdefs.h" |
---|
4822 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
4823 | /* We use char because int might match the return type of a gcc2 |
---|
4824 | builtin and then its argument prototype would still apply. */ |
---|
4825 | char shl_load(); |
---|
4826 | |
---|
4827 | int main() { |
---|
4828 | shl_load() |
---|
4829 | ; return 0; } |
---|
4830 | EOF |
---|
4831 | if { (eval echo configure:4832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4832 | rm -rf conftest* |
---|
4833 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
4834 | else |
---|
4835 | echo "configure: failed program was:" >&5 |
---|
4836 | cat conftest.$ac_ext >&5 |
---|
4837 | rm -rf conftest* |
---|
4838 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
4839 | fi |
---|
4840 | rm -f conftest* |
---|
4841 | LIBS="$ac_save_LIBS" |
---|
4842 | |
---|
4843 | fi |
---|
4844 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
4845 | echo "$ac_t""yes" 1>&6 |
---|
4846 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
4847 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
4848 | cat >> confdefs.h <<EOF |
---|
4849 | #define $ac_tr_lib 1 |
---|
4850 | EOF |
---|
4851 | |
---|
4852 | LIBS="-ldld $LIBS" |
---|
4853 | |
---|
4854 | else |
---|
4855 | echo "$ac_t""no" 1>&6 |
---|
4856 | fi |
---|
4857 | |
---|
4858 | LD_DYN_FLAGS="-ldld -Xlinker -E" |
---|
4859 | cat >> confdefs.h <<\EOF |
---|
4860 | #define HAVE_DL 1 |
---|
4861 | EOF |
---|
4862 | |
---|
4863 | ;; |
---|
4864 | *Linux*) |
---|
4865 | echo "$ac_t""dl" 1>&6 |
---|
4866 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
---|
4867 | echo "configure:4868: checking for dlopen in -ldl" >&5 |
---|
4868 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
---|
4869 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
---|
4870 | echo $ac_n "(cached) $ac_c" 1>&6 |
---|
4871 | else |
---|
4872 | ac_save_LIBS="$LIBS" |
---|
4873 | LIBS="-ldl $LIBS" |
---|
4874 | cat > conftest.$ac_ext <<EOF |
---|
4875 | #line 4876 "configure" |
---|
4876 | #include "confdefs.h" |
---|
4877 | /* Override any gcc2 internal prototype to avoid an error. */ |
---|
4878 | /* We use char because int might match the return type of a gcc2 |
---|
4879 | builtin and then its argument prototype would still apply. */ |
---|
4880 | char dlopen(); |
---|
4881 | |
---|
4882 | int main() { |
---|
4883 | dlopen() |
---|
4884 | ; return 0; } |
---|
4885 | EOF |
---|
4886 | if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
---|
4887 | rm -rf conftest* |
---|
4888 | eval "ac_cv_lib_$ac_lib_var=yes" |
---|
4889 | else |
---|
4890 | echo "configure: failed program was:" >&5 |
---|
4891 | cat conftest.$ac_ext >&5 |
---|
4892 | rm -rf conftest* |
---|
4893 | eval "ac_cv_lib_$ac_lib_var=no" |
---|
4894 | fi |
---|
4895 | rm -f conftest* |
---|
4896 | LIBS="$ac_save_LIBS" |
---|
4897 | |
---|
4898 | fi |
---|
4899 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
---|
4900 | echo "$ac_t""yes" 1>&6 |
---|
4901 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
---|
4902 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
---|
4903 | cat >> confdefs.h <<EOF |
---|
4904 | #define $ac_tr_lib 1 |
---|
4905 | EOF |
---|
4906 | |
---|
4907 | LIBS="-ldl $LIBS" |
---|
4908 | |
---|
4909 | else |
---|
4910 | echo "$ac_t""no" 1>&6 |
---|
4911 | fi |
---|
4912 | |
---|
4913 | LD_DYN_FLAGS="-ldl -rdynamic" |
---|
4914 | cat >> confdefs.h <<\EOF |
---|
4915 | #define HAVE_DL 1 |
---|
4916 | EOF |
---|
4917 | |
---|
4918 | ;; |
---|
4919 | *) |
---|
4920 | echo "$ac_t""no" 1>&6 |
---|
4921 | ;; |
---|
4922 | esac |
---|
4923 | |
---|
4924 | echo $ac_n "checking whether to have dynamic loading""... $ac_c" 1>&6 |
---|
4925 | echo "configure:4926: checking whether to have dynamic loading" >&5 |
---|
4926 | if test "$with_dl" != yes; then |
---|
4927 | echo "$ac_t""no" 1>&6 |
---|
4928 | else |
---|
4929 | cat >> confdefs.h <<\EOF |
---|
4930 | #define HAVE_DYNAMIC_LOADING 1 |
---|
4931 | EOF |
---|
4932 | |
---|
4933 | echo "$ac_t""yes" 1>&6 |
---|
4934 | fi |
---|
4935 | |
---|
4936 | |
---|
4937 | |
---|
4938 | echo $ac_n "checking which exponent type to use""... $ac_c" 1>&6 |
---|
4939 | echo "configure:4940: checking which exponent type to use" >&5 |
---|
4940 | if test "$with_exp_type" = "char"; then |
---|
4941 | echo "$ac_t""char" 1>&6 |
---|
4942 | cat >> confdefs.h <<\EOF |
---|
4943 | #define EXPONENT_TYPE char |
---|
4944 | EOF |
---|
4945 | |
---|
4946 | cat >> confdefs.h <<\EOF |
---|
4947 | #define SIZEOF_EXPONENT SIZEOF_CHAR |
---|
4948 | EOF |
---|
4949 | |
---|
4950 | elif test "with_exp_type" = "int"; then |
---|
4951 | echo "$ac_t""int" 1>&6 |
---|
4952 | cat >> confdefs.h <<\EOF |
---|
4953 | #define EXPONENT_TYPE int |
---|
4954 | EOF |
---|
4955 | |
---|
4956 | cat >> confdefs.h <<\EOF |
---|
4957 | #define SIZEOF_EXPONENT SIZEOF_INT |
---|
4958 | EOF |
---|
4959 | |
---|
4960 | else |
---|
4961 | echo "$ac_t""short" 1>&6 |
---|
4962 | cat >> confdefs.h <<\EOF |
---|
4963 | #define EXPONENT_TYPE short |
---|
4964 | EOF |
---|
4965 | |
---|
4966 | cat >> confdefs.h <<\EOF |
---|
4967 | #define SIZEOF_TYPE SIZEOF_SHORT |
---|
4968 | EOF |
---|
4969 | |
---|
4970 | fi |
---|
4971 | |
---|
4972 | OUTPUT_MAKEFILES=Makefile |
---|
4973 | |
---|
4974 | if test "$ac_cv_singuname" = "ix86-Win"; then |
---|
4975 | OUTPUT_MAKEFILES="${OUTPUT_MAKEFILES} Singular.rc" |
---|
4976 | fi |
---|
4977 | |
---|
4978 | trap '' 1 2 15 |
---|
4979 | cat > confcache <<\EOF |
---|
4980 | # This file is a shell script that caches the results of configure |
---|
4981 | # tests run on this system so they can be shared between configure |
---|
4982 | # scripts and configure runs. It is not useful on other systems. |
---|
4983 | # If it contains results you don't want to keep, you may remove or edit it. |
---|
4984 | # |
---|
4985 | # By default, configure uses ./config.cache as the cache file, |
---|
4986 | # creating it if it does not exist already. You can give configure |
---|
4987 | # the --cache-file=FILE option to use a different cache file; that is |
---|
4988 | # what configure does when it calls configure scripts in |
---|
4989 | # subdirectories, so they share the cache. |
---|
4990 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
---|
4991 | # config.status only pays attention to the cache file if you give it the |
---|
4992 | # --recheck option to rerun configure. |
---|
4993 | # |
---|
4994 | EOF |
---|
4995 | # The following way of writing the cache mishandles newlines in values, |
---|
4996 | # but we know of no workaround that is simple, portable, and efficient. |
---|
4997 | # So, don't put newlines in cache variables' values. |
---|
4998 | # Ultrix sh set writes to stderr and can't be redirected directly, |
---|
4999 | # and sets the high bit in the cache file unless we assign to the vars. |
---|
5000 | (set) 2>&1 | |
---|
5001 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
---|
5002 | *ac_space=\ *) |
---|
5003 | # `set' does not quote correctly, so add quotes (double-quote substitution |
---|
5004 | # turns \\\\ into \\, and sed turns \\ into \). |
---|
5005 | sed -n \ |
---|
5006 | -e "s/'/'\\\\''/g" \ |
---|
5007 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
---|
5008 | ;; |
---|
5009 | *) |
---|
5010 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
---|
5011 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
---|
5012 | ;; |
---|
5013 | esac >> confcache |
---|
5014 | if cmp -s $cache_file confcache; then |
---|
5015 | : |
---|
5016 | else |
---|
5017 | if test -w $cache_file; then |
---|
5018 | echo "updating cache $cache_file" |
---|
5019 | cat confcache > $cache_file |
---|
5020 | else |
---|
5021 | echo "not updating unwritable cache $cache_file" |
---|
5022 | fi |
---|
5023 | fi |
---|
5024 | rm -f confcache |
---|
5025 | |
---|
5026 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
---|
5027 | |
---|
5028 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
---|
5029 | # Let make expand exec_prefix. |
---|
5030 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
---|
5031 | |
---|
5032 | # Any assignment to VPATH causes Sun make to only execute |
---|
5033 | # the first set of double-colon rules, so remove it if not needed. |
---|
5034 | # If there is a colon in the path, we need to keep it. |
---|
5035 | if test "x$srcdir" = x.; then |
---|
5036 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
---|
5037 | fi |
---|
5038 | |
---|
5039 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
---|
5040 | |
---|
5041 | DEFS=-DHAVE_CONFIG_H |
---|
5042 | |
---|
5043 | # Without the "./", some shells look in PATH for config.status. |
---|
5044 | : ${CONFIG_STATUS=./config.status} |
---|
5045 | |
---|
5046 | echo creating $CONFIG_STATUS |
---|
5047 | rm -f $CONFIG_STATUS |
---|
5048 | cat > $CONFIG_STATUS <<EOF |
---|
5049 | #! /bin/sh |
---|
5050 | # Generated automatically by configure. |
---|
5051 | # Run this file to recreate the current configuration. |
---|
5052 | # This directory was configured as follows, |
---|
5053 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
---|
5054 | # |
---|
5055 | # $0 $ac_configure_args |
---|
5056 | # |
---|
5057 | # Compiler output produced by configure, useful for debugging |
---|
5058 | # configure, is in ./config.log if it exists. |
---|
5059 | |
---|
5060 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
---|
5061 | for ac_option |
---|
5062 | do |
---|
5063 | case "\$ac_option" in |
---|
5064 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
---|
5065 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
---|
5066 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; |
---|
5067 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
---|
5068 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
---|
5069 | exit 0 ;; |
---|
5070 | -help | --help | --hel | --he | --h) |
---|
5071 | echo "\$ac_cs_usage"; exit 0 ;; |
---|
5072 | *) echo "\$ac_cs_usage"; exit 1 ;; |
---|
5073 | esac |
---|
5074 | done |
---|
5075 | |
---|
5076 | ac_given_srcdir=$srcdir |
---|
5077 | ac_given_INSTALL="$INSTALL" |
---|
5078 | |
---|
5079 | trap 'rm -fr `echo "${OUTPUT_MAKEFILES} mod2.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
---|
5080 | EOF |
---|
5081 | cat >> $CONFIG_STATUS <<EOF |
---|
5082 | |
---|
5083 | # Protect against being on the right side of a sed subst in config.status. |
---|
5084 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
---|
5085 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
---|
5086 | $ac_vpsub |
---|
5087 | $extrasub |
---|
5088 | s%@SHELL@%$SHELL%g |
---|
5089 | s%@CFLAGS@%$CFLAGS%g |
---|
5090 | s%@CPPFLAGS@%$CPPFLAGS%g |
---|
5091 | s%@CXXFLAGS@%$CXXFLAGS%g |
---|
5092 | s%@FFLAGS@%$FFLAGS%g |
---|
5093 | s%@DEFS@%$DEFS%g |
---|
5094 | s%@LDFLAGS@%$LDFLAGS%g |
---|
5095 | s%@LIBS@%$LIBS%g |
---|
5096 | s%@exec_prefix@%$exec_prefix%g |
---|
5097 | s%@prefix@%$prefix%g |
---|
5098 | s%@program_transform_name@%$program_transform_name%g |
---|
5099 | s%@bindir@%$bindir%g |
---|
5100 | s%@sbindir@%$sbindir%g |
---|
5101 | s%@libexecdir@%$libexecdir%g |
---|
5102 | s%@datadir@%$datadir%g |
---|
5103 | s%@sysconfdir@%$sysconfdir%g |
---|
5104 | s%@sharedstatedir@%$sharedstatedir%g |
---|
5105 | s%@localstatedir@%$localstatedir%g |
---|
5106 | s%@libdir@%$libdir%g |
---|
5107 | s%@includedir@%$includedir%g |
---|
5108 | s%@oldincludedir@%$oldincludedir%g |
---|
5109 | s%@infodir@%$infodir%g |
---|
5110 | s%@mandir@%$mandir%g |
---|
5111 | s%@SINGUNAME@%$SINGUNAME%g |
---|
5112 | s%@EXEC_EXT@%$EXEC_EXT%g |
---|
5113 | s%@SING_UNAME@%$SING_UNAME%g |
---|
5114 | s%@SINGULAR_VERSION@%$SINGULAR_VERSION%g |
---|
5115 | s%@VERSION_DATE@%$VERSION_DATE%g |
---|
5116 | s%@SINGULAR_MAJOR_VERSION@%$SINGULAR_MAJOR_VERSION%g |
---|
5117 | s%@SINGULAR_MINOR_VERSION@%$SINGULAR_MINOR_VERSION%g |
---|
5118 | s%@SINGULAR_SUB_VERSION@%$SINGULAR_SUB_VERSION%g |
---|
5119 | s%@CC@%$CC%g |
---|
5120 | s%@CPP@%$CPP%g |
---|
5121 | s%@CXX@%$CXX%g |
---|
5122 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
---|
5123 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
---|
5124 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
---|
5125 | s%@PIPE@%$PIPE%g |
---|
5126 | s%@CXXTEMPLFLAGS@%$CXXTEMPLFLAGS%g |
---|
5127 | s%@CXXNOOPTFLAGS@%$CXXNOOPTFLAGS%g |
---|
5128 | s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g |
---|
5129 | s%@SET_MAKE@%$SET_MAKE%g |
---|
5130 | s%@SINGULAR@%$SINGULAR%g |
---|
5131 | s%@LEX@%$LEX%g |
---|
5132 | s%@BISON@%$BISON%g |
---|
5133 | s%@LN_S@%$LN_S%g |
---|
5134 | s%@PERL@%$PERL%g |
---|
5135 | s%@ALLOCA@%$ALLOCA%g |
---|
5136 | s%@CXXCPP@%$CXXCPP%g |
---|
5137 | s%@NEED_LIBS@%$NEED_LIBS%g |
---|
5138 | s%@LD_DYN_FLAGS@%$LD_DYN_FLAGS%g |
---|
5139 | |
---|
5140 | CEOF |
---|
5141 | EOF |
---|
5142 | |
---|
5143 | cat >> $CONFIG_STATUS <<\EOF |
---|
5144 | |
---|
5145 | # Split the substitutions into bite-sized pieces for seds with |
---|
5146 | # small command number limits, like on Digital OSF/1 and HP-UX. |
---|
5147 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
---|
5148 | ac_file=1 # Number of current file. |
---|
5149 | ac_beg=1 # First line for current file. |
---|
5150 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
---|
5151 | ac_more_lines=: |
---|
5152 | ac_sed_cmds="" |
---|
5153 | while $ac_more_lines; do |
---|
5154 | if test $ac_beg -gt 1; then |
---|
5155 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
---|
5156 | else |
---|
5157 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
---|
5158 | fi |
---|
5159 | if test ! -s conftest.s$ac_file; then |
---|
5160 | ac_more_lines=false |
---|
5161 | rm -f conftest.s$ac_file |
---|
5162 | else |
---|
5163 | if test -z "$ac_sed_cmds"; then |
---|
5164 | ac_sed_cmds="sed -f conftest.s$ac_file" |
---|
5165 | else |
---|
5166 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
---|
5167 | fi |
---|
5168 | ac_file=`expr $ac_file + 1` |
---|
5169 | ac_beg=$ac_end |
---|
5170 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
---|
5171 | fi |
---|
5172 | done |
---|
5173 | if test -z "$ac_sed_cmds"; then |
---|
5174 | ac_sed_cmds=cat |
---|
5175 | fi |
---|
5176 | EOF |
---|
5177 | |
---|
5178 | cat >> $CONFIG_STATUS <<EOF |
---|
5179 | |
---|
5180 | CONFIG_FILES=\${CONFIG_FILES-"${OUTPUT_MAKEFILES}"} |
---|
5181 | EOF |
---|
5182 | cat >> $CONFIG_STATUS <<\EOF |
---|
5183 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then |
---|
5184 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
---|
5185 | case "$ac_file" in |
---|
5186 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
---|
5187 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
---|
5188 | *) ac_file_in="${ac_file}.in" ;; |
---|
5189 | esac |
---|
5190 | |
---|
5191 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
---|
5192 | |
---|
5193 | # Remove last slash and all that follows it. Not all systems have dirname. |
---|
5194 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
---|
5195 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
---|
5196 | # The file is in a subdirectory. |
---|
5197 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
---|
5198 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
---|
5199 | # A "../" for each directory in $ac_dir_suffix. |
---|
5200 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
---|
5201 | else |
---|
5202 | ac_dir_suffix= ac_dots= |
---|
5203 | fi |
---|
5204 | |
---|
5205 | case "$ac_given_srcdir" in |
---|
5206 | .) srcdir=. |
---|
5207 | if test -z "$ac_dots"; then top_srcdir=. |
---|
5208 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
---|
5209 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
---|
5210 | *) # Relative path. |
---|
5211 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
---|
5212 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
---|
5213 | esac |
---|
5214 | |
---|
5215 | case "$ac_given_INSTALL" in |
---|
5216 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
---|
5217 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
---|
5218 | esac |
---|
5219 | |
---|
5220 | echo creating "$ac_file" |
---|
5221 | rm -f "$ac_file" |
---|
5222 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
---|
5223 | case "$ac_file" in |
---|
5224 | *Makefile*) ac_comsub="1i\\ |
---|
5225 | # $configure_input" ;; |
---|
5226 | *) ac_comsub= ;; |
---|
5227 | esac |
---|
5228 | |
---|
5229 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
---|
5230 | sed -e "$ac_comsub |
---|
5231 | s%@configure_input@%$configure_input%g |
---|
5232 | s%@srcdir@%$srcdir%g |
---|
5233 | s%@top_srcdir@%$top_srcdir%g |
---|
5234 | s%@INSTALL@%$INSTALL%g |
---|
5235 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
---|
5236 | fi; done |
---|
5237 | rm -f conftest.s* |
---|
5238 | |
---|
5239 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
---|
5240 | # NAME is the cpp macro being defined and VALUE is the value it is being given. |
---|
5241 | # |
---|
5242 | # ac_d sets the value in "#define NAME VALUE" lines. |
---|
5243 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
---|
5244 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
---|
5245 | ac_dC='\3' |
---|
5246 | ac_dD='%g' |
---|
5247 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". |
---|
5248 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
---|
5249 | ac_uB='\([ ]\)%\1#\2define\3' |
---|
5250 | ac_uC=' ' |
---|
5251 | ac_uD='\4%g' |
---|
5252 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". |
---|
5253 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
---|
5254 | ac_eB='$%\1#\2define\3' |
---|
5255 | ac_eC=' ' |
---|
5256 | ac_eD='%g' |
---|
5257 | |
---|
5258 | if test "${CONFIG_HEADERS+set}" != set; then |
---|
5259 | EOF |
---|
5260 | cat >> $CONFIG_STATUS <<EOF |
---|
5261 | CONFIG_HEADERS="mod2.h" |
---|
5262 | EOF |
---|
5263 | cat >> $CONFIG_STATUS <<\EOF |
---|
5264 | fi |
---|
5265 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
---|
5266 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
---|
5267 | case "$ac_file" in |
---|
5268 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
---|
5269 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
---|
5270 | *) ac_file_in="${ac_file}.in" ;; |
---|
5271 | esac |
---|
5272 | |
---|
5273 | echo creating $ac_file |
---|
5274 | |
---|
5275 | rm -f conftest.frag conftest.in conftest.out |
---|
5276 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
---|
5277 | cat $ac_file_inputs > conftest.in |
---|
5278 | |
---|
5279 | EOF |
---|
5280 | |
---|
5281 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
---|
5282 | # the proper values into config.h.in to produce config.h. And first: |
---|
5283 | # Protect against being on the right side of a sed subst in config.status. |
---|
5284 | # Protect against being in an unquoted here document in config.status. |
---|
5285 | rm -f conftest.vals |
---|
5286 | cat > conftest.hdr <<\EOF |
---|
5287 | s/[\\&%]/\\&/g |
---|
5288 | s%[\\$`]%\\&%g |
---|
5289 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
---|
5290 | s%ac_d%ac_u%gp |
---|
5291 | s%ac_u%ac_e%gp |
---|
5292 | EOF |
---|
5293 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
---|
5294 | rm -f conftest.hdr |
---|
5295 | |
---|
5296 | # This sed command replaces #undef with comments. This is necessary, for |
---|
5297 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
---|
5298 | # on some systems where configure will not decide to define it. |
---|
5299 | cat >> conftest.vals <<\EOF |
---|
5300 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
---|
5301 | EOF |
---|
5302 | |
---|
5303 | # Break up conftest.vals because some shells have a limit on |
---|
5304 | # the size of here documents, and old seds have small limits too. |
---|
5305 | |
---|
5306 | rm -f conftest.tail |
---|
5307 | while : |
---|
5308 | do |
---|
5309 | ac_lines=`grep -c . conftest.vals` |
---|
5310 | # grep -c gives empty output for an empty file on some AIX systems. |
---|
5311 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
---|
5312 | # Write a limited-size here document to conftest.frag. |
---|
5313 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
---|
5314 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
---|
5315 | echo 'CEOF |
---|
5316 | sed -f conftest.frag conftest.in > conftest.out |
---|
5317 | rm -f conftest.in |
---|
5318 | mv conftest.out conftest.in |
---|
5319 | ' >> $CONFIG_STATUS |
---|
5320 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
---|
5321 | rm -f conftest.vals |
---|
5322 | mv conftest.tail conftest.vals |
---|
5323 | done |
---|
5324 | rm -f conftest.vals |
---|
5325 | |
---|
5326 | cat >> $CONFIG_STATUS <<\EOF |
---|
5327 | rm -f conftest.frag conftest.h |
---|
5328 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
---|
5329 | cat conftest.in >> conftest.h |
---|
5330 | rm -f conftest.in |
---|
5331 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
---|
5332 | echo "$ac_file is unchanged" |
---|
5333 | rm -f conftest.h |
---|
5334 | else |
---|
5335 | # Remove last slash and all that follows it. Not all systems have dirname. |
---|
5336 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
---|
5337 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
---|
5338 | # The file is in a subdirectory. |
---|
5339 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
---|
5340 | fi |
---|
5341 | rm -f $ac_file |
---|
5342 | mv conftest.h $ac_file |
---|
5343 | fi |
---|
5344 | fi; done |
---|
5345 | |
---|
5346 | EOF |
---|
5347 | cat >> $CONFIG_STATUS <<EOF |
---|
5348 | |
---|
5349 | EOF |
---|
5350 | cat >> $CONFIG_STATUS <<\EOF |
---|
5351 | \ |
---|
5352 | if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi |
---|
5353 | exit 0 |
---|
5354 | EOF |
---|
5355 | chmod +x $CONFIG_STATUS |
---|
5356 | rm -fr confdefs* $ac_clean_files |
---|
5357 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 |
---|
5358 | |
---|