/[ascend]/trunk/configure.in
ViewVC logotype

Annotation of /trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations) (download)
Fri Oct 29 20:54:12 2004 UTC (19 years, 1 month ago) by aw0a
File size: 76799 byte(s)
Setting up web subdirectory in repository
1 aw0a 1 #--------------------------------------------------------------------
2     # A configure.in file for ASCEND.
3     #
4     # Process `configure.in' file with `autoconf' to produce
5     # a `configure' script. This `configure.in' was prepared
6     # for AutoConf v2.12/13.
7     #--------------------------------------------------------------------
8    
9     #--------------------------------------------------------------------
10     # Disable caching since it seems to get in the way
11     # more times than it helps us.
12     #--------------------------------------------------------------------
13     define([AC_CACHE_LOAD], )dnl
14     define([AC_CACHE_SAVE], )dnl
15    
16    
17     #--------------------------------------------------------------------
18     # This file must exist for configure to continue. It's
19     # how we know we're in the right place.
20     #--------------------------------------------------------------------
21     AC_INIT(ascend4/compiler/ascParse.y)
22    
23    
24     #--------------------------------------------------------------------
25     # CVS Most Recent Revision Data
26     # Put this data after AC_INIT since we want this information
27     # to also appear in configure and autoconf, when creating
28     # configure, strips all comments that appear in configure.in
29     # before AC_INIT
30     # $Revision: 1.38 $
31     # $Date: 2003/11/23 19:36:39 $
32     # $Author: ballan $
33     # $Source: /afs/cs.cmu.edu/project/ascend/Repository/configure.in,v $
34     #--------------------------------------------------------------------
35    
36    
37     #--------------------------------------------------------------------
38     # Where configure should look for files it needs.
39     #--------------------------------------------------------------------
40     AC_CONFIG_AUX_DIR(config)
41    
42     #--------------------------------------------------------------------
43     # Set the output variables prefix and exec_prefix that
44     # determine where things will be installed.
45     #--------------------------------------------------------------------
46     if test "${prefix}" = "NONE"; then
47     prefix=/usr/local
48     fi
49     if test "${exec_prefix}" = "NONE"; then
50     exec_prefix=$prefix
51     fi
52    
53    
54     #--------------------------------------------------------------------
55     # For the Fortran support libraries and the TCL/TK libraries
56     # and header files, we unfortunately need the full path to
57     # these files. The problem with having the full path is that
58     # if the user moves the source tree, things will break unless
59     # the user re-runs configure.
60     #--------------------------------------------------------------------
61     ascpwd=`pwd`
62     fullpathsrcdir=`cd $srcdir ; pwd`
63    
64    
65     #--------------------------------------------------------------------
66     # The asc_include variable is (directory) path to the ascend4
67     # SOURCE directory relative to the immediate subdirectories of
68     # the ascend4 OBJECT directory.
69     # -- If we are building in the source directory ($srcdir is "."
70     # asc_include is simply "../."
71     # -- If the user gives us a full path to the configure script,
72     # we just append "/ascend4" to that full path:
73     # "$scrdir/ascend4"
74     # -- For any other value of $srcdir (like ../src/), we go up
75     # two directories (to get to the top of the OBJECT tree,
76     # insert the source directory, and then go back down one
77     # level to the ascend4 directory: "../../$srcdir/ascend4"
78     #--------------------------------------------------------------------
79     case "$srcdir" in
80     .)
81     asc_include="../$srcdir"
82     ;;
83     /*)
84     asc_include="$srcdir/ascend4"
85     ;;
86     *)
87     asc_include="../../$srcdir/ascend4"
88     ;;
89     esac
90    
91    
92     #--------------------------------------------------------------------
93     # Do basic checks to determine
94     # * if we have `ranlib'
95     # * if we can create symbolic links
96     # * if `make' sets the MAKE macro
97     # * a bsd-compatible `install' program
98     # If we use the install-sh script that comes with configure,
99     # prefix it with the current directory so it'll work in
100     # subdirectories. Unfortunately, it won't work if the user
101     # moves the source tree.
102     #--------------------------------------------------------------------
103     AC_PROG_RANLIB
104     AC_PROG_LN_S
105     AC_PROG_MAKE_SET
106     AC_PROG_INSTALL
107     case "X$INSTALL" in
108     X/*)
109     ;;
110     *)
111     INSTALL="$ascpwd/$INSTALL"
112     ;;
113     esac
114    
115    
116     #--------------------------------------------------------------------
117     # Get the host type for various checks along the way
118     #--------------------------------------------------------------------
119     AC_CANONICAL_HOST
120    
121    
122     #--------------------------------------------------------------------
123     # Check for the C compiler: set CC and CFLAGS.
124     # If the user does NOT specify `--enable-gcc' on the configure
125     # command command line, set CC to either the envar CC or `cc'.
126     # Call AC_PROG_CC which will use the value of CC (perhaps set
127     # immediately above) or will check for `gcc' and then for `cc'
128     # if `gcc' is not found.
129     #
130     # If we are using GCC, then assume it groks ANSI. Otherwise,
131     # try to compile a small program using ANSI constructs with
132     # CC. If this fails, try to locate each of the following:
133     # c89 xlc acc
134     # and if successful, see if it compiles an ANSI C program.
135     # (Doing this in a loop would be ideal, but configure caches
136     # the result of AC_CHECK_PROG and uses the cached value for
137     # all but the first pass through the loop. This is also the
138     # reason we have to use a different variable asc_cc1, asc_cc2
139     # for each call to AC_CHECK_PROG.
140     #
141     # If we do not find an ANSI C compiler, print a warning and
142     # use the first value of CC we tried.
143     #--------------------------------------------------------------------
144    
145     AC_ARG_ENABLE(gcc,
146     [
147     ASCEND specific options
148    
149     Compiler options:
150     --enable-gcc allow use of gcc if avaiable],
151     [asc_gcc_ok=$enableval], [asc_gcc_ok=no])
152     if test ! "$asc_gcc_ok" = "yes"; then
153     CC=${CC-cc}
154     fi
155     asc_orig_cc=$CC
156    
157     if test "X$asc_gcc_ok" = "Xyes" ; then
158     asc_ansi_ok=yes
159     else
160     AC_MSG_CHECKING(
161     [whether $CC understands const, void*, and function prototypes])
162     AC_TRY_COMPILE( , [
163     int tstproto(int arg1, char * arg2);
164     int tstconst(const int arg1, const char *arg2);
165     int tstvoidp(const int arg1, const void *arg2); ],
166     [ asc_ansi_ok=yes ], [ asc_ansi_ok=no ])
167     AC_MSG_RESULT($asc_ansi_ok)
168     fi
169    
170     if test "$asc_ansi_ok" = no ; then
171     AC_CHECK_PROG(asc_cc1, c89, c89, NONE)
172     if test ! "$asc_cc1" = NONE ; then
173     CC=$asc_cc1
174     AC_MSG_CHECKING(
175     [whether $CC understands const, void*, and function prototypes])
176     AC_TRY_COMPILE( , [
177     int tstproto(int arg1, char * arg2);
178     int tstconst(const int arg1, const char *arg2);
179     int tstvoidp(const int arg1, const void *arg2); ],
180     [ asc_ansi_ok=yes ], [ asc_ansi_ok=no ])
181     AC_MSG_RESULT($asc_ansi_ok)
182     fi
183     fi
184    
185     if test "$asc_ansi_ok" = no ; then
186     AC_CHECK_PROG(asc_cc2, xlc, xlc, NONE)
187     if test ! "$asc_cc2" = NONE ; then
188     CC=$asc_cc2
189     AC_MSG_CHECKING(
190     [whether $CC understands const, void*, and function prototypes])
191     AC_TRY_COMPILE( , [
192     int tstproto(int arg1, char * arg2);
193     int tstconst(const int arg1, const char *arg2);
194     int tstvoidp(const int arg1, const void *arg2); ],
195     [ asc_ansi_ok=yes ], [ asc_ansi_ok=no ])
196     AC_MSG_RESULT($asc_ansi_ok)
197     fi
198     fi
199    
200     if test "$asc_ansi_ok" = no ; then
201     AC_CHECK_PROG(asc_cc3, acc, acc, NONE)
202     if test ! "$asc_cc3" = NONE ; then
203     CC=$asc_cc3
204     AC_MSG_CHECKING(
205     [whether $CC understands const, void*, and function prototypes])
206     AC_TRY_COMPILE( , [
207     int tstproto(int arg1, char * arg2);
208     int tstconst(const int arg1, const char *arg2);
209     int tstvoidp(const int arg1, const void *arg2); ],
210     [ asc_ansi_ok=yes ], [ asc_ansi_ok=no ])
211     AC_MSG_RESULT($asc_ansi_ok)
212     fi
213     fi
214    
215     AC_PROG_CC
216    
217     if test "$asc_ansi_ok" = no ; then
218     CC=$asc_orig_cc
219     AC_MSG_ERROR([Cannot find an ANSI C compiler. ASCEND will not build
220     without an ANSI compiler. If you have an ANSI compiler which
221     configure is not finding, set the CC environment variable to
222     the full path fo the compiler and rerun configure.])
223     fi
224    
225    
226     #--------------------------------------------------------------------
227     # Do other misc checks with CC and CFLAGS.
228     #
229     # Determine how to run the C preprocessor.
230     #
231     # If the user specifies --enable-optimization, remove `-g'
232     # from CFLAGS, add `-O' to CFLAGS, and define `NDEBUG'. If
233     # we are not building optimized, check for special libraries
234     # needed for building a debugging binary (currenly only
235     # /usr/lib/end.o under HPUX).
236     #
237     # Check if we're running on AIX; if so, add `-D_ALL_SOURCE'
238     # to CFLAGS.
239     #
240     # Check if we're running on HPUX; if so, add -D_HPUX_SOURCE'
241     # to CFLAGS unless the C preprocessor goes it for us.
242     #--------------------------------------------------------------------
243    
244     AC_PROG_CPP
245    
246     AC_ARG_ENABLE(optimization,
247     [ --enable-optimization optimize the C code while building ascend],
248     [asc_do_opt="$enableval"], [asc_do_opt=no])
249     if test "$asc_do_opt" = yes; then
250     CFLAGS=`echo "-O $CFLAGS " | sed 's/ -g / /g'`
251     AC_DEFINE(NDEBUG)
252     else
253     AC_PATH_PROG(DEBUG_LIBS, end.o, , /usr/lib)
254     fi
255    
256     AC_MSG_CHECKING([for AIX])
257     AC_EGREP_CPP(yes, [
258     #ifdef _AIX
259     yes
260     #endif
261     ], [ asc_aix=yes ; AC_DEFINE(_ALL_SOURCE) ], [asc_aix=no])
262     AC_MSG_RESULT($asc_aix)
263    
264     AC_MSG_CHECKING([whether -D_HPUX_SOURCE is needed])
265     AC_EGREP_CPP(yes, [
266     #ifdef __hpux
267     #ifndef _HPUX_SOURCE
268     yes
269     #endif
270     #endif
271     ], [ asc_hpux=yes ; AC_DEFINE(_HPUX_SOURCE) ], [asc_hpux=no])
272     AC_MSG_RESULT($asc_hpux)
273    
274     # Check the size of pointers; if cross compiling, assume 32 bit pointers
275     AC_CHECK_SIZEOF(void *, 4)
276    
277    
278     #--------------------------------------------------------------------
279     # Set YACC.
280     # See if we can find `yacc' ourselves; if not, call the
281     # autoconf macro which looks for `bison' and then for `yacc'
282     #--------------------------------------------------------------------
283     asc_found_yacc=0
284     AC_CHECK_PROG(YACC, yacc, yacc, [asc_found_yacc=no])
285     if test "$asc_found_yacc" = no ; then
286     AC_PROG_YACC
287     fi
288    
289    
290     #--------------------------------------------------------------------
291     # Set LEX.
292     # ASCEND requires a `flex' which understands -P (allows you to
293     # specify a prefix other than `yy'). The -P flag was added at
294     # the same time a -V (version) flag was added (version 2.4.1),
295     # so if `flex' understands -V, it'll understand -P (checking
296     # for -P directly requires a flex input file).
297     #
298     # 1. If `LEX' is not set, look for `flex' and set `LEX' to
299     # `flex' if found.
300     # 2. If `flex' was found, see if it understands -V. If so,
301     # set `scanner_src' and `typer_src' to have `flex' generate
302     # the C files from the flex input files
303     # ascend4/compiler/scanner.l & ascend4/interface/typelex.l
304     # We don't need to look for libfl.a since we define
305     # yywrap() ourselves.
306     # 3. If `flex' wasn't found or was found but isn't new enough:
307     # a. Print a warning message
308     # b. Set `scanner_src' and `typer_src' to use pre-generated
309     # C files for the flex files mentioned in (2).
310     # c. Set `LEX' to `lex'
311     # d. Search for the lex library `libl.a' and set LEXLIB to
312     # its location.
313     #--------------------------------------------------------------------
314     AC_CHECK_PROG(LEX, flex, flex)
315    
316     if test -n "$LEX" ; then
317     AC_MSG_CHECKING([whether $LEX is at least version 2.4.1])
318     echo "$LEX -V" 1>&5
319     if $LEX -V 1>&5 2>&5 ; then
320     AC_MSG_RESULT(yes)
321     scanner_src="scanner.c.from.flex"
322     typer_src="typelex.c.from.flex"
323     else
324     AC_MSG_RESULT(no)
325     LEX=''
326     fi
327     fi
328    
329     if test -z "$LEX" ; then
330     AC_MSG_WARN([Cannot find a flex lexer version 2.4.1 or greater.
331     Using pregenerated C files for ascend4/compiler/scanner.l
332     and ascend4/interface/typelex.l. If you have flex 2.4.1
333     or newer, set the LEX environment variable to its location
334     and run configure again.])
335     scanner_src="scanner.c.from.c"
336     typer_src="typelex.c.from.c"
337    
338     # let configure set LEX and LEXLIB even though we won't be using them
339     AC_PROG_LEX
340     fi
341    
342    
343     #--------------------------------------------------------------------
344     # Math libraries.
345     # On a few very rare systems, all of the libm.a stuff is
346     # already in libc.a. Set compiler flags accordingly.
347     # Also, Linux requires the "ieee" library for math to work
348     # right (and it must appear before "-lm").
349     #
350     # When building on HPUX with GCC, GCC cannot find `copysign'
351     # because it lives in an odd place; see if we need to add
352     # this odd place to MATH_LIBS.
353     #
354     # See if erf(), the error function, exists; if so, define
355     # HAVE_ERF.
356     #--------------------------------------------------------------------
357     AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
358    
359     AC_CHECK_LIB(ieee, printf, [MATH_LIBS="-lieee $MATH_LIBS"])
360    
361     if test -n "$MATH_LIBS" ; then
362     AC_CHECK_LIB(m, copysign, ,
363     AC_CHECK_LIB(m, drem, [MATH_LIBS="$MATH_LIBS /lib/pa1.1/libM.a"]
364     , , /lib/pa1.1/libM.a
365     ),
366     $MATH_LIBS)
367     fi
368    
369     # store the current list of libraries, add the math libraries to LIBS,
370     # check for erf(), then reset the value of LIBS.
371     asc_keep_LIBS="$LIBS"
372     LIBS="$LIBS $MATH_LIBS"
373     AC_CHECK_FUNCS(erf)
374     LIBS="$asc_keep_LIBS"
375    
376    
377     #--------------------------------------------------------------------
378     # Check for X11.
379     # We'll use the simple autoconf builtin macro for finding
380     # X11 until we find a reason not to.
381     #
382     # On Solaris and IRIX, add the path to the X library to the
383     # run-time shared-library-search-path so the ASCEND binary
384     # can find the X library without the user having to set
385     # LD_LIBRARY_PATH
386     #--------------------------------------------------------------------
387     AC_PATH_X
388     if test -n "$x_includes"; then
389     X11_INCLUDES="-I$x_includes"
390     fi
391     if test -n "$x_libraries"; then
392     X11_LIBRARIES="-L$x_libraries"
393     case "$host" in
394     sparc-sun-solaris*)
395     X11_RUN_PATH="-R$x_libraries"
396     ;;
397     mips-sgi-irix*)
398     X11_RUN_PATH="-rpath $x_libraries"
399     ;;
400     *)
401     X11_RUN_PATH=""
402     ;;
403     esac
404     fi
405    
406    
407     #--------------------------------------------------------------------
408     # Check for the existence of various libraries. The order here
409     # is important, so that then end up in the right order in the
410     # command line generated by make. The -lsocket and -lnsl
411     # libraries require a couple of special tricks:
412     # 1. Use "connect" and "accept" to check for -lsocket, and
413     # "gethostbyname" to check for -lnsl.
414     # 2. Use each function name only once: can't redo a check
415     # because autoconf caches the results of the last check
416     # and won't redo it.
417     # 3. Use -lnsl and -lsocket only if they supply procedures that
418     # aren't already present in the normal libraries. This is
419     # because IRIX 5.2 has libraries, but they aren't needed and
420     # they're bogus: they goof up name resolution if used.
421     # 4. On some SVR4 systems, can't use -lsocket without -lnsl
422     # too. To get around this problem, check for both libraries
423     # together if -lsocket doesn't work by itself.
424     #--------------------------------------------------------------------
425     dnl AC_CHECK_LIB(Xbsd, printf, [LIBS="$LIBS -lXbsd"])
426    
427     asc_checkBoth=0
428     AC_CHECK_FUNC(connect, [asc_checkSocket=0], [asc_checkSocket=1])
429     if test "$asc_checkSocket" = 1; then
430     AC_CHECK_LIB(socket, printf, [X11_EXTRA_LIBS="-lsocket"],[asc_checkBoth=1])
431     fi
432     if test "$asc_checkBoth" = 1; then
433     asc_oldLibs=$LIBS
434     X11_EXTRA_LIBS="-lsocket -lnsl"
435     LIBS="$LIBS $X11_EXTRA_LIBS"
436     AC_CHECK_FUNC(accept, asc_checkNsl=0, [X11_EXTRA_LIBS=""])
437     LIBS=$asc_oldLibs
438     fi
439     asc_oldLibs=$LIBS
440     LIBS="$LIBS $X11_EXTRA_LIBS"
441     AC_CHECK_FUNC(gethostbyname, ,
442     AC_CHECK_LIB(nsl, printf, [X11_EXTRA_LIBS="$X11_EXTRA_LIBS -lnsl"]))
443     LIBS=$asc_oldLibs
444    
445    
446     #--------------------------------------------------------------------
447     # The following comes directly from the configure.in file for
448     # Tcl8.0.
449     #
450     # The statements below define a collection of symbols related to
451     # dynamic loading and shared libraries:
452     #
453     # DL_OBJS - Name of the object file that implements dynamic
454     # loading for ASCEND on this system.
455     # DL_LIBS - Library file(s) to include in tclsh and other base
456     # applications in order for the "load" command to work.
457     # LD_FLAGS - Flags to pass to the compiler when linking object
458     # files into an executable application binary such
459     # as tclsh.
460     # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
461     # that tell the run-time dynamic linker where to look
462     # for shared libraries such as libtcl.so. Depends on
463     # the variable LIB_RUNTIME_DIR in the Makefile.
464     # MAKE_LIB - Command to execute to build the ASCEND library;
465     # differs depending on whether or not ASCEND is being
466     # compiled as a shared library.
467     # SHLIB_CFLAGS - Flags to pass to cc when compiling the components
468     # of a shared library (may request position-independent
469     # code, among other things).
470     # SHLIB_LD - Base command to use for combining object files
471     # into a shared library.
472     # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
473     # creating shared libraries. This symbol typically
474     # goes at the end of the "ld" commands that build
475     # shared libraries. The value of the symbol is
476     # "${LIBS}" if all of the dependent libraries should
477     # be specified when creating a shared library. If
478     # dependent libraries should not be specified (as on
479     # SunOS 4.x, where they cause the link to fail, or in
480     # general if ASCEND and Tk aren't themselves shared
481     # libraries), then this symbol has an empty string
482     # as its value.
483     # SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable
484     # extensions. An empty string means we don't know how
485     # to use shared libraries on this platform.
486     # ASC_LIB_FILE - Name of the file that contains the ASCEND library, such
487     # as libtcl7.8.so or libtcl7.8.a.
488     # ASC_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
489     # in the shared library name, using the $VERSION variable
490     # to put the version in the right place. This is used
491     # by platforms that need non-standard library names.
492     # Examples: ${VERSION}.so.1.1 on NetBSD, since it needs
493     # to have a version after the .so, and ${VERSION}.a
494     # on AIX, since the ASCEND shared library needs to have
495     # a .a extension whereas shared objects for loadable
496     # extensions have a .so extension. Defaults to
497     # ${VERSION}${SHLIB_SUFFIX}.
498     #--------------------------------------------------------------------
499    
500     # Step 1: set the variable "system" to hold the name and version number
501     # for the system. This can usually be done via the "uname" command, but
502     # there are a few systems, like Next, where this doesn't work.
503    
504     # Changed this to use the "$host" variable from AC_CANONICAL_HOST
505    
506     # Step 2: check for existence of -ldl library. This is needed because
507     # Linux can use either -ldl or -ldld for dynamic loading.
508    
509     AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
510    
511     # Step 3: set configuration options based on system name and version.
512    
513     ASC_SHARED_LIB_SUFFIX=""
514     ASC_UNSHARED_LIB_SUFFIX=""
515     ASC_LIB_VERSIONS_OK=ok
516     case $host in
517     *-aix*)
518     SHLIB_CFLAGS=""
519     SHLIB_LD="$fullpathsrcdir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512"
520     SHLIB_LD_LIBS='${LIBS}'
521     SHLIB_SUFFIX=".so"
522     DL_OBJS=""
523     DL_LIBS="-lld"
524     LD_FLAGS=""
525     LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
526     ASC_SHARED_LIB_SUFFIX='${VERSION}.a'
527     ;;
528     *-bsdi*)
529     SHLIB_CFLAGS=""
530     SHLIB_LD="shlicc -r"
531     SHLIB_LD_LIBS='${LIBS}'
532     SHLIB_SUFFIX=".so"
533     DL_OBJS=""
534     DL_LIBS="-ldl"
535     LD_FLAGS=""
536     LD_SEARCH_FLAGS=""
537     ;;
538     *-dgux*)
539     SHLIB_CFLAGS="-K PIC"
540     SHLIB_LD="cc -G"
541     SHLIB_LD_LIBS=""
542     SHLIB_SUFFIX=".so"
543     DL_OBJS=""
544     DL_LIBS="-ldl"
545     LD_FLAGS=""
546     LD_SEARCH_FLAGS=""
547     ;;
548     *-hpux8*|*-hpux9*|*-hpux10*)
549     AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
550     if test "$tcl_ok" = yes; then
551     SHLIB_CFLAGS="+z"
552     SHLIB_LD="ld -b"
553     SHLIB_LD_LIBS=""
554     SHLIB_SUFFIX=".sl"
555     DL_OBJS=""
556     DL_LIBS="-ldld"
557     LD_FLAGS="-Wl,-E"
558     LD_SEARCH_FLAGS='-Wl,+b,${LIB_RUNTIME_DIR}:.'
559     fi
560     ;;
561     *-irix4*)
562     SHLIB_CFLAGS="-G 0"
563     SHLIB_SUFFIX=".a"
564     SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
565     SHLIB_LD_LIBS='${LIBS}'
566     DL_OBJS=""
567     DL_LIBS=""
568     LD_FLAGS="-Wl,-D,08000000"
569     LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
570     ASC_SHARED_LIB_SUFFIX='${VERSION}.a'
571     ;;
572     *-irix5*|*-irix6.*)
573     SHLIB_CFLAGS=""
574     SHLIB_LD="ld -shared -rdata_shared"
575     SHLIB_LD_LIBS=""
576     SHLIB_SUFFIX=".so"
577     DL_OBJS=""
578     DL_LIBS=""
579     LD_FLAGS=""
580     LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
581     ;;
582     *-linux*)
583     SHLIB_CFLAGS="-fPIC"
584     SHLIB_LD_LIBS=""
585     SHLIB_SUFFIX=".so"
586     if test "$have_dl" = yes; then
587     SHLIB_LD="${CC} -shared"
588     DL_OBJS=""
589     DL_LIBS="-ldl"
590     LD_FLAGS="-rdynamic"
591     LD_SEARCH_FLAGS=""
592     else
593     AC_CHECK_HEADER(dld.h, [
594     SHLIB_LD="ld -shared"
595     DL_OBJS=""
596     DL_LIBS="-ldld"
597     LD_FLAGS=""
598     LD_SEARCH_FLAGS=""])
599     fi
600     ;;
601     MP-RAS-02*)
602     SHLIB_CFLAGS="-K PIC"
603     SHLIB_LD="cc -G"
604     SHLIB_LD_LIBS=""
605     SHLIB_SUFFIX=".so"
606     DL_OBJS=""
607     DL_LIBS="-ldl"
608     LD_FLAGS=""
609     LD_SEARCH_FLAGS=""
610     ;;
611     MP-RAS-*)
612     SHLIB_CFLAGS="-K PIC"
613     SHLIB_LD="cc -G"
614     SHLIB_LD_LIBS=""
615     SHLIB_SUFFIX=".so"
616     DL_OBJS=""
617     DL_LIBS="-ldl"
618     LD_FLAGS="-Wl,-Bexport"
619     LD_SEARCH_FLAGS=""
620     ;;
621     *-netbsd*|*-freebsd*|*-openbsd*)
622     # Not available on all versions: check for include file.
623     AC_CHECK_HEADER(dlfcn.h, [
624     SHLIB_CFLAGS="-fpic"
625     SHLIB_LD="ld -Bshareable -x"
626     SHLIB_LD_LIBS=""
627     SHLIB_SUFFIX=".so"
628     DL_OBJS=""
629     DL_LIBS=""
630     LD_FLAGS=""
631     LD_SEARCH_FLAGS=""
632     ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0'
633     ], [
634     SHLIB_CFLAGS=""
635     SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
636     SHLIB_LD_LIBS='${LIBS}'
637     SHLIB_SUFFIX=".a"
638     DL_OBJS=""
639     DL_LIBS=""
640     LD_FLAGS=""
641     LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
642     ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
643     ])
644    
645     # FreeBSD doesn't handle version numbers with dots.
646    
647     ASC_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
648     ASC_LIB_VERSIONS_OK=nodots
649     ;;
650     *-nextstep*)
651     SHLIB_CFLAGS=""
652     SHLIB_LD="cc -nostdlib -r"
653     SHLIB_LD_LIBS=""
654     SHLIB_SUFFIX=".so"
655     DL_OBJS=""
656     DL_LIBS=""
657     LD_FLAGS=""
658     LD_SEARCH_FLAGS=""
659     ;;
660     alpha-dec-osf*)
661     # Digital OSF/1
662     SHLIB_CFLAGS=""
663     SHLIB_LD='ld -shared -expect_unresolved "*"'
664     SHLIB_LD_LIBS=""
665     SHLIB_SUFFIX=".so"
666     DL_OBJS=""
667     DL_LIBS=""
668     LD_FLAGS=""
669     LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
670     ;;
671     *-riscos*)
672     SHLIB_CFLAGS="-G 0"
673     SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
674     SHLIB_LD_LIBS='${LIBS}'
675     SHLIB_SUFFIX=".a"
676     DL_OBJS=""
677     DL_LIBS=""
678     LD_FLAGS="-Wl,-D,08000000"
679     LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
680     ;;
681     SCO_SV-3.2*)
682     # Note, dlopen is available only on SCO 3.2.5 and greater. However,
683     # this test works, since "uname -s" was non-standard in 3.2.4 and
684     # below.
685     SHLIB_CFLAGS="-Kpic -belf"
686     SHLIB_LD="ld -G"
687     SHLIB_LD_LIBS=""
688     SHLIB_SUFFIX=".so"
689     DL_OBJS=""
690     DL_LIBS=""
691     LD_FLAGS="-belf -Wl,-Bexport"
692     LD_SEARCH_FLAGS=""
693     ;;
694     *-sni-sysv*)
695     SHLIB_CFLAGS="-K PIC"
696     SHLIB_LD="cc -G"
697     SHLIB_LD_LIBS=""
698     SHLIB_SUFFIX=".so"
699     DL_OBJS=""
700     DL_LIBS="-ldl"
701     LD_FLAGS=""
702     LD_SEARCH_FLAGS=""
703     ;;
704     *-sunos4*)
705     SHLIB_CFLAGS="-PIC"
706     SHLIB_LD="ld"
707     SHLIB_LD_LIBS=""
708     SHLIB_SUFFIX=".so"
709     DL_OBJS=""
710     DL_LIBS="-ldl"
711     LD_FLAGS=""
712     LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
713    
714     # SunOS can't handle version numbers with dots in them in library
715     # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
716     # requires an extra version number at the end of .so file names.
717     # So, the library has to have a name like libtcl75.so.1.0
718    
719     ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0'
720     ASC_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
721     ASC_LIB_VERSIONS_OK=nodots
722     ;;
723     *-solaris*)
724     SHLIB_CFLAGS="-KPIC"
725     SHLIB_LD="/usr/ccs/bin/ld -G -z text"
726    
727     # Note: need the LIBS below, otherwise Tk won't find ASCEND's
728     # symbols when dynamically loaded into tclsh.
729    
730     SHLIB_LD_LIBS='${LIBS}'
731     SHLIB_SUFFIX=".so"
732     DL_OBJS=""
733     DL_LIBS="-ldl"
734     LD_FLAGS=""
735     LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
736     ;;
737     *-ultrix4*)
738     SHLIB_CFLAGS="-G 0"
739     SHLIB_SUFFIX=".a"
740     SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
741     SHLIB_LD_LIBS='${LIBS}'
742     DL_OBJS=""
743     DL_LIBS=""
744     LD_FLAGS="-Wl,-D,08000000"
745     LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
746     ;;
747     mips-dde-sysv*)
748     SHLIB_CFLAGS="-KPIC"
749     SHLIB_LD="cc -G"
750     SHLIB_LD_LIBS=""
751     SHLIB_SUFFIX=".so"
752     DL_OBJS=""
753     DL_LIBS="-ldl"
754     # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
755     # that don't grok the -Bexport option. Test that it does.
756     hold_ldflags=$LDFLAGS
757     AC_MSG_CHECKING([for ld accepts -Bexport flag])
758     LDFLAGS="${LDFLAGS} -Wl,-Bexport"
759     AC_TRY_LINK(, [int i;], found=yes, found=no)
760     LDFLAGS=$hold_ldflags
761     AC_MSG_RESULT($found)
762     if test "$found" = yes; then
763     LD_FLAGS="-Wl,-Bexport"
764     else
765     LD_FLAGS=""
766     fi
767     LD_SEARCH_FLAGS=""
768     ;;
769     esac
770    
771     dnl >>>>Comment out the rest of the dynamic loading stuff until
772     dnl >>>>we're actually ready to use it for ASCEND
773     dnl >>>>
774     # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
775     # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop,
776     # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
777     # to determine which of several header files defines the a.out file
778     # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we
779     # support only a file format that is more or less version-7-compatible.
780     # In particular,
781     # - a.out files must begin with `struct exec'.
782     # - the N_TXTOFF on the `struct exec' must compute the seek address
783     # of the text segment
784     # - The `struct exec' must contain a_magic, a_text, a_data, a_bss
785     # and a_entry fields.
786     # The following compilation should succeed if and only if either sys/exec.h
787     # or a.out.h is usable for the purpose.
788     #
789     # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
790     # `struct exec' includes a second header that contains information that
791     # duplicates the v7 fields that are needed.
792     dnl >>>>
793     dnl >>>>if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
794     dnl >>>> AC_MSG_CHECKING([sys/exec.h])
795     dnl >>>> AC_TRY_COMPILE([#include <sys/exec.h>],[
796     dnl >>>> struct exec foo;
797     dnl >>>> unsigned long seek;
798     dnl >>>> int flag;
799     dnl >>>>#if defined(__mips) || defined(mips)
800     dnl >>>> seek = N_TXTOFF (foo.ex_f, foo.ex_o);
801     dnl >>>>#else
802     dnl >>>> seek = N_TXTOFF (foo);
803     dnl >>>>#endif
804     dnl >>>> flag = (foo.a_magic == OMAGIC);
805     dnl >>>> return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
806     dnl >>>>], tcl_ok=usable, tcl_ok=unusable)
807     dnl >>>> AC_MSG_RESULT($tcl_ok)
808     dnl >>>> if test $tcl_ok = usable; then
809     dnl >>>> AC_DEFINE(USE_SYS_EXEC_H)
810     dnl >>>> else
811     dnl >>>> AC_MSG_CHECKING([a.out.h])
812     dnl >>>> AC_TRY_COMPILE([#include <a.out.h>],[
813     dnl >>>> struct exec foo;
814     dnl >>>> unsigned long seek;
815     dnl >>>> int flag;
816     dnl >>>>#if defined(__mips) || defined(mips)
817     dnl >>>> seek = N_TXTOFF (foo.ex_f, foo.ex_o);
818     dnl >>>>#else
819     dnl >>>> seek = N_TXTOFF (foo);
820     dnl >>>>#endif
821     dnl >>>> flag = (foo.a_magic == OMAGIC);
822     dnl >>>> return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
823     dnl >>>> ], tcl_ok=usable, tcl_ok=unusable)
824     dnl >>>> AC_MSG_RESULT($tcl_ok)
825     dnl >>>> if test $tcl_ok = usable; then
826     dnl >>>> AC_DEFINE(USE_A_OUT_H)
827     dnl >>>> else
828     dnl >>>> AC_MSG_CHECKING([sys/exec_aout.h])
829     dnl >>>> AC_TRY_COMPILE([#include <sys/exec_aout.h>],[
830     dnl >>>> struct exec foo;
831     dnl >>>> unsigned long seek;
832     dnl >>>> int flag;
833     dnl >>>>#if defined(__mips) || defined(mips)
834     dnl >>>> seek = N_TXTOFF (foo.ex_f, foo.ex_o);
835     dnl >>>>#else
836     dnl >>>> seek = N_TXTOFF (foo);
837     dnl >>>>#endif
838     dnl >>>> flag = (foo.a_midmag == OMAGIC);
839     dnl >>>> return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
840     dnl >>>> ], tcl_ok=usable, tcl_ok=unusable)
841     dnl >>>> AC_MSG_RESULT($tcl_ok)
842     dnl >>>> if test $tcl_ok = usable; then
843     dnl >>>> AC_DEFINE(USE_SYS_EXEC_AOUT_H)
844     dnl >>>> else
845     dnl >>>> DL_OBJS=""
846     dnl >>>> fi
847     dnl >>>> fi
848     dnl >>>> fi
849     dnl >>>>fi
850     dnl >>>>
851     # Step 5: disable dynamic loading if requested via a command-line switch.
852     dnl >>>>
853     dnl >>>>AC_ARG_ENABLE(load,
854     dnl >>>> [ --disable-load disallow dynamic loading and "load" command],
855     dnl >>>> [tcl_ok=$enableval], [tcl_ok=yes])
856     dnl >>>>if test "$tcl_ok" = "no"; then
857     dnl >>>> DL_OBJS=""
858     dnl >>>>fi
859     dnl >>>>
860     dnl >>>>if test "x$DL_OBJS" != "x" ; then
861     dnl >>>> BUILD_DLTEST="\$(DLTEST_TARGETS)"
862     dnl >>>>else
863     dnl >>>> echo "Can't figure out how to do dynamic loading or shared libraries"
864     dnl >>>> echo "on this system."
865     dnl >>>> SHLIB_CFLAGS=""
866     dnl >>>> SHLIB_LD=""
867     dnl >>>> SHLIB_SUFFIX=""
868     dnl >>>> DL_OBJS=""
869     dnl >>>> DL_LIBS=""
870     dnl >>>> LD_FLAGS=""
871     dnl >>>> LD_SEARCH_FLAGS=""
872     dnl >>>> BUILD_DLTEST=""
873     dnl >>>>fi
874     dnl >>>>
875     dnl >>>># If we're running gcc, then change the C flags for compiling shared
876     dnl >>>># libraries to the right flags for gcc, instead of those for the
877     dnl >>>># standard manufacturer compiler.
878     dnl >>>>
879     dnl >>>>if test "$DL_OBJS" != "tclLoadNone.o" ; then
880     dnl >>>> if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
881     dnl >>>> case "$host" in
882     dnl >>>> *-aix*)
883     dnl >>>> ;;
884     dnl >>>> *-bsdi*)
885     dnl >>>> ;;
886     dnl >>>> *-irix*)
887     dnl >>>> ;;
888     dnl >>>> *-netbsd*|*-freebsd*|*-openbsd*)
889     dnl >>>> ;;
890     dnl >>>> *-riscos*)
891     dnl >>>> ;;
892     dnl >>>> *-ultrix4*)
893     dnl >>>> ;;
894     dnl >>>> *)
895     dnl >>>> SHLIB_CFLAGS="-fPIC"
896     dnl >>>> ;;
897     dnl >>>> esac
898     dnl >>>> fi
899     dnl >>>>fi
900    
901     #--------------------------------------------------------------------
902     # TCL / TK / TK-TABLE
903     #
904     # The user can specify the location of the Tcl and/or Tk
905     # libraries using the --with-tcl and --with-tk configure
906     # options. Print a warning if the user tries to say
907     # --without-tcl since ASCEND requires Tcl/Tk.
908     #
909     # If the user does not specify the location, we need to search
910     # for either shared or static versions of the Tcl and Tk
911     # libraries, and they must be for version 8.x of Tcl/Tk.
912     #
913     # Check for the static Tcl library in a list of reasonable
914     # locations. If we find it, verify that it is from Tcl 8.0 by
915     # looking for the symbol `TclCompileCatchCmd'. Remember, we
916     # need the math library and the dynamic loader library (-ldl or
917     # -ldld) to avoid undefined symbols when we test the version of
918     # the Tcl library.
919     #
920     # If we can't find a static Tcl8.0 library, try to find a
921     # dynamic one by calling AC_CHECK_LIB and looking for the
922     # function `TclCompileCatchCmd'. If we fail, print an error
923     # message and exit configure.
924     #
925     # Search for a version of tcl.h that contains `8.' in the
926     # TCL_MAJOR_VERSION macro; we look in a list of reasonable
927     # locations, then call AC_EGREP_HEADER to look for us.
928     #
929     # Repeat the process for the Tk library; the symbol we want is
930     # `Tk_NameOfFont'; remember we need the X library---and all the
931     # libraries it needs---as well as the Tcl library to avoid
932     # undefined symbols when we test the version of the Tk library.
933     #
934     # The user can use --with-tktable to specify a location for a
935     # static version of the Tk-Table library. If a value is
936     # specified, assume it is good and define the cpp macro
937     # STATIC_TABLE.
938     #
939     # If a value is not specified, look for libTktable.a; if we
940     # find it, assume it works and define the cpp macro
941     # STATIC_TABLE. If we don't find it, assume ASCEND will be
942     # able to dynamically load it at run time and tell the user
943     # about our assumption.
944     #--------------------------------------------------------------------
945     #
946     # a list of directories to search for the Tcl/Tk libraries
947     asc_tcl_library_dirs="
948     /usr/local/lib/ascend/lib
949     $prefix/lib:$exec_prefix/lib
950     $ascpwd/tcl8.0
951     $ascpwd/tcl8.0/unix
952     $ascpwd/tk8.0
953     $ascpwd/tk8.0/unix
954     $ascpwd/ascend4/lib
955     /lib
956     /usr/lib
957     /usr/local/lib
958     /usr/contributed/lib
959     /afs/cs/project/ascend/depot/@sys/lib
960     "
961     # a list of directories to search for the Tcl/Tk include files
962     asc_tcl_include_dirs="
963     /usr/local/lib/ascend/include
964     $prefix/include
965     $fullpathsrcdir/tcl8.0
966     $fullpathsrcdir/tcl8.0/generic
967     $fullpathsrcdir/tk8.0
968     $fullpathsrcdir/tk8.0/generic
969     $fullpathsrcdir/ascend4/include
970     $ascpwd/ascend4/include
971     /usr/include
972     /usr/local/include
973     /usr/contributed/include
974     /afs/cs/project/ascend/depot/common/include
975     "
976     # a list of directories to search for the TkTable library
977     asc_tk_table_dirs="
978     /usr/local/lib/ascend/lib/Tktable
979     $prefix/lib/Tktable
980     $exec_prefix/lib/Tktable
981     $ascpwd/tkTable1.80
982     $ascpwd/ascend4/lib
983     $ascpwd/ascend4/lib/Tktable
984     /afs/cs/project/ascend/depot/@sys/lib/Tktable
985     "
986     # see if the user gave us the location of the Tcl8.0
987     # library and/or header file
988     #
989     AC_ARG_WITH(tcl,
990     [Location of Tcl, Tk, and tkTable:
991     --with-tcl=LIBRARY,HEADER
992     The location of the Tcl8.0 library and/or header
993     For a static Tcl8.0 library, give the full path:
994     --with-tcl='/usr/local/lib/libtcl8.0.a'
995     For a dynamic library, give any -L options required:
996     --with-tcl='-L/usr/local/lib -ltcl8.0'
997     To specify only the header, leave off the library:
998     --with-tcl=',/usr/local/include/tcl.h'] ,
999     , [with_tcl=yes])
1000    
1001     case "$with_tcl" in
1002     no)
1003     # User specified --without-tcl; this makes no sense,
1004     # print a warning and search for it ourselves
1005     AC_MSG_WARN([Bad option '--without-tcl'
1006     ASCEND must be compiled with Tcl8.0.])
1007     with_tcllib=_searching
1008     with_tclhdr=_searching
1009     ;;
1010     yes|,|"")
1011     # User didn't give the option or didn't give useful
1012     # information, search for it ourselves
1013     with_tcllib=_searching
1014     with_tclhdr=_searching
1015     ;;
1016     ,*)
1017     # Only the header was specified.
1018     with_tcllib=_searching
1019     TCL_HDR=`echo $with_tcl | sed 's/^,//'`
1020     ;;
1021     *,?*)
1022     # Both the library and the header were specified
1023     TCL_LIB=`echo $with_tcl | sed 's/,.*$//'`
1024     TCL_HDR=`echo $with_tcl | sed 's/^.*,//'`
1025     ;;
1026     *)
1027     # Only the library was specified
1028     TCL_LIB=`echo $with_tcl | sed 's/,$//'`
1029     with_tclhdr=_searching
1030     ;;
1031     esac
1032    
1033     # try to find a static version of the Tcl8.0 library
1034     #
1035     if test "X$with_tcllib" = X_searching ; then
1036     AC_PATH_PROGS(TCL_LIB, libtcl8.0.a libtcl80.a, , $asc_tcl_library_dirs)
1037     if test -z "$TCL_LIB" ; then
1038     TCL_LIB=_searching
1039     fi
1040     else
1041     AC_MSG_RESULT([checking for tcl library... $TCL_LIB])
1042     fi
1043    
1044     # verify the TCL_LIB
1045     if test ! "X$TCL_LIB" = X_searching ; then
1046     AC_MSG_CHECKING([whether $TCL_LIB is for Tcl8.0])
1047     asc_libs_orig=$LIBS
1048     LIBS="$TCL_LIB $X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
1049     AC_TRY_LINK( , [TclCompileCatchCmd()], , [TCL_LIB=_searching]);
1050     if test "X$TCL_LIB" = X_searching ; then
1051     AC_MSG_RESULT(no)
1052     else
1053     AC_MSG_RESULT(yes)
1054     fi
1055     LIBS=$asc_libs_orig
1056     fi
1057    
1058     # see if the default LPATH can find the Tcl8.0 library
1059     #
1060     if test "X$TCL_LIB" = X_searching ; then
1061     AC_CHECK_LIB(tcl8.0, TclCompileCatchCmd, [TCL_LIB="-ltcl8.0"] , ,
1062     [$X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS])
1063     fi
1064     if test "X$TCL_LIB" = X_searching ; then
1065     AC_CHECK_LIB(tcl80, TclCompileCatchCmd, [TCL_LIB="-ltcl80"] , ,
1066     [$X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS])
1067     fi
1068     if test "X$TCL_LIB" = X_searching ; then
1069     AC_CHECK_LIB(tcl, TclCompileCatchCmd, [TCL_LIB="-ltcl"] , ,
1070     [$X11_LIBRARIES $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS])
1071     fi
1072    
1073     # give up searching for the Tcl8.0 library
1074     #
1075     if test "X$TCL_LIB" = X_searching ; then
1076     AC_MSG_ERROR([Cannot find a compatiable Tcl library.
1077     You must build and install Tcl version 8.0 or newer before you
1078     can build ASCEND. If you have installed the correct version
1079     of Tcl, run configure again with the argument:
1080     --with-tcl=LIBRARY,HEADER
1081     where LIBRARY and HEADER are the full paths to the Tcl8.0
1082     library file and header file, respectively.])
1083     fi
1084    
1085     # see if the user gave us the location of the Tcl8.0 header file
1086     #
1087     if test ! "X$with_tclhdr" = X_searching ; then
1088     if test ! -f "$TCL_HDR" ; then
1089     AC_MSG_WARN([user specified Tcl header file, $TCL_HDR, does not exist])
1090     with_tclhdr=_searching
1091     TCL_HDR=''
1092     fi
1093     fi
1094     if test "X$with_tclhdr" = X_searching ; then
1095     AC_PATH_PROG(TCL_HDR, tcl.h, , $asc_tcl_include_dirs)
1096     if test -z "$TCL_HDR" ; then
1097     AC_EGREP_HEADER([TCL_MAJOR_VERSION.*8], tcl.h, [TCL_HDR='tcl.h'], )
1098     fi
1099     else
1100     AC_MSG_RESULT([checking for tcl header... $TCL_HDR])
1101     fi
1102     if test -f "$TCL_HDR" ; then
1103     AC_MSG_CHECKING([whether $TCL_HDR is for version 8])
1104     echo 'grep TCL_MAJOR_VERSION "$TCL_HDR" 2>&5' 1>&5
1105     grep_tcl_h=`grep TCL_MAJOR_VERSION "$TCL_HDR" 2>&5`
1106     echo $grep_tcl_h 1>&5
1107     case "$grep_tcl_h" in
1108     *8)
1109     AC_MSG_RESULT(yes)
1110     ;;
1111     *)
1112     AC_MSG_RESULT(no)
1113     TCL_HDR=
1114     ;;
1115     esac
1116     fi
1117     if test -z "$TCL_HDR" ; then
1118     AC_MSG_ERROR([Cannot find a compatiable Tcl header file.
1119     You must build and install Tcl version 8.0 or newer before you
1120     can build ASCEND. If you have installed the correct version
1121     of Tcl, run configure again with the argument:
1122     --with-tcl=LIBRARY,HEADER
1123     where LIBRARY and HEADER are the full paths to the Tcl8.0
1124     library file and header file, respectively.])
1125     fi
1126     TCL_HDR=`echo $TCL_HDR | sed 's,tcl\.h$,,'`
1127     if test -n "$TCL_HDR" ; then
1128     TCL_HDR="-I$TCL_HDR"
1129     fi
1130    
1131    
1132     ###### REPEAT FOR TK
1133     #
1134     # see if the user gave us the location of the Tk8.0
1135     # library and/or header file
1136     #
1137     AC_ARG_WITH(tk,
1138     [ --with-tk=LIBRARY,HEADER
1139     The location of the Tk8.0 library and/or header
1140     For a static Tk8.0 library, give the full path:
1141     --with-tk='/usr/local/lib/libtk8.0.a'
1142     For a dynamic library, give any -L options required:
1143     --with-tk='-L/usr/local/lib -ltk8.0'
1144     To specify only the header, leave off the library:
1145     --with-tk=',/usr/local/include/tk.h'] ,
1146     , [with_tk=yes])
1147    
1148     case "$with_tk" in
1149     no)
1150     # User specified --without-tk; this makes no sense,
1151     # print a warning and search for it ourselves
1152     AC_MSG_WARN([Bad option '--without-tk'
1153     ASCEND must be compiled with Tk8.0.])
1154     with_tklib=_searching
1155     with_tkhdr=_searching
1156     ;;
1157     yes|,|"")
1158     # User didn't give the option or didn't give useful
1159     # information, search for it ourselves
1160     with_tklib=_searching
1161     with_tkhdr=_searching
1162     ;;
1163     ,*)
1164     # Only the header was specified.
1165     with_tklib=_searching
1166     TK_HDR=`echo $with_tk | sed 's/^,//'`
1167     ;;
1168     *,?*)
1169     # Both the library and the header were specified
1170     TK_LIB=`echo $with_tk | sed 's/,.*$//'`
1171     TK_HDR=`echo $with_tk | sed 's/^.*,//'`
1172     ;;
1173     *)
1174     # Only the library was specified
1175     TK_LIB=`echo $with_tk | sed 's/,$//'`
1176     with_tkhdr=_searching
1177     ;;
1178     esac
1179    
1180     # try to find a static version of the Tk8.0 library
1181     #
1182     if test "X$with_tklib" = X_searching ; then
1183     AC_PATH_PROGS(TK_LIB, libtk8.0.a libtk80.a libtk.a, , $asc_tcl_library_dirs)
1184     if test -z "TK_LIB" ; then
1185     TK_LIB=_searching
1186     fi
1187     else
1188     AC_MSG_RESULT([checking for tk library... $TK_LIB])
1189     fi
1190    
1191     # verify the TK_LIB
1192     #
1193     if test ! "X$TK_LIB" = X_searching ; then
1194     AC_MSG_CHECKING([whether $TK_LIB is for Tk8.0])
1195     asc_libs_orig=$LIBS
1196     LIBS="$TK_LIB $TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS $LIBS"
1197     AC_TRY_LINK( , [Tk_NameOfFont()], , [TK_LIB=_searching]);
1198     if test "X$TK_LIB" = X_searching ; then
1199     AC_MSG_RESULT(no)
1200     else
1201     AC_MSG_RESULT(yes)
1202     fi
1203     LIBS=$asc_libs_orig
1204     fi
1205    
1206     # see if the default LPATH can find the Tk8.0 library
1207     #
1208     if test "X$TK_LIB" = X_searching ; then
1209     AC_MSG_RESULT([checking for a dynamically loaded Tk8.0 library])
1210     AC_CHECK_LIB(tk8.0, Tk_NameOfFont, [TK_LIB="-ltk8.0"] , ,
1211     [$TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS])
1212     fi
1213     if test "X$TK_LIB" = X_searching ; then
1214     AC_CHECK_LIB(tk80, Tk_NameOfFont, [TK_LIB="-ltk80"] , ,
1215     [$TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS])
1216     fi
1217     if test "X$TK_LIB" = X_searching ; then
1218     AC_CHECK_LIB(tk, Tk_NameOfFont, [TK_LIB="-ltk"] , ,
1219     [$TCL_LIB $X11_LIBRARIES -lX11 $X11_EXTRA_LIBS $DL_LIBS $MATH_LIBS])
1220     fi
1221    
1222     # give up searching for the Tk8.0 library
1223     #
1224     if test "X$TK_LIB" = X_searching ; then
1225     AC_MSG_ERROR([Cannot find a compatiable Tk library.
1226     You must build and install Tk version 8.0 or newer before you
1227     can build ASCEND. If you have installed the correct version
1228     of Tk, run configure again with the argument:
1229     --with-tk=LIBRARY,HEADER
1230     where LIBRARY and HEADER are the full paths to the Tk8.0
1231     library file and header file, respectively.])
1232     fi
1233    
1234     # see if the user gave us the location of the Tk8.0 header file
1235     #
1236     if test ! "X$with_tkhdr" = X_searching ; then
1237     if test ! -f "$TK_HDR" ; then
1238     AC_MSG_WARN([user specified Tk header file, $TK_HDR, does not exist])
1239     with_tkhdr=_searching
1240     TK_HDR=''
1241     fi
1242     fi
1243     if test "X$with_tkhdr" = X_searching ; then
1244     AC_PATH_PROG(TK_HDR, tk.h, , $asc_tcl_include_dirs)
1245     if test -z "$TK_HDR" ; then
1246     AC_EGREP_HEADER([TK_MAJOR_VERSION.*8], tk.h, [TK_HDR='tk.h'], )
1247     fi
1248     else
1249     AC_MSG_RESULT([checking for tk header... $TK_HDR])
1250     fi
1251     if test -f "$TK_HDR" ; then
1252     AC_MSG_CHECKING([whether $TK_HDR is for version 8])
1253     echo 'grep TK_MAJOR_VERSION "$TK_HDR" 2>&5' 1>&5
1254     grep_tk_h=`grep TK_MAJOR_VERSION "$TK_HDR" 2>&5`
1255     echo $grep_tk_h 1>&5
1256     case "$grep_tk_h" in
1257     *8)
1258     AC_MSG_RESULT(yes)
1259     ;;
1260     *)
1261     AC_MSG_RESULT(no)
1262     TK_HDR=
1263     ;;
1264     esac
1265     fi
1266     if test -z "$TK_HDR" ; then
1267     AC_MSG_ERROR([Cannot find a compatiable Tk header file.
1268     You must build and install Tk version 8.0 or newer before you
1269     can build ASCEND. If you have installed the correct version
1270     of Tk, run configure again with the argument:
1271     --with-tk=LIBRARY,HEADER
1272     where LIBRARY and HEADER are the full paths to the Tk8.0
1273     library file and header file, respectively.])
1274     fi
1275     TK_HDR=`echo $TK_HDR | sed 's,tk\.h$,,'`
1276     if test -n "$TK_HDR" ; then
1277     TK_HDR="-I$TK_HDR"
1278     if test "X$TCL_HDR" = "X$TK_HDR" ; then
1279     TK_HDR=
1280     fi
1281     fi
1282    
1283    
1284     AC_ARG_WITH(tktable,
1285     [ --with-tktable=TKTABLE full path to a TkTable1.3 static library], , )
1286     case "$with_tktable" in
1287     yes|no|"")
1288     # search for the table
1289     AC_PATH_PROG(TKTABLE_LIB, libTktable.a, , $asc_tk_table_dirs)
1290     ;;
1291     *)
1292     # use the user's value
1293     TKTABLE_LIB="$with_tktable"
1294     ;;
1295     esac
1296     if test -n "$TKTABLE_LIB" ; then
1297     HAVE_TKTABLE='-DSTATIC_TKTABLE'
1298     else
1299     AC_MSG_RESULT(Assuming Tktable will be dynamically linked into ASCEND)
1300     fi
1301    
1302     AC_ARG_WITH(wish,
1303     [ --with-wish=/path/to/bin/wish
1304     The location of the wish shell executable matching
1305     the tcl/tk given by --with-tk and --with-tcl.
1306     X11 must be running during configure. ] ,
1307     , [with_wish=no])
1308     case "$with_wish" in
1309     yes|no|"")
1310     AC_MSG_RESULT([--with-wish not specified.
1311     Setting env vars TCL_LIBRARY, TK_LIBRARY may be needed to run.])
1312     ;;
1313     *)
1314     AC_MSG_CHECKING([wish for tcl_library,tklibrary])
1315     ASC_TK_LIBRARY=`config/wishvar tk_library $with_wish`
1316     ASC_TCL_LIBRARY=`config/wishvar tcl_library $with_wish`
1317     AC_MSG_RESULT([ $ASC_TCL_LIBRARY , $ASC_TK_LIBRARY])
1318     ;;
1319     esac
1320    
1321    
1322     #--------------------------------------------------------------------
1323     # FORTRAN
1324     #
1325     # ASCEND uses the LSOD integrator and is capable of working
1326     # with CONOPT and with MINOS. These libraries are written in
1327     # Fortran; to use them, configure needs to find a Fortran
1328     # compiler and the necessary Fortran libraries (e.g.,
1329     # libF77.a). LSOD, CONOPT, and MINOS also require the BLAS and
1330     # LINPACK libraries to avoid undefined symbols at link time.
1331     #
1332     # The builder can specify the location of
1333     # * the Fortran compiler and libraries using
1334     # --with-fortran=<compiler>,<libraries>
1335     # * the BLAS library using
1336     # --with-blas=<blas-library>
1337     # * the LINPACK library using
1338     # --with-linpack=<linpack-library>
1339     # * the LSOD library using
1340     # --with-blas=<lsod-library>
1341     # * the CONOPT library using
1342     # --with-conopt=<conopt-library>
1343     # * the MINOS library using
1344     # --with-minos=<minos-library> <===currently disabled
1345     # The builder can disable some parts of the fortran build using
1346     # the --without-<package> configure option.
1347     #
1348     # If the user does not specify the locations of the compiler
1349     # and the libraries and does not disable them, configure
1350     # attempts to find them.
1351     #
1352     # Building with LSOD, CONOPT, and/or MINOS is further
1353     # complicated by the dependencies between these libraries and
1354     # the BLAS and LINPACK libraries.
1355     #
1356     # If we cannot find a Fortran compiler, we disable all Fortran
1357     # code (LSOD, CONOPT, and MINOS). Otherwise, look for the
1358     # Fortran libraries (e.g., libF77.a) based on the type of
1359     # machine we are compiling on.
1360     #
1361     # If Fortran is enabled, we need to find a compiled BLAS
1362     # library or source code. Check for the machine's libblas.a
1363     # and ASCEND's libascblas.a; if those fail, check for the
1364     # libascblas.a source code; if that fails, we disable all
1365     # Fortran (LSOD, CONOPT, MINOS).
1366     #
1367     # If Fortran is enabled, we need to find a compiled LINPACK
1368     # library or source code. Check for the machine's liblpak.a
1369     # and ASCEND's libasclpak.a; if those fail, check for the
1370     # libasclpak.a source code; if that fails, we disable all
1371     # Fortran (LSOD, CONOPT, MINOS).
1372     #
1373     # If Fortran is enabled, we try to find a compiled LSOD library
1374     # or source code. Check for a libinteg.a; if that fails, check
1375     # for the libinteg.a source code; if that fails, we disable
1376     # LSOD. If we find LSOD, define STATIC_LSOD.
1377     #
1378     # If Fortran is enabled, we try to find a compiled OPTSQP
1379     # library or source code. Check for a librsqp.a; if that fails,
1380     # check for the librsqp.a source code; if that fails, we disable
1381     # OPTSQP. If we find RSQP, define STATIC_OPTSQP.
1382     #
1383     # If Fortran is enabled, we try to find a compiled CONOPT
1384     # library. Check for a libconsub.a; if that fails, we disable
1385     # CONOPT. If we find CONOPT, define STATIC_CONOPT; if not,
1386     # tell the user where to find CONOPT using the contact
1387     # information from the nonlinear programming FAQ:
1388     # http://www.mcs.anl.gov/home/otc/Guide/faq/nonlinear-programming-faq.html
1389     #
1390     # If Fortran is enabled, we try to find a compiled MINOS
1391     # library or source code. Check for a libminos54.a; if that
1392     # fails, check for the libminos54.a source code; if that fails,
1393     # we disable MINOS. If we find MINOS, define STATIC_MINOS; if
1394     # not, tell the user where to find MINOS using the contact
1395     # information from the nonlinear programming FAQ:
1396     # http://www.mcs.anl.gov/home/otc/Guide/faq/nonlinear-programming-faq.html
1397     #--------------------------------------------------------------------
1398     #
1399     # the list of directories to search for the fortran compiler
1400     asc_f77_prog_dirs="$PATH:/usr/lang:/opt/SUNWspro/bin"
1401     #
1402     # the list of directories to search for the required fortran libraries
1403     asc_f77_support_dirs="
1404     /lib
1405     /usr/lib
1406     /usr/local/lib
1407     /usr/contributed/lib
1408     /usr/local/lib/ascend/lib
1409     $ascpwd/blas
1410     $ascpwd/linpack
1411     $ascpwd/lsod
1412     $ascpwd/conopt
1413     $ascpwd/rsqp
1414     $ascpwd/minos
1415     $ascpwd/ascend4/archive
1416     /afs/cs/project/ascend/depot/@sys/lib
1417     /afs/cs/project/ascend/depot/build/obj/conopt
1418     "
1419     #
1420     AC_ARG_WITH(fortran,
1421     [Fortran compiler and libraries:
1422     --with-fortran=F77,F77LIBS
1423     The location of your Fortran compiler and its
1424     library files. For example, under SunOS:
1425     --with-fortran='f77,-L/usr/lang/lib -lF77 -lM77'
1426     To specify only the compiler or libraries, leave off
1427     whatever is not needed:
1428     --with-fortran=',-L/usr/lang/lib -lF77 -lM77'
1429     Use '--without-fortran' to not link against
1430     any Fortran libraries],
1431     , [with_fortran=yes])
1432     case "$with_fortran" in
1433     no)
1434     # The user disabled all fortran using
1435     # the --without-fortran option.
1436     F77=
1437     F77LIBS=
1438     with_f77=no
1439     with_f77libs=no
1440     ;;
1441     yes|,|"")
1442     # The user didn't pass in the --with-fortran option
1443     # or didn't give us any useful information. We do
1444     # the search ourselves.
1445     with_f77=_searching
1446     with_f77libs=_searching
1447     ;;
1448     ,*)
1449     # The user passed in the libraries, search for the
1450     # compiler ourselves.
1451     with_f77=_searching
1452     F77LIBS=`echo $with_fortran | sed 's/^,//'`
1453     echo "user gave F77LIBS=$F77LIBS"
1454     ;;
1455     *,?*)
1456     # The user passed in both the compiler and the
1457     # libraries.
1458     F77=`echo $with_fortran | sed s'/,.*$//'`
1459     F77LIBS=`echo $with_fortran | sed 's/^.*,//'`
1460     echo "user gave F77=$F77"
1461     echo "user gave F77LIBS=$F77LIBS"
1462     ;;
1463     *)
1464     # The user passed in the compiler; search for the
1465     # libraries ourselves.
1466     F77=`echo $with_fortran | sed s'/,$//'`
1467     with_f77libs=_searching
1468     echo "user gave F77=$F77"
1469     ;;
1470     esac
1471    
1472     if test "X$with_f77" = X_searching ; then
1473     # Search for the fortran compiler; print a warning if we can't
1474     # find it and disable all fortran.
1475     AC_PATH_PROGS(F77, f77 xlf g77, , $asc_f77_prog_dirs)
1476     if test -z "$F77" ; then
1477     with_fortran=no
1478     with_f77libs=no
1479     AC_MSG_WARN([Cannot find your Fortran compiler. Building ASCEND
1480     without integration, MINOS, and CONOPT support. To bulid ASCEND with
1481     Fortran support, run configure with the option
1482     --with-fortran=F77,F77LIBS
1483     where F77 is the full path to your Fortran compiler and F77LIBS are
1484     its related libraries])
1485     fi
1486     fi
1487    
1488     if test "X$with_f77libs" = X_searching ; then
1489     # We found a compiler, now search for the fortran libraries
1490     # based on the system type.
1491     AC_MSG_RESULT([checking for fortran libraries based on system type])
1492     case "$host" in
1493     alpha-dec-osf*)
1494     AC_CHECK_LIB(for, for_lle, [F77LIBS="$F77LIBS -lfor"], , $F77LIBS)
1495     AC_CHECK_LIB(ots, _OtsFill, [F77LIBS="$F77LIBS -lots"], , $F77LIBS)
1496     AC_CHECK_LIB(Ufor, etime_, [F77LIBS="$F77LIBS -lUfor"], , $F77LIBS)
1497     ;;
1498     mips-dec-ultrix*)
1499     AC_CHECK_LIB(for, for_lle, [F77LIBS="$F77LIBS -lfor"], , $F77LIBS)
1500     ;;
1501     hppa1.1-hp-hpux*)
1502     AC_CHECK_LIB(cl, FTN_QATAN, [F77LIBS="$F77LIBS -lcl"], , $F77LIBS)
1503     ;;
1504     *-ibm-aix*)
1505     # need to add -lc before -lxlf on AIX to
1506     # avoid getting the wrong getenv
1507     F77LIBS="-lc $F77LIBS"
1508     AC_CHECK_LIB(xlf, _xldabs, [F77LIBS="$F77LIBS -lxlf"], , $F77LIBS)
1509     AC_CHECK_LIB(xlfutil, srand_, [F77LIBS="$F77LIBS -lxlfutil"], ,
1510     $F77LIBS)
1511     AC_CHECK_LIB(xlf90, printf,
1512     [F77LIBS="$F77LIBS -lxlf90"], , $F77LIBS)
1513     ;;
1514     *-linux-*)
1515     AC_CHECK_LIB(f2c, pow_dd, [F77LIBS="$F77LIBS -lf2c"], , $F77LIBS)
1516     AC_CHECK_LIB(g2c, pow_dd, [F77LIBS="$F77LIBS -lg2c"], , $F77LIBS)
1517     ;;
1518     sparc-sun-solaris*)
1519     if test -n "$GCC" ; then
1520     F77LIBS="-L/opt/SUNWspro/lib -R/opt/SUNWspro/lib"
1521     fi
1522     AC_CHECK_LIB(sunmath, d_sqrt_, [MATH_LIBS="-lsunmath $MATH_LIBS"])
1523     AC_CHECK_LIB(F77, f77_init,
1524     [F77LIBS="$F77LIBS -lF77"], , $F77LIBS $MATH_LIBS)
1525     AC_CHECK_LIB(M77, inmax_,
1526     [F77LIBS="$F77LIBS -lM77"], , $F77LIBS $MATH_LIBS)
1527     ;;
1528     sparc-sun-sunos4*)
1529     if test -n "$GCC" ; then
1530     F77LIBS="-L/usr/lang/lib"
1531     fi
1532     AC_CHECK_LIB(F77, f77_init, [F77LIBS="$F77LIBS -lF77"], , $F77LIBS)
1533     AC_CHECK_LIB(M77, inmax_, [F77LIBS="$F77LIBS -lM77"], , $F77LIBS)
1534     ;;
1535     mips-sgi-irix*)
1536     AC_CHECK_LIB(F77, s_copy, [F77LIBS="$F77LIBS -lF77"], , $F77LIBS)
1537     AC_CHECK_LIB(I77, f_exit, [F77LIBS="$F77LIBS -lI77"], , $F77LIBS)
1538     AC_CHECK_LIB(isam, mkidxname,
1539     [F77LIBS="$F77LIBS -lisam"], , $F77LIBS)
1540     ;;
1541     *)
1542     AC_CHECK_LIB(F77, printf, [F77LIBS="$F77LIBS -lF77"], , $F77LIBS)
1543     AC_CHECK_LIB(M77, printf, [F77LIBS="$F77LIBS -lM77"], , $F77LIBS)
1544     AC_CHECK_LIB(f2c, pow_dd, [F77LIBS="$F77LIBS -lf2c"], , $F77LIBS)
1545     AC_CHECK_LIB(f77, printf, [F77LIBS="$F77LIBS -lf77"], , $F77LIBS)
1546     AC_CHECK_LIB(for, printf, [F77LIBS="$F77LIBS -lfor"], , $F77LIBS)
1547     AC_CHECK_LIB(ots, printf, [F77LIBS="$F77LIBS -lots"], , $F77LIBS)
1548     AC_CHECK_LIB(Ufor, printf, [F77LIBS="$F77LIBS -lUfor"], , $F77LIBS)
1549     ;;
1550     esac
1551     fi
1552    
1553     # asc_subdirs are the extra fortran subdirectories we have to visit
1554     # to build the fortran libraries. Initialize it to empty here.
1555     asc_subdirs=''
1556    
1557     # Initialize the blas variables
1558     make_blaslib=''
1559    
1560     AC_ARG_WITH(blas,
1561     [ --with-blas=BLASLIB The full path to the blas library.
1562     Use '--with-blas=build' to build the blas library
1563     from the sources that come with the distribution.],
1564     , [with_blas=yes] )
1565     case "$with_fortran$with_blas" in
1566     no*)
1567     # Fortran is disabled; ignore this option (if present)
1568     BLASLIB=
1569     ;;
1570     *no)
1571     # It is an error if the user chooses to build without
1572     # the BLAS library if Fortran is enabled.
1573     AC_MSG_ERROR([Bad option '--without-blas'
1574     To support Fortran calls, ASCEND must be compiled with a blas library])
1575     ;;
1576     *build)
1577     # Fortran is enabled and the user specified --with-blas=build
1578     # For a search for BLAS source code and tell the Makefile
1579     # to build it; useful for testing configure.
1580     blas_src_file="$srcdir/blas/dcopy.f"
1581     AC_MSG_CHECKING([for blas source file $blas_src_file ])
1582     if test -f $blas_src_file ; then
1583     AC_MSG_RESULT(yes)
1584     BLASLIB="$ascpwd/ascend4/archive/libascblas.a"
1585     make_blaslib='make-blaslib'
1586     blaslib_makefile="blas/Makefile"
1587     asc_subdirs="$asc_subdirs ../blas"
1588     else
1589     AC_MSG_RESULT(no)
1590     AC_MSG_ERROR([User specified '--with-blas=build' but
1591     configure cannot find the blas source file $blas_src_file])
1592     fi
1593     ;;
1594     *yes)
1595     # Fortran in enabled and the user didn't give the --with-blas
1596     # option or didn't give the library's location.
1597     # Search for a compiled libblas.a or libascblas.a; if that
1598     # fails, look for BLAS source code; if that also fails,
1599     # disable all Fortran and print a warning.
1600     AC_PATH_PROGS(BLASLIB, libblas.a libascblas.a, , $asc_f77_support_dirs)
1601     blas_src_file="$srcdir/blas/dcopy.f"
1602     if test -z "$BLASLIB" -a -n "$blas_src_file" ; then
1603     AC_MSG_CHECKING([for blas source file $blas_src_file ])
1604     if test -f $blas_src_file ; then
1605     AC_MSG_RESULT(yes)
1606     BLASLIB="$ascpwd/ascend4/archive/libascblas.a"
1607     make_blaslib='make-blaslib'
1608     blaslib_makefile="blas/Makefile"
1609     asc_subdirs="$asc_subdirs ../blas"
1610     else
1611     AC_MSG_RESULT(no)
1612     fi
1613     fi
1614     if test -z "$BLASLIB" ; then
1615     with_fortran=no
1616     AC_MSG_WARN([Cannot find libblas.a, libascblas.a, nor blas
1617     source code. Building ASCEND without integration, MINOS, and CONOPT
1618     support. To specify a specific location for the blas library, run
1619     configure again with the argument:
1620     --with-blas=BLASLIB
1621     where BLASLIB is the full path to the blas library file.])
1622     fi
1623     ;;
1624     *)
1625     # The user gave us --with-blas=BLASLIB, use that as the
1626     # location of the BLAS library.
1627     BLASLIB="$with_blas"
1628     ;;
1629     esac
1630    
1631    
1632     # Initialize the linpack variables
1633     make_lpaklib=''
1634    
1635     AC_ARG_WITH(linpack,
1636     [ --with-linpack=LPAKLIB The full path to the linpack library.
1637     Use '--with-linpack=build' to build the library
1638     from the sources that come with the distribution.],
1639     , [with_linpack=yes] )
1640     case "$with_fortran$with_linpack" in
1641     no*)
1642     # Fortran is disabled; ignore this option (if present)
1643     LPAKLIB=
1644     ;;
1645     *no)
1646     # It is an error if the user chooses to build without
1647     # the LINPACK library if Fortran is enabled.
1648     AC_MSG_ERROR([Bad option '--without-linpack'
1649     To support Fortran calls, ASCEND must be compiled with a
1650     linpack library.])
1651     ;;
1652     *build)
1653     # Fortran is enabled and the user specified --with-linpack=build
1654     # For a search for LINPACK source code and tell the Makefile
1655     # to build it; useful for testing configure.
1656     lpak_src_file="$srcdir/linpack/d1mach.f"
1657     AC_MSG_CHECKING([for linpack source file $lpak_src_file ])
1658     if test -f $lpak_src_file ; then
1659     AC_MSG_RESULT(yes)
1660     LPAKLIB="$ascpwd/ascend4/archive/libasclpak.a"
1661     make_lpaklib='make-lpaklib'
1662     lpaklib_makefile="linpack/Makefile"
1663     asc_subdirs="$asc_subdirs ../linpack"
1664     else
1665     AC_MSG_RESULT(no)
1666     AC_MSG_ERROR([User specified '--with-linpack=build' but
1667     configure cannot find the linpack source file $lpak_src_file])
1668     fi
1669     ;;
1670     *yes)
1671     # Fortran in enabled and the user didn't give the --with-linpack
1672     # option or didn't give the library's location.
1673     # Search for a compiled liblpak.a or libasclpak.a; if that
1674     # fails, look for LINPACK source code; if that also fails,
1675     # disable all Fortran and print a warning.
1676     AC_PATH_PROGS(LPAKLIB, liblpak.a libasclpak.a, , $asc_f77_support_dirs)
1677     lpak_src_file="$srcdir/linpack/d1mach.f"
1678     if test -z "$LPAKLIB" -a -n "$lpak_src_file" ; then
1679     AC_MSG_CHECKING([for linpack source file $lpak_src_file ])
1680     if test -f $lpak_src_file ; then
1681     AC_MSG_RESULT(yes)
1682     LPAKLIB="$ascpwd/ascend4/archive/libasclpak.a"
1683     make_lpaklib='make-lpaklib'
1684     lpaklib_makefile="linpack/Makefile"
1685     asc_subdirs="$asc_subdirs ../linpack"
1686     else
1687     AC_MSG_RESULT(no)
1688     fi
1689     fi
1690     if test -z "$LPAKLIB" ; then
1691     with_fortran=no
1692     AC_MSG_WARN([Cannot find liblpak.a, libasclpak.a, nor linpack
1693     source code. Building ASCEND without integration, MINOS, and CONOPT
1694     support. To specify a specific location for the linpack library, run
1695     configure again with the argument:
1696     --with-linpack=LPAKLIB
1697     where LPAKLIB is the full path to the linpack library file.])
1698     fi
1699     ;;
1700     *)
1701     # The user gave us --with-linkpack=LINKPACKLIB, use that
1702     # as the location of the LINKPACK library.
1703     LPAKLIB="$with_linpack"
1704     ;;
1705     esac
1706    
1707    
1708     # Initialize the lsod variables
1709     make_lsodlib=''
1710     HAVE_LSOD=''
1711    
1712     AC_ARG_WITH(lsod,
1713     [ --with-lsod=LSODLIB The full path to the lsod library.
1714     Use '--with-lsod=build' to build the lsod library
1715     from the sources that come with the distribution.],
1716     , [with_lsod=yes] )
1717     case "$with_fortran$with_lsod" in
1718     no*)
1719     # Fortran is disabled; ignore this option (if present)
1720     LSODLIB=
1721     with_lsod=no
1722     ;;
1723     *no)
1724     # Fortran is enabled but the user specified --without-lsod
1725     LSODLIB=
1726     ;;
1727     *build)
1728     # Fortran is enabled and the user specified --with-lsod=build
1729     # For a search for LSOD source code and tell the Makefile
1730     # to build it; useful for testing configure.
1731     lsod_src_file="$srcdir/lsod/lsode.f"
1732     AC_MSG_CHECKING([for lsod source file $lsod_src_file ])
1733     if test -f $lsod_src_file ; then
1734     AC_MSG_RESULT(yes)
1735     LSODLIB="$ascpwd/ascend4/archive/libinteg.a"
1736     make_lsodlib='make-lsodlib'
1737     lsodlib_makefile="lsod/Makefile"
1738     asc_subdirs="$asc_subdirs ../lsod"
1739     HAVE_LSOD='-DSTATIC_LSOD'
1740     else
1741     AC_MSG_RESULT(no)
1742     AC_MSG_ERROR([User specified '--with-lsod=build' but
1743     configure cannot find the lsod source file $lsod_src_file])
1744     fi
1745     ;;
1746     *yes)
1747     # Fortran in enabled and the user didn't give the --with-lsod
1748     # option or didn't give the library's location.
1749     # Search for a compiled libinteg.a; if that fails, look
1750     # for LSOD source code; if that also fails, disable LSOD
1751     # and print a warning.
1752     AC_PATH_PROGS(LSODLIB, libinteg.a libasclsod.a, , $asc_f77_support_dirs)
1753     lsod_src_file="$srcdir/lsod/lsode.f"
1754     if test -z "$LSODLIB" -a -n "$lsod_src_file" ; then
1755     AC_MSG_CHECKING([for lsod source file $lsod_src_file ])
1756     if test -f $lsod_src_file ; then
1757     AC_MSG_RESULT(yes)
1758     LSODLIB="$ascpwd/ascend4/archive/libinteg.a"
1759     make_lsodlib='make-lsodlib'
1760     lsodlib_makefile="lsod/Makefile"
1761     asc_subdirs="$asc_subdirs ../lsod"
1762     else
1763     AC_MSG_RESULT(no)
1764     fi
1765     fi
1766     if test -z "$LSODLIB" ; then
1767     with_lsod=no
1768     AC_MSG_WARN([Cannot find libinteg.a nor the lsod
1769     source code. Building ASCEND without integration
1770     support. To specify a specific location for the lsod library, run
1771     configure again with the argument:
1772     --with-lsod=LSODLIB
1773     where LSODLIB is the full path to the lsod integration library file.])
1774     else
1775     HAVE_LSOD='-DSTATIC_LSOD'
1776     fi
1777     ;;
1778     *)
1779     # The user gave us --with-lsod=LSODLIB, use that as the
1780     # location of the LSOD library and define -DSTATIC_LSOD.
1781     LSODLIB="$with_lsod"
1782     HAVE_LSOD='-DSTATIC_LSOD'
1783     ;;
1784     esac
1785    
1786    
1787     # Initialize the optsqp/rsqp variables
1788     make_rsqplib=''
1789     HAVE_OPTSQP=''
1790     OPTSQPLIB=''
1791    
1792     dnl >>>> Commenting out OPTSQP support until we get a working OPT from Dave
1793     dnl >>>>AC_ARG_WITH(rsqp,
1794     dnl >>>> [ --with-rsqp=OPTSQPLIB The full path to the rsqp library.
1795     dnl >>>> Use '--with-rsqp=build' to build the rsqp library
1796     dnl >>>> from the sources that come with the distribution.],
1797     dnl >>>> , [with_rsqp=yes] )
1798     dnl >>>>case "$with_fortran$with_rsqp" in
1799     dnl >>>> no*)
1800     dnl >>>> # Fortran is disabled; ignore this option (if present)
1801     dnl >>>> OPTSQPLIB=
1802     dnl >>>> with_rsqp=no
1803     dnl >>>> ;;
1804     dnl >>>> *no)
1805     dnl >>>> # Fortran is enabled but the user specified --without-rsqp
1806     dnl >>>> OPTSQPLIB=
1807     dnl >>>> ;;
1808     dnl >>>> *build)
1809     dnl >>>> # Fortran is enabled and the user specified --with-rsqp=build
1810     dnl >>>> # For a search for OPTSQP source code and tell the Makefile
1811     dnl >>>> # to build it; useful for testing configure.
1812     dnl >>>> rsqp_src_file="$srcdir/rsqp/shared/OPT.DAT"
1813     dnl >>>> AC_MSG_CHECKING([for rsqp source file $rsqp_src_file ])
1814     dnl >>>> if test -f $rsqp_src_file ; then
1815     dnl >>>> AC_MSG_RESULT(yes)
1816     dnl >>>> OPTSQPLIB="$ascpwd/ascend4/archive/librsqp.a"
1817     dnl >>>> make_rsqplib='make-rsqplib'
1818     dnl >>>> rsqplib_makefile='rsqp/Makefile
1819     dnl >>>> rsqp/QPIP/Makefile
1820     dnl >>>> rsqp/hsl/Makefile
1821     dnl >>>> rsqp/rSQP/Makefile'
1822     dnl >>>> asc_subdirs="$asc_subdirs ../rsqp"
1823     dnl >>>> HAVE_OPTSQP='-DSTATIC_OPTSQP'
1824     dnl >>>> else
1825     dnl >>>> AC_MSG_RESULT(no)
1826     dnl >>>> AC_MSG_ERROR([User specified '--with-rsqp=build' but
1827     dnl >>>> configure cannot find the rsqp source file $rsqp_src_file])
1828     dnl >>>> fi
1829     dnl >>>> ;;
1830     dnl >>>> *yes)
1831     dnl >>>> # Fortran in enabled and the user didn't give the --with-rsqp
1832     dnl >>>> # option or didn't give the library's location.
1833     dnl >>>> # Search for a compiled librsqp.a; if that fails, look
1834     dnl >>>> # for OPTSQP source code; if that also fails, disable OPTSQP
1835     dnl >>>> # and print a warning.
1836     dnl >>>> AC_PATH_PROGS(OPTSQPLIB, librsqp.a , , $asc_f77_support_dirs)
1837     dnl >>>> rsqp_src_file="$srcdir/rsqp/shared/OPT.DAT"
1838     dnl >>>> if test -z "$OPTSQPLIB" -a -n "$rsqp_src_file" ; then
1839     dnl >>>> AC_MSG_CHECKING([for rsqp source file $rsqp_src_file ])
1840     dnl >>>> if test -f $rsqp_src_file ; then
1841     dnl >>>> AC_MSG_RESULT(yes)
1842     dnl >>>> OPTSQPLIB="$ascpwd/ascend4/archive/librsqp.a"
1843     dnl >>>> make_rsqplib='make-rsqplib'
1844     dnl >>>> rsqplib_makefile='rsqp/Makefile
1845     dnl >>>> rsqp/QPIP/Makefile
1846     dnl >>>> rsqp/hsl/Makefile
1847     dnl >>>> rsqp/rSQP/Makefile'
1848     dnl >>>> asc_subdirs="$asc_subdirs ../rsqp"
1849     dnl >>>> else
1850     dnl >>>> AC_MSG_RESULT(no)
1851     dnl >>>> fi
1852     dnl >>>> fi
1853     dnl >>>> if test -z "$OPTSQPLIB" ; then
1854     dnl >>>> with_rsqp=no
1855     dnl >>>> AC_MSG_WARN([Cannot find librsqp.a nor the rsqp
1856     dnl >>>> source code. Building ASCEND without SQP
1857     dnl >>>> support. To specify a specific location for the rsqp library, run
1858     dnl >>>> configure again with the argument:
1859     dnl >>>> --with-rsqp=OPTSQPLIB
1860     dnl >>>> where OPTSQPLIB is the full path to the rsqp integration library file.])
1861     dnl >>>> else
1862     dnl >>>> HAVE_OPTSQP='-DSTATIC_OPTSQP'
1863     dnl >>>> fi
1864     dnl >>>> ;;
1865     dnl >>>> *)
1866     dnl >>>> # The user gave us --with-rsqp=OPTSQPLIB, use that as the
1867     dnl >>>> # location of the OPTSQP library and define -DSTATIC_OPTSQP.
1868     dnl >>>> OPTSQPLIB="$with_rsqp"
1869     dnl >>>> HAVE_OPTSQP='-DSTATIC_OPTSQP'
1870     dnl >>>> ;;
1871     dnl >>>>esac
1872    
1873    
1874     # Initialize the conopt variables
1875     make_conoptlib=''
1876     HAVE_CONOPT=''
1877    
1878     AC_ARG_WITH(conopt,
1879     [ --with-conopt=CONOPTLIB The full path to the conopt library.],
1880     , [with_conopt=yes] )
1881     case "$with_fortran$with_conopt" in
1882     no*)
1883     # Fortran is disabled; ignore this option (if present)
1884     CONOPTLIB=
1885     with_copopt=no
1886     ;;
1887     *no)
1888     # Fortran is enabled but the user specified --without-conopt
1889     CONOPTLIB=
1890     ;;
1891     *yes)
1892     # Fortran in enabled and the user didn't give the --with-conopt
1893     # option or didn't give the library's location.
1894     # Search for a compiled libconsub.a; if that fails,
1895     # disable CONOPT and print a warning.
1896     AC_PATH_PROGS(CONOPTLIB, libconsub.a, , $asc_f77_support_dirs)
1897     # Since conopt_src_file is empty, we don't search for conopt
1898     # source code.
1899     conopt_src_file=""
1900     if test -z "$CONOPTLIB" -a -n "$conopt_src_file" ; then
1901     AC_MSG_CHECKING([for conopt source file $conopt_src_file ])
1902     if test -f $conopt_src_file ; then
1903     AC_MSG_RESULT(yes)
1904     CONOPTLIB="$ascpwd/ascend4/archive/libconsub.a"
1905     make_conoptlib='make-conoptlib'
1906     conoptlib_makefile="conopt/Makefile"
1907     asc_subdirs="$asc_subdirs ../conopt"
1908     else
1909     AC_MSG_RESULT(no)
1910     fi
1911     fi
1912     if test -z "$CONOPTLIB" ; then
1913     with_conopt=no
1914     AC_MSG_WARN([Cannot find libconsub.a nor conopt
1915     source code. Building ASCEND without CONOPT
1916     support. To specify a specific location for the conopt library, run
1917     configure again with the argument:
1918     --with-conopt=CONOPTLIB
1919     where CONOPTLIB is the full path to the conopt library file.
1920     CONOPT is proprietary and is distributed by:
1921     Arne Drud +45 44 49 03 23 adrud@arki.dk])
1922     else
1923     HAVE_CONOPT='-DSTATIC_CONOPT'
1924     fi
1925     ;;
1926     *)
1927     # The user gave us --with-conopt=CONOPTLIB, use that as the
1928     # location of the CONOPT library and define -DSTATIC_CONOPT.
1929     CONOPTLIB="$with_conopt"
1930     HAVE_CONOPT='-DSTATIC_CONOPT'
1931     ;;
1932     esac
1933    
1934    
1935     # Initialize the minos variables
1936     make_minoslib=''
1937     HAVE_MINOS=''
1938     MINOSLIB=''
1939    
1940     dnl >>>> Commenting out MINOS support until ASCEND's solver/slv1.c is fixed
1941     dnl >>>>AC_ARG_WITH(minos,
1942     dnl >>>> [ --with-minos=MINOSLIB The full path to the minos library.],
1943     dnl >>>> , [with_minos=yes] )
1944     dnl >>>>case "$with_fortran$with_minos" in
1945     dnl >>>> no*)
1946     dnl >>>> # Fortran is disabled; ignore this option (if present)
1947     dnl >>>> MINOSLIB=
1948     dnl >>>> with_minos=no
1949     dnl >>>> ;;
1950     dnl >>>> *no)
1951     dnl >>>> # Fortran is enabled but the user specified --without-lsod
1952     dnl >>>> MINOSLIB=
1953     dnl >>>> ;;
1954     dnl >>>> *yes)
1955     dnl >>>> # Fortran in enabled and the user didn't give the --with-minos
1956     dnl >>>> # option or didn't give the library's location.
1957     dnl >>>> # Search for a compiled libminos54.a; if that fails, look
1958     dnl >>>> # for MINOS source code; if that also fails, disable MINOS
1959     dnl >>>> # and print a warning.
1960     dnl >>>> AC_PATH_PROGS(MINOSLIB, libminos54.a, , $asc_f77_support_dirs)
1961     dnl >>>> minos_src_file="$srcdir/minos54/miascend.f"
1962     dnl >>>> if test -z "$MINOSLIB" -a -n "$minos_src_file" ; then
1963     dnl >>>> AC_MSG_CHECKING([for minos source file $minos_src_file ])
1964     dnl >>>> if test -f $minos_src_file ; then
1965     dnl >>>> AC_MSG_RESULT(yes)
1966     dnl >>>> MINOSLIB="$ascpwd/ascend4/archive/libminos54.a"
1967     dnl >>>> make_minoslib='make-minoslib'
1968     dnl >>>> minoslib_makefile="minos54/Makefile"
1969     dnl >>>> asc_subdirs="$asc_subdirs ../minos54"
1970     dnl >>>> else
1971     dnl >>>> AC_MSG_RESULT(no)
1972     dnl >>>> fi
1973     dnl >>>> fi
1974     dnl >>>> if test -z "$MINOSLIB" ; then
1975     dnl >>>> with_minos=no
1976     dnl >>>> AC_MSG_WARN([Cannot find libminos54.a nor minos
1977     dnl >>>> source code. Building ASCEND without MINOS
1978     dnl >>>> support. To specify a specific location for the minos library,
1979     dnl >>>> run configure again with the argument:
1980     dnl >>>> --with-minos=MINOSLIB
1981     dnl >>>> where MINOSLIB is the full path to the minos library file.
1982     dnl >>>> MINOS is proprietary and is distributed by:
1983     dnl >>>> Stanford Business Software, Inc.;
1984     dnl >>>> 2672 Bayshore Parkway, Suite 304; Mountain View, CA 94043
1985     dnl >>>> 415-962-8719; mike@sol-michael.stanford.edu])
1986     dnl >>>> else
1987     dnl >>>> HAVE_MINOS='-DSTATIC_MINOS'
1988     dnl >>>> fi
1989     dnl >>>> ;;
1990     dnl >>>> *)
1991     dnl >>>> # The user gave us --with-minos=MINOSLIB, use that as the
1992     dnl >>>> # location of the MINOS library and define -DSTATIC_MINOS.
1993     dnl >>>> MINOSLIB="$with_minos"
1994     dnl >>>> HAVE_MINOS='-DSTATIC_MINOS'
1995     dnl >>>> ;;
1996     dnl >>>>esac
1997    
1998    
1999     #--------------------------------------------------------------------
2000     # Other trees which may or may not be present. If present,
2001     # generate the Makefiles in the tree unless the user passes in
2002     # a --without-<package> argument.
2003     #
2004     # Valid <package> values are: TK, models, help
2005     #
2006     # We could have `configure' do this for us via
2007     # AC_CONFIG_SUBDIRS, but `configure' scripts in the trees can
2008     # only be one directory removed from this configure script.
2009     # For example, it would be nice to have `models' under
2010     # `ascend4', but `configure' doesn't like `ascend4/models' as
2011     # an argument to AC_CONFIG_SUBDIRS.
2012     #
2013     # To get around this problem, we do things by hand. :-)
2014     #
2015     # If the user gives a --without-<package> argument, we have
2016     # nothing to do for that package.
2017     #
2018     # Otherwise,
2019     # * Set `subdir_file_exists' to a file that should exist in the
2020     # subtree---this is how we know that the subtree is really
2021     # there.
2022     # * Set `subdir_locations' to the list of locations, relative
2023     # to this configure script, where the subtree may live.
2024     # * Set `subdir_output' to the list of makefiles to generate;
2025     # the variable `subdir_root' in this list will be replaced
2026     # with the correct value from `subdir_locations'.
2027     #
2028     # To see which (if any) of the values in `subdir_locations' is
2029     # the correct one, we set `subdir_root' to each value in
2030     # `subdir_locations' and check for the existence of
2031     # $fullpathsrcdir/$subdir_root/$subdir_file_exists, where
2032     # $fullpathsrcdir is the full path to the source directory. If
2033     # that file exists, we
2034     # * Set <package>_dir_root to ../$subdir_root. The "../" is
2035     # needed since this value is used in the `ascend4' directory
2036     # and $subdir_root is relative to the parent of `ascend4'.
2037     # * Substitute the value of $subdir_root into `subdir_output'
2038     # and set the result to <package>_makefiles: the list of
2039     # Makefiles for configure to generate.
2040     # * Each package needs to be able to find its way back to
2041     # ascend4/ConfigAscend; it needs to go back up the tree
2042     # however many levels deep it is---i.e., `foo/bar/baz' should
2043     # become `../../..' and this does it: sed 's,[^/][^/]*,..,g'
2044     # but we need to quote the [] from m4, so we get this bizarre
2045     # thing: sed 's,[[^/][^/]]*,..,g' Set <package>_topbuilddir
2046     # to this result.
2047     # * Exit the loop.
2048     #--------------------------------------------------------------------
2049    
2050     # Initialize variables
2051     tkdir_root=''
2052     tkdir_topbuilddir=''
2053    
2054     AC_ARG_WITH(tkdir,
2055     [Generation of Makefiles:
2056     --without-tkdir do not generate Makefiles in the TK subdir],
2057     , [with_tkdir=yes])
2058     if test ! "X$with_tkdir" = "Xno" ; then
2059     subdir_file_exists='AscendRC'
2060     subdir_locations='ascend4/TK'
2061     subdir_output='
2062     $subdir_root/Makefile
2063     $subdir_root/Makefile.Rules:$subdir_root/Makefile.Rules.in
2064     $subdir_root/bitmaps/Makefile
2065     $subdir_root/templates/Makefile
2066     '
2067     for subdir_root in $subdir_locations ; do
2068     if test -f $fullpathsrcdir/$subdir_root/$subdir_file_exists ; then
2069     tkdir_root="../$subdir_root"
2070     tkdir_makefiles=`eval echo $subdir_output`
2071     tkdir_topbuilddir=`echo "$subdir_root" | sed 's,[[^/][^/]]*,..,g'`
2072     break
2073     fi
2074     done
2075     fi
2076    
2077     # Initialize variables
2078     models_dir_root=''
2079     models_topbuilddir=''
2080    
2081     AC_ARG_WITH(models,
2082     [ --without-models do not generate Makefiles in the models subdir],
2083     , [with_models=yes])
2084     if test ! "X$with_models" = "Xno" ; then
2085     subdir_file_exists='system.a4l'
2086     subdir_locations='models ascend4/models'
2087     subdir_output='
2088     $subdir_root/Makefile
2089     $subdir_root/Makefile.Rules:$subdir_root/Makefile.Rules.in
2090     $subdir_root/ben/Makefile
2091     '
2092     ## $subdir_root/examples/Makefile
2093     ## $subdir_root/examples/abbott/Makefile
2094     ## $subdir_root/examples/flexible_design/Makefile
2095     ## $subdir_root/libraries/Makefile
2096     ## $subdir_root/libraries/abbott/Makefile
2097     ## $subdir_root/pending/Makefile
2098     ## $subdir_root/pending/examples/Makefile
2099     ## $subdir_root/pending/libraries/Makefile
2100     for subdir_root in $subdir_locations ; do
2101     if test -f $fullpathsrcdir/$subdir_root/$subdir_file_exists ; then
2102     models_dir_root="../$subdir_root"
2103     models_makefiles=`eval echo $subdir_output`
2104     models_topbuilddir=`echo "$subdir_root" | sed 's,[[^/][^/]]*,..,g'`
2105     break
2106     fi
2107     done
2108     fi
2109    
2110    
2111     # Initialize variables
2112     help_dir_root=''
2113     help_topbuilddir=''
2114    
2115     dnl >>>>AC_ARG_WITH(help,
2116     dnl >>>> [ --without-help do not generate Makefiles in the help subdir],
2117     dnl >>>> , [with_help=yes])
2118     dnl >>>>if test ! "X$with_help" = "Xno" ; then
2119     dnl >>>> subdir_file_exists='ascend-helpTOC.htm'
2120     dnl >>>> subdir_locations='help ascend4/help'
2121     dnl >>>> subdir_output='
2122     dnl >>>> $subdir_root/Makefile
2123     dnl >>>> $subdir_root/Makefile.Rules:$subdir_root/Makefile.Rules.in
2124     dnl >>>> $subdir_root/Screenshots/Makefile
2125     dnl >>>> '
2126     dnl >>>> for subdir_root in $subdir_locations ; do
2127     dnl >>>> if test -f $fullpathsrcdir/$subdir_root/$subdir_file_exists ; then
2128     dnl >>>> help_dir_root="../$subdir_root"
2129     dnl >>>> help_makefiles=`eval echo $subdir_output`
2130     dnl >>>> help_topbuilddir=`echo "$subdir_root" | sed 's,[[^/][^/]]*,..,g'`
2131     dnl >>>> break
2132     dnl >>>> fi
2133     dnl >>>> done
2134     dnl >>>>fi
2135    
2136    
2137     #--------------------------------------------------------------------
2138     # The variables we substitute into the Makefile.in files
2139     # and the command to actually generate the Makefiles
2140     #--------------------------------------------------------------------
2141     AC_SUBST(ascpwd)
2142     AC_SUBST(fullpathsrcdir)
2143     AC_SUBST(asc_include)
2144     AC_SUBST(CC)
2145     AC_SUBST(CFLAGS)
2146     AC_SUBST(LEX)
2147     AC_SUBST(LEXLIB)
2148     AC_SUBST(scanner_src)
2149     AC_SUBST(typer_src)
2150     AC_SUBST(MATH_LIBS)
2151     AC_SUBST(DEBUG_LIBS)
2152     AC_SUBST(X11_INCLUDES)
2153     AC_SUBST(X11_LIBRARIES)
2154     AC_SUBST(X11_RUN_PATH)
2155     AC_SUBST(X11_EXTRA_LIBS)
2156     AC_SUBST(DL_LIBS)
2157     AC_SUBST(LD_FLAGS)
2158     AC_SUBST(LD_SEARCH_FLAGS)
2159     AC_SUBST(SHLIB_CFLAGS)
2160     AC_SUBST(SHLIB_LD)
2161     AC_SUBST(SHLIB_LD_LIBS)
2162     AC_SUBST(SHLIB_SUFFIX)
2163     AC_SUBST(ASC_LIB_SUFFIX)
2164     AC_SUBST(TCL_LIB)
2165     AC_SUBST(TCL_HDR)
2166     AC_SUBST(TK_LIB)
2167     AC_SUBST(TK_HDR)
2168     AC_SUBST(TKTABLE_LIB)
2169     AC_SUBST(ASC_TK_LIBRARY)
2170     AC_SUBST(ASC_TCL_LIBRARY)
2171     AC_SUBST(HAVE_TKTABLE)
2172     AC_SUBST(asc_subdirs)
2173     AC_SUBST(F77)
2174     AC_SUBST(F77LIBS)
2175     AC_SUBST(BLASLIB)
2176     AC_SUBST(make_blaslib)
2177     AC_SUBST(LPAKLIB)
2178     AC_SUBST(make_lpaklib)
2179     AC_SUBST(LSODLIB)
2180     AC_SUBST(make_lsodlib)
2181     AC_SUBST(HAVE_LSOD)
2182     AC_SUBST(OPTSQPLIB)
2183     AC_SUBST(make_rsqplib)
2184     AC_SUBST(HAVE_OPTSQP)
2185     dnl AC_SUBST(HARWELLLIB)
2186     dnl AC_SUBST(make_harwelllib)
2187     dnl AC_SUBST(HAVE_HARWELL)
2188     AC_SUBST(MINOSLIB)
2189     AC_SUBST(make_minoslib)
2190     AC_SUBST(HAVE_MINOS)
2191     AC_SUBST(CONOPTLIB)
2192     AC_SUBST(make_conoptlib)
2193     AC_SUBST(HAVE_CONOPT)
2194     AC_SUBST(tkdir_root)
2195     AC_SUBST(tkdir_topbuilddir)
2196     AC_SUBST(models_dir_root)
2197     AC_SUBST(models_topbuilddir)
2198     AC_SUBST(help_dir_root)
2199     AC_SUBST(help_topbuilddir)
2200    
2201     AC_OUTPUT(
2202     ascend4/ConfigAscend:ascend4/ConfigAscend.in
2203     ascend4/Makefile
2204     ascend4/bin/ascend
2205     ascend4/Makefile.Rules:ascend4/Makefile.Rules.in
2206     ascend4/archive/Makefile
2207     ascend4/bin/Makefile
2208     ascend4/compiler/Makefile
2209     ascend4/general/Makefile
2210     ascend4/interface/Makefile
2211     ascend4/lib/Makefile
2212     ascend4/packages/Makefile
2213     ascend4/solver/Makefile
2214     ascend4/utilities/Makefile
2215     $tkdir_makefiles
2216     $models_makefiles
2217     $help_makefiles
2218     $blaslib_makefile
2219     $lpaklib_makefile
2220     $lsodlib_makefile
2221     $rsqplib_makefile
2222     $conoptlib_makefile
2223     $minoslib_makefile
2224     )
2225    

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