/[ascend]/trunk/configure
ViewVC logotype

Contents of /trunk/configure

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (show annotations) (download)
Thu Nov 11 20:32:47 2004 UTC (20 years, 5 months ago) by ben.allan
File size: 191924 byte(s)
added example driver script that can be site tailored.
well, the start of one anyway.
updated configure to deal with tk/tcl8.3. still need
to update some of the help messages to refer to tktable 2.8.
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 --with-conopt=CONOPTLIB The full path to the conopt library."
75 ac_help="$ac_help
76 Generation of Makefiles:
77 --without-tkdir do not generate Makefiles in the TK subdir"
78 ac_help="$ac_help
79 --without-models do not generate Makefiles in the models subdir"
80
81 # Initialize some variables set by options.
82 # The variables have the same names as the options, with
83 # dashes changed to underlines.
84 build=NONE
85 cache_file=./config.cache
86 exec_prefix=NONE
87 host=NONE
88 no_create=
89 nonopt=NONE
90 no_recursion=
91 prefix=NONE
92 program_prefix=NONE
93 program_suffix=NONE
94 program_transform_name=s,x,x,
95 silent=
96 site=
97 srcdir=
98 target=NONE
99 verbose=
100 x_includes=NONE
101 x_libraries=NONE
102 bindir='${exec_prefix}/bin'
103 sbindir='${exec_prefix}/sbin'
104 libexecdir='${exec_prefix}/libexec'
105 datadir='${prefix}/share'
106 sysconfdir='${prefix}/etc'
107 sharedstatedir='${prefix}/com'
108 localstatedir='${prefix}/var'
109 libdir='${exec_prefix}/lib'
110 includedir='${prefix}/include'
111 oldincludedir='/usr/include'
112 infodir='${prefix}/info'
113 mandir='${prefix}/man'
114
115 # Initialize some other variables.
116 subdirs=
117 MFLAGS= MAKEFLAGS=
118 SHELL=${CONFIG_SHELL-/bin/sh}
119 # Maximum number of lines to put in a shell here document.
120 ac_max_here_lines=12
121
122 ac_prev=
123 for ac_option
124 do
125
126 # If the previous option needs an argument, assign it.
127 if test -n "$ac_prev"; then
128 eval "$ac_prev=\$ac_option"
129 ac_prev=
130 continue
131 fi
132
133 case "$ac_option" in
134 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
135 *) ac_optarg= ;;
136 esac
137
138 # Accept the important Cygnus configure options, so we can diagnose typos.
139
140 case "$ac_option" in
141
142 -bindir | --bindir | --bindi | --bind | --bin | --bi)
143 ac_prev=bindir ;;
144 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
145 bindir="$ac_optarg" ;;
146
147 -build | --build | --buil | --bui | --bu)
148 ac_prev=build ;;
149 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
150 build="$ac_optarg" ;;
151
152 -cache-file | --cache-file | --cache-fil | --cache-fi \
153 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
154 ac_prev=cache_file ;;
155 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
156 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
157 cache_file="$ac_optarg" ;;
158
159 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
160 ac_prev=datadir ;;
161 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
162 | --da=*)
163 datadir="$ac_optarg" ;;
164
165 -disable-* | --disable-*)
166 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
167 # Reject names that are not valid shell variable names.
168 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
169 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
170 fi
171 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
172 eval "enable_${ac_feature}=no" ;;
173
174 -enable-* | --enable-*)
175 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
176 # Reject names that are not valid shell variable names.
177 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
178 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
179 fi
180 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
181 case "$ac_option" in
182 *=*) ;;
183 *) ac_optarg=yes ;;
184 esac
185 eval "enable_${ac_feature}='$ac_optarg'" ;;
186
187 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
188 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
189 | --exec | --exe | --ex)
190 ac_prev=exec_prefix ;;
191 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
192 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
193 | --exec=* | --exe=* | --ex=*)
194 exec_prefix="$ac_optarg" ;;
195
196 -gas | --gas | --ga | --g)
197 # Obsolete; use --with-gas.
198 with_gas=yes ;;
199
200 -help | --help | --hel | --he)
201 # Omit some internal or obsolete options to make the list less imposing.
202 # This message is too long to be a string in the A/UX 3.1 sh.
203 cat << EOF
204 Usage: configure [options] [host]
205 Options: [defaults in brackets after descriptions]
206 Configuration:
207 --cache-file=FILE cache test results in FILE
208 --help print this message
209 --no-create do not create output files
210 --quiet, --silent do not print \`checking...' messages
211 --version print the version of autoconf that created configure
212 Directory and file names:
213 --prefix=PREFIX install architecture-independent files in PREFIX
214 [$ac_default_prefix]
215 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
216 [same as prefix]
217 --bindir=DIR user executables in DIR [EPREFIX/bin]
218 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
219 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
220 --datadir=DIR read-only architecture-independent data in DIR
221 [PREFIX/share]
222 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
223 --sharedstatedir=DIR modifiable architecture-independent data in DIR
224 [PREFIX/com]
225 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
226 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
227 --includedir=DIR C header files in DIR [PREFIX/include]
228 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
229 --infodir=DIR info documentation in DIR [PREFIX/info]
230 --mandir=DIR man documentation in DIR [PREFIX/man]
231 --srcdir=DIR find the sources in DIR [configure dir or ..]
232 --program-prefix=PREFIX prepend PREFIX to installed program names
233 --program-suffix=SUFFIX append SUFFIX to installed program names
234 --program-transform-name=PROGRAM
235 run sed PROGRAM on installed program names
236 EOF
237 cat << EOF
238 Host type:
239 --build=BUILD configure for building on BUILD [BUILD=HOST]
240 --host=HOST configure for HOST [guessed]
241 --target=TARGET configure for TARGET [TARGET=HOST]
242 Features and packages:
243 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
244 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
245 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
246 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
247 --x-includes=DIR X include files are in DIR
248 --x-libraries=DIR X library files are in DIR
249 EOF
250 if test -n "$ac_help"; then
251 echo "--enable and --with options recognized:$ac_help"
252 fi
253 exit 0 ;;
254
255 -host | --host | --hos | --ho)
256 ac_prev=host ;;
257 -host=* | --host=* | --hos=* | --ho=*)
258 host="$ac_optarg" ;;
259
260 -includedir | --includedir | --includedi | --included | --include \
261 | --includ | --inclu | --incl | --inc)
262 ac_prev=includedir ;;
263 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
264 | --includ=* | --inclu=* | --incl=* | --inc=*)
265 includedir="$ac_optarg" ;;
266
267 -infodir | --infodir | --infodi | --infod | --info | --inf)
268 ac_prev=infodir ;;
269 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
270 infodir="$ac_optarg" ;;
271
272 -libdir | --libdir | --libdi | --libd)
273 ac_prev=libdir ;;
274 -libdir=* | --libdir=* | --libdi=* | --libd=*)
275 libdir="$ac_optarg" ;;
276
277 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
278 | --libexe | --libex | --libe)
279 ac_prev=libexecdir ;;
280 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
281 | --libexe=* | --libex=* | --libe=*)
282 libexecdir="$ac_optarg" ;;
283
284 -localstatedir | --localstatedir | --localstatedi | --localstated \
285 | --localstate | --localstat | --localsta | --localst \
286 | --locals | --local | --loca | --loc | --lo)
287 ac_prev=localstatedir ;;
288 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
289 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
290 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
291 localstatedir="$ac_optarg" ;;
292
293 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
294 ac_prev=mandir ;;
295 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
296 mandir="$ac_optarg" ;;
297
298 -nfp | --nfp | --nf)
299 # Obsolete; use --without-fp.
300 with_fp=no ;;
301
302 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
303 | --no-cr | --no-c)
304 no_create=yes ;;
305
306 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
307 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
308 no_recursion=yes ;;
309
310 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
311 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
312 | --oldin | --oldi | --old | --ol | --o)
313 ac_prev=oldincludedir ;;
314 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
315 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
316 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
317 oldincludedir="$ac_optarg" ;;
318
319 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
320 ac_prev=prefix ;;
321 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
322 prefix="$ac_optarg" ;;
323
324 -program-prefix | --program-prefix | --program-prefi | --program-pref \
325 | --program-pre | --program-pr | --program-p)
326 ac_prev=program_prefix ;;
327 -program-prefix=* | --program-prefix=* | --program-prefi=* \
328 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
329 program_prefix="$ac_optarg" ;;
330
331 -program-suffix | --program-suffix | --program-suffi | --program-suff \
332 | --program-suf | --program-su | --program-s)
333 ac_prev=program_suffix ;;
334 -program-suffix=* | --program-suffix=* | --program-suffi=* \
335 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
336 program_suffix="$ac_optarg" ;;
337
338 -program-transform-name | --program-transform-name \
339 | --program-transform-nam | --program-transform-na \
340 | --program-transform-n | --program-transform- \
341 | --program-transform | --program-transfor \
342 | --program-transfo | --program-transf \
343 | --program-trans | --program-tran \
344 | --progr-tra | --program-tr | --program-t)
345 ac_prev=program_transform_name ;;
346 -program-transform-name=* | --program-transform-name=* \
347 | --program-transform-nam=* | --program-transform-na=* \
348 | --program-transform-n=* | --program-transform-=* \
349 | --program-transform=* | --program-transfor=* \
350 | --program-transfo=* | --program-transf=* \
351 | --program-trans=* | --program-tran=* \
352 | --progr-tra=* | --program-tr=* | --program-t=*)
353 program_transform_name="$ac_optarg" ;;
354
355 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
356 | -silent | --silent | --silen | --sile | --sil)
357 silent=yes ;;
358
359 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
360 ac_prev=sbindir ;;
361 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
362 | --sbi=* | --sb=*)
363 sbindir="$ac_optarg" ;;
364
365 -sharedstatedir | --sharedstatedir | --sharedstatedi \
366 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
367 | --sharedst | --shareds | --shared | --share | --shar \
368 | --sha | --sh)
369 ac_prev=sharedstatedir ;;
370 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
371 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
372 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
373 | --sha=* | --sh=*)
374 sharedstatedir="$ac_optarg" ;;
375
376 -site | --site | --sit)
377 ac_prev=site ;;
378 -site=* | --site=* | --sit=*)
379 site="$ac_optarg" ;;
380
381 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
382 ac_prev=srcdir ;;
383 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
384 srcdir="$ac_optarg" ;;
385
386 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
387 | --syscon | --sysco | --sysc | --sys | --sy)
388 ac_prev=sysconfdir ;;
389 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
390 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
391 sysconfdir="$ac_optarg" ;;
392
393 -target | --target | --targe | --targ | --tar | --ta | --t)
394 ac_prev=target ;;
395 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
396 target="$ac_optarg" ;;
397
398 -v | -verbose | --verbose | --verbos | --verbo | --verb)
399 verbose=yes ;;
400
401 -version | --version | --versio | --versi | --vers)
402 echo "configure generated by autoconf version 2.13"
403 exit 0 ;;
404
405 -with-* | --with-*)
406 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
407 # Reject names that are not valid shell variable names.
408 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
409 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
410 fi
411 ac_package=`echo $ac_package| sed 's/-/_/g'`
412 case "$ac_option" in
413 *=*) ;;
414 *) ac_optarg=yes ;;
415 esac
416 eval "with_${ac_package}='$ac_optarg'" ;;
417
418 -without-* | --without-*)
419 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
420 # Reject names that are not valid shell variable names.
421 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
422 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
423 fi
424 ac_package=`echo $ac_package| sed 's/-/_/g'`
425 eval "with_${ac_package}=no" ;;
426
427 --x)
428 # Obsolete; use --with-x.
429 with_x=yes ;;
430
431 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
432 | --x-incl | --x-inc | --x-in | --x-i)
433 ac_prev=x_includes ;;
434 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
435 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
436 x_includes="$ac_optarg" ;;
437
438 -x-libraries | --x-libraries | --x-librarie | --x-librari \
439 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
440 ac_prev=x_libraries ;;
441 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
442 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
443 x_libraries="$ac_optarg" ;;
444
445 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
446 ;;
447
448 *)
449 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
450 echo "configure: warning: $ac_option: invalid host type" 1>&2
451 fi
452 if test "x$nonopt" != xNONE; then
453 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
454 fi
455 nonopt="$ac_option"
456 ;;
457
458 esac
459 done
460
461 if test -n "$ac_prev"; then
462 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
463 fi
464
465 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
466
467 # File descriptor usage:
468 # 0 standard input
469 # 1 file creation
470 # 2 errors and warnings
471 # 3 some systems may open it to /dev/tty
472 # 4 used on the Kubota Titan
473 # 6 checking for... messages and results
474 # 5 compiler messages saved in config.log
475 if test "$silent" = yes; then
476 exec 6>/dev/null
477 else
478 exec 6>&1
479 fi
480 exec 5>./config.log
481
482 echo "\
483 This file contains any messages produced by compilers while
484 running configure, to aid debugging if configure makes a mistake.
485 " 1>&5
486
487 # Strip out --no-create and --no-recursion so they do not pile up.
488 # Also quote any args containing shell metacharacters.
489 ac_configure_args=
490 for ac_arg
491 do
492 case "$ac_arg" in
493 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
494 | --no-cr | --no-c) ;;
495 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
496 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
497 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
498 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
499 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
500 esac
501 done
502
503 # NLS nuisances.
504 # Only set these to C if already set. These must not be set unconditionally
505 # because not all systems understand e.g. LANG=C (notably SCO).
506 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
507 # Non-C LC_CTYPE values break the ctype check.
508 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
509 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
510 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
511 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
512
513 # confdefs.h avoids OS command line length limits that DEFS can exceed.
514 rm -rf conftest* confdefs.h
515 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
516 echo > confdefs.h
517
518 # A filename unique to this package, relative to the directory that
519 # configure is in, which we can look for to find out if srcdir is correct.
520 ac_unique_file=ascend4/compiler/ascParse.y
521
522 # Find the source files, if location was not specified.
523 if test -z "$srcdir"; then
524 ac_srcdir_defaulted=yes
525 # Try the directory containing this script, then its parent.
526 ac_prog=$0
527 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
528 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
529 srcdir=$ac_confdir
530 if test ! -r $srcdir/$ac_unique_file; then
531 srcdir=..
532 fi
533 else
534 ac_srcdir_defaulted=no
535 fi
536 if test ! -r $srcdir/$ac_unique_file; then
537 if test "$ac_srcdir_defaulted" = yes; then
538 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
539 else
540 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
541 fi
542 fi
543 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
544
545 # Prefer explicitly selected file to automatically selected ones.
546 if test -z "$CONFIG_SITE"; then
547 if test "x$prefix" != xNONE; then
548 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
549 else
550 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
551 fi
552 fi
553 for ac_site_file in $CONFIG_SITE; do
554 if test -r "$ac_site_file"; then
555 echo "loading site script $ac_site_file"
556 . "$ac_site_file"
557 fi
558 done
559
560
561 ac_ext=c
562 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
563 ac_cpp='$CPP $CPPFLAGS'
564 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
565 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
566 cross_compiling=$ac_cv_prog_cc_cross
567
568 ac_exeext=
569 ac_objext=o
570 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
571 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
572 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
573 ac_n= ac_c='
574 ' ac_t=' '
575 else
576 ac_n=-n ac_c= ac_t=
577 fi
578 else
579 ac_n= ac_c='\c' ac_t=
580 fi
581
582
583
584
585 #--------------------------------------------------------------------
586 # CVS Most Recent Revision Data
587 # Put this data after AC_INIT since we want this information
588 # to also appear in configure and autoconf, when creating
589 # configure, strips all comments that appear in configure.in
590 # before AC_INIT
591 # $Revision: 1.38 $
592 # $Date: 2003/11/23 19:36:39 $
593 # $Author: ballan $
594 # $Source: /afs/cs.cmu.edu/project/ascend/Repository/configure.in,v $
595 #--------------------------------------------------------------------
596
597
598 #--------------------------------------------------------------------
599 # Where configure should look for files it needs.
600 #--------------------------------------------------------------------
601 ac_aux_dir=
602 for ac_dir in config $srcdir/config; do
603 if test -f $ac_dir/install-sh; then
604 ac_aux_dir=$ac_dir
605 ac_install_sh="$ac_aux_dir/install-sh -c"
606 break
607 elif test -f $ac_dir/install.sh; then
608 ac_aux_dir=$ac_dir
609 ac_install_sh="$ac_aux_dir/install.sh -c"
610 break
611 fi
612 done
613 if test -z "$ac_aux_dir"; then
614 { echo "configure: error: can not find install-sh or install.sh in config $srcdir/config" 1>&2; exit 1; }
615 fi
616 ac_config_guess=$ac_aux_dir/config.guess
617 ac_config_sub=$ac_aux_dir/config.sub
618 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
619
620
621 #--------------------------------------------------------------------
622 # Set the output variables prefix and exec_prefix that
623 # determine where things will be installed.
624 #--------------------------------------------------------------------
625 if test "${prefix}" = "NONE"; then
626 prefix=/usr/local
627 fi
628 if test "${exec_prefix}" = "NONE"; then
629 exec_prefix=$prefix
630 fi
631
632
633 #--------------------------------------------------------------------
634 # For the Fortran support libraries and the TCL/TK libraries
635 # and header files, we unfortunately need the full path to
636 # these files. The problem with having the full path is that
637 # if the user moves the source tree, things will break unless
638 # the user re-runs configure.
639 #--------------------------------------------------------------------
640 ascpwd=`pwd`
641 fullpathsrcdir=`cd $srcdir ; pwd`
642
643
644 #--------------------------------------------------------------------
645 # The asc_include variable is (directory) path to the ascend4
646 # SOURCE directory relative to the immediate subdirectories of
647 # the ascend4 OBJECT directory.
648 # -- If we are building in the source directory ($srcdir is "."
649 # asc_include is simply "../."
650 # -- If the user gives us a full path to the configure script,
651 # we just append "/ascend4" to that full path:
652 # "$scrdir/ascend4"
653 # -- For any other value of $srcdir (like ../src/), we go up
654 # two directories (to get to the top of the OBJECT tree,
655 # insert the source directory, and then go back down one
656 # level to the ascend4 directory: "../../$srcdir/ascend4"
657 #--------------------------------------------------------------------
658 case "$srcdir" in
659 .)
660 asc_include="../$srcdir"
661 ;;
662 /*)
663 asc_include="$srcdir/ascend4"
664 ;;
665 *)
666 asc_include="../../$srcdir/ascend4"
667 ;;
668 esac
669
670
671 #--------------------------------------------------------------------
672 # Do basic checks to determine
673 # * if we have `ranlib'
674 # * if we can create symbolic links
675 # * if `make' sets the MAKE macro
676 # * a bsd-compatible `install' program
677 # If we use the install-sh script that comes with configure,
678 # prefix it with the current directory so it'll work in
679 # subdirectories. Unfortunately, it won't work if the user
680 # moves the source tree.
681 #--------------------------------------------------------------------
682 # Extract the first word of "ranlib", so it can be a program name with args.
683 set dummy ranlib; ac_word=$2
684 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
685 echo "configure:686: checking for $ac_word" >&5
686 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
687 echo $ac_n "(cached) $ac_c" 1>&6
688 else
689 if test -n "$RANLIB"; then
690 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
691 else
692 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
693 ac_dummy="$PATH"
694 for ac_dir in $ac_dummy; do
695 test -z "$ac_dir" && ac_dir=.
696 if test -f $ac_dir/$ac_word; then
697 ac_cv_prog_RANLIB="ranlib"
698 break
699 fi
700 done
701 IFS="$ac_save_ifs"
702 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
703 fi
704 fi
705 RANLIB="$ac_cv_prog_RANLIB"
706 if test -n "$RANLIB"; then
707 echo "$ac_t""$RANLIB" 1>&6
708 else
709 echo "$ac_t""no" 1>&6
710 fi
711
712 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
713 echo "configure:714: checking whether ln -s works" >&5
714 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
715 echo $ac_n "(cached) $ac_c" 1>&6
716 else
717 rm -f conftestdata
718 if ln -s X conftestdata 2>/dev/null
719 then
720 rm -f conftestdata
721 ac_cv_prog_LN_S="ln -s"
722 else
723 ac_cv_prog_LN_S=ln
724 fi
725 fi
726 LN_S="$ac_cv_prog_LN_S"
727 if test "$ac_cv_prog_LN_S" = "ln -s"; then
728 echo "$ac_t""yes" 1>&6
729 else
730 echo "$ac_t""no" 1>&6
731 fi
732
733 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
734 echo "configure:735: checking whether ${MAKE-make} sets \${MAKE}" >&5
735 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
736 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
737 echo $ac_n "(cached) $ac_c" 1>&6
738 else
739 cat > conftestmake <<\EOF
740 all:
741 @echo 'ac_maketemp="${MAKE}"'
742 EOF
743 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
744 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
745 if test -n "$ac_maketemp"; then
746 eval ac_cv_prog_make_${ac_make}_set=yes
747 else
748 eval ac_cv_prog_make_${ac_make}_set=no
749 fi
750 rm -f conftestmake
751 fi
752 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
753 echo "$ac_t""yes" 1>&6
754 SET_MAKE=
755 else
756 echo "$ac_t""no" 1>&6
757 SET_MAKE="MAKE=${MAKE-make}"
758 fi
759
760 # Find a good install program. We prefer a C program (faster),
761 # so one script is as good as another. But avoid the broken or
762 # incompatible versions:
763 # SysV /etc/install, /usr/sbin/install
764 # SunOS /usr/etc/install
765 # IRIX /sbin/install
766 # AIX /bin/install
767 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
768 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
769 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
770 # ./install, which can be erroneously created by make from ./install.sh.
771 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
772 echo "configure:773: checking for a BSD compatible install" >&5
773 if test -z "$INSTALL"; then
774 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
775 echo $ac_n "(cached) $ac_c" 1>&6
776 else
777 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
778 for ac_dir in $PATH; do
779 # Account for people who put trailing slashes in PATH elements.
780 case "$ac_dir/" in
781 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
782 *)
783 # OSF1 and SCO ODT 3.0 have their own names for install.
784 # Don't use installbsd from OSF since it installs stuff as root
785 # by default.
786 for ac_prog in ginstall scoinst install; do
787 if test -f $ac_dir/$ac_prog; then
788 if test $ac_prog = install &&
789 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
790 # AIX install. It has an incompatible calling convention.
791 :
792 else
793 ac_cv_path_install="$ac_dir/$ac_prog -c"
794 break 2
795 fi
796 fi
797 done
798 ;;
799 esac
800 done
801 IFS="$ac_save_IFS"
802
803 fi
804 if test "${ac_cv_path_install+set}" = set; then
805 INSTALL="$ac_cv_path_install"
806 else
807 # As a last resort, use the slow shell script. We don't cache a
808 # path for INSTALL within a source directory, because that will
809 # break other packages using the cache if that directory is
810 # removed, or if the path is relative.
811 INSTALL="$ac_install_sh"
812 fi
813 fi
814 echo "$ac_t""$INSTALL" 1>&6
815
816 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
817 # It thinks the first close brace ends the variable substitution.
818 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
819
820 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
821
822 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
823
824 case "X$INSTALL" in
825 X/*)
826 ;;
827 *)
828 INSTALL="$ascpwd/$INSTALL"
829 ;;
830 esac
831
832
833 #--------------------------------------------------------------------
834 # Get the host type for various checks along the way
835 #--------------------------------------------------------------------
836
837 # Make sure we can run config.sub.
838 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
839 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
840 fi
841
842 echo $ac_n "checking host system type""... $ac_c" 1>&6
843 echo "configure:844: checking host system type" >&5
844
845 host_alias=$host
846 case "$host_alias" in
847 NONE)
848 case $nonopt in
849 NONE)
850 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
851 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
852 fi ;;
853 *) host_alias=$nonopt ;;
854 esac ;;
855 esac
856
857 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
858 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
859 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
860 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
861 echo "$ac_t""$host" 1>&6
862
863
864
865 #--------------------------------------------------------------------
866 # Check for the C compiler: set CC and CFLAGS.
867 # If the user does NOT specify `--enable-gcc' on the configure
868 # command command line, set CC to either the envar CC or `cc'.
869 # Call AC_PROG_CC which will use the value of CC (perhaps set
870 # immediately above) or will check for `gcc' and then for `cc'
871 # if `gcc' is not found.
872 #
873 # If we are using GCC, then assume it groks ANSI. Otherwise,
874 # try to compile a small program using ANSI constructs with
875 # CC. If this fails, try to locate each of the following:
876 # c89 xlc acc
877 # and if successful, see if it compiles an ANSI C program.
878 # (Doing this in a loop would be ideal, but configure caches
879 # the result of AC_CHECK_PROG and uses the cached value for
880 # all but the first pass through the loop. This is also the
881 # reason we have to use a different variable asc_cc1, asc_cc2
882 # for each call to AC_CHECK_PROG.
883 #
884 # If we do not find an ANSI C compiler, print a warning and
885 # use the first value of CC we tried.
886 #--------------------------------------------------------------------
887
888 # Check whether --enable-gcc or --disable-gcc was given.
889 if test "${enable_gcc+set}" = set; then
890 enableval="$enable_gcc"
891 asc_gcc_ok=$enableval
892 else
893 asc_gcc_ok=no
894 fi
895
896 if test ! "$asc_gcc_ok" = "yes"; then
897 CC=${CC-cc}
898 fi
899 asc_orig_cc=$CC
900
901 if test "X$asc_gcc_ok" = "Xyes" ; then
902 asc_ansi_ok=yes
903 else
904 echo $ac_n "checking whether $CC understands const, void*, and function prototypes""... $ac_c" 1>&6
905 echo "configure:906: checking whether $CC understands const, void*, and function prototypes" >&5
906 cat > conftest.$ac_ext <<EOF
907 #line 908 "configure"
908 #include "confdefs.h"
909
910 int main() {
911
912 int tstproto(int arg1, char * arg2);
913 int tstconst(const int arg1, const char *arg2);
914 int tstvoidp(const int arg1, const void *arg2);
915 ; return 0; }
916 EOF
917 if { (eval echo configure:918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
918 rm -rf conftest*
919 asc_ansi_ok=yes
920 else
921 echo "configure: failed program was:" >&5
922 cat conftest.$ac_ext >&5
923 rm -rf conftest*
924 asc_ansi_ok=no
925 fi
926 rm -f conftest*
927 echo "$ac_t""$asc_ansi_ok" 1>&6
928 fi
929
930 if test "$asc_ansi_ok" = no ; then
931 # Extract the first word of "c89", so it can be a program name with args.
932 set dummy c89; ac_word=$2
933 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
934 echo "configure:935: checking for $ac_word" >&5
935 if eval "test \"`echo '$''{'ac_cv_prog_asc_cc1'+set}'`\" = set"; then
936 echo $ac_n "(cached) $ac_c" 1>&6
937 else
938 if test -n "$asc_cc1"; then
939 ac_cv_prog_asc_cc1="$asc_cc1" # Let the user override the test.
940 else
941 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
942 ac_dummy="$PATH"
943 for ac_dir in $ac_dummy; do
944 test -z "$ac_dir" && ac_dir=.
945 if test -f $ac_dir/$ac_word; then
946 ac_cv_prog_asc_cc1="c89"
947 break
948 fi
949 done
950 IFS="$ac_save_ifs"
951 test -z "$ac_cv_prog_asc_cc1" && ac_cv_prog_asc_cc1="NONE"
952 fi
953 fi
954 asc_cc1="$ac_cv_prog_asc_cc1"
955 if test -n "$asc_cc1"; then
956 echo "$ac_t""$asc_cc1" 1>&6
957 else
958 echo "$ac_t""no" 1>&6
959 fi
960
961 if test ! "$asc_cc1" = NONE ; then
962 CC=$asc_cc1
963 echo $ac_n "checking whether $CC understands const, void*, and function prototypes""... $ac_c" 1>&6
964 echo "configure:965: checking whether $CC understands const, void*, and function prototypes" >&5
965 cat > conftest.$ac_ext <<EOF
966 #line 967 "configure"
967 #include "confdefs.h"
968
969 int main() {
970
971 int tstproto(int arg1, char * arg2);
972 int tstconst(const int arg1, const char *arg2);
973 int tstvoidp(const int arg1, const void *arg2);
974 ; return 0; }
975 EOF
976 if { (eval echo configure:977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
977 rm -rf conftest*
978 asc_ansi_ok=yes
979 else
980 echo "configure: failed program was:" >&5
981 cat conftest.$ac_ext >&5
982 rm -rf conftest*
983 asc_ansi_ok=no
984 fi
985 rm -f conftest*
986 echo "$ac_t""$asc_ansi_ok" 1>&6
987 fi
988 fi
989
990 if test "$asc_ansi_ok" = no ; then
991 # Extract the first word of "xlc", so it can be a program name with args.
992 set dummy xlc; 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_cc2'+set}'`\" = set"; then
996 echo $ac_n "(cached) $ac_c" 1>&6
997 else
998 if test -n "$asc_cc2"; then
999 ac_cv_prog_asc_cc2="$asc_cc2" # 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_cc2="xlc"
1007 break
1008 fi
1009 done
1010 IFS="$ac_save_ifs"
1011 test -z "$ac_cv_prog_asc_cc2" && ac_cv_prog_asc_cc2="NONE"
1012 fi
1013 fi
1014 asc_cc2="$ac_cv_prog_asc_cc2"
1015 if test -n "$asc_cc2"; then
1016 echo "$ac_t""$asc_cc2" 1>&6
1017 else
1018 echo "$ac_t""no" 1>&6
1019 fi
1020
1021 if test ! "$asc_cc2" = NONE ; then
1022 CC=$asc_cc2
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 "acc", so it can be a program name with args.
1052 set dummy acc; 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_cc3'+set}'`\" = set"; then
1056 echo $ac_n "(cached) $ac_c" 1>&6
1057 else
1058 if test -n "$asc_cc3"; then
1059 ac_cv_prog_asc_cc3="$asc_cc3" # 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_cc3="acc"
1067 break
1068 fi
1069 done
1070 IFS="$ac_save_ifs"
1071 test -z "$ac_cv_prog_asc_cc3" && ac_cv_prog_asc_cc3="NONE"
1072 fi
1073 fi
1074 asc_cc3="$ac_cv_prog_asc_cc3"
1075 if test -n "$asc_cc3"; then
1076 echo "$ac_t""$asc_cc3" 1>&6
1077 else
1078 echo "$ac_t""no" 1>&6
1079 fi
1080
1081 if test ! "$asc_cc3" = NONE ; then
1082 CC=$asc_cc3
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 # Extract the first word of "gcc", so it can be a program name with args.
1111 set dummy gcc; ac_word=$2
1112 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1113 echo "configure:1114: checking for $ac_word" >&5
1114 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1115 echo $ac_n "(cached) $ac_c" 1>&6
1116 else
1117 if test -n "$CC"; then
1118 ac_cv_prog_CC="$CC" # Let the user override the test.
1119 else
1120 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1121 ac_dummy="$PATH"
1122 for ac_dir in $ac_dummy; do
1123 test -z "$ac_dir" && ac_dir=.
1124 if test -f $ac_dir/$ac_word; then
1125 ac_cv_prog_CC="gcc"
1126 break
1127 fi
1128 done
1129 IFS="$ac_save_ifs"
1130 fi
1131 fi
1132 CC="$ac_cv_prog_CC"
1133 if test -n "$CC"; then
1134 echo "$ac_t""$CC" 1>&6
1135 else
1136 echo "$ac_t""no" 1>&6
1137 fi
1138
1139 if test -z "$CC"; then
1140 # Extract the first word of "cc", so it can be a program name with args.
1141 set dummy cc; ac_word=$2
1142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1143 echo "configure:1144: checking for $ac_word" >&5
1144 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1145 echo $ac_n "(cached) $ac_c" 1>&6
1146 else
1147 if test -n "$CC"; then
1148 ac_cv_prog_CC="$CC" # Let the user override the test.
1149 else
1150 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1151 ac_prog_rejected=no
1152 ac_dummy="$PATH"
1153 for ac_dir in $ac_dummy; do
1154 test -z "$ac_dir" && ac_dir=.
1155 if test -f $ac_dir/$ac_word; then
1156 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1157 ac_prog_rejected=yes
1158 continue
1159 fi
1160 ac_cv_prog_CC="cc"
1161 break
1162 fi
1163 done
1164 IFS="$ac_save_ifs"
1165 if test $ac_prog_rejected = yes; then
1166 # We found a bogon in the path, so make sure we never use it.
1167 set dummy $ac_cv_prog_CC
1168 shift
1169 if test $# -gt 0; then
1170 # We chose a different compiler from the bogus one.
1171 # However, it has the same basename, so the bogon will be chosen
1172 # first if we set CC to just the basename; use the full file name.
1173 shift
1174 set dummy "$ac_dir/$ac_word" "$@"
1175 shift
1176 ac_cv_prog_CC="$@"
1177 fi
1178 fi
1179 fi
1180 fi
1181 CC="$ac_cv_prog_CC"
1182 if test -n "$CC"; then
1183 echo "$ac_t""$CC" 1>&6
1184 else
1185 echo "$ac_t""no" 1>&6
1186 fi
1187
1188 if test -z "$CC"; then
1189 case "`uname -s`" in
1190 *win32* | *WIN32*)
1191 # Extract the first word of "cl", so it can be a program name with args.
1192 set dummy cl; ac_word=$2
1193 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1194 echo "configure:1195: checking for $ac_word" >&5
1195 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1196 echo $ac_n "(cached) $ac_c" 1>&6
1197 else
1198 if test -n "$CC"; then
1199 ac_cv_prog_CC="$CC" # Let the user override the test.
1200 else
1201 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1202 ac_dummy="$PATH"
1203 for ac_dir in $ac_dummy; do
1204 test -z "$ac_dir" && ac_dir=.
1205 if test -f $ac_dir/$ac_word; then
1206 ac_cv_prog_CC="cl"
1207 break
1208 fi
1209 done
1210 IFS="$ac_save_ifs"
1211 fi
1212 fi
1213 CC="$ac_cv_prog_CC"
1214 if test -n "$CC"; then
1215 echo "$ac_t""$CC" 1>&6
1216 else
1217 echo "$ac_t""no" 1>&6
1218 fi
1219 ;;
1220 esac
1221 fi
1222 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1223 fi
1224
1225 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1226 echo "configure:1227: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1227
1228 ac_ext=c
1229 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1230 ac_cpp='$CPP $CPPFLAGS'
1231 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1232 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1233 cross_compiling=$ac_cv_prog_cc_cross
1234
1235 cat > conftest.$ac_ext << EOF
1236
1237 #line 1238 "configure"
1238 #include "confdefs.h"
1239
1240 main(){return(0);}
1241 EOF
1242 if { (eval echo configure:1243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1243 ac_cv_prog_cc_works=yes
1244 # If we can't run a trivial program, we are probably using a cross compiler.
1245 if (./conftest; exit) 2>/dev/null; then
1246 ac_cv_prog_cc_cross=no
1247 else
1248 ac_cv_prog_cc_cross=yes
1249 fi
1250 else
1251 echo "configure: failed program was:" >&5
1252 cat conftest.$ac_ext >&5
1253 ac_cv_prog_cc_works=no
1254 fi
1255 rm -fr conftest*
1256 ac_ext=c
1257 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1258 ac_cpp='$CPP $CPPFLAGS'
1259 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1260 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1261 cross_compiling=$ac_cv_prog_cc_cross
1262
1263 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1264 if test $ac_cv_prog_cc_works = no; then
1265 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1266 fi
1267 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1268 echo "configure:1269: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1269 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1270 cross_compiling=$ac_cv_prog_cc_cross
1271
1272 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1273 echo "configure:1274: checking whether we are using GNU C" >&5
1274 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1275 echo $ac_n "(cached) $ac_c" 1>&6
1276 else
1277 cat > conftest.c <<EOF
1278 #ifdef __GNUC__
1279 yes;
1280 #endif
1281 EOF
1282 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1283 ac_cv_prog_gcc=yes
1284 else
1285 ac_cv_prog_gcc=no
1286 fi
1287 fi
1288
1289 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1290
1291 if test $ac_cv_prog_gcc = yes; then
1292 GCC=yes
1293 else
1294 GCC=
1295 fi
1296
1297 ac_test_CFLAGS="${CFLAGS+set}"
1298 ac_save_CFLAGS="$CFLAGS"
1299 CFLAGS=
1300 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1301 echo "configure:1302: checking whether ${CC-cc} accepts -g" >&5
1302 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1303 echo $ac_n "(cached) $ac_c" 1>&6
1304 else
1305 echo 'void f(){}' > conftest.c
1306 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1307 ac_cv_prog_cc_g=yes
1308 else
1309 ac_cv_prog_cc_g=no
1310 fi
1311 rm -f conftest*
1312
1313 fi
1314
1315 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1316 if test "$ac_test_CFLAGS" = set; then
1317 CFLAGS="$ac_save_CFLAGS"
1318 elif test $ac_cv_prog_cc_g = yes; then
1319 if test "$GCC" = yes; then
1320 CFLAGS="-g -O2"
1321 else
1322 CFLAGS="-g"
1323 fi
1324 else
1325 if test "$GCC" = yes; then
1326 CFLAGS="-O2"
1327 else
1328 CFLAGS=
1329 fi
1330 fi
1331
1332
1333 if test "$asc_ansi_ok" = no ; then
1334 CC=$asc_orig_cc
1335 { echo "configure: error: Cannot find an ANSI C compiler. ASCEND will not build
1336 without an ANSI compiler. If you have an ANSI compiler which
1337 configure is not finding, set the CC environment variable to
1338 the full path fo the compiler and rerun configure." 1>&2; exit 1; }
1339 fi
1340
1341
1342 #--------------------------------------------------------------------
1343 # Do other misc checks with CC and CFLAGS.
1344 #
1345 # Determine how to run the C preprocessor.
1346 #
1347 # If the user specifies --enable-optimization, remove `-g'
1348 # from CFLAGS, add `-O' to CFLAGS, and define `NDEBUG'. If
1349 # we are not building optimized, check for special libraries
1350 # needed for building a debugging binary (currenly only
1351 # /usr/lib/end.o under HPUX).
1352 #
1353 # Check if we're running on AIX; if so, add `-D_ALL_SOURCE'
1354 # to CFLAGS.
1355 #
1356 # Check if we're running on HPUX; if so, add -D_HPUX_SOURCE'
1357 # to CFLAGS unless the C preprocessor goes it for us.
1358 #--------------------------------------------------------------------
1359
1360 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1361 echo "configure:1362: checking how to run the C preprocessor" >&5
1362 # On Suns, sometimes $CPP names a directory.
1363 if test -n "$CPP" && test -d "$CPP"; then
1364 CPP=
1365 fi
1366 if test -z "$CPP"; then
1367 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1368 echo $ac_n "(cached) $ac_c" 1>&6
1369 else
1370 # This must be in double quotes, not single quotes, because CPP may get
1371 # substituted into the Makefile and "${CC-cc}" will confuse make.
1372 CPP="${CC-cc} -E"
1373 # On the NeXT, cc -E runs the code through the compiler's parser,
1374 # not just through cpp.
1375 cat > conftest.$ac_ext <<EOF
1376 #line 1377 "configure"
1377 #include "confdefs.h"
1378 #include <assert.h>
1379 Syntax Error
1380 EOF
1381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1382 { (eval echo configure:1383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1384 if test -z "$ac_err"; then
1385 :
1386 else
1387 echo "$ac_err" >&5
1388 echo "configure: failed program was:" >&5
1389 cat conftest.$ac_ext >&5
1390 rm -rf conftest*
1391 CPP="${CC-cc} -E -traditional-cpp"
1392 cat > conftest.$ac_ext <<EOF
1393 #line 1394 "configure"
1394 #include "confdefs.h"
1395 #include <assert.h>
1396 Syntax Error
1397 EOF
1398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1399 { (eval echo configure:1400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1401 if test -z "$ac_err"; then
1402 :
1403 else
1404 echo "$ac_err" >&5
1405 echo "configure: failed program was:" >&5
1406 cat conftest.$ac_ext >&5
1407 rm -rf conftest*
1408 CPP="${CC-cc} -nologo -E"
1409 cat > conftest.$ac_ext <<EOF
1410 #line 1411 "configure"
1411 #include "confdefs.h"
1412 #include <assert.h>
1413 Syntax Error
1414 EOF
1415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1416 { (eval echo configure:1417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1418 if test -z "$ac_err"; then
1419 :
1420 else
1421 echo "$ac_err" >&5
1422 echo "configure: failed program was:" >&5
1423 cat conftest.$ac_ext >&5
1424 rm -rf conftest*
1425 CPP=/lib/cpp
1426 fi
1427 rm -f conftest*
1428 fi
1429 rm -f conftest*
1430 fi
1431 rm -f conftest*
1432 ac_cv_prog_CPP="$CPP"
1433 fi
1434 CPP="$ac_cv_prog_CPP"
1435 else
1436 ac_cv_prog_CPP="$CPP"
1437 fi
1438 echo "$ac_t""$CPP" 1>&6
1439
1440
1441 # Check whether --enable-optimization or --disable-optimization was given.
1442 if test "${enable_optimization+set}" = set; then
1443 enableval="$enable_optimization"
1444 asc_do_opt="$enableval"
1445 else
1446 asc_do_opt=no
1447 fi
1448
1449 if test "$asc_do_opt" = yes; then
1450 CFLAGS=`echo "-O $CFLAGS " | sed 's/ -g / /g'`
1451 cat >> confdefs.h <<\EOF
1452 #define NDEBUG 1
1453 EOF
1454
1455 else
1456 # Extract the first word of "end.o", so it can be a program name with args.
1457 set dummy end.o; ac_word=$2
1458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1459 echo "configure:1460: checking for $ac_word" >&5
1460 if eval "test \"`echo '$''{'ac_cv_path_DEBUG_LIBS'+set}'`\" = set"; then
1461 echo $ac_n "(cached) $ac_c" 1>&6
1462 else
1463 case "$DEBUG_LIBS" in
1464 /*)
1465 ac_cv_path_DEBUG_LIBS="$DEBUG_LIBS" # Let the user override the test with a path.
1466 ;;
1467 ?:/*)
1468 ac_cv_path_DEBUG_LIBS="$DEBUG_LIBS" # Let the user override the test with a dos path.
1469 ;;
1470 *)
1471 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1472 ac_dummy="/usr/lib"
1473 for ac_dir in $ac_dummy; do
1474 test -z "$ac_dir" && ac_dir=.
1475 if test -f $ac_dir/$ac_word; then
1476 ac_cv_path_DEBUG_LIBS="$ac_dir/$ac_word"
1477 break
1478 fi
1479 done
1480 IFS="$ac_save_ifs"
1481 ;;
1482 esac
1483 fi
1484 DEBUG_LIBS="$ac_cv_path_DEBUG_LIBS"
1485 if test -n "$DEBUG_LIBS"; then
1486 echo "$ac_t""$DEBUG_LIBS" 1>&6
1487 else
1488 echo "$ac_t""no" 1>&6
1489 fi
1490
1491 fi
1492
1493 echo $ac_n "checking for AIX""... $ac_c" 1>&6
1494 echo "configure:1495: checking for AIX" >&5
1495 cat > conftest.$ac_ext <<EOF
1496 #line 1497 "configure"
1497 #include "confdefs.h"
1498
1499 #ifdef _AIX
1500 yes
1501 #endif
1502
1503 EOF
1504 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1505 egrep "yes" >/dev/null 2>&1; then
1506 rm -rf conftest*
1507 asc_aix=yes ; cat >> confdefs.h <<\EOF
1508 #define _ALL_SOURCE 1
1509 EOF
1510
1511 else
1512 rm -rf conftest*
1513 asc_aix=no
1514 fi
1515 rm -f conftest*
1516
1517 echo "$ac_t""$asc_aix" 1>&6
1518
1519 echo $ac_n "checking whether -D_HPUX_SOURCE is needed""... $ac_c" 1>&6
1520 echo "configure:1521: checking whether -D_HPUX_SOURCE is needed" >&5
1521 cat > conftest.$ac_ext <<EOF
1522 #line 1523 "configure"
1523 #include "confdefs.h"
1524
1525 #ifdef __hpux
1526 #ifndef _HPUX_SOURCE
1527 yes
1528 #endif
1529 #endif
1530
1531 EOF
1532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1533 egrep "yes" >/dev/null 2>&1; then
1534 rm -rf conftest*
1535 asc_hpux=yes ; cat >> confdefs.h <<\EOF
1536 #define _HPUX_SOURCE 1
1537 EOF
1538
1539 else
1540 rm -rf conftest*
1541 asc_hpux=no
1542 fi
1543 rm -f conftest*
1544
1545 echo "$ac_t""$asc_hpux" 1>&6
1546
1547 # Check the size of pointers; if cross compiling, assume 32 bit pointers
1548 echo $ac_n "checking size of void *""... $ac_c" 1>&6
1549 echo "configure:1550: checking size of void *" >&5
1550 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
1551 echo $ac_n "(cached) $ac_c" 1>&6
1552 else
1553 if test "$cross_compiling" = yes; then
1554 ac_cv_sizeof_void_p=4
1555 else
1556 cat > conftest.$ac_ext <<EOF
1557 #line 1558 "configure"
1558 #include "confdefs.h"
1559 #include <stdio.h>
1560 int main()
1561 {
1562 FILE *f=fopen("conftestval", "w");
1563 if (!f) return(1);
1564 fprintf(f, "%d\n", sizeof(void *));
1565 return(0);
1566 }
1567 EOF
1568 if { (eval echo configure:1569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1569 then
1570 ac_cv_sizeof_void_p=`cat conftestval`
1571 else
1572 echo "configure: failed program was:" >&5
1573 cat conftest.$ac_ext >&5
1574 rm -fr conftest*
1575 ac_cv_sizeof_void_p=0
1576 fi
1577 rm -fr conftest*
1578 fi
1579
1580 fi
1581 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
1582 cat >> confdefs.h <<EOF
1583 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
1584 EOF
1585
1586
1587
1588
1589 #--------------------------------------------------------------------
1590 # Set YACC.
1591 # See if we can find `yacc' ourselves; if not, call the
1592 # autoconf macro which looks for `bison' and then for `yacc'
1593 #--------------------------------------------------------------------
1594 asc_found_yacc=0
1595 # Extract the first word of "yacc", so it can be a program name with args.
1596 set dummy yacc; ac_word=$2
1597 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1598 echo "configure:1599: checking for $ac_word" >&5
1599 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1600 echo $ac_n "(cached) $ac_c" 1>&6
1601 else
1602 if test -n "$YACC"; then
1603 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1604 else
1605 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1606 ac_dummy="$PATH"
1607 for ac_dir in $ac_dummy; do
1608 test -z "$ac_dir" && ac_dir=.
1609 if test -f $ac_dir/$ac_word; then
1610 ac_cv_prog_YACC="yacc"
1611 break
1612 fi
1613 done
1614 IFS="$ac_save_ifs"
1615 test -z "$ac_cv_prog_YACC" && ac_cv_prog_YACC="asc_found_yacc=no"
1616 fi
1617 fi
1618 YACC="$ac_cv_prog_YACC"
1619 if test -n "$YACC"; then
1620 echo "$ac_t""$YACC" 1>&6
1621 else
1622 echo "$ac_t""no" 1>&6
1623 fi
1624
1625 if test "$asc_found_yacc" = no ; then
1626 for ac_prog in 'bison -y' byacc
1627 do
1628 # Extract the first word of "$ac_prog", so it can be a program name with args.
1629 set dummy $ac_prog; ac_word=$2
1630 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1631 echo "configure:1632: checking for $ac_word" >&5
1632 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1633 echo $ac_n "(cached) $ac_c" 1>&6
1634 else
1635 if test -n "$YACC"; then
1636 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1637 else
1638 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1639 ac_dummy="$PATH"
1640 for ac_dir in $ac_dummy; do
1641 test -z "$ac_dir" && ac_dir=.
1642 if test -f $ac_dir/$ac_word; then
1643 ac_cv_prog_YACC="$ac_prog"
1644 break
1645 fi
1646 done
1647 IFS="$ac_save_ifs"
1648 fi
1649 fi
1650 YACC="$ac_cv_prog_YACC"
1651 if test -n "$YACC"; then
1652 echo "$ac_t""$YACC" 1>&6
1653 else
1654 echo "$ac_t""no" 1>&6
1655 fi
1656
1657 test -n "$YACC" && break
1658 done
1659 test -n "$YACC" || YACC="yacc"
1660
1661 fi
1662
1663
1664 #--------------------------------------------------------------------
1665 # Set LEX.
1666 # ASCEND requires a `flex' which understands -P (allows you to
1667 # specify a prefix other than `yy'). The -P flag was added at
1668 # the same time a -V (version) flag was added (version 2.4.1),
1669 # so if `flex' understands -V, it'll understand -P (checking
1670 # for -P directly requires a flex input file).
1671 #
1672 # 1. If `LEX' is not set, look for `flex' and set `LEX' to
1673 # `flex' if found.
1674 # 2. If `flex' was found, see if it understands -V. If so,
1675 # set `scanner_src' and `typer_src' to have `flex' generate
1676 # the C files from the flex input files
1677 # ascend4/compiler/scanner.l & ascend4/interface/typelex.l
1678 # We don't need to look for libfl.a since we define
1679 # yywrap() ourselves.
1680 # 3. If `flex' wasn't found or was found but isn't new enough:
1681 # a. Print a warning message
1682 # b. Set `scanner_src' and `typer_src' to use pre-generated
1683 # C files for the flex files mentioned in (2).
1684 # c. Set `LEX' to `lex'
1685 # d. Search for the lex library `libl.a' and set LEXLIB to
1686 # its location.
1687 #--------------------------------------------------------------------
1688 # Extract the first word of "flex", so it can be a program name with args.
1689 set dummy flex; 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_LEX'+set}'`\" = set"; then
1693 echo $ac_n "(cached) $ac_c" 1>&6
1694 else
1695 if test -n "$LEX"; then
1696 ac_cv_prog_LEX="$LEX" # 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_LEX="flex"
1704 break
1705 fi
1706 done
1707 IFS="$ac_save_ifs"
1708 fi
1709 fi
1710 LEX="$ac_cv_prog_LEX"
1711 if test -n "$LEX"; then
1712 echo "$ac_t""$LEX" 1>&6
1713 else
1714 echo "$ac_t""no" 1>&6
1715 fi
1716
1717
1718 if test -n "$LEX" ; then
1719 echo $ac_n "checking whether $LEX is at least version 2.4.1""... $ac_c" 1>&6
1720 echo "configure:1721: checking whether $LEX is at least version 2.4.1" >&5
1721 echo "$LEX -V" 1>&5
1722 if $LEX -V 1>&5 2>&5 ; then
1723 echo "$ac_t""yes" 1>&6
1724 scanner_src="scanner.c.from.flex"
1725 typer_src="typelex.c.from.flex"
1726 else
1727 echo "$ac_t""no" 1>&6
1728 LEX=''
1729 fi
1730 fi
1731
1732 if test -z "$LEX" ; then
1733 echo "configure: warning: Cannot find a flex lexer version 2.4.1 or greater.
1734 Using pregenerated C files for ascend4/compiler/scanner.l
1735 and ascend4/interface/typelex.l. If you have flex 2.4.1
1736 or newer, set the LEX environment variable to its location
1737 and run configure again." 1>&2
1738 scanner_src="scanner.c.from.c"
1739 typer_src="typelex.c.from.c"
1740
1741 # let configure set LEX and LEXLIB even though we won't be using them
1742 # Extract the first word of "flex", so it can be a program name with args.
1743 set dummy flex; ac_word=$2
1744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1745 echo "configure:1746: checking for $ac_word" >&5
1746 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1747 echo $ac_n "(cached) $ac_c" 1>&6
1748 else
1749 if test -n "$LEX"; then
1750 ac_cv_prog_LEX="$LEX" # Let the user override the test.
1751 else
1752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1753 ac_dummy="$PATH"
1754 for ac_dir in $ac_dummy; do
1755 test -z "$ac_dir" && ac_dir=.
1756 if test -f $ac_dir/$ac_word; then
1757 ac_cv_prog_LEX="flex"
1758 break
1759 fi
1760 done
1761 IFS="$ac_save_ifs"
1762 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1763 fi
1764 fi
1765 LEX="$ac_cv_prog_LEX"
1766 if test -n "$LEX"; then
1767 echo "$ac_t""$LEX" 1>&6
1768 else
1769 echo "$ac_t""no" 1>&6
1770 fi
1771
1772 if test -z "$LEXLIB"
1773 then
1774 case "$LEX" in
1775 flex*) ac_lib=fl ;;
1776 *) ac_lib=l ;;
1777 esac
1778 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1779 echo "configure:1780: checking for yywrap in -l$ac_lib" >&5
1780 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1781 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1782 echo $ac_n "(cached) $ac_c" 1>&6
1783 else
1784 ac_save_LIBS="$LIBS"
1785 LIBS="-l$ac_lib $LIBS"
1786 cat > conftest.$ac_ext <<EOF
1787 #line 1788 "configure"
1788 #include "confdefs.h"
1789 /* Override any gcc2 internal prototype to avoid an error. */
1790 /* We use char because int might match the return type of a gcc2
1791 builtin and then its argument prototype would still apply. */
1792 char yywrap();
1793
1794 int main() {
1795 yywrap()
1796 ; return 0; }
1797 EOF
1798 if { (eval echo configure:1799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1799 rm -rf conftest*
1800 eval "ac_cv_lib_$ac_lib_var=yes"
1801 else
1802 echo "configure: failed program was:" >&5
1803 cat conftest.$ac_ext >&5
1804 rm -rf conftest*
1805 eval "ac_cv_lib_$ac_lib_var=no"
1806 fi
1807 rm -f conftest*
1808 LIBS="$ac_save_LIBS"
1809
1810 fi
1811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1812 echo "$ac_t""yes" 1>&6
1813 LEXLIB="-l$ac_lib"
1814 else
1815 echo "$ac_t""no" 1>&6
1816 fi
1817
1818 fi
1819
1820 fi
1821
1822
1823 #--------------------------------------------------------------------
1824 # Math libraries.
1825 # On a few very rare systems, all of the libm.a stuff is
1826 # already in libc.a. Set compiler flags accordingly.
1827 # Also, Linux requires the "ieee" library for math to work
1828 # right (and it must appear before "-lm").
1829 #
1830 # When building on HPUX with GCC, GCC cannot find `copysign'
1831 # because it lives in an odd place; see if we need to add
1832 # this odd place to MATH_LIBS.
1833 #
1834 # See if erf(), the error function, exists; if so, define
1835 # HAVE_ERF.
1836 #--------------------------------------------------------------------
1837 echo $ac_n "checking for sin""... $ac_c" 1>&6
1838 echo "configure:1839: checking for sin" >&5
1839 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
1840 echo $ac_n "(cached) $ac_c" 1>&6
1841 else
1842 cat > conftest.$ac_ext <<EOF
1843 #line 1844 "configure"
1844 #include "confdefs.h"
1845 /* System header to define __stub macros and hopefully few prototypes,
1846 which can conflict with char sin(); below. */
1847 #include <assert.h>
1848 /* Override any gcc2 internal prototype to avoid an error. */
1849 /* We use char because int might match the return type of a gcc2
1850 builtin and then its argument prototype would still apply. */
1851 char sin();
1852
1853 int main() {
1854
1855 /* The GNU C library defines this for functions which it implements
1856 to always fail with ENOSYS. Some functions are actually named
1857 something starting with __ and the normal name is an alias. */
1858 #if defined (__stub_sin) || defined (__stub___sin)
1859 choke me
1860 #else
1861 sin();
1862 #endif
1863
1864 ; return 0; }
1865 EOF
1866 if { (eval echo configure:1867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1867 rm -rf conftest*
1868 eval "ac_cv_func_sin=yes"
1869 else
1870 echo "configure: failed program was:" >&5
1871 cat conftest.$ac_ext >&5
1872 rm -rf conftest*
1873 eval "ac_cv_func_sin=no"
1874 fi
1875 rm -f conftest*
1876 fi
1877
1878 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
1879 echo "$ac_t""yes" 1>&6
1880 MATH_LIBS=""
1881 else
1882 echo "$ac_t""no" 1>&6
1883 MATH_LIBS="-lm"
1884 fi
1885
1886
1887 echo $ac_n "checking for printf in -lieee""... $ac_c" 1>&6
1888 echo "configure:1889: checking for printf in -lieee" >&5
1889 ac_lib_var=`echo ieee'_'printf | sed 'y%./+-%__p_%'`
1890 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1891 echo $ac_n "(cached) $ac_c" 1>&6
1892 else
1893 ac_save_LIBS="$LIBS"
1894 LIBS="-lieee $LIBS"
1895 cat > conftest.$ac_ext <<EOF
1896 #line 1897 "configure"
1897 #include "confdefs.h"
1898 /* Override any gcc2 internal prototype to avoid an error. */
1899 /* We use char because int might match the return type of a gcc2
1900 builtin and then its argument prototype would still apply. */
1901 char printf();
1902
1903 int main() {
1904 printf()
1905 ; return 0; }
1906 EOF
1907 if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1908 rm -rf conftest*
1909 eval "ac_cv_lib_$ac_lib_var=yes"
1910 else
1911 echo "configure: failed program was:" >&5
1912 cat conftest.$ac_ext >&5
1913 rm -rf conftest*
1914 eval "ac_cv_lib_$ac_lib_var=no"
1915 fi
1916 rm -f conftest*
1917 LIBS="$ac_save_LIBS"
1918
1919 fi
1920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1921 echo "$ac_t""yes" 1>&6
1922 MATH_LIBS="-lieee $MATH_LIBS"
1923 else
1924 echo "$ac_t""no" 1>&6
1925 fi
1926
1927
1928 if test -n "$MATH_LIBS" ; then
1929 echo $ac_n "checking for copysign in -lm""... $ac_c" 1>&6
1930 echo "configure:1931: checking for copysign in -lm" >&5
1931 ac_lib_var=`echo m'_'copysign | sed 'y%./+-%__p_%'`
1932 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1933 echo $ac_n "(cached) $ac_c" 1>&6
1934 else
1935 ac_save_LIBS="$LIBS"
1936 LIBS="-lm $MATH_LIBS $LIBS"
1937 cat > conftest.$ac_ext <<EOF
1938 #line 1939 "configure"
1939 #include "confdefs.h"
1940 /* Override any gcc2 internal prototype to avoid an error. */
1941 /* We use char because int might match the return type of a gcc2
1942 builtin and then its argument prototype would still apply. */
1943 char copysign();
1944
1945 int main() {
1946 copysign()
1947 ; return 0; }
1948 EOF
1949 if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1950 rm -rf conftest*
1951 eval "ac_cv_lib_$ac_lib_var=yes"
1952 else
1953 echo "configure: failed program was:" >&5
1954 cat conftest.$ac_ext >&5
1955 rm -rf conftest*
1956 eval "ac_cv_lib_$ac_lib_var=no"
1957 fi
1958 rm -f conftest*
1959 LIBS="$ac_save_LIBS"
1960
1961 fi
1962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1963 echo "$ac_t""yes" 1>&6
1964 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1965 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1966 cat >> confdefs.h <<EOF
1967 #define $ac_tr_lib 1
1968 EOF
1969
1970 LIBS="-lm $LIBS"
1971
1972 else
1973 echo "$ac_t""no" 1>&6
1974 echo $ac_n "checking for drem in -lm""... $ac_c" 1>&6
1975 echo "configure:1976: checking for drem in -lm" >&5
1976 ac_lib_var=`echo m'_'drem | sed 'y%./+-%__p_%'`
1977 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1978 echo $ac_n "(cached) $ac_c" 1>&6
1979 else
1980 ac_save_LIBS="$LIBS"
1981 LIBS="-lm /lib/pa1.1/libM.a
1982 $LIBS"
1983 cat > conftest.$ac_ext <<EOF
1984 #line 1985 "configure"
1985 #include "confdefs.h"
1986 /* Override any gcc2 internal prototype to avoid an error. */
1987 /* We use char because int might match the return type of a gcc2
1988 builtin and then its argument prototype would still apply. */
1989 char drem();
1990
1991 int main() {
1992 drem()
1993 ; return 0; }
1994 EOF
1995 if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1996 rm -rf conftest*
1997 eval "ac_cv_lib_$ac_lib_var=yes"
1998 else
1999 echo "configure: failed program was:" >&5
2000 cat conftest.$ac_ext >&5
2001 rm -rf conftest*
2002 eval "ac_cv_lib_$ac_lib_var=no"
2003 fi
2004 rm -f conftest*
2005 LIBS="$ac_save_LIBS"
2006
2007 fi
2008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2009 echo "$ac_t""yes" 1>&6
2010 MATH_LIBS="$MATH_LIBS /lib/pa1.1/libM.a"
2011
2012 else
2013 echo "$ac_t""no" 1>&6
2014 fi
2015
2016 fi
2017
2018 fi
2019
2020 # store the current list of libraries, add the math libraries to LIBS,
2021 # check for erf(), then reset the value of LIBS.
2022 asc_keep_LIBS="$LIBS"
2023 LIBS="$LIBS $MATH_LIBS"
2024 for ac_func in erf
2025 do
2026 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2027 echo "configure:2028: checking for $ac_func" >&5
2028 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2029 echo $ac_n "(cached) $ac_c" 1>&6
2030 else
2031 cat > conftest.$ac_ext <<EOF
2032 #line 2033 "configure"
2033 #include "confdefs.h"
2034 /* System header to define __stub macros and hopefully few prototypes,
2035 which can conflict with char $ac_func(); below. */
2036 #include <assert.h>
2037 /* Override any gcc2 internal prototype to avoid an error. */
2038 /* We use char because int might match the return type of a gcc2
2039 builtin and then its argument prototype would still apply. */
2040 char $ac_func();
2041
2042 int main() {
2043
2044 /* The GNU C library defines this for functions which it implements
2045 to always fail with ENOSYS. Some functions are actually named
2046 something starting with __ and the normal name is an alias. */
2047 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2048 choke me
2049 #else
2050 $ac_func();
2051 #endif
2052
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_func_$ac_func=yes"
2058 else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -rf conftest*
2062 eval "ac_cv_func_$ac_func=no"
2063 fi
2064 rm -f conftest*
2065 fi
2066
2067 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2068 echo "$ac_t""yes" 1>&6
2069 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2070 cat >> confdefs.h <<EOF
2071 #define $ac_tr_func 1
2072 EOF
2073
2074 else
2075 echo "$ac_t""no" 1>&6
2076 fi
2077 done
2078
2079 LIBS="$asc_keep_LIBS"
2080
2081
2082 #--------------------------------------------------------------------
2083 # Check for X11.
2084 # We'll use the simple autoconf builtin macro for finding
2085 # X11 until we find a reason not to.
2086 #
2087 # On Solaris and IRIX, add the path to the X library to the
2088 # run-time shared-library-search-path so the ASCEND binary
2089 # can find the X library without the user having to set
2090 # LD_LIBRARY_PATH
2091 #--------------------------------------------------------------------
2092 # If we find X, set shell vars x_includes and x_libraries to the
2093 # paths, otherwise set no_x=yes.
2094 # Uses ac_ vars as temps to allow command line to override cache and checks.
2095 # --without-x overrides everything else, but does not touch the cache.
2096 echo $ac_n "checking for X""... $ac_c" 1>&6
2097 echo "configure:2098: checking for X" >&5
2098
2099 # Check whether --with-x or --without-x was given.
2100 if test "${with_x+set}" = set; then
2101 withval="$with_x"
2102 :
2103 fi
2104
2105 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2106 if test "x$with_x" = xno; then
2107 # The user explicitly disabled X.
2108 have_x=disabled
2109 else
2110 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2111 # Both variables are already set.
2112 have_x=yes
2113 else
2114 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2115 echo $ac_n "(cached) $ac_c" 1>&6
2116 else
2117 # One or both of the vars are not set, and there is no cached value.
2118 ac_x_includes=NO ac_x_libraries=NO
2119 rm -fr conftestdir
2120 if mkdir conftestdir; then
2121 cd conftestdir
2122 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2123 cat > Imakefile <<'EOF'
2124 acfindx:
2125 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2126 EOF
2127 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2128 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2129 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2130 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2131 for ac_extension in a so sl; do
2132 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2133 test -f $ac_im_libdir/libX11.$ac_extension; then
2134 ac_im_usrlibdir=$ac_im_libdir; break
2135 fi
2136 done
2137 # Screen out bogus values from the imake configuration. They are
2138 # bogus both because they are the default anyway, and because
2139 # using them would break gcc on systems where it needs fixed includes.
2140 case "$ac_im_incroot" in
2141 /usr/include) ;;
2142 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2143 esac
2144 case "$ac_im_usrlibdir" in
2145 /usr/lib | /lib) ;;
2146 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2147 esac
2148 fi
2149 cd ..
2150 rm -fr conftestdir
2151 fi
2152
2153 if test "$ac_x_includes" = NO; then
2154 # Guess where to find include files, by looking for this one X11 .h file.
2155 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2156
2157 # First, try using that file with no special directory specified.
2158 cat > conftest.$ac_ext <<EOF
2159 #line 2160 "configure"
2160 #include "confdefs.h"
2161 #include <$x_direct_test_include>
2162 EOF
2163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2164 { (eval echo configure:2165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2166 if test -z "$ac_err"; then
2167 rm -rf conftest*
2168 # We can compile using X headers with no special include directory.
2169 ac_x_includes=
2170 else
2171 echo "$ac_err" >&5
2172 echo "configure: failed program was:" >&5
2173 cat conftest.$ac_ext >&5
2174 rm -rf conftest*
2175 # Look for the header file in a standard set of common directories.
2176 # Check X11 before X11Rn because it is often a symlink to the current release.
2177 for ac_dir in \
2178 /usr/X11/include \
2179 /usr/X11R6/include \
2180 /usr/X11R5/include \
2181 /usr/X11R4/include \
2182 \
2183 /usr/include/X11 \
2184 /usr/include/X11R6 \
2185 /usr/include/X11R5 \
2186 /usr/include/X11R4 \
2187 \
2188 /usr/local/X11/include \
2189 /usr/local/X11R6/include \
2190 /usr/local/X11R5/include \
2191 /usr/local/X11R4/include \
2192 \
2193 /usr/local/include/X11 \
2194 /usr/local/include/X11R6 \
2195 /usr/local/include/X11R5 \
2196 /usr/local/include/X11R4 \
2197 \
2198 /usr/X386/include \
2199 /usr/x386/include \
2200 /usr/XFree86/include/X11 \
2201 \
2202 /usr/include \
2203 /usr/local/include \
2204 /usr/unsupported/include \
2205 /usr/athena/include \
2206 /usr/local/x11r5/include \
2207 /usr/lpp/Xamples/include \
2208 \
2209 /usr/openwin/include \
2210 /usr/openwin/share/include \
2211 ; \
2212 do
2213 if test -r "$ac_dir/$x_direct_test_include"; then
2214 ac_x_includes=$ac_dir
2215 break
2216 fi
2217 done
2218 fi
2219 rm -f conftest*
2220 fi # $ac_x_includes = NO
2221
2222 if test "$ac_x_libraries" = NO; then
2223 # Check for the libraries.
2224
2225 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2226 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2227
2228 # See if we find them without any special options.
2229 # Don't add to $LIBS permanently.
2230 ac_save_LIBS="$LIBS"
2231 LIBS="-l$x_direct_test_library $LIBS"
2232 cat > conftest.$ac_ext <<EOF
2233 #line 2234 "configure"
2234 #include "confdefs.h"
2235
2236 int main() {
2237 ${x_direct_test_function}()
2238 ; return 0; }
2239 EOF
2240 if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2241 rm -rf conftest*
2242 LIBS="$ac_save_LIBS"
2243 # We can link X programs with no special library path.
2244 ac_x_libraries=
2245 else
2246 echo "configure: failed program was:" >&5
2247 cat conftest.$ac_ext >&5
2248 rm -rf conftest*
2249 LIBS="$ac_save_LIBS"
2250 # First see if replacing the include by lib works.
2251 # Check X11 before X11Rn because it is often a symlink to the current release.
2252 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2253 /usr/X11/lib \
2254 /usr/X11R6/lib \
2255 /usr/X11R5/lib \
2256 /usr/X11R4/lib \
2257 \
2258 /usr/lib/X11 \
2259 /usr/lib/X11R6 \
2260 /usr/lib/X11R5 \
2261 /usr/lib/X11R4 \
2262 \
2263 /usr/local/X11/lib \
2264 /usr/local/X11R6/lib \
2265 /usr/local/X11R5/lib \
2266 /usr/local/X11R4/lib \
2267 \
2268 /usr/local/lib/X11 \
2269 /usr/local/lib/X11R6 \
2270 /usr/local/lib/X11R5 \
2271 /usr/local/lib/X11R4 \
2272 \
2273 /usr/X386/lib \
2274 /usr/x386/lib \
2275 /usr/XFree86/lib/X11 \
2276 \
2277 /usr/lib \
2278 /usr/local/lib \
2279 /usr/unsupported/lib \
2280 /usr/athena/lib \
2281 /usr/local/x11r5/lib \
2282 /usr/lpp/Xamples/lib \
2283 /lib/usr/lib/X11 \
2284 \
2285 /usr/openwin/lib \
2286 /usr/openwin/share/lib \
2287 ; \
2288 do
2289 for ac_extension in a so sl; do
2290 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2291 ac_x_libraries=$ac_dir
2292 break 2
2293 fi
2294 done
2295 done
2296 fi
2297 rm -f conftest*
2298 fi # $ac_x_libraries = NO
2299
2300 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2301 # Didn't find X anywhere. Cache the known absence of X.
2302 ac_cv_have_x="have_x=no"
2303 else
2304 # Record where we found X for the cache.
2305 ac_cv_have_x="have_x=yes \
2306 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2307 fi
2308 fi
2309 fi
2310 eval "$ac_cv_have_x"
2311 fi # $with_x != no
2312
2313 if test "$have_x" != yes; then
2314 echo "$ac_t""$have_x" 1>&6
2315 no_x=yes
2316 else
2317 # If each of the values was on the command line, it overrides each guess.
2318 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2319 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2320 # Update the cache value to reflect the command line values.
2321 ac_cv_have_x="have_x=yes \
2322 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2323 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2324 fi
2325
2326 if test -n "$x_includes"; then
2327 X11_INCLUDES="-I$x_includes"
2328 fi
2329 if test -n "$x_libraries"; then
2330 X11_LIBRARIES="-L$x_libraries"
2331 case "$host" in
2332 sparc-sun-solaris*)
2333 X11_RUN_PATH="-R$x_libraries"
2334 ;;
2335 mips-sgi-irix*)
2336 X11_RUN_PATH="-rpath $x_libraries"
2337 ;;
2338 *)
2339 X11_RUN_PATH=""
2340 ;;
2341 esac
2342 fi
2343
2344
2345 #--------------------------------------------------------------------
2346 # Check for the existence of various libraries. The order here
2347 # is important, so that then end up in the right order in the
2348 # command line generated by make. The -lsocket and -lnsl
2349 # libraries require a couple of special tricks:
2350 # 1. Use "connect" and "accept" to check for -lsocket, and
2351 # "gethostbyname" to check for -lnsl.
2352 # 2. Use each function name only once: can't redo a check
2353 # because autoconf caches the results of the last check
2354 # and won't redo it.
2355 # 3. Use -lnsl and -lsocket only if they supply procedures that
2356 # aren't already present in the normal libraries. This is
2357 # because IRIX 5.2 has libraries, but they aren't needed and
2358 # they're bogus: they goof up name resolution if used.
2359 # 4. On some SVR4 systems, can't use -lsocket without -lnsl
2360 # too. To get around this problem, check for both libraries
2361 # together if -lsocket doesn't work by itself.
2362 #--------------------------------------------------------------------
2363
2364 asc_checkBoth=0
2365 echo $ac_n "checking for connect""... $ac_c" 1>&6
2366 echo "configure:2367: checking for connect" >&5
2367 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
2368 echo $ac_n "(cached) $ac_c" 1>&6
2369 else
2370 cat > conftest.$ac_ext <<EOF
2371 #line 2372 "configure"
2372 #include "confdefs.h"
2373 /* System header to define __stub macros and hopefully few prototypes,
2374 which can conflict with char connect(); below. */
2375 #include <assert.h>
2376 /* Override any gcc2 internal prototype to avoid an error. */
2377 /* We use char because int might match the return type of a gcc2
2378 builtin and then its argument prototype would still apply. */
2379 char connect();
2380
2381 int main() {
2382
2383 /* The GNU C library defines this for functions which it implements
2384 to always fail with ENOSYS. Some functions are actually named
2385 something starting with __ and the normal name is an alias. */
2386 #if defined (__stub_connect) || defined (__stub___connect)
2387 choke me
2388 #else
2389 connect();
2390 #endif
2391
2392 ; return 0; }
2393 EOF
2394 if { (eval echo configure:2395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2395 rm -rf conftest*
2396 eval "ac_cv_func_connect=yes"
2397 else
2398 echo "configure: failed program was:" >&5
2399 cat conftest.$ac_ext >&5
2400 rm -rf conftest*
2401 eval "ac_cv_func_connect=no"
2402 fi
2403 rm -f conftest*
2404 fi
2405
2406 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
2407 echo "$ac_t""yes" 1>&6
2408 asc_checkSocket=0
2409 else
2410 echo "$ac_t""no" 1>&6
2411 asc_checkSocket=1
2412 fi
2413
2414 if test "$asc_checkSocket" = 1; then
2415 echo $ac_n "checking for printf in -lsocket""... $ac_c" 1>&6
2416 echo "configure:2417: checking for printf in -lsocket" >&5
2417 ac_lib_var=`echo socket'_'printf | sed 'y%./+-%__p_%'`
2418 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2419 echo $ac_n "(cached) $ac_c" 1>&6
2420 else
2421 ac_save_LIBS="$LIBS"
2422 LIBS="-lsocket $LIBS"
2423 cat > conftest.$ac_ext <<EOF
2424 #line 2425 "configure"
2425 #include "confdefs.h"
2426 /* Override any gcc2 internal prototype to avoid an error. */
2427 /* We use char because int might match the return type of a gcc2
2428 builtin and then its argument prototype would still apply. */
2429 char printf();
2430
2431 int main() {
2432 printf()
2433 ; return 0; }
2434 EOF
2435 if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2436 rm -rf conftest*
2437 eval "ac_cv_lib_$ac_lib_var=yes"
2438 else
2439 echo "configure: failed program was:" >&5
2440 cat conftest.$ac_ext >&5
2441 rm -rf conftest*
2442 eval "ac_cv_lib_$ac_lib_var=no"
2443 fi
2444 rm -f conftest*
2445 LIBS="$ac_save_LIBS"
2446
2447 fi
2448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2449 echo "$ac_t""yes" 1>&6
2450 X11_EXTRA_LIBS="-lsocket"
2451 else
2452 echo "$ac_t""no" 1>&6
2453 asc_checkBoth=1
2454 fi
2455
2456 fi
2457 if test "$asc_checkBoth" = 1; then
2458 asc_oldLibs=$LIBS
2459 X11_EXTRA_LIBS="-lsocket -lnsl"
2460 LIBS="$LIBS $X11_EXTRA_LIBS"
2461 echo $ac_n "checking for accept""... $ac_c" 1>&6
2462 echo "configure:2463: checking for accept" >&5
2463 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
2464 echo $ac_n "(cached) $ac_c" 1>&6
2465 else
2466 cat > conftest.$ac_ext <<EOF
2467 #line 2468 "configure"
2468 #include "confdefs.h"
2469 /* System header to define __stub macros and hopefully few prototypes,
2470 which can conflict with char accept(); below. */
2471 #include <assert.h>
2472 /* Override any gcc2 internal prototype to avoid an error. */
2473 /* We use char because int might match the return type of a gcc2
2474 builtin and then its argument prototype would still apply. */
2475 char accept();
2476
2477 int main() {
2478
2479 /* The GNU C library defines this for functions which it implements
2480 to always fail with ENOSYS. Some functions are actually named
2481 something starting with __ and the normal name is an alias. */
2482 #if defined (__stub_accept) || defined (__stub___accept)
2483 choke me
2484 #else
2485 accept();
2486 #endif
2487
2488 ; return 0; }
2489 EOF
2490 if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2491 rm -rf conftest*
2492 eval "ac_cv_func_accept=yes"
2493 else
2494 echo "configure: failed program was:" >&5
2495 cat conftest.$ac_ext >&5
2496 rm -rf conftest*
2497 eval "ac_cv_func_accept=no"
2498 fi
2499 rm -f conftest*
2500 fi
2501
2502 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
2503 echo "$ac_t""yes" 1>&6
2504 asc_checkNsl=0
2505 else
2506 echo "$ac_t""no" 1>&6
2507 X11_EXTRA_LIBS=""
2508 fi
2509
2510 LIBS=$asc_oldLibs
2511 fi
2512 asc_oldLibs=$LIBS
2513 LIBS="$LIBS $X11_EXTRA_LIBS"
2514 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2515 echo "configure:2516: checking for gethostbyname" >&5
2516 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2517 echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519 cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2522 /* System header to define __stub macros and hopefully few prototypes,
2523 which can conflict with char gethostbyname(); below. */
2524 #include <assert.h>
2525 /* Override any gcc2 internal prototype to avoid an error. */
2526 /* We use char because int might match the return type of a gcc2
2527 builtin and then its argument prototype would still apply. */
2528 char gethostbyname();
2529
2530 int main() {
2531
2532 /* The GNU C library defines this for functions which it implements
2533 to always fail with ENOSYS. Some functions are actually named
2534 something starting with __ and the normal name is an alias. */
2535 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2536 choke me
2537 #else
2538 gethostbyname();
2539 #endif
2540
2541 ; return 0; }
2542 EOF
2543 if { (eval echo configure:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2544 rm -rf conftest*
2545 eval "ac_cv_func_gethostbyname=yes"
2546 else
2547 echo "configure: failed program was:" >&5
2548 cat conftest.$ac_ext >&5
2549 rm -rf conftest*
2550 eval "ac_cv_func_gethostbyname=no"
2551 fi
2552 rm -f conftest*
2553 fi
2554
2555 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2556 echo "$ac_t""yes" 1>&6
2557 :
2558 else
2559 echo "$ac_t""no" 1>&6
2560 echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
2561 echo "configure:2562: checking for printf in -lnsl" >&5
2562 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
2563 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2564 echo $ac_n "(cached) $ac_c" 1>&6
2565 else
2566 ac_save_LIBS="$LIBS"
2567 LIBS="-lnsl $LIBS"
2568 cat > conftest.$ac_ext <<EOF
2569 #line 2570 "configure"
2570 #include "confdefs.h"
2571 /* Override any gcc2 internal prototype to avoid an error. */
2572 /* We use char because int might match the return type of a gcc2
2573 builtin and then its argument prototype would still apply. */
2574 char printf();
2575
2576 int main() {
2577 printf()
2578 ; return 0; }
2579 EOF
2580 if { (eval echo configure:2581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2581 rm -rf conftest*
2582 eval "ac_cv_lib_$ac_lib_var=yes"
2583 else
2584 echo "configure: failed program was:" >&5
2585 cat conftest.$ac_ext >&5
2586 rm -rf conftest*
2587 eval "ac_cv_lib_$ac_lib_var=no"
2588 fi
2589 rm -f conftest*
2590 LIBS="$ac_save_LIBS"
2591
2592 fi
2593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2594 echo "$ac_t""yes" 1>&6
2595 X11_EXTRA_LIBS="$X11_EXTRA_LIBS -lnsl"
2596 else
2597 echo "$ac_t""no" 1>&6
2598 fi
2599
2600 fi
2601
2602 LIBS=$asc_oldLibs
2603
2604
2605 #--------------------------------------------------------------------
2606 # The following comes directly from the configure.in file for
2607 # Tcl8.0.
2608 #
2609 # The statements below define a collection of symbols related to
2610 # dynamic loading and shared libraries:
2611 #
2612 # DL_OBJS - Name of the object file that implements dynamic
2613 # loading for ASCEND on this system.
2614 # DL_LIBS - Library file(s) to include in tclsh and other base
2615 # applications in order for the "load" command to work.
2616 # LD_FLAGS - Flags to pass to the compiler when linking object
2617 # files into an executable application binary such
2618 # as tclsh.
2619 # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
2620 # that tell the run-time dynamic linker where to look
2621 # for shared libraries such as libtcl.so. Depends on
2622 # the variable LIB_RUNTIME_DIR in the Makefile.
2623 # MAKE_LIB - Command to execute to build the ASCEND library;
2624 # differs depending on whether or not ASCEND is being
2625 # compiled as a shared library.
2626 # SHLIB_CFLAGS - Flags to pass to cc when compiling the components
2627 # of a shared library (may request position-independent
2628 # code, among other things).
2629 # SHLIB_LD - Base command to use for combining object files
2630 # into a shared library.
2631 # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
2632 # creating shared libraries. This symbol typically
2633 # goes at the end of the "ld" commands that build
2634 # shared libraries. The value of the symbol is
2635 # "${LIBS}" if all of the dependent libraries should
2636 # be specified when creating a shared library. If
2637 # dependent libraries should not be specified (as on
2638 # SunOS 4.x, where they cause the link to fail, or in
2639 # general if ASCEND and Tk aren't themselves shared
2640 # libraries), then this symbol has an empty string
2641 # as its value.
2642 # SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable
2643 # extensions. An empty string means we don't know how
2644 # to use shared libraries on this platform.
2645 # ASC_LIB_FILE - Name of the file that contains the ASCEND library, such
2646 # as libtcl7.8.so or libtcl7.8.a.
2647 # ASC_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
2648 # in the shared library name, using the $VERSION variable
2649 # to put the version in the right place. This is used
2650 # by platforms that need non-standard library names.
2651 # Examples: ${VERSION}.so.1.1 on NetBSD, since it needs
2652 # to have a version after the .so, and ${VERSION}.a
2653 # on AIX, since the ASCEND shared library needs to have
2654 # a .a extension whereas shared objects for loadable
2655 # extensions have a .so extension. Defaults to
2656 # ${VERSION}${SHLIB_SUFFIX}.
2657 #--------------------------------------------------------------------
2658
2659 # Step 1: set the variable "system" to hold the name and version number
2660 # for the system. This can usually be done via the "uname" command, but
2661 # there are a few systems, like Next, where this doesn't work.
2662
2663 # Changed this to use the "$host" variable from AC_CANONICAL_HOST
2664
2665 # Step 2: check for existence of -ldl library. This is needed because
2666 # Linux can use either -ldl or -ldld for dynamic loading.
2667
2668 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2669 echo "configure:2670: checking for dlopen in -ldl" >&5
2670 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2671 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2672 echo $ac_n "(cached) $ac_c" 1>&6
2673 else
2674 ac_save_LIBS="$LIBS"
2675 LIBS="-ldl $LIBS"
2676 cat > conftest.$ac_ext <<EOF
2677 #line 2678 "configure"
2678 #include "confdefs.h"
2679 /* Override any gcc2 internal prototype to avoid an error. */
2680 /* We use char because int might match the return type of a gcc2
2681 builtin and then its argument prototype would still apply. */
2682 char dlopen();
2683
2684 int main() {
2685 dlopen()
2686 ; return 0; }
2687 EOF
2688 if { (eval echo configure:2689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2689 rm -rf conftest*
2690 eval "ac_cv_lib_$ac_lib_var=yes"
2691 else
2692 echo "configure: failed program was:" >&5
2693 cat conftest.$ac_ext >&5
2694 rm -rf conftest*
2695 eval "ac_cv_lib_$ac_lib_var=no"
2696 fi
2697 rm -f conftest*
2698 LIBS="$ac_save_LIBS"
2699
2700 fi
2701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2702 echo "$ac_t""yes" 1>&6
2703 have_dl=yes
2704 else
2705 echo "$ac_t""no" 1>&6
2706 have_dl=no
2707 fi
2708
2709
2710 # Step 3: set configuration options based on system name and version.
2711
2712 ASC_SHARED_LIB_SUFFIX=""
2713 ASC_UNSHARED_LIB_SUFFIX=""
2714 ASC_LIB_VERSIONS_OK=ok
2715 case $host in
2716 *-aix*)
2717 SHLIB_CFLAGS=""
2718 SHLIB_LD="$fullpathsrcdir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512"
2719 SHLIB_LD_LIBS='${LIBS}'
2720 SHLIB_SUFFIX=".so"
2721 DL_OBJS=""
2722 DL_LIBS="-lld"
2723 LD_FLAGS=""
2724 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2725 ASC_SHARED_LIB_SUFFIX='${VERSION}.a'
2726 ;;
2727 *-bsdi*)
2728 SHLIB_CFLAGS=""
2729 SHLIB_LD="shlicc -r"
2730 SHLIB_LD_LIBS='${LIBS}'
2731 SHLIB_SUFFIX=".so"
2732 DL_OBJS=""
2733 DL_LIBS="-ldl"
2734 LD_FLAGS=""
2735 LD_SEARCH_FLAGS=""
2736 ;;
2737 *-dgux*)
2738 SHLIB_CFLAGS="-K PIC"
2739 SHLIB_LD="cc -G"
2740 SHLIB_LD_LIBS=""
2741 SHLIB_SUFFIX=".so"
2742 DL_OBJS=""
2743 DL_LIBS="-ldl"
2744 LD_FLAGS=""
2745 LD_SEARCH_FLAGS=""
2746 ;;
2747 *-hpux8*|*-hpux9*|*-hpux10*)
2748 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2749 echo "configure:2750: checking for shl_load in -ldld" >&5
2750 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
2751 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2752 echo $ac_n "(cached) $ac_c" 1>&6
2753 else
2754 ac_save_LIBS="$LIBS"
2755 LIBS="-ldld $LIBS"
2756 cat > conftest.$ac_ext <<EOF
2757 #line 2758 "configure"
2758 #include "confdefs.h"
2759 /* Override any gcc2 internal prototype to avoid an error. */
2760 /* We use char because int might match the return type of a gcc2
2761 builtin and then its argument prototype would still apply. */
2762 char shl_load();
2763
2764 int main() {
2765 shl_load()
2766 ; return 0; }
2767 EOF
2768 if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2769 rm -rf conftest*
2770 eval "ac_cv_lib_$ac_lib_var=yes"
2771 else
2772 echo "configure: failed program was:" >&5
2773 cat conftest.$ac_ext >&5
2774 rm -rf conftest*
2775 eval "ac_cv_lib_$ac_lib_var=no"
2776 fi
2777 rm -f conftest*
2778 LIBS="$ac_save_LIBS"
2779
2780 fi
2781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2782 echo "$ac_t""yes" 1>&6
2783 tcl_ok=yes
2784 else
2785 echo "$ac_t""no" 1>&6
2786 tcl_ok=no
2787 fi
2788
2789 if test "$tcl_ok" = yes; then
2790 SHLIB_CFLAGS="+z"
2791 SHLIB_LD="ld -b"
2792 SHLIB_LD_LIBS=""
2793 SHLIB_SUFFIX=".sl"
2794 DL_OBJS=""
2795 DL_LIBS="-ldld"
2796 LD_FLAGS="-Wl,-E"
2797 LD_SEARCH_FLAGS='-Wl,+b,${LIB_RUNTIME_DIR}:.'
2798 fi
2799 ;;
2800 *-irix4*)
2801 SHLIB_CFLAGS="-G 0"
2802 SHLIB_SUFFIX=".a"
2803 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
2804 SHLIB_LD_LIBS='${LIBS}'
2805 DL_OBJS=""
2806 DL_LIBS=""
2807 LD_FLAGS="-Wl,-D,08000000"
2808 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2809 ASC_SHARED_LIB_SUFFIX='${VERSION}.a'
2810 ;;
2811 *-irix5*|*-irix6.*)
2812 SHLIB_CFLAGS=""
2813 SHLIB_LD="ld -shared -rdata_shared"
2814 SHLIB_LD_LIBS=""
2815 SHLIB_SUFFIX=".so"
2816 DL_OBJS=""
2817 DL_LIBS=""
2818 LD_FLAGS=""
2819 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2820 ;;
2821 *-linux*)
2822 SHLIB_CFLAGS="-fPIC"
2823 SHLIB_LD_LIBS=""
2824 SHLIB_SUFFIX=".so"
2825 if test "$have_dl" = yes; then
2826 SHLIB_LD="${CC} -shared"
2827 DL_OBJS=""
2828 DL_LIBS="-ldl"
2829 LD_FLAGS="-rdynamic"
2830 LD_SEARCH_FLAGS=""
2831 else
2832 ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
2833 echo $ac_n "checking for dld.h""... $ac_c" 1>&6
2834 echo "configure:2835: checking for dld.h" >&5
2835 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2836 echo $ac_n "(cached) $ac_c" 1>&6
2837 else
2838 cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841 #include <dld.h>
2842 EOF
2843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2844 { (eval echo configure:2845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2846 if test -z "$ac_err"; then
2847 rm -rf conftest*
2848 eval "ac_cv_header_$ac_safe=yes"
2849 else
2850 echo "$ac_err" >&5
2851 echo "configure: failed program was:" >&5
2852 cat conftest.$ac_ext >&5
2853 rm -rf conftest*
2854 eval "ac_cv_header_$ac_safe=no"
2855 fi
2856 rm -f conftest*
2857 fi
2858 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2859 echo "$ac_t""yes" 1>&6
2860
2861 SHLIB_LD="ld -shared"
2862 DL_OBJS=""
2863 DL_LIBS="-ldld"
2864 LD_FLAGS=""
2865 LD_SEARCH_FLAGS=""
2866 else
2867 echo "$ac_t""no" 1>&6
2868 fi
2869
2870 fi
2871 ;;
2872 MP-RAS-02*)
2873 SHLIB_CFLAGS="-K PIC"
2874 SHLIB_LD="cc -G"
2875 SHLIB_LD_LIBS=""
2876 SHLIB_SUFFIX=".so"
2877 DL_OBJS=""
2878 DL_LIBS="-ldl"
2879 LD_FLAGS=""
2880 LD_SEARCH_FLAGS=""
2881 ;;
2882 MP-RAS-*)
2883 SHLIB_CFLAGS="-K PIC"
2884 SHLIB_LD="cc -G"
2885 SHLIB_LD_LIBS=""
2886 SHLIB_SUFFIX=".so"
2887 DL_OBJS=""
2888 DL_LIBS="-ldl"
2889 LD_FLAGS="-Wl,-Bexport"
2890 LD_SEARCH_FLAGS=""
2891 ;;
2892 *-netbsd*|*-freebsd*|*-openbsd*)
2893 # Not available on all versions: check for include file.
2894 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
2895 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
2896 echo "configure:2897: checking for dlfcn.h" >&5
2897 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2898 echo $ac_n "(cached) $ac_c" 1>&6
2899 else
2900 cat > conftest.$ac_ext <<EOF
2901 #line 2902 "configure"
2902 #include "confdefs.h"
2903 #include <dlfcn.h>
2904 EOF
2905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2906 { (eval echo configure:2907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2908 if test -z "$ac_err"; then
2909 rm -rf conftest*
2910 eval "ac_cv_header_$ac_safe=yes"
2911 else
2912 echo "$ac_err" >&5
2913 echo "configure: failed program was:" >&5
2914 cat conftest.$ac_ext >&5
2915 rm -rf conftest*
2916 eval "ac_cv_header_$ac_safe=no"
2917 fi
2918 rm -f conftest*
2919 fi
2920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2921 echo "$ac_t""yes" 1>&6
2922
2923 SHLIB_CFLAGS="-fpic"
2924 SHLIB_LD="ld -Bshareable -x"
2925 SHLIB_LD_LIBS=""
2926 SHLIB_SUFFIX=".so"
2927 DL_OBJS=""
2928 DL_LIBS=""
2929 LD_FLAGS=""
2930 LD_SEARCH_FLAGS=""
2931 ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0'
2932
2933 else
2934 echo "$ac_t""no" 1>&6
2935
2936 SHLIB_CFLAGS=""
2937 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
2938 SHLIB_LD_LIBS='${LIBS}'
2939 SHLIB_SUFFIX=".a"
2940 DL_OBJS=""
2941 DL_LIBS=""
2942 LD_FLAGS=""
2943 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2944 ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
2945
2946 fi
2947
2948
2949 # FreeBSD doesn't handle version numbers with dots.
2950
2951 ASC_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
2952 ASC_LIB_VERSIONS_OK=nodots
2953 ;;
2954 *-nextstep*)
2955 SHLIB_CFLAGS=""
2956 SHLIB_LD="cc -nostdlib -r"
2957 SHLIB_LD_LIBS=""
2958 SHLIB_SUFFIX=".so"
2959 DL_OBJS=""
2960 DL_LIBS=""
2961 LD_FLAGS=""
2962 LD_SEARCH_FLAGS=""
2963 ;;
2964 alpha-dec-osf*)
2965 # Digital OSF/1
2966 SHLIB_CFLAGS=""
2967 SHLIB_LD='ld -shared -expect_unresolved "*"'
2968 SHLIB_LD_LIBS=""
2969 SHLIB_SUFFIX=".so"
2970 DL_OBJS=""
2971 DL_LIBS=""
2972 LD_FLAGS=""
2973 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
2974 ;;
2975 *-riscos*)
2976 SHLIB_CFLAGS="-G 0"
2977 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
2978 SHLIB_LD_LIBS='${LIBS}'
2979 SHLIB_SUFFIX=".a"
2980 DL_OBJS=""
2981 DL_LIBS=""
2982 LD_FLAGS="-Wl,-D,08000000"
2983 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
2984 ;;
2985 SCO_SV-3.2*)
2986 # Note, dlopen is available only on SCO 3.2.5 and greater. However,
2987 # this test works, since "uname -s" was non-standard in 3.2.4 and
2988 # below.
2989 SHLIB_CFLAGS="-Kpic -belf"
2990 SHLIB_LD="ld -G"
2991 SHLIB_LD_LIBS=""
2992 SHLIB_SUFFIX=".so"
2993 DL_OBJS=""
2994 DL_LIBS=""
2995 LD_FLAGS="-belf -Wl,-Bexport"
2996 LD_SEARCH_FLAGS=""
2997 ;;
2998 *-sni-sysv*)
2999 SHLIB_CFLAGS="-K PIC"
3000 SHLIB_LD="cc -G"
3001 SHLIB_LD_LIBS=""
3002 SHLIB_SUFFIX=".so"
3003 DL_OBJS=""
3004 DL_LIBS="-ldl"
3005 LD_FLAGS=""
3006 LD_SEARCH_FLAGS=""
3007 ;;
3008 *-sunos4*)
3009 SHLIB_CFLAGS="-PIC"
3010 SHLIB_LD="ld"
3011 SHLIB_LD_LIBS=""
3012 SHLIB_SUFFIX=".so"
3013 DL_OBJS=""
3014 DL_LIBS="-ldl"
3015 LD_FLAGS=""
3016 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
3017
3018 # SunOS can't handle version numbers with dots in them in library
3019 # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
3020 # requires an extra version number at the end of .so file names.
3021 # So, the library has to have a name like libtcl75.so.1.0
3022
3023 ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0'
3024 ASC_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
3025 ASC_LIB_VERSIONS_OK=nodots
3026 ;;
3027 *-solaris*)
3028 SHLIB_CFLAGS="-KPIC"
3029 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
3030
3031 # Note: need the LIBS below, otherwise Tk won't find ASCEND's
3032 # symbols when dynamically loaded into tclsh.
3033
3034 SHLIB_LD_LIBS='${LIBS}'
3035 SHLIB_SUFFIX=".so"
3036 DL_OBJS=""
3037 DL_LIBS="-ldl"
3038 LD_FLAGS=""
3039 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
3040 ;;
3041 *-ultrix4*)
3042 SHLIB_CFLAGS="-G 0"
3043 SHLIB_SUFFIX=".a"
3044 SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
3045 SHLIB_LD_LIBS='${LIBS}'
3046 DL_OBJS=""
3047 DL_LIBS=""
3048 LD_FLAGS="-Wl,-D,08000000"
3049 LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
3050 ;;
3051 mips-dde-sysv*)
3052 SHLIB_CFLAGS="-KPIC"
3053 SHLIB_LD="cc -G"
3054 SHLIB_LD_LIBS=""
3055 SHLIB_SUFFIX=".so"
3056 DL_OBJS=""
3057 DL_LIBS="-ldl"
3058 # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
3059 # that don't grok the -Bexport option. Test that it does.
3060 hold_ldflags=$LDFLAGS
3061 echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
3062 echo "configure:3063: checking for ld accepts -Bexport flag" >&5
3063 LDFLAGS="${LDFLAGS} -Wl,-Bexport"
3064 cat > conftest.$ac_ext <<EOF
3065 #line 3066 "configure"
3066 #include "confdefs.h"
3067
3068 int main() {
3069 int i;
3070 ; return 0; }
3071 EOF
3072 if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3073 rm -rf conftest*
3074 found=yes
3075 else
3076 echo "configure: failed program was:" >&5
3077 cat conftest.$ac_ext >&5
3078 rm -rf conftest*
3079 found=no
3080 fi
3081 rm -f conftest*
3082 LDFLAGS=$hold_ldflags
3083 echo "$ac_t""$found" 1>&6
3084 if test "$found" = yes; then
3085 LD_FLAGS="-Wl,-Bexport"
3086 else
3087 LD_FLAGS=""
3088 fi
3089 LD_SEARCH_FLAGS=""
3090 ;;
3091 esac
3092
3093 # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
3094 # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop,
3095 # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
3096 # to determine which of several header files defines the a.out file
3097 # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we
3098 # support only a file format that is more or less version-7-compatible.
3099 # In particular,
3100 # - a.out files must begin with `struct exec'.
3101 # - the N_TXTOFF on the `struct exec' must compute the seek address
3102 # of the text segment
3103 # - The `struct exec' must contain a_magic, a_text, a_data, a_bss
3104 # and a_entry fields.
3105 # The following compilation should succeed if and only if either sys/exec.h
3106 # or a.out.h is usable for the purpose.
3107 #
3108 # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
3109 # `struct exec' includes a second header that contains information that
3110 # duplicates the v7 fields that are needed.
3111 # Step 5: disable dynamic loading if requested via a command-line switch.
3112
3113 #--------------------------------------------------------------------
3114 # TCL / TK / TK-TABLE
3115 #
3116 # The user can specify the location of the Tcl and/or Tk
3117 # libraries using the --with-tcl and --with-tk configure
3118 # options. Print a warning if the user tries to say
3119 # --without-tcl since ASCEND requires Tcl/Tk.
3120 #
3121 # If the user does not specify the location, we need to search
3122 # for either shared or static versions of the Tcl and Tk
3123 # libraries, and they must be for version 8.x of Tcl/Tk.
3124 #
3125 # Check for the static Tcl library in a list of reasonable
3126 # locations. If we find it, verify that it is from Tcl 8.0 by
3127 # looking for the symbol `TclCompileCatchCmd'. Remember, we
3128 # need the math library and the dynamic loader library (-ldl or
3129 # -ldld) to avoid undefined symbols when we test the version of
3130 # the Tcl library.
3131 #
3132 # If we can't find a static Tcl8.0 library, try to find a
3133 # dynamic one by calling AC_CHECK_LIB and looking for the
3134 # function `TclCompileCatchCmd'. If we fail, print an error
3135 # message and exit configure.
3136 #
3137 # Search for a version of tcl.h that contains `8.' in the
3138 # TCL_MAJOR_VERSION macro; we look in a list of reasonable
3139 # locations, then call AC_EGREP_HEADER to look for us.
3140 #
3141 # Repeat the process for the Tk library; the symbol we want is
3142 # `Tk_NameOfFont'; remember we need the X library---and all the
3143 # libraries it needs---as well as the Tcl library to avoid
3144 # undefined symbols when we test the version of the Tk library.
3145 #
3146 # The user can use --with-tktable to specify a location for a
3147 # static version of the Tk-Table library. If a value is
3148 # specified, assume it is good and define the cpp macro
3149 # STATIC_TABLE.
3150 #
3151 # If a value is not specified, look for libTktable.a; if we
3152 # find it, assume it works and define the cpp macro
3153 # STATIC_TABLE. If we don't find it, assume ASCEND will be
3154 # able to dynamically load it at run time and tell the user
3155 # about our assumption.
3156 #--------------------------------------------------------------------
3157 #
3158 # a list of directories to search for the Tcl/Tk libraries
3159 asc_tcl_library_dirs="
3160 /usr/local/lib/ascend/lib
3161 $prefix/lib:$exec_prefix/lib
3162 $ascpwd/tcl8.0
3163 $ascpwd/tcl8.0/unix
3164 $ascpwd/tk8.0
3165 $ascpwd/tk8.0/unix
3166 $ascpwd/ascend4/lib
3167 /lib
3168 /usr/lib
3169 /usr/local/lib
3170 /usr/contributed/lib
3171 /afs/cs/project/ascend/depot/@sys/lib
3172 "
3173 # a list of directories to search for the Tcl/Tk include files
3174 asc_tcl_include_dirs="
3175 /usr/local/lib/ascend/include
3176 $prefix/include
3177 $fullpathsrcdir/tcl8.0
3178 $fullpathsrcdir/tcl8.0/generic
3179 $fullpathsrcdir/tk8.0
3180 $fullpathsrcdir/tk8.0/generic
3181 $fullpathsrcdir/ascend4/include
3182 $ascpwd/ascend4/include
3183 /usr/include
3184 /usr/local/include
3185 /usr/contributed/include
3186 /afs/cs/project/ascend/depot/common/include
3187 "
3188 # a list of directories to search for the TkTable library
3189 asc_tk_table_dirs="
3190 /usr/local/lib/ascend/lib/Tktable
3191 $prefix/lib/Tktable
3192 $exec_prefix/lib/Tktable
3193 $ascpwd/tkTable1.80
3194 $ascpwd/ascend4/lib
3195 $ascpwd/ascend4/lib/Tktable
3196 /afs/cs/project/ascend/depot/@sys/lib/Tktable
3197 "
3198 # see if the user gave us the location of the Tcl8.0
3199 # library and/or header file
3200 #
3201 # Check whether --with-tcl or --without-tcl was given.
3202 if test "${with_tcl+set}" = set; then
3203 withval="$with_tcl"
3204 :
3205 else
3206 with_tcl=yes
3207 fi
3208
3209
3210 case "$with_tcl" in
3211 no)
3212 # User specified --without-tcl; this makes no sense,
3213 # print a warning and search for it ourselves
3214 echo "configure: warning: Bad option '--without-tcl'
3215 ASCEND must be compiled with Tcl8.0." 1>&2
3216 with_tcllib=_searching
3217 with_tclhdr=_searching
3218 ;;
3219 yes|,|"")
3220 # User didn't give the option or didn't give useful
3221 # information, search for it ourselves
3222 with_tcllib=_searching
3223 with_tclhdr=_searching
3224 ;;
3225 ,*)
3226 # Only the header was specified.
3227 with_tcllib=_searching
3228 TCL_HDR=`echo $with_tcl | sed 's/^,//'`
3229 ;;
3230 *,?*)
3231 # Both the library and the header were specified
3232 TCL_LIB=`echo $with_tcl | sed 's/,.*$//'`
3233 TCL_HDR=`echo $with_tcl | sed 's/^.*,//'`
3234 ;;
3235 *)
3236 # Only the library was specified
3237 TCL_LIB=`echo $with_tcl | sed 's/,$//'`
3238 with_tclhdr=_searching
3239 ;;
3240 esac
3241
3242 # try to find a static version of the Tcl8.0 library
3243 #
3244 if test "X$with_tcllib" = X_searching ; then
3245 for ac_prog in libtcl8.0.a libtcl80.a libtcl8.3.a
3246 do
3247 # Extract the first word of "$ac_prog", so it can be a program name with args.
3248 set dummy $ac_prog; ac_word=$2
3249 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3250 echo "configure:3251: checking for $ac_word" >&5
3251 if eval "test \"`echo '$''{'ac_cv_path_TCL_LIB'+set}'`\" = set"; then
3252 echo $ac_n "(cached) $ac_c" 1>&6
3253 else
3254 case "$TCL_LIB" in
3255 /*)
3256 ac_cv_path_TCL_LIB="$TCL_LIB" # Let the user override the test with a path.
3257 ;;
3258 ?:/*)
3259 ac_cv_path_TCL_LIB="$TCL_LIB" # Let the user override the test with a dos path.
3260 ;;
3261 *)
3262 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3263 ac_dummy="$asc_tcl_library_dirs"
3264 for ac_dir in $ac_dummy; do
3265 test -z "$ac_dir" && ac_dir=.
3266 if test -f $ac_dir/$ac_word; then
3267 ac_cv_path_TCL_LIB="$ac_dir/$ac_word"
3268 break
3269 fi
3270 done
3271 IFS="$ac_save_ifs"
3272 ;;
3273 esac
3274 fi
3275 TCL_LIB="$ac_cv_path_TCL_LIB"
3276 if test -n "$TCL_LIB"; then
3277 echo "$ac_t""$TCL_LIB" 1>&6
3278 else
3279 echo "$ac_t""no" 1>&6
3280 fi
3281
3282 test -n "$TCL_LIB" && break
3283 done
3284
3285 if test -z "$TCL_LIB" ; then
3286 TCL_LIB=_searching
3287 fi
3288 else
3289 echo "$ac_t""checking for tcl library... $TCL_LIB" 1>&6
3290 fi
3291
3292 # verify the TCL_LIB
3293 if test ! "X$TCL_LIB" = X_searching ; then
3294 echo $ac_n "checking whether $TCL_LIB is for Tcl8.3""... $ac_c" 1>&6
3295 echo "configure:3296: checking whether $TCL_LIB is for Tcl8.3" >&5
3296 asc_libs_orig=$LIBS
3297 LIBS="$TCL_LIB $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3298 cat > conftest.$ac_ext <<EOF
3299 #line 3300 "configure"
3300 #include "confdefs.h"
3301
3302 int main() {
3303 TclCompileCatchCmd()
3304 ; return 0; }
3305 EOF
3306 if { (eval echo configure:3307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3307 :
3308 else
3309 echo "configure: failed program was:" >&5
3310 cat conftest.$ac_ext >&5
3311 rm -rf conftest*
3312 TCL_LIB=_searching
3313 fi
3314 rm -f conftest*;
3315 if test "X$TCL_LIB" = X_searching ; then
3316 echo "$ac_t""no" 1>&6
3317 else
3318 echo "$ac_t""yes" 1>&6
3319 fi
3320 LIBS=$asc_libs_orig
3321 fi
3322
3323 # see if the default LPATH can find the Tcl8.0 library
3324 #
3325 if test "X$TCL_LIB" = X_searching ; then
3326 echo $ac_n "checking for TclCompileCatchCmd in -ltcl83""... $ac_c" 1>&6
3327 echo "configure:3328: checking for TclCompileCatchCmd in -ltcl83" >&5
3328 ac_lib_var=`echo tcl83'_'TclCompileCatchCmd | sed 'y%./+-%__p_%'`
3329 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3330 echo $ac_n "(cached) $ac_c" 1>&6
3331 else
3332 ac_save_LIBS="$LIBS"
3333 LIBS="-ltcl83 $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3334 cat > conftest.$ac_ext <<EOF
3335 #line 3336 "configure"
3336 #include "confdefs.h"
3337 /* Override any gcc2 internal prototype to avoid an error. */
3338 /* We use char because int might match the return type of a gcc2
3339 builtin and then its argument prototype would still apply. */
3340 char TclCompileCatchCmd();
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 rm -rf conftest*
3348 eval "ac_cv_lib_$ac_lib_var=yes"
3349 else
3350 echo "configure: failed program was:" >&5
3351 cat conftest.$ac_ext >&5
3352 rm -rf conftest*
3353 eval "ac_cv_lib_$ac_lib_var=no"
3354 fi
3355 rm -f conftest*
3356 LIBS="$ac_save_LIBS"
3357
3358 fi
3359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3360 echo "$ac_t""yes" 1>&6
3361 TCL_LIB="-ltcl83"
3362 else
3363 echo "$ac_t""no" 1>&6
3364 fi
3365
3366 fi
3367 if test "X$TCL_LIB" = X_searching ; then
3368 echo $ac_n "checking for TclCompileCatchCmd in -ltcl8.3""... $ac_c" 1>&6
3369 echo "configure:3370: checking for TclCompileCatchCmd in -ltcl8.3" >&5
3370 ac_lib_var=`echo tcl8.3'_'TclCompileCatchCmd | sed 'y%./+-%__p_%'`
3371 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3372 echo $ac_n "(cached) $ac_c" 1>&6
3373 else
3374 ac_save_LIBS="$LIBS"
3375 LIBS="-ltcl8.3 $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3376 cat > conftest.$ac_ext <<EOF
3377 #line 3378 "configure"
3378 #include "confdefs.h"
3379 /* Override any gcc2 internal prototype to avoid an error. */
3380 /* We use char because int might match the return type of a gcc2
3381 builtin and then its argument prototype would still apply. */
3382 char TclCompileCatchCmd();
3383
3384 int main() {
3385 TclCompileCatchCmd()
3386 ; return 0; }
3387 EOF
3388 if { (eval echo configure:3389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3389 rm -rf conftest*
3390 eval "ac_cv_lib_$ac_lib_var=yes"
3391 else
3392 echo "configure: failed program was:" >&5
3393 cat conftest.$ac_ext >&5
3394 rm -rf conftest*
3395 eval "ac_cv_lib_$ac_lib_var=no"
3396 fi
3397 rm -f conftest*
3398 LIBS="$ac_save_LIBS"
3399
3400 fi
3401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3402 echo "$ac_t""yes" 1>&6
3403 TCL_LIB="-ltcl8.3"
3404 else
3405 echo "$ac_t""no" 1>&6
3406 fi
3407
3408 fi
3409 if test "X$TCL_LIB" = X_searching ; then
3410 echo $ac_n "checking for TclCompileCatchCmd in -ltcl8.0""... $ac_c" 1>&6
3411 echo "configure:3412: checking for TclCompileCatchCmd in -ltcl8.0" >&5
3412 ac_lib_var=`echo tcl8.0'_'TclCompileCatchCmd | sed 'y%./+-%__p_%'`
3413 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3414 echo $ac_n "(cached) $ac_c" 1>&6
3415 else
3416 ac_save_LIBS="$LIBS"
3417 LIBS="-ltcl8.0 $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3418 cat > conftest.$ac_ext <<EOF
3419 #line 3420 "configure"
3420 #include "confdefs.h"
3421 /* Override any gcc2 internal prototype to avoid an error. */
3422 /* We use char because int might match the return type of a gcc2
3423 builtin and then its argument prototype would still apply. */
3424 char TclCompileCatchCmd();
3425
3426 int main() {
3427 TclCompileCatchCmd()
3428 ; return 0; }
3429 EOF
3430 if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3431 rm -rf conftest*
3432 eval "ac_cv_lib_$ac_lib_var=yes"
3433 else
3434 echo "configure: failed program was:" >&5
3435 cat conftest.$ac_ext >&5
3436 rm -rf conftest*
3437 eval "ac_cv_lib_$ac_lib_var=no"
3438 fi
3439 rm -f conftest*
3440 LIBS="$ac_save_LIBS"
3441
3442 fi
3443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3444 echo "$ac_t""yes" 1>&6
3445 TCL_LIB="-ltcl8.0"
3446 else
3447 echo "$ac_t""no" 1>&6
3448 fi
3449
3450 fi
3451 if test "X$TCL_LIB" = X_searching ; then
3452 echo $ac_n "checking for TclCompileCatchCmd in -ltcl80""... $ac_c" 1>&6
3453 echo "configure:3454: checking for TclCompileCatchCmd in -ltcl80" >&5
3454 ac_lib_var=`echo tcl80'_'TclCompileCatchCmd | sed 'y%./+-%__p_%'`
3455 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3456 echo $ac_n "(cached) $ac_c" 1>&6
3457 else
3458 ac_save_LIBS="$LIBS"
3459 LIBS="-ltcl80 $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3460 cat > conftest.$ac_ext <<EOF
3461 #line 3462 "configure"
3462 #include "confdefs.h"
3463 /* Override any gcc2 internal prototype to avoid an error. */
3464 /* We use char because int might match the return type of a gcc2
3465 builtin and then its argument prototype would still apply. */
3466 char TclCompileCatchCmd();
3467
3468 int main() {
3469 TclCompileCatchCmd()
3470 ; return 0; }
3471 EOF
3472 if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3473 rm -rf conftest*
3474 eval "ac_cv_lib_$ac_lib_var=yes"
3475 else
3476 echo "configure: failed program was:" >&5
3477 cat conftest.$ac_ext >&5
3478 rm -rf conftest*
3479 eval "ac_cv_lib_$ac_lib_var=no"
3480 fi
3481 rm -f conftest*
3482 LIBS="$ac_save_LIBS"
3483
3484 fi
3485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3486 echo "$ac_t""yes" 1>&6
3487 TCL_LIB="-ltcl80"
3488 else
3489 echo "$ac_t""no" 1>&6
3490 fi
3491
3492 fi
3493 if test "X$TCL_LIB" = X_searching ; then
3494 echo $ac_n "checking for TclCompileCatchCmd in -ltcl""... $ac_c" 1>&6
3495 echo "configure:3496: checking for TclCompileCatchCmd in -ltcl" >&5
3496 ac_lib_var=`echo tcl'_'TclCompileCatchCmd | sed 'y%./+-%__p_%'`
3497 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3498 echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500 ac_save_LIBS="$LIBS"
3501 LIBS="-ltcl $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3502 cat > conftest.$ac_ext <<EOF
3503 #line 3504 "configure"
3504 #include "confdefs.h"
3505 /* Override any gcc2 internal prototype to avoid an error. */
3506 /* We use char because int might match the return type of a gcc2
3507 builtin and then its argument prototype would still apply. */
3508 char TclCompileCatchCmd();
3509
3510 int main() {
3511 TclCompileCatchCmd()
3512 ; return 0; }
3513 EOF
3514 if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3515 rm -rf conftest*
3516 eval "ac_cv_lib_$ac_lib_var=yes"
3517 else
3518 echo "configure: failed program was:" >&5
3519 cat conftest.$ac_ext >&5
3520 rm -rf conftest*
3521 eval "ac_cv_lib_$ac_lib_var=no"
3522 fi
3523 rm -f conftest*
3524 LIBS="$ac_save_LIBS"
3525
3526 fi
3527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3528 echo "$ac_t""yes" 1>&6
3529 TCL_LIB="-ltcl"
3530 else
3531 echo "$ac_t""no" 1>&6
3532 fi
3533
3534 fi
3535
3536 # give up searching for the Tcl8.0 library
3537 #
3538 if test "X$TCL_LIB" = X_searching ; then
3539 { echo "configure: error: Cannot find a compatiable Tcl library.
3540 You must build and install Tcl version 8.3 before you
3541 can build ASCEND. If you have installed the correct version
3542 of Tcl, run configure again with the argument:
3543 --with-tcl=LIBRARY,HEADER
3544 where LIBRARY and HEADER are the full paths to the Tcl8.3
3545 library file and header file, respectively." 1>&2; exit 1; }
3546 fi
3547
3548 # see if the user gave us the location of the Tcl8.0 header file
3549 #
3550 if test ! "X$with_tclhdr" = X_searching ; then
3551 if test ! -f "$TCL_HDR" ; then
3552 echo "configure: warning: user specified Tcl header file, $TCL_HDR, does not exist" 1>&2
3553 with_tclhdr=_searching
3554 TCL_HDR=''
3555 fi
3556 fi
3557 if test "X$with_tclhdr" = X_searching ; then
3558 # Extract the first word of "tcl.h", so it can be a program name with args.
3559 set dummy tcl.h; ac_word=$2
3560 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3561 echo "configure:3562: checking for $ac_word" >&5
3562 if eval "test \"`echo '$''{'ac_cv_path_TCL_HDR'+set}'`\" = set"; then
3563 echo $ac_n "(cached) $ac_c" 1>&6
3564 else
3565 case "$TCL_HDR" in
3566 /*)
3567 ac_cv_path_TCL_HDR="$TCL_HDR" # Let the user override the test with a path.
3568 ;;
3569 ?:/*)
3570 ac_cv_path_TCL_HDR="$TCL_HDR" # Let the user override the test with a dos path.
3571 ;;
3572 *)
3573 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3574 ac_dummy="$asc_tcl_include_dirs"
3575 for ac_dir in $ac_dummy; do
3576 test -z "$ac_dir" && ac_dir=.
3577 if test -f $ac_dir/$ac_word; then
3578 ac_cv_path_TCL_HDR="$ac_dir/$ac_word"
3579 break
3580 fi
3581 done
3582 IFS="$ac_save_ifs"
3583 ;;
3584 esac
3585 fi
3586 TCL_HDR="$ac_cv_path_TCL_HDR"
3587 if test -n "$TCL_HDR"; then
3588 echo "$ac_t""$TCL_HDR" 1>&6
3589 else
3590 echo "$ac_t""no" 1>&6
3591 fi
3592
3593 if test -z "$TCL_HDR" ; then
3594 cat > conftest.$ac_ext <<EOF
3595 #line 3596 "configure"
3596 #include "confdefs.h"
3597 #include <tcl.h>
3598 EOF
3599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3600 egrep "TCL_MAJOR_VERSION.*8" >/dev/null 2>&1; then
3601 rm -rf conftest*
3602 TCL_HDR='tcl.h'
3603 fi
3604 rm -f conftest*
3605
3606 fi
3607 else
3608 echo "$ac_t""checking for tcl header... $TCL_HDR" 1>&6
3609 fi
3610 if test -f "$TCL_HDR" ; then
3611 echo $ac_n "checking whether $TCL_HDR is for version 8""... $ac_c" 1>&6
3612 echo "configure:3613: checking whether $TCL_HDR is for version 8" >&5
3613 echo 'grep TCL_MAJOR_VERSION "$TCL_HDR" 2>&5' 1>&5
3614 grep_tcl_h=`grep TCL_MAJOR_VERSION "$TCL_HDR" 2>&5`
3615 echo $grep_tcl_h 1>&5
3616 case "$grep_tcl_h" in
3617 *8)
3618 echo "$ac_t""yes" 1>&6
3619 ;;
3620 *)
3621 echo "$ac_t""no" 1>&6
3622 TCL_HDR=
3623 ;;
3624 esac
3625 fi
3626 if test -z "$TCL_HDR" ; then
3627 { echo "configure: error: Cannot find a compatiable Tcl header file.
3628 You must build and install Tcl version 8.3 (but not yet 8.4) before you
3629 can build ASCEND. If you have installed the correct version
3630 of Tcl, run configure again with the argument:
3631 --with-tcl=LIBRARY,HEADER
3632 where LIBRARY and HEADER are the full paths to the Tcl8.3
3633 library file and header file, respectively." 1>&2; exit 1; }
3634 fi
3635 TCL_HDR=`echo $TCL_HDR | sed 's,tcl\.h$,,'`
3636 if test -n "$TCL_HDR" ; then
3637 TCL_HDR="-I$TCL_HDR"
3638 fi
3639
3640
3641 ###### REPEAT FOR TK
3642 #
3643 # see if the user gave us the location of the Tk8.3
3644 # library and/or header file
3645 #
3646 # Check whether --with-tk or --without-tk was given.
3647 if test "${with_tk+set}" = set; then
3648 withval="$with_tk"
3649 :
3650 else
3651 with_tk=yes
3652 fi
3653
3654
3655 case "$with_tk" in
3656 no)
3657 # User specified --without-tk; this makes no sense,
3658 # print a warning and search for it ourselves
3659 echo "configure: warning: Bad option '--without-tk'
3660 ASCEND must be compiled with Tk8.0." 1>&2
3661 with_tklib=_searching
3662 with_tkhdr=_searching
3663 ;;
3664 yes|,|"")
3665 # User didn't give the option or didn't give useful
3666 # information, search for it ourselves
3667 with_tklib=_searching
3668 with_tkhdr=_searching
3669 ;;
3670 ,*)
3671 # Only the header was specified.
3672 with_tklib=_searching
3673 TK_HDR=`echo $with_tk | sed 's/^,//'`
3674 ;;
3675 *,?*)
3676 # Both the library and the header were specified
3677 TK_LIB=`echo $with_tk | sed 's/,.*$//'`
3678 TK_HDR=`echo $with_tk | sed 's/^.*,//'`
3679 ;;
3680 *)
3681 # Only the library was specified
3682 TK_LIB=`echo $with_tk | sed 's/,$//'`
3683 with_tkhdr=_searching
3684 ;;
3685 esac
3686
3687 # try to find a static version of the Tk8.0 library
3688 #
3689 if test "X$with_tklib" = X_searching ; then
3690 for ac_prog in libtk8.0.a libtk80.a libtk.a libtk8.3.a
3691 do
3692 # Extract the first word of "$ac_prog", so it can be a program name with args.
3693 set dummy $ac_prog; ac_word=$2
3694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3695 echo "configure:3696: checking for $ac_word" >&5
3696 if eval "test \"`echo '$''{'ac_cv_path_TK_LIB'+set}'`\" = set"; then
3697 echo $ac_n "(cached) $ac_c" 1>&6
3698 else
3699 case "$TK_LIB" in
3700 /*)
3701 ac_cv_path_TK_LIB="$TK_LIB" # Let the user override the test with a path.
3702 ;;
3703 ?:/*)
3704 ac_cv_path_TK_LIB="$TK_LIB" # Let the user override the test with a dos path.
3705 ;;
3706 *)
3707 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3708 ac_dummy="$asc_tcl_library_dirs"
3709 for ac_dir in $ac_dummy; do
3710 test -z "$ac_dir" && ac_dir=.
3711 if test -f $ac_dir/$ac_word; then
3712 ac_cv_path_TK_LIB="$ac_dir/$ac_word"
3713 break
3714 fi
3715 done
3716 IFS="$ac_save_ifs"
3717 ;;
3718 esac
3719 fi
3720 TK_LIB="$ac_cv_path_TK_LIB"
3721 if test -n "$TK_LIB"; then
3722 echo "$ac_t""$TK_LIB" 1>&6
3723 else
3724 echo "$ac_t""no" 1>&6
3725 fi
3726
3727 test -n "$TK_LIB" && break
3728 done
3729
3730 if test -z "TK_LIB" ; then
3731 TK_LIB=_searching
3732 fi
3733 else
3734 echo "$ac_t""checking for tk library... $TK_LIB" 1>&6
3735 fi
3736
3737 # verify the TK_LIB
3738 #
3739 if test ! "X$TK_LIB" = X_searching ; then
3740 echo $ac_n "checking whether $TK_LIB is for Tk8.0""... $ac_c" 1>&6
3741 echo "configure:3742: checking whether $TK_LIB is for Tk8.0" >&5
3742 asc_libs_orig=$LIBS
3743 LIBS="$TK_LIB $TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3744 cat > conftest.$ac_ext <<EOF
3745 #line 3746 "configure"
3746 #include "confdefs.h"
3747
3748 int main() {
3749 Tk_NameOfFont()
3750 ; return 0; }
3751 EOF
3752 if { (eval echo configure:3753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3753 :
3754 else
3755 echo "configure: failed program was:" >&5
3756 cat conftest.$ac_ext >&5
3757 rm -rf conftest*
3758 TK_LIB=_searching
3759 fi
3760 rm -f conftest*;
3761 if test "X$TK_LIB" = X_searching ; then
3762 echo "$ac_t""no" 1>&6
3763 else
3764 echo "$ac_t""yes" 1>&6
3765 fi
3766 LIBS=$asc_libs_orig
3767 fi
3768
3769 # see if the default LPATH can find the Tk8.0 library
3770 #
3771 if test "X$TK_LIB" = X_searching ; then
3772 echo "$ac_t""checking for a dynamically loaded Tk8.0 library" 1>&6
3773 echo $ac_n "checking for Tk_NameOfFont in -ltk8.0""... $ac_c" 1>&6
3774 echo "configure:3775: checking for Tk_NameOfFont in -ltk8.0" >&5
3775 ac_lib_var=`echo tk8.0'_'Tk_NameOfFont | sed 'y%./+-%__p_%'`
3776 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3777 echo $ac_n "(cached) $ac_c" 1>&6
3778 else
3779 ac_save_LIBS="$LIBS"
3780 LIBS="-ltk8.0 $TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3781 cat > conftest.$ac_ext <<EOF
3782 #line 3783 "configure"
3783 #include "confdefs.h"
3784 /* Override any gcc2 internal prototype to avoid an error. */
3785 /* We use char because int might match the return type of a gcc2
3786 builtin and then its argument prototype would still apply. */
3787 char Tk_NameOfFont();
3788
3789 int main() {
3790 Tk_NameOfFont()
3791 ; return 0; }
3792 EOF
3793 if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3794 rm -rf conftest*
3795 eval "ac_cv_lib_$ac_lib_var=yes"
3796 else
3797 echo "configure: failed program was:" >&5
3798 cat conftest.$ac_ext >&5
3799 rm -rf conftest*
3800 eval "ac_cv_lib_$ac_lib_var=no"
3801 fi
3802 rm -f conftest*
3803 LIBS="$ac_save_LIBS"
3804
3805 fi
3806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3807 echo "$ac_t""yes" 1>&6
3808 TK_LIB="-ltk8.0"
3809 else
3810 echo "$ac_t""no" 1>&6
3811 fi
3812
3813 fi
3814 if test "X$TK_LIB" = X_searching ; then
3815 echo $ac_n "checking for Tk_NameOfFont in -ltk80""... $ac_c" 1>&6
3816 echo "configure:3817: checking for Tk_NameOfFont in -ltk80" >&5
3817 ac_lib_var=`echo tk80'_'Tk_NameOfFont | sed 'y%./+-%__p_%'`
3818 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3819 echo $ac_n "(cached) $ac_c" 1>&6
3820 else
3821 ac_save_LIBS="$LIBS"
3822 LIBS="-ltk80 $TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3823 cat > conftest.$ac_ext <<EOF
3824 #line 3825 "configure"
3825 #include "confdefs.h"
3826 /* Override any gcc2 internal prototype to avoid an error. */
3827 /* We use char because int might match the return type of a gcc2
3828 builtin and then its argument prototype would still apply. */
3829 char Tk_NameOfFont();
3830
3831 int main() {
3832 Tk_NameOfFont()
3833 ; return 0; }
3834 EOF
3835 if { (eval echo configure:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3836 rm -rf conftest*
3837 eval "ac_cv_lib_$ac_lib_var=yes"
3838 else
3839 echo "configure: failed program was:" >&5
3840 cat conftest.$ac_ext >&5
3841 rm -rf conftest*
3842 eval "ac_cv_lib_$ac_lib_var=no"
3843 fi
3844 rm -f conftest*
3845 LIBS="$ac_save_LIBS"
3846
3847 fi
3848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3849 echo "$ac_t""yes" 1>&6
3850 TK_LIB="-ltk80"
3851 else
3852 echo "$ac_t""no" 1>&6
3853 fi
3854
3855 fi
3856 if test "X$TK_LIB" = X_searching ; then
3857 echo $ac_n "checking for Tk_NameOfFont in -ltk""... $ac_c" 1>&6
3858 echo "configure:3859: checking for Tk_NameOfFont in -ltk" >&5
3859 ac_lib_var=`echo tk'_'Tk_NameOfFont | sed 'y%./+-%__p_%'`
3860 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3861 echo $ac_n "(cached) $ac_c" 1>&6
3862 else
3863 ac_save_LIBS="$LIBS"
3864 LIBS="-ltk $TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
3865 cat > conftest.$ac_ext <<EOF
3866 #line 3867 "configure"
3867 #include "confdefs.h"
3868 /* Override any gcc2 internal prototype to avoid an error. */
3869 /* We use char because int might match the return type of a gcc2
3870 builtin and then its argument prototype would still apply. */
3871 char Tk_NameOfFont();
3872
3873 int main() {
3874 Tk_NameOfFont()
3875 ; return 0; }
3876 EOF
3877 if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3878 rm -rf conftest*
3879 eval "ac_cv_lib_$ac_lib_var=yes"
3880 else
3881 echo "configure: failed program was:" >&5
3882 cat conftest.$ac_ext >&5
3883 rm -rf conftest*
3884 eval "ac_cv_lib_$ac_lib_var=no"
3885 fi
3886 rm -f conftest*
3887 LIBS="$ac_save_LIBS"
3888
3889 fi
3890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3891 echo "$ac_t""yes" 1>&6
3892 TK_LIB="-ltk"
3893 else
3894 echo "$ac_t""no" 1>&6
3895 fi
3896
3897 fi
3898
3899 # give up searching for the Tk8.0 library
3900 #
3901 if test "X$TK_LIB" = X_searching ; then
3902 { echo "configure: error: Cannot find a compatiable Tk library.
3903 You must build and install Tk version 8.0 or newer before you
3904 can build ASCEND. If you have installed the correct version
3905 of Tk, run configure again with the argument:
3906 --with-tk=LIBRARY,HEADER
3907 where LIBRARY and HEADER are the full paths to the Tk8.0
3908 library file and header file, respectively." 1>&2; exit 1; }
3909 fi
3910
3911 # see if the user gave us the location of the Tk8.0 header file
3912 #
3913 if test ! "X$with_tkhdr" = X_searching ; then
3914 if test ! -f "$TK_HDR" ; then
3915 echo "configure: warning: user specified Tk header file, $TK_HDR, does not exist" 1>&2
3916 with_tkhdr=_searching
3917 TK_HDR=''
3918 fi
3919 fi
3920 if test "X$with_tkhdr" = X_searching ; then
3921 # Extract the first word of "tk.h", so it can be a program name with args.
3922 set dummy tk.h; ac_word=$2
3923 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3924 echo "configure:3925: checking for $ac_word" >&5
3925 if eval "test \"`echo '$''{'ac_cv_path_TK_HDR'+set}'`\" = set"; then
3926 echo $ac_n "(cached) $ac_c" 1>&6
3927 else
3928 case "$TK_HDR" in
3929 /*)
3930 ac_cv_path_TK_HDR="$TK_HDR" # Let the user override the test with a path.
3931 ;;
3932 ?:/*)
3933 ac_cv_path_TK_HDR="$TK_HDR" # Let the user override the test with a dos path.
3934 ;;
3935 *)
3936 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3937 ac_dummy="$asc_tcl_include_dirs"
3938 for ac_dir in $ac_dummy; do
3939 test -z "$ac_dir" && ac_dir=.
3940 if test -f $ac_dir/$ac_word; then
3941 ac_cv_path_TK_HDR="$ac_dir/$ac_word"
3942 break
3943 fi
3944 done
3945 IFS="$ac_save_ifs"
3946 ;;
3947 esac
3948 fi
3949 TK_HDR="$ac_cv_path_TK_HDR"
3950 if test -n "$TK_HDR"; then
3951 echo "$ac_t""$TK_HDR" 1>&6
3952 else
3953 echo "$ac_t""no" 1>&6
3954 fi
3955
3956 if test -z "$TK_HDR" ; then
3957 cat > conftest.$ac_ext <<EOF
3958 #line 3959 "configure"
3959 #include "confdefs.h"
3960 #include <tk.h>
3961 EOF
3962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3963 egrep "TK_MAJOR_VERSION.*8" >/dev/null 2>&1; then
3964 rm -rf conftest*
3965 TK_HDR='tk.h'
3966 fi
3967 rm -f conftest*
3968
3969 fi
3970 else
3971 echo "$ac_t""checking for tk header... $TK_HDR" 1>&6
3972 fi
3973 if test -f "$TK_HDR" ; then
3974 echo $ac_n "checking whether $TK_HDR is for version 8""... $ac_c" 1>&6
3975 echo "configure:3976: checking whether $TK_HDR is for version 8" >&5
3976 echo 'grep TK_MAJOR_VERSION "$TK_HDR" 2>&5' 1>&5
3977 grep_tk_h=`grep TK_MAJOR_VERSION "$TK_HDR" 2>&5`
3978 echo $grep_tk_h 1>&5
3979 case "$grep_tk_h" in
3980 *8)
3981 echo "$ac_t""yes" 1>&6
3982 ;;
3983 *)
3984 echo "$ac_t""no" 1>&6
3985 TK_HDR=
3986 ;;
3987 esac
3988 fi
3989 if test -z "$TK_HDR" ; then
3990 { echo "configure: error: Cannot find a compatiable Tk header file.
3991 You must build and install Tk version 8.0 or newer before you
3992 can build ASCEND. If you have installed the correct version
3993 of Tk, run configure again with the argument:
3994 --with-tk=LIBRARY,HEADER
3995 where LIBRARY and HEADER are the full paths to the Tk8.0
3996 library file and header file, respectively." 1>&2; exit 1; }
3997 fi
3998 TK_HDR=`echo $TK_HDR | sed 's,tk\.h$,,'`
3999 if test -n "$TK_HDR" ; then
4000 TK_HDR="-I$TK_HDR"
4001 if test "X$TCL_HDR" = "X$TK_HDR" ; then
4002 TK_HDR=
4003 fi
4004 fi
4005
4006
4007 # Check whether --with-tktable or --without-tktable was given.
4008 if test "${with_tktable+set}" = set; then
4009 withval="$with_tktable"
4010 :
4011 fi
4012
4013 case "$with_tktable" in
4014 yes|no|"")
4015 # search for the table
4016 # Extract the first word of "libTktable.a", so it can be a program name with args.
4017 set dummy libTktable.a; ac_word=$2
4018 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4019 echo "configure:4020: checking for $ac_word" >&5
4020 if eval "test \"`echo '$''{'ac_cv_path_TKTABLE_LIB'+set}'`\" = set"; then
4021 echo $ac_n "(cached) $ac_c" 1>&6
4022 else
4023 case "$TKTABLE_LIB" in
4024 /*)
4025 ac_cv_path_TKTABLE_LIB="$TKTABLE_LIB" # Let the user override the test with a path.
4026 ;;
4027 ?:/*)
4028 ac_cv_path_TKTABLE_LIB="$TKTABLE_LIB" # Let the user override the test with a dos path.
4029 ;;
4030 *)
4031 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4032 ac_dummy="$asc_tk_table_dirs"
4033 for ac_dir in $ac_dummy; do
4034 test -z "$ac_dir" && ac_dir=.
4035 if test -f $ac_dir/$ac_word; then
4036 ac_cv_path_TKTABLE_LIB="$ac_dir/$ac_word"
4037 break
4038 fi
4039 done
4040 IFS="$ac_save_ifs"
4041 ;;
4042 esac
4043 fi
4044 TKTABLE_LIB="$ac_cv_path_TKTABLE_LIB"
4045 if test -n "$TKTABLE_LIB"; then
4046 echo "$ac_t""$TKTABLE_LIB" 1>&6
4047 else
4048 echo "$ac_t""no" 1>&6
4049 fi
4050
4051 ;;
4052 *)
4053 # use the user's value
4054 TKTABLE_LIB="$with_tktable"
4055 ;;
4056 esac
4057 if test -n "$TKTABLE_LIB" ; then
4058 HAVE_TKTABLE='-DSTATIC_TKTABLE'
4059 else
4060 echo "$ac_t""Assuming Tktable will be dynamically linked into ASCEND" 1>&6
4061 fi
4062
4063 # Check whether --with-wish or --without-wish was given.
4064 if test "${with_wish+set}" = set; then
4065 withval="$with_wish"
4066 :
4067 else
4068 with_wish=no
4069 fi
4070
4071 case "$with_wish" in
4072 yes|no|"")
4073 echo "$ac_t""--with-wish not specified.
4074 Setting env vars TCL_LIBRARY, TK_LIBRARY may be needed to run." 1>&6
4075 ;;
4076 *)
4077 echo $ac_n "checking wish for tcl_library,tklibrary""... $ac_c" 1>&6
4078 echo "configure:4079: checking wish for tcl_library,tklibrary" >&5
4079 ASC_TK_LIBRARY=`config/wishvar tk_library $with_wish`
4080 ASC_TCL_LIBRARY=`config/wishvar tcl_library $with_wish`
4081 echo "$ac_t"" $ASC_TCL_LIBRARY , $ASC_TK_LIBRARY" 1>&6
4082 ;;
4083 esac
4084
4085
4086 #--------------------------------------------------------------------
4087 # FORTRAN
4088 #
4089 # ASCEND uses the LSOD integrator and is capable of working
4090 # with CONOPT and with MINOS. These libraries are written in
4091 # Fortran; to use them, configure needs to find a Fortran
4092 # compiler and the necessary Fortran libraries (e.g.,
4093 # libF77.a). LSOD, CONOPT, and MINOS also require the BLAS and
4094 # LINPACK libraries to avoid undefined symbols at link time.
4095 #
4096 # The builder can specify the location of
4097 # * the Fortran compiler and libraries using
4098 # --with-fortran=<compiler>,<libraries>
4099 # * the BLAS library using
4100 # --with-blas=<blas-library>
4101 # * the LINPACK library using
4102 # --with-linpack=<linpack-library>
4103 # * the LSOD library using
4104 # --with-blas=<lsod-library>
4105 # * the CONOPT library using
4106 # --with-conopt=<conopt-library>
4107 # * the MINOS library using
4108 # --with-minos=<minos-library> <===currently disabled
4109 # The builder can disable some parts of the fortran build using
4110 # the --without-<package> configure option.
4111 #
4112 # If the user does not specify the locations of the compiler
4113 # and the libraries and does not disable them, configure
4114 # attempts to find them.
4115 #
4116 # Building with LSOD, CONOPT, and/or MINOS is further
4117 # complicated by the dependencies between these libraries and
4118 # the BLAS and LINPACK libraries.
4119 #
4120 # If we cannot find a Fortran compiler, we disable all Fortran
4121 # code (LSOD, CONOPT, and MINOS). Otherwise, look for the
4122 # Fortran libraries (e.g., libF77.a) based on the type of
4123 # machine we are compiling on.
4124 #
4125 # If Fortran is enabled, we need to find a compiled BLAS
4126 # library or source code. Check for the machine's libblas.a
4127 # and ASCEND's libascblas.a; if those fail, check for the
4128 # libascblas.a source code; if that fails, we disable all
4129 # Fortran (LSOD, CONOPT, MINOS).
4130 #
4131 # If Fortran is enabled, we need to find a compiled LINPACK
4132 # library or source code. Check for the machine's liblpak.a
4133 # and ASCEND's libasclpak.a; if those fail, check for the
4134 # libasclpak.a source code; if that fails, we disable all
4135 # Fortran (LSOD, CONOPT, MINOS).
4136 #
4137 # If Fortran is enabled, we try to find a compiled LSOD library
4138 # or source code. Check for a libinteg.a; if that fails, check
4139 # for the libinteg.a source code; if that fails, we disable
4140 # LSOD. If we find LSOD, define STATIC_LSOD.
4141 #
4142 # If Fortran is enabled, we try to find a compiled OPTSQP
4143 # library or source code. Check for a librsqp.a; if that fails,
4144 # check for the librsqp.a source code; if that fails, we disable
4145 # OPTSQP. If we find RSQP, define STATIC_OPTSQP.
4146 #
4147 # If Fortran is enabled, we try to find a compiled CONOPT
4148 # library. Check for a libconsub.a; if that fails, we disable
4149 # CONOPT. If we find CONOPT, define STATIC_CONOPT; if not,
4150 # tell the user where to find CONOPT using the contact
4151 # information from the nonlinear programming FAQ:
4152 # http://www.mcs.anl.gov/home/otc/Guide/faq/nonlinear-programming-faq.html
4153 #
4154 # If Fortran is enabled, we try to find a compiled MINOS
4155 # library or source code. Check for a libminos54.a; if that
4156 # fails, check for the libminos54.a source code; if that fails,
4157 # we disable MINOS. If we find MINOS, define STATIC_MINOS; if
4158 # not, tell the user where to find MINOS using the contact
4159 # information from the nonlinear programming FAQ:
4160 # http://www.mcs.anl.gov/home/otc/Guide/faq/nonlinear-programming-faq.html
4161 #--------------------------------------------------------------------
4162 #
4163 # the list of directories to search for the fortran compiler
4164 asc_f77_prog_dirs="$PATH:/usr/lang:/opt/SUNWspro/bin"
4165 #
4166 # the list of directories to search for the required fortran libraries
4167 asc_f77_support_dirs="
4168 /lib
4169 /usr/lib
4170 /usr/local/lib
4171 /usr/contributed/lib
4172 /usr/local/lib/ascend/lib
4173 $ascpwd/blas
4174 $ascpwd/linpack
4175 $ascpwd/lsod
4176 $ascpwd/conopt
4177 $ascpwd/rsqp
4178 $ascpwd/minos
4179 $ascpwd/ascend4/archive
4180 /afs/cs/project/ascend/depot/@sys/lib
4181 /afs/cs/project/ascend/depot/build/obj/conopt
4182 "
4183 #
4184 # Check whether --with-fortran or --without-fortran was given.
4185 if test "${with_fortran+set}" = set; then
4186 withval="$with_fortran"
4187 :
4188 else
4189 with_fortran=yes
4190 fi
4191
4192 case "$with_fortran" in
4193 no)
4194 # The user disabled all fortran using
4195 # the --without-fortran option.
4196 F77=
4197 F77LIBS=
4198 with_f77=no
4199 with_f77libs=no
4200 ;;
4201 yes|,|"")
4202 # The user didn't pass in the --with-fortran option
4203 # or didn't give us any useful information. We do
4204 # the search ourselves.
4205 with_f77=_searching
4206 with_f77libs=_searching
4207 ;;
4208 ,*)
4209 # The user passed in the libraries, search for the
4210 # compiler ourselves.
4211 with_f77=_searching
4212 F77LIBS=`echo $with_fortran | sed 's/^,//'`
4213 echo "user gave F77LIBS=$F77LIBS"
4214 ;;
4215 *,?*)
4216 # The user passed in both the compiler and the
4217 # libraries.
4218 F77=`echo $with_fortran | sed s'/,.*$//'`
4219 F77LIBS=`echo $with_fortran | sed 's/^.*,//'`
4220 echo "user gave F77=$F77"
4221 echo "user gave F77LIBS=$F77LIBS"
4222 ;;
4223 *)
4224 # The user passed in the compiler; search for the
4225 # libraries ourselves.
4226 F77=`echo $with_fortran | sed s'/,$//'`
4227 with_f77libs=_searching
4228 echo "user gave F77=$F77"
4229 ;;
4230 esac
4231
4232 if test "X$with_f77" = X_searching ; then
4233 # Search for the fortran compiler; print a warning if we can't
4234 # find it and disable all fortran.
4235 for ac_prog in f77 xlf g77
4236 do
4237 # Extract the first word of "$ac_prog", so it can be a program name with args.
4238 set dummy $ac_prog; ac_word=$2
4239 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4240 echo "configure:4241: checking for $ac_word" >&5
4241 if eval "test \"`echo '$''{'ac_cv_path_F77'+set}'`\" = set"; then
4242 echo $ac_n "(cached) $ac_c" 1>&6
4243 else
4244 case "$F77" in
4245 /*)
4246 ac_cv_path_F77="$F77" # Let the user override the test with a path.
4247 ;;
4248 ?:/*)
4249 ac_cv_path_F77="$F77" # Let the user override the test with a dos path.
4250 ;;
4251 *)
4252 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4253 ac_dummy="$asc_f77_prog_dirs"
4254 for ac_dir in $ac_dummy; do
4255 test -z "$ac_dir" && ac_dir=.
4256 if test -f $ac_dir/$ac_word; then
4257 ac_cv_path_F77="$ac_dir/$ac_word"
4258 break
4259 fi
4260 done
4261 IFS="$ac_save_ifs"
4262 ;;
4263 esac
4264 fi
4265 F77="$ac_cv_path_F77"
4266 if test -n "$F77"; then
4267 echo "$ac_t""$F77" 1>&6
4268 else
4269 echo "$ac_t""no" 1>&6
4270 fi
4271
4272 test -n "$F77" && break
4273 done
4274
4275 if test -z "$F77" ; then
4276 with_fortran=no
4277 with_f77libs=no
4278 echo "configure: warning: Cannot find your Fortran compiler. Building ASCEND
4279 without integration, MINOS, and CONOPT support. To bulid ASCEND with
4280 Fortran support, run configure with the option
4281 --with-fortran=F77,F77LIBS
4282 where F77 is the full path to your Fortran compiler and F77LIBS are
4283 its related libraries" 1>&2
4284 fi
4285 fi
4286
4287 if test "X$with_f77libs" = X_searching ; then
4288 # We found a compiler, now search for the fortran libraries
4289 # based on the system type.
4290 echo "$ac_t""checking for fortran libraries based on system type" 1>&6
4291 case "$host" in
4292 alpha-dec-osf*)
4293 echo $ac_n "checking for for_lle in -lfor""... $ac_c" 1>&6
4294 echo "configure:4295: checking for for_lle in -lfor" >&5
4295 ac_lib_var=`echo for'_'for_lle | sed 'y%./+-%__p_%'`
4296 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4297 echo $ac_n "(cached) $ac_c" 1>&6
4298 else
4299 ac_save_LIBS="$LIBS"
4300 LIBS="-lfor $F77LIBS $LIBS"
4301 cat > conftest.$ac_ext <<EOF
4302 #line 4303 "configure"
4303 #include "confdefs.h"
4304 /* Override any gcc2 internal prototype to avoid an error. */
4305 /* We use char because int might match the return type of a gcc2
4306 builtin and then its argument prototype would still apply. */
4307 char for_lle();
4308
4309 int main() {
4310 for_lle()
4311 ; return 0; }
4312 EOF
4313 if { (eval echo configure:4314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4314 rm -rf conftest*
4315 eval "ac_cv_lib_$ac_lib_var=yes"
4316 else
4317 echo "configure: failed program was:" >&5
4318 cat conftest.$ac_ext >&5
4319 rm -rf conftest*
4320 eval "ac_cv_lib_$ac_lib_var=no"
4321 fi
4322 rm -f conftest*
4323 LIBS="$ac_save_LIBS"
4324
4325 fi
4326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4327 echo "$ac_t""yes" 1>&6
4328 F77LIBS="$F77LIBS -lfor"
4329 else
4330 echo "$ac_t""no" 1>&6
4331 fi
4332
4333 echo $ac_n "checking for _OtsFill in -lots""... $ac_c" 1>&6
4334 echo "configure:4335: checking for _OtsFill in -lots" >&5
4335 ac_lib_var=`echo ots'_'_OtsFill | sed 'y%./+-%__p_%'`
4336 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4337 echo $ac_n "(cached) $ac_c" 1>&6
4338 else
4339 ac_save_LIBS="$LIBS"
4340 LIBS="-lots $F77LIBS $LIBS"
4341 cat > conftest.$ac_ext <<EOF
4342 #line 4343 "configure"
4343 #include "confdefs.h"
4344 /* Override any gcc2 internal prototype to avoid an error. */
4345 /* We use char because int might match the return type of a gcc2
4346 builtin and then its argument prototype would still apply. */
4347 char _OtsFill();
4348
4349 int main() {
4350 _OtsFill()
4351 ; return 0; }
4352 EOF
4353 if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4354 rm -rf conftest*
4355 eval "ac_cv_lib_$ac_lib_var=yes"
4356 else
4357 echo "configure: failed program was:" >&5
4358 cat conftest.$ac_ext >&5
4359 rm -rf conftest*
4360 eval "ac_cv_lib_$ac_lib_var=no"
4361 fi
4362 rm -f conftest*
4363 LIBS="$ac_save_LIBS"
4364
4365 fi
4366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4367 echo "$ac_t""yes" 1>&6
4368 F77LIBS="$F77LIBS -lots"
4369 else
4370 echo "$ac_t""no" 1>&6
4371 fi
4372
4373 echo $ac_n "checking for etime_ in -lUfor""... $ac_c" 1>&6
4374 echo "configure:4375: checking for etime_ in -lUfor" >&5
4375 ac_lib_var=`echo Ufor'_'etime_ | sed 'y%./+-%__p_%'`
4376 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4377 echo $ac_n "(cached) $ac_c" 1>&6
4378 else
4379 ac_save_LIBS="$LIBS"
4380 LIBS="-lUfor $F77LIBS $LIBS"
4381 cat > conftest.$ac_ext <<EOF
4382 #line 4383 "configure"
4383 #include "confdefs.h"
4384 /* Override any gcc2 internal prototype to avoid an error. */
4385 /* We use char because int might match the return type of a gcc2
4386 builtin and then its argument prototype would still apply. */
4387 char etime_();
4388
4389 int main() {
4390 etime_()
4391 ; return 0; }
4392 EOF
4393 if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4394 rm -rf conftest*
4395 eval "ac_cv_lib_$ac_lib_var=yes"
4396 else
4397 echo "configure: failed program was:" >&5
4398 cat conftest.$ac_ext >&5
4399 rm -rf conftest*
4400 eval "ac_cv_lib_$ac_lib_var=no"
4401 fi
4402 rm -f conftest*
4403 LIBS="$ac_save_LIBS"
4404
4405 fi
4406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4407 echo "$ac_t""yes" 1>&6
4408 F77LIBS="$F77LIBS -lUfor"
4409 else
4410 echo "$ac_t""no" 1>&6
4411 fi
4412
4413 ;;
4414 mips-dec-ultrix*)
4415 echo $ac_n "checking for for_lle in -lfor""... $ac_c" 1>&6
4416 echo "configure:4417: checking for for_lle in -lfor" >&5
4417 ac_lib_var=`echo for'_'for_lle | sed 'y%./+-%__p_%'`
4418 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4419 echo $ac_n "(cached) $ac_c" 1>&6
4420 else
4421 ac_save_LIBS="$LIBS"
4422 LIBS="-lfor $F77LIBS $LIBS"
4423 cat > conftest.$ac_ext <<EOF
4424 #line 4425 "configure"
4425 #include "confdefs.h"
4426 /* Override any gcc2 internal prototype to avoid an error. */
4427 /* We use char because int might match the return type of a gcc2
4428 builtin and then its argument prototype would still apply. */
4429 char for_lle();
4430
4431 int main() {
4432 for_lle()
4433 ; return 0; }
4434 EOF
4435 if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4436 rm -rf conftest*
4437 eval "ac_cv_lib_$ac_lib_var=yes"
4438 else
4439 echo "configure: failed program was:" >&5
4440 cat conftest.$ac_ext >&5
4441 rm -rf conftest*
4442 eval "ac_cv_lib_$ac_lib_var=no"
4443 fi
4444 rm -f conftest*
4445 LIBS="$ac_save_LIBS"
4446
4447 fi
4448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4449 echo "$ac_t""yes" 1>&6
4450 F77LIBS="$F77LIBS -lfor"
4451 else
4452 echo "$ac_t""no" 1>&6
4453 fi
4454
4455 ;;
4456 hppa1.1-hp-hpux*)
4457 echo $ac_n "checking for FTN_QATAN in -lcl""... $ac_c" 1>&6
4458 echo "configure:4459: checking for FTN_QATAN in -lcl" >&5
4459 ac_lib_var=`echo cl'_'FTN_QATAN | sed 'y%./+-%__p_%'`
4460 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4461 echo $ac_n "(cached) $ac_c" 1>&6
4462 else
4463 ac_save_LIBS="$LIBS"
4464 LIBS="-lcl $F77LIBS $LIBS"
4465 cat > conftest.$ac_ext <<EOF
4466 #line 4467 "configure"
4467 #include "confdefs.h"
4468 /* Override any gcc2 internal prototype to avoid an error. */
4469 /* We use char because int might match the return type of a gcc2
4470 builtin and then its argument prototype would still apply. */
4471 char FTN_QATAN();
4472
4473 int main() {
4474 FTN_QATAN()
4475 ; return 0; }
4476 EOF
4477 if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4478 rm -rf conftest*
4479 eval "ac_cv_lib_$ac_lib_var=yes"
4480 else
4481 echo "configure: failed program was:" >&5
4482 cat conftest.$ac_ext >&5
4483 rm -rf conftest*
4484 eval "ac_cv_lib_$ac_lib_var=no"
4485 fi
4486 rm -f conftest*
4487 LIBS="$ac_save_LIBS"
4488
4489 fi
4490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4491 echo "$ac_t""yes" 1>&6
4492 F77LIBS="$F77LIBS -lcl"
4493 else
4494 echo "$ac_t""no" 1>&6
4495 fi
4496
4497 ;;
4498 *-ibm-aix*)
4499 # need to add -lc before -lxlf on AIX to
4500 # avoid getting the wrong getenv
4501 F77LIBS="-lc $F77LIBS"
4502 echo $ac_n "checking for _xldabs in -lxlf""... $ac_c" 1>&6
4503 echo "configure:4504: checking for _xldabs in -lxlf" >&5
4504 ac_lib_var=`echo xlf'_'_xldabs | sed 'y%./+-%__p_%'`
4505 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4506 echo $ac_n "(cached) $ac_c" 1>&6
4507 else
4508 ac_save_LIBS="$LIBS"
4509 LIBS="-lxlf $F77LIBS $LIBS"
4510 cat > conftest.$ac_ext <<EOF
4511 #line 4512 "configure"
4512 #include "confdefs.h"
4513 /* Override any gcc2 internal prototype to avoid an error. */
4514 /* We use char because int might match the return type of a gcc2
4515 builtin and then its argument prototype would still apply. */
4516 char _xldabs();
4517
4518 int main() {
4519 _xldabs()
4520 ; return 0; }
4521 EOF
4522 if { (eval echo configure:4523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4523 rm -rf conftest*
4524 eval "ac_cv_lib_$ac_lib_var=yes"
4525 else
4526 echo "configure: failed program was:" >&5
4527 cat conftest.$ac_ext >&5
4528 rm -rf conftest*
4529 eval "ac_cv_lib_$ac_lib_var=no"
4530 fi
4531 rm -f conftest*
4532 LIBS="$ac_save_LIBS"
4533
4534 fi
4535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4536 echo "$ac_t""yes" 1>&6
4537 F77LIBS="$F77LIBS -lxlf"
4538 else
4539 echo "$ac_t""no" 1>&6
4540 fi
4541
4542 echo $ac_n "checking for srand_ in -lxlfutil""... $ac_c" 1>&6
4543 echo "configure:4544: checking for srand_ in -lxlfutil" >&5
4544 ac_lib_var=`echo xlfutil'_'srand_ | sed 'y%./+-%__p_%'`
4545 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4546 echo $ac_n "(cached) $ac_c" 1>&6
4547 else
4548 ac_save_LIBS="$LIBS"
4549 LIBS="-lxlfutil $F77LIBS $LIBS"
4550 cat > conftest.$ac_ext <<EOF
4551 #line 4552 "configure"
4552 #include "confdefs.h"
4553 /* Override any gcc2 internal prototype to avoid an error. */
4554 /* We use char because int might match the return type of a gcc2
4555 builtin and then its argument prototype would still apply. */
4556 char srand_();
4557
4558 int main() {
4559 srand_()
4560 ; return 0; }
4561 EOF
4562 if { (eval echo configure:4563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4563 rm -rf conftest*
4564 eval "ac_cv_lib_$ac_lib_var=yes"
4565 else
4566 echo "configure: failed program was:" >&5
4567 cat conftest.$ac_ext >&5
4568 rm -rf conftest*
4569 eval "ac_cv_lib_$ac_lib_var=no"
4570 fi
4571 rm -f conftest*
4572 LIBS="$ac_save_LIBS"
4573
4574 fi
4575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4576 echo "$ac_t""yes" 1>&6
4577 F77LIBS="$F77LIBS -lxlfutil"
4578 else
4579 echo "$ac_t""no" 1>&6
4580 fi
4581
4582 echo $ac_n "checking for printf in -lxlf90""... $ac_c" 1>&6
4583 echo "configure:4584: checking for printf in -lxlf90" >&5
4584 ac_lib_var=`echo xlf90'_'printf | sed 'y%./+-%__p_%'`
4585 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4586 echo $ac_n "(cached) $ac_c" 1>&6
4587 else
4588 ac_save_LIBS="$LIBS"
4589 LIBS="-lxlf90 $F77LIBS $LIBS"
4590 cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 /* Override any gcc2 internal prototype to avoid an error. */
4594 /* We use char because int might match the return type of a gcc2
4595 builtin and then its argument prototype would still apply. */
4596 char printf();
4597
4598 int main() {
4599 printf()
4600 ; return 0; }
4601 EOF
4602 if { (eval echo configure:4603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4603 rm -rf conftest*
4604 eval "ac_cv_lib_$ac_lib_var=yes"
4605 else
4606 echo "configure: failed program was:" >&5
4607 cat conftest.$ac_ext >&5
4608 rm -rf conftest*
4609 eval "ac_cv_lib_$ac_lib_var=no"
4610 fi
4611 rm -f conftest*
4612 LIBS="$ac_save_LIBS"
4613
4614 fi
4615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4616 echo "$ac_t""yes" 1>&6
4617 F77LIBS="$F77LIBS -lxlf90"
4618 else
4619 echo "$ac_t""no" 1>&6
4620 fi
4621
4622 ;;
4623 *-linux-*)
4624 echo $ac_n "checking for pow_dd in -lf2c""... $ac_c" 1>&6
4625 echo "configure:4626: checking for pow_dd in -lf2c" >&5
4626 ac_lib_var=`echo f2c'_'pow_dd | sed 'y%./+-%__p_%'`
4627 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4628 echo $ac_n "(cached) $ac_c" 1>&6
4629 else
4630 ac_save_LIBS="$LIBS"
4631 LIBS="-lf2c $F77LIBS $LIBS"
4632 cat > conftest.$ac_ext <<EOF
4633 #line 4634 "configure"
4634 #include "confdefs.h"
4635 /* Override any gcc2 internal prototype to avoid an error. */
4636 /* We use char because int might match the return type of a gcc2
4637 builtin and then its argument prototype would still apply. */
4638 char pow_dd();
4639
4640 int main() {
4641 pow_dd()
4642 ; return 0; }
4643 EOF
4644 if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4645 rm -rf conftest*
4646 eval "ac_cv_lib_$ac_lib_var=yes"
4647 else
4648 echo "configure: failed program was:" >&5
4649 cat conftest.$ac_ext >&5
4650 rm -rf conftest*
4651 eval "ac_cv_lib_$ac_lib_var=no"
4652 fi
4653 rm -f conftest*
4654 LIBS="$ac_save_LIBS"
4655
4656 fi
4657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4658 echo "$ac_t""yes" 1>&6
4659 F77LIBS="$F77LIBS -lf2c"
4660 else
4661 echo "$ac_t""no" 1>&6
4662 fi
4663
4664 echo $ac_n "checking for pow_dd in -lg2c""... $ac_c" 1>&6
4665 echo "configure:4666: checking for pow_dd in -lg2c" >&5
4666 ac_lib_var=`echo g2c'_'pow_dd | sed 'y%./+-%__p_%'`
4667 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4668 echo $ac_n "(cached) $ac_c" 1>&6
4669 else
4670 ac_save_LIBS="$LIBS"
4671 LIBS="-lg2c $F77LIBS $LIBS"
4672 cat > conftest.$ac_ext <<EOF
4673 #line 4674 "configure"
4674 #include "confdefs.h"
4675 /* Override any gcc2 internal prototype to avoid an error. */
4676 /* We use char because int might match the return type of a gcc2
4677 builtin and then its argument prototype would still apply. */
4678 char pow_dd();
4679
4680 int main() {
4681 pow_dd()
4682 ; return 0; }
4683 EOF
4684 if { (eval echo configure:4685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4685 rm -rf conftest*
4686 eval "ac_cv_lib_$ac_lib_var=yes"
4687 else
4688 echo "configure: failed program was:" >&5
4689 cat conftest.$ac_ext >&5
4690 rm -rf conftest*
4691 eval "ac_cv_lib_$ac_lib_var=no"
4692 fi
4693 rm -f conftest*
4694 LIBS="$ac_save_LIBS"
4695
4696 fi
4697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4698 echo "$ac_t""yes" 1>&6
4699 F77LIBS="$F77LIBS -lg2c"
4700 else
4701 echo "$ac_t""no" 1>&6
4702 fi
4703
4704 ;;
4705 sparc-sun-solaris*)
4706 if test -n "$GCC" ; then
4707 F77LIBS="-L/opt/SUNWspro/lib -R/opt/SUNWspro/lib"
4708 fi
4709 echo $ac_n "checking for d_sqrt_ in -lsunmath""... $ac_c" 1>&6
4710 echo "configure:4711: checking for d_sqrt_ in -lsunmath" >&5
4711 ac_lib_var=`echo sunmath'_'d_sqrt_ | sed 'y%./+-%__p_%'`
4712 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4713 echo $ac_n "(cached) $ac_c" 1>&6
4714 else
4715 ac_save_LIBS="$LIBS"
4716 LIBS="-lsunmath $LIBS"
4717 cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4720 /* Override any gcc2 internal prototype to avoid an error. */
4721 /* We use char because int might match the return type of a gcc2
4722 builtin and then its argument prototype would still apply. */
4723 char d_sqrt_();
4724
4725 int main() {
4726 d_sqrt_()
4727 ; return 0; }
4728 EOF
4729 if { (eval echo configure:4730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4730 rm -rf conftest*
4731 eval "ac_cv_lib_$ac_lib_var=yes"
4732 else
4733 echo "configure: failed program was:" >&5
4734 cat conftest.$ac_ext >&5
4735 rm -rf conftest*
4736 eval "ac_cv_lib_$ac_lib_var=no"
4737 fi
4738 rm -f conftest*
4739 LIBS="$ac_save_LIBS"
4740
4741 fi
4742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4743 echo "$ac_t""yes" 1>&6
4744 MATH_LIBS="-lsunmath $MATH_LIBS"
4745 else
4746 echo "$ac_t""no" 1>&6
4747 fi
4748
4749 echo $ac_n "checking for f77_init in -lF77""... $ac_c" 1>&6
4750 echo "configure:4751: checking for f77_init in -lF77" >&5
4751 ac_lib_var=`echo F77'_'f77_init | sed 'y%./+-%__p_%'`
4752 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4753 echo $ac_n "(cached) $ac_c" 1>&6
4754 else
4755 ac_save_LIBS="$LIBS"
4756 LIBS="-lF77 $F77LIBS $MATH_LIBS $LIBS"
4757 cat > conftest.$ac_ext <<EOF
4758 #line 4759 "configure"
4759 #include "confdefs.h"
4760 /* Override any gcc2 internal prototype to avoid an error. */
4761 /* We use char because int might match the return type of a gcc2
4762 builtin and then its argument prototype would still apply. */
4763 char f77_init();
4764
4765 int main() {
4766 f77_init()
4767 ; return 0; }
4768 EOF
4769 if { (eval echo configure:4770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4770 rm -rf conftest*
4771 eval "ac_cv_lib_$ac_lib_var=yes"
4772 else
4773 echo "configure: failed program was:" >&5
4774 cat conftest.$ac_ext >&5
4775 rm -rf conftest*
4776 eval "ac_cv_lib_$ac_lib_var=no"
4777 fi
4778 rm -f conftest*
4779 LIBS="$ac_save_LIBS"
4780
4781 fi
4782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4783 echo "$ac_t""yes" 1>&6
4784 F77LIBS="$F77LIBS -lF77"
4785 else
4786 echo "$ac_t""no" 1>&6
4787 fi
4788
4789 echo $ac_n "checking for inmax_ in -lM77""... $ac_c" 1>&6
4790 echo "configure:4791: checking for inmax_ in -lM77" >&5
4791 ac_lib_var=`echo M77'_'inmax_ | sed 'y%./+-%__p_%'`
4792 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4793 echo $ac_n "(cached) $ac_c" 1>&6
4794 else
4795 ac_save_LIBS="$LIBS"
4796 LIBS="-lM77 $F77LIBS $MATH_LIBS $LIBS"
4797 cat > conftest.$ac_ext <<EOF
4798 #line 4799 "configure"
4799 #include "confdefs.h"
4800 /* Override any gcc2 internal prototype to avoid an error. */
4801 /* We use char because int might match the return type of a gcc2
4802 builtin and then its argument prototype would still apply. */
4803 char inmax_();
4804
4805 int main() {
4806 inmax_()
4807 ; return 0; }
4808 EOF
4809 if { (eval echo configure:4810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4810 rm -rf conftest*
4811 eval "ac_cv_lib_$ac_lib_var=yes"
4812 else
4813 echo "configure: failed program was:" >&5
4814 cat conftest.$ac_ext >&5
4815 rm -rf conftest*
4816 eval "ac_cv_lib_$ac_lib_var=no"
4817 fi
4818 rm -f conftest*
4819 LIBS="$ac_save_LIBS"
4820
4821 fi
4822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4823 echo "$ac_t""yes" 1>&6
4824 F77LIBS="$F77LIBS -lM77"
4825 else
4826 echo "$ac_t""no" 1>&6
4827 fi
4828
4829 ;;
4830 sparc-sun-sunos4*)
4831 if test -n "$GCC" ; then
4832 F77LIBS="-L/usr/lang/lib"
4833 fi
4834 echo $ac_n "checking for f77_init in -lF77""... $ac_c" 1>&6
4835 echo "configure:4836: checking for f77_init in -lF77" >&5
4836 ac_lib_var=`echo F77'_'f77_init | sed 'y%./+-%__p_%'`
4837 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4838 echo $ac_n "(cached) $ac_c" 1>&6
4839 else
4840 ac_save_LIBS="$LIBS"
4841 LIBS="-lF77 $F77LIBS $LIBS"
4842 cat > conftest.$ac_ext <<EOF
4843 #line 4844 "configure"
4844 #include "confdefs.h"
4845 /* Override any gcc2 internal prototype to avoid an error. */
4846 /* We use char because int might match the return type of a gcc2
4847 builtin and then its argument prototype would still apply. */
4848 char f77_init();
4849
4850 int main() {
4851 f77_init()
4852 ; return 0; }
4853 EOF
4854 if { (eval echo configure:4855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4855 rm -rf conftest*
4856 eval "ac_cv_lib_$ac_lib_var=yes"
4857 else
4858 echo "configure: failed program was:" >&5
4859 cat conftest.$ac_ext >&5
4860 rm -rf conftest*
4861 eval "ac_cv_lib_$ac_lib_var=no"
4862 fi
4863 rm -f conftest*
4864 LIBS="$ac_save_LIBS"
4865
4866 fi
4867 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4868 echo "$ac_t""yes" 1>&6
4869 F77LIBS="$F77LIBS -lF77"
4870 else
4871 echo "$ac_t""no" 1>&6
4872 fi
4873
4874 echo $ac_n "checking for inmax_ in -lM77""... $ac_c" 1>&6
4875 echo "configure:4876: checking for inmax_ in -lM77" >&5
4876 ac_lib_var=`echo M77'_'inmax_ | sed 'y%./+-%__p_%'`
4877 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4878 echo $ac_n "(cached) $ac_c" 1>&6
4879 else
4880 ac_save_LIBS="$LIBS"
4881 LIBS="-lM77 $F77LIBS $LIBS"
4882 cat > conftest.$ac_ext <<EOF
4883 #line 4884 "configure"
4884 #include "confdefs.h"
4885 /* Override any gcc2 internal prototype to avoid an error. */
4886 /* We use char because int might match the return type of a gcc2
4887 builtin and then its argument prototype would still apply. */
4888 char inmax_();
4889
4890 int main() {
4891 inmax_()
4892 ; return 0; }
4893 EOF
4894 if { (eval echo configure:4895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4895 rm -rf conftest*
4896 eval "ac_cv_lib_$ac_lib_var=yes"
4897 else
4898 echo "configure: failed program was:" >&5
4899 cat conftest.$ac_ext >&5
4900 rm -rf conftest*
4901 eval "ac_cv_lib_$ac_lib_var=no"
4902 fi
4903 rm -f conftest*
4904 LIBS="$ac_save_LIBS"
4905
4906 fi
4907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4908 echo "$ac_t""yes" 1>&6
4909 F77LIBS="$F77LIBS -lM77"
4910 else
4911 echo "$ac_t""no" 1>&6
4912 fi
4913
4914 ;;
4915 mips-sgi-irix*)
4916 echo $ac_n "checking for s_copy in -lF77""... $ac_c" 1>&6
4917 echo "configure:4918: checking for s_copy in -lF77" >&5
4918 ac_lib_var=`echo F77'_'s_copy | sed 'y%./+-%__p_%'`
4919 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4920 echo $ac_n "(cached) $ac_c" 1>&6
4921 else
4922 ac_save_LIBS="$LIBS"
4923 LIBS="-lF77 $F77LIBS $LIBS"
4924 cat > conftest.$ac_ext <<EOF
4925 #line 4926 "configure"
4926 #include "confdefs.h"
4927 /* Override any gcc2 internal prototype to avoid an error. */
4928 /* We use char because int might match the return type of a gcc2
4929 builtin and then its argument prototype would still apply. */
4930 char s_copy();
4931
4932 int main() {
4933 s_copy()
4934 ; return 0; }
4935 EOF
4936 if { (eval echo configure:4937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4937 rm -rf conftest*
4938 eval "ac_cv_lib_$ac_lib_var=yes"
4939 else
4940 echo "configure: failed program was:" >&5
4941 cat conftest.$ac_ext >&5
4942 rm -rf conftest*
4943 eval "ac_cv_lib_$ac_lib_var=no"
4944 fi
4945 rm -f conftest*
4946 LIBS="$ac_save_LIBS"
4947
4948 fi
4949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4950 echo "$ac_t""yes" 1>&6
4951 F77LIBS="$F77LIBS -lF77"
4952 else
4953 echo "$ac_t""no" 1>&6
4954 fi
4955
4956 echo $ac_n "checking for f_exit in -lI77""... $ac_c" 1>&6
4957 echo "configure:4958: checking for f_exit in -lI77" >&5
4958 ac_lib_var=`echo I77'_'f_exit | sed 'y%./+-%__p_%'`
4959 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4960 echo $ac_n "(cached) $ac_c" 1>&6
4961 else
4962 ac_save_LIBS="$LIBS"
4963 LIBS="-lI77 $F77LIBS $LIBS"
4964 cat > conftest.$ac_ext <<EOF
4965 #line 4966 "configure"
4966 #include "confdefs.h"
4967 /* Override any gcc2 internal prototype to avoid an error. */
4968 /* We use char because int might match the return type of a gcc2
4969 builtin and then its argument prototype would still apply. */
4970 char f_exit();
4971
4972 int main() {
4973 f_exit()
4974 ; return 0; }
4975 EOF
4976 if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4977 rm -rf conftest*
4978 eval "ac_cv_lib_$ac_lib_var=yes"
4979 else
4980 echo "configure: failed program was:" >&5
4981 cat conftest.$ac_ext >&5
4982 rm -rf conftest*
4983 eval "ac_cv_lib_$ac_lib_var=no"
4984 fi
4985 rm -f conftest*
4986 LIBS="$ac_save_LIBS"
4987
4988 fi
4989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4990 echo "$ac_t""yes" 1>&6
4991 F77LIBS="$F77LIBS -lI77"
4992 else
4993 echo "$ac_t""no" 1>&6
4994 fi
4995
4996 echo $ac_n "checking for mkidxname in -lisam""... $ac_c" 1>&6
4997 echo "configure:4998: checking for mkidxname in -lisam" >&5
4998 ac_lib_var=`echo isam'_'mkidxname | sed 'y%./+-%__p_%'`
4999 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5000 echo $ac_n "(cached) $ac_c" 1>&6
5001 else
5002 ac_save_LIBS="$LIBS"
5003 LIBS="-lisam $F77LIBS $LIBS"
5004 cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007 /* Override any gcc2 internal prototype to avoid an error. */
5008 /* We use char because int might match the return type of a gcc2
5009 builtin and then its argument prototype would still apply. */
5010 char mkidxname();
5011
5012 int main() {
5013 mkidxname()
5014 ; return 0; }
5015 EOF
5016 if { (eval echo configure:5017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5017 rm -rf conftest*
5018 eval "ac_cv_lib_$ac_lib_var=yes"
5019 else
5020 echo "configure: failed program was:" >&5
5021 cat conftest.$ac_ext >&5
5022 rm -rf conftest*
5023 eval "ac_cv_lib_$ac_lib_var=no"
5024 fi
5025 rm -f conftest*
5026 LIBS="$ac_save_LIBS"
5027
5028 fi
5029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5030 echo "$ac_t""yes" 1>&6
5031 F77LIBS="$F77LIBS -lisam"
5032 else
5033 echo "$ac_t""no" 1>&6
5034 fi
5035
5036 ;;
5037 *)
5038 echo $ac_n "checking for printf in -lF77""... $ac_c" 1>&6
5039 echo "configure:5040: checking for printf in -lF77" >&5
5040 ac_lib_var=`echo F77'_'printf | sed 'y%./+-%__p_%'`
5041 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5042 echo $ac_n "(cached) $ac_c" 1>&6
5043 else
5044 ac_save_LIBS="$LIBS"
5045 LIBS="-lF77 $F77LIBS $LIBS"
5046 cat > conftest.$ac_ext <<EOF
5047 #line 5048 "configure"
5048 #include "confdefs.h"
5049 /* Override any gcc2 internal prototype to avoid an error. */
5050 /* We use char because int might match the return type of a gcc2
5051 builtin and then its argument prototype would still apply. */
5052 char printf();
5053
5054 int main() {
5055 printf()
5056 ; return 0; }
5057 EOF
5058 if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5059 rm -rf conftest*
5060 eval "ac_cv_lib_$ac_lib_var=yes"
5061 else
5062 echo "configure: failed program was:" >&5
5063 cat conftest.$ac_ext >&5
5064 rm -rf conftest*
5065 eval "ac_cv_lib_$ac_lib_var=no"
5066 fi
5067 rm -f conftest*
5068 LIBS="$ac_save_LIBS"
5069
5070 fi
5071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5072 echo "$ac_t""yes" 1>&6
5073 F77LIBS="$F77LIBS -lF77"
5074 else
5075 echo "$ac_t""no" 1>&6
5076 fi
5077
5078 echo $ac_n "checking for printf in -lM77""... $ac_c" 1>&6
5079 echo "configure:5080: checking for printf in -lM77" >&5
5080 ac_lib_var=`echo M77'_'printf | sed 'y%./+-%__p_%'`
5081 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5082 echo $ac_n "(cached) $ac_c" 1>&6
5083 else
5084 ac_save_LIBS="$LIBS"
5085 LIBS="-lM77 $F77LIBS $LIBS"
5086 cat > conftest.$ac_ext <<EOF
5087 #line 5088 "configure"
5088 #include "confdefs.h"
5089 /* Override any gcc2 internal prototype to avoid an error. */
5090 /* We use char because int might match the return type of a gcc2
5091 builtin and then its argument prototype would still apply. */
5092 char printf();
5093
5094 int main() {
5095 printf()
5096 ; return 0; }
5097 EOF
5098 if { (eval echo configure:5099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5099 rm -rf conftest*
5100 eval "ac_cv_lib_$ac_lib_var=yes"
5101 else
5102 echo "configure: failed program was:" >&5
5103 cat conftest.$ac_ext >&5
5104 rm -rf conftest*
5105 eval "ac_cv_lib_$ac_lib_var=no"
5106 fi
5107 rm -f conftest*
5108 LIBS="$ac_save_LIBS"
5109
5110 fi
5111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5112 echo "$ac_t""yes" 1>&6
5113 F77LIBS="$F77LIBS -lM77"
5114 else
5115 echo "$ac_t""no" 1>&6
5116 fi
5117
5118 echo $ac_n "checking for pow_dd in -lf2c""... $ac_c" 1>&6
5119 echo "configure:5120: checking for pow_dd in -lf2c" >&5
5120 ac_lib_var=`echo f2c'_'pow_dd | sed 'y%./+-%__p_%'`
5121 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5122 echo $ac_n "(cached) $ac_c" 1>&6
5123 else
5124 ac_save_LIBS="$LIBS"
5125 LIBS="-lf2c $F77LIBS $LIBS"
5126 cat > conftest.$ac_ext <<EOF
5127 #line 5128 "configure"
5128 #include "confdefs.h"
5129 /* Override any gcc2 internal prototype to avoid an error. */
5130 /* We use char because int might match the return type of a gcc2
5131 builtin and then its argument prototype would still apply. */
5132 char pow_dd();
5133
5134 int main() {
5135 pow_dd()
5136 ; return 0; }
5137 EOF
5138 if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5139 rm -rf conftest*
5140 eval "ac_cv_lib_$ac_lib_var=yes"
5141 else
5142 echo "configure: failed program was:" >&5
5143 cat conftest.$ac_ext >&5
5144 rm -rf conftest*
5145 eval "ac_cv_lib_$ac_lib_var=no"
5146 fi
5147 rm -f conftest*
5148 LIBS="$ac_save_LIBS"
5149
5150 fi
5151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5152 echo "$ac_t""yes" 1>&6
5153 F77LIBS="$F77LIBS -lf2c"
5154 else
5155 echo "$ac_t""no" 1>&6
5156 fi
5157
5158 echo $ac_n "checking for printf in -lf77""... $ac_c" 1>&6
5159 echo "configure:5160: checking for printf in -lf77" >&5
5160 ac_lib_var=`echo f77'_'printf | sed 'y%./+-%__p_%'`
5161 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5162 echo $ac_n "(cached) $ac_c" 1>&6
5163 else
5164 ac_save_LIBS="$LIBS"
5165 LIBS="-lf77 $F77LIBS $LIBS"
5166 cat > conftest.$ac_ext <<EOF
5167 #line 5168 "configure"
5168 #include "confdefs.h"
5169 /* Override any gcc2 internal prototype to avoid an error. */
5170 /* We use char because int might match the return type of a gcc2
5171 builtin and then its argument prototype would still apply. */
5172 char printf();
5173
5174 int main() {
5175 printf()
5176 ; return 0; }
5177 EOF
5178 if { (eval echo configure:5179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5179 rm -rf conftest*
5180 eval "ac_cv_lib_$ac_lib_var=yes"
5181 else
5182 echo "configure: failed program was:" >&5
5183 cat conftest.$ac_ext >&5
5184 rm -rf conftest*
5185 eval "ac_cv_lib_$ac_lib_var=no"
5186 fi
5187 rm -f conftest*
5188 LIBS="$ac_save_LIBS"
5189
5190 fi
5191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5192 echo "$ac_t""yes" 1>&6
5193 F77LIBS="$F77LIBS -lf77"
5194 else
5195 echo "$ac_t""no" 1>&6
5196 fi
5197
5198 echo $ac_n "checking for printf in -lfor""... $ac_c" 1>&6
5199 echo "configure:5200: checking for printf in -lfor" >&5
5200 ac_lib_var=`echo for'_'printf | sed 'y%./+-%__p_%'`
5201 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5202 echo $ac_n "(cached) $ac_c" 1>&6
5203 else
5204 ac_save_LIBS="$LIBS"
5205 LIBS="-lfor $F77LIBS $LIBS"
5206 cat > conftest.$ac_ext <<EOF
5207 #line 5208 "configure"
5208 #include "confdefs.h"
5209 /* Override any gcc2 internal prototype to avoid an error. */
5210 /* We use char because int might match the return type of a gcc2
5211 builtin and then its argument prototype would still apply. */
5212 char printf();
5213
5214 int main() {
5215 printf()
5216 ; return 0; }
5217 EOF
5218 if { (eval echo configure:5219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5219 rm -rf conftest*
5220 eval "ac_cv_lib_$ac_lib_var=yes"
5221 else
5222 echo "configure: failed program was:" >&5
5223 cat conftest.$ac_ext >&5
5224 rm -rf conftest*
5225 eval "ac_cv_lib_$ac_lib_var=no"
5226 fi
5227 rm -f conftest*
5228 LIBS="$ac_save_LIBS"
5229
5230 fi
5231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5232 echo "$ac_t""yes" 1>&6
5233 F77LIBS="$F77LIBS -lfor"
5234 else
5235 echo "$ac_t""no" 1>&6
5236 fi
5237
5238 echo $ac_n "checking for printf in -lots""... $ac_c" 1>&6
5239 echo "configure:5240: checking for printf in -lots" >&5
5240 ac_lib_var=`echo ots'_'printf | sed 'y%./+-%__p_%'`
5241 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5242 echo $ac_n "(cached) $ac_c" 1>&6
5243 else
5244 ac_save_LIBS="$LIBS"
5245 LIBS="-lots $F77LIBS $LIBS"
5246 cat > conftest.$ac_ext <<EOF
5247 #line 5248 "configure"
5248 #include "confdefs.h"
5249 /* Override any gcc2 internal prototype to avoid an error. */
5250 /* We use char because int might match the return type of a gcc2
5251 builtin and then its argument prototype would still apply. */
5252 char printf();
5253
5254 int main() {
5255 printf()
5256 ; return 0; }
5257 EOF
5258 if { (eval echo configure:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5259 rm -rf conftest*
5260 eval "ac_cv_lib_$ac_lib_var=yes"
5261 else
5262 echo "configure: failed program was:" >&5
5263 cat conftest.$ac_ext >&5
5264 rm -rf conftest*
5265 eval "ac_cv_lib_$ac_lib_var=no"
5266 fi
5267 rm -f conftest*
5268 LIBS="$ac_save_LIBS"
5269
5270 fi
5271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5272 echo "$ac_t""yes" 1>&6
5273 F77LIBS="$F77LIBS -lots"
5274 else
5275 echo "$ac_t""no" 1>&6
5276 fi
5277
5278 echo $ac_n "checking for printf in -lUfor""... $ac_c" 1>&6
5279 echo "configure:5280: checking for printf in -lUfor" >&5
5280 ac_lib_var=`echo Ufor'_'printf | sed 'y%./+-%__p_%'`
5281 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5282 echo $ac_n "(cached) $ac_c" 1>&6
5283 else
5284 ac_save_LIBS="$LIBS"
5285 LIBS="-lUfor $F77LIBS $LIBS"
5286 cat > conftest.$ac_ext <<EOF
5287 #line 5288 "configure"
5288 #include "confdefs.h"
5289 /* Override any gcc2 internal prototype to avoid an error. */
5290 /* We use char because int might match the return type of a gcc2
5291 builtin and then its argument prototype would still apply. */
5292 char printf();
5293
5294 int main() {
5295 printf()
5296 ; return 0; }
5297 EOF
5298 if { (eval echo configure:5299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5299 rm -rf conftest*
5300 eval "ac_cv_lib_$ac_lib_var=yes"
5301 else
5302 echo "configure: failed program was:" >&5
5303 cat conftest.$ac_ext >&5
5304 rm -rf conftest*
5305 eval "ac_cv_lib_$ac_lib_var=no"
5306 fi
5307 rm -f conftest*
5308 LIBS="$ac_save_LIBS"
5309
5310 fi
5311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5312 echo "$ac_t""yes" 1>&6
5313 F77LIBS="$F77LIBS -lUfor"
5314 else
5315 echo "$ac_t""no" 1>&6
5316 fi
5317
5318 ;;
5319 esac
5320 fi
5321
5322 # asc_subdirs are the extra fortran subdirectories we have to visit
5323 # to build the fortran libraries. Initialize it to empty here.
5324 asc_subdirs=''
5325
5326 # Initialize the blas variables
5327 make_blaslib=''
5328
5329 # Check whether --with-blas or --without-blas was given.
5330 if test "${with_blas+set}" = set; then
5331 withval="$with_blas"
5332 :
5333 else
5334 with_blas=yes
5335 fi
5336
5337 case "$with_fortran$with_blas" in
5338 no*)
5339 # Fortran is disabled; ignore this option (if present)
5340 BLASLIB=
5341 ;;
5342 *no)
5343 # It is an error if the user chooses to build without
5344 # the BLAS library if Fortran is enabled.
5345 { echo "configure: error: Bad option '--without-blas'
5346 To support Fortran calls, ASCEND must be compiled with a blas library" 1>&2; exit 1; }
5347 ;;
5348 *build)
5349 # Fortran is enabled and the user specified --with-blas=build
5350 # For a search for BLAS source code and tell the Makefile
5351 # to build it; useful for testing configure.
5352 blas_src_file="$srcdir/blas/dcopy.f"
5353 echo $ac_n "checking for blas source file $blas_src_file ""... $ac_c" 1>&6
5354 echo "configure:5355: checking for blas source file $blas_src_file " >&5
5355 if test -f $blas_src_file ; then
5356 echo "$ac_t""yes" 1>&6
5357 BLASLIB="$ascpwd/ascend4/archive/libascblas.a"
5358 make_blaslib='make-blaslib'
5359 blaslib_makefile="blas/Makefile"
5360 asc_subdirs="$asc_subdirs ../blas"
5361 else
5362 echo "$ac_t""no" 1>&6
5363 { echo "configure: error: User specified '--with-blas=build' but
5364 configure cannot find the blas source file $blas_src_file" 1>&2; exit 1; }
5365 fi
5366 ;;
5367 *yes)
5368 # Fortran in enabled and the user didn't give the --with-blas
5369 # option or didn't give the library's location.
5370 # Search for a compiled libblas.a or libascblas.a; if that
5371 # fails, look for BLAS source code; if that also fails,
5372 # disable all Fortran and print a warning.
5373 for ac_prog in libblas.a libascblas.a
5374 do
5375 # Extract the first word of "$ac_prog", so it can be a program name with args.
5376 set dummy $ac_prog; ac_word=$2
5377 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5378 echo "configure:5379: checking for $ac_word" >&5
5379 if eval "test \"`echo '$''{'ac_cv_path_BLASLIB'+set}'`\" = set"; then
5380 echo $ac_n "(cached) $ac_c" 1>&6
5381 else
5382 case "$BLASLIB" in
5383 /*)
5384 ac_cv_path_BLASLIB="$BLASLIB" # Let the user override the test with a path.
5385 ;;
5386 ?:/*)
5387 ac_cv_path_BLASLIB="$BLASLIB" # Let the user override the test with a dos path.
5388 ;;
5389 *)
5390 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5391 ac_dummy="$asc_f77_support_dirs"
5392 for ac_dir in $ac_dummy; do
5393 test -z "$ac_dir" && ac_dir=.
5394 if test -f $ac_dir/$ac_word; then
5395 ac_cv_path_BLASLIB="$ac_dir/$ac_word"
5396 break
5397 fi
5398 done
5399 IFS="$ac_save_ifs"
5400 ;;
5401 esac
5402 fi
5403 BLASLIB="$ac_cv_path_BLASLIB"
5404 if test -n "$BLASLIB"; then
5405 echo "$ac_t""$BLASLIB" 1>&6
5406 else
5407 echo "$ac_t""no" 1>&6
5408 fi
5409
5410 test -n "$BLASLIB" && break
5411 done
5412
5413 blas_src_file="$srcdir/blas/dcopy.f"
5414 if test -z "$BLASLIB" -a -n "$blas_src_file" ; then
5415 echo $ac_n "checking for blas source file $blas_src_file ""... $ac_c" 1>&6
5416 echo "configure:5417: checking for blas source file $blas_src_file " >&5
5417 if test -f $blas_src_file ; then
5418 echo "$ac_t""yes" 1>&6
5419 BLASLIB="$ascpwd/ascend4/archive/libascblas.a"
5420 make_blaslib='make-blaslib'
5421 blaslib_makefile="blas/Makefile"
5422 asc_subdirs="$asc_subdirs ../blas"
5423 else
5424 echo "$ac_t""no" 1>&6
5425 fi
5426 fi
5427 if test -z "$BLASLIB" ; then
5428 with_fortran=no
5429 echo "configure: warning: Cannot find libblas.a, libascblas.a, nor blas
5430 source code. Building ASCEND without integration, MINOS, and CONOPT
5431 support. To specify a specific location for the blas library, run
5432 configure again with the argument:
5433 --with-blas=BLASLIB
5434 where BLASLIB is the full path to the blas library file." 1>&2
5435 fi
5436 ;;
5437 *)
5438 # The user gave us --with-blas=BLASLIB, use that as the
5439 # location of the BLAS library.
5440 BLASLIB="$with_blas"
5441 ;;
5442 esac
5443
5444
5445 # Initialize the linpack variables
5446 make_lpaklib=''
5447
5448 # Check whether --with-linpack or --without-linpack was given.
5449 if test "${with_linpack+set}" = set; then
5450 withval="$with_linpack"
5451 :
5452 else
5453 with_linpack=yes
5454 fi
5455
5456 case "$with_fortran$with_linpack" in
5457 no*)
5458 # Fortran is disabled; ignore this option (if present)
5459 LPAKLIB=
5460 ;;
5461 *no)
5462 # It is an error if the user chooses to build without
5463 # the LINPACK library if Fortran is enabled.
5464 { echo "configure: error: Bad option '--without-linpack'
5465 To support Fortran calls, ASCEND must be compiled with a
5466 linpack library." 1>&2; exit 1; }
5467 ;;
5468 *build)
5469 # Fortran is enabled and the user specified --with-linpack=build
5470 # For a search for LINPACK source code and tell the Makefile
5471 # to build it; useful for testing configure.
5472 lpak_src_file="$srcdir/linpack/d1mach.f"
5473 echo $ac_n "checking for linpack source file $lpak_src_file ""... $ac_c" 1>&6
5474 echo "configure:5475: checking for linpack source file $lpak_src_file " >&5
5475 if test -f $lpak_src_file ; then
5476 echo "$ac_t""yes" 1>&6
5477 LPAKLIB="$ascpwd/ascend4/archive/libasclpak.a"
5478 make_lpaklib='make-lpaklib'
5479 lpaklib_makefile="linpack/Makefile"
5480 asc_subdirs="$asc_subdirs ../linpack"
5481 else
5482 echo "$ac_t""no" 1>&6
5483 { echo "configure: error: User specified '--with-linpack=build' but
5484 configure cannot find the linpack source file $lpak_src_file" 1>&2; exit 1; }
5485 fi
5486 ;;
5487 *yes)
5488 # Fortran in enabled and the user didn't give the --with-linpack
5489 # option or didn't give the library's location.
5490 # Search for a compiled liblpak.a or libasclpak.a; if that
5491 # fails, look for LINPACK source code; if that also fails,
5492 # disable all Fortran and print a warning.
5493 for ac_prog in liblpak.a libasclpak.a
5494 do
5495 # Extract the first word of "$ac_prog", so it can be a program name with args.
5496 set dummy $ac_prog; ac_word=$2
5497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5498 echo "configure:5499: checking for $ac_word" >&5
5499 if eval "test \"`echo '$''{'ac_cv_path_LPAKLIB'+set}'`\" = set"; then
5500 echo $ac_n "(cached) $ac_c" 1>&6
5501 else
5502 case "$LPAKLIB" in
5503 /*)
5504 ac_cv_path_LPAKLIB="$LPAKLIB" # Let the user override the test with a path.
5505 ;;
5506 ?:/*)
5507 ac_cv_path_LPAKLIB="$LPAKLIB" # Let the user override the test with a dos path.
5508 ;;
5509 *)
5510 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5511 ac_dummy="$asc_f77_support_dirs"
5512 for ac_dir in $ac_dummy; do
5513 test -z "$ac_dir" && ac_dir=.
5514 if test -f $ac_dir/$ac_word; then
5515 ac_cv_path_LPAKLIB="$ac_dir/$ac_word"
5516 break
5517 fi
5518 done
5519 IFS="$ac_save_ifs"
5520 ;;
5521 esac
5522 fi
5523 LPAKLIB="$ac_cv_path_LPAKLIB"
5524 if test -n "$LPAKLIB"; then
5525 echo "$ac_t""$LPAKLIB" 1>&6
5526 else
5527 echo "$ac_t""no" 1>&6
5528 fi
5529
5530 test -n "$LPAKLIB" && break
5531 done
5532
5533 lpak_src_file="$srcdir/linpack/d1mach.f"
5534 if test -z "$LPAKLIB" -a -n "$lpak_src_file" ; then
5535 echo $ac_n "checking for linpack source file $lpak_src_file ""... $ac_c" 1>&6
5536 echo "configure:5537: checking for linpack source file $lpak_src_file " >&5
5537 if test -f $lpak_src_file ; then
5538 echo "$ac_t""yes" 1>&6
5539 LPAKLIB="$ascpwd/ascend4/archive/libasclpak.a"
5540 make_lpaklib='make-lpaklib'
5541 lpaklib_makefile="linpack/Makefile"
5542 asc_subdirs="$asc_subdirs ../linpack"
5543 else
5544 echo "$ac_t""no" 1>&6
5545 fi
5546 fi
5547 if test -z "$LPAKLIB" ; then
5548 with_fortran=no
5549 echo "configure: warning: Cannot find liblpak.a, libasclpak.a, nor linpack
5550 source code. Building ASCEND without integration, MINOS, and CONOPT
5551 support. To specify a specific location for the linpack library, run
5552 configure again with the argument:
5553 --with-linpack=LPAKLIB
5554 where LPAKLIB is the full path to the linpack library file." 1>&2
5555 fi
5556 ;;
5557 *)
5558 # The user gave us --with-linkpack=LINKPACKLIB, use that
5559 # as the location of the LINKPACK library.
5560 LPAKLIB="$with_linpack"
5561 ;;
5562 esac
5563
5564
5565 # Initialize the lsod variables
5566 make_lsodlib=''
5567 HAVE_LSOD=''
5568
5569 # Check whether --with-lsod or --without-lsod was given.
5570 if test "${with_lsod+set}" = set; then
5571 withval="$with_lsod"
5572 :
5573 else
5574 with_lsod=yes
5575 fi
5576
5577 case "$with_fortran$with_lsod" in
5578 no*)
5579 # Fortran is disabled; ignore this option (if present)
5580 LSODLIB=
5581 with_lsod=no
5582 ;;
5583 *no)
5584 # Fortran is enabled but the user specified --without-lsod
5585 LSODLIB=
5586 ;;
5587 *build)
5588 # Fortran is enabled and the user specified --with-lsod=build
5589 # For a search for LSOD source code and tell the Makefile
5590 # to build it; useful for testing configure.
5591 lsod_src_file="$srcdir/lsod/lsode.f"
5592 echo $ac_n "checking for lsod source file $lsod_src_file ""... $ac_c" 1>&6
5593 echo "configure:5594: checking for lsod source file $lsod_src_file " >&5
5594 if test -f $lsod_src_file ; then
5595 echo "$ac_t""yes" 1>&6
5596 LSODLIB="$ascpwd/ascend4/archive/libinteg.a"
5597 make_lsodlib='make-lsodlib'
5598 lsodlib_makefile="lsod/Makefile"
5599 asc_subdirs="$asc_subdirs ../lsod"
5600 HAVE_LSOD='-DSTATIC_LSOD'
5601 else
5602 echo "$ac_t""no" 1>&6
5603 { echo "configure: error: User specified '--with-lsod=build' but
5604 configure cannot find the lsod source file $lsod_src_file" 1>&2; exit 1; }
5605 fi
5606 ;;
5607 *yes)
5608 # Fortran in enabled and the user didn't give the --with-lsod
5609 # option or didn't give the library's location.
5610 # Search for a compiled libinteg.a; if that fails, look
5611 # for LSOD source code; if that also fails, disable LSOD
5612 # and print a warning.
5613 for ac_prog in libinteg.a libasclsod.a
5614 do
5615 # Extract the first word of "$ac_prog", so it can be a program name with args.
5616 set dummy $ac_prog; ac_word=$2
5617 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5618 echo "configure:5619: checking for $ac_word" >&5
5619 if eval "test \"`echo '$''{'ac_cv_path_LSODLIB'+set}'`\" = set"; then
5620 echo $ac_n "(cached) $ac_c" 1>&6
5621 else
5622 case "$LSODLIB" in
5623 /*)
5624 ac_cv_path_LSODLIB="$LSODLIB" # Let the user override the test with a path.
5625 ;;
5626 ?:/*)
5627 ac_cv_path_LSODLIB="$LSODLIB" # Let the user override the test with a dos path.
5628 ;;
5629 *)
5630 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5631 ac_dummy="$asc_f77_support_dirs"
5632 for ac_dir in $ac_dummy; do
5633 test -z "$ac_dir" && ac_dir=.
5634 if test -f $ac_dir/$ac_word; then
5635 ac_cv_path_LSODLIB="$ac_dir/$ac_word"
5636 break
5637 fi
5638 done
5639 IFS="$ac_save_ifs"
5640 ;;
5641 esac
5642 fi
5643 LSODLIB="$ac_cv_path_LSODLIB"
5644 if test -n "$LSODLIB"; then
5645 echo "$ac_t""$LSODLIB" 1>&6
5646 else
5647 echo "$ac_t""no" 1>&6
5648 fi
5649
5650 test -n "$LSODLIB" && break
5651 done
5652
5653 lsod_src_file="$srcdir/lsod/lsode.f"
5654 if test -z "$LSODLIB" -a -n "$lsod_src_file" ; then
5655 echo $ac_n "checking for lsod source file $lsod_src_file ""... $ac_c" 1>&6
5656 echo "configure:5657: checking for lsod source file $lsod_src_file " >&5
5657 if test -f $lsod_src_file ; then
5658 echo "$ac_t""yes" 1>&6
5659 LSODLIB="$ascpwd/ascend4/archive/libinteg.a"
5660 make_lsodlib='make-lsodlib'
5661 lsodlib_makefile="lsod/Makefile"
5662 asc_subdirs="$asc_subdirs ../lsod"
5663 else
5664 echo "$ac_t""no" 1>&6
5665 fi
5666 fi
5667 if test -z "$LSODLIB" ; then
5668 with_lsod=no
5669 echo "configure: warning: Cannot find libinteg.a nor the lsod
5670 source code. Building ASCEND without integration
5671 support. To specify a specific location for the lsod library, run
5672 configure again with the argument:
5673 --with-lsod=LSODLIB
5674 where LSODLIB is the full path to the lsod integration library file." 1>&2
5675 else
5676 HAVE_LSOD='-DSTATIC_LSOD'
5677 fi
5678 ;;
5679 *)
5680 # The user gave us --with-lsod=LSODLIB, use that as the
5681 # location of the LSOD library and define -DSTATIC_LSOD.
5682 LSODLIB="$with_lsod"
5683 HAVE_LSOD='-DSTATIC_LSOD'
5684 ;;
5685 esac
5686
5687
5688 # Initialize the optsqp/rsqp variables
5689 make_rsqplib=''
5690 HAVE_OPTSQP=''
5691 OPTSQPLIB=''
5692
5693
5694
5695 # Initialize the conopt variables
5696 make_conoptlib=''
5697 HAVE_CONOPT=''
5698
5699 # Check whether --with-conopt or --without-conopt was given.
5700 if test "${with_conopt+set}" = set; then
5701 withval="$with_conopt"
5702 :
5703 else
5704 with_conopt=yes
5705 fi
5706
5707 case "$with_fortran$with_conopt" in
5708 no*)
5709 # Fortran is disabled; ignore this option (if present)
5710 CONOPTLIB=
5711 with_copopt=no
5712 ;;
5713 *no)
5714 # Fortran is enabled but the user specified --without-conopt
5715 CONOPTLIB=
5716 ;;
5717 *yes)
5718 # Fortran in enabled and the user didn't give the --with-conopt
5719 # option or didn't give the library's location.
5720 # Search for a compiled libconsub.a; if that fails,
5721 # disable CONOPT and print a warning.
5722 for ac_prog in libconsub.a
5723 do
5724 # Extract the first word of "$ac_prog", so it can be a program name with args.
5725 set dummy $ac_prog; ac_word=$2
5726 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5727 echo "configure:5728: checking for $ac_word" >&5
5728 if eval "test \"`echo '$''{'ac_cv_path_CONOPTLIB'+set}'`\" = set"; then
5729 echo $ac_n "(cached) $ac_c" 1>&6
5730 else
5731 case "$CONOPTLIB" in
5732 /*)
5733 ac_cv_path_CONOPTLIB="$CONOPTLIB" # Let the user override the test with a path.
5734 ;;
5735 ?:/*)
5736 ac_cv_path_CONOPTLIB="$CONOPTLIB" # Let the user override the test with a dos path.
5737 ;;
5738 *)
5739 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5740 ac_dummy="$asc_f77_support_dirs"
5741 for ac_dir in $ac_dummy; do
5742 test -z "$ac_dir" && ac_dir=.
5743 if test -f $ac_dir/$ac_word; then
5744 ac_cv_path_CONOPTLIB="$ac_dir/$ac_word"
5745 break
5746 fi
5747 done
5748 IFS="$ac_save_ifs"
5749 ;;
5750 esac
5751 fi
5752 CONOPTLIB="$ac_cv_path_CONOPTLIB"
5753 if test -n "$CONOPTLIB"; then
5754 echo "$ac_t""$CONOPTLIB" 1>&6
5755 else
5756 echo "$ac_t""no" 1>&6
5757 fi
5758
5759 test -n "$CONOPTLIB" && break
5760 done
5761
5762 # Since conopt_src_file is empty, we don't search for conopt
5763 # source code.
5764 conopt_src_file=""
5765 if test -z "$CONOPTLIB" -a -n "$conopt_src_file" ; then
5766 echo $ac_n "checking for conopt source file $conopt_src_file ""... $ac_c" 1>&6
5767 echo "configure:5768: checking for conopt source file $conopt_src_file " >&5
5768 if test -f $conopt_src_file ; then
5769 echo "$ac_t""yes" 1>&6
5770 CONOPTLIB="$ascpwd/ascend4/archive/libconsub.a"
5771 make_conoptlib='make-conoptlib'
5772 conoptlib_makefile="conopt/Makefile"
5773 asc_subdirs="$asc_subdirs ../conopt"
5774 else
5775 echo "$ac_t""no" 1>&6
5776 fi
5777 fi
5778 if test -z "$CONOPTLIB" ; then
5779 with_conopt=no
5780 echo "configure: warning: Cannot find libconsub.a nor conopt
5781 source code. Building ASCEND without CONOPT
5782 support. To specify a specific location for the conopt library, run
5783 configure again with the argument:
5784 --with-conopt=CONOPTLIB
5785 where CONOPTLIB is the full path to the conopt library file.
5786 CONOPT is proprietary and is distributed by:
5787 Arne Drud +45 44 49 03 23 adrud@arki.dk" 1>&2
5788 else
5789 HAVE_CONOPT='-DSTATIC_CONOPT'
5790 fi
5791 ;;
5792 *)
5793 # The user gave us --with-conopt=CONOPTLIB, use that as the
5794 # location of the CONOPT library and define -DSTATIC_CONOPT.
5795 CONOPTLIB="$with_conopt"
5796 HAVE_CONOPT='-DSTATIC_CONOPT'
5797 ;;
5798 esac
5799
5800
5801 # Initialize the minos variables
5802 make_minoslib=''
5803 HAVE_MINOS=''
5804 MINOSLIB=''
5805
5806
5807
5808 #--------------------------------------------------------------------
5809 # Other trees which may or may not be present. If present,
5810 # generate the Makefiles in the tree unless the user passes in
5811 # a --without-<package> argument.
5812 #
5813 # Valid <package> values are: TK, models, help
5814 #
5815 # We could have `configure' do this for us via
5816 # AC_CONFIG_SUBDIRS, but `configure' scripts in the trees can
5817 # only be one directory removed from this configure script.
5818 # For example, it would be nice to have `models' under
5819 # `ascend4', but `configure' doesn't like `ascend4/models' as
5820 # an argument to AC_CONFIG_SUBDIRS.
5821 #
5822 # To get around this problem, we do things by hand. :-)
5823 #
5824 # If the user gives a --without-<package> argument, we have
5825 # nothing to do for that package.
5826 #
5827 # Otherwise,
5828 # * Set `subdir_file_exists' to a file that should exist in the
5829 # subtree---this is how we know that the subtree is really
5830 # there.
5831 # * Set `subdir_locations' to the list of locations, relative
5832 # to this configure script, where the subtree may live.
5833 # * Set `subdir_output' to the list of makefiles to generate;
5834 # the variable `subdir_root' in this list will be replaced
5835 # with the correct value from `subdir_locations'.
5836 #
5837 # To see which (if any) of the values in `subdir_locations' is
5838 # the correct one, we set `subdir_root' to each value in
5839 # `subdir_locations' and check for the existence of
5840 # $fullpathsrcdir/$subdir_root/$subdir_file_exists, where
5841 # $fullpathsrcdir is the full path to the source directory. If
5842 # that file exists, we
5843 # * Set <package>_dir_root to ../$subdir_root. The "../" is
5844 # needed since this value is used in the `ascend4' directory
5845 # and $subdir_root is relative to the parent of `ascend4'.
5846 # * Substitute the value of $subdir_root into `subdir_output'
5847 # and set the result to <package>_makefiles: the list of
5848 # Makefiles for configure to generate.
5849 # * Each package needs to be able to find its way back to
5850 # ascend4/ConfigAscend; it needs to go back up the tree
5851 # however many levels deep it is---i.e., `foo/bar/baz' should
5852 # become `../../..' and this does it: sed 's,[^/][^/]*,..,g'
5853 # but we need to quote the [] from m4, so we get this bizarre
5854 # thing: sed 's,[[^/][^/]]*,..,g' Set <package>_topbuilddir
5855 # to this result.
5856 # * Exit the loop.
5857 #--------------------------------------------------------------------
5858
5859 # Initialize variables
5860 tkdir_root=''
5861 tkdir_topbuilddir=''
5862
5863 # Check whether --with-tkdir or --without-tkdir was given.
5864 if test "${with_tkdir+set}" = set; then
5865 withval="$with_tkdir"
5866 :
5867 else
5868 with_tkdir=yes
5869 fi
5870
5871 if test ! "X$with_tkdir" = "Xno" ; then
5872 subdir_file_exists='AscendRC'
5873 subdir_locations='ascend4/TK'
5874 subdir_output='
5875 $subdir_root/Makefile
5876 $subdir_root/Makefile.Rules:$subdir_root/Makefile.Rules.in
5877 $subdir_root/bitmaps/Makefile
5878 $subdir_root/templates/Makefile
5879 '
5880 for subdir_root in $subdir_locations ; do
5881 if test -f $fullpathsrcdir/$subdir_root/$subdir_file_exists ; then
5882 tkdir_root="../$subdir_root"
5883 tkdir_makefiles=`eval echo $subdir_output`
5884 tkdir_topbuilddir=`echo "$subdir_root" | sed 's,[^/][^/]*,..,g'`
5885 break
5886 fi
5887 done
5888 fi
5889
5890 # Initialize variables
5891 models_dir_root=''
5892 models_topbuilddir=''
5893
5894 # Check whether --with-models or --without-models was given.
5895 if test "${with_models+set}" = set; then
5896 withval="$with_models"
5897 :
5898 else
5899 with_models=yes
5900 fi
5901
5902 if test ! "X$with_models" = "Xno" ; then
5903 subdir_file_exists='system.a4l'
5904 subdir_locations='models ascend4/models'
5905 subdir_output='
5906 $subdir_root/Makefile
5907 $subdir_root/Makefile.Rules:$subdir_root/Makefile.Rules.in
5908 $subdir_root/ben/Makefile
5909 '
5910 ## $subdir_root/examples/Makefile
5911 ## $subdir_root/examples/abbott/Makefile
5912 ## $subdir_root/examples/flexible_design/Makefile
5913 ## $subdir_root/libraries/Makefile
5914 ## $subdir_root/libraries/abbott/Makefile
5915 ## $subdir_root/pending/Makefile
5916 ## $subdir_root/pending/examples/Makefile
5917 ## $subdir_root/pending/libraries/Makefile
5918 for subdir_root in $subdir_locations ; do
5919 if test -f $fullpathsrcdir/$subdir_root/$subdir_file_exists ; then
5920 models_dir_root="../$subdir_root"
5921 models_makefiles=`eval echo $subdir_output`
5922 models_topbuilddir=`echo "$subdir_root" | sed 's,[^/][^/]*,..,g'`
5923 break
5924 fi
5925 done
5926 fi
5927
5928
5929 # Initialize variables
5930 help_dir_root=''
5931 help_topbuilddir=''
5932
5933
5934
5935 #--------------------------------------------------------------------
5936 # The variables we substitute into the Makefile.in files
5937 # and the command to actually generate the Makefiles
5938 #--------------------------------------------------------------------
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996 trap '' 1 2 15
5997
5998 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5999
6000 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6001 # Let make expand exec_prefix.
6002 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6003
6004 # Any assignment to VPATH causes Sun make to only execute
6005 # the first set of double-colon rules, so remove it if not needed.
6006 # If there is a colon in the path, we need to keep it.
6007 if test "x$srcdir" = x.; then
6008 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6009 fi
6010
6011 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6012
6013 # Transform confdefs.h into DEFS.
6014 # Protect against shell expansion while executing Makefile rules.
6015 # Protect against Makefile macro expansion.
6016 #
6017 # If the first sed substitution is executed (which looks for macros that
6018 # take arguments), then we branch to the quote section. Otherwise,
6019 # look for a macro that doesn't take arguments.
6020 cat >confdef2opt.sed <<\_ACEOF
6021 t clear
6022 : clear
6023 s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
6024 t quote
6025 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
6026 t quote
6027 d
6028 : quote
6029 s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
6030 s,\[,\\&,g
6031 s,\],\\&,g
6032 s,\$,$$,g
6033 p
6034 _ACEOF
6035 # We use echo to avoid assuming a particular line-breaking character.
6036 # The extra dot is to prevent the shell from consuming trailing
6037 # line-breaks from the sub-command output. A line-break within
6038 # single-quotes doesn't work because, if this script is created in a
6039 # platform that uses two characters for line-breaks (e.g., DOS), tr
6040 # would break.
6041 ac_LF_and_DOT=`echo; echo .`
6042 DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
6043 rm -f confdef2opt.sed
6044
6045
6046 # Without the "./", some shells look in PATH for config.status.
6047 : ${CONFIG_STATUS=./config.status}
6048
6049 echo creating $CONFIG_STATUS
6050 rm -f $CONFIG_STATUS
6051 cat > $CONFIG_STATUS <<EOF
6052 #! /bin/sh
6053 # Generated automatically by configure.
6054 # Run this file to recreate the current configuration.
6055 # This directory was configured as follows,
6056 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6057 #
6058 # $0 $ac_configure_args
6059 #
6060 # Compiler output produced by configure, useful for debugging
6061 # configure, is in ./config.log if it exists.
6062
6063 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6064 for ac_option
6065 do
6066 case "\$ac_option" in
6067 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6068 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6069 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6070 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6071 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6072 exit 0 ;;
6073 -help | --help | --hel | --he | --h)
6074 echo "\$ac_cs_usage"; exit 0 ;;
6075 *) echo "\$ac_cs_usage"; exit 1 ;;
6076 esac
6077 done
6078
6079 ac_given_srcdir=$srcdir
6080 ac_given_INSTALL="$INSTALL"
6081
6082 trap 'rm -fr `echo "ascend4/ConfigAscend:ascend4/ConfigAscend.in
6083 ascend4/Makefile
6084 ascend4/bin/ascend4.sh
6085 ascend4/Makefile.Rules:ascend4/Makefile.Rules.in
6086 ascend4/archive/Makefile
6087 ascend4/bin/Makefile
6088 ascend4/compiler/Makefile
6089 ascend4/general/Makefile
6090 ascend4/interface/Makefile
6091 ascend4/lib/Makefile
6092 ascend4/packages/Makefile
6093 ascend4/solver/Makefile
6094 ascend4/utilities/Makefile
6095 $tkdir_makefiles
6096 $models_makefiles
6097 $help_makefiles
6098 $blaslib_makefile
6099 $lpaklib_makefile
6100 $lsodlib_makefile
6101 $rsqplib_makefile
6102 $conoptlib_makefile
6103 $minoslib_makefile
6104 " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6105 EOF
6106 cat >> $CONFIG_STATUS <<EOF
6107
6108 # Protect against being on the right side of a sed subst in config.status.
6109 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6110 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6111 $ac_vpsub
6112 $extrasub
6113 s%@SHELL@%$SHELL%g
6114 s%@CFLAGS@%$CFLAGS%g
6115 s%@CPPFLAGS@%$CPPFLAGS%g
6116 s%@CXXFLAGS@%$CXXFLAGS%g
6117 s%@FFLAGS@%$FFLAGS%g
6118 s%@DEFS@%$DEFS%g
6119 s%@LDFLAGS@%$LDFLAGS%g
6120 s%@LIBS@%$LIBS%g
6121 s%@exec_prefix@%$exec_prefix%g
6122 s%@prefix@%$prefix%g
6123 s%@program_transform_name@%$program_transform_name%g
6124 s%@bindir@%$bindir%g
6125 s%@sbindir@%$sbindir%g
6126 s%@libexecdir@%$libexecdir%g
6127 s%@datadir@%$datadir%g
6128 s%@sysconfdir@%$sysconfdir%g
6129 s%@sharedstatedir@%$sharedstatedir%g
6130 s%@localstatedir@%$localstatedir%g
6131 s%@libdir@%$libdir%g
6132 s%@includedir@%$includedir%g
6133 s%@oldincludedir@%$oldincludedir%g
6134 s%@infodir@%$infodir%g
6135 s%@mandir@%$mandir%g
6136 s%@RANLIB@%$RANLIB%g
6137 s%@LN_S@%$LN_S%g
6138 s%@SET_MAKE@%$SET_MAKE%g
6139 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6140 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6141 s%@INSTALL_DATA@%$INSTALL_DATA%g
6142 s%@host@%$host%g
6143 s%@host_alias@%$host_alias%g
6144 s%@host_cpu@%$host_cpu%g
6145 s%@host_vendor@%$host_vendor%g
6146 s%@host_os@%$host_os%g
6147 s%@asc_cc1@%$asc_cc1%g
6148 s%@asc_cc2@%$asc_cc2%g
6149 s%@asc_cc3@%$asc_cc3%g
6150 s%@CC@%$CC%g
6151 s%@CPP@%$CPP%g
6152 s%@DEBUG_LIBS@%$DEBUG_LIBS%g
6153 s%@YACC@%$YACC%g
6154 s%@LEX@%$LEX%g
6155 s%@LEXLIB@%$LEXLIB%g
6156 s%@TCL_LIB@%$TCL_LIB%g
6157 s%@TCL_HDR@%$TCL_HDR%g
6158 s%@TK_LIB@%$TK_LIB%g
6159 s%@TK_HDR@%$TK_HDR%g
6160 s%@TKTABLE_LIB@%$TKTABLE_LIB%g
6161 s%@F77@%$F77%g
6162 s%@BLASLIB@%$BLASLIB%g
6163 s%@LPAKLIB@%$LPAKLIB%g
6164 s%@LSODLIB@%$LSODLIB%g
6165 s%@CONOPTLIB@%$CONOPTLIB%g
6166 s%@ascpwd@%$ascpwd%g
6167 s%@fullpathsrcdir@%$fullpathsrcdir%g
6168 s%@asc_include@%$asc_include%g
6169 s%@scanner_src@%$scanner_src%g
6170 s%@typer_src@%$typer_src%g
6171 s%@MATH_LIBS@%$MATH_LIBS%g
6172 s%@X11_INCLUDES@%$X11_INCLUDES%g
6173 s%@X11_LIBRARIES@%$X11_LIBRARIES%g
6174 s%@X11_RUN_PATH@%$X11_RUN_PATH%g
6175 s%@X11_EXTRA_LIBS@%$X11_EXTRA_LIBS%g
6176 s%@DL_LIBS@%$DL_LIBS%g
6177 s%@LD_FLAGS@%$LD_FLAGS%g
6178 s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
6179 s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
6180 s%@SHLIB_LD@%$SHLIB_LD%g
6181 s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
6182 s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
6183 s%@ASC_LIB_SUFFIX@%$ASC_LIB_SUFFIX%g
6184 s%@ASC_TK_LIBRARY@%$ASC_TK_LIBRARY%g
6185 s%@ASC_TCL_LIBRARY@%$ASC_TCL_LIBRARY%g
6186 s%@HAVE_TKTABLE@%$HAVE_TKTABLE%g
6187 s%@asc_subdirs@%$asc_subdirs%g
6188 s%@F77LIBS@%$F77LIBS%g
6189 s%@make_blaslib@%$make_blaslib%g
6190 s%@make_lpaklib@%$make_lpaklib%g
6191 s%@make_lsodlib@%$make_lsodlib%g
6192 s%@HAVE_LSOD@%$HAVE_LSOD%g
6193 s%@OPTSQPLIB@%$OPTSQPLIB%g
6194 s%@make_rsqplib@%$make_rsqplib%g
6195 s%@HAVE_OPTSQP@%$HAVE_OPTSQP%g
6196 s%@MINOSLIB@%$MINOSLIB%g
6197 s%@make_minoslib@%$make_minoslib%g
6198 s%@HAVE_MINOS@%$HAVE_MINOS%g
6199 s%@make_conoptlib@%$make_conoptlib%g
6200 s%@HAVE_CONOPT@%$HAVE_CONOPT%g
6201 s%@tkdir_root@%$tkdir_root%g
6202 s%@tkdir_topbuilddir@%$tkdir_topbuilddir%g
6203 s%@models_dir_root@%$models_dir_root%g
6204 s%@models_topbuilddir@%$models_topbuilddir%g
6205 s%@help_dir_root@%$help_dir_root%g
6206 s%@help_topbuilddir@%$help_topbuilddir%g
6207
6208 CEOF
6209 EOF
6210
6211 cat >> $CONFIG_STATUS <<\EOF
6212
6213 # Split the substitutions into bite-sized pieces for seds with
6214 # small command number limits, like on Digital OSF/1 and HP-UX.
6215 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6216 ac_file=1 # Number of current file.
6217 ac_beg=1 # First line for current file.
6218 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6219 ac_more_lines=:
6220 ac_sed_cmds=""
6221 while $ac_more_lines; do
6222 if test $ac_beg -gt 1; then
6223 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6224 else
6225 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6226 fi
6227 if test ! -s conftest.s$ac_file; then
6228 ac_more_lines=false
6229 rm -f conftest.s$ac_file
6230 else
6231 if test -z "$ac_sed_cmds"; then
6232 ac_sed_cmds="sed -f conftest.s$ac_file"
6233 else
6234 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6235 fi
6236 ac_file=`expr $ac_file + 1`
6237 ac_beg=$ac_end
6238 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6239 fi
6240 done
6241 if test -z "$ac_sed_cmds"; then
6242 ac_sed_cmds=cat
6243 fi
6244 EOF
6245
6246 cat >> $CONFIG_STATUS <<EOF
6247
6248 CONFIG_FILES=\${CONFIG_FILES-"ascend4/ConfigAscend:ascend4/ConfigAscend.in
6249 ascend4/Makefile
6250 ascend4/bin/ascend4.sh
6251 ascend4/Makefile.Rules:ascend4/Makefile.Rules.in
6252 ascend4/archive/Makefile
6253 ascend4/bin/Makefile
6254 ascend4/compiler/Makefile
6255 ascend4/general/Makefile
6256 ascend4/interface/Makefile
6257 ascend4/lib/Makefile
6258 ascend4/packages/Makefile
6259 ascend4/solver/Makefile
6260 ascend4/utilities/Makefile
6261 $tkdir_makefiles
6262 $models_makefiles
6263 $help_makefiles
6264 $blaslib_makefile
6265 $lpaklib_makefile
6266 $lsodlib_makefile
6267 $rsqplib_makefile
6268 $conoptlib_makefile
6269 $minoslib_makefile
6270 "}
6271 EOF
6272 cat >> $CONFIG_STATUS <<\EOF
6273 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6274 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6275 case "$ac_file" in
6276 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6277 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6278 *) ac_file_in="${ac_file}.in" ;;
6279 esac
6280
6281 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6282
6283 # Remove last slash and all that follows it. Not all systems have dirname.
6284 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6285 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6286 # The file is in a subdirectory.
6287 test ! -d "$ac_dir" && mkdir "$ac_dir"
6288 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6289 # A "../" for each directory in $ac_dir_suffix.
6290 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6291 else
6292 ac_dir_suffix= ac_dots=
6293 fi
6294
6295 case "$ac_given_srcdir" in
6296 .) srcdir=.
6297 if test -z "$ac_dots"; then top_srcdir=.
6298 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6299 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6300 *) # Relative path.
6301 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6302 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6303 esac
6304
6305 case "$ac_given_INSTALL" in
6306 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6307 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6308 esac
6309
6310 echo creating "$ac_file"
6311 rm -f "$ac_file"
6312 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6313 case "$ac_file" in
6314 *Makefile*) ac_comsub="1i\\
6315 # $configure_input" ;;
6316 *) ac_comsub= ;;
6317 esac
6318
6319 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6320 sed -e "$ac_comsub
6321 s%@configure_input@%$configure_input%g
6322 s%@srcdir@%$srcdir%g
6323 s%@top_srcdir@%$top_srcdir%g
6324 s%@INSTALL@%$INSTALL%g
6325 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6326 fi; done
6327 rm -f conftest.s*
6328
6329 EOF
6330 cat >> $CONFIG_STATUS <<EOF
6331
6332 EOF
6333 cat >> $CONFIG_STATUS <<\EOF
6334
6335 exit 0
6336 EOF
6337 chmod +x $CONFIG_STATUS
6338 rm -fr confdefs* $ac_clean_files
6339 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

Properties

Name Value
svn:executable *

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22