bringing SDL 1.2.14 from vendor into the main branch
[AROS-Contrib.git] / regina / configure
blobb88ac7283051f8bf7031e793f097353443ba5bce
1 #! /bin/sh
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.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr
15 ac_help="$ac_help
16 --enable-debug turn on debugging"
17 ac_help="$ac_help
18 --enable-purify link with Purify (TM)"
19 ac_help="$ac_help
20 --enable-posix-threads enable POSIX-style multi-threading"
21 ac_help="$ac_help
22 --enable-tracemem enable memory tracing in debug mode"
23 ac_help="$ac_help
24 --disable-flists disable memory management functions"
25 ac_help="$ac_help
26 --with-socket=9999 socket to use for external queues (default 5757)"
27 ac_help="$ac_help
28 --with-dlfcnincdir location of dlfcn.h"
29 ac_help="$ac_help
30 --with-dlfcnlibdir location of libdl.a(AIX) libdl.dylib(MacOSX)"
32 # Initialize some variables set by options.
33 # The variables have the same names as the options, with
34 # dashes changed to underlines.
35 build=NONE
36 cache_file=./config.cache
37 exec_prefix=NONE
38 host=NONE
39 no_create=
40 nonopt=NONE
41 no_recursion=
42 prefix=NONE
43 program_prefix=NONE
44 program_suffix=NONE
45 program_transform_name=s,x,x,
46 silent=
47 site=
48 srcdir=
49 target=NONE
50 verbose=
51 x_includes=NONE
52 x_libraries=NONE
53 bindir='${exec_prefix}/bin'
54 sbindir='${exec_prefix}/sbin'
55 libexecdir='${exec_prefix}/libexec'
56 datadir='${prefix}/share'
57 sysconfdir='${prefix}/etc'
58 sharedstatedir='${prefix}/com'
59 localstatedir='${prefix}/var'
60 libdir='${exec_prefix}/lib'
61 includedir='${prefix}/include'
62 oldincludedir='/usr/include'
63 infodir='${prefix}/info'
64 mandir='${prefix}/man'
66 # Initialize some other variables.
67 subdirs=
68 MFLAGS= MAKEFLAGS=
69 SHELL=${CONFIG_SHELL-/bin/sh}
70 # Maximum number of lines to put in a shell here document.
71 ac_max_here_lines=12
73 ac_prev=
74 for ac_option
77 # If the previous option needs an argument, assign it.
78 if test -n "$ac_prev"; then
79 eval "$ac_prev=\$ac_option"
80 ac_prev=
81 continue
84 case "$ac_option" in
85 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
86 *) ac_optarg= ;;
87 esac
89 # Accept the important Cygnus configure options, so we can diagnose typos.
91 case "$ac_option" in
93 -bindir | --bindir | --bindi | --bind | --bin | --bi)
94 ac_prev=bindir ;;
95 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
96 bindir="$ac_optarg" ;;
98 -build | --build | --buil | --bui | --bu)
99 ac_prev=build ;;
100 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
101 build="$ac_optarg" ;;
103 -cache-file | --cache-file | --cache-fil | --cache-fi \
104 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
105 ac_prev=cache_file ;;
106 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
107 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
108 cache_file="$ac_optarg" ;;
110 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
111 ac_prev=datadir ;;
112 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
113 | --da=*)
114 datadir="$ac_optarg" ;;
116 -disable-* | --disable-*)
117 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
118 # Reject names that are not valid shell variable names.
119 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
120 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
122 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123 eval "enable_${ac_feature}=no" ;;
125 -enable-* | --enable-*)
126 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
127 # Reject names that are not valid shell variable names.
128 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
129 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
131 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132 case "$ac_option" in
133 *=*) ;;
134 *) ac_optarg=yes ;;
135 esac
136 eval "enable_${ac_feature}='$ac_optarg'" ;;
138 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
139 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
140 | --exec | --exe | --ex)
141 ac_prev=exec_prefix ;;
142 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
143 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
144 | --exec=* | --exe=* | --ex=*)
145 exec_prefix="$ac_optarg" ;;
147 -gas | --gas | --ga | --g)
148 # Obsolete; use --with-gas.
149 with_gas=yes ;;
151 -help | --help | --hel | --he)
152 # Omit some internal or obsolete options to make the list less imposing.
153 # This message is too long to be a string in the A/UX 3.1 sh.
154 cat << EOF
155 Usage: configure [options] [host]
156 Options: [defaults in brackets after descriptions]
157 Configuration:
158 --cache-file=FILE cache test results in FILE
159 --help print this message
160 --no-create do not create output files
161 --quiet, --silent do not print \`checking...' messages
162 --version print the version of autoconf that created configure
163 Directory and file names:
164 --prefix=PREFIX install architecture-independent files in PREFIX
165 [$ac_default_prefix]
166 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
167 [same as prefix]
168 --bindir=DIR user executables in DIR [EPREFIX/bin]
169 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
170 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
171 --datadir=DIR read-only architecture-independent data in DIR
172 [PREFIX/share]
173 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
174 --sharedstatedir=DIR modifiable architecture-independent data in DIR
175 [PREFIX/com]
176 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
177 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
178 --includedir=DIR C header files in DIR [PREFIX/include]
179 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
180 --infodir=DIR info documentation in DIR [PREFIX/info]
181 --mandir=DIR man documentation in DIR [PREFIX/man]
182 --srcdir=DIR find the sources in DIR [configure dir or ..]
183 --program-prefix=PREFIX prepend PREFIX to installed program names
184 --program-suffix=SUFFIX append SUFFIX to installed program names
185 --program-transform-name=PROGRAM
186 run sed PROGRAM on installed program names
188 cat << EOF
189 Host type:
190 --build=BUILD configure for building on BUILD [BUILD=HOST]
191 --host=HOST configure for HOST [guessed]
192 --target=TARGET configure for TARGET [TARGET=HOST]
193 Features and packages:
194 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
195 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
196 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
197 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
198 --x-includes=DIR X include files are in DIR
199 --x-libraries=DIR X library files are in DIR
201 if test -n "$ac_help"; then
202 echo "--enable and --with options recognized:$ac_help"
204 exit 0 ;;
206 -host | --host | --hos | --ho)
207 ac_prev=host ;;
208 -host=* | --host=* | --hos=* | --ho=*)
209 host="$ac_optarg" ;;
211 -includedir | --includedir | --includedi | --included | --include \
212 | --includ | --inclu | --incl | --inc)
213 ac_prev=includedir ;;
214 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
215 | --includ=* | --inclu=* | --incl=* | --inc=*)
216 includedir="$ac_optarg" ;;
218 -infodir | --infodir | --infodi | --infod | --info | --inf)
219 ac_prev=infodir ;;
220 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
221 infodir="$ac_optarg" ;;
223 -libdir | --libdir | --libdi | --libd)
224 ac_prev=libdir ;;
225 -libdir=* | --libdir=* | --libdi=* | --libd=*)
226 libdir="$ac_optarg" ;;
228 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
229 | --libexe | --libex | --libe)
230 ac_prev=libexecdir ;;
231 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
232 | --libexe=* | --libex=* | --libe=*)
233 libexecdir="$ac_optarg" ;;
235 -localstatedir | --localstatedir | --localstatedi | --localstated \
236 | --localstate | --localstat | --localsta | --localst \
237 | --locals | --local | --loca | --loc | --lo)
238 ac_prev=localstatedir ;;
239 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
240 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
241 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
242 localstatedir="$ac_optarg" ;;
244 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
245 ac_prev=mandir ;;
246 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
247 mandir="$ac_optarg" ;;
249 -nfp | --nfp | --nf)
250 # Obsolete; use --without-fp.
251 with_fp=no ;;
253 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
254 | --no-cr | --no-c)
255 no_create=yes ;;
257 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
258 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
259 no_recursion=yes ;;
261 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
262 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
263 | --oldin | --oldi | --old | --ol | --o)
264 ac_prev=oldincludedir ;;
265 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
266 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
267 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
268 oldincludedir="$ac_optarg" ;;
270 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
271 ac_prev=prefix ;;
272 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
273 prefix="$ac_optarg" ;;
275 -program-prefix | --program-prefix | --program-prefi | --program-pref \
276 | --program-pre | --program-pr | --program-p)
277 ac_prev=program_prefix ;;
278 -program-prefix=* | --program-prefix=* | --program-prefi=* \
279 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
280 program_prefix="$ac_optarg" ;;
282 -program-suffix | --program-suffix | --program-suffi | --program-suff \
283 | --program-suf | --program-su | --program-s)
284 ac_prev=program_suffix ;;
285 -program-suffix=* | --program-suffix=* | --program-suffi=* \
286 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
287 program_suffix="$ac_optarg" ;;
289 -program-transform-name | --program-transform-name \
290 | --program-transform-nam | --program-transform-na \
291 | --program-transform-n | --program-transform- \
292 | --program-transform | --program-transfor \
293 | --program-transfo | --program-transf \
294 | --program-trans | --program-tran \
295 | --progr-tra | --program-tr | --program-t)
296 ac_prev=program_transform_name ;;
297 -program-transform-name=* | --program-transform-name=* \
298 | --program-transform-nam=* | --program-transform-na=* \
299 | --program-transform-n=* | --program-transform-=* \
300 | --program-transform=* | --program-transfor=* \
301 | --program-transfo=* | --program-transf=* \
302 | --program-trans=* | --program-tran=* \
303 | --progr-tra=* | --program-tr=* | --program-t=*)
304 program_transform_name="$ac_optarg" ;;
306 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
307 | -silent | --silent | --silen | --sile | --sil)
308 silent=yes ;;
310 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
311 ac_prev=sbindir ;;
312 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
313 | --sbi=* | --sb=*)
314 sbindir="$ac_optarg" ;;
316 -sharedstatedir | --sharedstatedir | --sharedstatedi \
317 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
318 | --sharedst | --shareds | --shared | --share | --shar \
319 | --sha | --sh)
320 ac_prev=sharedstatedir ;;
321 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
322 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
323 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
324 | --sha=* | --sh=*)
325 sharedstatedir="$ac_optarg" ;;
327 -site | --site | --sit)
328 ac_prev=site ;;
329 -site=* | --site=* | --sit=*)
330 site="$ac_optarg" ;;
332 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
333 ac_prev=srcdir ;;
334 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
335 srcdir="$ac_optarg" ;;
337 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
338 | --syscon | --sysco | --sysc | --sys | --sy)
339 ac_prev=sysconfdir ;;
340 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
341 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
342 sysconfdir="$ac_optarg" ;;
344 -target | --target | --targe | --targ | --tar | --ta | --t)
345 ac_prev=target ;;
346 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
347 target="$ac_optarg" ;;
349 -v | -verbose | --verbose | --verbos | --verbo | --verb)
350 verbose=yes ;;
352 -version | --version | --versio | --versi | --vers)
353 echo "configure generated by autoconf version 2.13"
354 exit 0 ;;
356 -with-* | --with-*)
357 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
358 # Reject names that are not valid shell variable names.
359 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
360 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362 ac_package=`echo $ac_package| sed 's/-/_/g'`
363 case "$ac_option" in
364 *=*) ;;
365 *) ac_optarg=yes ;;
366 esac
367 eval "with_${ac_package}='$ac_optarg'" ;;
369 -without-* | --without-*)
370 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
371 # Reject names that are not valid shell variable names.
372 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
373 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
375 ac_package=`echo $ac_package| sed 's/-/_/g'`
376 eval "with_${ac_package}=no" ;;
378 --x)
379 # Obsolete; use --with-x.
380 with_x=yes ;;
382 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
383 | --x-incl | --x-inc | --x-in | --x-i)
384 ac_prev=x_includes ;;
385 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
386 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
387 x_includes="$ac_optarg" ;;
389 -x-libraries | --x-libraries | --x-librarie | --x-librari \
390 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
391 ac_prev=x_libraries ;;
392 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
393 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
394 x_libraries="$ac_optarg" ;;
396 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
400 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
401 echo "configure: warning: $ac_option: invalid host type" 1>&2
403 if test "x$nonopt" != xNONE; then
404 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
406 nonopt="$ac_option"
409 esac
410 done
412 if test -n "$ac_prev"; then
413 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
416 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
418 # File descriptor usage:
419 # 0 standard input
420 # 1 file creation
421 # 2 errors and warnings
422 # 3 some systems may open it to /dev/tty
423 # 4 used on the Kubota Titan
424 # 6 checking for... messages and results
425 # 5 compiler messages saved in config.log
426 if test "$silent" = yes; then
427 exec 6>/dev/null
428 else
429 exec 6>&1
431 exec 5>./config.log
433 echo "\
434 This file contains any messages produced by compilers while
435 running configure, to aid debugging if configure makes a mistake.
436 " 1>&5
438 # Strip out --no-create and --no-recursion so they do not pile up.
439 # Also quote any args containing shell metacharacters.
440 ac_configure_args=
441 for ac_arg
443 case "$ac_arg" in
444 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
445 | --no-cr | --no-c) ;;
446 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
447 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
448 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
449 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
450 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
451 esac
452 done
454 # NLS nuisances.
455 # Only set these to C if already set. These must not be set unconditionally
456 # because not all systems understand e.g. LANG=C (notably SCO).
457 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
458 # Non-C LC_CTYPE values break the ctype check.
459 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
460 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
461 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
462 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
464 # confdefs.h avoids OS command line length limits that DEFS can exceed.
465 rm -rf conftest* confdefs.h
466 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
467 echo > confdefs.h
469 # A filename unique to this package, relative to the directory that
470 # configure is in, which we can look for to find out if srcdir is correct.
471 ac_unique_file=rexxsaa.h
473 # Find the source files, if location was not specified.
474 if test -z "$srcdir"; then
475 ac_srcdir_defaulted=yes
476 # Try the directory containing this script, then its parent.
477 ac_prog=$0
478 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
479 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
480 srcdir=$ac_confdir
481 if test ! -r $srcdir/$ac_unique_file; then
482 srcdir=..
484 else
485 ac_srcdir_defaulted=no
487 if test ! -r $srcdir/$ac_unique_file; then
488 if test "$ac_srcdir_defaulted" = yes; then
489 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
490 else
491 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
494 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
496 # Prefer explicitly selected file to automatically selected ones.
497 if test -z "$CONFIG_SITE"; then
498 if test "x$prefix" != xNONE; then
499 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
500 else
501 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
504 for ac_site_file in $CONFIG_SITE; do
505 if test -r "$ac_site_file"; then
506 echo "loading site script $ac_site_file"
507 . "$ac_site_file"
509 done
511 if test -r "$cache_file"; then
512 echo "loading cache $cache_file"
513 . $cache_file
514 else
515 echo "creating cache $cache_file"
516 > $cache_file
519 ac_ext=c
520 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
521 ac_cpp='$CPP $CPPFLAGS'
522 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
523 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
524 cross_compiling=$ac_cv_prog_cc_cross
526 ac_exeext=
527 ac_objext=o
528 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
529 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
530 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
531 ac_n= ac_c='
532 ' ac_t=' '
533 else
534 ac_n=-n ac_c= ac_t=
536 else
537 ac_n= ac_c='\c' ac_t=
543 VERSION=3.0
544 VERSION_NODOT=30
546 CC_LIST="gcc cc c89 acc"
548 mh_sysv_incdir=""
549 mh_sysv_libdir=""
550 all_words="$CC_LIST"
551 ac_dir=""
552 echo $ac_n "checking for one of the following C compilers: $all_words""... $ac_c" 1>&6
553 echo "configure:554: checking for one of the following C compilers: $all_words" >&5
554 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
555 echo $ac_n "(cached) $ac_c" 1>&6
556 else
558 if test -n "$CC"; then
559 ac_cv_prog_CC="$CC" # Let the user override the test.
560 else
561 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
562 for mh_cc in $all_words; do
563 for ac_dir in $PATH; do
564 test -z "$ac_dir" && ac_dir=.
565 if test -f $ac_dir/$mh_cc; then
566 ac_cv_prog_CC="$mh_cc"
567 if test "$ac_dir" = "/usr/5bin"; then
568 mh_sysv_incdir="/usr/5include"
569 mh_sysv_libdir="/usr/5lib"
571 break 2
573 done
574 done
575 IFS="$ac_save_ifs"
576 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
578 CC="$ac_cv_prog_CC"
583 if test "$ac_dir" = ""; then
584 echo "$ac_t""using $ac_cv_prog_CC specified in CC env variable" 1>&6
585 else
586 echo "$ac_t""using $ac_dir/$ac_cv_prog_CC" 1>&6
591 # Extract the first word of "gcc", so it can be a program name with args.
592 set dummy gcc; ac_word=$2
593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
594 echo "configure:595: checking for $ac_word" >&5
595 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
596 echo $ac_n "(cached) $ac_c" 1>&6
597 else
598 if test -n "$CC"; then
599 ac_cv_prog_CC="$CC" # Let the user override the test.
600 else
601 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
602 ac_dummy="$PATH"
603 for ac_dir in $ac_dummy; do
604 test -z "$ac_dir" && ac_dir=.
605 if test -f $ac_dir/$ac_word; then
606 ac_cv_prog_CC="gcc"
607 break
609 done
610 IFS="$ac_save_ifs"
613 CC="$ac_cv_prog_CC"
614 if test -n "$CC"; then
615 echo "$ac_t""$CC" 1>&6
616 else
617 echo "$ac_t""no" 1>&6
620 if test -z "$CC"; then
621 # Extract the first word of "cc", so it can be a program name with args.
622 set dummy cc; ac_word=$2
623 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
624 echo "configure:625: checking for $ac_word" >&5
625 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
626 echo $ac_n "(cached) $ac_c" 1>&6
627 else
628 if test -n "$CC"; then
629 ac_cv_prog_CC="$CC" # Let the user override the test.
630 else
631 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
632 ac_prog_rejected=no
633 ac_dummy="$PATH"
634 for ac_dir in $ac_dummy; do
635 test -z "$ac_dir" && ac_dir=.
636 if test -f $ac_dir/$ac_word; then
637 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
638 ac_prog_rejected=yes
639 continue
641 ac_cv_prog_CC="cc"
642 break
644 done
645 IFS="$ac_save_ifs"
646 if test $ac_prog_rejected = yes; then
647 # We found a bogon in the path, so make sure we never use it.
648 set dummy $ac_cv_prog_CC
649 shift
650 if test $# -gt 0; then
651 # We chose a different compiler from the bogus one.
652 # However, it has the same basename, so the bogon will be chosen
653 # first if we set CC to just the basename; use the full file name.
654 shift
655 set dummy "$ac_dir/$ac_word" "$@"
656 shift
657 ac_cv_prog_CC="$@"
662 CC="$ac_cv_prog_CC"
663 if test -n "$CC"; then
664 echo "$ac_t""$CC" 1>&6
665 else
666 echo "$ac_t""no" 1>&6
669 if test -z "$CC"; then
670 case "`uname -s`" in
671 *win32* | *WIN32*)
672 # Extract the first word of "cl", so it can be a program name with args.
673 set dummy cl; ac_word=$2
674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
675 echo "configure:676: checking for $ac_word" >&5
676 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
677 echo $ac_n "(cached) $ac_c" 1>&6
678 else
679 if test -n "$CC"; then
680 ac_cv_prog_CC="$CC" # Let the user override the test.
681 else
682 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
683 ac_dummy="$PATH"
684 for ac_dir in $ac_dummy; do
685 test -z "$ac_dir" && ac_dir=.
686 if test -f $ac_dir/$ac_word; then
687 ac_cv_prog_CC="cl"
688 break
690 done
691 IFS="$ac_save_ifs"
694 CC="$ac_cv_prog_CC"
695 if test -n "$CC"; then
696 echo "$ac_t""$CC" 1>&6
697 else
698 echo "$ac_t""no" 1>&6
701 esac
703 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
706 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
707 echo "configure:708: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
709 ac_ext=c
710 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
711 ac_cpp='$CPP $CPPFLAGS'
712 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
713 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
714 cross_compiling=$ac_cv_prog_cc_cross
716 cat > conftest.$ac_ext << EOF
718 #line 719 "configure"
719 #include "confdefs.h"
721 main(){return(0);}
723 if { (eval echo configure:724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
724 ac_cv_prog_cc_works=yes
725 # If we can't run a trivial program, we are probably using a cross compiler.
726 if (./conftest; exit) 2>/dev/null; then
727 ac_cv_prog_cc_cross=no
728 else
729 ac_cv_prog_cc_cross=yes
731 else
732 echo "configure: failed program was:" >&5
733 cat conftest.$ac_ext >&5
734 ac_cv_prog_cc_works=no
736 rm -fr conftest*
737 ac_ext=c
738 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
739 ac_cpp='$CPP $CPPFLAGS'
740 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
741 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
742 cross_compiling=$ac_cv_prog_cc_cross
744 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
745 if test $ac_cv_prog_cc_works = no; then
746 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
748 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
749 echo "configure:750: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
750 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
751 cross_compiling=$ac_cv_prog_cc_cross
753 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
754 echo "configure:755: checking whether we are using GNU C" >&5
755 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
756 echo $ac_n "(cached) $ac_c" 1>&6
757 else
758 cat > conftest.c <<EOF
759 #ifdef __GNUC__
760 yes;
761 #endif
763 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
764 ac_cv_prog_gcc=yes
765 else
766 ac_cv_prog_gcc=no
770 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
772 if test $ac_cv_prog_gcc = yes; then
773 GCC=yes
774 else
775 GCC=
778 ac_test_CFLAGS="${CFLAGS+set}"
779 ac_save_CFLAGS="$CFLAGS"
780 CFLAGS=
781 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
782 echo "configure:783: checking whether ${CC-cc} accepts -g" >&5
783 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
784 echo $ac_n "(cached) $ac_c" 1>&6
785 else
786 echo 'void f(){}' > conftest.c
787 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
788 ac_cv_prog_cc_g=yes
789 else
790 ac_cv_prog_cc_g=no
792 rm -f conftest*
796 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
797 if test "$ac_test_CFLAGS" = set; then
798 CFLAGS="$ac_save_CFLAGS"
799 elif test $ac_cv_prog_cc_g = yes; then
800 if test "$GCC" = yes; then
801 CFLAGS="-g -O2"
802 else
803 CFLAGS="-g"
805 else
806 if test "$GCC" = yes; then
807 CFLAGS="-O2"
808 else
809 CFLAGS=
813 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
814 echo "configure:815: checking for POSIXized ISC" >&5
815 if test -d /etc/conf/kconfig.d &&
816 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
817 then
818 echo "$ac_t""yes" 1>&6
819 ISC=yes # If later tests want to check for ISC.
820 cat >> confdefs.h <<\EOF
821 #define _POSIX_SOURCE 1
824 if test "$GCC" = yes; then
825 CC="$CC -posix"
826 else
827 CC="$CC -Xp"
829 else
830 echo "$ac_t""no" 1>&6
831 ISC=
835 ac_aux_dir=
836 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
837 if test -f $ac_dir/install-sh; then
838 ac_aux_dir=$ac_dir
839 ac_install_sh="$ac_aux_dir/install-sh -c"
840 break
841 elif test -f $ac_dir/install.sh; then
842 ac_aux_dir=$ac_dir
843 ac_install_sh="$ac_aux_dir/install.sh -c"
844 break
846 done
847 if test -z "$ac_aux_dir"; then
848 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
850 ac_config_guess=$ac_aux_dir/config.guess
851 ac_config_sub=$ac_aux_dir/config.sub
852 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
855 # Do some error checking and defaulting for the host and target type.
856 # The inputs are:
857 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
859 # The rules are:
860 # 1. You are not allowed to specify --host, --target, and nonopt at the
861 # same time.
862 # 2. Host defaults to nonopt.
863 # 3. If nonopt is not specified, then host defaults to the current host,
864 # as determined by config.guess.
865 # 4. Target and build default to nonopt.
866 # 5. If nonopt is not specified, then target and build default to host.
868 # The aliases save the names the user supplied, while $host etc.
869 # will get canonicalized.
870 case $host---$target---$nonopt in
871 NONE---*---* | *---NONE---* | *---*---NONE) ;;
872 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
873 esac
876 # Make sure we can run config.sub.
877 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
878 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
881 echo $ac_n "checking host system type""... $ac_c" 1>&6
882 echo "configure:883: checking host system type" >&5
884 host_alias=$host
885 case "$host_alias" in
886 NONE)
887 case $nonopt in
888 NONE)
889 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
890 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
891 fi ;;
892 *) host_alias=$nonopt ;;
893 esac ;;
894 esac
896 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
897 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
898 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
899 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
900 echo "$ac_t""$host" 1>&6
902 echo $ac_n "checking target system type""... $ac_c" 1>&6
903 echo "configure:904: checking target system type" >&5
905 target_alias=$target
906 case "$target_alias" in
907 NONE)
908 case $nonopt in
909 NONE) target_alias=$host_alias ;;
910 *) target_alias=$nonopt ;;
911 esac ;;
912 esac
914 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
915 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
916 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
917 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
918 echo "$ac_t""$target" 1>&6
920 echo $ac_n "checking build system type""... $ac_c" 1>&6
921 echo "configure:922: checking build system type" >&5
923 build_alias=$build
924 case "$build_alias" in
925 NONE)
926 case $nonopt in
927 NONE) build_alias=$host_alias ;;
928 *) build_alias=$nonopt ;;
929 esac ;;
930 esac
932 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
933 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
934 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
935 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
936 echo "$ac_t""$build" 1>&6
938 test "$host_alias" != "$target_alias" &&
939 test "$program_prefix$program_suffix$program_transform_name" = \
940 NONENONEs,x,x, &&
941 program_prefix=${target_alias}-
944 mymakefile="Makefile"
945 on_qnx=no
946 on_beos=no
947 case "$target" in
948 *hp-hpux*)
949 SYS_DEFS="-D_HPUX_SOURCE"
951 *ibm-aix*)
952 SYS_DEFS="-D_ALL_SOURCE"
953 mymakefile="Makefile.aix"
955 *dec-osf*)
957 *sequent-dynix*)
959 *solaris*)
961 sparc*sunos*)
963 *linux*)
965 *nto-qnx*)
967 *qnx*)
968 on_qnx=yes
969 SYS_DEFS="-Q"
971 *beos*)
972 on_beos=yes
974 esac
977 MH_EXTRA_LIBS=""
979 MH_EXTRA_LIBS=''
980 for mh_lib in dld dl; do
981 if test "$on_qnx" = yes; then
982 echo $ac_n "checking for library -l${mh_lib}""... $ac_c" 1>&6
983 echo "configure:984: checking for library -l${mh_lib}" >&5
984 if test -r /usr/lib/${mh_lib}3r.lib; then
985 echo "$ac_t""found" 1>&6
986 MH_EXTRA_LIBS="${MH_EXTRA_LIBS} -l${mh_lib}"
987 else
988 echo "$ac_t""not found" 1>&6
990 else
991 echo $ac_n "checking for main in -l$mh_lib""... $ac_c" 1>&6
992 echo "configure:993: checking for main in -l$mh_lib" >&5
993 ac_lib_var=`echo $mh_lib'_'main | sed 'y%./+-%__p_%'`
994 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
995 echo $ac_n "(cached) $ac_c" 1>&6
996 else
997 ac_save_LIBS="$LIBS"
998 LIBS="-l$mh_lib $LIBS"
999 cat > conftest.$ac_ext <<EOF
1000 #line 1001 "configure"
1001 #include "confdefs.h"
1003 int main() {
1004 main()
1005 ; return 0; }
1007 if { (eval echo configure:1008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1008 rm -rf conftest*
1009 eval "ac_cv_lib_$ac_lib_var=yes"
1010 else
1011 echo "configure: failed program was:" >&5
1012 cat conftest.$ac_ext >&5
1013 rm -rf conftest*
1014 eval "ac_cv_lib_$ac_lib_var=no"
1016 rm -f conftest*
1017 LIBS="$ac_save_LIBS"
1020 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1021 echo "$ac_t""yes" 1>&6
1022 mh_lib_found=yes
1023 else
1024 echo "$ac_t""no" 1>&6
1025 mh_lib_found=no
1028 if test "$mh_lib_found" = yes; then
1029 MH_EXTRA_LIBS="${MH_EXTRA_LIBS} -l${mh_lib}"
1032 done
1034 SHLIBS="${MH_EXTRA_LIBS}"
1036 MH_EXTRA_LIBS=""
1038 MH_EXTRA_LIBS=''
1039 for mh_lib in m nsl nsl_s socket; do
1040 if test "$on_qnx" = yes; then
1041 echo $ac_n "checking for library -l${mh_lib}""... $ac_c" 1>&6
1042 echo "configure:1043: checking for library -l${mh_lib}" >&5
1043 if test -r /usr/lib/${mh_lib}3r.lib; then
1044 echo "$ac_t""found" 1>&6
1045 MH_EXTRA_LIBS="${MH_EXTRA_LIBS} -l${mh_lib}"
1046 else
1047 echo "$ac_t""not found" 1>&6
1049 else
1050 echo $ac_n "checking for main in -l$mh_lib""... $ac_c" 1>&6
1051 echo "configure:1052: checking for main in -l$mh_lib" >&5
1052 ac_lib_var=`echo $mh_lib'_'main | sed 'y%./+-%__p_%'`
1053 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1054 echo $ac_n "(cached) $ac_c" 1>&6
1055 else
1056 ac_save_LIBS="$LIBS"
1057 LIBS="-l$mh_lib $LIBS"
1058 cat > conftest.$ac_ext <<EOF
1059 #line 1060 "configure"
1060 #include "confdefs.h"
1062 int main() {
1063 main()
1064 ; return 0; }
1066 if { (eval echo configure:1067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1067 rm -rf conftest*
1068 eval "ac_cv_lib_$ac_lib_var=yes"
1069 else
1070 echo "configure: failed program was:" >&5
1071 cat conftest.$ac_ext >&5
1072 rm -rf conftest*
1073 eval "ac_cv_lib_$ac_lib_var=no"
1075 rm -f conftest*
1076 LIBS="$ac_save_LIBS"
1079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1080 echo "$ac_t""yes" 1>&6
1081 mh_lib_found=yes
1082 else
1083 echo "$ac_t""no" 1>&6
1084 mh_lib_found=no
1087 if test "$mh_lib_found" = yes; then
1088 MH_EXTRA_LIBS="${MH_EXTRA_LIBS} -l${mh_lib}"
1091 done
1094 mh_save_libs="$LIBS"
1096 if test "$on_qnx" = no; then
1097 echo $ac_n "checking for main in -lcrypt""... $ac_c" 1>&6
1098 echo "configure:1099: checking for main in -lcrypt" >&5
1099 ac_lib_var=`echo crypt'_'main | sed 'y%./+-%__p_%'`
1100 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1101 echo $ac_n "(cached) $ac_c" 1>&6
1102 else
1103 ac_save_LIBS="$LIBS"
1104 LIBS="-lcrypt $LIBS"
1105 cat > conftest.$ac_ext <<EOF
1106 #line 1107 "configure"
1107 #include "confdefs.h"
1109 int main() {
1110 main()
1111 ; return 0; }
1113 if { (eval echo configure:1114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1114 rm -rf conftest*
1115 eval "ac_cv_lib_$ac_lib_var=yes"
1116 else
1117 echo "configure: failed program was:" >&5
1118 cat conftest.$ac_ext >&5
1119 rm -rf conftest*
1120 eval "ac_cv_lib_$ac_lib_var=no"
1122 rm -f conftest*
1123 LIBS="$ac_save_LIBS"
1126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1127 echo "$ac_t""yes" 1>&6
1128 mh_crypt_found=yes
1129 else
1130 echo "$ac_t""no" 1>&6
1131 mh_crypt_found=no
1134 if test "$mh_crypt_found" = yes; then
1135 LIBS="${LIBS} -lcrypt"
1139 echo $ac_n "checking for crypt function""... $ac_c" 1>&6
1140 echo "configure:1141: checking for crypt function" >&5
1142 if eval "test \"`echo '$''{'mh_cv_func_crypt'+set}'`\" = set"; then
1143 echo $ac_n "(cached) $ac_c" 1>&6
1144 else
1146 cat > conftest.$ac_ext <<EOF
1147 #line 1148 "configure"
1148 #include "confdefs.h"
1149 #include <unistd.h>
1150 int main() {
1151 crypt("fred","aa")
1152 ; return 0; }
1154 if { (eval echo configure:1155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1155 rm -rf conftest*
1156 mh_cv_func_crypt=yes
1157 else
1158 echo "configure: failed program was:" >&5
1159 cat conftest.$ac_ext >&5
1160 rm -rf conftest*
1161 mh_cv_func_crypt=no
1164 rm -f conftest*
1167 echo "$ac_t""$mh_cv_func_crypt" 1>&6
1168 if test "$mh_cv_func_crypt" = yes ; then
1169 cat >> confdefs.h <<\EOF
1170 #define HAVE_CRYPT 1
1173 if test "$mh_crypt_found" = yes; then
1174 MH_EXTRA_LIBS="${MH_EXTRA_LIBS} -lcrypt"
1178 LIBS="$mh_save_libs"
1181 # Extract the first word of "flex", so it can be a program name with args.
1182 set dummy flex; ac_word=$2
1183 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1184 echo "configure:1185: checking for $ac_word" >&5
1185 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1186 echo $ac_n "(cached) $ac_c" 1>&6
1187 else
1188 if test -n "$LEX"; then
1189 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1190 else
1191 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1192 ac_dummy="$PATH"
1193 for ac_dir in $ac_dummy; do
1194 test -z "$ac_dir" && ac_dir=.
1195 if test -f $ac_dir/$ac_word; then
1196 ac_cv_prog_LEX="flex"
1197 break
1199 done
1200 IFS="$ac_save_ifs"
1201 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1204 LEX="$ac_cv_prog_LEX"
1205 if test -n "$LEX"; then
1206 echo "$ac_t""$LEX" 1>&6
1207 else
1208 echo "$ac_t""no" 1>&6
1211 if test -z "$LEXLIB"
1212 then
1213 case "$LEX" in
1214 flex*) ac_lib=fl ;;
1215 *) ac_lib=l ;;
1216 esac
1217 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1218 echo "configure:1219: checking for yywrap in -l$ac_lib" >&5
1219 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1220 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1221 echo $ac_n "(cached) $ac_c" 1>&6
1222 else
1223 ac_save_LIBS="$LIBS"
1224 LIBS="-l$ac_lib $LIBS"
1225 cat > conftest.$ac_ext <<EOF
1226 #line 1227 "configure"
1227 #include "confdefs.h"
1228 /* Override any gcc2 internal prototype to avoid an error. */
1229 /* We use char because int might match the return type of a gcc2
1230 builtin and then its argument prototype would still apply. */
1231 char yywrap();
1233 int main() {
1234 yywrap()
1235 ; return 0; }
1237 if { (eval echo configure:1238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1238 rm -rf conftest*
1239 eval "ac_cv_lib_$ac_lib_var=yes"
1240 else
1241 echo "configure: failed program was:" >&5
1242 cat conftest.$ac_ext >&5
1243 rm -rf conftest*
1244 eval "ac_cv_lib_$ac_lib_var=no"
1246 rm -f conftest*
1247 LIBS="$ac_save_LIBS"
1250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1251 echo "$ac_t""yes" 1>&6
1252 LEXLIB="-l$ac_lib"
1253 else
1254 echo "$ac_t""no" 1>&6
1259 BOTHLIBS="${LEXLIB} ${MH_EXTRA_LIBS}"
1262 echo $ac_n "checking if compiler supports ANSI prototypes""... $ac_c" 1>&6
1263 echo "configure:1264: checking if compiler supports ANSI prototypes" >&5
1264 ac_compile='$ac_cv_prog_CC conftest.$ac_ext $CFLAGS $CPPFLAGS -c 1>&5 2>&5'
1265 cat > conftest.$ac_ext <<EOF
1266 #line 1267 "configure"
1267 #include "confdefs.h"
1268 #include <stdio.h>
1269 int main() {
1270 extern int xxx(int, char *);
1271 ; return 0; }
1273 if { (eval echo configure:1274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1274 rm -rf conftest*
1275 mh_have_proto=yes; cat >> confdefs.h <<\EOF
1276 #define HAVE_PROTO 1
1279 else
1280 echo "configure: failed program was:" >&5
1281 cat conftest.$ac_ext >&5
1282 rm -rf conftest*
1283 mh_have_proto=no
1285 rm -f conftest*
1286 echo "$ac_t""$mh_have_proto" 1>&6
1288 if test "$mh_have_proto" = "no"; then
1289 { echo "configure: error: Regina requires an ANSI compiler; cannot continue" 1>&2; exit 1; }
1292 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1293 echo "configure:1294: checking how to run the C preprocessor" >&5
1294 # On Suns, sometimes $CPP names a directory.
1295 if test -n "$CPP" && test -d "$CPP"; then
1296 CPP=
1298 if test -z "$CPP"; then
1299 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1300 echo $ac_n "(cached) $ac_c" 1>&6
1301 else
1302 # This must be in double quotes, not single quotes, because CPP may get
1303 # substituted into the Makefile and "${CC-cc}" will confuse make.
1304 CPP="${CC-cc} -E"
1305 # On the NeXT, cc -E runs the code through the compiler's parser,
1306 # not just through cpp.
1307 cat > conftest.$ac_ext <<EOF
1308 #line 1309 "configure"
1309 #include "confdefs.h"
1310 #include <assert.h>
1311 Syntax Error
1313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1314 { (eval echo configure:1315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1316 if test -z "$ac_err"; then
1318 else
1319 echo "$ac_err" >&5
1320 echo "configure: failed program was:" >&5
1321 cat conftest.$ac_ext >&5
1322 rm -rf conftest*
1323 CPP="${CC-cc} -E -traditional-cpp"
1324 cat > conftest.$ac_ext <<EOF
1325 #line 1326 "configure"
1326 #include "confdefs.h"
1327 #include <assert.h>
1328 Syntax Error
1330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1331 { (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1333 if test -z "$ac_err"; then
1335 else
1336 echo "$ac_err" >&5
1337 echo "configure: failed program was:" >&5
1338 cat conftest.$ac_ext >&5
1339 rm -rf conftest*
1340 CPP="${CC-cc} -nologo -E"
1341 cat > conftest.$ac_ext <<EOF
1342 #line 1343 "configure"
1343 #include "confdefs.h"
1344 #include <assert.h>
1345 Syntax Error
1347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1348 { (eval echo configure:1349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1350 if test -z "$ac_err"; then
1352 else
1353 echo "$ac_err" >&5
1354 echo "configure: failed program was:" >&5
1355 cat conftest.$ac_ext >&5
1356 rm -rf conftest*
1357 CPP=/lib/cpp
1359 rm -f conftest*
1361 rm -f conftest*
1363 rm -f conftest*
1364 ac_cv_prog_CPP="$CPP"
1366 CPP="$ac_cv_prog_CPP"
1367 else
1368 ac_cv_prog_CPP="$CPP"
1370 echo "$ac_t""$CPP" 1>&6
1372 if test $ac_cv_prog_gcc = yes; then
1373 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1374 echo "configure:1375: checking whether ${CC-cc} needs -traditional" >&5
1375 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1376 echo $ac_n "(cached) $ac_c" 1>&6
1377 else
1378 ac_pattern="Autoconf.*'x'"
1379 cat > conftest.$ac_ext <<EOF
1380 #line 1381 "configure"
1381 #include "confdefs.h"
1382 #include <sgtty.h>
1383 Autoconf TIOCGETP
1385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1386 egrep "$ac_pattern" >/dev/null 2>&1; then
1387 rm -rf conftest*
1388 ac_cv_prog_gcc_traditional=yes
1389 else
1390 rm -rf conftest*
1391 ac_cv_prog_gcc_traditional=no
1393 rm -f conftest*
1396 if test $ac_cv_prog_gcc_traditional = no; then
1397 cat > conftest.$ac_ext <<EOF
1398 #line 1399 "configure"
1399 #include "confdefs.h"
1400 #include <termio.h>
1401 Autoconf TCGETA
1403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1404 egrep "$ac_pattern" >/dev/null 2>&1; then
1405 rm -rf conftest*
1406 ac_cv_prog_gcc_traditional=yes
1408 rm -f conftest*
1413 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1414 if test $ac_cv_prog_gcc_traditional = yes; then
1415 CC="$CC -traditional"
1419 # Extract the first word of "ranlib", so it can be a program name with args.
1420 set dummy ranlib; ac_word=$2
1421 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1422 echo "configure:1423: checking for $ac_word" >&5
1423 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1424 echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426 if test -n "$RANLIB"; then
1427 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1428 else
1429 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1430 ac_dummy="$PATH"
1431 for ac_dir in $ac_dummy; do
1432 test -z "$ac_dir" && ac_dir=.
1433 if test -f $ac_dir/$ac_word; then
1434 ac_cv_prog_RANLIB="ranlib"
1435 break
1437 done
1438 IFS="$ac_save_ifs"
1439 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1442 RANLIB="$ac_cv_prog_RANLIB"
1443 if test -n "$RANLIB"; then
1444 echo "$ac_t""$RANLIB" 1>&6
1445 else
1446 echo "$ac_t""no" 1>&6
1450 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1451 echo "configure:1452: checking whether ln -s works" >&5
1452 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1453 echo $ac_n "(cached) $ac_c" 1>&6
1454 else
1455 rm -f conftestdata
1456 if ln -s X conftestdata 2>/dev/null
1457 then
1458 rm -f conftestdata
1459 ac_cv_prog_LN_S="ln -s"
1460 else
1461 ac_cv_prog_LN_S=ln
1464 LN_S="$ac_cv_prog_LN_S"
1465 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1466 echo "$ac_t""yes" 1>&6
1467 else
1468 echo "$ac_t""no" 1>&6
1471 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1472 echo "configure:1473: checking whether ${MAKE-make} sets \${MAKE}" >&5
1473 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1474 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1475 echo $ac_n "(cached) $ac_c" 1>&6
1476 else
1477 cat > conftestmake <<\EOF
1478 all:
1479 @echo 'ac_maketemp="${MAKE}"'
1481 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1482 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1483 if test -n "$ac_maketemp"; then
1484 eval ac_cv_prog_make_${ac_make}_set=yes
1485 else
1486 eval ac_cv_prog_make_${ac_make}_set=no
1488 rm -f conftestmake
1490 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1491 echo "$ac_t""yes" 1>&6
1492 SET_MAKE=
1493 else
1494 echo "$ac_t""no" 1>&6
1495 SET_MAKE="MAKE=${MAKE-make}"
1499 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1500 echo "configure:1501: checking for ANSI C header files" >&5
1501 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1502 echo $ac_n "(cached) $ac_c" 1>&6
1503 else
1504 cat > conftest.$ac_ext <<EOF
1505 #line 1506 "configure"
1506 #include "confdefs.h"
1507 #include <stdlib.h>
1508 #include <stdarg.h>
1509 #include <string.h>
1510 #include <float.h>
1512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1513 { (eval echo configure:1514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1515 if test -z "$ac_err"; then
1516 rm -rf conftest*
1517 ac_cv_header_stdc=yes
1518 else
1519 echo "$ac_err" >&5
1520 echo "configure: failed program was:" >&5
1521 cat conftest.$ac_ext >&5
1522 rm -rf conftest*
1523 ac_cv_header_stdc=no
1525 rm -f conftest*
1527 if test $ac_cv_header_stdc = yes; then
1528 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1529 cat > conftest.$ac_ext <<EOF
1530 #line 1531 "configure"
1531 #include "confdefs.h"
1532 #include <string.h>
1534 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1535 egrep "memchr" >/dev/null 2>&1; then
1537 else
1538 rm -rf conftest*
1539 ac_cv_header_stdc=no
1541 rm -f conftest*
1545 if test $ac_cv_header_stdc = yes; then
1546 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1547 cat > conftest.$ac_ext <<EOF
1548 #line 1549 "configure"
1549 #include "confdefs.h"
1550 #include <stdlib.h>
1552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1553 egrep "free" >/dev/null 2>&1; then
1555 else
1556 rm -rf conftest*
1557 ac_cv_header_stdc=no
1559 rm -f conftest*
1563 if test $ac_cv_header_stdc = yes; then
1564 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1565 if test "$cross_compiling" = yes; then
1567 else
1568 cat > conftest.$ac_ext <<EOF
1569 #line 1570 "configure"
1570 #include "confdefs.h"
1571 #include <ctype.h>
1572 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1573 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1574 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1575 int main () { int i; for (i = 0; i < 256; i++)
1576 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1577 exit (0); }
1580 if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1581 then
1583 else
1584 echo "configure: failed program was:" >&5
1585 cat conftest.$ac_ext >&5
1586 rm -fr conftest*
1587 ac_cv_header_stdc=no
1589 rm -fr conftest*
1595 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1596 if test $ac_cv_header_stdc = yes; then
1597 cat >> confdefs.h <<\EOF
1598 #define STDC_HEADERS 1
1603 for ac_hdr in \
1604 stdio.h \
1605 stdlib.h \
1606 setjmp.h \
1607 unistd.h \
1608 ctype.h \
1609 pwd.h \
1610 grp.h \
1611 math.h \
1612 poll.h \
1613 time.h \
1614 sys/time.h \
1615 sys/wait.h \
1616 sys/stat.h \
1617 assert.h \
1618 errno.h \
1619 stdarg.h \
1620 string.h \
1621 termios.h \
1622 signal.h \
1623 limits.h \
1624 fcntl.h \
1625 malloc.h \
1626 dl.h \
1627 sys/select.h \
1628 arpa/inet.h \
1629 sys/socket.h \
1630 sys/resource.h \
1631 netinet/in.h \
1632 netdb.h
1635 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1636 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1637 echo "configure:1638: checking for $ac_hdr" >&5
1638 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1639 echo $ac_n "(cached) $ac_c" 1>&6
1640 else
1641 cat > conftest.$ac_ext <<EOF
1642 #line 1643 "configure"
1643 #include "confdefs.h"
1644 #include <$ac_hdr>
1646 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1647 { (eval echo configure:1648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1648 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1649 if test -z "$ac_err"; then
1650 rm -rf conftest*
1651 eval "ac_cv_header_$ac_safe=yes"
1652 else
1653 echo "$ac_err" >&5
1654 echo "configure: failed program was:" >&5
1655 cat conftest.$ac_ext >&5
1656 rm -rf conftest*
1657 eval "ac_cv_header_$ac_safe=no"
1659 rm -f conftest*
1661 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1662 echo "$ac_t""yes" 1>&6
1663 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1664 cat >> confdefs.h <<EOF
1665 #define $ac_tr_hdr 1
1668 else
1669 echo "$ac_t""no" 1>&6
1671 done
1674 for ac_func in sysconf putenv usleep random ftruncate memcpy memmove strerror strerror_r gettimeofday ftime _fullpath vsprintf _splitpath2 _splitpath sigaction mkstemp
1676 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1677 echo "configure:1678: checking for $ac_func" >&5
1678 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1679 echo $ac_n "(cached) $ac_c" 1>&6
1680 else
1681 cat > conftest.$ac_ext <<EOF
1682 #line 1683 "configure"
1683 #include "confdefs.h"
1684 /* System header to define __stub macros and hopefully few prototypes,
1685 which can conflict with char $ac_func(); below. */
1686 #include <assert.h>
1687 /* Override any gcc2 internal prototype to avoid an error. */
1688 /* We use char because int might match the return type of a gcc2
1689 builtin and then its argument prototype would still apply. */
1690 char $ac_func();
1692 int main() {
1694 /* The GNU C library defines this for functions which it implements
1695 to always fail with ENOSYS. Some functions are actually named
1696 something starting with __ and the normal name is an alias. */
1697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1698 choke me
1699 #else
1700 $ac_func();
1701 #endif
1703 ; return 0; }
1705 if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1706 rm -rf conftest*
1707 eval "ac_cv_func_$ac_func=yes"
1708 else
1709 echo "configure: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 rm -rf conftest*
1712 eval "ac_cv_func_$ac_func=no"
1714 rm -f conftest*
1717 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1718 echo "$ac_t""yes" 1>&6
1719 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1720 cat >> confdefs.h <<EOF
1721 #define $ac_tr_func 1
1724 else
1725 echo "$ac_t""no" 1>&6
1727 done
1730 echo $ac_n "checking for working const""... $ac_c" 1>&6
1731 echo "configure:1732: checking for working const" >&5
1732 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1733 echo $ac_n "(cached) $ac_c" 1>&6
1734 else
1735 cat > conftest.$ac_ext <<EOF
1736 #line 1737 "configure"
1737 #include "confdefs.h"
1739 int main() {
1741 /* Ultrix mips cc rejects this. */
1742 typedef int charset[2]; const charset x;
1743 /* SunOS 4.1.1 cc rejects this. */
1744 char const *const *ccp;
1745 char **p;
1746 /* NEC SVR4.0.2 mips cc rejects this. */
1747 struct point {int x, y;};
1748 static struct point const zero = {0,0};
1749 /* AIX XL C 1.02.0.0 rejects this.
1750 It does not let you subtract one const X* pointer from another in an arm
1751 of an if-expression whose if-part is not a constant expression */
1752 const char *g = "string";
1753 ccp = &g + (g ? g-g : 0);
1754 /* HPUX 7.0 cc rejects these. */
1755 ++ccp;
1756 p = (char**) ccp;
1757 ccp = (char const *const *) p;
1758 { /* SCO 3.2v4 cc rejects this. */
1759 char *t;
1760 char const *s = 0 ? (char *) 0 : (char const *) 0;
1762 *t++ = 0;
1764 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1765 int x[] = {25, 17};
1766 const int *foo = &x[0];
1767 ++foo;
1769 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1770 typedef const int *iptr;
1771 iptr p = 0;
1772 ++p;
1774 { /* AIX XL C 1.02.0.0 rejects this saying
1775 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1776 struct s { int j; const int *ap[3]; };
1777 struct s *b; b->j = 5;
1779 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1780 const int foo = 10;
1783 ; return 0; }
1785 if { (eval echo configure:1786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1786 rm -rf conftest*
1787 ac_cv_c_const=yes
1788 else
1789 echo "configure: failed program was:" >&5
1790 cat conftest.$ac_ext >&5
1791 rm -rf conftest*
1792 ac_cv_c_const=no
1794 rm -f conftest*
1797 echo "$ac_t""$ac_cv_c_const" 1>&6
1798 if test $ac_cv_c_const = no; then
1799 cat >> confdefs.h <<\EOF
1800 #define const
1805 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1806 echo "configure:1807: checking for size_t" >&5
1807 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1808 echo $ac_n "(cached) $ac_c" 1>&6
1809 else
1810 cat > conftest.$ac_ext <<EOF
1811 #line 1812 "configure"
1812 #include "confdefs.h"
1813 #include <sys/types.h>
1814 #if STDC_HEADERS
1815 #include <stdlib.h>
1816 #include <stddef.h>
1817 #endif
1819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1820 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1821 rm -rf conftest*
1822 ac_cv_type_size_t=yes
1823 else
1824 rm -rf conftest*
1825 ac_cv_type_size_t=no
1827 rm -f conftest*
1830 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1831 if test $ac_cv_type_size_t = no; then
1832 cat >> confdefs.h <<\EOF
1833 #define size_t unsigned
1838 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1839 echo "configure:1840: checking whether time.h and sys/time.h may both be included" >&5
1840 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1841 echo $ac_n "(cached) $ac_c" 1>&6
1842 else
1843 cat > conftest.$ac_ext <<EOF
1844 #line 1845 "configure"
1845 #include "confdefs.h"
1846 #include <sys/types.h>
1847 #include <sys/time.h>
1848 #include <time.h>
1849 int main() {
1850 struct tm *tp;
1851 ; return 0; }
1853 if { (eval echo configure:1854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1854 rm -rf conftest*
1855 ac_cv_header_time=yes
1856 else
1857 echo "configure: failed program was:" >&5
1858 cat conftest.$ac_ext >&5
1859 rm -rf conftest*
1860 ac_cv_header_time=no
1862 rm -f conftest*
1865 echo "$ac_t""$ac_cv_header_time" 1>&6
1866 if test $ac_cv_header_time = yes; then
1867 cat >> confdefs.h <<\EOF
1868 #define TIME_WITH_SYS_TIME 1
1873 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
1874 echo "configure:1875: checking whether struct tm is in sys/time.h or time.h" >&5
1875 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
1876 echo $ac_n "(cached) $ac_c" 1>&6
1877 else
1878 cat > conftest.$ac_ext <<EOF
1879 #line 1880 "configure"
1880 #include "confdefs.h"
1881 #include <sys/types.h>
1882 #include <time.h>
1883 int main() {
1884 struct tm *tp; tp->tm_sec;
1885 ; return 0; }
1887 if { (eval echo configure:1888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1888 rm -rf conftest*
1889 ac_cv_struct_tm=time.h
1890 else
1891 echo "configure: failed program was:" >&5
1892 cat conftest.$ac_ext >&5
1893 rm -rf conftest*
1894 ac_cv_struct_tm=sys/time.h
1896 rm -f conftest*
1899 echo "$ac_t""$ac_cv_struct_tm" 1>&6
1900 if test $ac_cv_struct_tm = sys/time.h; then
1901 cat >> confdefs.h <<\EOF
1902 #define TM_IN_SYS_TIME 1
1908 echo $ac_n "checking whether $CC understand -c and -o together""... $ac_c" 1>&6
1909 echo "configure:1910: checking whether $CC understand -c and -o together" >&5
1910 set dummy $CC; ac_cc="`echo $2 |
1911 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1912 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1913 echo $ac_n "(cached) $ac_c" 1>&6
1914 else
1915 echo 'foo(){}' > conftest.c
1916 # We do the test twice because some compilers refuse to overwrite an
1917 # existing .o file with -o, though they will create one.
1918 eval ac_cv_prog_cc_${ac_cc}_c_o=no
1919 ac_try='${CC-cc} -c conftest.c -o conftest.ooo 1>&5'
1920 if { (eval echo configure:__oline__: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && test -f conftest.ooo && { (eval echo configure:1921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1921 then
1922 ac_try='${CC-cc} -c conftest.c -o conftest.ooo 1>&5'
1923 if { (eval echo configure:__oline__: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && test -f conftest.ooo && { (eval echo configure:1924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1924 then
1925 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1928 rm -f conftest*
1931 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1932 O2SHO=""
1933 O2SAVE=""
1934 SAVE2O=""
1935 CC2O="-o $"'@'
1936 echo "$ac_t""yes" 1>&6
1937 else
1938 O2SHO="-mv \`basename "$'@'" .sho\`.o "$'@'
1939 O2SAVE="-mv \`basename "$'@'" .sho\`.o \`basename "$'@'" .sho\`.o.save"
1940 SAVE2O="-mv \`basename "$'@'" .sho\`.o.save \`basename "$'@'" .sho\`.o"
1941 CC2O=""
1942 echo "$ac_t""no" 1>&6
1946 echo $ac_n "checking whether __sighandler_t is defined""... $ac_c" 1>&6
1947 echo "configure:1948: checking whether __sighandler_t is defined" >&5
1949 if eval "test \"`echo '$''{'mh_cv__sighandler_t'+set}'`\" = set"; then
1950 echo $ac_n "(cached) $ac_c" 1>&6
1951 else
1953 cat > conftest.$ac_ext <<EOF
1954 #line 1955 "configure"
1955 #include "confdefs.h"
1956 #include <sys/types.h>
1957 #include <signal.h>
1958 int main() {
1959 __sighandler_t fred
1960 ; return 0; }
1962 if { (eval echo configure:1963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1963 rm -rf conftest*
1964 mh_cv__sighandler_t=yes
1965 else
1966 echo "configure: failed program was:" >&5
1967 cat conftest.$ac_ext >&5
1968 rm -rf conftest*
1969 mh_cv__sighandler_t=no
1972 rm -f conftest*
1975 echo "$ac_t""$mh_cv__sighandler_t" 1>&6
1976 if test "$mh_cv__sighandler_t" = yes ; then
1977 cat >> confdefs.h <<\EOF
1978 #define HAVE__SIGHANDLER_T 1
1983 echo $ac_n "checking for struct random_data""... $ac_c" 1>&6
1984 echo "configure:1985: checking for struct random_data" >&5
1985 if eval "test \"`echo '$''{'mh_cv_struct_random_data'+set}'`\" = set"; then
1986 echo $ac_n "(cached) $ac_c" 1>&6
1987 else
1988 cat > conftest.$ac_ext <<EOF
1989 #line 1990 "configure"
1990 #include "confdefs.h"
1991 #include <stdlib.h>
1992 #include <stdio.h>
1993 int main() {
1994 struct random_data s;
1995 ; return 0; }
1997 if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1998 rm -rf conftest*
1999 mh_cv_struct_random_data=yes
2000 else
2001 echo "configure: failed program was:" >&5
2002 cat conftest.$ac_ext >&5
2003 rm -rf conftest*
2004 mh_cv_struct_random_data=no
2006 rm -f conftest*
2009 echo "$ac_t""$mh_cv_struct_random_data" 1>&6
2010 if test $mh_cv_struct_random_data = yes; then
2011 cat >> confdefs.h <<\EOF
2012 #define HAVE_RANDOM_DATA 1
2018 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
2019 echo "configure:2020: checking for 8-bit clean memcmp" >&5
2020 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
2021 echo $ac_n "(cached) $ac_c" 1>&6
2022 else
2023 if test "$cross_compiling" = yes; then
2024 ac_cv_func_memcmp_clean=no
2025 else
2026 cat > conftest.$ac_ext <<EOF
2027 #line 2028 "configure"
2028 #include "confdefs.h"
2030 main()
2032 char c0 = 0x40, c1 = 0x80, c2 = 0x81;
2033 exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
2037 if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2038 then
2039 ac_cv_func_memcmp_clean=yes
2040 else
2041 echo "configure: failed program was:" >&5
2042 cat conftest.$ac_ext >&5
2043 rm -fr conftest*
2044 ac_cv_func_memcmp_clean=no
2046 rm -fr conftest*
2051 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
2052 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
2054 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2055 # for constant arguments. Useless!
2056 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2057 echo "configure:2058: checking for working alloca.h" >&5
2058 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2059 echo $ac_n "(cached) $ac_c" 1>&6
2060 else
2061 cat > conftest.$ac_ext <<EOF
2062 #line 2063 "configure"
2063 #include "confdefs.h"
2064 #include <alloca.h>
2065 int main() {
2066 char *p = alloca(2 * sizeof(int));
2067 ; return 0; }
2069 if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2070 rm -rf conftest*
2071 ac_cv_header_alloca_h=yes
2072 else
2073 echo "configure: failed program was:" >&5
2074 cat conftest.$ac_ext >&5
2075 rm -rf conftest*
2076 ac_cv_header_alloca_h=no
2078 rm -f conftest*
2081 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2082 if test $ac_cv_header_alloca_h = yes; then
2083 cat >> confdefs.h <<\EOF
2084 #define HAVE_ALLOCA_H 1
2089 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2090 echo "configure:2091: checking for alloca" >&5
2091 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2092 echo $ac_n "(cached) $ac_c" 1>&6
2093 else
2094 cat > conftest.$ac_ext <<EOF
2095 #line 2096 "configure"
2096 #include "confdefs.h"
2098 #ifdef __GNUC__
2099 # define alloca __builtin_alloca
2100 #else
2101 # ifdef _MSC_VER
2102 # include <malloc.h>
2103 # define alloca _alloca
2104 # else
2105 # if HAVE_ALLOCA_H
2106 # include <alloca.h>
2107 # else
2108 # ifdef _AIX
2109 #pragma alloca
2110 # else
2111 # ifndef alloca /* predefined by HP cc +Olibcalls */
2112 char *alloca ();
2113 # endif
2114 # endif
2115 # endif
2116 # endif
2117 #endif
2119 int main() {
2120 char *p = (char *) alloca(1);
2121 ; return 0; }
2123 if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2124 rm -rf conftest*
2125 ac_cv_func_alloca_works=yes
2126 else
2127 echo "configure: failed program was:" >&5
2128 cat conftest.$ac_ext >&5
2129 rm -rf conftest*
2130 ac_cv_func_alloca_works=no
2132 rm -f conftest*
2135 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2136 if test $ac_cv_func_alloca_works = yes; then
2137 cat >> confdefs.h <<\EOF
2138 #define HAVE_ALLOCA 1
2143 if test $ac_cv_func_alloca_works = no; then
2144 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2145 # that cause trouble. Some versions do not even contain alloca or
2146 # contain a buggy version. If you still want to use their alloca,
2147 # use ar to extract alloca.o from them instead of compiling alloca.c.
2148 ALLOCA=alloca.${ac_objext}
2149 cat >> confdefs.h <<\EOF
2150 #define C_ALLOCA 1
2154 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2155 echo "configure:2156: checking whether alloca needs Cray hooks" >&5
2156 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2157 echo $ac_n "(cached) $ac_c" 1>&6
2158 else
2159 cat > conftest.$ac_ext <<EOF
2160 #line 2161 "configure"
2161 #include "confdefs.h"
2162 #if defined(CRAY) && ! defined(CRAY2)
2163 webecray
2164 #else
2165 wenotbecray
2166 #endif
2169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2170 egrep "webecray" >/dev/null 2>&1; then
2171 rm -rf conftest*
2172 ac_cv_os_cray=yes
2173 else
2174 rm -rf conftest*
2175 ac_cv_os_cray=no
2177 rm -f conftest*
2181 echo "$ac_t""$ac_cv_os_cray" 1>&6
2182 if test $ac_cv_os_cray = yes; then
2183 for ac_func in _getb67 GETB67 getb67; do
2184 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2185 echo "configure:2186: checking for $ac_func" >&5
2186 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2187 echo $ac_n "(cached) $ac_c" 1>&6
2188 else
2189 cat > conftest.$ac_ext <<EOF
2190 #line 2191 "configure"
2191 #include "confdefs.h"
2192 /* System header to define __stub macros and hopefully few prototypes,
2193 which can conflict with char $ac_func(); below. */
2194 #include <assert.h>
2195 /* Override any gcc2 internal prototype to avoid an error. */
2196 /* We use char because int might match the return type of a gcc2
2197 builtin and then its argument prototype would still apply. */
2198 char $ac_func();
2200 int main() {
2202 /* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2206 choke me
2207 #else
2208 $ac_func();
2209 #endif
2211 ; return 0; }
2213 if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2214 rm -rf conftest*
2215 eval "ac_cv_func_$ac_func=yes"
2216 else
2217 echo "configure: failed program was:" >&5
2218 cat conftest.$ac_ext >&5
2219 rm -rf conftest*
2220 eval "ac_cv_func_$ac_func=no"
2222 rm -f conftest*
2225 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2226 echo "$ac_t""yes" 1>&6
2227 cat >> confdefs.h <<EOF
2228 #define CRAY_STACKSEG_END $ac_func
2231 break
2232 else
2233 echo "$ac_t""no" 1>&6
2236 done
2239 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2240 echo "configure:2241: checking stack direction for C alloca" >&5
2241 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2242 echo $ac_n "(cached) $ac_c" 1>&6
2243 else
2244 if test "$cross_compiling" = yes; then
2245 ac_cv_c_stack_direction=0
2246 else
2247 cat > conftest.$ac_ext <<EOF
2248 #line 2249 "configure"
2249 #include "confdefs.h"
2250 find_stack_direction ()
2252 static char *addr = 0;
2253 auto char dummy;
2254 if (addr == 0)
2256 addr = &dummy;
2257 return find_stack_direction ();
2259 else
2260 return (&dummy > addr) ? 1 : -1;
2262 main ()
2264 exit (find_stack_direction() < 0);
2267 if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2268 then
2269 ac_cv_c_stack_direction=1
2270 else
2271 echo "configure: failed program was:" >&5
2272 cat conftest.$ac_ext >&5
2273 rm -fr conftest*
2274 ac_cv_c_stack_direction=-1
2276 rm -fr conftest*
2281 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2282 cat >> confdefs.h <<EOF
2283 #define STACK_DIRECTION $ac_cv_c_stack_direction
2288 if test $ac_cv_func_alloca_works = yes; then
2289 ALLOCA_SHO=""
2290 else
2291 ALLOCA_SHO="alloca.sho"
2295 # Check whether --enable-debug or --disable-debug was given.
2296 if test "${enable_debug+set}" = set; then
2297 enableval="$enable_debug"
2298 with_debug=$enableval
2299 else
2300 with_debug=no
2303 cflags_g="`echo $CFLAGS | grep -c '\-g'`"
2304 cflags_O="`echo $CFLAGS | grep -c '\-O'`"
2306 if test "$with_debug" = yes; then
2307 DEBUG="-DDEBUG"
2309 if test "$cflags_g" = "0"; then
2310 CFLAGS="${CFLAGS} -g"
2312 if test "$cflags_O" != "0"; then
2313 CFLAGS="`echo ${CFLAGS} | sed -e s/-O.//`"
2315 else
2316 DEBUG="-DNDEBUG"
2318 if test "$cflags_O" = "0"; then
2319 CFLAGS="${CFLAGS} -O"
2321 if test "$cflags_g" != "0"; then
2322 CFLAGS="`echo ${CFLAGS} | sed -e s/-g//`"
2325 if test "$ac_cv_prog_CC" = "gcc"; then
2326 if test "$with_debug" = yes; then
2327 CFLAGS="${CFLAGS} -Wall"
2328 else
2329 CFLAGS="-O3 -Wall -fomit-frame-pointer"
2332 if test "$on_qnx" = yes; then
2333 if test "$with_debug" = yes; then
2334 CFLAGS="-g"
2335 else
2336 CFLAGS="-Otax"
2339 if test "$on_beos" = yes; then
2340 if test "$with_debug" = yes; then
2341 CFLAGS="${CFLAGS} -Wall"
2342 else
2343 CFLAGS="-O2 -Wall"
2345 sharedir="/boot/home/config/add-ons/rexx"
2346 else
2347 if test "x$prefix" != xNONE; then
2348 sharedir="$prefix/share/regina"
2349 else
2350 sharedir="$ac_default_prefix/share/regina"
2355 # Check whether --enable-purify or --disable-purify was given.
2356 if test "${enable_purify+set}" = set; then
2357 enableval="$enable_purify"
2358 with_purify=$enableval
2359 else
2360 with_purify=no
2363 if test "$with_purify" = yes; then
2364 PURIFY="purify"
2365 else
2366 PURIFY=""
2370 # Check whether --enable-posix-threads or --disable-posix-threads was given.
2371 if test "${enable_posix_threads+set}" = set; then
2372 enableval="$enable_posix_threads"
2373 enable_posix_threads=$enableval
2374 else
2375 enable_posix_threads=no
2379 if test "$enable_posix_threads" = yes; then
2380 echo $ac_n "checking whether Posix Threads are supported""... $ac_c" 1>&6
2381 echo "configure:2382: checking whether Posix Threads are supported" >&5
2382 tmpLIBS=$LIBS
2383 save_cflags="$CFLAGS"
2384 pthread_libs="pthreads pthread"
2385 for mh_lib in $pthread_libs; do
2386 LIBS="$tmpLIBS -l${mh_lib}"
2387 cat > conftest.$ac_ext <<EOF
2388 #line 2389 "configure"
2389 #include "confdefs.h"
2390 #include <pthread.h>
2391 int main() {
2392 pthread_create(NULL,NULL,NULL,NULL)
2393 ; return 0; }
2395 if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2396 rm -rf conftest*
2397 mh_has_pthreads=yes
2398 else
2399 echo "configure: failed program was:" >&5
2400 cat conftest.$ac_ext >&5
2401 rm -rf conftest*
2402 mh_has_pthreads=no
2405 rm -f conftest*
2406 if test "$mh_has_pthreads" = yes; then
2407 MH_MT_LIBS="-l${mh_lib}"
2409 THREADING_COMPILE="-D_REENTRANT -DPOSIX"
2410 THREADING_LINK=""
2411 SHL_SCRIPT=""
2412 case "$target" in
2413 *solaris*)
2414 if test "$ac_cv_prog_CC" = "gcc"; then
2415 THREADING_COMPILE="-D_REENTRANT -DPOSIX"
2416 else
2417 THREADING_COMPILE="-mt -D_REENTRANT -DREENTRANT -D_PTHREAD_SEMANTICS"
2418 THREADING_LINK="-mt"
2421 *linux*)
2422 SHL_SCRIPT="-Wl,--version-script=${srcdir}/regina_elf_MT.def"
2424 esac
2425 MT_FILE="mt_posix"
2426 THREADING_FNAME="_ts"
2427 else
2428 MH_MT_LIBS=""
2429 THREADING_COMPILE=""
2430 THREADING_LINK=""
2431 SHL_SCRIPT=""
2432 MT_FILE="mt_notmt"
2433 THREADING_FNAME=""
2434 case "$target" in
2435 *linux*)
2436 SHL_SCRIPT="-Wl,--version-script=${srcdir}/regina_elf.def"
2438 esac
2440 LIBS="$tmpLIBS"
2441 CFLAGS="$save_cflags"
2442 if test "$mh_has_pthreads" = yes; then
2443 break
2445 done
2446 echo "$ac_t""$mh_has_pthreads" 1>&6
2447 else
2448 MH_MT_LIBS=""
2449 THREADING=""
2450 MT_FILE="mt_notmt"
2451 THREADING_FNAME=""
2452 SHL_SCRIPT=""
2453 case "$target" in
2454 *linux*)
2455 SHL_SCRIPT="-Wl,--version-script=${srcdir}/regina_elf.def"
2457 esac
2466 if test "$mh_has_pthreads" = yes; then
2467 save_cflags="$CFLAGS"
2468 CFLAGS="$CFLAGS $THREADING_COMPILE"
2470 # Where we know the format of getgrgid_r() function
2471 # only test for that case
2473 case "$target" in
2474 *solaris*)
2475 echo $ac_n "checking if getgrgid_r returns a struct group *""... $ac_c" 1>&6
2476 echo "configure:2477: checking if getgrgid_r returns a struct group *" >&5
2477 if eval "test \"`echo '$''{'mh_cv_getgrgid_r_struct'+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 <sys/types.h>
2484 #include <grp.h>
2485 #include <pwd.h>
2486 int main() {
2488 struct group *ptr,result;
2489 int rc;
2490 gid_t gid;
2491 char buf[100];
2492 ptr = getgrgid_r(gid,&result,buf,sizeof(buf));
2494 ; return 0; }
2496 if { (eval echo configure:2497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2497 rm -rf conftest*
2498 mh_cv_getgrgid_r_struct=yes
2499 else
2500 echo "configure: failed program was:" >&5
2501 cat conftest.$ac_ext >&5
2502 rm -rf conftest*
2503 mh_cv_getgrgid_r_struct=no
2505 rm -f conftest*
2508 echo "$ac_t""$mh_cv_getgrgid_r_struct" 1>&6
2509 if test $mh_cv_getgrgid_r_struct = yes; then
2510 cat >> confdefs.h <<\EOF
2511 #define HAVE_GETGRGID_R_RETURNS_STRUCT 1
2517 *linux*)
2518 echo $ac_n "checking if getgrgid_r has 5 args and returns an int""... $ac_c" 1>&6
2519 echo "configure:2520: checking if getgrgid_r has 5 args and returns an int" >&5
2520 if eval "test \"`echo '$''{'mh_cv_getgrgid_r_int5'+set}'`\" = set"; then
2521 echo $ac_n "(cached) $ac_c" 1>&6
2522 else
2523 cat > conftest.$ac_ext <<EOF
2524 #line 2525 "configure"
2525 #include "confdefs.h"
2526 #include <sys/types.h>
2527 #include <grp.h>
2528 #include <pwd.h>
2529 int main() {
2531 struct group *ptr,result;
2532 int rc;
2533 gid_t gid;
2534 char buf[100];
2535 rc = getgrgid_r(gid,&result,buf,sizeof(buf),&ptr);
2537 ; return 0; }
2539 if { (eval echo configure:2540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2540 rm -rf conftest*
2541 mh_cv_getgrgid_r_int5=yes
2542 else
2543 echo "configure: failed program was:" >&5
2544 cat conftest.$ac_ext >&5
2545 rm -rf conftest*
2546 mh_cv_getgrgid_r_int5=no
2548 rm -f conftest*
2551 echo "$ac_t""$mh_cv_getgrgid_r_int5" 1>&6
2552 if test $mh_cv_getgrgid_r_int5 = yes; then
2553 cat >> confdefs.h <<\EOF
2554 #define HAVE_GETGRGID_R_RETURNS_INT_5_PARAMS 1
2560 *dec-osf*)
2561 echo $ac_n "checking if getgrgid_r has 5 args and returns an int""... $ac_c" 1>&6
2562 echo "configure:2563: checking if getgrgid_r has 5 args and returns an int" >&5
2563 if eval "test \"`echo '$''{'mh_cv_getgrgid_r_int5'+set}'`\" = set"; then
2564 echo $ac_n "(cached) $ac_c" 1>&6
2565 else
2566 cat > conftest.$ac_ext <<EOF
2567 #line 2568 "configure"
2568 #include "confdefs.h"
2569 #include <sys/types.h>
2570 #include <grp.h>
2571 #include <pwd.h>
2572 int main() {
2574 struct group *ptr,result;
2575 int rc;
2576 gid_t gid;
2577 char buf[100];
2578 rc = getgrgid_r(gid,&result,buf,sizeof(buf),&ptr);
2580 ; return 0; }
2582 if { (eval echo configure:2583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2583 rm -rf conftest*
2584 mh_cv_getgrgid_r_int5=yes
2585 else
2586 echo "configure: failed program was:" >&5
2587 cat conftest.$ac_ext >&5
2588 rm -rf conftest*
2589 mh_cv_getgrgid_r_int5=no
2591 rm -f conftest*
2594 echo "$ac_t""$mh_cv_getgrgid_r_int5" 1>&6
2595 if test $mh_cv_getgrgid_r_int5 = yes; then
2596 cat >> confdefs.h <<\EOF
2597 #define HAVE_GETGRGID_R_RETURNS_INT_5_PARAMS 1
2604 echo $ac_n "checking if getgrgid_r has 5 args and returns an int""... $ac_c" 1>&6
2605 echo "configure:2606: checking if getgrgid_r has 5 args and returns an int" >&5
2606 if eval "test \"`echo '$''{'mh_cv_getgrgid_r_int5'+set}'`\" = set"; then
2607 echo $ac_n "(cached) $ac_c" 1>&6
2608 else
2609 cat > conftest.$ac_ext <<EOF
2610 #line 2611 "configure"
2611 #include "confdefs.h"
2612 #include <sys/types.h>
2613 #include <grp.h>
2614 #include <pwd.h>
2615 int main() {
2617 struct group *ptr,result;
2618 int rc;
2619 gid_t gid;
2620 char buf[100];
2621 rc = getgrgid_r(gid,&result,buf,sizeof(buf),&ptr);
2623 ; return 0; }
2625 if { (eval echo configure:2626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2626 rm -rf conftest*
2627 mh_cv_getgrgid_r_int5=yes
2628 else
2629 echo "configure: failed program was:" >&5
2630 cat conftest.$ac_ext >&5
2631 rm -rf conftest*
2632 mh_cv_getgrgid_r_int5=no
2634 rm -f conftest*
2637 echo "$ac_t""$mh_cv_getgrgid_r_int5" 1>&6
2638 if test $mh_cv_getgrgid_r_int5 = yes; then
2639 cat >> confdefs.h <<\EOF
2640 #define HAVE_GETGRGID_R_RETURNS_INT_5_PARAMS 1
2645 if test "$mh_cv_getgrgid_r_int5" = "no"; then
2646 echo $ac_n "checking if getgrgid_r has 4 args and returns an int""... $ac_c" 1>&6
2647 echo "configure:2648: checking if getgrgid_r has 4 args and returns an int" >&5
2648 if eval "test \"`echo '$''{'mh_cv_getgrgid_r_int4'+set}'`\" = set"; then
2649 echo $ac_n "(cached) $ac_c" 1>&6
2650 else
2651 cat > conftest.$ac_ext <<EOF
2652 #line 2653 "configure"
2653 #include "confdefs.h"
2654 #include <sys/types.h>
2655 #include <grp.h>
2656 #include <pwd.h>
2657 int main() {
2659 struct group *ptr,result;
2660 int rc;
2661 gid_t gid;
2662 char buf[100];
2663 rc = getgrgid_r(gid,&result,buf,sizeof(buf));
2665 ; return 0; }
2667 if { (eval echo configure:2668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2668 rm -rf conftest*
2669 mh_cv_getgrgid_r_int4=yes
2670 else
2671 echo "configure: failed program was:" >&5
2672 cat conftest.$ac_ext >&5
2673 rm -rf conftest*
2674 mh_cv_getgrgid_r_int4=no
2676 rm -f conftest*
2679 echo "$ac_t""$mh_cv_getgrgid_r_int4" 1>&6
2680 if test $mh_cv_getgrgid_r_int4 = yes; then
2681 cat >> confdefs.h <<\EOF
2682 #define HAVE_GETGRGID_R_RETURNS_INT_4_PARAMS 1
2687 if test "$mh_cv_getgrgid_r_int4" = "no"; then
2688 echo $ac_n "checking if getgrgid_r returns a struct group *""... $ac_c" 1>&6
2689 echo "configure:2690: checking if getgrgid_r returns a struct group *" >&5
2690 if eval "test \"`echo '$''{'mh_cv_getgrgid_r_struct'+set}'`\" = set"; then
2691 echo $ac_n "(cached) $ac_c" 1>&6
2692 else
2693 cat > conftest.$ac_ext <<EOF
2694 #line 2695 "configure"
2695 #include "confdefs.h"
2696 #include <sys/types.h>
2697 #include <grp.h>
2698 #include <pwd.h>
2699 int main() {
2701 struct group *ptr,result;
2702 int rc;
2703 gid_t gid;
2704 char buf[100];
2705 ptr = getgrgid_r(gid,&result,buf,sizeof(buf));
2707 ; return 0; }
2709 if { (eval echo configure:2710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2710 rm -rf conftest*
2711 mh_cv_getgrgid_r_struct=yes
2712 else
2713 echo "configure: failed program was:" >&5
2714 cat conftest.$ac_ext >&5
2715 rm -rf conftest*
2716 mh_cv_getgrgid_r_struct=no
2718 rm -f conftest*
2721 echo "$ac_t""$mh_cv_getgrgid_r_struct" 1>&6
2722 if test $mh_cv_getgrgid_r_struct = yes; then
2723 cat >> confdefs.h <<\EOF
2724 #define HAVE_GETGRGID_R_RETURNS_STRUCT 1
2731 esac
2732 echo $ac_n "checking if getpwuid_r returns an int""... $ac_c" 1>&6
2733 echo "configure:2734: checking if getpwuid_r returns an int" >&5
2734 if eval "test \"`echo '$''{'mh_cv_getpwuid_r_int'+set}'`\" = set"; then
2735 echo $ac_n "(cached) $ac_c" 1>&6
2736 else
2737 cat > conftest.$ac_ext <<EOF
2738 #line 2739 "configure"
2739 #include "confdefs.h"
2740 #include <sys/types.h>
2741 #include <grp.h>
2742 #include <pwd.h>
2743 int main() {
2745 struct passwd *ptr,*result;
2746 int rc;
2747 uid_t uid;
2748 char buf[100];
2749 rc = getpwuid_r(uid,&result,buf,sizeof(buf),&ptr);
2751 ; return 0; }
2753 if { (eval echo configure:2754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2754 rm -rf conftest*
2755 mh_cv_getpwuid_r_int=yes
2756 else
2757 echo "configure: failed program was:" >&5
2758 cat conftest.$ac_ext >&5
2759 rm -rf conftest*
2760 mh_cv_getpwuid_r_int=no
2762 rm -f conftest*
2765 echo "$ac_t""$mh_cv_getpwuid_r_int" 1>&6
2766 if test $mh_cv_getpwuid_r_int = yes; then
2767 cat >> confdefs.h <<\EOF
2768 #define HAVE_GETPWUID_R_RETURNS_INT 1
2773 if test "$mh_cv_getpwuid_r_int" = "no"; then
2774 echo $ac_n "checking if getpwuid_r returns a struct passwd *""... $ac_c" 1>&6
2775 echo "configure:2776: checking if getpwuid_r returns a struct passwd *" >&5
2776 if eval "test \"`echo '$''{'mh_cv_getpwuid_r_struct'+set}'`\" = set"; then
2777 echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779 cat > conftest.$ac_ext <<EOF
2780 #line 2781 "configure"
2781 #include "confdefs.h"
2782 #include <sys/types.h>
2783 #include <grp.h>
2784 #include <pwd.h>
2785 int main() {
2787 struct group *ptr,*result;
2788 int rc;
2789 uid_t uid;
2790 char buf[100];
2791 ptr = getpwuid_r(uid,&result,buf,sizeof(buf));
2793 ; return 0; }
2795 if { (eval echo configure:2796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2796 rm -rf conftest*
2797 mh_cv_getpwuid_r_struct=yes
2798 else
2799 echo "configure: failed program was:" >&5
2800 cat conftest.$ac_ext >&5
2801 rm -rf conftest*
2802 mh_cv_getpwuid_r_struct=no
2804 rm -f conftest*
2807 echo "$ac_t""$mh_cv_getpwuid_r_struct" 1>&6
2808 if test $mh_cv_getpwuid_r_struct = yes; then
2809 cat >> confdefs.h <<\EOF
2810 #define HAVE_GETPWUID_R_RETURNS_STRUCT 1
2816 CFLAGS="$save_CFLAGS"
2817 REGINAMULTITHREAD="yes"
2818 else
2819 REGINAMULTITHREAD="no"
2823 # Check whether --enable-tracemem or --disable-tracemem was given.
2824 if test "${enable_tracemem+set}" = set; then
2825 enableval="$enable_tracemem"
2826 with_tracemem=$enableval
2827 else
2828 with_tracemem=no
2831 if test "$with_tracemem" = yes; then
2832 TRACEMEM="-DTRACEMEM"
2833 else
2834 TRACEMEM=""
2838 # Check whether --enable-flists or --disable-flists was given.
2839 if test "${enable_flists+set}" = set; then
2840 enableval="$enable_flists"
2841 with_flists=$enableval
2842 else
2843 with_flists=yes
2846 if test "$with_flists" = no; then
2847 FLISTS="-DNOFLISTS"
2848 else
2849 FLISTS=""
2853 # Check whether --with-socket or --without-socket was given.
2854 if test "${with_socket+set}" = set; then
2855 withval="$with_socket"
2856 with_socket=$withval
2857 else
2858 with_socket=no
2861 if test "$with_socket" = no; then
2862 REXXSOCKET=""
2863 else
2864 REXXSOCKET="-DRXSOCKET=$with_socket"
2868 # Check whether --with-dlfcnincdir or --without-dlfcnincdir was given.
2869 if test "${with_dlfcnincdir+set}" = set; then
2870 withval="$with_dlfcnincdir"
2871 with_dlfcnincdir=$withval
2872 else
2873 with_dlfcnincdir=no
2876 if test "$with_dlfcnincdir" = no; then
2877 DLFCNINCDIR=""
2878 for ac_hdr in dlfcn.h
2880 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2881 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2882 echo "configure:2883: checking for $ac_hdr" >&5
2883 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2884 echo $ac_n "(cached) $ac_c" 1>&6
2885 else
2886 cat > conftest.$ac_ext <<EOF
2887 #line 2888 "configure"
2888 #include "confdefs.h"
2889 #include <$ac_hdr>
2891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2892 { (eval echo configure:2893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2894 if test -z "$ac_err"; then
2895 rm -rf conftest*
2896 eval "ac_cv_header_$ac_safe=yes"
2897 else
2898 echo "$ac_err" >&5
2899 echo "configure: failed program was:" >&5
2900 cat conftest.$ac_ext >&5
2901 rm -rf conftest*
2902 eval "ac_cv_header_$ac_safe=no"
2904 rm -f conftest*
2906 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2907 echo "$ac_t""yes" 1>&6
2908 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2909 cat >> confdefs.h <<EOF
2910 #define $ac_tr_hdr 1
2913 else
2914 echo "$ac_t""no" 1>&6
2916 done
2918 else
2919 if test -f "$with_dlfcnincdir/dlfcn.h"; then
2920 DLFCNINCDIR="-I$with_dlfcnincdir"
2921 HAVE_DLFCN_H="1"
2922 cat >> confdefs.h <<\EOF
2923 #define HAVE_DLFCN_H 1
2926 else
2927 { echo "configure: error: dlfcn.h not found in \"$with_dlfcnincdir\" as specified in --with-dlfcnincdir switch; cannot continue" 1>&2; exit 1; }
2934 echo $ac_n "checking shared library/external function extensions""... $ac_c" 1>&6
2935 echo "configure:2936: checking shared library/external function extensions" >&5
2936 SHLPST=".so"
2937 MODPST=".so"
2939 case "$target" in
2940 *hp-hpux*)
2941 SHLPST=".sl"
2942 MODPST=".sl"
2944 *ibm-aix*)
2945 SHLPST=".a"
2946 MODPST=".a"
2948 *nto-qnx*)
2950 *qnx*)
2951 SHLPST=""
2952 MODPST=""
2954 *cygwin*)
2955 SHLPST=".dll"
2956 MODPST=".dll"
2958 *darwin*)
2959 SHLPST=".dylib"
2960 MODPST=".so"
2962 esac
2965 echo "$ac_t""$SHLPST/$MODPST" 1>&6
2967 # Check whether --with-dlfcnlibdir or --without-dlfcnlibdir was given.
2968 if test "${with_dlfcnlibdir+set}" = set; then
2969 withval="$with_dlfcnlibdir"
2970 with_dlfcnlibdir=$withval
2971 else
2972 with_dlfcnlibdir=no
2975 if test "$with_dlfcnlibdir" = no; then
2976 DLFCNLIBDIR=""
2977 else
2978 if test -f "$with_dlfcnlibdir/libdl$SHLPST"; then
2979 DLFCNLIBDIR="-L$with_dlfcnlibdir -ldl"
2980 else
2981 { echo "configure: error: libdl$SHLPST not found in \"$with_dlfcnlibdir\" as specified in --with-dlfcnlibdir switch; cannot continue" 1>&2; exit 1; }
2988 SHLPRE="lib"
2989 LIBFILE="regina"
2990 SHLFILE="regina"${THREADING_FNAME}
2991 OSAVE=".o.save"
2992 OBJ="o"
2993 EXE=""
2994 LIBPST=".a"
2995 LIBPRE="lib"
2996 LIBEXE="ar"
2997 GETOPT=""
2998 OBJECTS='$('OFILES')'
2999 STATIC_LDFLAGS=""
3000 AIX_DYN="no"
3001 BEOS_DYN="no"
3004 case "$target" in
3005 *hp-hpux9*)
3006 SYS_DEFS="-D_HPUX_SOURCE"
3007 cat >> confdefs.h <<\EOF
3008 #define SELECT_IN_TIME_H 1
3012 *hp-hpux*)
3013 SYS_DEFS="-D_HPUX_SOURCE"
3015 *ibm-aix3*|*ibm-aix4.1*)
3016 SYS_DEFS="-D_ALL_SOURCE -DAIX"
3018 *ibm-aix*)
3019 SYS_DEFS="-D_ALL_SOURCE -DAIX"
3020 DYN_COMP="-DDYNAMIC"
3022 *dec-osf*)
3023 if test "$ac_cv_prog_CC" = "gcc"; then
3024 SYS_DEFS="-D_POSIX_SOURCE -D_XOPEN_SOURCE"
3025 else
3026 SYS_DEFS="-D_POSIX_SOURCE -D_XOPEN_SOURCE -Olimit 800"
3029 sparc*sunos*)
3030 SYS_DEFS="-DSUNOS -DSUNOS_STRTOD_BUG"
3032 *nto-qnx*)
3034 *qnx*)
3035 LIBPRE=""
3036 LIBPST=".lib"
3037 SHLPRE=""
3038 SHLPST=""
3040 *cygwin*)
3041 LIBPRE="lib"
3042 SHLPRE=""
3043 DYN_COMP="-DDYNAMIC"
3044 LIBPST=".a"
3045 EXE=".exe"
3047 *darwin*)
3048 DYN_COMP="-fno-common"
3050 esac
3052 if test "$DYN_COMP" = ""; then
3053 echo $ac_n "checking compiler flags for a dynamic object""... $ac_c" 1>&6
3054 echo "configure:3055: checking compiler flags for a dynamic object" >&5
3056 cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 int a=0
3061 DYN_COMP=""
3062 mh_cv_stop=no
3063 save_cflags="$CFLAGS"
3064 mh_cv_flags="-fPIC -KPIC +Z"
3065 for a in $mh_cv_flags; do
3066 CFLAGS="-c $a"
3068 mh_compile='${CC-cc} -c $CFLAGS conftest.$ac_ext > conftest.tmp 2>&1'
3069 if { (eval echo configure:3070: \"$mh_compile\") 1>&5; (eval $mh_compile) 2>&5; }; then
3070 DYN_COMP=""
3071 else
3072 slash="\\"
3073 mh_dyncomp="`egrep -c $slash$a conftest.tmp`"
3074 if test "$mh_dyncomp" = "0"; then
3075 DYN_COMP="$a -DDYNAMIC"
3076 echo "$ac_t""$a" 1>&6
3077 break
3078 else
3079 DYN_COMP=""
3082 done
3083 if test "$DYN_COMP" = ""; then
3084 echo "$ac_t""none of $mh_cv_flags supported" 1>&6
3086 CFLAGS=$save_cflags
3087 rm -f conftest.*
3090 SHL_LD=""
3091 TEST1EXPORTS=""
3092 TEST2EXPORTS=""
3093 TEST1EXP=""
3094 TEST2EXP=""
3095 REGINAEXP=""
3097 # If the build OS can handle version numbers in the shared library name,
3098 # then set SHL_BASE="${SHLPRE}${SHLFILE}${SHLPST}.\$(ABI)"
3099 SHL_BASE="${SHLPRE}${SHLFILE}${SHLPST}"
3101 # OTHER_INSTALLS is set to install a non-version numbered shared library
3102 # by default; ie. no .\$(ABI) suffix. If the regina executable is not built,
3103 # then there is no shared library. Set OTHER_INSTALLS="installabilib" if you
3104 # are building a version numbered shared library.
3105 OTHER_INSTALLS="installlib"
3106 BASE_INSTALL="installbase"
3107 BASE_BINARY="binarybase"
3108 USE_ABI="no"
3109 BUNDLE=""
3110 EXTRATARGET=""
3111 case "$target" in
3112 *hp-hpux*)
3113 EEXTRA="-Wl,-E"
3114 LD_RXLIB_A1="ld -b -q -n"
3115 LD_RXLIB_A2="ld -b -q -n"
3116 # LD_RXLIB1="${CC} -Wl,-b,-q,-n"
3117 LD_RXLIB_B1=""
3118 LD_RXLIB_B2=""
3119 DYNAMIC_LDFLAGS="-Wl,+s"
3120 SHLPRE="lib"
3121 RXLIBLEN="6"
3122 SHL_LD="ld -b -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3123 # SHL_LD="${CC} -Wl,-b -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3125 # *ibm-aix4.2*)
3126 # STATIC_LDFLAGS="-bnso -bI:/lib/syscalls.exp"
3127 # LD_RXLIB1="ld -G"
3128 # LD_RXLIB2=""
3129 # SHLPRE="lib"
3130 # RXLIBLEN="6"
3131 # SHL_LD="ld -o ${SHLPRE}${SHLFILE}${SHLPST} -shared -no_archive "'$('SHOFILES')'" -lc"
3132 # ;;
3133 *ibm-aix3*)
3134 STATIC_LDFLAGS="-bnso -bI:/lib/syscalls.exp"
3135 LD_RXLIB_A1="ld -bnoentry -bM:SRE -bT:512 -bH:512 -bI:regina.exp"
3136 LD_RXLIB_A2="ld -bnoentry -bM:SRE -bT:512 -bH:512 -bI:regina.exp"
3137 LD_RXLIB_B1="${SHLPRE}${SHLFILE}${SHLPST} -lc"
3138 LD_RXLIB_B2="${SHLPRE}${SHLFILE}${SHLPST} -lc"
3139 SHLPRE="lib"
3140 RXLIBLEN="5"
3141 TEST1EXPORTS="-bE:test1.exp"
3142 TEST2EXPORTS="-bE:test2.exp"
3143 TEST1EXP="test1.exp"
3144 TEST2EXP="test2.exp"
3145 REGINAEXP="regina.exp"
3146 if test "$ac_cv_header_dlfcn_h" = "yes" -o "$HAVE_DLFCN_H" = "1"; then
3147 AIX_DYN="yes"
3148 DYN_COMP="-DDYNAMIC"
3149 SHL_LD="ld -o ${SHLPRE}${SHLFILE}${SHLPST} -bnoentry -bE:regina.exp -bM:SRE -bT:512 -bH:512 "'$('SHOFILES')'" -lc"
3150 else
3151 SHL_LD=" "'$('LIBEXE')'" "'$('LIBFLAGS')'" "'$('SHOFILES')'
3152 DYN_COMP=""
3155 *ibm-aix*)
3156 STATIC_LDFLAGS="-bnso -bI:/lib/syscalls.exp"
3157 LD_RXLIB_A1="ld -bnoentry -bM:SRE"
3158 LD_RXLIB_A2="ld -bnoentry -bM:SRE"
3159 LD_RXLIB_B1="${SHLPRE}${SHLFILE}${SHLPST} -lc"
3160 LD_RXLIB_B2="${SHLPRE}${SHLFILE}${SHLPST} -lc"
3161 SHLPRE="lib"
3162 RXLIBLEN="5"
3163 TEST1EXPORTS="-bE:test1.exp"
3164 TEST2EXPORTS="-bE:test2.exp"
3165 TEST1EXP="test1.exp"
3166 TEST2EXP="test2.exp"
3167 REGINAEXP="regina.exp"
3168 if test "$ac_cv_header_dlfcn_h" = "yes" -o "$HAVE_DLFCN_H" = "1"; then
3169 AIX_DYN="yes"
3170 DYN_COMP="-DDYNAMIC"
3171 SHL_LD="ld -o ${SHLPRE}${SHLFILE}${SHLPST} -bnoentry -bE:regina.exp -bM:SRE "'$('SHOFILES')'" -lc "'$('SHLIBS')'
3172 else
3173 SHL_LD=" "'$('LIBEXE')'" "'$('LIBFLAGS')'" "'$('SHOFILES')'
3174 DYN_COMP=""
3177 *dec-osf*)
3178 LD_RXLIB_A1="ld -shared"
3179 LD_RXLIB_A2="ld -shared"
3180 LD_RXLIB_B1="-lc -L. -l${SHLFILE}"
3181 LD_RXLIB_B2="-lc -L. -l${SHLFILE}"
3182 SHLPRE="lib"
3183 RXLIBLEN="6"
3184 SHL_LD="ld -o ${SHLPRE}${SHLFILE}${SHLPST} -shared -no_archive "'$('SHOFILES')'" -lc"
3186 *esix*)
3187 LD_RXLIB_A1="ld -G"
3188 LD_RXLIB_A2="ld -G"
3189 LD_RXLIB_B1=""
3190 LD_RXLIB_B2=""
3191 DYNAMIC_LDFLAGS=""
3192 SHLPRE="lib"
3193 RXLIBLEN="6"
3194 SHL_LD="ld -G -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3196 *dgux*)
3197 LD_RXLIB_A1="ld -G"
3198 LD_RXLIB_A2="ld -G"
3199 LD_RXLIB_B1=""
3200 LD_RXLIB_B2=""
3201 DYNAMIC_LDFLAGS=""
3202 SHLPRE="lib"
3203 RXLIBLEN="6"
3204 SHL_LD="ld -G -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3206 *pc-sco*)
3207 LD_RXLIB_A1="ld -dy -G"
3208 LD_RXLIB_A2="ld -dy -G"
3209 LD_RXLIB_B1=""
3210 LD_RXLIB_B2=""
3211 DYNAMIC_LDFLAGS=""
3212 SHLPRE="lib"
3213 RXLIBLEN="6"
3214 SHL_LD="ld -dy -G -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3216 *solaris*)
3217 if test "$ac_cv_prog_CC" = "gcc"; then
3218 LD_RXLIB_A1="gcc -shared"
3219 LD_RXLIB_A2="gcc -shared"
3220 SHL_LD="gcc -shared -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3221 else
3222 LD_RXLIB_A1="ld -G"
3223 LD_RXLIB_A2="ld -G"
3224 SHL_LD="ld -G -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3226 LD_RXLIB_B1=""
3227 LD_RXLIB_B2=""
3228 DYNAMIC_LDFLAGS=""
3229 SHLPRE="lib"
3230 RXLIBLEN="6"
3232 sparc*sunos*)
3233 LD_RXLIB_A1="ld"
3234 LD_RXLIB_A2="ld"
3235 LD_RXLIB_B1=""
3236 LD_RXLIB_B2=""
3237 SHLPRE="lib"
3238 RXLIBLEN="6"
3239 SHL_LD="ld -assert pure-text -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3241 *freebsd*)
3242 LD_RXLIB_A1="ld -Bdynamic -Bshareable"
3243 LD_RXLIB_A2="ld -Bdynamic -Bshareable"
3244 LD_RXLIB_B1="-lc -L. -l${SHLFILE}"
3245 LD_RXLIB_B2="-lc -L. -l${SHLFILE}"
3246 SHLPRE="lib"
3247 RXLIBLEN="6"
3248 SHL_LD="ld -Bdynamic -Bshareable -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3250 *linux*)
3251 LD_RXLIB_A1="${CC} -shared"
3252 LD_RXLIB_A2="${CC} -shared"
3253 LD_RXLIB_B1="-L. -l${SHLFILE}"
3254 LD_RXLIB_B2="-L. -l${SHLFILE}"
3255 SHLPRE="lib"
3256 RXLIBLEN="6"
3257 SHL_LD="${CC} -o ${SHLPRE}${SHLFILE}${SHLPST}.\$(ABI) -shared ${SHL_SCRIPT} -Wl,-soname=${SHLPRE}${SHLFILE}${SHLPST}.\$(ABI) \$(SHOFILES) -lc"
3258 SHL_BASE="${SHLPRE}${SHLFILE}${SHLPST}.\$(ABI)"
3259 OTHER_INSTALLS="installabilib"
3260 USE_ABI="yes"
3262 *atheos*)
3263 LD_RXLIB_A1="${CC} -shared"
3264 LD_RXLIB_A2="${CC} -shared"
3265 LD_RXLIB_B1="-L. -l${SHLFILE} "'$('BOTHLIBS')'
3266 LD_RXLIB_B2="-L. -l${SHLFILE} "'$('BOTHLIBS')'
3267 SHLPRE="lib"
3268 RXLIBLEN="6"
3269 SHL_LD="${CC} -o ${SHLPRE}${SHLFILE}${SHLPST} -shared -Wl,-soname=${SHLPRE}${SHLFILE}${SHLPST} \$(SHOFILES) "'$('BOTHLIBS')'
3270 SHL_BASE="${LIBPRE}${SHLFILE}${SHLPST}"
3271 BASE_BINARY="atheosbinary"
3273 *beos*)
3274 LD_RXLIB_A1="${CC} -Wl,-shared -nostart -Xlinker -soname=\$(@)"
3275 LD_RXLIB_A2="${CC} -Wl,-shared -nostart -Xlinker -soname=\$(@)"
3276 LD_RXLIB_B1="-L. -l${SHLFILE}"
3277 LD_RXLIB_B2="-L. -l${SHLFILE}"
3278 SHLPRE="lib"
3279 RXLIBLEN="6"
3280 SHL_LD="${CC} -o ${SHLPRE}${SHLFILE}${SHLPST} -Wl,-shared -nostart -Xlinker -soname=${SHLPRE}${SHLFILE}${SHLPST} \$(SHOFILES)"
3281 SHL_BASE="${SHLPRE}${SHLFILE}${SHLPST}"
3282 BEOS_DYN="yes"
3283 BASE_INSTALL="beosinstall"
3284 BASE_BINARY="beosbinary"
3285 OTHER_INSTALLS=""
3287 *nto-qnx*)
3288 LD_RXLIB_A1="${CC} -shared"
3289 LD_RXLIB_A2="${CC} -shared"
3290 LD_RXLIB_B1="-L. -l${SHLFILE}"
3291 LD_RXLIB_B2="-L. -l${SHLFILE}"
3292 SHLPRE="lib"
3293 RXLIBLEN="6"
3294 SHL_LD="${CC} -o ${SHLPRE}${SHLFILE}${SHLPST} -shared -Wl,-soname=${SHLPRE}${SHLFILE}${SHLPST} \$(SHOFILES)"
3295 SHL_BASE="${SHLPRE}${SHLFILE}${SHLPST}"
3297 *qnx*)
3298 LD_RXLIB_A1=""
3299 LD_RXLIB_A2=""
3300 LD_RXLIB_B1=""
3301 LD_RXLIB_B2=""
3302 SHLPRE=""
3303 # set SHLPST and BUNDLE to unique junk names to stop the Makefile
3304 # getting duplicate targets
3305 SHLPST=".junk1"
3306 BUNDLE=".junk2"
3307 SHL_LD=""
3308 EEXTRA="-mf -N0x20000 -Q"
3309 LIBPRE=""
3310 LIBPST=".lib"
3312 *cygwin*)
3313 LD_RXLIB_A1="dllwrap --target i386-cygwin32 --def ${srcdir}/test1_w32_dll.def --dllname test1.dll"
3314 LD_RXLIB_A2="dllwrap --target i386-cygwin32 --def ${srcdir}/test2_w32_dll.def --dllname test2.dll"
3315 LD_RXLIB_B1="-L. -lregina"
3316 LD_RXLIB_B2="-L. -lregina"
3317 SHLPRE=""
3318 SHL_LD="dllwrap --def ${srcdir}/regina_w32_dll.def --output-lib libregina.a --target i386-cygwin32 --dllname regina.dll -o regina.dll \$(SHOFILES) -lcrypt"
3319 EEXTRA=""
3320 LIBPRE="lib"
3321 LIBPST=".a"
3322 LIBFILE="rexx"
3323 SHL_BASE="${SHLPRE}${SHLFILE}${SHLPST}"
3324 TEST1EXPORTS="test1.def"
3325 TEST2EXPORTS="test2.def"
3326 TEST1EXP="test1.def"
3327 TEST2EXP="test2.def"
3328 REGINAEXP="regina.def"
3329 BASE_INSTALL="cygwininstall"
3330 BASE_BINARY="cygwinbinary"
3331 OTHER_INSTALLS=""
3333 *darwin*)
3334 # to test use: --build=ppc-apple-darwin10.1 --target=ppc-apple-darwin10.1
3336 # Link switches for building "bundles"
3338 LD_RXLIB_A1="${CC} -bundle -flat_namespace -undefined suppress"
3339 LD_RXLIB_A2="${CC} -bundle -flat_namespace -undefined suppress"
3340 LD_RXLIB_B1="-lc \$(SHLIBS)"
3341 LD_RXLIB_B2="-lc \$(SHLIBS)"
3342 DYN_COMP="-DDYNAMIC -fno-common"
3343 SHLPRE="lib"
3344 BUNDLE=".so"
3345 SHL_LD="${CC} -dynamiclib -install_name \$(libdir)/${SHLPRE}${SHLFILE}${SHLPST} -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3346 SHL_BASE="${LIBPRE}${SHLFILE}${SHLPST}"
3347 EXTRATARGET="libregina$BUNDLE"
3348 OTHER_INSTALLS="installlib installmacosx"
3352 echo $ac_n "checking how to create a shared library""... $ac_c" 1>&6
3353 echo "configure:3354: checking how to create a shared library" >&5
3354 mh_compile='${CC-cc} -c $DYN_COMP conftest.$ac_ext 1>&5'
3355 cat > conftest.$ac_ext <<EOF
3356 #line 3357 "configure"
3357 int foo()
3359 return(0);
3362 if { (eval echo configure:3363: \"$mh_compile\") 1>&5; (eval $mh_compile) 2>&5; } && test -s conftest.o; then
3363 mh_dyn_link='ld -shared -o conftest.so.1.0 conftest.o -lc 1>&5'
3364 # mh_dyn_link='${CC} -Wl,-shared -o conftest.so.1.0 conftest.o -lc 1>&AC_FD_CC'
3365 if { (eval echo configure:3366: \"$mh_dyn_link\") 1>&5; (eval $mh_dyn_link) 2>&5; } && test -s conftest.so.1.0; then
3366 SHL_LD="ld -shared -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'" -lc"
3367 # SHL_LD="${CC} -Wl,-shared -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'" -lc"
3368 else
3369 mh_dyn_link='ld -G -o conftest.so.1.0 conftest.o 1>&5'
3370 # mh_dyn_link='${CC} -Wl,-G -o conftest.so.1.0 conftest.o 1>&AC_FD_CC'
3371 if { (eval echo configure:3372: \"$mh_dyn_link\") 1>&5; (eval $mh_dyn_link) 2>&5; } && test -s conftest.so.1.0; then
3372 SHL_LD="ld -G -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3373 # SHL_LD="${CC} -Wl,-G -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3374 else
3375 mh_dyn_link='ld -o conftest.so.1.0 -shared -no_archive conftest.o -lc 1>&5'
3376 # mh_dyn_link='${CC} -o conftest.so.1.0 -Wl,-shared,-no_archive conftest.o -lc 1>&AC_FD_CC'
3377 if { (eval echo configure:3378: \"$mh_dyn_link\") 1>&5; (eval $mh_dyn_link) 2>&5; } && test -s conftest.so.1.0; then
3378 SHL_LD="ld -o ${SHLPRE}${SHLFILE}${SHLPST} -shared -no_archive "'$('SHOFILES')'" -lc"
3379 # SHL_LD="${CC} -o ${SHLPRE}${SHLFILE}${SHLPST} -Wl,-shared,-no_archive "'$('SHOFILES')'" -lc"
3380 else
3381 mh_dyn_link='ld -b -o conftest.so.1.0 conftest.o 1>&5'
3382 # mh_dyn_link='${CC} -Wl,-b -o conftest.so.1.0 conftest.o 1>&AC_FD_CC'
3383 if { (eval echo configure:3384: \"$mh_dyn_link\") 1>&5; (eval $mh_dyn_link) 2>&5; } && test -s conftest.so.1.0; then
3384 SHL_LD="ld -b -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3385 # SHL_LD="${CC} -Wl,-b -o ${SHLPRE}${SHLFILE}.${SHLPST} "'$('SHOFILES')'
3386 else
3387 mh_dyn_link='ld -Bshareable -o conftest.so.1.0 conftest.o 1>&5'
3388 # mh_dyn_link='${CC} -Wl,-Bshareable -o conftest.so.1.0 conftest.o 1>&AC_FD_CC'
3389 if { (eval echo configure:3390: \"$mh_dyn_link\") 1>&5; (eval $mh_dyn_link) 2>&5; } && test -s conftest.so.1.0; then
3390 SHL_LD="ld -Bshareable -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3391 # SHL_LD="${CC} -Wl,-Bshareable -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3392 else
3393 mh_dyn_link='ld -assert pure-text -o conftest.so.1.0 conftest.o 1>&5'
3394 # mh_dyn_link='${CC} -Wl,-assert pure-text -o conftest.so.1.0 conftest.o 1>&AC_FD_CC'
3395 if { (eval echo configure:3396: \"$mh_dyn_link\") 1>&5; (eval $mh_dyn_link) 2>&5; } && test -s conftest.so.1.0; then
3396 SHL_LD="ld -assert pure-text -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3397 # SHL_LD="${CC} -Wl,-assert pure-text -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
3398 else
3399 SHL_LD=""
3407 if test "$SHL_LD" = ""; then
3408 echo "$ac_t""unknown" 1>&6
3409 else
3410 echo "$ac_t""found" 1>&6
3412 rm -f conftest*
3415 mh_compile='${CC-cc} -c $DYN_COMP conftest.$ac_ext 1>&5'
3416 cat > conftest.$ac_ext <<EOF
3417 #line 3418 "configure"
3418 int foo()
3420 return(0);
3423 if { (eval echo configure:3424: \"$mh_compile\") 1>&5; (eval $mh_compile) 2>&5; } && test -s conftest.o; then
3424 mh_dyn_link='ld -shared -o conftest.rxlib conftest.o -lc 1>&5'
3425 # mh_dyn_link='${CC} -Wl,-shared -o conftest.rxlib conftest.o -lc 1>&AC_FD_CC'
3426 if { (eval echo configure:3427: \"$mh_dyn_link\") 1>&5; (eval $mh_dyn_link) 2>&5; } && test -s conftest.rxlib; then
3427 LD_RXLIB_A1="ld -shared"
3428 LD_RXLIB_A2="ld -shared"
3429 # LD_RXLIB1="${CC} -Wl,-shared"
3430 LD_RXLIB_B1="-L. -l${SHLFILE}"
3431 LD_RXLIB_B2="-L. -l${SHLFILE}"
3432 SHLPRE="lib"
3433 SHLPST=".so"
3434 RXLIBLEN="6"
3435 else
3436 mh_dyn_link='ld -G -o conftest.rxlib conftest.o 1>&5'
3437 # mh_dyn_link='${CC} -Wl,-G -o conftest.rxlib conftest.o 1>&AC_FD_CC'
3438 if { (eval echo configure:3439: \"$mh_dyn_link\") 1>&5; (eval $mh_dyn_link) 2>&5; } && test -s conftest.rxlib; then
3439 LD_RXLIB_A1="ld -G"
3440 LD_RXLIB_A2="ld -G"
3441 # LD_RXLIB1="${CC} -Wl,-G"
3442 LD_RXLIB_B1="-L. -l${SHLFILE}"
3443 LD_RXLIB_B2="-L. -l${SHLFILE}"
3444 SHLPRE="lib"
3445 SHLPST=".so"
3446 RXLIBLEN="6"
3447 else
3448 LD_RXLIB_A1=""
3449 LD_RXLIB_A2=""
3450 LD_RXLIB_B1=""
3451 LD_RXLIB_B2=""
3452 SHLPRE=""
3453 SHLPST=""
3454 RXLIBLEN="0"
3458 rm -f conftest*
3461 esac
3463 if test "$AIX_DYN" = "yes"; then
3464 STATICLIB=""
3465 else
3466 STATICLIB="${LIBPRE}${LIBFILE}${LIBPST}"
3469 LIBFLAGS="cr ${LIBPRE}${LIBFILE}${LIBPST}"
3470 LIBLINK="-L. -l${LIBFILE}"
3473 # For HPUX, we must link the "regina" executable with -lregina
3474 # otherwise you can't move the shared library anywhere other
3475 # than where it was built. Fix by PJM
3477 if test "$SHLPST" = ".sl"; then
3478 LINKSHL="$LIBLINK"
3479 else
3480 LINKSHL="${SHLPRE}${SHLFILE}${SHLPST}"
3483 echo $ac_n "checking if dynamic loading of external functions is supported""... $ac_c" 1>&6
3484 echo "configure:3485: checking if dynamic loading of external functions is supported" >&5
3485 if test "$HAVE_DLFCN_H" = "1" -o "$ac_cv_header_dl_h" = "yes" -o "$ac_cv_header_dlfcn_h" = "yes" -o "$AIX_DYN" = "yes" -o "$BEOS_DYN" = "yes"; then
3486 SHL_TARGETS="${SHL_BASE} regina${EXE} tregina${EXE} ${SHLPRE}test1${MODPST} ${SHLPRE}test2${MODPST} $EXTRATARGET"
3487 EXECISER_DEP="${SHL_BASE}"
3488 OTHER_INSTALLS="regina${EXE} tregina${EXE} $OTHER_INSTALLS"
3489 echo "$ac_t"""yes"" 1>&6
3490 else
3491 SHL_TARGETS=""
3492 EXECISER_DEP="${STATICLIB}"
3493 OTHER_INSTALLS=""
3494 echo "$ac_t"""no"" 1>&6
3544 if test "$ac_cv_header_dlfcn_h" = "yes" -o "$HAVE_DLFCN_H" = "1"; then
3545 echo $ac_n "checking if symbols need underscore prepended in loadable modules""... $ac_c" 1>&6
3546 echo "configure:3547: checking if symbols need underscore prepended in loadable modules" >&5
3547 tmpLIBS="$LIBS"
3548 save_cflags="$CFLAGS"
3549 LIBS="$LIBS $DLFCNLIBDIR"
3550 CFLAGS="$CFLAGS $DLFCNINCDIR"
3551 if eval "test \"`echo '$''{'mh_cv_uscore'+set}'`\" = set"; then
3552 echo $ac_n "(cached) $ac_c" 1>&6
3553 else
3555 cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3559 #include <dlfcn.h>
3560 int mh_underscore_test (void) { return 42; }
3561 int main() {
3562 void *f1 = (void*)0, *f2 = (void*)0, *handle;
3563 handle = dlopen ((void*)0, 0);
3564 if (handle) {
3565 f1 = dlsym (handle, "mh_underscore_test");
3566 f2 = dlsym (handle, "_mh_underscore_test");
3567 } return (!f2 || f1);
3570 if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3571 then
3572 mh_cv_uscore=yes
3573 else
3574 echo "configure: failed program was:" >&5
3575 cat conftest.$ac_ext >&5
3576 rm -fr conftest*
3577 mh_cv_uscore=no
3580 rm -fr conftest*
3584 echo "$ac_t""$mh_cv_uscore" 1>&6
3585 if test "x$mh_cv_uscore" = "xyes"; then
3586 cat >> confdefs.h <<\EOF
3587 #define MODULES_NEED_USCORE 1
3591 LIBS="$tmpLIBS"
3592 CFLAGS="$save_cflags"
3596 cat >> confdefs.h <<\EOF
3597 #define UNIX 1
3601 STARTUPDIR="/etc"
3602 if test -d /etc/rc.d/init.d; then
3603 STARTUPDIR="/etc/rc.d/init.d"
3604 else
3605 if test -d /etc/init.d; then
3606 STARTUPDIR="/etc/init.d"
3614 trap '' 1 2 15
3615 cat > confcache <<\EOF
3616 # This file is a shell script that caches the results of configure
3617 # tests run on this system so they can be shared between configure
3618 # scripts and configure runs. It is not useful on other systems.
3619 # If it contains results you don't want to keep, you may remove or edit it.
3621 # By default, configure uses ./config.cache as the cache file,
3622 # creating it if it does not exist already. You can give configure
3623 # the --cache-file=FILE option to use a different cache file; that is
3624 # what configure does when it calls configure scripts in
3625 # subdirectories, so they share the cache.
3626 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3627 # config.status only pays attention to the cache file if you give it the
3628 # --recheck option to rerun configure.
3631 # The following way of writing the cache mishandles newlines in values,
3632 # but we know of no workaround that is simple, portable, and efficient.
3633 # So, don't put newlines in cache variables' values.
3634 # Ultrix sh set writes to stderr and can't be redirected directly,
3635 # and sets the high bit in the cache file unless we assign to the vars.
3636 (set) 2>&1 |
3637 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3638 *ac_space=\ *)
3639 # `set' does not quote correctly, so add quotes (double-quote substitution
3640 # turns \\\\ into \\, and sed turns \\ into \).
3641 sed -n \
3642 -e "s/'/'\\\\''/g" \
3643 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3646 # `set' quotes correctly as required by POSIX, so do not add quotes.
3647 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3649 esac >> confcache
3650 if cmp -s $cache_file confcache; then
3652 else
3653 if test -w $cache_file; then
3654 echo "updating cache $cache_file"
3655 cat confcache > $cache_file
3656 else
3657 echo "not updating unwritable cache $cache_file"
3660 rm -f confcache
3662 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3664 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3665 # Let make expand exec_prefix.
3666 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3668 # Any assignment to VPATH causes Sun make to only execute
3669 # the first set of double-colon rules, so remove it if not needed.
3670 # If there is a colon in the path, we need to keep it.
3671 if test "x$srcdir" = x.; then
3672 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3675 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3677 DEFS=-DHAVE_CONFIG_H
3679 # Without the "./", some shells look in PATH for config.status.
3680 : ${CONFIG_STATUS=./config.status}
3682 echo creating $CONFIG_STATUS
3683 rm -f $CONFIG_STATUS
3684 cat > $CONFIG_STATUS <<EOF
3685 #! /bin/sh
3686 # Generated automatically by configure.
3687 # Run this file to recreate the current configuration.
3688 # This directory was configured as follows,
3689 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3691 # $0 $ac_configure_args
3693 # Compiler output produced by configure, useful for debugging
3694 # configure, is in ./config.log if it exists.
3696 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3697 for ac_option
3699 case "\$ac_option" in
3700 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3701 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3702 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3703 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3704 echo "$CONFIG_STATUS generated by autoconf version 2.13"
3705 exit 0 ;;
3706 -help | --help | --hel | --he | --h)
3707 echo "\$ac_cs_usage"; exit 0 ;;
3708 *) echo "\$ac_cs_usage"; exit 1 ;;
3709 esac
3710 done
3712 ac_given_srcdir=$srcdir
3714 trap 'rm -fr `echo "$mymakefile regina-config rxstack.init.d config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3716 cat >> $CONFIG_STATUS <<EOF
3718 # Protect against being on the right side of a sed subst in config.status.
3719 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3720 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3721 $ac_vpsub
3722 $extrasub
3723 s%@SHELL@%$SHELL%g
3724 s%@CFLAGS@%$CFLAGS%g
3725 s%@CPPFLAGS@%$CPPFLAGS%g
3726 s%@CXXFLAGS@%$CXXFLAGS%g
3727 s%@FFLAGS@%$FFLAGS%g
3728 s%@DEFS@%$DEFS%g
3729 s%@LDFLAGS@%$LDFLAGS%g
3730 s%@LIBS@%$LIBS%g
3731 s%@exec_prefix@%$exec_prefix%g
3732 s%@prefix@%$prefix%g
3733 s%@program_transform_name@%$program_transform_name%g
3734 s%@bindir@%$bindir%g
3735 s%@sbindir@%$sbindir%g
3736 s%@libexecdir@%$libexecdir%g
3737 s%@datadir@%$datadir%g
3738 s%@sysconfdir@%$sysconfdir%g
3739 s%@sharedstatedir@%$sharedstatedir%g
3740 s%@localstatedir@%$localstatedir%g
3741 s%@libdir@%$libdir%g
3742 s%@includedir@%$includedir%g
3743 s%@oldincludedir@%$oldincludedir%g
3744 s%@infodir@%$infodir%g
3745 s%@mandir@%$mandir%g
3746 s%@CC@%$CC%g
3747 s%@host@%$host%g
3748 s%@host_alias@%$host_alias%g
3749 s%@host_cpu@%$host_cpu%g
3750 s%@host_vendor@%$host_vendor%g
3751 s%@host_os@%$host_os%g
3752 s%@target@%$target%g
3753 s%@target_alias@%$target_alias%g
3754 s%@target_cpu@%$target_cpu%g
3755 s%@target_vendor@%$target_vendor%g
3756 s%@target_os@%$target_os%g
3757 s%@build@%$build%g
3758 s%@build_alias@%$build_alias%g
3759 s%@build_cpu@%$build_cpu%g
3760 s%@build_vendor@%$build_vendor%g
3761 s%@build_os@%$build_os%g
3762 s%@SYS_DEFS@%$SYS_DEFS%g
3763 s%@LEX@%$LEX%g
3764 s%@LEXLIB@%$LEXLIB%g
3765 s%@CPP@%$CPP%g
3766 s%@RANLIB@%$RANLIB%g
3767 s%@LN_S@%$LN_S%g
3768 s%@SET_MAKE@%$SET_MAKE%g
3769 s%@LIBOBJS@%$LIBOBJS%g
3770 s%@ALLOCA@%$ALLOCA%g
3771 s%@ALLOCA_SHO@%$ALLOCA_SHO%g
3772 s%@DEBUG@%$DEBUG%g
3773 s%@sharedir@%$sharedir%g
3774 s%@PURIFY@%$PURIFY%g
3775 s%@THREADING_COMPILE@%$THREADING_COMPILE%g
3776 s%@THREADING_LINK@%$THREADING_LINK%g
3777 s%@THREADING_FNAME@%$THREADING_FNAME%g
3778 s%@MT_FILE@%$MT_FILE%g
3779 s%@MH_MT_LIBS@%$MH_MT_LIBS%g
3780 s%@SHL_SCRIPT@%$SHL_SCRIPT%g
3781 s%@REGINAMULTITHREAD@%$REGINAMULTITHREAD%g
3782 s%@TRACEMEM@%$TRACEMEM%g
3783 s%@FLISTS@%$FLISTS%g
3784 s%@REXXSOCKET@%$REXXSOCKET%g
3785 s%@DLFCNINCDIR@%$DLFCNINCDIR%g
3786 s%@SHLPST@%$SHLPST%g
3787 s%@MODPST@%$MODPST%g
3788 s%@DLFCNLIBDIR@%$DLFCNLIBDIR%g
3789 s%@BASE_BINARY@%$BASE_BINARY%g
3790 s%@BASE_INSTALL@%$BASE_INSTALL%g
3791 s%@BOTHLIBS@%$BOTHLIBS%g
3792 s%@CC2O@%$CC2O%g
3793 s%@CEXTRA@%$CEXTRA%g
3794 s%@DYNAMIC_LDFLAGS@%$DYNAMIC_LDFLAGS%g
3795 s%@DYN_COMP@%$DYN_COMP%g
3796 s%@EEXTRA@%$EEXTRA%g
3797 s%@EXE@%$EXE%g
3798 s%@EXECISER_DEP@%$EXECISER_DEP%g
3799 s%@GETOPT@%$GETOPT%g
3800 s%@LD_RXLIB_A1@%$LD_RXLIB_A1%g
3801 s%@LD_RXLIB_A2@%$LD_RXLIB_A2%g
3802 s%@LD_RXLIB_B1@%$LD_RXLIB_B1%g
3803 s%@LD_RXLIB_B2@%$LD_RXLIB_B2%g
3804 s%@LIBEXE@%$LIBEXE%g
3805 s%@LIBFILE@%$LIBFILE%g
3806 s%@LIBFLAGS@%$LIBFLAGS%g
3807 s%@LIBLINK@%$LIBLINK%g
3808 s%@LIBPRE@%$LIBPRE%g
3809 s%@LIBPST@%$LIBPST%g
3810 s%@LINKSHL@%$LINKSHL%g
3811 s%@O2SAVE@%$O2SAVE%g
3812 s%@O2SHO@%$O2SHO%g
3813 s%@OBJ@%$OBJ%g
3814 s%@OBJECTS@%$OBJECTS%g
3815 s%@OSAVE@%$OSAVE%g
3816 s%@OTHER_INSTALLS@%$OTHER_INSTALLS%g
3817 s%@REGINAEXP@%$REGINAEXP%g
3818 s%@RXLIBLEN@%$RXLIBLEN%g
3819 s%@SAVE2O@%$SAVE2O%g
3820 s%@SHLFILE@%$SHLFILE%g
3821 s%@SHLIBS@%$SHLIBS%g
3822 s%@SHLPRE@%$SHLPRE%g
3823 s%@BUNDLE@%$BUNDLE%g
3824 s%@SHL_LD@%$SHL_LD%g
3825 s%@SHL_TARGETS@%$SHL_TARGETS%g
3826 s%@STATICLIB@%$STATICLIB%g
3827 s%@STATIC_LDFLAGS@%$STATIC_LDFLAGS%g
3828 s%@TEST1EXP@%$TEST1EXP%g
3829 s%@TEST1EXPORTS@%$TEST1EXPORTS%g
3830 s%@TEST2EXP@%$TEST2EXP%g
3831 s%@TEST2EXPORTS@%$TEST2EXPORTS%g
3832 s%@USE_ABI@%$USE_ABI%g
3833 s%@STARTUPDIR@%$STARTUPDIR%g
3834 s%@VERSION@%$VERSION%g
3835 s%@VERSION_NODOT@%$VERSION_NODOT%g
3837 CEOF
3840 cat >> $CONFIG_STATUS <<\EOF
3842 # Split the substitutions into bite-sized pieces for seds with
3843 # small command number limits, like on Digital OSF/1 and HP-UX.
3844 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3845 ac_file=1 # Number of current file.
3846 ac_beg=1 # First line for current file.
3847 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3848 ac_more_lines=:
3849 ac_sed_cmds=""
3850 while $ac_more_lines; do
3851 if test $ac_beg -gt 1; then
3852 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3853 else
3854 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3856 if test ! -s conftest.s$ac_file; then
3857 ac_more_lines=false
3858 rm -f conftest.s$ac_file
3859 else
3860 if test -z "$ac_sed_cmds"; then
3861 ac_sed_cmds="sed -f conftest.s$ac_file"
3862 else
3863 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3865 ac_file=`expr $ac_file + 1`
3866 ac_beg=$ac_end
3867 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3869 done
3870 if test -z "$ac_sed_cmds"; then
3871 ac_sed_cmds=cat
3875 cat >> $CONFIG_STATUS <<EOF
3877 CONFIG_FILES=\${CONFIG_FILES-"$mymakefile regina-config rxstack.init.d"}
3879 cat >> $CONFIG_STATUS <<\EOF
3880 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3881 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3882 case "$ac_file" in
3883 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3884 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3885 *) ac_file_in="${ac_file}.in" ;;
3886 esac
3888 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3890 # Remove last slash and all that follows it. Not all systems have dirname.
3891 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3892 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3893 # The file is in a subdirectory.
3894 test ! -d "$ac_dir" && mkdir "$ac_dir"
3895 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3896 # A "../" for each directory in $ac_dir_suffix.
3897 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3898 else
3899 ac_dir_suffix= ac_dots=
3902 case "$ac_given_srcdir" in
3903 .) srcdir=.
3904 if test -z "$ac_dots"; then top_srcdir=.
3905 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3906 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3907 *) # Relative path.
3908 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3909 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3910 esac
3913 echo creating "$ac_file"
3914 rm -f "$ac_file"
3915 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3916 case "$ac_file" in
3917 *Makefile*) ac_comsub="1i\\
3918 # $configure_input" ;;
3919 *) ac_comsub= ;;
3920 esac
3922 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3923 sed -e "$ac_comsub
3924 s%@configure_input@%$configure_input%g
3925 s%@srcdir@%$srcdir%g
3926 s%@top_srcdir@%$top_srcdir%g
3927 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3928 fi; done
3929 rm -f conftest.s*
3931 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3932 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3934 # ac_d sets the value in "#define NAME VALUE" lines.
3935 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3936 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3937 ac_dC='\3'
3938 ac_dD='%g'
3939 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3940 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3941 ac_uB='\([ ]\)%\1#\2define\3'
3942 ac_uC=' '
3943 ac_uD='\4%g'
3944 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3945 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3946 ac_eB='$%\1#\2define\3'
3947 ac_eC=' '
3948 ac_eD='%g'
3950 if test "${CONFIG_HEADERS+set}" != set; then
3952 cat >> $CONFIG_STATUS <<EOF
3953 CONFIG_HEADERS="config.h"
3955 cat >> $CONFIG_STATUS <<\EOF
3957 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3958 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3959 case "$ac_file" in
3960 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3961 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3962 *) ac_file_in="${ac_file}.in" ;;
3963 esac
3965 echo creating $ac_file
3967 rm -f conftest.frag conftest.in conftest.out
3968 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3969 cat $ac_file_inputs > conftest.in
3973 # Transform confdefs.h into a sed script conftest.vals that substitutes
3974 # the proper values into config.h.in to produce config.h. And first:
3975 # Protect against being on the right side of a sed subst in config.status.
3976 # Protect against being in an unquoted here document in config.status.
3977 rm -f conftest.vals
3978 cat > conftest.hdr <<\EOF
3979 s/[\\&%]/\\&/g
3980 s%[\\$`]%\\&%g
3981 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3982 s%ac_d%ac_u%gp
3983 s%ac_u%ac_e%gp
3985 sed -n -f conftest.hdr confdefs.h > conftest.vals
3986 rm -f conftest.hdr
3988 # This sed command replaces #undef with comments. This is necessary, for
3989 # example, in the case of _POSIX_SOURCE, which is predefined and required
3990 # on some systems where configure will not decide to define it.
3991 cat >> conftest.vals <<\EOF
3992 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3995 # Break up conftest.vals because some shells have a limit on
3996 # the size of here documents, and old seds have small limits too.
3998 rm -f conftest.tail
3999 while :
4001 ac_lines=`grep -c . conftest.vals`
4002 # grep -c gives empty output for an empty file on some AIX systems.
4003 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4004 # Write a limited-size here document to conftest.frag.
4005 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4006 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4007 echo 'CEOF
4008 sed -f conftest.frag conftest.in > conftest.out
4009 rm -f conftest.in
4010 mv conftest.out conftest.in
4011 ' >> $CONFIG_STATUS
4012 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4013 rm -f conftest.vals
4014 mv conftest.tail conftest.vals
4015 done
4016 rm -f conftest.vals
4018 cat >> $CONFIG_STATUS <<\EOF
4019 rm -f conftest.frag conftest.h
4020 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4021 cat conftest.in >> conftest.h
4022 rm -f conftest.in
4023 if cmp -s $ac_file conftest.h 2>/dev/null; then
4024 echo "$ac_file is unchanged"
4025 rm -f conftest.h
4026 else
4027 # Remove last slash and all that follows it. Not all systems have dirname.
4028 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4029 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4030 # The file is in a subdirectory.
4031 test ! -d "$ac_dir" && mkdir "$ac_dir"
4033 rm -f $ac_file
4034 mv conftest.h $ac_file
4036 fi; done
4039 cat >> $CONFIG_STATUS <<EOF
4042 cat >> $CONFIG_STATUS <<\EOF
4044 exit 0
4046 chmod +x $CONFIG_STATUS
4047 rm -fr confdefs* $ac_clean_files
4048 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4050 chmod 755 regina-config
4052 case "$target" in
4053 *ibm-aix*)
4054 mv Makefile.aix Makefile
4055 echo "$ac_t""renaming Makefile.aix to Makefile" 1>&6
4059 esac