/[ascend]/trunk/base/unixAC213/configure
ViewVC logotype

Contents of /trunk/base/unixAC213/configure

Parent Directory Parent Directory | Revision Log Revision Log


Revision 41 - (show annotations) (download)
Wed Feb 9 17:26:11 2005 UTC (19 years, 4 months ago) by ben.allan
File size: 195762 byte(s)
converted wishvar to m4 macro so we don't need to find config
subdir at configure time.
regenerated configure using ac213
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15
16 ASCEND specific options
17
18 Compiler options:
19 --enable-gcc allow use of gcc if avaiable"
20 ac_help="$ac_help
21 --enable-optimization optimize the C code while building ascend"
22 ac_help="$ac_help
23 --with-x use the X Window System"
24 ac_help="$ac_help
25 Location of Tcl, Tk, and tkTable:
26 --with-tcl=LIBRARY,HEADER
27 The location of the Tcl8.0 library and/or header
28 For a static Tcl8.0 library, give the full path:
29 --with-tcl='/usr/local/lib/libtcl8.0.a'
30 For a dynamic library, give any -L options required:
31 --with-tcl='-L/usr/local/lib -ltcl8.0'
32 To specify only the header, leave off the library:
33 --with-tcl=',/usr/local/include/tcl.h' "
34 ac_help="$ac_help
35 --with-tk=LIBRARY,HEADER
36 The location of the Tk8.0 library and/or header
37 For a static Tk8.0 library, give the full path:
38 --with-tk='/usr/local/lib/libtk8.3.a'
39 For a dynamic library, give any -L options required:
40 --with-tk='-L/usr/local/lib -ltk8.3'
41 To specify only the header, leave off the library:
42 --with-tk=',/usr/local/include/tk.h' "
43 ac_help="$ac_help
44 --with-tktable=TKTABLE full path to a TkTable1.3 static library"
45 ac_help="$ac_help
46 --with-wish=/path/to/bin/wish
47 The location of the wish shell executable matching
48 the tcl/tk given by --with-tk and --with-tcl.
49 X11 must be running during configure. "
50 ac_help="$ac_help
51 Fortran compiler and libraries:
52 --with-fortran=F77,F77LIBS
53 The location of your Fortran compiler and its
54 library files. For example, under SunOS:
55 --with-fortran='f77,-L/usr/lang/lib -lF77 -lM77'
56 To specify only the compiler or libraries, leave off
57 whatever is not needed:
58 --with-fortran=',-L/usr/lang/lib -lF77 -lM77'
59 Use '--without-fortran' to not link against
60 any Fortran libraries"
61 ac_help="$ac_help
62 --with-blas=BLASLIB The full path to the blas library.
63 Use '--with-blas=build' to build the blas library
64 from the sources that come with the distribution."
65 ac_help="$ac_help
66 --with-linpack=LPAKLIB The full path to the linpack library.
67 Use '--with-linpack=build' to build the library
68 from the sources that come with the distribution."
69 ac_help="$ac_help
70 --with-lsod=LSODLIB The full path to the lsod library.
71 Use '--with-lsod=build' to build the lsod library
72 from the sources that come with the distribution."
73 ac_help="$ac_help
74 Generation of Makefiles:
75 --without-tkdir do not generate Makefiles in the TK subdir"
76 ac_help="$ac_help
77 --without-models do not generate Makefiles in the models subdir"
78
79 # Initialize some variables set by options.
80 # The variables have the same names as the options, with
81 # dashes changed to underlines.
82 build=NONE
83 cache_file=./config.cache
84 exec_prefix=NONE
85 host=NONE
86 no_create=
87 nonopt=NONE
88 no_recursion=
89 prefix=NONE
90 program_prefix=NONE
91 program_suffix=NONE
92 program_transform_name=s,x,x,
93 silent=
94 site=
95 srcdir=
96 target=NONE
97 verbose=
98 x_includes=NONE
99 x_libraries=NONE
100 bindir='${exec_prefix}/bin'
101 sbindir='${exec_prefix}/sbin'
102 libexecdir='${exec_prefix}/libexec'
103 datadir='${prefix}/share'
104 sysconfdir='${prefix}/etc'
105 sharedstatedir='${prefix}/com'
106 localstatedir='${prefix}/var'
107 libdir='${exec_prefix}/lib'
108 includedir='${prefix}/include'
109 oldincludedir='/usr/include'
110 infodir='${prefix}/info'
111 mandir='${prefix}/man'
112
113 # Initialize some other variables.
114 subdirs=
115 MFLAGS= MAKEFLAGS=
116 SHELL=${CONFIG_SHELL-/bin/sh}
117 # Maximum number of lines to put in a shell here document.
118 ac_max_here_lines=12
119
120 ac_prev=
121 for ac_option
122 do
123
124 # If the previous option needs an argument, assign it.
125 if test -n "$ac_prev"; then
126 eval "$ac_prev=\$ac_option"
127 ac_prev=
128 continue
129 fi
130
131 case "$ac_option" in
132 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
133 *) ac_optarg= ;;
134 esac
135
136 # Accept the important Cygnus configure options, so we can diagnose typos.
137
138 case "$ac_option" in
139
140 -bindir | --bindir | --bindi | --bind | --bin | --bi)
141 ac_prev=bindir ;;
142 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
143 bindir="$ac_optarg" ;;
144
145 -build | --build | --buil | --bui | --bu)
146 ac_prev=build ;;
147 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
148 build="$ac_optarg" ;;
149
150 -cache-file | --cache-file | --cache-fil | --cache-fi \
151 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
152 ac_prev=cache_file ;;
153 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
154 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
155 cache_file="$ac_optarg" ;;
156
157 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
158 ac_prev=datadir ;;
159 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
160 | --da=*)
161 datadir="$ac_optarg" ;;
162
163 -disable-* | --disable-*)
164 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
165 # Reject names that are not valid shell variable names.
166 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
167 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
168 fi
169 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
170 eval "enable_${ac_feature}=no" ;;
171
172 -enable-* | --enable-*)
173 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
174 # Reject names that are not valid shell variable names.
175 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
176 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
177 fi
178 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
179 case "$ac_option" in
180 *=*) ;;
181 *) ac_optarg=yes ;;
182 esac
183 eval "enable_${ac_feature}='$ac_optarg'" ;;
184
185 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
186 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
187 | --exec | --exe | --ex)
188 ac_prev=exec_prefix ;;
189 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
190 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
191 | --exec=* | --exe=* | --ex=*)
192 exec_prefix="$ac_optarg" ;;
193
194 -gas | --gas | --ga | --g)
195 # Obsolete; use --with-gas.
196 with_gas=yes ;;
197
198 -help | --help | --hel | --he)
199 # Omit some internal or obsolete options to make the list less imposing.
200 # This message is too long to be a string in the A/UX 3.1 sh.
201 cat << EOF
202 Usage: configure [options] [host]
203 Options: [defaults in brackets after descriptions]
204 Configuration:
205 --cache-file=FILE cache test results in FILE
206 --help print this message
207 --no-create do not create output files
208 --quiet, --silent do not print \`checking...' messages
209 --version print the version of autoconf that created configure
210 Directory and file names:
211 --prefix=PREFIX install architecture-independent files in PREFIX
212 [$ac_default_prefix]
213 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
214 [same as prefix]
215 --bindir=DIR user executables in DIR [EPREFIX/bin]
216 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
217 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
218 --datadir=DIR read-only architecture-independent data in DIR
219 [PREFIX/share]
220 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
221 --sharedstatedir=DIR modifiable architecture-independent data in DIR
222 [PREFIX/com]
223 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
224 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
225 --includedir=DIR C header files in DIR [PREFIX/include]
226 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
227 --infodir=DIR info documentation in DIR [PREFIX/info]
228 --mandir=DIR man documentation in DIR [PREFIX/man]
229 --srcdir=DIR find the sources in DIR [configure dir or ..]
230 --program-prefix=PREFIX prepend PREFIX to installed program names
231 --program-suffix=SUFFIX append SUFFIX to installed program names
232 --program-transform-name=PROGRAM
233 run sed PROGRAM on installed program names
234 EOF
235 cat << EOF
236 Host type:
237 --build=BUILD configure for building on BUILD [BUILD=HOST]
238 --host=HOST configure for HOST [guessed]
239 --target=TARGET configure for TARGET [TARGET=HOST]
240 Features and packages:
241 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
242 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
243 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
244 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
245 --x-includes=DIR X include files are in DIR
246 --x-libraries=DIR X library files are in DIR
247 EOF
248 if test -n "$ac_help"; then
249 echo "--enable and --with options recognized:$ac_help"
250 fi
251 exit 0 ;;
252
253 -host | --host | --hos | --ho)
254 ac_prev=host ;;
255 -host=* | --host=* | --hos=* | --ho=*)
256 host="$ac_optarg" ;;
257
258 -includedir | --includedir | --includedi | --included | --include \
259 | --includ | --inclu | --incl | --inc)
260 ac_prev=includedir ;;
261 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
262 | --includ=* | --inclu=* | --incl=* | --inc=*)
263 includedir="$ac_optarg" ;;
264
265 -infodir | --infodir | --infodi | --infod | --info | --inf)
266 ac_prev=infodir ;;
267 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
268 infodir="$ac_optarg" ;;
269
270 -libdir | --libdir | --libdi | --libd)
271 ac_prev=libdir ;;
272 -libdir=* | --libdir=* | --libdi=* | --libd=*)
273 libdir="$ac_optarg" ;;
274
275 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
276 | --libexe | --libex | --libe)
277 ac_prev=libexecdir ;;
278 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
279 | --libexe=* | --libex=* | --libe=*)
280 libexecdir="$ac_optarg" ;;
281
282 -localstatedir | --localstatedir | --localstatedi | --localstated \
283 | --localstate | --localstat | --localsta | --localst \
284 | --locals | --local | --loca | --loc | --lo)
285 ac_prev=localstatedir ;;
286 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
287 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
288 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
289 localstatedir="$ac_optarg" ;;
290
291 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
292 ac_prev=mandir ;;
293 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
294 mandir="$ac_optarg" ;;
295
296 -nfp | --nfp | --nf)
297 # Obsolete; use --without-fp.
298 with_fp=no ;;
299
300 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
301 | --no-cr | --no-c)
302 no_create=yes ;;
303
304 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
305 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
306 no_recursion=yes ;;
307
308 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
309 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
310 | --oldin | --oldi | --old | --ol | --o)
311 ac_prev=oldincludedir ;;
312 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
313 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
314 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
315 oldincludedir="$ac_optarg" ;;
316
317 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
318 ac_prev=prefix ;;
319 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
320 prefix="$ac_optarg" ;;
321
322 -program-prefix | --program-prefix | --program-prefi | --program-pref \
323 | --program-pre | --program-pr | --program-p)
324 ac_prev=program_prefix ;;
325 -program-prefix=* | --program-prefix=* | --program-prefi=* \
326 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
327 program_prefix="$ac_optarg" ;;
328
329 -program-suffix | --program-suffix | --program-suffi | --program-suff \
330 | --program-suf | --program-su | --program-s)
331 ac_prev=program_suffix ;;
332 -program-suffix=* | --program-suffix=* | --program-suffi=* \
333 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
334 program_suffix="$ac_optarg" ;;
335
336 -program-transform-name | --program-transform-name \
337 | --program-transform-nam | --program-transform-na \
338 | --program-transform-n | --program-transform- \
339 | --program-transform | --program-transfor \
340 | --program-transfo | --program-transf \
341 | --program-trans | --program-tran \
342 | --progr-tra | --program-tr | --program-t)
343 ac_prev=program_transform_name ;;
344 -program-transform-name=* | --program-transform-name=* \
345 | --program-transform-nam=* | --program-transform-na=* \
346 | --program-transform-n=* | --program-transform-=* \
347 | --program-transform=* | --program-transfor=* \
348 | --program-transfo=* | --program-transf=* \
349 | --program-trans=* | --program-tran=* \
350 | --progr-tra=* | --program-tr=* | --program-t=*)
351 program_transform_name="$ac_optarg" ;;
352
353 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
354 | -silent | --silent | --silen | --sile | --sil)
355 silent=yes ;;
356
357 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
358 ac_prev=sbindir ;;
359 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
360 | --sbi=* | --sb=*)
361 sbindir="$ac_optarg" ;;
362
363 -sharedstatedir | --sharedstatedir | --sharedstatedi \
364 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
365 | --sharedst | --shareds | --shared | --share | --shar \
366 | --sha | --sh)
367 ac_prev=sharedstatedir ;;
368 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
369 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
370 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
371 | --sha=* | --sh=*)
372 sharedstatedir="$ac_optarg" ;;
373
374 -site | --site | --sit)
375 ac_prev=site ;;
376 -site=* | --site=* | --sit=*)
377 site="$ac_optarg" ;;
378
379 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
380 ac_prev=srcdir ;;
381 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
382 srcdir="$ac_optarg" ;;
383
384 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
385 | --syscon | --sysco | --sysc | --sys | --sy)
386 ac_prev=sysconfdir ;;
387 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
388 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
389 sysconfdir="$ac_optarg" ;;
390
391 -target | --target | --targe | --targ | --tar | --ta | --t)
392 ac_prev=target ;;
393 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
394 target="$ac_optarg" ;;
395
396 -v | -verbose | --verbose | --verbos | --verbo | --verb)
397 verbose=yes ;;
398
399 -version | --version | --versio | --versi | --vers)
400 echo "configure generated by autoconf version 2.13"
401 exit 0 ;;
402
403 -with-* | --with-*)
404 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
405 # Reject names that are not valid shell variable names.
406 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
407 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
408 fi
409 ac_package=`echo $ac_package| sed 's/-/_/g'`
410 case "$ac_option" in
411 *=*) ;;
412 *) ac_optarg=yes ;;
413 esac
414 eval "with_${ac_package}='$ac_optarg'" ;;
415
416 -without-* | --without-*)
417 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
418 # Reject names that are not valid shell variable names.
419 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
420 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
421 fi
422 ac_package=`echo $ac_package| sed 's/-/_/g'`
423 eval "with_${ac_package}=no" ;;
424
425 --x)
426 # Obsolete; use --with-x.
427 with_x=yes ;;
428
429 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
430 | --x-incl | --x-inc | --x-in | --x-i)
431 ac_prev=x_includes ;;
432 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
433 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
434 x_includes="$ac_optarg" ;;
435
436 -x-libraries | --x-libraries | --x-librarie | --x-librari \
437 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
438 ac_prev=x_libraries ;;
439 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
440 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
441 x_libraries="$ac_optarg" ;;
442
443 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
444 ;;
445
446 *)
447 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
448 echo "configure: warning: $ac_option: invalid host type" 1>&2
449 fi
450 if test "x$nonopt" != xNONE; then
451 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
452 fi
453 nonopt="$ac_option"
454 ;;
455
456 esac
457 done
458
459 if test -n "$ac_prev"; then
460 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
461 fi
462
463 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
464
465 # File descriptor usage:
466 # 0 standard input
467 # 1 file creation
468 # 2 errors and warnings
469 # 3 some systems may open it to /dev/tty
470 # 4 used on the Kubota Titan
471 # 6 checking for... messages and results
472 # 5 compiler messages saved in config.log
473 if test "$silent" = yes; then
474 exec 6>/dev/null
475 else
476 exec 6>&1
477 fi
478 exec 5>./config.log
479
480 echo "\
481 This file contains any messages produced by compilers while
482 running configure, to aid debugging if configure makes a mistake.
483 " 1>&5
484
485 # Strip out --no-create and --no-recursion so they do not pile up.
486 # Also quote any args containing shell metacharacters.
487 ac_configure_args=
488 for ac_arg
489 do
490 case "$ac_arg" in
491 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
492 | --no-cr | --no-c) ;;
493 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
494 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
495 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
496 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
497 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
498 esac
499 done
500
501 # NLS nuisances.
502 # Only set these to C if already set. These must not be set unconditionally
503 # because not all systems understand e.g. LANG=C (notably SCO).
504 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
505 # Non-C LC_CTYPE values break the ctype check.
506 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
507 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
508 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
509 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
510
511 # confdefs.h avoids OS command line length limits that DEFS can exceed.
512 rm -rf conftest* confdefs.h
513 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
514 echo > confdefs.h
515
516 # A filename unique to this package, relative to the directory that
517 # configure is in, which we can look for to find out if srcdir is correct.
518 ac_unique_file=../generic/compiler/ascParse.y
519
520 # Find the source files, if location was not specified.
521 if test -z "$srcdir"; then
522 ac_srcdir_defaulted=yes
523 # Try the directory containing this script, then its parent.
524 ac_prog=$0
525 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
526 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
527 srcdir=$ac_confdir
528 if test ! -r $srcdir/$ac_unique_file; then
529 srcdir=..
530 fi
531 else
532 ac_srcdir_defaulted=no
533 fi
534 if test ! -r $srcdir/$ac_unique_file; then
535 if test "$ac_srcdir_defaulted" = yes; then
536 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
537 else
538 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
539 fi
540 fi
541 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
542
543 # Prefer explicitly selected file to automatically selected ones.
544 if test -z "$CONFIG_SITE"; then
545 if test "x$prefix" != xNONE; then
546 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
547 else
548 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
549 fi
550 fi
551 for ac_site_file in $CONFIG_SITE; do
552 if test -r "$ac_site_file"; then
553 echo "loading site script $ac_site_file"
554 . "$ac_site_file"
555 fi
556 done
557
558
559 ac_ext=c
560 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
561 ac_cpp='$CPP $CPPFLAGS'
562 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
563 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
564 cross_compiling=$ac_cv_prog_cc_cross
565
566 ac_exeext=
567 ac_objext=o
568 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
569 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
570 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
571 ac_n= ac_c='
572 ' ac_t=' '
573 else
574 ac_n=-n ac_c= ac_t=
575 fi
576 else
577 ac_n= ac_c='\c' ac_t=
578 fi
579
580
581
582
583 #--------------------------------------------------------------------
584 # CVS Most Recent Revision Data
585 # Put this data after AC_INIT since we want this information
586 # to also appear in configure and autoconf, when creating
587 # configure, strips all comments that appear in configure.in
588 # before AC_INIT
589 # $Revision: 1.38 $
590 # $Date: 2003/11/23 19:36:39 $
591 # $Author: ballan $
592 # $Source: /afs/cs.cmu.edu/project/ascend/Repository/configure.in,v $
593 #--------------------------------------------------------------------
594
595
596 #--------------------------------------------------------------------
597 # Where configure should look for files it needs.
598 #--------------------------------------------------------------------
599 ac_aux_dir=
600 for ac_dir in config $srcdir/config; do
601 if test -f $ac_dir/install-sh; then
602 ac_aux_dir=$ac_dir
603 ac_install_sh="$ac_aux_dir/install-sh -c"
604 break
605 elif test -f $ac_dir/install.sh; then
606 ac_aux_dir=$ac_dir
607 ac_install_sh="$ac_aux_dir/install.sh -c"
608 break
609 fi
610 done
611 if test -z "$ac_aux_dir"; then
612 { echo "configure: error: can not find install-sh or install.sh in config $srcdir/config" 1>&2; exit 1; }
613 fi
614 ac_config_guess=$ac_aux_dir/config.guess
615 ac_config_sub=$ac_aux_dir/config.sub
616 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
617
618
619 #--------------------------------------------------------------------
620 # Set the output variables prefix and exec_prefix that
621 # determine where things will be installed.
622 #--------------------------------------------------------------------
623 if test "${prefix}" = "NONE"; then
624 prefix=/usr/local
625 fi
626 if test "${exec_prefix}" = "NONE"; then
627 exec_prefix=$prefix
628 fi
629
630
631 #--------------------------------------------------------------------
632 # For the Fortran support libraries and the TCL/TK libraries
633 # and header files, we unfortunately need the full path to
634 # these files. The problem with having the full path is that
635 # if the user moves the source tree, things will break unless
636 # the user re-runs configure.
637 #--------------------------------------------------------------------
638
639 #--------------------------------------------------------------------
640 ##AWW
641 ##AWW We put the .o files when compiling into a tree structure
642 ##AWW relative to the directory in which we currently reside,
643 ##AWW while the .c and .h files are in a similar tree structure
644 ##AWW relative to the configure instruction we invoke. This
645 ##AWW allows one to have separate .o files in their own tree when
646 ##AWW compiling for different operating systems.
647 ##AWW
648 ##AWW Example 1 (same directories)
649 ##AWW Current directory one is in: /home/me/trunk/base/unixAC213
650 ##AWW Directory containing configure: /home/me/trunk/base/unixAC213
651 ##AWW Command to invoke configure: ./configure
652 ##AWW $ascpwd will be: /home/me/trunk/base/unixAC213
653 ##AWW $srcdir will be: .
654 ##AWW
655 ##AWW Example 2 (different directories, abs path for command)
656 ##AWW Current directory one is in: /home/me/trunk/base/newTree
657 ##AWW Directory containing configure: /home/me/trunk/base/unixAC213
658 ##AWW Command to invoke configure: /home/me/trunk/base/unixAC213/configure
659 ##AWW $ascpwd will be: /home/me/trunk/base/newTree
660 ##AWW $srcdir will be: /home/me/trunk/base/unixAC213
661 ##AWW
662 ##AWW Example 3 (different directories, rel path for command)
663 ##AWW Same as Example 2
664 ##AWW Command to invoke configure: ../unixAC213/configure
665 ##AWW $ascpwd will be: /home/me/trunk/base/newTree (same as in Example 2)
666 ##AWW $srcdir will be: ../unixAC213
667 ##AWW
668 ##AWW Key elements of the source tree are:
669 ##AWW code/trunk/trunk/base/unixAC213/configure
670 ##AWW code/trunk/trunk/base/generic
671 ##AWW code/trunk/tcltk98
672 ##AWW where $srcdir is pointing to /home/me/trunk/base/unixAC213, the folder
673 ##AWW containing "configure"
674 ##AWW
675 ##AWW Configure is located at:
676 ##AWW $srcdir/configure
677 ##AWW while the .c/.h files one wants are in:
678 ##AWW $srcdir/../generic/compiler
679 ##AWW $srcdir/../generic/general
680 ##AWW $srcdir/../generic/packages
681 ##AWW $srcdir/../generic/solver
682 ##AWW $srcdir/../generic/utilities
683 ##AWW $srcdir/../../tcltk98/generic/interface
684 ##AWW
685 ##AWW Each of these directories contain Makefiles and possible
686 ##AWW need to find .h files in the other directories. For example
687 ##AWW the include statements are always of the form
688 ##AWW #include compiler/slv3.h or
689 ##AWW #include interface/SlvProc.h
690 ##AWW
691 ##AWW A safe include path should assume one is a directory with any
692 ##AWW of these .h and .c files and one needs to find a .h file in
693 ##AWW any other of them. The following paths should do it.
694 ##AWW
695 ##AWW If in compiler, general, packages, solver, utilities
696 ##AWW .. for general, packages, etc
697 ##AWW ../../../tcltk98/generic for interface
698 ##AWW If in interface
699 ##AWW .. for interface
700 ##AWW ../../../base/generic for compiler, general, ..
701 ##AWW
702 #--------------------------------------------------------------------
703 # The asc_include variable is (directory) path to the ascend4
704 # SOURCE directory relative to the immediate subdirectories of
705 # the ascend4 OBJECT directory. --rewrite - not clear.
706 #AWW To compile a new ASCEND executable, one should move into the
707 #AWW directory in which one wants the ASCEND object/executable
708 #AWW to reside (call this objTree) and from there run
709 #AWW ../base/unixAC213/configure.
710 #AWW In the following code asc_include is set to the path from
711
712 ascpwd=`pwd`
713 fullpathsrcdir=`cd $srcdir ; pwd`
714
715 case "$srcdir" in
716 .)
717 asc_include="../$srcdir"
718 ;;
719 /*)
720 #AWW20041113: asc_include="$srcdir/ascend4"
721 asc_include="$srcdir/../generic"
722 ;;
723 *)
724 #AWW20041113: asc_include="../../$srcdir/ascend4"
725 asc_include="$srcdir/../generic"
726 ;;
727 esac
728
729
730 #--------------------------------------------------------------------
731 # Do basic checks to determine
732 # * if we have `ranlib'
733 # * if we can create symbolic links
734 # * if `make' sets the MAKE macro
735 # * a bsd-compatible `install' program
736 # If we use the install-sh script that comes with configure,
737 # prefix it with the current directory so it'll work in
738 # subdirectories. Unfortunately, it won't work if the user
739 # moves the source tree.
740 #--------------------------------------------------------------------
741 # Extract the first word of "ranlib", so it can be a program name with args.
742 set dummy ranlib; ac_word=$2
743 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
744 echo "configure:745: checking for $ac_word" >&5
745 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
746 echo $ac_n "(cached) $ac_c" 1>&6
747 else
748 if test -n "$RANLIB"; then
749 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
750 else
751 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
752 ac_dummy="$PATH"
753 for ac_dir in $ac_dummy; do
754 test -z "$ac_dir" && ac_dir=.
755 if test -f $ac_dir/$ac_word; then
756 ac_cv_prog_RANLIB="ranlib"
757 break
758 fi
759 done
760 IFS="$ac_save_ifs"
761 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
762 fi
763 fi
764 RANLIB="$ac_cv_prog_RANLIB"
765 if test -n "$RANLIB"; then
766 echo "$ac_t""$RANLIB" 1>&6
767 else
768 echo "$ac_t""no" 1>&6
769 fi
770
771 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
772 echo "configure:773: checking whether ln -s works" >&5
773 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
774 echo $ac_n "(cached) $ac_c" 1>&6
775 else
776 rm -f conftestdata
777 if ln -s X conftestdata 2>/dev/null
778 then
779 rm -f conftestdata
780 ac_cv_prog_LN_S="ln -s"
781 else
782 ac_cv_prog_LN_S=ln
783 fi
784 fi
785 LN_S="$ac_cv_prog_LN_S"
786 if test "$ac_cv_prog_LN_S" = "ln -s"; then
787 echo "$ac_t""yes" 1>&6
788 else
789 echo "$ac_t""no" 1>&6
790 fi
791
792 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
793 echo "configure:794: checking whether ${MAKE-make} sets \${MAKE}" >&5
794 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
795 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
796 echo $ac_n "(cached) $ac_c" 1>&6
797 else
798 cat > conftestmake <<\EOF
799 all:
800 @echo 'ac_maketemp="${MAKE}"'
801 EOF
802 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
803 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
804 if test -n "$ac_maketemp"; then
805 eval ac_cv_prog_make_${ac_make}_set=yes
806 else
807 eval ac_cv_prog_make_${ac_make}_set=no
808 fi
809 rm -f conftestmake
810 fi
811 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
812 echo "$ac_t""yes" 1>&6
813 SET_MAKE=
814 else
815 echo "$ac_t""no" 1>&6
816 SET_MAKE="MAKE=${MAKE-make}"
817 fi
818
819 # Find a good install program. We prefer a C program (faster),
820 # so one script is as good as another. But avoid the broken or
821 # incompatible versions:
822 # SysV /etc/install, /usr/sbin/install
823 # SunOS /usr/etc/install
824 # IRIX /sbin/install
825 # AIX /bin/install
826 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
827 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
828 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
829 # ./install, which can be erroneously created by make from ./install.sh.
830 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
831 echo "configure:832: checking for a BSD compatible install" >&5
832 if test -z "$INSTALL"; then
833 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
834 echo $ac_n "(cached) $ac_c" 1>&6
835 else
836 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
837 for ac_dir in $PATH; do
838 # Account for people who put trailing slashes in PATH elements.
839 case "$ac_dir/" in
840 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
841 *)
842 # OSF1 and SCO ODT 3.0 have their own names for install.
843 # Don't use installbsd from OSF since it installs stuff as root
844 # by default.
845 for ac_prog in ginstall scoinst install; do
846 if test -f $ac_dir/$ac_prog; then
847 if test $ac_prog = install &&
848 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
849 # AIX install. It has an incompatible calling convention.
850 :
851 else
852 ac_cv_path_install="$ac_dir/$ac_prog -c"
853 break 2
854 fi
855 fi
856 done
857 ;;
858 esac
859 done
860 IFS="$ac_save_IFS"
861
862 fi
863 if test "${ac_cv_path_install+set}" = set; then
864 INSTALL="$ac_cv_path_install"
865 else
866 # As a last resort, use the slow shell script. We don't cache a
867 # path for INSTALL within a source directory, because that will
868 # break other packages using the cache if that directory is
869 # removed, or if the path is relative.
870 INSTALL="$ac_install_sh"
871 fi
872 fi
873 echo "$ac_t""$INSTALL" 1>&6
874
875 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
876 # It thinks the first close brace ends the variable substitution.
877 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
878
879 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
880
881 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
882
883 ##AWW20041113: No fixing seems necessary.
884 case "X$INSTALL" in
885 X/*)
886 ;;
887 *)
888 INSTALL="$ascpwd/$INSTALL"
889 ;;
890 esac
891
892
893 #--------------------------------------------------------------------
894 # Get the host type for various checks along the way
895 #--------------------------------------------------------------------
896
897 # Make sure we can run config.sub.
898 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
899 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
900 fi
901
902 echo $ac_n "checking host system type""... $ac_c" 1>&6
903 echo "configure:904: checking host system type" >&5
904
905 host_alias=$host
906 case "$host_alias" in
907 NONE)
908 case $nonopt in
909 NONE)
910 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
911 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
912 fi ;;
913 *) host_alias=$nonopt ;;
914 esac ;;
915 esac
916
917 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
918 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
919 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
920 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
921 echo "$ac_t""$host" 1>&6
922
923
924
925 #--------------------------------------------------------------------
926 # Check for the C compiler: set CC and CFLAGS.
927 # If the user does NOT specify `--enable-gcc' on the configure
928 # command command line, set CC to either the envar CC or `cc'.
929 # Call AC_PROG_CC which will use the value of CC (perhaps set
930 # immediately above) or will check for `gcc' and then for `cc'
931 # if `gcc' is not found.
932 #
933 # If we are using GCC, then assume it groks ANSI. Otherwise,
934 # try to compile a small program using ANSI constructs with
935 # CC. If this fails, try to locate each of the following:
936 # c89 xlc acc
937 # and if successful, see if it compiles an ANSI C program.
938 # (Doing this in a loop would be ideal, but configure caches
939 # the result of AC_CHECK_PROG and uses the cached value for
940 # all but the first pass through the loop. This is also the
941 # reason we have to use a different variable asc_cc1, asc_cc2
942 # for each call to AC_CHECK_PROG.
943 #
944 # If we do not find an ANSI C compiler, print a warning and
945 # use the first value of CC we tried.
946 #--------------------------------------------------------------------
947
948 # Check whether --enable-gcc or --disable-gcc was given.
949 if test "${enable_gcc+set}" = set; then
950 enableval="$enable_gcc"
951 asc_gcc_ok=$enableval
952 else
953 asc_gcc_ok=no
954 fi
955
956 if test ! "$asc_gcc_ok" = "yes"; then
957 CC=${CC-cc}
958 fi
959 asc_orig_cc=$CC
960
961 if test "X$asc_gcc_ok" = "Xyes" ; then
962 asc_ansi_ok=yes
963 else
964 echo $ac_n "checking whether $CC understands const, void*, and function prototypes""... $ac_c" 1>&6
965 echo "configure:966: checking whether $CC understands const, void*, and function prototypes" >&5
966 cat > conftest.$ac_ext <<EOF
967 #line 968 "configure"
968 #include "confdefs.h"
969
970 int main() {
971
972 int tstproto(int arg1, char * arg2);
973 int tstconst(const int arg1, const char *arg2);
974 int tstvoidp(const int arg1, const void *arg2);
975 ; return 0; }
976 EOF
977 if { (eval echo configure:978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
978 rm -rf conftest*
979 asc_ansi_ok=yes
980 else
981 echo "configure: failed program was:" >&5
982 cat conftest.$ac_ext >&5
983 rm -rf conftest*
984 asc_ansi_ok=no
985 fi
986 rm -f conftest*
987 echo "$ac_t""$asc_ansi_ok" 1>&6
988 fi
989
990 if test "$asc_ansi_ok" = no ; then
991 # Extract the first word of "c89", so it can be a program name with args.
992 set dummy c89; ac_word=$2
993 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
994 echo "configure:995: checking for $ac_word" >&5
995 if eval "test \"`echo '$''{'ac_cv_prog_asc_cc1'+set}'`\" = set"; then
996 echo $ac_n "(cached) $ac_c" 1>&6
997 else
998 if test -n "$asc_cc1"; then
999 ac_cv_prog_asc_cc1="$asc_cc1" # Let the user override the test.
1000 else
1001 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1002 ac_dummy="$PATH"
1003 for ac_dir in $ac_dummy; do
1004 test -z "$ac_dir" && ac_dir=.
1005 if test -f $ac_dir/$ac_word; then
1006 ac_cv_prog_asc_cc1="c89"
1007 break
1008 fi
1009 done
1010 IFS="$ac_save_ifs"
1011 test -z "$ac_cv_prog_asc_cc1" && ac_cv_prog_asc_cc1="NONE"
1012 fi
1013 fi
1014 asc_cc1="$ac_cv_prog_asc_cc1"
1015 if test -n "$asc_cc1"; then
1016 echo "$ac_t""$asc_cc1" 1>&6
1017 else
1018 echo "$ac_t""no" 1>&6
1019 fi
1020
1021 if test ! "$asc_cc1" = NONE ; then
1022 CC=$asc_cc1
1023 echo $ac_n "checking whether $CC understands const, void*, and function prototypes""... $ac_c" 1>&6
1024 echo "configure:1025: checking whether $CC understands const, void*, and function prototypes" >&5
1025 cat > conftest.$ac_ext <<EOF
1026 #line 1027 "configure"
1027 #include "confdefs.h"
1028
1029 int main() {
1030
1031 int tstproto(int arg1, char * arg2);
1032 int tstconst(const int arg1, const char *arg2);
1033 int tstvoidp(const int arg1, const void *arg2);
1034 ; return 0; }
1035 EOF
1036 if { (eval echo configure:1037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1037 rm -rf conftest*
1038 asc_ansi_ok=yes
1039 else
1040 echo "configure: failed program was:" >&5
1041 cat conftest.$ac_ext >&5
1042 rm -rf conftest*
1043 asc_ansi_ok=no
1044 fi
1045 rm -f conftest*
1046 echo "$ac_t""$asc_ansi_ok" 1>&6
1047 fi
1048 fi
1049
1050 if test "$asc_ansi_ok" = no ; then
1051 # Extract the first word of "xlc", so it can be a program name with args.
1052 set dummy xlc; ac_word=$2
1053 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1054 echo "configure:1055: checking for $ac_word" >&5
1055 if eval "test \"`echo '$''{'ac_cv_prog_asc_cc2'+set}'`\" = set"; then
1056 echo $ac_n "(cached) $ac_c" 1>&6
1057 else
1058 if test -n "$asc_cc2"; then
1059 ac_cv_prog_asc_cc2="$asc_cc2" # Let the user override the test.
1060 else
1061 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1062 ac_dummy="$PATH"
1063 for ac_dir in $ac_dummy; do
1064 test -z "$ac_dir" && ac_dir=.
1065 if test -f $ac_dir/$ac_word; then
1066 ac_cv_prog_asc_cc2="xlc"
1067 break
1068 fi
1069 done
1070 IFS="$ac_save_ifs"
1071 test -z "$ac_cv_prog_asc_cc2" && ac_cv_prog_asc_cc2="NONE"
1072 fi
1073 fi
1074 asc_cc2="$ac_cv_prog_asc_cc2"
1075 if test -n "$asc_cc2"; then
1076 echo "$ac_t""$asc_cc2" 1>&6
1077 else
1078 echo "$ac_t""no" 1>&6
1079 fi
1080
1081 if test ! "$asc_cc2" = NONE ; then
1082 CC=$asc_cc2
1083 echo $ac_n "checking whether $CC understands const, void*, and function prototypes""... $ac_c" 1>&6
1084 echo "configure:1085: checking whether $CC understands const, void*, and function prototypes" >&5
1085 cat > conftest.$ac_ext <<EOF
1086 #line 1087 "configure"
1087 #include "confdefs.h"
1088
1089 int main() {
1090
1091 int tstproto(int arg1, char * arg2);
1092 int tstconst(const int arg1, const char *arg2);
1093 int tstvoidp(const int arg1, const void *arg2);
1094 ; return 0; }
1095 EOF
1096 if { (eval echo configure:1097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1097 rm -rf conftest*
1098 asc_ansi_ok=yes
1099 else
1100 echo "configure: failed program was:" >&5
1101 cat conftest.$ac_ext >&5
1102 rm -rf conftest*
1103 asc_ansi_ok=no
1104 fi
1105 rm -f conftest*
1106 echo "$ac_t""$asc_ansi_ok" 1>&6
1107 fi
1108 fi
1109
1110 if test "$asc_ansi_ok" = no ; then
1111 # Extract the first word of "acc", so it can be a program name with args.
1112 set dummy acc; ac_word=$2
1113 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1114 echo "configure:1115: checking for $ac_word" >&5
1115 if eval "test \"`echo '$''{'ac_cv_prog_asc_cc3'+set}'`\" = set"; then
1116 echo $ac_n "(cached) $ac_c" 1>&6
1117 else
1118 if test -n "$asc_cc3"; then
1119 ac_cv_prog_asc_cc3="$asc_cc3" # Let the user override the test.
1120 else
1121 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1122 ac_dummy="$PATH"
1123 for ac_dir in $ac_dummy; do
1124 test -z "$ac_dir" && ac_dir=.
1125 if test -f $ac_dir/$ac_word; then
1126 ac_cv_prog_asc_cc3="acc"
1127 break
1128 fi
1129 done
1130 IFS="$ac_save_ifs"
1131 test -z "$ac_cv_prog_asc_cc3" && ac_cv_prog_asc_cc3="NONE"
1132 fi
1133 fi
1134 asc_cc3="$ac_cv_prog_asc_cc3"
1135 if test -n "$asc_cc3"; then
1136 echo "$ac_t""$asc_cc3" 1>&6
1137 else
1138 echo "$ac_t""no" 1>&6
1139 fi
1140
1141 if test ! "$asc_cc3" = NONE ; then
1142 CC=$asc_cc3
1143 echo $ac_n "checking whether $CC understands const, void*, and function prototypes""... $ac_c" 1>&6
1144 echo "configure:1145: checking whether $CC understands const, void*, and function prototypes" >&5
1145 cat > conftest.$ac_ext <<EOF
1146 #line 1147 "configure"
1147 #include "confdefs.h"
1148
1149 int main() {
1150
1151 int tstproto(int arg1, char * arg2);
1152 int tstconst(const int arg1, const char *arg2);
1153 int tstvoidp(const int arg1, const void *arg2);
1154 ; return 0; }
1155 EOF
1156 if { (eval echo configure:1157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1157 rm -rf conftest*
1158 asc_ansi_ok=yes
1159 else
1160 echo "configure: failed program was:" >&5
1161 cat conftest.$ac_ext >&5
1162 rm -rf conftest*
1163 asc_ansi_ok=no
1164 fi
1165 rm -f conftest*
1166 echo "$ac_t""$asc_ansi_ok" 1>&6
1167 fi
1168 fi
1169
1170 # Extract the first word of "gcc", so it can be a program name with args.
1171 set dummy gcc; ac_word=$2
1172 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1173 echo "configure:1174: checking for $ac_word" >&5
1174 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1175 echo $ac_n "(cached) $ac_c" 1>&6
1176 else
1177 if test -n "$CC"; then
1178 ac_cv_prog_CC="$CC" # Let the user override the test.
1179 else
1180 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1181 ac_dummy="$PATH"
1182 for ac_dir in $ac_dummy; do
1183 test -z "$ac_dir" && ac_dir=.
1184 if test -f $ac_dir/$ac_word; then
1185 ac_cv_prog_CC="gcc"
1186 break
1187 fi
1188 done
1189 IFS="$ac_save_ifs"
1190 fi
1191 fi
1192 CC="$ac_cv_prog_CC"
1193 if test -n "$CC"; then
1194 echo "$ac_t""$CC" 1>&6
1195 else
1196 echo "$ac_t""no" 1>&6
1197 fi
1198
1199 if test -z "$CC"; then
1200 # Extract the first word of "cc", so it can be a program name with args.
1201 set dummy cc; ac_word=$2
1202 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1203 echo "configure:1204: checking for $ac_word" >&5
1204 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1205 echo $ac_n "(cached) $ac_c" 1>&6
1206 else
1207 if test -n "$CC"; then
1208 ac_cv_prog_CC="$CC" # Let the user override the test.
1209 else
1210 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1211 ac_prog_rejected=no
1212 ac_dummy="$PATH"
1213 for ac_dir in $ac_dummy; do
1214 test -z "$ac_dir" && ac_dir=.
1215 if test -f $ac_dir/$ac_word; then
1216 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1217 ac_prog_rejected=yes
1218 continue
1219 fi
1220 ac_cv_prog_CC="cc"
1221 break
1222 fi
1223 done
1224 IFS="$ac_save_ifs"
1225 if test $ac_prog_rejected = yes; then
1226 # We found a bogon in the path, so make sure we never use it.
1227 set dummy $ac_cv_prog_CC
1228 shift
1229 if test $# -gt 0; then
1230 # We chose a different compiler from the bogus one.
1231 # However, it has the same basename, so the bogon will be chosen
1232 # first if we set CC to just the basename; use the full file name.
1233 shift
1234 set dummy "$ac_dir/$ac_word" "$@"
1235 shift
1236 ac_cv_prog_CC="$@"
1237 fi
1238 fi
1239 fi
1240 fi
1241 CC="$ac_cv_prog_CC"
1242 if test -n "$CC"; then
1243 echo "$ac_t""$CC" 1>&6
1244 else
1245 echo "$ac_t""no" 1>&6
1246 fi
1247
1248 if test -z "$CC"; then
1249 case "`uname -s`" in
1250 *win32* | *WIN32*)
1251 # Extract the first word of "cl", so it can be a program name with args.
1252 set dummy cl; ac_word=$2
1253 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1254 echo "configure:1255: checking for $ac_word" >&5
1255 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1256 echo $ac_n "(cached) $ac_c" 1>&6
1257 else
1258 if test -n "$CC"; then
1259 ac_cv_prog_CC="$CC" # Let the user override the test.
1260 else
1261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1262 ac_dummy="$PATH"
1263 for ac_dir in $ac_dummy; do
1264 test -z "$ac_dir" && ac_dir=.
1265 if test -f $ac_dir/$ac_word; then
1266 ac_cv_prog_CC="cl"
1267 break
1268 fi
1269 done
1270 IFS="$ac_save_ifs"
1271 fi
1272 fi
1273 CC="$ac_cv_prog_CC"
1274 if test -n "$CC"; then
1275 echo "$ac_t""$CC" 1>&6
1276 else
1277 echo "$ac_t""no" 1>&6
1278 fi
1279 ;;
1280 esac
1281 fi
1282 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1283 fi
1284
1285 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1286 echo "configure:1287: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1287
1288 ac_ext=c
1289 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1290 ac_cpp='$CPP $CPPFLAGS'
1291 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1292 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1293 cross_compiling=$ac_cv_prog_cc_cross
1294
1295 cat > conftest.$ac_ext << EOF
1296
1297 #line 1298 "configure"
1298 #include "confdefs.h"
1299
1300 main(){return(0);}
1301 EOF
1302 if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1303 ac_cv_prog_cc_works=yes
1304 # If we can't run a trivial program, we are probably using a cross compiler.
1305 if (./conftest; exit) 2>/dev/null; then
1306 ac_cv_prog_cc_cross=no
1307 else
1308 ac_cv_prog_cc_cross=yes
1309 fi
1310 else
1311 echo "configure: failed program was:" >&5
1312 cat conftest.$ac_ext >&5
1313 ac_cv_prog_cc_works=no
1314 fi
1315 rm -fr conftest*
1316 ac_ext=c
1317 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1318 ac_cpp='$CPP $CPPFLAGS'
1319 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1320 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1321 cross_compiling=$ac_cv_prog_cc_cross
1322
1323 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1324 if test $ac_cv_prog_cc_works = no; then
1325 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1326 fi
1327 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1328 echo "configure:1329: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1329 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1330 cross_compiling=$ac_cv_prog_cc_cross
1331
1332 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1333 echo "configure:1334: checking whether we are using GNU C" >&5
1334 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1335 echo $ac_n "(cached) $ac_c" 1>&6
1336 else
1337 cat > conftest.c <<EOF
1338 #ifdef __GNUC__
1339 yes;
1340 #endif
1341 EOF
1342 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1343 ac_cv_prog_gcc=yes
1344 else
1345 ac_cv_prog_gcc=no
1346 fi
1347 fi
1348
1349 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1350
1351 if test $ac_cv_prog_gcc = yes; then
1352 GCC=yes
1353 else
1354 GCC=
1355 fi
1356
1357 ac_test_CFLAGS="${CFLAGS+set}"
1358 ac_save_CFLAGS="$CFLAGS"
1359 CFLAGS=
1360 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1361 echo "configure:1362: checking whether ${CC-cc} accepts -g" >&5
1362 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1363 echo $ac_n "(cached) $ac_c" 1>&6
1364 else
1365 echo 'void f(){}' > conftest.c
1366 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1367 ac_cv_prog_cc_g=yes
1368 else
1369 ac_cv_prog_cc_g=no
1370 fi
1371 rm -f conftest*
1372
1373 fi
1374
1375 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1376 if test "$ac_test_CFLAGS" = set; then
1377 CFLAGS="$ac_save_CFLAGS"
1378 elif test $ac_cv_prog_cc_g = yes; then
1379 if test "$GCC" = yes; then
1380 CFLAGS="-g -O2"
1381 else
1382 CFLAGS="-g"
1383 fi
1384 else
1385 if test "$GCC" = yes; then
1386 CFLAGS="-O2"
1387 else
1388 CFLAGS=
1389 fi
1390 fi
1391
1392
1393 if test "$asc_ansi_ok" = no ; then
1394 CC=$asc_orig_cc
1395 { echo "configure: error: Cannot find an ANSI C compiler. ASCEND will not build
1396 without an ANSI compiler. If you have an ANSI compiler which
1397 configure is not finding, set the CC environment variable to
1398 the full path fo the compiler and rerun configure." 1>&2; exit 1; }
1399 fi
1400
1401
1402 #--------------------------------------------------------------------
1403 # Do other misc checks with CC and CFLAGS.
1404 #
1405 # Determine how to run the C preprocessor.
1406 #
1407 # If the user specifies --enable-optimization, remove `-g'
1408 # from CFLAGS, add `-O' to CFLAGS, and define `NDEBUG'. If
1409 # we are not building optimized, check for special libraries
1410 # needed for building a debugging binary (currenly only
1411 # /usr/lib/end.o under HPUX).
1412 #
1413 # Check if we're running on AIX; if so, add `-D_ALL_SOURCE'
1414 # to CFLAGS.
1415 #
1416 # Check if we're running on HPUX; if so, add -D_HPUX_SOURCE'
1417 # to CFLAGS unless the C preprocessor goes it for us.
1418 #--------------------------------------------------------------------
1419
1420 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1421 echo "configure:1422: checking how to run the C preprocessor" >&5
1422 # On Suns, sometimes $CPP names a directory.
1423 if test -n "$CPP" && test -d "$CPP"; then
1424 CPP=
1425 fi
1426 if test -z "$CPP"; then
1427 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1428 echo $ac_n "(cached) $ac_c" 1>&6
1429 else
1430 # This must be in double quotes, not single quotes, because CPP may get
1431 # substituted into the Makefile and "${CC-cc}" will confuse make.
1432 CPP="${CC-cc} -E"
1433 # On the NeXT, cc -E runs the code through the compiler's parser,
1434 # not just through cpp.
1435 cat > conftest.$ac_ext <<EOF
1436 #line 1437 "configure"
1437 #include "confdefs.h"
1438 #include <assert.h>
1439 Syntax Error
1440 EOF
1441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1442 { (eval echo configure:1443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1444 if test -z "$ac_err"; then
1445 :
1446 else
1447 echo "$ac_err" >&5
1448 echo "configure: failed program was:" >&5
1449 cat conftest.$ac_ext >&5
1450 rm -rf conftest*
1451 CPP="${CC-cc} -E -traditional-cpp"
1452 cat > conftest.$ac_ext <<EOF
1453 #line 1454 "configure"
1454 #include "confdefs.h"
1455 #include <assert.h>
1456 Syntax Error
1457 EOF
1458 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1459 { (eval echo configure:1460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1460 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1461 if test -z "$ac_err"; then
1462 :
1463 else
1464 echo "$ac_err" >&5
1465 echo "configure: failed program was:" >&5
1466 cat conftest.$ac_ext >&5
1467 rm -rf conftest*
1468 CPP="${CC-cc} -nologo -E"
1469 cat > conftest.$ac_ext <<EOF
1470 #line 1471 "configure"
1471 #include "confdefs.h"
1472 #include <assert.h>
1473 Syntax Error
1474 EOF
1475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1476 { (eval echo configure:1477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1478 if test -z "$ac_err"; then
1479 :
1480 else
1481 echo "$ac_err" >&5
1482 echo "configure: failed program was:" >&5
1483 cat conftest.$ac_ext >&5
1484 rm -rf conftest*
1485 CPP=/lib/cpp
1486 fi
1487 rm -f conftest*
1488 fi
1489 rm -f conftest*
1490 fi
1491 rm -f conftest*
1492 ac_cv_prog_CPP="$CPP"
1493 fi
1494 CPP="$ac_cv_prog_CPP"
1495 else
1496 ac_cv_prog_CPP="$CPP"
1497 fi
1498 echo "$ac_t""$CPP" 1>&6
1499
1500
1501 # Check whether --enable-optimization or --disable-optimization was given.
1502 if test "${enable_optimization+set}" = set; then
1503 enableval="$enable_optimization"
1504 asc_do_opt="$enableval"
1505 else
1506 asc_do_opt=no
1507 fi
1508
1509 if test "$asc_do_opt" = yes; then
1510 CFLAGS=`echo "-O $CFLAGS " | sed 's/ -g / /g'`
1511 cat >> confdefs.h <<\EOF
1512 #define NDEBUG 1
1513 EOF
1514
1515 else
1516 # Extract the first word of "end.o", so it can be a program name with args.
1517 set dummy end.o; ac_word=$2
1518 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1519 echo "configure:1520: checking for $ac_word" >&5
1520 if eval "test \"`echo '$''{'ac_cv_path_DEBUG_LIBS'+set}'`\" = set"; then
1521 echo $ac_n "(cached) $ac_c" 1>&6
1522 else
1523 case "$DEBUG_LIBS" in
1524 /*)
1525 ac_cv_path_DEBUG_LIBS="$DEBUG_LIBS" # Let the user override the test with a path.
1526 ;;
1527 ?:/*)
1528 ac_cv_path_DEBUG_LIBS="$DEBUG_LIBS" # Let the user override the test with a dos path.
1529 ;;
1530 *)
1531 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1532 ac_dummy="/usr/lib"
1533 for ac_dir in $ac_dummy; do
1534 test -z "$ac_dir" && ac_dir=.
1535 if test -f $ac_dir/$ac_word; then
1536 ac_cv_path_DEBUG_LIBS="$ac_dir/$ac_word"
1537 break
1538 fi
1539 done
1540 IFS="$ac_save_ifs"
1541 ;;
1542 esac
1543 fi
1544 DEBUG_LIBS="$ac_cv_path_DEBUG_LIBS"
1545 if test -n "$DEBUG_LIBS"; then
1546 echo "$ac_t""$DEBUG_LIBS" 1>&6
1547 else
1548 echo "$ac_t""no" 1>&6
1549 fi
1550
1551 fi
1552
1553 echo $ac_n "checking for AIX""... $ac_c" 1>&6
1554 echo "configure:1555: checking for AIX" >&5
1555 cat > conftest.$ac_ext <<EOF
1556 #line 1557 "configure"
1557 #include "confdefs.h"
1558
1559 #ifdef _AIX
1560 yes
1561 #endif
1562
1563 EOF
1564 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1565 egrep "yes" >/dev/null 2>&1; then
1566 rm -rf conftest*
1567 asc_aix=yes ; cat >> confdefs.h <<\EOF
1568 #define _ALL_SOURCE 1
1569 EOF
1570
1571 else
1572 rm -rf conftest*
1573 asc_aix=no
1574 fi
1575 rm -f conftest*
1576
1577 echo "$ac_t""$asc_aix" 1>&6
1578
1579 echo $ac_n "checking whether -D_HPUX_SOURCE is needed""... $ac_c" 1>&6
1580 echo "configure:1581: checking whether -D_HPUX_SOURCE is needed" >&5
1581 cat > conftest.$ac_ext <<EOF
1582 #line 1583 "configure"
1583 #include "confdefs.h"
1584
1585 #ifdef __hpux
1586 #ifndef _HPUX_SOURCE
1587 yes
1588 #endif
1589 #endif
1590
1591 EOF
1592 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1593 egrep "yes" >/dev/null 2>&1; then
1594 rm -rf conftest*
1595 asc_hpux=yes ; cat >> confdefs.h <<\EOF
1596 #define _HPUX_SOURCE 1
1597 EOF
1598
1599 else
1600 rm -rf conftest*
1601 asc_hpux=no
1602 fi
1603 rm -f conftest*
1604
1605 echo "$ac_t""$asc_hpux" 1>&6
1606
1607 # Check the size of pointers; if cross compiling, assume 32 bit pointers
1608 echo $ac_n "checking size of void *""... $ac_c" 1>&6
1609 echo "configure:1610: checking size of void *" >&5
1610 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
1611 echo $ac_n "(cached) $ac_c" 1>&6
1612 else
1613 if test "$cross_compiling" = yes; then
1614 ac_cv_sizeof_void_p=4
1615 else
1616 cat > conftest.$ac_ext <<EOF
1617 #line 1618 "configure"
1618 #include "confdefs.h"
1619 #include <stdio.h>
1620 int main()
1621 {
1622 FILE *f=fopen("conftestval", "w");
1623 if (!f) return(1);
1624 fprintf(f, "%d\n", sizeof(void *));
1625 return(0);
1626 }
1627 EOF
1628 if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1629 then
1630 ac_cv_sizeof_void_p=`cat conftestval`
1631 else
1632 echo "configure: failed program was:" >&5
1633 cat conftest.$ac_ext >&5
1634 rm -fr conftest*
1635 ac_cv_sizeof_void_p=0
1636 fi
1637 rm -fr conftest*
1638 fi
1639
1640 fi
1641 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
1642 cat >> confdefs.h <<EOF
1643 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
1644 EOF
1645
1646
1647
1648
1649 #--------------------------------------------------------------------
1650 # Set YACC.
1651 # See if we can find `yacc' ourselves; if not, call the
1652 # autoconf macro which looks for `bison' and then for `yacc'
1653 #--------------------------------------------------------------------
1654 asc_found_yacc=0
1655 # Extract the first word of "yacc", so it can be a program name with args.
1656 set dummy yacc; ac_word=$2
1657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1658 echo "configure:1659: checking for $ac_word" >&5
1659 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1660 echo $ac_n "(cached) $ac_c" 1>&6
1661 else
1662 if test -n "$YACC"; then
1663 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1664 else
1665 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1666 ac_dummy="$PATH"
1667 for ac_dir in $ac_dummy; do
1668 test -z "$ac_dir" && ac_dir=.
1669 if test -f $ac_dir/$ac_word; then
1670 ac_cv_prog_YACC="yacc"
1671 break
1672 fi
1673 done
1674 IFS="$ac_save_ifs"
1675 test -z "$ac_cv_prog_YACC" && ac_cv_prog_YACC="asc_found_yacc=no"
1676 fi
1677 fi
1678 YACC="$ac_cv_prog_YACC"
1679 if test -n "$YACC"; then
1680 echo "$ac_t""$YACC" 1>&6
1681 else
1682 echo "$ac_t""no" 1>&6
1683 fi
1684
1685 if test "$asc_found_yacc" = no ; then
1686 for ac_prog in 'bison -y' byacc
1687 do
1688 # Extract the first word of "$ac_prog", so it can be a program name with args.
1689 set dummy $ac_prog; ac_word=$2
1690 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1691 echo "configure:1692: checking for $ac_word" >&5
1692 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1693 echo $ac_n "(cached) $ac_c" 1>&6
1694 else
1695 if test -n "$YACC"; then
1696 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1697 else
1698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1699 ac_dummy="$PATH"
1700 for ac_dir in $ac_dummy; do
1701 test -z "$ac_dir" && ac_dir=.
1702 if test -f $ac_dir/$ac_word; then
1703 ac_cv_prog_YACC="$ac_prog"
1704 break
1705 fi
1706 done
1707 IFS="$ac_save_ifs"
1708 fi
1709 fi
1710 YACC="$ac_cv_prog_YACC"
1711 if test -n "$YACC"; then
1712 echo "$ac_t""$YACC" 1>&6
1713 else
1714 echo "$ac_t""no" 1>&6
1715 fi
1716
1717 test -n "$YACC" && break
1718 done
1719 test -n "$YACC" || YACC="yacc"
1720
1721 fi
1722
1723
1724 #--------------------------------------------------------------------
1725 # Set LEX.
1726 # ASCEND requires a `flex' which understands -P (allows you to
1727 # specify a prefix other than `yy'). The -P flag was added at
1728 # the same time a -V (version) flag was added (version 2.4.1),
1729 # so if `flex' understands -V, it'll understand -P (checking
1730 # for -P directly requires a flex input file).
1731 #
1732 # 1. If `LEX' is not set, look for `flex' and set `LEX' to
1733 # `flex' if found.
1734 # 2. If `flex' was found, see if it understands -V. If so,
1735 # set `scanner_src' and `typer_src' to have `flex' generate
1736 # the C files from the flex input files
1737 # base/generic/compiler/scanner.l & tcltk98/interface/typelex.l
1738 # We don't need to look for libfl.a since we define
1739 # yywrap() ourselves.
1740 # 3. If `flex' wasn't found or was found but isn't new enough:
1741 # a. Print a warning message
1742 # b. Set `scanner_src' and `typer_src' to use pre-generated
1743 # C files for the flex files mentioned in (2).
1744 # c. Set `LEX' to `lex'
1745 # d. Search for the lex library `libl.a' and set LEXLIB to
1746 # its location.
1747 #--------------------------------------------------------------------
1748 # Extract the first word of "flex", so it can be a program name with args.
1749 set dummy flex; ac_word=$2
1750 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1751 echo "configure:1752: checking for $ac_word" >&5
1752 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1753 echo $ac_n "(cached) $ac_c" 1>&6
1754 else
1755 if test -n "$LEX"; then
1756 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1757 else
1758 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1759 ac_dummy="$PATH"
1760 for ac_dir in $ac_dummy; do
1761 test -z "$ac_dir" && ac_dir=.
1762 if test -f $ac_dir/$ac_word; then
1763 ac_cv_prog_LEX="flex"
1764 break
1765 fi
1766 done
1767 IFS="$ac_save_ifs"
1768 fi
1769 fi
1770 LEX="$ac_cv_prog_LEX"
1771 if test -n "$LEX"; then
1772 echo "$ac_t""$LEX" 1>&6
1773 else
1774 echo "$ac_t""no" 1>&6
1775 fi
1776
1777
1778 if test -n "$LEX" ; then
1779 echo $ac_n "checking whether $LEX is at least version 2.4.1""... $ac_c" 1>&6
1780 echo "configure:1781: checking whether $LEX is at least version 2.4.1" >&5
1781 echo "$LEX -V" 1>&5
1782 if $LEX -V 1>&5 2>&5 ; then
1783 echo "$ac_t""yes" 1>&6
1784 scanner_src="scanner.c.from.flex"
1785 typer_src="typelex.c.from.flex"
1786 else
1787 echo "$ac_t""no" 1>&6
1788 LEX=''
1789 fi
1790 fi
1791
1792 if test -z "$LEX" ; then
1793 echo "configure: warning: Cannot find a flex lexer version 2.4.1 or greater.
1794 Using pregenerated C files for base/generic/compiler/scanner.l
1795 and tcltk98/interface/typelex.l. If you have flex 2.4.1
1796 or newer, set the LEX environment variable to its location
1797 and run configure again." 1>&2
1798 scanner_src="scanner.c.from.c"
1799 typer_src="typelex.c.from.c"
1800
1801 # let configure set LEX and LEXLIB even though we won't be using them
1802 # Extract the first word of "flex", so it can be a program name with args.
1803 set dummy flex; ac_word=$2
1804 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1805 echo "configure:1806: checking for $ac_word" >&5
1806 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1807 echo $ac_n "(cached) $ac_c" 1>&6
1808 else
1809 if test -n "$LEX"; then
1810 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1811 else
1812 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1813 ac_dummy="$PATH"
1814 for ac_dir in $ac_dummy; do
1815 test -z "$ac_dir" && ac_dir=.
1816 if test -f $ac_dir/$ac_word; then
1817 ac_cv_prog_LEX="flex"
1818 break
1819 fi
1820 done
1821 IFS="$ac_save_ifs"
1822 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1823 fi
1824 fi
1825 LEX="$ac_cv_prog_LEX"
1826 if test -n "$LEX"; then
1827 echo "$ac_t""$LEX" 1>&6
1828 else
1829 echo "$ac_t""no" 1>&6
1830 fi
1831
1832 if test -z "$LEXLIB"
1833 then
1834 case "$LEX" in
1835 flex*) ac_lib=fl ;;
1836 *) ac_lib=l ;;
1837 esac
1838 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1839 echo "configure:1840: checking for yywrap in -l$ac_lib" >&5
1840 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1841 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1842 echo $ac_n "(cached) $ac_c" 1>&6
1843 else
1844 ac_save_LIBS="$LIBS"
1845 LIBS="-l$ac_lib $LIBS"
1846 cat > conftest.$ac_ext <<EOF
1847 #line 1848 "configure"
1848 #include "confdefs.h"
1849 /* Override any gcc2 internal prototype to avoid an error. */
1850 /* We use char because int might match the return type of a gcc2
1851 builtin and then its argument prototype would still apply. */
1852 char yywrap();
1853
1854 int main() {
1855 yywrap()
1856 ; return 0; }
1857 EOF
1858 if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1859 rm -rf conftest*
1860 eval "ac_cv_lib_$ac_lib_var=yes"
1861 else
1862 echo "configure: failed program was:" >&5
1863 cat conftest.$ac_ext >&5
1864 rm -rf conftest*
1865 eval "ac_cv_lib_$ac_lib_var=no"
1866 fi
1867 rm -f conftest*
1868 LIBS="$ac_save_LIBS"
1869
1870 fi
1871 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1872 echo "$ac_t""yes" 1>&6
1873 LEXLIB="-l$ac_lib"
1874 else
1875 echo "$ac_t""no" 1>&6
1876 fi
1877
1878 fi
1879
1880 fi
1881
1882
1883 #--------------------------------------------------------------------
1884 # Math libraries.
1885 # On a few very rare systems, all of the libm.a stuff is
1886 # already in libc.a. Set compiler flags accordingly.
1887 # Also, Linux requires the "ieee" library for math to work
1888 # right (and it must appear before "-lm").
1889 #
1890 # When building on HPUX with GCC, GCC cannot find `copysign'
1891 # because it lives in an odd place; see if we need to add
1892 # this odd place to MATH_LIBS.
1893 #
1894 # See if erf(), the error function, exists; if so, define
1895 # HAVE_ERF.
1896 #--------------------------------------------------------------------
1897 echo $ac_n "checking for sin""... $ac_c" 1>&6
1898 echo "configure:1899: checking for sin" >&5
1899 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
1900 echo $ac_n "(cached) $ac_c" 1>&6
1901 else
1902 cat > conftest.$ac_ext <<EOF
1903 #line 1904 "configure"
1904 #include "confdefs.h"
1905 /* System header to define __stub macros and hopefully few prototypes,
1906 which can conflict with char sin(); below. */
1907 #include <assert.h>
1908 /* Override any gcc2 internal prototype to avoid an error. */
1909 /* We use char because int might match the return type of a gcc2
1910 builtin and then its argument prototype would still apply. */
1911 char sin();
1912
1913 int main() {
1914
1915 /* The GNU C library defines this for functions which it implements
1916 to always fail with ENOSYS. Some functions are actually named
1917 something starting with __ and the normal name is an alias. */
1918 #if defined (__stub_sin) || defined (__stub___sin)
1919 choke me
1920 #else
1921 sin();
1922 #endif
1923
1924 ; return 0; }
1925 EOF
1926 if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1927 rm -rf conftest*
1928 eval "ac_cv_func_sin=yes"
1929 else
1930 echo "configure: failed program was:" >&5
1931 cat conftest.$ac_ext >&5
1932 rm -rf conftest*
1933 eval "ac_cv_func_sin=no"
1934 fi
1935 rm -f conftest*
1936 fi
1937
1938 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
1939 echo "$ac_t""yes" 1>&6
1940 MATH_LIBS=""
1941 else
1942 echo "$ac_t""no" 1>&6
1943 MATH_LIBS="-lm"
1944 fi
1945
1946
1947 echo $ac_n "checking for printf in -lieee""... $ac_c" 1>&6
1948 echo "configure:1949: checking for printf in -lieee" >&5
1949 ac_lib_var=`echo ieee'_'printf | sed 'y%./+-%__p_%'`
1950 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1951 echo $ac_n "(cached) $ac_c" 1>&6
1952 else
1953 ac_save_LIBS="$LIBS"
1954 LIBS="-lieee $LIBS"
1955 cat > conftest.$ac_ext <<EOF
1956 #line 1957 "configure"
1957 #include "confdefs.h"
1958 /* Override any gcc2 internal prototype to avoid an error. */
1959 /* We use char because int might match the return type of a gcc2
1960 builtin and then its argument prototype would still apply. */
1961 char printf();
1962
1963 int main() {
1964 printf()
1965 ; return 0; }
1966 EOF
1967 if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1968 rm -rf conftest*
1969 eval "ac_cv_lib_$ac_lib_var=yes"
1970 else
1971 echo "configure: failed program was:" >&5
1972 cat conftest.$ac_ext >&5
1973 rm -rf conftest*
1974 eval "ac_cv_lib_$ac_lib_var=no"
1975 fi
1976 rm -f conftest*
1977 LIBS="$ac_save_LIBS"
1978
1979 fi
1980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1981 echo "$ac_t""yes" 1>&6
1982 MATH_LIBS="-lieee $MATH_LIBS"
1983 else
1984 echo "$ac_t""no" 1>&6
1985 fi
1986
1987
1988 if test -n "$MATH_LIBS" ; then
1989 echo $ac_n "checking for copysign in -lm""... $ac_c" 1>&6
1990 echo "configure:1991: checking for copysign in -lm" >&5
1991 ac_lib_var=`echo m'_'copysign | sed 'y%./+-%__p_%'`
1992 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1993 echo $ac_n "(cached) $ac_c" 1>&6
1994 else
1995 ac_save_LIBS="$LIBS"
1996 LIBS="-lm $MATH_LIBS $LIBS"
1997 cat > conftest.$ac_ext <<EOF
1998 #line 1999 "configure"
1999 #include "confdefs.h"
2000 /* Override any gcc2 internal prototype to avoid an error. */
2001 /* We use char because int might match the return type of a gcc2
2002 builtin and then its argument prototype would still apply. */
2003 char copysign();
2004
2005 int main() {
2006 copysign()
2007 ; return 0; }
2008 EOF
2009 if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2010 rm -rf conftest*
2011 eval "ac_cv_lib_$ac_lib_var=yes"
2012 else
2013 echo "configure: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
2015 rm -rf conftest*
2016 eval "ac_cv_lib_$ac_lib_var=no"
2017 fi
2018 rm -f conftest*
2019 LIBS="$ac_save_LIBS"
2020
2021 fi
2022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2023 echo "$ac_t""yes" 1>&6
2024 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2025 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2026 cat >> confdefs.h <<EOF
2027 #define $ac_tr_lib 1
2028 EOF
2029
2030 LIBS="-lm $LIBS"
2031
2032 else
2033 echo "$ac_t""no" 1>&6
2034 echo $ac_n "checking for drem in -lm""... $ac_c" 1>&6
2035 echo "configure:2036: checking for drem in -lm" >&5
2036 ac_lib_var=`echo m'_'drem | sed 'y%./+-%__p_%'`
2037 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2038 echo $ac_n "(cached) $ac_c" 1>&6
2039 else
2040 ac_save_LIBS="$LIBS"
2041 LIBS="-lm /lib/pa1.1/libM.a
2042 $LIBS"
2043 cat > conftest.$ac_ext <<EOF
2044 #line 2045 "configure"
2045 #include "confdefs.h"
2046 /* Override any gcc2 internal prototype to avoid an error. */
2047 /* We use char because int might match the return type of a gcc2
2048 builtin and then its argument prototype would still apply. */
2049 char drem();
2050
2051 int main() {
2052 drem()
2053 ; return 0; }
2054 EOF
2055 if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2056 rm -rf conftest*
2057 eval "ac_cv_lib_$ac_lib_var=yes"
2058 else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -rf conftest*
2062 eval "ac_cv_lib_$ac_lib_var=no"
2063 fi
2064 rm -f conftest*
2065 LIBS="$ac_save_LIBS"
2066
2067 fi
2068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2069 echo "$ac_t""yes" 1>&6
2070 MATH_LIBS="$MATH_LIBS /lib/pa1.1/libM.a"
2071
2072 else
2073 echo "$ac_t""no" 1>&6
2074 fi
2075
2076 fi
2077
2078 fi
2079
2080 # store the current list of libraries, add the math libraries to LIBS,
2081 # check for erf(), then reset the value of LIBS.
2082 asc_keep_LIBS="$LIBS"
2083 LIBS="$LIBS $MATH_LIBS"
2084 for ac_func in erf
2085 do
2086 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2087 echo "configure:2088: checking for $ac_func" >&5
2088 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2089 echo $ac_n "(cached) $ac_c" 1>&6
2090 else
2091 cat > conftest.$ac_ext <<EOF
2092 #line 2093 "configure"
2093 #include "confdefs.h"
2094 /* System header to define __stub macros and hopefully few prototypes,
2095 which can conflict with char $ac_func(); below. */
2096 #include <assert.h>
2097 /* Override any gcc2 internal prototype to avoid an error. */
2098 /* We use char because int might match the return type of a gcc2
2099 builtin and then its argument prototype would still apply. */
2100 char $ac_func();
2101
2102 int main() {
2103
2104 /* The GNU C library defines this for functions which it implements
2105 to always fail with ENOSYS. Some functions are actually named
2106 something starting with __ and the normal name is an alias. */
2107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2108 choke me
2109 #else
2110 $ac_func();
2111 #endif
2112
2113 ; return 0; }
2114 EOF
2115 if { (eval echo configure:2116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2116 rm -rf conftest*
2117 eval "ac_cv_func_$ac_func=yes"
2118 else
2119 echo "configure: failed program was:" >&5
2120 cat conftest.$ac_ext >&5
2121 rm -rf conftest*
2122 eval "ac_cv_func_$ac_func=no"
2123 fi
2124 rm -f conftest*
2125 fi
2126
2127 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2128 echo "$ac_t""yes" 1>&6
2129 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2130 cat >> confdefs.h <<EOF
2131 #define $ac_tr_func 1
2132 EOF
2133
2134 else
2135 echo "$ac_t""no" 1>&6
2136 fi
2137 done
2138
2139 LIBS="$asc_keep_LIBS"
2140
2141
2142 #--------------------------------------------------------------------
2143 # Check for X11.
2144 # We'll use the simple autoconf builtin macro for finding
2145 # X11 until we find a reason not to.
2146 #
2147 # On Solaris and IRIX, add the path to the X library to the
2148 # run-time shared-library-search-path so the ASCEND binary
2149 # can find the X library without the user having to set
2150 # LD_LIBRARY_PATH
2151 #--------------------------------------------------------------------
2152 # If we find X, set shell vars x_includes and x_libraries to the
2153 # paths, otherwise set no_x=yes.
2154 # Uses ac_ vars as temps to allow command line to override cache and checks.
2155 # --without-x overrides everything else, but does not touch the cache.
2156 echo $ac_n "checking for X""... $ac_c" 1>&6
2157 echo "configure:2158: checking for X" >&5
2158
2159 # Check whether --with-x or --without-x was given.
2160 if test "${with_x+set}" = set; then
2161 withval="$with_x"
2162 :
2163 fi
2164
2165 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2166 if test "x$with_x" = xno; then
2167 # The user explicitly disabled X.
2168 have_x=disabled
2169 else
2170 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2171 # Both variables are already set.
2172 have_x=yes
2173 else
2174 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2175 echo $ac_n "(cached) $ac_c" 1>&6
2176 else
2177 # One or both of the vars are not set, and there is no cached value.
2178 ac_x_includes=NO ac_x_libraries=NO
2179 rm -fr conftestdir
2180 if mkdir conftestdir; then
2181 cd conftestdir
2182 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2183 cat > Imakefile <<'EOF'
2184 acfindx:
2185 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2186 EOF
2187 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2188 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2189 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2190 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2191 for ac_extension in a so sl; do
2192 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2193 test -f $ac_im_libdir/libX11.$ac_extension; then
2194 ac_im_usrlibdir=$ac_im_libdir; break
2195 fi
2196 done
2197 # Screen out bogus values from the imake configuration. They are
2198 # bogus both because they are the default anyway, and because
2199 # using them would break gcc on systems where it needs fixed includes.
2200 case "$ac_im_incroot" in
2201 /usr/include) ;;
2202 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2203 esac
2204 case "$ac_im_usrlibdir" in
2205 /usr/lib | /lib) ;;
2206 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2207 esac
2208 fi
2209 cd ..
2210 rm -fr conftestdir
2211 fi
2212
2213 if test "$ac_x_includes" = NO; then
2214 # Guess where to find include files, by looking for this one X11 .h file.
2215 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2216
2217 # First, try using that file with no special directory specified.
2218 cat > conftest.$ac_ext <<EOF
2219 #line 2220 "configure"
2220 #include "confdefs.h"
2221 #include <$x_direct_test_include>
2222 EOF
2223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2224 { (eval echo configure:2225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2226 if test -z "$ac_err"; then
2227 rm -rf conftest*
2228 # We can compile using X headers with no special include directory.
2229 ac_x_includes=
2230 else
2231 echo "$ac_err" >&5
2232 echo "configure: failed program was:" >&5
2233 cat conftest.$ac_ext >&5
2234 rm -rf conftest*
2235 # Look for the header file in a standard set of common directories.
2236 # Check X11 before X11Rn because it is often a symlink to the current release.
2237 for ac_dir in \
2238 /usr/X11/include \
2239 /usr/X11R6/include \
2240 /usr/X11R5/include \
2241 /usr/X11R4/include \
2242 \
2243 /usr/include/X11 \
2244 /usr/include/X11R6 \
2245 /usr/include/X11R5 \
2246 /usr/include/X11R4 \
2247 \
2248 /usr/local/X11/include \
2249 /usr/local/X11R6/include \
2250 /usr/local/X11R5/include \
2251 /usr/local/X11R4/include \
2252 \
2253 /usr/local/include/X11 \
2254 /usr/local/include/X11R6 \
2255 /usr/local/include/X11R5 \
2256 /usr/local/include/X11R4 \
2257 \
2258 /usr/X386/include \
2259 /usr/x386/include \
2260 /usr/XFree86/include/X11 \
2261 \
2262 /usr/include \
2263 /usr/local/include \
2264 /usr/unsupported/include \
2265 /usr/athena/include \
2266 /usr/local/x11r5/include \
2267 /usr/lpp/Xamples/include \
2268 \
2269 /usr/openwin/include \
2270 /usr/openwin/share/include \
2271 ; \
2272 do
2273 if test -r "$ac_dir/$x_direct_test_include"; then
2274 ac_x_includes=$ac_dir
2275 break
2276 fi
2277 done
2278 fi
2279 rm -f conftest*
2280 fi # $ac_x_includes = NO
2281
2282 if test "$ac_x_libraries" = NO; then
2283 # Check for the libraries.
2284
2285 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2286 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2287
2288 # See if we find them without any special options.
2289 # Don't add to $LIBS permanently.
2290 ac_save_LIBS="$LIBS"
2291 LIBS="-l$x_direct_test_library $LIBS"
2292 cat > conftest.$ac_ext <<EOF
2293 #line 2294 "configure"
2294 #include "confdefs.h"
2295
2296 int main() {
2297 ${x_direct_test_function}()
2298 ; return 0; }
2299 EOF
2300 if { (eval echo configure:2301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2301 rm -rf conftest*
2302 LIBS="$ac_save_LIBS"
2303 # We can link X programs with no special library path.
2304 ac_x_libraries=
2305 else
2306 echo "configure: failed program was:" >&5
2307 cat conftest.$ac_ext >&5
2308 rm -rf conftest*
2309 LIBS="$ac_save_LIBS"
2310 # First see if replacing the include by lib works.
2311 # Check X11 before X11Rn because it is often a symlink to the current release.
2312 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2313 /usr/X11/lib \
2314 /usr/X11R6/lib \
2315 /usr/X11R5/lib \
2316 /usr/X11R4/lib \
2317 \
2318 /usr/lib/X11 \
2319 /usr/lib/X11R6 \
2320 /usr/lib/X11R5 \
2321 /usr/lib/X11R4 \
2322 \
2323 /usr/local/X11/lib \
2324 /usr/local/X11R6/lib \
2325 /usr/local/X11R5/lib \
2326 /usr/local/X11R4/lib \
2327 \
2328 /usr/local/lib/X11 \
2329 /usr/local/lib/X11R6 \
2330 /usr/local/lib/X11R5 \
2331 /usr/local/lib/X11R4 \
2332 \
2333 /usr/X386/lib \
2334 /usr/x386/lib \
2335 /usr/XFree86/lib/X11 \
2336 \
2337 /usr/lib \
2338 /usr/local/lib \
2339 /usr/unsupported/lib \
2340 /usr/athena/lib \
2341 /usr/local/x11r5/lib \
2342 /usr/lpp/Xamples/lib \
2343 /lib/usr/lib/X11 \
2344 \
2345 /usr/openwin/lib \
2346 /usr/openwin/share/lib \
2347 ; \
2348 do
2349 for ac_extension in a so sl; do
2350 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2351 ac_x_libraries=$ac_dir
2352 break 2
2353 fi
2354 done
2355 done
2356 fi
2357 rm -f conftest*
2358 fi # $ac_x_libraries = NO
2359
2360 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2361 # Didn't find X anywhere. Cache the known absence of X.
2362 ac_cv_have_x="have_x=no"
2363 else
2364 # Record where we found X for the cache.
2365 ac_cv_have_x="have_x=yes \
2366 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2367 fi
2368 fi
2369 fi
2370 eval "$ac_cv_have_x"
2371 fi # $with_x != no
2372
2373 if test "$have_x" != yes; then
2374 echo "$ac_t""$have_x" 1>&6
2375 no_x=yes
2376 else
2377 # If each of the values was on the command line, it overrides each guess.
2378 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2379 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2380 # Update the cache value to reflect the command line values.
2381 ac_cv_have_x="have_x=yes \
2382 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2383 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2384 fi
2385
2386 if test -n "$x_includes"; then
2387 X11_INCLUDES="-I$x_includes"
2388 fi
2389 if test -n "$x_libraries"; then
2390 X11_LIBRARIES="-L$x_libraries"
2391 case "$host" in
2392 sparc-sun-solaris*)
2393 X11_RUN_PATH="-R$x_libraries"
2394 ;;
2395 mips-sgi-irix*)
2396 X11_RUN_PATH="-rpath $x_libraries"
2397 ;;
2398 *)
2399 X11_RUN_PATH=""
2400 ;;
2401 esac
2402 fi
2403
2404
2405 #--------------------------------------------------------------------
2406 # Check for the existence of various libraries. The order here
2407 # is important, so that then end up in the right order in the
2408 # command line generated by make. The -lsocket and -lnsl
2409 # libraries require a couple of special tricks:
2410 # 1. Use "connect" and "accept" to check for -lsocket, and
2411 # "gethostbyname" to check for -lnsl.
2412 # 2. Use each function name only once: can't redo a check
2413 # because autoconf caches the results of the last check
2414 # and won't redo it.
2415 # 3. Use -lnsl and -lsocket only if they supply procedures that
2416 # aren't already present in the normal libraries. This is
2417 # because IRIX 5.2 has libraries, but they aren't needed and
2418 # they're bogus: they goof up name resolution if used.
2419 # 4. On some SVR4 systems, can't use -lsocket without -lnsl
2420 # too. To get around this problem, check for both libraries
2421 # together if -lsocket doesn't work by itself.
2422 #--------------------------------------------------------------------
2423
2424 asc_checkBoth=0
2425 echo $ac_n "checking for connect""... $ac_c" 1>&6
2426 echo "configure:2427: checking for connect" >&5
2427 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2428 echo $ac_n "(cached) $ac_c" 1>&6
2429 else
2430 cat > conftest.$ac_ext <<EOF
2431 #line 2432 "configure"
2432 #include "confdefs.h"
2433 /* System header to define __stub macros and hopefully few prototypes,
2434 which can conflict with char connect(); below. */
2435 #include <assert.h>
2436 /* Override any gcc2 internal prototype to avoid an error. */
2437 /* We use char because int might match the return type of a gcc2
2438 builtin and then its argument prototype would still apply. */
2439 char connect();
2440
2441 int main() {
2442
2443 /* The GNU C library defines this for functions which it implements
2444 to always fail with ENOSYS. Some functions are actually named
2445 something starting with __ and the normal name is an alias. */
2446 #if defined (__stub_connect) || defined (__stub___connect)
2447 choke me
2448 #else
2449 connect();
2450 #endif
2451
2452 ; return 0; }
2453 EOF
2454 if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2455 rm -rf conftest*
2456 eval "ac_cv_func_connect=yes"
2457 else
2458 echo "configure: failed program was:" >&5
2459 cat conftest.$ac_ext >&5
2460 rm -rf conftest*
2461 eval "ac_cv_func_connect=no"
2462 fi
2463 rm -f conftest*
2464 fi
2465
2466 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2467 echo "$ac_t""yes" 1>&6
2468 asc_checkSocket=0
2469 else
2470 echo "$ac_t""no" 1>&6
2471 asc_checkSocket=1
2472 fi
2473
2474 if test "$asc_checkSocket" = 1; then
2475 echo $ac_n "checking for printf in -lsocket""... $ac_c" 1>&6
2476 echo "configure:2477: checking for printf in -lsocket" >&5
2477 ac_lib_var=`echo socket'_'printf | sed 'y%./+-%__p_%'`
2478 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2479 echo $ac_n "(cached) $ac_c" 1>&6
2480 else
2481 ac_save_LIBS="$LIBS"
2482 LIBS="-lsocket $LIBS"
2483 cat > conftest.$ac_ext <<EOF
2484 #line 2485 "configure"
2485 #include "confdefs.h"
2486 /* Override any gcc2 internal prototype to avoid an error. */
2487 /* We use char because int might match the return type of a gcc2
2488 builtin and then its argument prototype would still apply. */
2489 char printf();
2490
2491 int main() {
2492 printf()
2493 ; return 0; }
2494 EOF
2495 if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2496 rm -rf conftest*
2497 eval "ac_cv_lib_$ac_lib_var=yes"
2498 else
2499 echo "configure: failed program was:" >&5
2500 cat conftest.$ac_ext >&5
2501 rm -rf conftest*
2502 eval "ac_cv_lib_$ac_lib_var=no"
2503 fi
2504 rm -f conftest*
2505 LIBS="$ac_save_LIBS"
2506
2507 fi
2508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2509 echo "$ac_t""yes" 1>&6
2510 X11_EXTRA_LIBS="-lsocket"
2511 else
2512 echo "$ac_t""no" 1>&6
2513 asc_checkBoth=1
2514 fi
2515
2516 fi
2517 if test "$asc_checkBoth" = 1; then
2518 asc_oldLibs=$LIBS
2519 X11_EXTRA_LIBS="-lsocket -lnsl"
2520 LIBS="$LIBS $X11_EXTRA_LIBS"
2521 echo $ac_n "checking for accept""... $ac_c" 1>&6
2522 echo "configure:2523: checking for accept" >&5
2523 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
2524 echo $ac_n "(cached) $ac_c" 1>&6
2525 else
2526 cat > conftest.$ac_ext <<EOF
2527 #line 2528 "configure"
2528 #include "confdefs.h"
2529 /* System header to define __stub macros and hopefully few prototypes,
2530 which can conflict with char accept(); below. */
2531 #include <assert.h>
2532 /* Override any gcc2 internal prototype to avoid an error. */
2533 /* We use char because int might match the return type of a gcc2
2534 builtin and then its argument prototype would still apply. */
2535 char accept();
2536
2537 int main() {
2538
2539 /* The GNU C library defines this for functions which it implements
2540 to always fail with ENOSYS. Some functions are actually named
2541 something starting with __ and the normal name is an alias. */
2542 #if defined (__stub_accept) || defined (__stub___accept)
2543 choke me
2544 #else
2545 accept();
2546 #endif
2547
2548 ; return 0; }
2549 EOF
2550 if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2551 rm -rf conftest*
2552 eval "ac_cv_func_accept=yes"
2553 else
2554 echo "configure: failed program was:" >&5
2555 cat conftest.$ac_ext >&5
2556 rm -rf conftest*
2557 eval "ac_cv_func_accept=no"
2558 fi
2559 rm -f conftest*
2560 fi
2561
2562 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
2563 echo "$ac_t""yes" 1>&6
2564 asc_checkNsl=0
2565 else
2566 echo "$ac_t""no" 1>&6
2567 X11_EXTRA_LIBS=""
2568 fi
2569
2570 LIBS=$asc_oldLibs
2571 fi
2572 asc_oldLibs=$LIBS
2573 LIBS="$LIBS $X11_EXTRA_LIBS"
2574 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2575 echo "configure:2576: checking for gethostbyname" >&5
2576 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2577 echo $ac_n "(cached) $ac_c" 1>&6
2578 else
2579 cat > conftest.$ac_ext <<EOF
2580 #line 2581 "configure"
2581 #include "confdefs.h"
2582 /* System header to define __stub macros and hopefully few prototypes,
2583 which can conflict with char gethostbyname(); below. */
2584 #include <assert.h>
2585 /* Override any gcc2 internal prototype to avoid an error. */
2586 /* We use char because int might match the return type of a gcc2
2587 builtin and then its argument prototype would still apply. */
2588 char gethostbyname();
2589
2590 int main() {
2591
2592 /* The GNU C library defines this for functions which it implements
2593 to always fail with ENOSYS. Some functions are actually named
2594 something starting with __ and the normal name is an alias. */
2595 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2596 choke me
2597 #else
2598 gethostbyname();
2599 #endif
2600
2601 ; return 0; }
2602 EOF
2603 if { (eval echo configure:2604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2604 rm -rf conftest*
2605 eval "ac_cv_func_gethostbyname=yes"
2606 else
2607 echo "configure: failed program was:" >&5
2608 cat conftest.$ac_ext >&5
2609 rm -rf conftest*
2610 eval "ac_cv_func_gethostbyname=no"
2611 fi
2612 rm -f conftest*
2613 fi
2614
2615 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2616 echo "$ac_t""yes" 1>&6
2617 :
2618 else
2619 echo "$ac_t""no" 1>&6
2620 echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
2621 echo "configure:2622: checking for printf in -lnsl" >&5
2622 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
2623 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2624 echo $ac_n "(cached) $ac_c" 1>&6
2625 else
2626 ac_save_LIBS="$LIBS"
2627 LIBS="-lnsl $LIBS"
2628 cat > conftest.$ac_ext <<EOF
2629 #line 2630 "configure"
2630 #include "confdefs.h"
2631 /* Override any gcc2 internal prototype to avoid an error. */
2632 /* We use char because int might match the return type of a gcc2
2633 builtin and then its argument prototype would still apply. */
2634 char printf();
2635
2636 int main() {
2637 printf()
2638 ; return 0; }
2639 EOF
2640 if { (eval echo configure:2641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2641 rm -rf conftest*
2642 eval "ac_cv_lib_$ac_lib_var=yes"
2643 else
2644 echo "configure: failed program was:" >&5
2645 cat conftest.$ac_ext >&5
2646 rm -rf conftest*
2647 eval "ac_cv_lib_$ac_lib_var=no"
2648 fi
2649 rm -f conftest*
2650 LIBS="$ac_save_LIBS"
2651
2652 fi
2653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2654 echo "$ac_t""yes" 1>&6
2655 X11_EXTRA_LIBS="$X11_EXTRA_LIBS -lnsl"
2656 else
2657 echo "$ac_t""no" 1>&6
2658 fi
2659
2660 fi
2661
2662 LIBS=$asc_oldLibs
2663
2664
2665 #--------------------------------------------------------------------
2666 # The following comes directly from the configure.in file for
2667 # Tcl8.0.
2668 #
2669 # The statements below define a collection of symbols related to
2670 # dynamic loading and shared libraries:
2671 #
2672 # DL_OBJS - Name of the object file that implements dynamic
2673 # loading for ASCEND on this system.
2674 # DL_LIBS - Library file(s) to include in tclsh and other base
2675 # applications in order for the "load" command to work.
2676 # LD_FLAGS - Flags to pass to the compiler when linking object
2677 # files into an executable application binary such
2678 # as tclsh.
2679 # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
2680 # that tell the run-time dynamic linker where to look
2681 # for shared libraries such as libtcl.so. Depends on
2682 # the variable LIB_RUNTIME_DIR in the Makefile.
2683 # MAKE_LIB - Command to execute to build the ASCEND library;
2684 # differs depending on whether or not ASCEND is being
2685 # compiled as a shared library.
2686 # SHLIB_CFLAGS - Flags to pass to cc when compiling the components
2687 # of a shared library (may request position-independent
2688 # code, among other things).
2689 # SHLIB_LD - Base command to use for combining object files
2690 # into a shared library.
2691 # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
2692 # creating shared libraries. This symbol typically
2693 # goes at the end of the "ld" commands that build
2694 # shared libraries. The value of the symbol is
2695 # "${LIBS}" if all of the dependent libraries should
2696 # be specified when creating a shared library. If
2697 # dependent libraries should not be specified (as on
2698 # SunOS 4.x, where they cause the link to fail, or in
2699 # general if ASCEND and Tk aren't themselves shared
2700 # libraries), then this symbol has an empty string
2701 # as its value.
2702 # SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable
2703 # extensions. An empty string means we don't know how
2704 # to use shared libraries on this platform.
2705 # ASC_LIB_FILE - Name of the file that contains the ASCEND library, such
2706 # as libtcl7.8.so or libtcl7.8.a.
2707 # ASC_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
2708 # in the shared library name, using the $VERSION variable
2709 # to put the version in the right place. This is used
2710 # by platforms that need non-standard library names.
2711 # Examples: ${VERSION}.so.1.1 on NetBSD, since it needs
2712 # to have a version after the .so, and ${VERSION}.a
2713 # on AIX, since the ASCEND shared library needs to have
2714 # a .a extension whereas shared objects for loadable
2715 # extensions have a .so extension. Defaults to
2716 # ${VERSION}${SHLIB_SUFFIX}.
2717 #--------------------------------------------------------------------
2718
2719 # Step 1: set the variable "system" to hold the name and version number
2720 # for the system. This can usually be done via the "uname" command, but
2721 # there are a few systems, like Next, where this doesn't work.
2722
2723 # Changed this to use the "$host" variable from AC_CANONICAL_HOST
2724
2725 # Step 2: check for existence of -ldl library. This is needed because
2726 # Linux can use either -ldl or -ldld for dynamic loading.
2727
2728 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2729 echo "configure:2730: checking for dlopen in -ldl" >&5
2730 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2731 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2732 echo $ac_n "(cached) $ac_c" 1>&6
2733 else
2734 ac_save_LIBS="$LIBS"
2735 LIBS="-ldl $LIBS"
2736 cat > conftest.$ac_ext <<EOF
2737 #line 2738 "configure"
2738 #include "confdefs.h"
2739 /* Override any gcc2 internal prototype to avoid an error. */
2740 /* We use char because int might match the return type of a gcc2
2741 builtin and then its argument prototype would still apply. */
2742 char dlopen();
2743
2744 int main() {
2745 dlopen()
2746 ; return 0; }
2747 EOF
2748 if { (eval echo configure:2749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2749 rm -rf conftest*
2750 eval "ac_cv_lib_$ac_lib_var=yes"
2751 else
2752 echo "configure: failed program was:" >&5
2753 cat conftest.$ac_ext >&5
2754 rm -rf conftest*
2755 eval "ac_cv_lib_$ac_lib_var=no"
2756 fi
2757 rm -f conftest*
2758 LIBS="$ac_save_LIBS"
2759
2760 fi
2761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2762 echo "$ac_t""yes" 1>&6
2763 have_dl=yes
2764 else
2765 echo "$ac_t""no" 1>&6
2766 have_dl=no
2767 fi
2768
2769
2770 # Step 3: set configuration options based on system name and version.
2771
2772 ASC_SHARED_LIB_SUFFIX=""
2773 ASC_UNSHARED_LIB_SUFFIX=""
2774 ASC_LIB_VERSIONS_OK=ok
2775 case $host in
2776 *-aix*)
2777 SHLIB_CFLAGS=""
2778 SHLIB_LD="$fullpathsrcdir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512"
2779 SHLIB_LD_LIBS='${LIBS}'
2780 SHLIB_SUFFIX=".so"
2781 DL_OBJS=""
2782 DL_LIBS="-lld"
2783 LD_FLAGS=""
2784 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2785 ASC_SHARED_LIB_SUFFIX='${VERSION}.a'
2786 ;;
2787 *-bsdi*)
2788 SHLIB_CFLAGS=""
2789 SHLIB_LD="shlicc -r"
2790 SHLIB_LD_LIBS='${LIBS}'
2791 SHLIB_SUFFIX=".so"
2792 DL_OBJS=""
2793 DL_LIBS="-ldl"
2794 LD_FLAGS=""
2795 LD_SEARCH_FLAGS=""
2796 ;;
2797 *-dgux*)
2798 SHLIB_CFLAGS="-K PIC"
2799 SHLIB_LD="cc -G"
2800 SHLIB_LD_LIBS=""
2801 SHLIB_SUFFIX=".so"
2802 DL_OBJS=""
2803 DL_LIBS="-ldl"
2804 LD_FLAGS=""
2805 LD_SEARCH_FLAGS=""
2806 ;;
2807 *-hpux8*|*-hpux9*|*-hpux10*)
2808 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2809 echo "configure:2810: checking for shl_load in -ldld" >&5
2810 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
2811 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2812 echo $ac_n "(cached) $ac_c" 1>&6
2813 else
2814 ac_save_LIBS="$LIBS"
2815 LIBS="-ldld $LIBS"
2816 cat > conftest.$ac_ext <<EOF
2817 #line 2818 "configure"
2818 #include "confdefs.h"
2819 /* Override any gcc2 internal prototype to avoid an error. */
2820 /* We use char because int might match the return type of a gcc2
2821 builtin and then its argument prototype would still apply. */
2822 char shl_load();
2823
2824 int main() {
2825 shl_load()
2826 ; return 0; }
2827 EOF
2828 if { (eval echo configure:2829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2829 rm -rf conftest*
2830 eval "ac_cv_lib_$ac_lib_var=yes"
2831 else
2832 echo "configure: failed program was:" >&5
2833 cat conftest.$ac_ext >&5
2834 rm -rf conftest*
2835 eval "ac_cv_lib_$ac_lib_var=no"
2836 fi
2837 rm -f conftest*
2838 LIBS="$ac_save_LIBS"
2839
2840 fi
2841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2842 echo "$ac_t""yes" 1>&6
2843 tcl_ok=yes
2844 else
2845 echo "$ac_t""no" 1>&6
2846 tcl_ok=no
2847 fi
2848
2849 if test "$tcl_ok" = yes; then
2850 SHLIB_CFLAGS="+z"
2851 SHLIB_LD="ld -b"
2852 SHLIB_LD_LIBS=""
2853 SHLIB_SUFFIX=".sl"
2854 DL_OBJS=""
2855 DL_LIBS="-ldld"
2856 LD_FLAGS="-Wl,-E"
2857 LD_SEARCH_FLAGS='-Wl,+b,${LIB_RUNTIME_DIR}:.'
2858 fi
2859 ;;
2860 *-irix4*)
2861 SHLIB_CFLAGS="-G 0"
2862 SHLIB_SUFFIX=".a"
2863 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
2864 SHLIB_LD_LIBS='${LIBS}'
2865 DL_OBJS=""
2866 DL_LIBS=""
2867 LD_FLAGS="-Wl,-D,08000000"
2868 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2869 ASC_SHARED_LIB_SUFFIX='${VERSION}.a'
2870 ;;
2871 *-irix5*|*-irix6.*)
2872 SHLIB_CFLAGS=""
2873 SHLIB_LD="ld -shared -rdata_shared"
2874 SHLIB_LD_LIBS=""
2875 SHLIB_SUFFIX=".so"
2876 DL_OBJS=""
2877 DL_LIBS=""
2878 LD_FLAGS=""
2879 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2880 ;;
2881 *-linux*)
2882 SHLIB_CFLAGS="-fPIC"
2883 SHLIB_LD_LIBS=""
2884 SHLIB_SUFFIX=".so"
2885 if test "$have_dl" = yes; then
2886 SHLIB_LD="${CC} -shared"
2887 DL_OBJS=""
2888 DL_LIBS="-ldl"
2889 LD_FLAGS="-rdynamic"
2890 LD_SEARCH_FLAGS=""
2891 else
2892 ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
2893 echo $ac_n "checking for dld.h""... $ac_c" 1>&6
2894 echo "configure:2895: checking for dld.h" >&5
2895 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2896 echo $ac_n "(cached) $ac_c" 1>&6
2897 else
2898 cat > conftest.$ac_ext <<EOF
2899 #line 2900 "configure"
2900 #include "confdefs.h"
2901 #include <dld.h>
2902 EOF
2903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2904 { (eval echo configure:2905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2906 if test -z "$ac_err"; then
2907 rm -rf conftest*
2908 eval "ac_cv_header_$ac_safe=yes"
2909 else
2910 echo "$ac_err" >&5
2911 echo "configure: failed program was:" >&5
2912 cat conftest.$ac_ext >&5
2913 rm -rf conftest*
2914 eval "ac_cv_header_$ac_safe=no"
2915 fi
2916 rm -f conftest*
2917 fi
2918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2919 echo "$ac_t""yes" 1>&6
2920
2921 SHLIB_LD="ld -shared"
2922 DL_OBJS=""
2923 DL_LIBS="-ldld"
2924 LD_FLAGS=""
2925 LD_SEARCH_FLAGS=""
2926 else
2927 echo "$ac_t""no" 1>&6
2928 fi
2929
2930 fi
2931 ;;
2932 MP-RAS-02*)
2933 SHLIB_CFLAGS="-K PIC"
2934 SHLIB_LD="cc -G"
2935 SHLIB_LD_LIBS=""
2936 SHLIB_SUFFIX=".so"
2937 DL_OBJS=""
2938 DL_LIBS="-ldl"
2939 LD_FLAGS=""
2940 LD_SEARCH_FLAGS=""
2941 ;;
2942 MP-RAS-*)
2943 SHLIB_CFLAGS="-K PIC"
2944 SHLIB_LD="cc -G"
2945 SHLIB_LD_LIBS=""
2946 SHLIB_SUFFIX=".so"
2947 DL_OBJS=""
2948 DL_LIBS="-ldl"
2949 LD_FLAGS="-Wl,-Bexport"
2950 LD_SEARCH_FLAGS=""
2951 ;;
2952 *-netbsd*|*-freebsd*|*-openbsd*)
2953 # Not available on all versions: check for include file.
2954 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
2955 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
2956 echo "configure:2957: checking for dlfcn.h" >&5
2957 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2958 echo $ac_n "(cached) $ac_c" 1>&6
2959 else
2960 cat > conftest.$ac_ext <<EOF
2961 #line 2962 "configure"
2962 #include "confdefs.h"
2963 #include <dlfcn.h>
2964 EOF
2965 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2966 { (eval echo configure:2967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2967 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2968 if test -z "$ac_err"; then
2969 rm -rf conftest*
2970 eval "ac_cv_header_$ac_safe=yes"
2971 else
2972 echo "$ac_err" >&5
2973 echo "configure: failed program was:" >&5
2974 cat conftest.$ac_ext >&5
2975 rm -rf conftest*
2976 eval "ac_cv_header_$ac_safe=no"
2977 fi
2978 rm -f conftest*
2979 fi
2980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2981 echo "$ac_t""yes" 1>&6
2982
2983 SHLIB_CFLAGS="-fpic"
2984 SHLIB_LD="ld -Bshareable -x"
2985 SHLIB_LD_LIBS=""
2986 SHLIB_SUFFIX=".so"
2987 DL_OBJS=""
2988 DL_LIBS=""
2989 LD_FLAGS=""
2990 LD_SEARCH_FLAGS=""
2991 ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0'
2992
2993 else
2994 echo "$ac_t""no" 1>&6
2995
2996 SHLIB_CFLAGS=""
2997 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
2998 SHLIB_LD_LIBS='${LIBS}'
2999 SHLIB_SUFFIX=".a"
3000 DL_OBJS=""
3001 DL_LIBS=""
3002 LD_FLAGS=""
3003 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
3004 ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
3005
3006 fi
3007
3008
3009 # FreeBSD doesn't handle version numbers with dots.
3010
3011 ASC_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
3012 ASC_LIB_VERSIONS_OK=nodots
3013 ;;
3014 *-nextstep*)
3015 SHLIB_CFLAGS=""
3016 SHLIB_LD="cc -nostdlib -r"
3017 SHLIB_LD_LIBS=""
3018 SHLIB_SUFFIX=".so"
3019 DL_OBJS=""
3020 DL_LIBS=""
3021 LD_FLAGS=""
3022 LD_SEARCH_FLAGS=""
3023 ;;
3024 alpha-dec-osf*)
3025 # Digital OSF/1
3026 SHLIB_CFLAGS=""
3027 SHLIB_LD='ld -shared -expect_unresolved "*"'
3028 SHLIB_LD_LIBS=""
3029 SHLIB_SUFFIX=".so"
3030 DL_OBJS=""
3031 DL_LIBS=""
3032 LD_FLAGS=""
3033 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
3034 ;;
3035 *-riscos*)
3036 SHLIB_CFLAGS="-G 0"
3037 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
3038 SHLIB_LD_LIBS='${LIBS}'
3039 SHLIB_SUFFIX=".a"
3040 DL_OBJS=""
3041 DL_LIBS=""
3042 LD_FLAGS="-Wl,-D,08000000"
3043 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
3044 ;;
3045 SCO_SV-3.2*)
3046 # Note, dlopen is available only on SCO 3.2.5 and greater. However,
3047 # this test works, since "uname -s" was non-standard in 3.2.4 and
3048 # below.
3049 SHLIB_CFLAGS="-Kpic -belf"
3050 SHLIB_LD="ld -G"
3051 SHLIB_LD_LIBS=""
3052 SHLIB_SUFFIX=".so"
3053 DL_OBJS=""
3054 DL_LIBS=""
3055 LD_FLAGS="-belf -Wl,-Bexport"
3056 LD_SEARCH_FLAGS=""
3057 ;;
3058 *-sni-sysv*)
3059 SHLIB_CFLAGS="-K PIC"
3060 SHLIB_LD="cc -G"
3061 SHLIB_LD_LIBS=""
3062 SHLIB_SUFFIX=".so"
3063 DL_OBJS=""
3064 DL_LIBS="-ldl"
3065 LD_FLAGS=""
3066 LD_SEARCH_FLAGS=""
3067 ;;
3068 *-sunos4*)
3069 SHLIB_CFLAGS="-PIC"
3070 SHLIB_LD="ld"
3071 SHLIB_LD_LIBS=""
3072 SHLIB_SUFFIX=".so"
3073 DL_OBJS=""
3074 DL_LIBS="-ldl"
3075 LD_FLAGS=""
3076 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
3077
3078 # SunOS can't handle version numbers with dots in them in library
3079 # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
3080 # requires an extra version number at the end of .so file names.
3081 # So, the library has to have a name like libtcl75.so.1.0
3082
3083 ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0'
3084 ASC_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
3085 ASC_LIB_VERSIONS_OK=nodots
3086 ;;
3087 *-solaris*)
3088 SHLIB_CFLAGS="-KPIC"
3089 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
3090
3091 # Note: need the LIBS below, otherwise Tk won't find ASCEND's
3092 # symbols when dynamically loaded into tclsh.
3093
3094 SHLIB_LD_LIBS='${LIBS}'
3095 SHLIB_SUFFIX=".so"
3096 DL_OBJS=""
3097 DL_LIBS="-ldl"
3098 LD_FLAGS=""
3099 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
3100 ;;
3101 *-ultrix4*)
3102 SHLIB_CFLAGS="-G 0"
3103 SHLIB_SUFFIX=".a"
3104 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
3105 SHLIB_LD_LIBS='${LIBS}'
3106 DL_OBJS=""
3107 DL_LIBS=""
3108 LD_FLAGS="-Wl,-D,08000000"
3109 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
3110 ;;
3111 mips-dde-sysv*)
3112 SHLIB_CFLAGS="-KPIC"
3113 SHLIB_LD="cc -G"
3114 SHLIB_LD_LIBS=""
3115 SHLIB_SUFFIX=".so"
3116 DL_OBJS=""
3117 DL_LIBS="-ldl"
3118 # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
3119 # that don't grok the -Bexport option. Test that it does.
3120 hold_ldflags=$LDFLAGS
3121 echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
3122 echo "configure:3123: checking for ld accepts -Bexport flag" >&5
3123 LDFLAGS="${LDFLAGS} -Wl,-Bexport"
3124 cat > conftest.$ac_ext <<EOF
3125 #line 3126 "configure"
3126 #include "confdefs.h"
3127
3128 int main() {
3129 int i;
3130 ; return 0; }
3131 EOF
3132 if { (eval echo configure:3133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3133 rm -rf conftest*
3134 found=yes
3135 else
3136 echo "configure: failed program was:" >&5
3137 cat conftest.$ac_ext >&5
3138 rm -rf conftest*
3139 found=no
3140 fi
3141 rm -f conftest*
3142 LDFLAGS=$hold_ldflags
3143 echo "$ac_t""$found" 1>&6
3144 if test "$found" = yes; then
3145 LD_FLAGS="-Wl,-Bexport"
3146 else
3147 LD_FLAGS=""
3148 fi
3149 LD_SEARCH_FLAGS=""
3150 ;;
3151 esac
3152
3153 #--------------------------------------------------------------------
3154 # TCL / TK / TK-TABLE
3155 #
3156 # The user can specify the location of the Tcl and/or Tk
3157 # libraries using the --with-tcl and --with-tk configure
3158 # options. Print a warning if the user tries to say
3159 # --without-tcl since ASCEND requires Tcl/Tk.
3160 #
3161 # If the user does not specify the location, we need to search
3162 # for either shared or static versions of the Tcl and Tk
3163 # libraries, and they must be for version 8.x of Tcl/Tk.
3164 #
3165 # Check for the static Tcl library in a list of reasonable
3166 # locations. If we find it, verify that it is from Tcl 8.0 by
3167 # looking for the symbol `TclCompileCatchCmd'. Remember, we
3168 # need the math library and the dynamic loader library (-ldl or
3169 # -ldld) to avoid undefined symbols when we test the version of
3170 # the Tcl library.
3171 #
3172 # If we can't find a static Tcl8.0 library, try to find a
3173 # dynamic one by calling AC_CHECK_LIB and looking for the
3174 # function `TclCompileCatchCmd'. If we fail, print an error
3175 # message and exit configure.
3176 #
3177 # Search for a version of tcl.h that contains `8.' in the
3178 # TCL_MAJOR_VERSION macro; we look in a list of reasonable
3179 # locations, then call AC_EGREP_HEADER to look for us.
3180 #
3181 # Repeat the process for the Tk library; the symbol we want is
3182 # `Tk_NameOfFont'; remember we need the X library---and all the
3183 # libraries it needs---as well as the Tcl library to avoid
3184 # undefined symbols when we test the version of the Tk library.
3185 #
3186 # The user can use --with-tktable to specify a location for a
3187 # static version of the Tk-Table library. If a value is
3188 # specified, assume it is good and define the cpp macro
3189 # STATIC_TABLE.
3190 #
3191 # If a value is not specified, look for libTktable.a; if we
3192 # find it, assume it works and define the cpp macro
3193 # STATIC_TABLE. If we don't find it, assume ASCEND will be
3194 # able to dynamically load it at run time and tell the user
3195 # about our assumption.
3196 #--------------------------------------------------------------------
3197 #
3198 # a list of directories to search for the Tcl/Tk libraries
3199 asc_tcl_library_dirs="
3200 /usr/local/lib/ascend/lib
3201 $prefix/lib:$exec_prefix/lib
3202 $ascpwd/tcl8.0
3203 $ascpwd/tcl8.0/unix
3204 $ascpwd/tk8.0
3205 $ascpwd/tk8.0/unix
3206 $ascpwd/ascend4/lib
3207 /lib
3208 /usr/lib
3209 /usr/local/lib
3210 /usr/contributed/lib
3211 /afs/cs/project/ascend/depot/@sys/lib
3212 "
3213 # a list of directories to search for the Tcl/Tk include files
3214 asc_tcl_include_dirs="
3215 /usr/local/lib/ascend/include
3216 $prefix/include
3217 $fullpathsrcdir/tcl8.0
3218 $fullpathsrcdir/tcl8.0/generic
3219 $fullpathsrcdir/tk8.0
3220 $fullpathsrcdir/tk8.0/generic
3221 $fullpathsrcdir/ascend4/include
3222 $ascpwd/ascend4/include
3223 /usr/include
3224 /usr/local/include
3225 /usr/contributed/include
3226 /afs/cs/project/ascend/depot/common/include
3227 "
3228 # a list of directories to search for the TkTable library
3229 asc_tk_table_dirs="
3230 /usr/local/lib/ascend/lib/Tktable
3231 $prefix/lib/Tktable
3232 $exec_prefix/lib/Tktable
3233 $ascpwd/tkTable1.80
3234 $ascpwd/ascend4/lib
3235 $ascpwd/ascend4/lib/Tktable
3236 /afs/cs/project/ascend/depot/@sys/lib/Tktable
3237 "
3238 # see if the user gave us the location of the Tcl8.0
3239 # library and/or header file
3240 #
3241 # Check whether --with-tcl or --without-tcl was given.
3242 if test "${with_tcl+set}" = set; then
3243 withval="$with_tcl"
3244 :
3245 else
3246 with_tcl=yes
3247 fi
3248
3249
3250 case "$with_tcl" in
3251 no)
3252 # User specified --without-tcl; this makes no sense,
3253 # print a warning and search for it ourselves
3254 echo "configure: warning: Bad option '--without-tcl'
3255 ASCEND must be compiled with Tcl8.0." 1>&2
3256 with_tcllib=_searching
3257 with_tclhdr=_searching
3258 ;;
3259 yes|,|"")
3260 # User didn't give the option or didn't give useful
3261 # information, search for it ourselves
3262 with_tcllib=_searching
3263 with_tclhdr=_searching
3264 ;;
3265 ,*)
3266 # Only the header was specified.
3267 with_tcllib=_searching
3268 TCL_HDR=`echo $with_tcl | sed 's/^,//'`
3269 ;;
3270 *,?*)
3271 # Both the library and the header were specified
3272 TCL_LIB=`echo $with_tcl | sed 's/,.*$//'`
3273 TCL_HDR=`echo $with_tcl | sed 's/^.*,//'`
3274 ;;
3275 *)
3276 # Only the library was specified
3277 TCL_LIB=`echo $with_tcl | sed 's/,$//'`
3278 with_tclhdr=_searching
3279 ;;
3280 esac
3281
3282 # try to find a static version of the Tcl8.0 library
3283 #
3284 if test "X$with_tcllib" = X_searching ; then
3285 for ac_prog in libtcl8.0.a libtcl80.a libtcl8.3.a
3286 do
3287 # Extract the first word of "$ac_prog", so it can be a program name with args.
3288 set dummy $ac_prog; ac_word=$2
3289 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3290 echo "configure:3291: checking for $ac_word" >&5
3291 if eval "test \"`echo '$''{'ac_cv_path_TCL_LIB'+set}'`\" = set"; then
3292 echo $ac_n "(cached) $ac_c" 1>&6
3293 else
3294 case "$TCL_LIB" in
3295 /*)
3296 ac_cv_path_TCL_LIB="$TCL_LIB" # Let the user override the test with a path.
3297 ;;
3298 ?:/*)
3299 ac_cv_path_TCL_LIB="$TCL_LIB" # Let the user override the test with a dos path.
3300 ;;
3301 *)
3302 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3303 ac_dummy="$asc_tcl_library_dirs"
3304 for ac_dir in $ac_dummy; do
3305 test -z "$ac_dir" && ac_dir=.
3306 if test -f $ac_dir/$ac_word; then
3307 ac_cv_path_TCL_LIB="$ac_dir/$ac_word"
3308 break
3309 fi
3310 done
3311 IFS="$ac_save_ifs"
3312 ;;
3313 esac
3314 fi
3315 TCL_LIB="$ac_cv_path_TCL_LIB"
3316 if test -n "$TCL_LIB"; then
3317 echo "$ac_t""$TCL_LIB" 1>&6
3318 else
3319 echo "$ac_t""no" 1>&6
3320 fi
3321
3322 test -n "$TCL_LIB" && break
3323 done
3324
3325 if test -z "$TCL_LIB" ; then
3326 TCL_LIB=_searching
3327 fi
3328 else
3329 echo "$ac_t""checking for tcl library... $TCL_LIB" 1>&6
3330 fi
3331
3332 # verify the TCL_LIB
3333 if test ! "X$TCL_LIB" = X_searching ; then
3334 echo $ac_n "checking whether $TCL_LIB is for Tcl8.3""... $ac_c" 1>&6
3335 echo "configure:3336: checking whether $TCL_LIB is for Tcl8.3" >&5
3336 asc_libs_orig=$LIBS
3337 LIBS="$TCL_LIB $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3338 cat > conftest.$ac_ext <<EOF
3339 #line 3340 "configure"
3340 #include "confdefs.h"
3341
3342 int main() {
3343 TclCompileCatchCmd()
3344 ; return 0; }
3345 EOF
3346 if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3347 :
3348 else
3349 echo "configure: failed program was:" >&5
3350 cat conftest.$ac_ext >&5
3351 rm -rf conftest*
3352 TCL_LIB=_searching
3353 fi
3354 rm -f conftest*;
3355 if test "X$TCL_LIB" = X_searching ; then
3356 echo "$ac_t""no" 1>&6
3357 else
3358 echo "$ac_t""yes" 1>&6
3359 fi
3360 LIBS=$asc_libs_orig
3361 fi
3362
3363 # see if the default LPATH can find the Tcl8.0 library
3364 #
3365 if test "X$TCL_LIB" = X_searching ; then
3366 echo $ac_n "checking for TclCompileCatchCmd in -ltcl83""... $ac_c" 1>&6
3367 echo "configure:3368: checking for TclCompileCatchCmd in -ltcl83" >&5
3368 ac_lib_var=`echo tcl83'_'TclCompileCatchCmd | sed 'y%./+-%__p_%'`
3369 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3370 echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372 ac_save_LIBS="$LIBS"
3373 LIBS="-ltcl83 $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3374 cat > conftest.$ac_ext <<EOF
3375 #line 3376 "configure"
3376 #include "confdefs.h"
3377 /* Override any gcc2 internal prototype to avoid an error. */
3378 /* We use char because int might match the return type of a gcc2
3379 builtin and then its argument prototype would still apply. */
3380 char TclCompileCatchCmd();
3381
3382 int main() {
3383 TclCompileCatchCmd()
3384 ; return 0; }
3385 EOF
3386 if { (eval echo configure:3387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3387 rm -rf conftest*
3388 eval "ac_cv_lib_$ac_lib_var=yes"
3389 else
3390 echo "configure: failed program was:" >&5
3391 cat conftest.$ac_ext >&5
3392 rm -rf conftest*
3393 eval "ac_cv_lib_$ac_lib_var=no"
3394 fi
3395 rm -f conftest*
3396 LIBS="$ac_save_LIBS"
3397
3398 fi
3399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3400 echo "$ac_t""yes" 1>&6
3401 TCL_LIB="-ltcl83"
3402 else
3403 echo "$ac_t""no" 1>&6
3404 fi
3405
3406 fi
3407 if test "X$TCL_LIB" = X_searching ; then
3408 echo $ac_n "checking for TclCompileCatchCmd in -ltcl8.3""... $ac_c" 1>&6
3409 echo "configure:3410: checking for TclCompileCatchCmd in -ltcl8.3" >&5
3410 ac_lib_var=`echo tcl8.3'_'TclCompileCatchCmd | sed 'y%./+-%__p_%'`
3411 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3412 echo $ac_n "(cached) $ac_c" 1>&6
3413 else
3414 ac_save_LIBS="$LIBS"
3415 LIBS="-ltcl8.3 $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3416 cat > conftest.$ac_ext <<EOF
3417 #line 3418 "configure"
3418 #include "confdefs.h"
3419 /* Override any gcc2 internal prototype to avoid an error. */
3420 /* We use char because int might match the return type of a gcc2
3421 builtin and then its argument prototype would still apply. */
3422 char TclCompileCatchCmd();
3423
3424 int main() {
3425 TclCompileCatchCmd()
3426 ; return 0; }
3427 EOF
3428 if { (eval echo configure:3429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3429 rm -rf conftest*
3430 eval "ac_cv_lib_$ac_lib_var=yes"
3431 else
3432 echo "configure: failed program was:" >&5
3433 cat conftest.$ac_ext >&5
3434 rm -rf conftest*
3435 eval "ac_cv_lib_$ac_lib_var=no"
3436 fi
3437 rm -f conftest*
3438 LIBS="$ac_save_LIBS"
3439
3440 fi
3441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3442 echo "$ac_t""yes" 1>&6
3443 TCL_LIB="-ltcl8.3"
3444 else
3445 echo "$ac_t""no" 1>&6
3446 fi
3447
3448 fi
3449 if test "X$TCL_LIB" = X_searching ; then
3450 echo $ac_n "checking for TclCompileCatchCmd in -ltcl8.0""... $ac_c" 1>&6
3451 echo "configure:3452: checking for TclCompileCatchCmd in -ltcl8.0" >&5
3452 ac_lib_var=`echo tcl8.0'_'TclCompileCatchCmd | sed 'y%./+-%__p_%'`
3453 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3454 echo $ac_n "(cached) $ac_c" 1>&6
3455 else
3456 ac_save_LIBS="$LIBS"
3457 LIBS="-ltcl8.0 $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3458 cat > conftest.$ac_ext <<EOF
3459 #line 3460 "configure"
3460 #include "confdefs.h"
3461 /* Override any gcc2 internal prototype to avoid an error. */
3462 /* We use char because int might match the return type of a gcc2
3463 builtin and then its argument prototype would still apply. */
3464 char TclCompileCatchCmd();
3465
3466 int main() {
3467 TclCompileCatchCmd()
3468 ; return 0; }
3469 EOF
3470 if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3471 rm -rf conftest*
3472 eval "ac_cv_lib_$ac_lib_var=yes"
3473 else
3474 echo "configure: failed program was:" >&5
3475 cat conftest.$ac_ext >&5
3476 rm -rf conftest*
3477 eval "ac_cv_lib_$ac_lib_var=no"
3478 fi
3479 rm -f conftest*
3480 LIBS="$ac_save_LIBS"
3481
3482 fi
3483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3484 echo "$ac_t""yes" 1>&6
3485 TCL_LIB="-ltcl8.0"
3486 else
3487 echo "$ac_t""no" 1>&6
3488 fi
3489
3490 fi
3491 if test "X$TCL_LIB" = X_searching ; then
3492 echo $ac_n "checking for TclCompileCatchCmd in -ltcl80""... $ac_c" 1>&6
3493 echo "configure:3494: checking for TclCompileCatchCmd in -ltcl80" >&5
3494 ac_lib_var=`echo tcl80'_'TclCompileCatchCmd | sed 'y%./+-%__p_%'`
3495 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3496 echo $ac_n "(cached) $ac_c" 1>&6
3497 else
3498 ac_save_LIBS="$LIBS"
3499 LIBS="-ltcl80 $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3500 cat > conftest.$ac_ext <<EOF
3501 #line 3502 "configure"
3502 #include "confdefs.h"
3503 /* Override any gcc2 internal prototype to avoid an error. */
3504 /* We use char because int might match the return type of a gcc2
3505 builtin and then its argument prototype would still apply. */
3506 char TclCompileCatchCmd();
3507
3508 int main() {
3509 TclCompileCatchCmd()
3510 ; return 0; }
3511 EOF
3512 if { (eval echo configure:3513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3513 rm -rf conftest*
3514 eval "ac_cv_lib_$ac_lib_var=yes"
3515 else
3516 echo "configure: failed program was:" >&5
3517 cat conftest.$ac_ext >&5
3518 rm -rf conftest*
3519 eval "ac_cv_lib_$ac_lib_var=no"
3520 fi
3521 rm -f conftest*
3522 LIBS="$ac_save_LIBS"
3523
3524 fi
3525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3526 echo "$ac_t""yes" 1>&6
3527 TCL_LIB="-ltcl80"
3528 else
3529 echo "$ac_t""no" 1>&6
3530 fi
3531
3532 fi
3533 if test "X$TCL_LIB" = X_searching ; then
3534 echo $ac_n "checking for TclCompileCatchCmd in -ltcl""... $ac_c" 1>&6
3535 echo "configure:3536: checking for TclCompileCatchCmd in -ltcl" >&5
3536 ac_lib_var=`echo tcl'_'TclCompileCatchCmd | sed 'y%./+-%__p_%'`
3537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3538 echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540 ac_save_LIBS="$LIBS"
3541 LIBS="-ltcl $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3542 cat > conftest.$ac_ext <<EOF
3543 #line 3544 "configure"
3544 #include "confdefs.h"
3545 /* Override any gcc2 internal prototype to avoid an error. */
3546 /* We use char because int might match the return type of a gcc2
3547 builtin and then its argument prototype would still apply. */
3548 char TclCompileCatchCmd();
3549
3550 int main() {
3551 TclCompileCatchCmd()
3552 ; return 0; }
3553 EOF
3554 if { (eval echo configure:3555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3555 rm -rf conftest*
3556 eval "ac_cv_lib_$ac_lib_var=yes"
3557 else
3558 echo "configure: failed program was:" >&5
3559 cat conftest.$ac_ext >&5
3560 rm -rf conftest*
3561 eval "ac_cv_lib_$ac_lib_var=no"
3562 fi
3563 rm -f conftest*
3564 LIBS="$ac_save_LIBS"
3565
3566 fi
3567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3568 echo "$ac_t""yes" 1>&6
3569 TCL_LIB="-ltcl"
3570 else
3571 echo "$ac_t""no" 1>&6
3572 fi
3573
3574 fi
3575
3576 # give up searching for the Tcl8.0 library
3577 #
3578 if test "X$TCL_LIB" = X_searching ; then
3579 { echo "configure: error: Cannot find a compatiable Tcl library.
3580 You must build and install Tcl version 8.3 before you
3581 can build ASCEND. If you have installed the correct version
3582 of Tcl, run configure again with the argument:
3583 --with-tcl=LIBRARY,HEADER
3584 where LIBRARY and HEADER are the full paths to the Tcl8.3
3585 library file and header file, respectively." 1>&2; exit 1; }
3586 fi
3587
3588 # see if the user gave us the location of the Tcl8.0 header file
3589 #
3590 if test ! "X$with_tclhdr" = X_searching ; then
3591 if test ! -f "$TCL_HDR" ; then
3592 echo "configure: warning: user specified Tcl header file, $TCL_HDR, does not exist" 1>&2
3593 with_tclhdr=_searching
3594 TCL_HDR=''
3595 fi
3596 fi
3597 if test "X$with_tclhdr" = X_searching ; then
3598 # Extract the first word of "tcl.h", so it can be a program name with args.
3599 set dummy tcl.h; ac_word=$2
3600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3601 echo "configure:3602: checking for $ac_word" >&5
3602 if eval "test \"`echo '$''{'ac_cv_path_TCL_HDR'+set}'`\" = set"; then
3603 echo $ac_n "(cached) $ac_c" 1>&6
3604 else
3605 case "$TCL_HDR" in
3606 /*)
3607 ac_cv_path_TCL_HDR="$TCL_HDR" # Let the user override the test with a path.
3608 ;;
3609 ?:/*)
3610 ac_cv_path_TCL_HDR="$TCL_HDR" # Let the user override the test with a dos path.
3611 ;;
3612 *)
3613 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3614 ac_dummy="$asc_tcl_include_dirs"
3615 for ac_dir in $ac_dummy; do
3616 test -z "$ac_dir" && ac_dir=.
3617 if test -f $ac_dir/$ac_word; then
3618 ac_cv_path_TCL_HDR="$ac_dir/$ac_word"
3619 break
3620 fi
3621 done
3622 IFS="$ac_save_ifs"
3623 ;;
3624 esac
3625 fi
3626 TCL_HDR="$ac_cv_path_TCL_HDR"
3627 if test -n "$TCL_HDR"; then
3628 echo "$ac_t""$TCL_HDR" 1>&6
3629 else
3630 echo "$ac_t""no" 1>&6
3631 fi
3632
3633 if test -z "$TCL_HDR" ; then
3634 cat > conftest.$ac_ext <<EOF
3635 #line 3636 "configure"
3636 #include "confdefs.h"
3637 #include <tcl.h>
3638 EOF
3639 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3640 egrep "TCL_MAJOR_VERSION.*8" >/dev/null 2>&1; then
3641 rm -rf conftest*
3642 TCL_HDR='tcl.h'
3643 fi
3644 rm -f conftest*
3645
3646 fi
3647 else
3648 echo "$ac_t""checking for tcl header... $TCL_HDR" 1>&6
3649 fi
3650 if test -f "$TCL_HDR" ; then
3651 echo $ac_n "checking whether $TCL_HDR is for version 8""... $ac_c" 1>&6
3652 echo "configure:3653: checking whether $TCL_HDR is for version 8" >&5
3653 echo 'grep TCL_MAJOR_VERSION "$TCL_HDR" 2>&5' 1>&5
3654 grep_tcl_h=`grep TCL_MAJOR_VERSION "$TCL_HDR" 2>&5`
3655 echo $grep_tcl_h 1>&5
3656 case "$grep_tcl_h" in
3657 *8)
3658 echo "$ac_t""yes" 1>&6
3659 ;;
3660 *)
3661 echo "$ac_t""no" 1>&6
3662 TCL_HDR=
3663 ;;
3664 esac
3665 fi
3666 if test -z "$TCL_HDR" ; then
3667 { echo "configure: error: Cannot find a compatiable Tcl header file.
3668 You must build and install Tcl version 8.3 (but not yet 8.4) before you
3669 can build ASCEND. If you have installed the correct version
3670 of Tcl, run configure again with the argument:
3671 --with-tcl=LIBRARY,HEADER
3672 where LIBRARY and HEADER are the full paths to the Tcl8.3
3673 library file and header file, respectively." 1>&2; exit 1; }
3674 fi
3675 TCL_HDR=`echo $TCL_HDR | sed 's,tcl\.h$,,'`
3676 if test -n "$TCL_HDR" ; then
3677 TCL_HDR="-I$TCL_HDR"
3678 fi
3679
3680
3681 ###### REPEAT FOR TK
3682 #
3683 # see if the user gave us the location of the Tk8.3
3684 # library and/or header file
3685 #
3686 # Check whether --with-tk or --without-tk was given.
3687 if test "${with_tk+set}" = set; then
3688 withval="$with_tk"
3689 :
3690 else
3691 with_tk=yes
3692 fi
3693
3694
3695 case "$with_tk" in
3696 no)
3697 # User specified --without-tk; this makes no sense,
3698 # print a warning and search for it ourselves
3699 echo "configure: warning: Bad option '--without-tk'
3700 ASCEND must be compiled with Tk8.0." 1>&2
3701 with_tklib=_searching
3702 with_tkhdr=_searching
3703 ;;
3704 yes|,|"")
3705 # User didn't give the option or didn't give useful
3706 # information, search for it ourselves
3707 with_tklib=_searching
3708 with_tkhdr=_searching
3709 ;;
3710 ,*)
3711 # Only the header was specified.
3712 with_tklib=_searching
3713 TK_HDR=`echo $with_tk | sed 's/^,//'`
3714 ;;
3715 *,?*)
3716 # Both the library and the header were specified
3717 TK_LIB=`echo $with_tk | sed 's/,.*$//'`
3718 TK_HDR=`echo $with_tk | sed 's/^.*,//'`
3719 ;;
3720 *)
3721 # Only the library was specified
3722 TK_LIB=`echo $with_tk | sed 's/,$//'`
3723 with_tkhdr=_searching
3724 ;;
3725 esac
3726
3727 # try to find a static version of the Tk8.0 library
3728 #
3729 if test "X$with_tklib" = X_searching ; then
3730 for ac_prog in libtk8.0.a libtk80.a libtk.a libtk8.3.a
3731 do
3732 # Extract the first word of "$ac_prog", so it can be a program name with args.
3733 set dummy $ac_prog; ac_word=$2
3734 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3735 echo "configure:3736: checking for $ac_word" >&5
3736 if eval "test \"`echo '$''{'ac_cv_path_TK_LIB'+set}'`\" = set"; then
3737 echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739 case "$TK_LIB" in
3740 /*)
3741 ac_cv_path_TK_LIB="$TK_LIB" # Let the user override the test with a path.
3742 ;;
3743 ?:/*)
3744 ac_cv_path_TK_LIB="$TK_LIB" # Let the user override the test with a dos path.
3745 ;;
3746 *)
3747 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3748 ac_dummy="$asc_tcl_library_dirs"
3749 for ac_dir in $ac_dummy; do
3750 test -z "$ac_dir" && ac_dir=.
3751 if test -f $ac_dir/$ac_word; then
3752 ac_cv_path_TK_LIB="$ac_dir/$ac_word"
3753 break
3754 fi
3755 done
3756 IFS="$ac_save_ifs"
3757 ;;
3758 esac
3759 fi
3760 TK_LIB="$ac_cv_path_TK_LIB"
3761 if test -n "$TK_LIB"; then
3762 echo "$ac_t""$TK_LIB" 1>&6
3763 else
3764 echo "$ac_t""no" 1>&6
3765 fi
3766
3767 test -n "$TK_LIB" && break
3768 done
3769
3770 if test -z "TK_LIB" ; then
3771 TK_LIB=_searching
3772 fi
3773 else
3774 echo "$ac_t""checking for tk library... $TK_LIB" 1>&6
3775 fi
3776
3777 # verify the TK_LIB
3778 #
3779 if test ! "X$TK_LIB" = X_searching ; then
3780 echo $ac_n "checking whether $TK_LIB is for Tk8.0""... $ac_c" 1>&6
3781 echo "configure:3782: checking whether $TK_LIB is for Tk8.0" >&5
3782 asc_libs_orig=$LIBS
3783 LIBS="$TK_LIB $TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3784 cat > conftest.$ac_ext <<EOF
3785 #line 3786 "configure"
3786 #include "confdefs.h"
3787
3788 int main() {
3789 Tk_NameOfFont()
3790 ; return 0; }
3791 EOF
3792 if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3793 :
3794 else
3795 echo "configure: failed program was:" >&5
3796 cat conftest.$ac_ext >&5
3797 rm -rf conftest*
3798 TK_LIB=_searching
3799 fi
3800 rm -f conftest*;
3801 if test "X$TK_LIB" = X_searching ; then
3802 echo "$ac_t""no" 1>&6
3803 else
3804 echo "$ac_t""yes" 1>&6
3805 fi
3806 LIBS=$asc_libs_orig
3807 fi
3808
3809 # see if the default LPATH can find the Tk8.0 library
3810 #
3811 if test "X$TK_LIB" = X_searching ; then
3812 echo "$ac_t""checking for a dynamically loaded Tk8.0 library" 1>&6
3813 echo $ac_n "checking for Tk_NameOfFont in -ltk8.0""... $ac_c" 1>&6
3814 echo "configure:3815: checking for Tk_NameOfFont in -ltk8.0" >&5
3815 ac_lib_var=`echo tk8.0'_'Tk_NameOfFont | sed 'y%./+-%__p_%'`
3816 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3817 echo $ac_n "(cached) $ac_c" 1>&6
3818 else
3819 ac_save_LIBS="$LIBS"
3820 LIBS="-ltk8.0 $TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3821 cat > conftest.$ac_ext <<EOF
3822 #line 3823 "configure"
3823 #include "confdefs.h"
3824 /* Override any gcc2 internal prototype to avoid an error. */
3825 /* We use char because int might match the return type of a gcc2
3826 builtin and then its argument prototype would still apply. */
3827 char Tk_NameOfFont();
3828
3829 int main() {
3830 Tk_NameOfFont()
3831 ; return 0; }
3832 EOF
3833 if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3834 rm -rf conftest*
3835 eval "ac_cv_lib_$ac_lib_var=yes"
3836 else
3837 echo "configure: failed program was:" >&5
3838 cat conftest.$ac_ext >&5
3839 rm -rf conftest*
3840 eval "ac_cv_lib_$ac_lib_var=no"
3841 fi
3842 rm -f conftest*
3843 LIBS="$ac_save_LIBS"
3844
3845 fi
3846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3847 echo "$ac_t""yes" 1>&6
3848 TK_LIB="-ltk8.0"
3849 else
3850 echo "$ac_t""no" 1>&6
3851 fi
3852
3853 fi
3854 if test "X$TK_LIB" = X_searching ; then
3855 echo $ac_n "checking for Tk_NameOfFont in -ltk80""... $ac_c" 1>&6
3856 echo "configure:3857: checking for Tk_NameOfFont in -ltk80" >&5
3857 ac_lib_var=`echo tk80'_'Tk_NameOfFont | sed 'y%./+-%__p_%'`
3858 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3859 echo $ac_n "(cached) $ac_c" 1>&6
3860 else
3861 ac_save_LIBS="$LIBS"
3862 LIBS="-ltk80 $TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3863 cat > conftest.$ac_ext <<EOF
3864 #line 3865 "configure"
3865 #include "confdefs.h"
3866 /* Override any gcc2 internal prototype to avoid an error. */
3867 /* We use char because int might match the return type of a gcc2
3868 builtin and then its argument prototype would still apply. */
3869 char Tk_NameOfFont();
3870
3871 int main() {
3872 Tk_NameOfFont()
3873 ; return 0; }
3874 EOF
3875 if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3876 rm -rf conftest*
3877 eval "ac_cv_lib_$ac_lib_var=yes"
3878 else
3879 echo "configure: failed program was:" >&5
3880 cat conftest.$ac_ext >&5
3881 rm -rf conftest*
3882 eval "ac_cv_lib_$ac_lib_var=no"
3883 fi
3884 rm -f conftest*
3885 LIBS="$ac_save_LIBS"
3886
3887 fi
3888 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3889 echo "$ac_t""yes" 1>&6
3890 TK_LIB="-ltk80"
3891 else
3892 echo "$ac_t""no" 1>&6
3893 fi
3894
3895 fi
3896 if test "X$TK_LIB" = X_searching ; then
3897 echo $ac_n "checking for Tk_NameOfFont in -ltk""... $ac_c" 1>&6
3898 echo "configure:3899: checking for Tk_NameOfFont in -ltk" >&5
3899 ac_lib_var=`echo tk'_'Tk_NameOfFont | sed 'y%./+-%__p_%'`
3900 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3901 echo $ac_n "(cached) $ac_c" 1>&6
3902 else
3903 ac_save_LIBS="$LIBS"
3904 LIBS="-ltk $TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3905 cat > conftest.$ac_ext <<EOF
3906 #line 3907 "configure"
3907 #include "confdefs.h"
3908 /* Override any gcc2 internal prototype to avoid an error. */
3909 /* We use char because int might match the return type of a gcc2
3910 builtin and then its argument prototype would still apply. */
3911 char Tk_NameOfFont();
3912
3913 int main() {
3914 Tk_NameOfFont()
3915 ; return 0; }
3916 EOF
3917 if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3918 rm -rf conftest*
3919 eval "ac_cv_lib_$ac_lib_var=yes"
3920 else
3921 echo "configure: failed program was:" >&5
3922 cat conftest.$ac_ext >&5
3923 rm -rf conftest*
3924 eval "ac_cv_lib_$ac_lib_var=no"
3925 fi
3926 rm -f conftest*
3927 LIBS="$ac_save_LIBS"
3928
3929 fi
3930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3931 echo "$ac_t""yes" 1>&6
3932 TK_LIB="-ltk"
3933 else
3934 echo "$ac_t""no" 1>&6
3935 fi
3936
3937 fi
3938
3939 # give up searching for the Tk8.0 library
3940 #
3941 if test "X$TK_LIB" = X_searching ; then
3942 { echo "configure: error: Cannot find a compatiable Tk library.
3943 You must build and install Tk version 8.0 or newer before you
3944 can build ASCEND. If you have installed the correct version
3945 of Tk, run configure again with the argument:
3946 --with-tk=LIBRARY,HEADER
3947 where LIBRARY and HEADER are the full paths to the Tk8.0
3948 library file and header file, respectively." 1>&2; exit 1; }
3949 fi
3950
3951 # see if the user gave us the location of the Tk8.0 header file
3952 #
3953 if test ! "X$with_tkhdr" = X_searching ; then
3954 if test ! -f "$TK_HDR" ; then
3955 echo "configure: warning: user specified Tk header file, $TK_HDR, does not exist" 1>&2
3956 with_tkhdr=_searching
3957 TK_HDR=''
3958 fi
3959 fi
3960 if test "X$with_tkhdr" = X_searching ; then
3961 # Extract the first word of "tk.h", so it can be a program name with args.
3962 set dummy tk.h; ac_word=$2
3963 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3964 echo "configure:3965: checking for $ac_word" >&5
3965 if eval "test \"`echo '$''{'ac_cv_path_TK_HDR'+set}'`\" = set"; then
3966 echo $ac_n "(cached) $ac_c" 1>&6
3967 else
3968 case "$TK_HDR" in
3969 /*)
3970 ac_cv_path_TK_HDR="$TK_HDR" # Let the user override the test with a path.
3971 ;;
3972 ?:/*)
3973 ac_cv_path_TK_HDR="$TK_HDR" # Let the user override the test with a dos path.
3974 ;;
3975 *)
3976 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3977 ac_dummy="$asc_tcl_include_dirs"
3978 for ac_dir in $ac_dummy; do
3979 test -z "$ac_dir" && ac_dir=.
3980 if test -f $ac_dir/$ac_word; then
3981 ac_cv_path_TK_HDR="$ac_dir/$ac_word"
3982 break
3983 fi
3984 done
3985 IFS="$ac_save_ifs"
3986 ;;
3987 esac
3988 fi
3989 TK_HDR="$ac_cv_path_TK_HDR"
3990 if test -n "$TK_HDR"; then
3991 echo "$ac_t""$TK_HDR" 1>&6
3992 else
3993 echo "$ac_t""no" 1>&6
3994 fi
3995
3996 if test -z "$TK_HDR" ; then
3997 cat > conftest.$ac_ext <<EOF
3998 #line 3999 "configure"
3999 #include "confdefs.h"
4000 #include <tk.h>
4001 EOF
4002 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4003 egrep "TK_MAJOR_VERSION.*8" >/dev/null 2>&1; then
4004 rm -rf conftest*
4005 TK_HDR='tk.h'
4006 fi
4007 rm -f conftest*
4008
4009 fi
4010 else
4011 echo "$ac_t""checking for tk header... $TK_HDR" 1>&6
4012 fi
4013 if test -f "$TK_HDR" ; then
4014 echo $ac_n "checking whether $TK_HDR is for version 8""... $ac_c" 1>&6
4015 echo "configure:4016: checking whether $TK_HDR is for version 8" >&5
4016 echo 'grep TK_MAJOR_VERSION "$TK_HDR" 2>&5' 1>&5
4017 grep_tk_h=`grep TK_MAJOR_VERSION "$TK_HDR" 2>&5`
4018 echo $grep_tk_h 1>&5
4019 case "$grep_tk_h" in
4020 *8)
4021 echo "$ac_t""yes" 1>&6
4022 ;;
4023 *)
4024 echo "$ac_t""no" 1>&6
4025 TK_HDR=
4026 ;;
4027 esac
4028 fi
4029 if test -z "$TK_HDR" ; then
4030 { echo "configure: error: Cannot find a compatiable Tk header file.
4031 You must build and install Tk version 8.0 or newer before you
4032 can build ASCEND. If you have installed the correct version
4033 of Tk, run configure again with the argument:
4034 --with-tk=LIBRARY,HEADER
4035 where LIBRARY and HEADER are the full paths to the Tk8.0
4036 library file and header file, respectively." 1>&2; exit 1; }
4037 fi
4038 TK_HDR=`echo $TK_HDR | sed 's,tk\.h$,,'`
4039 if test -n "$TK_HDR" ; then
4040 TK_HDR="-I$TK_HDR"
4041 if test "X$TCL_HDR" = "X$TK_HDR" ; then
4042 TK_HDR=
4043 fi
4044 fi
4045
4046
4047 # Check whether --with-tktable or --without-tktable was given.
4048 if test "${with_tktable+set}" = set; then
4049 withval="$with_tktable"
4050 :
4051 fi
4052
4053 case "$with_tktable" in
4054 yes|no|"")
4055 # search for the table
4056 # Extract the first word of "libTktable.a", so it can be a program name with args.
4057 set dummy libTktable.a; ac_word=$2
4058 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4059 echo "configure:4060: checking for $ac_word" >&5
4060 if eval "test \"`echo '$''{'ac_cv_path_TKTABLE_LIB'+set}'`\" = set"; then
4061 echo $ac_n "(cached) $ac_c" 1>&6
4062 else
4063 case "$TKTABLE_LIB" in
4064 /*)
4065 ac_cv_path_TKTABLE_LIB="$TKTABLE_LIB" # Let the user override the test with a path.
4066 ;;
4067 ?:/*)
4068 ac_cv_path_TKTABLE_LIB="$TKTABLE_LIB" # Let the user override the test with a dos path.
4069 ;;
4070 *)
4071 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4072 ac_dummy="$asc_tk_table_dirs"
4073 for ac_dir in $ac_dummy; do
4074 test -z "$ac_dir" && ac_dir=.
4075 if test -f $ac_dir/$ac_word; then
4076 ac_cv_path_TKTABLE_LIB="$ac_dir/$ac_word"
4077 break
4078 fi
4079 done
4080 IFS="$ac_save_ifs"
4081 ;;
4082 esac
4083 fi
4084 TKTABLE_LIB="$ac_cv_path_TKTABLE_LIB"
4085 if test -n "$TKTABLE_LIB"; then
4086 echo "$ac_t""$TKTABLE_LIB" 1>&6
4087 else
4088 echo "$ac_t""no" 1>&6
4089 fi
4090
4091 ;;
4092 *)
4093 # use the user's value
4094 TKTABLE_LIB="$with_tktable"
4095 ;;
4096 esac
4097 if test -n "$TKTABLE_LIB" ; then
4098 HAVE_TKTABLE='-DSTATIC_TKTABLE'
4099 else
4100 echo "$ac_t""Assuming Tktable will be dynamically linked into ASCEND" 1>&6
4101 fi
4102
4103 # Check whether --with-wish or --without-wish was given.
4104 if test "${with_wish+set}" = set; then
4105 withval="$with_wish"
4106 :
4107 else
4108 with_wish=no
4109 fi
4110
4111 case "$with_wish" in
4112 yes|no|"")
4113 echo "$ac_t""--with-wish not specified.
4114 Setting env vars TCL_LIBRARY, TK_LIBRARY may be needed to run." 1>&6
4115 ;;
4116 *)
4117 echo $ac_n "checking wish for tcl_library,tk_library""... $ac_c" 1>&6
4118 echo "configure:4119: checking wish for tcl_library,tk_library" >&5
4119
4120 # asc_wishvar( tcl_library, $with_wish)
4121 # generate the executable to extract a variable
4122 # from the tickle shell
4123 cat << EOF > wishvar.tmp.tcl
4124 #! $with_wish
4125 # this is a generated file and can be deleted any time.
4126 if {\$argc != 1} {
4127 puts stderr "\$argv0 needs variable name"
4128 exit 1
4129 }
4130 set var [lindex \$argv 0]
4131 puts [set \$var]
4132 exit 0
4133 EOF
4134
4135 #call it
4136 # usage wishvar varname shell-to-test-in
4137 ASC_TK_LIBRARY=`$with_wish wishvar.tmp.tcl -- tk_library`
4138
4139
4140
4141 # asc_wishvar( tcl_library, $with_wish)
4142 # generate the executable to extract a variable
4143 # from the tickle shell
4144 cat << EOF > wishvar.tmp.tcl
4145 #! $with_wish
4146 # this is a generated file and can be deleted any time.
4147 if {\$argc != 1} {
4148 puts stderr "\$argv0 needs variable name"
4149 exit 1
4150 }
4151 set var [lindex \$argv 0]
4152 puts [set \$var]
4153 exit 0
4154 EOF
4155
4156 #call it
4157 # usage wishvar varname shell-to-test-in
4158 ASC_TCL_LIBRARY=`$with_wish wishvar.tmp.tcl -- tcl_library`
4159
4160
4161 echo "$ac_t"" $ASC_TCL_LIBRARY , $ASC_TK_LIBRARY" 1>&6
4162 ;;
4163 esac
4164
4165
4166 #--------------------------------------------------------------------
4167 # FORTRAN
4168 #
4169 # ASCEND uses the LSOD integrator and is capable of working
4170 # with CONOPT and with MINOS. These libraries are written in
4171 # Fortran; to use them, configure needs to find a Fortran
4172 # compiler and the necessary Fortran libraries (e.g.,
4173 # libF77.a). LSOD, CONOPT, and MINOS also require the BLAS and
4174 # LINPACK libraries to avoid undefined symbols at link time.
4175 #
4176 # The builder can specify the location of
4177 # * the Fortran compiler and libraries using
4178 # --with-fortran=<compiler>,<libraries>
4179 # * the BLAS library using
4180 # --with-blas=<blas-library>
4181 # * the LINPACK library using
4182 # --with-linpack=<linpack-library>
4183 # * the LSOD library using
4184 # --with-blas=<lsod-library>
4185 # * the CONOPT library using
4186 # --with-conopt=<conopt-library>
4187 # * the MINOS library using
4188 # --with-minos=<minos-library> <===currently disabled
4189 # The builder can disable some parts of the fortran build using
4190 # the --without-<package> configure option.
4191 #
4192 # If the user does not specify the locations of the compiler
4193 # and the libraries and does not disable them, configure
4194 # attempts to find them.
4195 #
4196 # Building with LSOD, CONOPT, and/or MINOS is further
4197 # complicated by the dependencies between these libraries and
4198 # the BLAS and LINPACK libraries.
4199 #
4200 # If we cannot find a Fortran compiler, we disable all Fortran
4201 # code (LSOD, CONOPT, and MINOS). Otherwise, look for the
4202 # Fortran libraries (e.g., libF77.a) based on the type of
4203 # machine we are compiling on.
4204 #
4205 # If Fortran is enabled, we need to find a compiled BLAS
4206 # library or source code. Check for the machine's libblas.a
4207 # and ASCEND's libascblas.a; if those fail, check for the
4208 # libascblas.a source code; if that fails, we disable all
4209 # Fortran (LSOD, CONOPT, MINOS).
4210 #
4211 # If Fortran is enabled, we need to find a compiled LINPACK
4212 # library or source code. Check for the machine's liblpak.a
4213 # and ASCEND's libasclpak.a; if those fail, check for the
4214 # libasclpak.a source code; if that fails, we disable all
4215 # Fortran (LSOD, CONOPT, MINOS).
4216 #
4217 # If Fortran is enabled, we try to find a compiled LSOD library
4218 # or source code. Check for a libinteg.a; if that fails, check
4219 # for the libinteg.a source code; if that fails, we disable
4220 # LSOD. If we find LSOD, define STATIC_LSOD.
4221 #
4222 # If Fortran is enabled, we try to find a compiled OPTSQP
4223 # library or source code. Check for a librsqp.a; if that fails,
4224 # check for the librsqp.a source code; if that fails, we disable
4225 # OPTSQP. If we find RSQP, define STATIC_OPTSQP.
4226 #
4227 # If Fortran is enabled, we try to find a compiled CONOPT
4228 # library. Check for a libconsub.a; if that fails, we disable
4229 # CONOPT. If we find CONOPT, define STATIC_CONOPT; if not,
4230 # tell the user where to find CONOPT using the contact
4231 # information from the nonlinear programming FAQ:
4232 # http://www.mcs.anl.gov/home/otc/Guide/faq/nonlinear-programming-faq.html
4233 #
4234 # If Fortran is enabled, we try to find a compiled MINOS
4235 # library or source code. Check for a libminos54.a; if that
4236 # fails, check for the libminos54.a source code; if that fails,
4237 # we disable MINOS. If we find MINOS, define STATIC_MINOS; if
4238 # not, tell the user where to find MINOS using the contact
4239 # information from the nonlinear programming FAQ:
4240 # http://www.mcs.anl.gov/home/otc/Guide/faq/nonlinear-programming-faq.html
4241 #--------------------------------------------------------------------
4242 #
4243 # the list of directories to search for the fortran compiler
4244 asc_f77_prog_dirs="$PATH:/usr/lang:/opt/SUNWspro/bin"
4245 #
4246 # the list of directories to search for the required fortran libraries
4247 asc_f77_support_dirs="
4248 /lib
4249 /usr/lib