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

Annotation of /trunk/base/autotools/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 628 - (hide annotations) (download)
Wed May 24 01:45:02 2006 UTC (18 years, 6 months ago) by johnpye
File size: 57401 byte(s)
Fixed up standard paths stuff to use 'INSTALL_ASCDATA' as the place where tcltk/python/models etc
will live. The confusion here came from the fact that I was taking 'INSTALL_SHARE' to be be assumed
to mean 'the location of /usr/share' -- hence the resulting '$INSTALL_SHARE/ascend' that was bothering
Ben. The 'INSTALL_ASCDATA' fixes this, and behaves as he will like, I hope.

Also note that I have switched the default situation in config.h.in to use relative paths by default,
which is the preferred CMU way. SCons builds will default to absolute paths on non-Windows systems.
1 aw0a 12 #--------------------------------------------------------------------
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.59.
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     AC_PREREQ(2.57)
17 ben.allan 545 #--------------------------------------------------------------------
18 aw0a 12 # This file must exist for configure to continue. It's
19     # how we know we're in the right place.
20     #--------------------------------------------------------------------
21     AC_INIT(../generic/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    
62     #--------------------------------------------------------------------
63     ##AWW
64 aw0a 15 ##AWW We put the .o files when compiling into a tree structure
65     ##AWW relative to the directory in which we currently reside,
66     ##AWW while the .c and .h files are in a similar tree structure
67     ##AWW relative to the configure instruction we invoke. This
68     ##AWW allows one to have separate .o files in their own tree when
69     ##AWW compiling for different operating systems.
70     ##AWW
71     ##AWW Example 1 (same directories)
72     ##AWW Current directory one is in: /home/me/trunk/base/unixAC213
73 aw0a 31 ##AWW Directory containing configure: /home/me/trunk/base/unixAC213
74     ##AWW Command to invoke configure: ./configure
75 aw0a 15 ##AWW $ascpwd will be: /home/me/trunk/base/unixAC213
76 aw0a 31 ##AWW $srcdir will be: .
77 aw0a 18 ##AWW
78 aw0a 15 ##AWW Example 2 (different directories, abs path for command)
79     ##AWW Current directory one is in: /home/me/trunk/base/newTree
80 aw0a 31 ##AWW Directory containing configure: /home/me/trunk/base/unixAC213
81     ##AWW Command to invoke configure: /home/me/trunk/base/unixAC213/configure
82     ##AWW $ascpwd will be: /home/me/trunk/base/newTree
83     ##AWW $srcdir will be: /home/me/trunk/base/unixAC213
84     ##AWW
85 aw0a 15 ##AWW Example 3 (different directories, rel path for command)
86     ##AWW Same as Example 2
87     ##AWW Command to invoke configure: ../unixAC213/configure
88 aw0a 31 ##AWW $ascpwd will be: /home/me/trunk/base/newTree (same as in Example 2)
89     ##AWW $srcdir will be: ../unixAC213
90     ##AWW
91 aw0a 18 ##AWW Key elements of the source tree are:
92     ##AWW code/trunk/trunk/base/unixAC213/configure
93 aw0a 31 ##AWW code/trunk/trunk/base/generic
94     ##AWW code/trunk/tcltk
95 johnpye 569 ##AWW where $srcdir is pointing to /home/me/trunk/base/unixAC213, the folder
96 aw0a 31 ##AWW containing "configure"
97 aw0a 18 ##AWW
98     ##AWW Configure is located at:
99     ##AWW $srcdir/configure
100     ##AWW while the .c/.h files one wants are in:
101     ##AWW $srcdir/../generic/compiler
102     ##AWW $srcdir/../generic/general
103     ##AWW $srcdir/../generic/packages
104     ##AWW $srcdir/../generic/solver
105     ##AWW $srcdir/../generic/utilities
106     ##AWW $srcdir/../../tcltk/generic/interface
107 johnpye 569 ##AWW
108 aw0a 18 ##AWW Each of these directories contain Makefiles and possible
109     ##AWW need to find .h files in the other directories. For example
110     ##AWW the include statements are always of the form
111     ##AWW #include compiler/slv3.h or
112     ##AWW #include interface/SlvProc.h
113     ##AWW
114     ##AWW A safe include path should assume one is a directory with any
115     ##AWW of these .h and .c files and one needs to find a .h file in
116     ##AWW any other of them. The following paths should do it.
117     ##AWW
118     ##AWW If in compiler, general, packages, solver, utilities
119     ##AWW .. for general, packages, etc
120 aw0a 31 ##AWW ../../../tcltk/generic for interface
121 johnpye 569 ##AWW If in interface
122 aw0a 18 ##AWW .. for interface
123 aw0a 31 ##AWW ../../../base/generic for compiler, general, ..
124     ##AWW
125 aw0a 18 #--------------------------------------------------------------------
126 aw0a 12 # The asc_include variable is (directory) path to the ascend4
127 aw0a 31 # SOURCE directory relative to the immediate subdirectories of
128     # the ascend4 OBJECT directory. --rewrite - not clear.
129     #AWW To compile a new ASCEND executable, one should move into the
130     #AWW directory in which one wants the ASCEND object/executable
131     #AWW to reside (call this objTree) and from there run
132     #AWW ../base/unixAC213/configure.
133     #AWW In the following code asc_include is set to the path from
134     #JP I think that the current recommendation is to install from
135 johnpye 362 #JP run ./configure (ie from this directory)
136    
137 aw0a 15 ascpwd=`pwd`
138     fullpathsrcdir=`cd $srcdir ; pwd`
139    
140     case "$srcdir" in
141 aw0a 12 .)
142     asc_include="../$srcdir"
143     ;;
144     /*)
145     asc_include="$srcdir/../generic"
146     ;;
147     *)
148     asc_include="$srcdir/../generic"
149 aw0a 31 ;;
150 aw0a 12 esac
151    
152    
153     #--------------------------------------------------------------------
154     # Do basic checks to determine
155     # * if we have `ranlib'
156     # * if we can create symbolic links
157     # * if `make' sets the MAKE macro
158     # * a bsd-compatible `install' program
159     # If we use the install-sh script that comes with configure,
160     # prefix it with the current directory so it'll work in
161     # subdirectories. Unfortunately, it won't work if the user
162     # moves the source tree.
163     #--------------------------------------------------------------------
164     AC_PROG_RANLIB
165     AC_PROG_LN_S
166     AC_PROG_MAKE_SET
167     AC_PROG_INSTALL
168    
169 johnpye 192 case "X$INSTALL" in
170 aw0a 12 X/*)
171     ;;
172     *)
173     INSTALL="$ascpwd/$INSTALL"
174     ;;
175     esac
176    
177    
178     #--------------------------------------------------------------------
179     # Get the host type for various checks along the way
180     #--------------------------------------------------------------------
181     AC_CANONICAL_HOST
182    
183     #--------------------------------------------------------------------
184     # Check for the C compiler: set CC and CFLAGS.
185     # If the user does NOT specify `--enable-gcc' on the configure
186     # command command line, set CC to either the envar CC or `cc'.
187     # Call AC_PROG_CC which will use the value of CC (perhaps set
188     # immediately above) or will check for `gcc' and then for `cc'
189     # if `gcc' is not found.
190     #
191     # If we are using GCC, then assume it groks ANSI. Otherwise,
192     # try to compile a small program using ANSI constructs with
193     # CC. If this fails, try to locate each of the following:
194     # c89 xlc acc
195     # and if successful, see if it compiles an ANSI C program.
196     # (Doing this in a loop would be ideal, but configure caches
197     # the result of AC_CHECK_PROG and uses the cached value for
198     # all but the first pass through the loop. This is also the
199     # reason we have to use a different variable asc_cc1, asc_cc2
200     # for each call to AC_CHECK_PROG.
201     #
202     # If we do not find an ANSI C compiler, print a warning and
203     # use the first value of CC we tried.
204     #--------------------------------------------------------------------
205     #JP removed the lengthy CC tests, since ANSI C is pretty universal
206 johnpye 362 #JP these days, and GCC can pretty much be assumed if we're using
207     #JP Autotools.
208    
209 aw0a 12 AC_PROG_CC(gcc)
210 johnpye 362
211 aw0a 12 #--------------------------------------------------------------------
212     # Do other misc checks with CC and CFLAGS.
213     #
214     # Determine how to run the C preprocessor.
215     #
216     # If the user specifies --enable-optimization, remove `-g'
217     # from CFLAGS, add `-O' to CFLAGS, and define `NDEBUG'. If
218     # we are not building optimized, check for special libraries
219     # needed for building a debugging binary (currenly only
220     # /usr/lib/end.o under HPUX).
221     #
222     # Check if we're running on AIX; if so, add `-D_ALL_SOURCE'
223     # to CFLAGS.
224     #
225     # Check if we're running on HPUX; if so, add -D_HPUX_SOURCE'
226     # to CFLAGS unless the C preprocessor goes it for us.
227     #--------------------------------------------------------------------
228    
229     AC_PROG_CPP
230    
231     AC_ARG_ENABLE(optimization,
232     [ --enable-optimization optimize the C code while building ascend],
233     [asc_do_opt="$enableval"], [asc_do_opt=no])
234    
235 johnpye 362 if test "$asc_do_opt" = yes; then
236 aw0a 12 CFLAGS=`echo "-O $CFLAGS " | sed 's/ -g / /g'`
237     AC_DEFINE(NDEBUG)
238     else
239     AC_PATH_PROG(DEBUG_LIBS, end.o, , /usr/lib)
240     fi
241    
242     AC_MSG_CHECKING([for AIX])
243     AC_EGREP_CPP(yes, [
244     #ifdef _AIX
245     yes
246     #endif
247     ], [ asc_aix=yes ; AC_DEFINE(_ALL_SOURCE) ], [asc_aix=no])
248     AC_MSG_RESULT($asc_aix)
249    
250     AC_MSG_CHECKING([whether -D_HPUX_SOURCE is needed])
251     AC_EGREP_CPP(yes, [
252     #ifdef __hpux
253     #ifndef _HPUX_SOURCE
254     yes
255     #endif
256     #endif
257     ], [ asc_hpux=yes ; AC_DEFINE(_HPUX_SOURCE) ], [asc_hpux=no])
258     AC_MSG_RESULT($asc_hpux)
259    
260     # Check the size of pointers; if cross compiling, assume 32 bit pointers
261     AC_CHECK_SIZEOF(void *, 4)
262    
263    
264     #--------------------------------------------------------------------
265     # Set YACC.
266     # call the
267 johnpye 362 # autoconf macro which looks for `bison' and then for `yacc'.
268 ben.allan 472 # note it isn't bright enough to check that yacc really exists,
269     # so we allow the user to disable it.
270     #--------------------------------------------------------------------
271 aw0a 12
272 johnpye 332 YACCSAVE="$YACC"
273 ben.allan 472 AC_PROG_YACC
274 johnpye 362
275 aw0a 12 AC_ARG_WITH(yacc,
276 ben.allan 472 [ --without-yacc do not generate parser from yacc file],
277     , [with_yacc=yes])
278     if test ! "X$with_yacc" = "Xyes" ; then
279     YACC=": configured without yacc"
280     parser_src="ascParse.c.from.c"
281     else
282     parser_src="ascParse.c.from.yacc"
283     fi
284     AC_SUBST(parser_src)
285    
286     #--------------------------------------------------------------------
287 aw0a 12 # Set LEX.
288     # ASCEND requires a `flex' which understands -P (allows you to
289     # specify a prefix other than `yy'). The -P flag was added at
290     # the same time a -V (version) flag was added (version 2.4.1),
291     # so if `flex' understands -V, it'll understand -P (checking
292     # for -P directly requires a flex input file).
293     #
294     # 1. If `LEX' is not set, look for `flex' and set `LEX' to
295     # `flex' if found.
296     # 2. If `flex' was found, see if it understands -V. If so,
297     # set `scanner_src' and `typer_src' to have `flex' generate
298     # the C files from the flex input files
299     # base/generic/compiler/scanner.l & tcltk/interface/typelex.l
300 johnpye 569 # We don't need to look for libfl.a since we define
301 aw0a 12 # yywrap() ourselves.
302     # 3. If `flex' wasn't found or was found but isn't new enough:
303     # a. Print a warning message
304     # b. Set `scanner_src' and `typer_src' to use pre-generated
305     # C files for the flex files mentioned in (2).
306     # c. Set `LEX' to `lex'
307     # d. Search for the lex library `libl.a' and set LEXLIB to
308     # its location.
309     #--------------------------------------------------------------------
310    
311 johnpye 332 AC_CHECK_PROG(LEX, flex, flex)
312 aw0a 12
313     if test -n "$LEX" ; then
314     AC_MSG_CHECKING([whether $LEX is at least version 2.4.1])
315     echo "$LEX -V" 1>&5
316     if $LEX -V 1>&5 2>&5 ; then
317     AC_MSG_RESULT(yes)
318     scanner_src="scanner.c.from.flex"
319     typer_src="typelex.c.from.flex"
320     else
321     AC_MSG_RESULT(no)
322     LEX=''
323     fi
324     fi
325    
326     if test -z "$LEX" ; then
327     AC_MSG_WARN([Cannot find a flex lexer version 2.4.1 or greater.
328     Using pregenerated C files for base/generic/compiler/scanner.l
329 aw0a 18 and tcltk/interface/typelex.l. If you have flex 2.4.1
330 johnpye 569 or newer, set the LEX environment variable to its location
331 aw0a 12 and run configure again.])
332     scanner_src="scanner.c.from.c"
333     typer_src="typelex.c.from.c"
334    
335     # let configure set LEX and LEXLIB even though we won't be using them
336     AC_PROG_LEX
337     fi
338    
339    
340     #--------------------------------------------------------------------
341     # Math libraries.
342     # On a few very rare systems, all of the libm.a stuff is
343     # already in libc.a. Set compiler flags accordingly.
344     # Also, Linux requires the "ieee" library for math to work
345     # right (and it must appear before "-lm").
346     #
347     # When building on HPUX with GCC, GCC cannot find `copysign'
348     # because it lives in an odd place; see if we need to add
349     # this odd place to MATH_LIBS.
350     #
351     # See if erf(), the error function, exists; if so, define
352     # HAVE_ERF.
353     #--------------------------------------------------------------------
354     AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
355    
356     AC_CHECK_LIB(ieee, printf, [MATH_LIBS="-lieee $MATH_LIBS"])
357    
358     if test -n "$MATH_LIBS" ; then
359     AC_CHECK_LIB(m, copysign, ,
360     AC_CHECK_LIB(m, drem, [MATH_LIBS="$MATH_LIBS /lib/pa1.1/libM.a"]
361     , , /lib/pa1.1/libM.a
362     ),
363     $MATH_LIBS)
364     fi
365    
366     # store the current list of libraries, add the math libraries to LIBS,
367     # check for erf(), then reset the value of LIBS.
368     asc_keep_LIBS="$LIBS"
369     LIBS="$LIBS $MATH_LIBS"
370     AC_CHECK_FUNCS(erf)
371     LIBS="$asc_keep_LIBS"
372    
373     #----------------------------------------------
374 johnpye 192 # Check for 'vsnprintf' -- there seems to be a problem with it in
375 johnpye 362 # on cygwin.
376 johnpye 192
377 aw0a 12 dnl -------------------------------------
378 johnpye 192 dnl Macro to sniff for the 'vsnprintf' function
379     dnl
380     dnl This function appears to be problematic under cygwin, hence the addition
381     dnl of this macro.
382     dnl -------------------------------------
383    
384     AC_DEFUN([AC_FUNC_SNPRINTF],
385     [AC_CHECK_FUNCS(snprintf vsnprintf)
386     AC_MSG_CHECKING(for working snprintf)
387     AC_CACHE_VAL(ac_cv_have_working_snprintf,
388     [AC_TRY_RUN(
389     [#include <stdio.h>
390    
391     int main(void)
392     {
393     char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
394     char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
395     int i;
396     i = snprintf (bufs, 2, "%s", "111");
397     if (strcmp (bufs, "1")) exit (1);
398     if (i != 3) exit (1);
399     i = snprintf (bufd, 2, "%d", 111);
400     if (strcmp (bufd, "1")) exit (1);
401     if (i != 3) exit (1);
402     exit(0);
403     }], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, ac_cv_have_working_snprintf=cross)])
404     AC_MSG_RESULT([$ac_cv_have_working_snprintf])
405     AC_MSG_CHECKING(for working vsnprintf)
406     AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
407     [AC_TRY_RUN(
408     [#include <stdio.h>
409     #include <stdarg.h>
410    
411     int my_vsnprintf (char *buf, const char *tmpl, ...)
412     {
413     int i;
414     va_list args;
415     va_start (args, tmpl);
416     i = vsnprintf (buf, 2, tmpl, args);
417     va_end (args);
418     return i;
419     }
420    
421     int main(void)
422     {
423     char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
424     char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
425     int i;
426     i = my_vsnprintf (bufs, "%s", "111");
427     if (strcmp (bufs, "1")) exit (1);
428     if (i != 3) exit (1);
429     i = my_vsnprintf (bufd, "%d", 111);
430     if (strcmp (bufd, "1")) exit (1);
431     if (i != 3) exit (1);
432     exit(0);
433     }], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, ac_cv_have_working_vsnprintf=cross)])
434     AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
435     if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then
436     AC_LIBOBJ(snprintf)
437     AC_MSG_WARN([Replacing missing/broken (v)snprintf() with version from http://www.ijs.si/software/snprintf/.])
438     AC_DEFINE(PREFER_PORTABLE_SNPRINTF, 1, "enable replacement (v)snprintf if system (v)snprintf is broken")
439     fi])
440    
441     AC_FUNC_SNPRINTF
442    
443     #--------------------------------------------------------------------
444 aw0a 12 # Check for X11.
445     # We'll use the simple autoconf builtin macro for finding
446     # X11 until we find a reason not to.
447     #
448     # On Solaris and IRIX, add the path to the X library to the
449     # run-time shared-library-search-path so the ASCEND binary
450     # can find the X library without the user having to set
451     # LD_LIBRARY_PATH
452     #--------------------------------------------------------------------
453     AC_PATH_X
454     if test -n "$x_includes"; then
455     X11_INCLUDES="-I$x_includes"
456     fi
457     if test -n "$x_libraries"; then
458     X11_LIBRARIES="-L$x_libraries"
459     case "$host" in
460     sparc-sun-solaris*)
461     X11_RUN_PATH="-R$x_libraries"
462     ;;
463     mips-sgi-irix*)
464     X11_RUN_PATH="-rpath $x_libraries"
465     ;;
466     *)
467     X11_RUN_PATH=""
468     ;;
469     esac
470     fi
471    
472    
473     #--------------------------------------------------------------------
474     # Check for the existence of various libraries. The order here
475     # is important, so that then end up in the right order in the
476     # command line generated by make. The -lsocket and -lnsl
477     # libraries require a couple of special tricks:
478     # 1. Use "connect" and "accept" to check for -lsocket, and
479     # "gethostbyname" to check for -lnsl.
480     # 2. Use each function name only once: can't redo a check
481     # because autoconf caches the results of the last check
482     # and won't redo it.
483     # 3. Use -lnsl and -lsocket only if they supply procedures that
484     # aren't already present in the normal libraries. This is
485     # because IRIX 5.2 has libraries, but they aren't needed and
486     # they're bogus: they goof up name resolution if used.
487     # 4. On some SVR4 systems, can't use -lsocket without -lnsl
488     # too. To get around this problem, check for both libraries
489     # together if -lsocket doesn't work by itself.
490     #--------------------------------------------------------------------
491     dnl AC_CHECK_LIB(Xbsd, printf, [LIBS="$LIBS -lXbsd"])
492    
493     asc_checkBoth=0
494     AC_CHECK_FUNC(connect, [asc_checkSocket=0], [asc_checkSocket=1])
495     if test "$asc_checkSocket" = 1; then
496     AC_CHECK_LIB(socket, printf, [X11_EXTRA_LIBS="-lsocket"],[asc_checkBoth=1])
497     fi
498     if test "$asc_checkBoth" = 1; then
499     asc_oldLibs=$LIBS
500     X11_EXTRA_LIBS="-lsocket -lnsl"
501     LIBS="$LIBS $X11_EXTRA_LIBS"
502     AC_CHECK_FUNC(accept, asc_checkNsl=0, [X11_EXTRA_LIBS=""])
503     LIBS=$asc_oldLibs
504     fi
505     asc_oldLibs=$LIBS
506     LIBS="$LIBS $X11_EXTRA_LIBS"
507     AC_CHECK_FUNC(gethostbyname, ,
508     AC_CHECK_LIB(nsl, printf, [X11_EXTRA_LIBS="$X11_EXTRA_LIBS -lnsl"]))
509     LIBS=$asc_oldLibs
510    
511    
512     #--------------------------------------------------------------------
513     # The following comes directly from the configure.in file for
514     # Tcl8.0.
515     #
516     # The statements below define a collection of symbols related to
517     # dynamic loading and shared libraries:
518     #
519     # DL_OBJS - Name of the object file that implements dynamic
520     # loading for ASCEND on this system.
521     # DL_LIBS - Library file(s) to include in tclsh and other base
522     # applications in order for the "load" command to work.
523     # LD_FLAGS - Flags to pass to the compiler when linking object
524     # files into an executable application binary such
525     # as tclsh.
526     # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
527     # that tell the run-time dynamic linker where to look
528     # for shared libraries such as libtcl.so. Depends on
529     # the variable LIB_RUNTIME_DIR in the Makefile.
530     # MAKE_LIB - Command to execute to build the ASCEND library;
531     # differs depending on whether or not ASCEND is being
532     # compiled as a shared library.
533     # SHLIB_CFLAGS - Flags to pass to cc when compiling the components
534     # of a shared library (may request position-independent
535     # code, among other things).
536     # SHLIB_LD - Base command to use for combining object files
537     # into a shared library.
538     # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
539     # creating shared libraries. This symbol typically
540     # goes at the end of the "ld" commands that build
541     # shared libraries. The value of the symbol is
542     # "${LIBS}" if all of the dependent libraries should
543     # be specified when creating a shared library. If
544     # dependent libraries should not be specified (as on
545     # SunOS 4.x, where they cause the link to fail, or in
546     # general if ASCEND and Tk aren't themselves shared
547     # libraries), then this symbol has an empty string
548     # as its value.
549     # SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable
550     # extensions. An empty string means we don't know how
551     # to use shared libraries on this platform.
552     # ASC_LIB_FILE - Name of the file that contains the ASCEND library, such
553     # as libtcl7.8.so or libtcl7.8.a.
554     # ASC_LIB_SUFFIX -Specifies everything that comes after the "libtcl"
555     # in the shared library name, using the $VERSION variable
556     # to put the version in the right place. This is used
557     # by platforms that need non-standard library names.
558     # Examples: ${VERSION}.so.1.1 on NetBSD, since it needs
559     # to have a version after the .so, and ${VERSION}.a
560     # on AIX, since the ASCEND shared library needs to have
561     # a .a extension whereas shared objects for loadable
562     # extensions have a .so extension. Defaults to
563     # ${VERSION}${SHLIB_SUFFIX}.
564     #--------------------------------------------------------------------
565    
566     # Step 1: set the variable "system" to hold the name and version number
567     # for the system. This can usually be done via the "uname" command, but
568     # there are a few systems, like Next, where this doesn't work.
569    
570     # Changed this to use the "$host" variable from AC_CANONICAL_HOST
571    
572     # Step 2: check for existence of -ldl library. This is needed because
573     # Linux can use either -ldl or -ldld for dynamic loading.
574    
575     AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
576    
577     # Step 3: set configuration options based on system name and version.
578    
579     ASC_SHARED_LIB_SUFFIX=""
580     ASC_UNSHARED_LIB_SUFFIX=""
581     ASC_LIB_VERSIONS_OK=ok
582     case $host in
583     *-aix*)
584     SHLIB_CFLAGS=""
585     SHLIB_LD="$fullpathsrcdir/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512"
586     SHLIB_LD_LIBS='${LIBS}'
587     SHLIB_SUFFIX=".so"
588     DL_OBJS=""
589     DL_LIBS="-lld"
590     LD_FLAGS=""
591     LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
592     ASC_SHARED_LIB_SUFFIX='${VERSION}.a'
593     ;;
594     *-bsdi*)
595     SHLIB_CFLAGS=""
596     SHLIB_LD="shlicc -r"
597     SHLIB_LD_LIBS='${LIBS}'
598     SHLIB_SUFFIX=".so"
599     DL_OBJS=""
600     DL_LIBS="-ldl"
601     LD_FLAGS=""
602     LD_SEARCH_FLAGS=""
603     ;;
604     *-dgux*)
605     SHLIB_CFLAGS="-K PIC"
606     SHLIB_LD="cc -G"
607     SHLIB_LD_LIBS=""
608     SHLIB_SUFFIX=".so"
609     DL_OBJS=""
610     DL_LIBS="-ldl"
611     LD_FLAGS=""
612     LD_SEARCH_FLAGS=""
613     ;;
614     *-hpux8*|*-hpux9*|*-hpux10*)
615     AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
616     if test "$tcl_ok" = yes; then
617     SHLIB_CFLAGS="+z"
618     SHLIB_LD="ld -b"
619     SHLIB_LD_LIBS=""
620     SHLIB_SUFFIX=".sl"
621     DL_OBJS=""
622     DL_LIBS="-ldld"
623     LD_FLAGS="-Wl,-E"
624     LD_SEARCH_FLAGS='-Wl,+b,${LIB_RUNTIME_DIR}:.'
625     fi
626     ;;
627     *-irix4*)
628     SHLIB_CFLAGS="-G 0"
629     SHLIB_SUFFIX=".a"
630     SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
631     SHLIB_LD_LIBS='${LIBS}'
632     DL_OBJS=""
633     DL_LIBS=""
634     LD_FLAGS="-Wl,-D,08000000"
635     LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
636     ASC_SHARED_LIB_SUFFIX='${VERSION}.a'
637     ;;
638     *-irix5*|*-irix6.*)
639     SHLIB_CFLAGS=""
640     SHLIB_LD="ld -shared -rdata_shared"
641     SHLIB_LD_LIBS=""
642     SHLIB_SUFFIX=".so"
643     DL_OBJS=""
644     DL_LIBS=""
645     LD_FLAGS=""
646     LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
647     ;;
648     *-linux*)
649     SHLIB_CFLAGS="-fPIC"
650     SHLIB_LD_LIBS=""
651     SHLIB_SUFFIX=".so"
652     if test "$have_dl" = yes; then
653     SHLIB_LD="${CC} -shared"
654     DL_OBJS=""
655     DL_LIBS="-ldl"
656     LD_FLAGS="-rdynamic"
657     LD_SEARCH_FLAGS=""
658     else
659     AC_CHECK_HEADER(dld.h, [
660     SHLIB_LD="ld -shared"
661     DL_OBJS=""
662     DL_LIBS="-ldld"
663     LD_FLAGS=""
664     LD_SEARCH_FLAGS=""])
665     fi
666     ;;
667     MP-RAS-02*)
668     SHLIB_CFLAGS="-K PIC"
669     SHLIB_LD="cc -G"
670     SHLIB_LD_LIBS=""
671     SHLIB_SUFFIX=".so"
672     DL_OBJS=""
673     DL_LIBS="-ldl"
674     LD_FLAGS=""
675     LD_SEARCH_FLAGS=""
676     ;;
677     MP-RAS-*)
678     SHLIB_CFLAGS="-K PIC"
679     SHLIB_LD="cc -G"
680     SHLIB_LD_LIBS=""
681     SHLIB_SUFFIX=".so"
682     DL_OBJS=""
683     DL_LIBS="-ldl"
684     LD_FLAGS="-Wl,-Bexport"
685     LD_SEARCH_FLAGS=""
686     ;;
687     *-netbsd*|*-freebsd*|*-openbsd*)
688     # Not available on all versions: check for include file.
689     AC_CHECK_HEADER(dlfcn.h, [
690     SHLIB_CFLAGS="-fpic"
691     SHLIB_LD="ld -Bshareable -x"
692     SHLIB_LD_LIBS=""
693     SHLIB_SUFFIX=".so"
694     DL_OBJS=""
695     DL_LIBS=""
696     LD_FLAGS=""
697     LD_SEARCH_FLAGS=""
698     ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0'
699     ], [
700     SHLIB_CFLAGS=""
701     SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
702     SHLIB_LD_LIBS='${LIBS}'
703     SHLIB_SUFFIX=".a"
704     DL_OBJS=""
705     DL_LIBS=""
706     LD_FLAGS=""
707     LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
708     ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
709     ])
710    
711     # FreeBSD doesn't handle version numbers with dots.
712    
713     ASC_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
714     ASC_LIB_VERSIONS_OK=nodots
715     ;;
716     *-riscos*)
717     SHLIB_CFLAGS="-G 0"
718     SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
719     SHLIB_LD_LIBS='${LIBS}'
720     SHLIB_SUFFIX=".a"
721     DL_OBJS=""
722     DL_LIBS=""
723     LD_FLAGS="-Wl,-D,08000000"
724     LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
725     ;;
726     SCO_SV-3.2*)
727     # Note, dlopen is available only on SCO 3.2.5 and greater. However,
728     # this test works, since "uname -s" was non-standard in 3.2.4 and
729     # below.
730     SHLIB_CFLAGS="-Kpic -belf"
731     SHLIB_LD="ld -G"
732     SHLIB_LD_LIBS=""
733     SHLIB_SUFFIX=".so"
734     DL_OBJS=""
735     DL_LIBS=""
736     LD_FLAGS="-belf -Wl,-Bexport"
737     LD_SEARCH_FLAGS=""
738     ;;
739     *-sni-sysv*)
740     SHLIB_CFLAGS="-K PIC"
741     SHLIB_LD="cc -G"
742     SHLIB_LD_LIBS=""
743     SHLIB_SUFFIX=".so"
744     DL_OBJS=""
745     DL_LIBS="-ldl"
746     LD_FLAGS=""
747     LD_SEARCH_FLAGS=""
748     ;;
749     *-sunos4*)
750     SHLIB_CFLAGS="-PIC"
751     SHLIB_LD="ld"
752     SHLIB_LD_LIBS=""
753     SHLIB_SUFFIX=".so"
754     DL_OBJS=""
755     DL_LIBS="-ldl"
756     LD_FLAGS=""
757     LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
758    
759     # SunOS can't handle version numbers with dots in them in library
760     # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
761     # requires an extra version number at the end of .so file names.
762     # So, the library has to have a name like libtcl75.so.1.0
763    
764     ASC_SHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.so.1.0'
765     ASC_UNSHARED_LIB_SUFFIX='`echo ${VERSION} | tr -d .`.a'
766     ASC_LIB_VERSIONS_OK=nodots
767     ;;
768     *-solaris*)
769     SHLIB_CFLAGS="-KPIC"
770     SHLIB_LD="/usr/ccs/bin/ld -G -z text"
771    
772     # Note: need the LIBS below, otherwise Tk won't find ASCEND's
773     # symbols when dynamically loaded into tclsh.
774    
775     SHLIB_LD_LIBS='${LIBS}'
776     SHLIB_SUFFIX=".so"
777     DL_OBJS=""
778     DL_LIBS="-ldl"
779     LD_FLAGS=""
780     LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
781     ;;
782     mips-dde-sysv*)
783     SHLIB_CFLAGS="-KPIC"
784     SHLIB_LD="cc -G"
785     SHLIB_LD_LIBS=""
786     SHLIB_SUFFIX=".so"
787     DL_OBJS=""
788     DL_LIBS="-ldl"
789     # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
790     # that don't grok the -Bexport option. Test that it does.
791     hold_ldflags=$LDFLAGS
792     AC_MSG_CHECKING([for ld accepts -Bexport flag])
793     LDFLAGS="${LDFLAGS} -Wl,-Bexport"
794     AC_TRY_LINK(, [int i;], found=yes, found=no)
795     LDFLAGS=$hold_ldflags
796     AC_MSG_RESULT($found)
797     if test "$found" = yes; then
798     LD_FLAGS="-Wl,-Bexport"
799     else
800     LD_FLAGS=""
801     fi
802     LD_SEARCH_FLAGS=""
803     ;;
804     esac
805    
806     #--------------------------------------------------------------------
807     # Look for Tcl/Tk
808 johnpye 363 #--------------------------------------------------------------------
809 aw0a 12
810 johnpye 332 # moved to config, acsite setup
811 ben.allan 411 # find tcl
812     TCLINCLUDE=
813 johnpye 332 TCLLIB=
814     TCLPACKAGE=
815     ASC_TCL
816 ben.allan 411 # find tk
817     TKINCLUDE=
818     TKLIB=
819     TKPACKAGE=
820     ASC_TK
821     TK_LD_HACK="\$(TK_LD_SEARCH_FLAGS)"
822 ben.allan 624 if test "x$TK_LD_SEARCH_FLAGS" = "x''"; then
823     TK_LD_HACK=""
824     fi
825     if test "x$TK_LD_SEARCH_FLAGS" = "x"; then
826     TK_LD_HACK=""
827     fi
828    
829 johnpye 332
830 aw0a 12 #--------------------------------------------------------------------
831     # FORTRAN
832     #
833     # ASCEND uses the LSOD integrator and is capable of working
834     # with CONOPT and with MINOS. These libraries are written in
835     # Fortran; to use them, configure needs to find a Fortran
836     # compiler and the necessary Fortran libraries (e.g.,
837     # libF77.a). LSOD, CONOPT, and MINOS also require the BLAS and
838     # LINPACK libraries to avoid undefined symbols at link time.
839     #
840     # The builder can specify the location of
841     # * the Fortran compiler and libraries using
842     # --with-fortran=<compiler>,<libraries>
843     # * the BLAS library using
844     # --with-blas=<blas-library>
845     # * the LINPACK library using
846     # --with-linpack=<linpack-library>
847     # * the LSOD library using
848     # --with-blas=<lsod-library>
849     # * the CONOPT library using
850     # --with-conopt=<conopt-library>
851     # * the MINOS library using
852     # --with-minos=<minos-library> <===currently disabled
853     # The builder can disable some parts of the fortran build using
854     # the --without-<package> configure option.
855     #
856     # If the user does not specify the locations of the compiler
857     # and the libraries and does not disable them, configure
858     # attempts to find them.
859     #
860     # Building with LSOD, CONOPT, and/or MINOS is further
861     # complicated by the dependencies between these libraries and
862     # the BLAS and LINPACK libraries.
863     #
864     # If we cannot find a Fortran compiler, we disable all Fortran
865     # code (LSOD, CONOPT, and MINOS). Otherwise, look for the
866     # Fortran libraries (e.g., libF77.a) based on the type of
867     # machine we are compiling on.
868     #
869     # If Fortran is enabled, we need to find a compiled BLAS
870     # library or source code. Check for the machine's libblas.a
871     # and ASCEND's libascblas.a; if those fail, check for the
872     # libascblas.a source code; if that fails, we disable all
873     # Fortran (LSOD, CONOPT, MINOS).
874     #
875     # If Fortran is enabled, we need to find a compiled LINPACK
876     # library or source code. Check for the machine's liblpak.a
877     # and ASCEND's libasclpak.a; if those fail, check for the
878     # libasclpak.a source code; if that fails, we disable all
879     # Fortran (LSOD, CONOPT, MINOS).
880     #
881     # If Fortran is enabled, we try to find a compiled LSOD library
882     # or source code. Check for a libinteg.a; if that fails, check
883     # for the libinteg.a source code; if that fails, we disable
884     # LSOD. If we find LSOD, define STATIC_LSOD.
885     #
886     # If Fortran is enabled, we try to find a compiled OPTSQP
887     # library or source code. Check for a librsqp.a; if that fails,
888     # check for the librsqp.a source code; if that fails, we disable
889     # OPTSQP. If we find RSQP, define STATIC_OPTSQP.
890     #
891     # If Fortran is enabled, we try to find a compiled CONOPT
892     # library. Check for a libconsub.a; if that fails, we disable
893     # CONOPT. If we find CONOPT, define STATIC_CONOPT; if not,
894     # tell the user where to find CONOPT using the contact
895     # information from the nonlinear programming FAQ:
896     # http://www.mcs.anl.gov/home/otc/Guide/faq/nonlinear-programming-faq.html
897     #
898     # If Fortran is enabled, we try to find a compiled MINOS
899     # library or source code. Check for a libminos54.a; if that
900     # fails, check for the libminos54.a source code; if that fails,
901     # we disable MINOS. If we find MINOS, define STATIC_MINOS; if
902     # not, tell the user where to find MINOS using the contact
903     # information from the nonlinear programming FAQ:
904     # http://www.mcs.anl.gov/home/otc/Guide/faq/nonlinear-programming-faq.html
905     #--------------------------------------------------------------------
906     #
907     # the list of directories to search for the fortran compiler
908     asc_f77_prog_dirs="$PATH:/usr/lang:/opt/SUNWspro/bin"
909     #
910     # the list of directories to search for the required fortran libraries
911     asc_f77_support_dirs="
912     /lib
913     /usr/lib
914     /usr/local/lib
915     /usr/contributed/lib
916     /usr/local/lib/ascend/lib
917     $ascpwd/blas
918     $ascpwd/linpack
919     $ascpwd/lsod
920    
921 aw0a 15 ##AWW There are folders two levels up from configure for these packages
922     $fullpathsrcdir/../../blas
923     $fullpathsrcdir/../../linpack
924     $fullpathsrcdir/../../lsod
925    
926     #AWW20041113: $ascpwd/conopt
927 aw0a 12 #AWW20041113: $ascpwd/rsqp
928     #AWW20041113: $ascpwd/minos
929     #AWW20041113: $ascpwd/ascend4/archive
930     $ascpwd/archive
931 ben.allan 44 /afs/cs/project/ascend/depot/@sys/lib
932 aw0a 12 /afs/cs/project/ascend/depot/build/obj/conopt
933     "
934     #
935     AC_ARG_WITH(fortran,
936     [Fortran compiler and libraries:
937     --with-fortran=F77,F77LIBS
938     The location of your Fortran compiler and its
939     library files. For example, under SunOS:
940     --with-fortran='f77,-L/usr/lang/lib -lF77 -lM77'
941     To specify only the compiler or libraries, leave off
942     whatever is not needed:
943     --with-fortran=',-L/usr/lang/lib -lF77 -lM77'
944     Use '--without-fortran' to not link against
945     any Fortran libraries],
946     , [with_fortran=yes])
947     case "$with_fortran" in
948     no)
949     # The user disabled all fortran using
950     # the --without-fortran option.
951     F77=
952     F77LIBS=
953     with_f77=no
954     with_f77libs=no
955     ;;
956     yes|,|"")
957     # The user didn't pass in the --with-fortran option
958     # or didn't give us any useful information. We do
959     # the search ourselves.
960     with_f77=_searching
961     with_f77libs=_searching
962     ;;
963     ,*)
964     # The user passed in the libraries, search for the
965     # compiler ourselves.
966     with_f77=_searching
967     F77LIBS=`echo $with_fortran | sed 's/^,//'`
968     echo "user gave F77LIBS=$F77LIBS"
969     ;;
970     *,?*)
971     # The user passed in both the compiler and the
972     # libraries.
973     F77=`echo $with_fortran | sed s'/,.*$//'`
974     F77LIBS=`echo $with_fortran | sed 's/^.*,//'`
975     echo "user gave F77=$F77"
976     echo "user gave F77LIBS=$F77LIBS"
977     ;;
978     *)
979     # The user passed in the compiler; search for the
980     # libraries ourselves.
981     F77=`echo $with_fortran | sed s'/,$//'`
982     with_f77libs=_searching
983     echo "user gave F77=$F77"
984     ;;
985     esac
986    
987     if test "X$with_f77" = X_searching ; then
988     # Search for the fortran compiler; print a warning if we can't
989     # find it and disable all fortran.
990     AC_PATH_PROGS(F77, f77 xlf g77, , $asc_f77_prog_dirs)
991     if test -z "$F77" ; then
992     with_fortran=no
993     with_f77libs=no
994     AC_MSG_WARN([Cannot find your Fortran compiler. Building ASCEND
995     without integration, MINOS, and CONOPT support. To bulid ASCEND with
996     Fortran support, run configure with the option
997     --with-fortran=F77,F77LIBS
998     where F77 is the full path to your Fortran compiler and F77LIBS are
999     its related libraries])
1000     fi
1001     fi
1002    
1003     if test "X$with_f77libs" = X_searching ; then
1004     # We found a compiler, now search for the fortran libraries
1005     # based on the system type.
1006     AC_MSG_RESULT([checking for fortran libraries based on system type])
1007     case "$host" in
1008     hppa1.1-hp-hpux*)
1009     AC_CHECK_LIB(cl, FTN_QATAN, [F77LIBS="$F77LIBS -lcl"], , $F77LIBS)
1010     ;;
1011     *-ibm-aix*)
1012     # need to add -lc before -lxlf on AIX to
1013     # avoid getting the wrong getenv
1014     F77LIBS="-lc $F77LIBS"
1015     AC_CHECK_LIB(xlf, _xldabs, [F77LIBS="$F77LIBS -lxlf"], , $F77LIBS)
1016     AC_CHECK_LIB(xlfutil, srand_, [F77LIBS="$F77LIBS -lxlfutil"], ,
1017     $F77LIBS)
1018     AC_CHECK_LIB(xlf90, printf,
1019     [F77LIBS="$F77LIBS -lxlf90"], , $F77LIBS)
1020     ;;
1021     *-linux-*)
1022     AC_CHECK_LIB(f2c, pow_dd, [F77LIBS="$F77LIBS -lf2c"], , $F77LIBS)
1023     AC_CHECK_LIB(g2c, pow_dd, [F77LIBS="$F77LIBS -lg2c"], , $F77LIBS)
1024     ;;
1025     sparc-sun-solaris*)
1026     if test -n "$GCC" ; then
1027     F77LIBS="-L/opt/SUNWspro/lib -R/opt/SUNWspro/lib"
1028     fi
1029     AC_CHECK_LIB(sunmath, d_sqrt_, [MATH_LIBS="-lsunmath $MATH_LIBS"])
1030     AC_CHECK_LIB(F77, f77_init,
1031     [F77LIBS="$F77LIBS -lF77"], , $F77LIBS $MATH_LIBS)
1032     AC_CHECK_LIB(M77, inmax_,
1033     [F77LIBS="$F77LIBS -lM77"], , $F77LIBS $MATH_LIBS)
1034     ;;
1035     sparc-sun-sunos4*)
1036     if test -n "$GCC" ; then
1037     F77LIBS="-L/usr/lang/lib"
1038     fi
1039     AC_CHECK_LIB(F77, f77_init, [F77LIBS="$F77LIBS -lF77"], , $F77LIBS)
1040     AC_CHECK_LIB(M77, inmax_, [F77LIBS="$F77LIBS -lM77"], , $F77LIBS)
1041     ;;
1042     mips-sgi-irix*)
1043     AC_CHECK_LIB(F77, s_copy, [F77LIBS="$F77LIBS -lF77"], , $F77LIBS)
1044     AC_CHECK_LIB(I77, f_exit, [F77LIBS="$F77LIBS -lI77"], , $F77LIBS)
1045     AC_CHECK_LIB(isam, mkidxname,
1046     [F77LIBS="$F77LIBS -lisam"], , $F77LIBS)
1047     ;;
1048     *)
1049     AC_CHECK_LIB(F77, printf, [F77LIBS="$F77LIBS -lF77"], , $F77LIBS)
1050     AC_CHECK_LIB(M77, printf, [F77LIBS="$F77LIBS -lM77"], , $F77LIBS)
1051     AC_CHECK_LIB(f2c, pow_dd, [F77LIBS="$F77LIBS -lf2c"], , $F77LIBS)
1052     AC_CHECK_LIB(f77, printf, [F77LIBS="$F77LIBS -lf77"], , $F77LIBS)
1053     AC_CHECK_LIB(for, printf, [F77LIBS="$F77LIBS -lfor"], , $F77LIBS)
1054     AC_CHECK_LIB(ots, printf, [F77LIBS="$F77LIBS -lots"], , $F77LIBS)
1055     AC_CHECK_LIB(Ufor, printf, [F77LIBS="$F77LIBS -lUfor"], , $F77LIBS)
1056     ;;
1057     esac
1058     fi
1059    
1060     # asc_subdirs are the extra fortran subdirectories we have to visit
1061     # to build the fortran libraries. Initialize it to empty here.
1062     asc_subdirs=''
1063    
1064     # Initialize the blas variables
1065     make_blaslib=''
1066    
1067     AC_ARG_WITH(blas,
1068     [ --with-blas=BLASLIB The full path to the blas library.
1069     Use '--with-blas=build' to build the blas library
1070     from the sources that come with the distribution.],
1071     , [with_blas=yes] )
1072     case "$with_fortran$with_blas" in
1073     no*)
1074     # Fortran is disabled; ignore this option (if present)
1075     BLASLIB=
1076     ;;
1077     *no)
1078     # It is an error if the user chooses to build without
1079     # the BLAS library if Fortran is enabled.
1080     AC_MSG_ERROR([Bad option '--without-blas'
1081     To support Fortran calls, ASCEND must be compiled with a blas library])
1082     ;;
1083     *build)
1084     # Fortran is enabled and the user specified --with-blas=build
1085     # For a search for BLAS source code and tell the Makefile
1086     # to build it; useful for testing configure.
1087     #AWW20041206: blas_src_file="$srcdir/blas/dcopy.f"
1088 aw0a 18 blas_src_file="$srcdir/../../blas/dcopy.f"
1089     AC_MSG_CHECKING([for blas source file $blas_src_file ])
1090 aw0a 12 if test -f $blas_src_file ; then
1091     AC_MSG_RESULT(yes)
1092     #AWW20041119: BLASLIB="$ascpwd/ascend4/archive/libascblas.a"
1093 aw0a 15 BLASLIB="$ascpwd/archive/libascblas.a"
1094 ben.allan 44 make_blaslib='make-blaslib'
1095 aw0a 12 #AWW20041206: blaslib_makefile="blas/Makefile"
1096 aw0a 18 blaslib_makefile="blas/Makefile:../../blas/Makefile.in"
1097 ben.allan 44 #AWW20041206: asc_subdirs="$asc_subdirs ../blas"
1098 aw0a 18 asc_subdirs="$asc_subdirs blas"
1099 ben.allan 44 else
1100 aw0a 12 AC_MSG_RESULT(no)
1101     AC_MSG_ERROR([User specified '--with-blas=build' but
1102     configure cannot find the blas source file $blas_src_file])
1103     fi
1104     ;;
1105     *yes)
1106     # Fortran in enabled and the user didn't give the --with-blas
1107     # option or didn't give the library's location.
1108     # Search for a compiled libblas.a or libascblas.a; if that
1109     # fails, look for BLAS source code; if that also fails,
1110     # disable all Fortran and print a warning.
1111     AC_PATH_PROGS(BLASLIB, libblas.a libascblas.a, , $asc_f77_support_dirs)
1112     blas_src_file="$srcdir/../../blas/dcopy.f"
1113 aw0a 18 if test -z "$BLASLIB" -a -n "$blas_src_file" ; then
1114 aw0a 12 AC_MSG_CHECKING([for blas source file $blas_src_file ])
1115     if test -f $blas_src_file ; then
1116     AC_MSG_RESULT(yes)
1117     #AWW20041119: BLASLIB="$ascpwd/ascend4/archive/libascblas.a"
1118 aw0a 18 BLASLIB="$ascpwd/archive/libascblas.a"
1119 ben.allan 44 make_blaslib='make-blaslib'
1120 aw0a 12 #AWW20041206: blaslib_makefile="blas/Makefile"
1121 aw0a 18 blaslib_makefile="blas/Makefile:../../blas/Makefile.in"
1122 ben.allan 44 #AWW20041206: asc_subdirs="$asc_subdirs ../blas"
1123 aw0a 18 asc_subdirs="$asc_subdirs blas"
1124 ben.allan 44 else
1125 aw0a 12 AC_MSG_RESULT(no)
1126     fi
1127     fi
1128     if test -z "$BLASLIB" ; then
1129     with_fortran=no
1130     AC_MSG_WARN([Cannot find libblas.a, libascblas.a, nor blas
1131     source code. Building ASCEND without integration, MINOS, and CONOPT
1132     support. To specify a specific location for the blas library, run
1133     configure again with the argument:
1134     --with-blas=BLASLIB
1135     where BLASLIB is the full path to the blas library file.])
1136     fi
1137     ;;
1138     *)
1139     # The user gave us --with-blas=BLASLIB, use that as the
1140     # location of the BLAS library.
1141     BLASLIB="$with_blas"
1142     ;;
1143     esac
1144    
1145    
1146     # Initialize the linpack variables
1147     make_lpaklib=''
1148    
1149     AC_ARG_WITH(linpack,
1150     [ --with-linpack=LPAKLIB The full path to the linpack library.
1151     Use '--with-linpack=build' to build the library
1152     from the sources that come with the distribution.],
1153     , [with_linpack=yes] )
1154     case "$with_fortran$with_linpack" in
1155     no*)
1156     # Fortran is disabled; ignore this option (if present)
1157     LPAKLIB=
1158     ;;
1159     *no)
1160     # It is an error if the user chooses to build without
1161     # the LINPACK library if Fortran is enabled.
1162     AC_MSG_ERROR([Bad option '--without-linpack'
1163     To support Fortran calls, ASCEND must be compiled with a
1164     linpack library.])
1165     ;;
1166     *build)
1167     # Fortran is enabled and the user specified --with-linpack=build
1168     # For a search for LINPACK source code and tell the Makefile
1169     # to build it; useful for testing configure.
1170     lpak_src_file="$srcdir/../../linpack/d1mach.f"
1171 aw0a 18 AC_MSG_CHECKING([for linpack source file $lpak_src_file ])
1172 aw0a 12 if test -f $lpak_src_file ; then
1173     AC_MSG_RESULT(yes)
1174     #AWW20041119: LPAKLIB="$ascpwd/ascend4/archive/libasclpak.a"
1175 aw0a 15 LPAKLIB="$ascpwd/archive/libasclpak.a"
1176 ben.allan 44 make_lpaklib='make-lpaklib'
1177 aw0a 12 #AWW20041206: lpaklib_makefile="linpack/Makefile"
1178 aw0a 18 lpaklib_makefile="linpack/Makefile:../../linpack/Makefile.in"
1179 ben.allan 44 #AWW20041206: asc_subdirs="$asc_subdirs ../linpack"
1180 aw0a 18 asc_subdirs="$asc_subdirs linpack"
1181 ben.allan 44 else
1182 aw0a 12 AC_MSG_RESULT(no)
1183     AC_MSG_ERROR([User specified '--with-linpack=build' but
1184     configure cannot find the linpack source file $lpak_src_file])
1185     fi
1186     ;;
1187     *yes)
1188     # Fortran in enabled and the user didn't give the --with-linpack
1189     # option or didn't give the library's location.
1190     # Search for a compiled liblpak.a or libasclpak.a; if that
1191     # fails, look for LINPACK source code; if that also fails,
1192     # disable all Fortran and print a warning.
1193     AC_PATH_PROGS(LPAKLIB, liblpak.a libasclpak.a, , $asc_f77_support_dirs)
1194     lpak_src_file="$srcdir/../../linpack/d1mach.f"
1195 aw0a 18 if test -z "$LPAKLIB" -a -n "$lpak_src_file" ; then
1196 aw0a 12 AC_MSG_CHECKING([for linpack source file $lpak_src_file ])
1197     if test -f $lpak_src_file ; then
1198     AC_MSG_RESULT(yes)
1199     #AWW20041119: LPAKLIB="$ascpwd/ascend4/archive/libasclpak.a"
1200 aw0a 15 LPAKLIB="$ascpwd/archive/libasclpak.a"
1201 ben.allan 44 make_lpaklib='make-lpaklib'
1202 aw0a 12 #AWW20041206: lpaklib_makefile="linpack/Makefile"
1203 aw0a 18 lpaklib_makefile="linpack/Makefile:../../linpack/Makefile.in"
1204 ben.allan 44 #AWW20041206: asc_subdirs="$asc_subdirs ../linpack"
1205 aw0a 18 asc_subdirs="$asc_subdirs linpack"
1206 ben.allan 44 else
1207 aw0a 12 AC_MSG_RESULT(no)
1208     fi
1209     fi
1210     if test -z "$LPAKLIB" ; then
1211     with_fortran=no
1212     AC_MSG_WARN([Cannot find liblpak.a, libasclpak.a, nor linpack
1213     source code. Building ASCEND without integration, MINOS, and CONOPT
1214     support. To specify a specific location for the linpack library, run
1215     configure again with the argument:
1216     --with-linpack=LPAKLIB
1217     where LPAKLIB is the full path to the linpack library file.])
1218     fi
1219     ;;
1220     *)
1221     # The user gave us --with-linkpack=LINKPACKLIB, use that
1222     # as the location of the LINKPACK library.
1223     LPAKLIB="$with_linpack"
1224     ;;
1225     esac
1226    
1227    
1228     # Initialize the lsod variables
1229     make_lsodlib=''
1230     HAVE_LSOD=''
1231    
1232     AC_ARG_WITH(lsod,
1233     [ --with-lsod=LSODLIB The full path to the lsod library.
1234     Use '--with-lsod=build' to build the lsod library
1235     from the sources that come with the distribution.],
1236     , [with_lsod=yes] )
1237     case "$with_fortran$with_lsod" in
1238     no*)
1239     # Fortran is disabled; ignore this option (if present)
1240     LSODLIB=
1241     with_lsod=no
1242     ;;
1243     *no)
1244     # Fortran is enabled but the user specified --without-lsod
1245     LSODLIB=
1246     ;;
1247     *build)
1248     # Fortran is enabled and the user specified --with-lsod=build
1249     # For a search for LSOD source code and tell the Makefile
1250     # to build it; useful for testing configure.
1251     lsod_src_file="$srcdir/../../lsod/lsode.f"
1252 aw0a 18 AC_MSG_CHECKING([for lsod source file $lsod_src_file ])
1253 aw0a 12 if test -f $lsod_src_file ; then
1254     AC_MSG_RESULT(yes)
1255     #AWW20041119: LSODLIB="$ascpwd/ascend4/archive/libinteg.a"
1256 aw0a 15 LSODLIB="$ascpwd/archive/libinteg.a"
1257 ben.allan 44 make_lsodlib='make-lsodlib'
1258 aw0a 12 #AWW20041206: lsodlib_makefile="lsod/Makefile"
1259 aw0a 18 lsodlib_makefile="lsod/Makefile:../../lsod/Makefile.in"
1260 ben.allan 44 #AWW20041206: asc_subdirs="$asc_subdirs ../lsod"
1261 aw0a 18 asc_subdirs="$asc_subdirs lsod"
1262 ben.allan 44 HAVE_LSOD='-DSTATIC_LSOD'
1263 aw0a 12 else
1264     AC_MSG_RESULT(no)
1265     AC_MSG_ERROR([User specified '--with-lsod=build' but
1266     configure cannot find the lsod source file $lsod_src_file])
1267     fi
1268     ;;
1269     *yes)
1270     # Fortran in enabled and the user didn't give the --with-lsod
1271     # option or didn't give the library's location.
1272     # Search for a compiled libinteg.a; if that fails, look
1273     # for LSOD source code; if that also fails, disable LSOD
1274     # and print a warning.
1275     AC_PATH_PROGS(LSODLIB, libinteg.a libasclsod.a, , $asc_f77_support_dirs)
1276     lsod_src_file="$srcdir/../../lsod/lsode.f"
1277 aw0a 18 if test -z "$LSODLIB" -a -n "$lsod_src_file" ; then
1278 aw0a 12 AC_MSG_CHECKING([for lsod source file $lsod_src_file ])
1279     if test -f $lsod_src_file ; then
1280     AC_MSG_RESULT(yes)
1281     #AWW20041119: LSODLIB="$ascpwd/ascend4/archive/libinteg.a"
1282 aw0a 15 LSODLIB="$ascpwd/archive/libinteg.a"
1283 ben.allan 44 make_lsodlib='make-lsodlib'
1284 aw0a 12 #AWW20041206: lsodlib_makefile="lsod/Makefile"
1285 aw0a 18 lsodlib_makefile="lsod/Makefile:../../lsod/Makefile.in"
1286 ben.allan 44 #AWW20041206: asc_subdirs="$asc_subdirs ../lsod"
1287 aw0a 18 asc_subdirs="$asc_subdirs lsod"
1288 ben.allan 44 else
1289 aw0a 12 AC_MSG_RESULT(no)
1290     fi
1291     fi
1292     if test -z "$LSODLIB" ; then
1293     with_lsod=no
1294     AC_MSG_WARN([Cannot find libinteg.a nor the lsod
1295     source code. Building ASCEND without integration
1296     support. To specify a specific location for the lsod library, run
1297     configure again with the argument:
1298     --with-lsod=LSODLIB
1299     where LSODLIB is the full path to the lsod integration library file.])
1300     else
1301     HAVE_LSOD='-DSTATIC_LSOD'
1302     fi
1303     ;;
1304     *)
1305     # The user gave us --with-lsod=LSODLIB, use that as the
1306     # location of the LSOD library and define -DSTATIC_LSOD.
1307     LSODLIB="$with_lsod"
1308     HAVE_LSOD='-DSTATIC_LSOD'
1309     ;;
1310     esac
1311    
1312    
1313     #--------------------------------------------------------------------
1314     # Other trees which may or may not be present. If present,
1315     # generate the Makefiles in the tree unless the user passes in
1316     # a --without-<package> argument.
1317     #
1318     # Valid <package> values are: TK, models, help
1319     #
1320     # We could have `configure' do this for us via
1321     # AC_CONFIG_SUBDIRS, but `configure' scripts in the trees can
1322     # only be one directory removed from this configure script.
1323     # For example, it would be nice to have `models' under
1324     # `ascend4', but `configure' doesn't like `ascend4/models' as
1325     # an argument to AC_CONFIG_SUBDIRS.
1326     #
1327     # To get around this problem, we do things by hand. :-)
1328     #
1329     # If the user gives a --without-<package> argument, we have
1330     # nothing to do for that package.
1331     #
1332     # Otherwise,
1333     # * Set `subdir_file_exists' to a file that should exist in the
1334     # subtree---this is how we know that the subtree is really
1335     # there.
1336     # * Set `subdir_locations' to the list of locations, relative
1337     # to this configure script, where the subtree may live.
1338     # * Set `subdir_output' to the list of makefiles to generate;
1339     # the variable `subdir_root' in this list will be replaced
1340     # with the correct value from `subdir_locations'.
1341     #
1342     # To see which (if any) of the values in `subdir_locations' is
1343     # the correct one, we set `subdir_root' to each value in
1344     # `subdir_locations' and check for the existence of
1345     # $fullpathsrcdir/$subdir_root/$subdir_file_exists, where
1346     # $fullpathsrcdir is the full path to the source directory. If
1347     # that file exists, we
1348     # * Set <package>_dir_root to ../$subdir_root. The "../" is
1349     #AWW20041208:# needed since this value is used in the `ascend4' directory
1350 aw0a 21 # needed since this value is used in the `generic' directory
1351     #AWW20041208:# and $subdir_root is relative to the parent of `ascend4'.
1352     # and $subdir_root is relative to the parent of `generic'.
1353     # * Substitute the value of $subdir_root into `subdir_output'
1354 aw0a 12 # and set the result to <package>_makefiles: the list of
1355     # Makefiles for configure to generate.
1356     # * Each package needs to be able to find its way back to
1357     # ascend4/ConfigAscend; it needs to go back up the tree
1358     # however many levels deep it is---i.e., `foo/bar/baz' should
1359     # become `../../..' and this does it: sed 's,[^/][^/]*,..,g'
1360     # but we need to quote the [] from m4, so we get this bizarre
1361     # thing: sed 's,[[^/][^/]]*,..,g' Set <package>_topbuilddir
1362     # to this result.
1363     # * Exit the loop.
1364     #--------------------------------------------------------------------
1365    
1366     # Initialize variables
1367     tkdir_root=''
1368     tkdir_topbuilddir=''
1369    
1370     AC_ARG_WITH(tkdir,
1371     [Generation of Makefiles:
1372     --without-tkdir do not generate Makefiles in the TK subdir],
1373     , [with_tkdir=yes])
1374     if test ! "X$with_tkdir" = "Xno" ; then
1375     subdir_file_exists='AscendRC'
1376     #AWW20041117: FIXME next line
1377 aw0a 15 #AWW20041206: subdir_locations='ascend4/TK'
1378 aw0a 18 subdir_target="TK"
1379 ben.allan 44 subdir_locations='../../tcltk/TK'
1380 johnpye 569 subdir_output='
1381 aw0a 12 $subdir_target/Makefile:$subdir_root/Makefile.in
1382 ben.allan 44 $subdir_target/Makefile.Rules:$subdir_root/Makefile.Rules.in
1383     $subdir_target/bitmaps/Makefile:$subdir_root/bitmaps/Makefile.in
1384     $subdir_target/templates/Makefile:$subdir_root/templates/Makefile.in
1385     '
1386 aw0a 12 for subdir_root in $subdir_locations ; do
1387     if test -f $fullpathsrcdir/$subdir_root/$subdir_file_exists ; then
1388     #AWW20041208: tkdir_root="../$subdir_root"
1389 aw0a 21 tkdir_root=$subdir_target
1390 ben.allan 44 tkdir_makefiles=`eval echo $subdir_output`
1391 aw0a 12 tkdir_topbuilddir="$fullpathsrcdir/../../tcltk/TK"
1392 johnpye 569 break
1393 aw0a 12 fi
1394     done
1395     fi
1396    
1397     # Initialize variables
1398     models_dir_root=''
1399     models_topbuilddir=''
1400    
1401     AC_ARG_WITH(models,
1402     [ --without-models do not generate Makefiles in the models subdir],
1403     , [with_models=yes])
1404     if test ! "X$with_models" = "Xno" ; then
1405     subdir_file_exists='system.a4l'
1406     #AWW20041117: FIXME next line
1407 aw0a 15 #AWW20041206: subdir_locations='models ascend4/models'
1408 aw0a 18 subdir_target="models"
1409 ben.allan 44 subdir_locations='models ../../models'
1410     subdir_output='
1411 aw0a 12 $subdir_target/Makefile:$subdir_root/Makefile.in
1412 ben.allan 44 $subdir_target/Makefile.Rules:$subdir_root/Makefile.Rules.in
1413     $subdir_target/ben/Makefile:$subdir_root/ben/Makefile.in
1414 johnpye 72 $subdir_target/johnpye/Makefile:$subdir_root/johnpye/Makefile.in
1415     '
1416 aw0a 12 ## $subdir_root/examples/Makefile
1417     ## $subdir_root/examples/abbott/Makefile
1418     ## $subdir_root/examples/flexible_design/Makefile
1419     ## $subdir_root/libraries/Makefile
1420     ## $subdir_root/libraries/abbott/Makefile
1421     ## $subdir_root/pending/Makefile
1422     ## $subdir_root/pending/examples/Makefile
1423     ## $subdir_root/pending/libraries/Makefile
1424     for subdir_root in $subdir_locations ; do
1425     if test -f $fullpathsrcdir/$subdir_root/$subdir_file_exists ; then
1426     #AWW20041208: models_dir_root="../$subdir_root"
1427 aw0a 21 models_dir_root="$subdir_target"
1428 ben.allan 44 models_makefiles=`eval echo $subdir_output`
1429 aw0a 12 models_topbuilddir="$fullpathsrcdir/../../models"
1430 ben.allan 44 break
1431 aw0a 12 fi
1432     done
1433     fi
1434    
1435     AC_ARG_WITH(quiet,
1436 ben.allan 624 [ --with-quiet Much less whining if reinstalling the tk,models subdirs],
1437     , [with_quiet=no])
1438     if test ! "X$with_quiet" = "Xno" ; then
1439     QUIET_INSTALL=1
1440     else
1441     QUIET_INSTALL=0
1442     fi
1443     AC_SUBST(QUIET_INSTALL)
1444    
1445 aw0a 12 # Initialize variables
1446     help_dir_root=''
1447     help_topbuilddir=''
1448    
1449     dnl >>>>AC_ARG_WITH(help,
1450     dnl >>>> [ --without-help do not generate Makefiles in the help subdir],
1451     dnl >>>> , [with_help=yes])
1452     dnl >>>>if test ! "X$with_help" = "Xno" ; then
1453     dnl >>>> subdir_file_exists='ascend-helpTOC.htm'
1454     dnl >>>> subdir_locations='help ascend4/help'
1455     dnl >>>> subdir_output='
1456     dnl >>>> $subdir_root/Makefile
1457     dnl >>>> $subdir_root/Makefile.Rules:$subdir_root/Makefile.Rules.in
1458     dnl >>>> $subdir_root/Screenshots/Makefile
1459     dnl >>>> '
1460     dnl >>>> for subdir_root in $subdir_locations ; do
1461     dnl >>>> if test -f $fullpathsrcdir/$subdir_root/$subdir_file_exists ; then
1462     dnl >>>> help_dir_root="../$subdir_root"
1463     dnl >>>> help_makefiles=`eval echo $subdir_output`
1464     dnl >>>> help_topbuilddir=`echo "$subdir_root" | sed 's,[[^/][^/]]*,..,g'`
1465     dnl >>>> break
1466     dnl >>>> fi
1467     dnl >>>> done
1468     dnl >>>>fi
1469    
1470     #-----------------------------------------------
1471 johnpye 368 # DYNAMIC_LINKING or STATIC_LINKING ?
1472    
1473 aw0a 12 AC_MSG_CHECKING([for package linking])
1474 johnpye 368
1475     AC_ARG_ENABLE(dynamic-linking, AC_HELP_STRING([--enable-dynamic-packages],
1476     [Enable dynamic linking of ASCEND external packages (default is YES for Linux, Cygwin and MinGW; NO for any other platform)])
1477     ,
1478     if test $enableval; then
1479     dynlinking=1
1480     else
1481     dynlinking=0
1482     fi
1483     ,
1484     dynlinking="_def"
1485     )
1486    
1487     if test "X$dynlinking" = "X_def"; then
1488     case $host in
1489     *-*-cygwin* | *-*-mingw* | *linux* ) dynlinking=1;;
1490     *) dynlinking=0;;
1491     esac
1492     fi
1493    
1494     if test "X$dynlinking" = "X1"; then
1495     AC_MSG_RESULT([DYNAMIC])
1496     AC_DEFINE(DYNAMIC_PACKAGES)
1497     else
1498     AC_MSG_RESULT([STATIC])
1499     AC_DEFINE(STATIC_PACKAGES)
1500 ben.allan 411 fi
1501 johnpye 368
1502     #-----------------------------------------------
1503 johnpye 371 # DEBUG_RELS or not?
1504    
1505 johnpye 368 AC_MSG_CHECKING([for relation debugging])
1506 johnpye 371
1507     AC_ARG_ENABLE(relation-debugging, AC_HELP_STRING([--enable-relation-debugging],
1508     [Enable debug output for relation compilation (default is NO)])
1509     ,
1510     if test $enableval; then
1511     debugrels=1
1512     else
1513     debugrels=0
1514     fi
1515     ,
1516     debugrels=0
1517     )
1518    
1519     if test "X$debugrels" = "X1"; then
1520     AC_MSG_RESULT([YES])
1521     AC_DEFINE(DEBUG_RELS)
1522     else
1523     AC_MSG_RESULT([no])
1524     fi
1525    
1526     #-----------------------------------------------
1527     # TIME the compiler?
1528    
1529     AC_MSG_CHECKING([whether to time the compiler])
1530    
1531     AC_ARG_ENABLE(compiler-timing, AC_HELP_STRING([--enable-compiler-timing],
1532     [Enable timing of the compiler (default is NO)])
1533     ,
1534     if test $enableval; then
1535     timecompiler=1
1536     else
1537     timecompiler=0
1538     fi
1539     ,
1540     timecompiler=0
1541     )
1542    
1543     if test "X$timecompiler" = "X1"; then
1544     AC_MSG_RESULT([YES])
1545     AC_DEFINE(TIMECOMPILER)
1546     else
1547     AC_MSG_RESULT([no])
1548     fi
1549    
1550     ASC_DISTDIR_REL_BIN=".."
1551 ben.allan 624 # Next we determine whether models and TK get installed in
1552     # prefix or datadir. If datadir not explicitly given, we
1553     # use prefix.
1554     if test "x$datadir" = 'x${prefix}/share'; then
1555     INSTALL_ASCDATA="$prefix"
1556 johnpye 628 else
1557 ben.allan 624 INSTALL_ASCDATA="$datadir"
1558 johnpye 628 fi
1559 ben.allan 624 DEFAULT_ASCENDLIBRARY="$INSTALL_ASCDATA/models"
1560 johnpye 628 ASCEND_DEFAULTLIBRARY="$INSTALL_ASCDATA/models"
1561     ASC_ENV_TK_DEFAULT="\$ASCENDDIST/TK"
1562    
1563 johnpye 371
1564 ben.allan 624 #--------------------------------------------------------------------
1565 aw0a 12 # The variables we substitute into the Makefile.in files
1566     # and the command to actually generate the Makefiles
1567     #--------------------------------------------------------------------
1568     AC_SUBST(DEFAULT_ASCENDLIBRARY)
1569 ben.allan 545 AC_SUBST(ASCEND_DEFAULTLIBRARY)
1570     AC_SUBST(ascpwd)
1571 aw0a 12 AC_SUBST(fullpathsrcdir)
1572     AC_SUBST(asc_include)
1573     AC_SUBST(CC)
1574     AC_SUBST(DEFS)
1575 johnpye 368 AC_SUBST(CFLAGS)
1576 aw0a 12 AC_SUBST(LEX)
1577     AC_SUBST(LEXLIB)
1578     AC_SUBST(scanner_src)
1579     AC_SUBST(typer_src)
1580     AC_SUBST(MATH_LIBS)
1581     AC_SUBST(DEBUG_LIBS)
1582     AC_SUBST(X11_INCLUDES)
1583     AC_SUBST(X11_LIBRARIES)
1584     AC_SUBST(X11_RUN_PATH)
1585     AC_SUBST(X11_EXTRA_LIBS)
1586     AC_SUBST(DL_LIBS)
1587     AC_SUBST(LD_FLAGS)
1588     AC_SUBST(LD_SEARCH_FLAGS)
1589     AC_SUBST(SHLIB_CFLAGS)
1590     AC_SUBST(SHLIB_LD)
1591     AC_SUBST(SHLIB_LD_LIBS)
1592     AC_SUBST(SHLIB_SUFFIX)
1593     AC_SUBST(ASC_LIB_SUFFIX)
1594     AC_SUBST(TK_LIB)
1595     AC_SUBST(TK_HDR)
1596     AC_SUBST(TKTABLE_LIB)
1597     AC_SUBST(ASC_TK_LIBRARY)
1598     AC_SUBST(ASC_TCL_LIBRARY)
1599     AC_SUBST(ASC_DISTDIR_REL_BIN)
1600 ben.allan 624 AC_SUBST(INSTALL_ASCDATA)
1601 johnpye 628 AC_SUBST(ASC_ENV_TK_DEFAULT)
1602 ben.allan 624 AC_SUBST(TK_LD_HACK)
1603     AC_SUBST(HAVE_TKTABLE)
1604 aw0a 12 AC_SUBST(asc_subdirs)
1605     AC_SUBST(F77)
1606     AC_SUBST(F77LIBS)
1607     AC_SUBST(BLASLIB)
1608     AC_SUBST(make_blaslib)
1609     AC_SUBST(LPAKLIB)
1610     AC_SUBST(make_lpaklib)
1611     AC_SUBST(LSODLIB)
1612     AC_SUBST(make_lsodlib)
1613     AC_SUBST(HAVE_LSOD)
1614     #AWW20041113: AC_SUBST(OPTSQPLIB)
1615 aw0a 15 #AWW20041113: AC_SUBST(make_rsqplib)
1616     #AWW20041113: AC_SUBST(HAVE_OPTSQP)
1617     #AWW20041113: dnl AC_SUBST(HARWELLLIB)
1618     #AWW20041113: dnl AC_SUBST(make_harwelllib)
1619     #AWW20041113: dnl AC_SUBST(HAVE_HARWELL)
1620     #AWW20041113: AC_SUBST(MINOSLIB)
1621     #AWW20041113: AC_SUBST(make_minoslib)
1622     #AWW20041113: AC_SUBST(HAVE_MINOS)
1623     #AWW20041113: AC_SUBST(CONOPTLIB)
1624     #AWW20041113: AC_SUBST(make_conoptlib)
1625     #AWW20041113: AC_SUBST(HAVE_CONOPT)
1626     AC_SUBST(tkdir_root)
1627 aw0a 12 AC_SUBST(tkdir_topbuilddir)
1628     AC_SUBST(models_dir_root)
1629     AC_SUBST(models_topbuilddir)
1630     AC_SUBST(help_dir_root)
1631     AC_SUBST(help_topbuilddir)
1632    
1633     AC_OUTPUT(
1634 aw0a 32 ConfigAscend:../../base/generic/ConfigAscend.in
1635     Makefile:../../base/generic/Makefile.in
1636     bin/ascend4.sh:../../base/generic/bin/ascend4.sh.in
1637     Makefile.Rules:../../base/generic/Makefile.Rules.in
1638     archive/Makefile:../../base/generic/archive/Makefile.in
1639     bin/Makefile:../../base/generic/bin/Makefile.in
1640     compiler/Makefile:../../base/generic/compiler/Makefile.in
1641     general/Makefile:../../base/generic/general/Makefile.in
1642     interface/Makefile:../../tcltk/generic/interface/Makefile.in
1643 johnpye 569 lib/Makefile:../../base/generic/lib/Makefile.in
1644 aw0a 32 packages/Makefile:../../base/generic/packages/Makefile.in
1645     solver/Makefile:../../base/generic/solver/Makefile.in
1646     utilities/Makefile:../../base/generic/utilities/Makefile.in
1647     utilities/config.h:../../base/generic/utilities/config.h.in
1648 ben.allan 545 ../../jam/Jamrules
1649 jds 129 ../../tcltk/generic/Jamrules_tcltk
1650 johnpye 569 $tkdir_makefiles
1651 aw0a 32 $models_makefiles
1652     $help_makefiles
1653     $blaslib_makefile
1654     $lpaklib_makefile
1655     $lsodlib_makefile
1656     )
1657    

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