Annotation of Amaya/configure.in, revision 1.40
1.1 cvs 1: dnl
2: dnl Process this file with autoconf to produce a configure script.
3: dnl Autoconf script for Amaya and Thot.
1.10 cvs 4: dnl Daniel Veillard and Irene Vatton, 1997
1.1 cvs 5: dnl
6:
7: dnl ***************************************************************
8: dnl
9: dnl GENERIC AUTOCONF STUFF : GUESS INFORMATIONS ON SYSTEM SETUP
10: dnl
11: dnl ***************************************************************
12:
13: AC_PREREQ(2.2)
14: AC_INIT(thotlib/internals/h/constpiv.h)
15: AC_REVISION
16:
17: dnl
18: dnl Checks for platform information
19: dnl
20:
21: AC_CANONICAL_SYSTEM
22: AC_CONFIG_HEADER(config.h)
23:
24: dnl
25: dnl Initializing Automake
26: dnl
27:
28: AC_PROG_MAKE_SET
29: AC_ARG_PROGRAM
30:
31: dnl
32: dnl Checks for programs.
33: dnl
34:
35: AC_PROG_YACC
36: AC_PROG_CC
37: AC_PROG_CPP
38: AC_PROG_LEX
39: AC_PROG_AWK
40: AC_PROG_INSTALL
41: AC_PROG_LN_S
42: AC_PROG_MAKE_SET
43: AC_PROG_RANLIB
44: AC_PATH_PROG(CP, cp, /bin/cp, $PATH:/bin:/usr/bin:/usr/ucb/bin)
45: AC_PATH_PROG(MV, mv, /bin/mv, $PATH:/bin:/usr/bin:/usr/ucb/bin)
46: AC_PATH_PROG(RM, rm, /bin/rm, $PATH:/bin:/usr/bin:/usr/ucb/bin)
47: AC_PATH_PROG(MKDIR, mkdir, /bin/mkdir, $PATH:/bin:/usr/bin:/usr/ucb/bin)
48: AC_PATH_PROG(ECHO, echo, /bin/echo, $PATH:/bin:/usr/bin:/usr/ucb/bin)
49: AC_PATH_PROG(CAT, cat, /bin/cat, $PATH:/bin:/usr/bin:/usr/ucb/bin)
50: AC_PATH_PROG(CHMOD, chmod, /bin/chmod, $PATH:/bin:/usr/bin:/usr/ucb/bin)
51: AC_PATH_PROG(SED, sed, /bin/sed, $PATH:/bin:/usr/bin:/usr/ucb/bin)
52: AC_PATH_PROG(AR, ar, /usr/bin/ar, $PATH:/bin:/usr/bin:/usr/ucb/bin)
1.6 cvs 53: AC_PATH_PROG(DIFF, diff, /usr/bin/diff, $PATH:/bin:/usr/bin:/usr/ucb/bin)
1.1 cvs 54:
55: dnl
56: dnl Checks for libraries.
57: dnl
58:
59: AC_CHECK_LIB(socket, socket, )
60: AC_CHECK_LIB(inet, connect)
61: AC_CHECK_LIB(nsl, t_accept)
62: AC_CHECK_LIB(dl, dlopen)
63: AC_PATH_X
64: AC_PATH_XTRA
65:
1.38 cvs 66: X_PRE_LIBS="-lXp ${X_PRE_LIBS}"
67:
1.1 cvs 68: dnl
1.5 cvs 69: dnl Checks for header files.
70: dnl
71:
72: AC_HEADER_DIRENT
73: AC_HEADER_STDC
74: AC_HEADER_SYS_WAIT
75:
76: AC_CHECK_HEADERS(stdio.h)
77: AC_CHECK_HEADERS(sys/types.h types.h)
78: AC_CHECK_HEADERS(sys/unistd.h unistd.h)
79: AC_CHECK_HEADERS(sys/fcntl.h fcntl.h)
80: AC_CHECK_HEADERS(sys/limits.h limits.h)
81: AC_CHECK_HEADERS(sys/stat.h stat.h)
82: AC_CHECK_HEADERS(sys/file.h)
83: AC_CHECK_HEADERS(sys/ioctl.h)
84: AC_CHECK_HEADERS(sys/time.h time.h)
85: AC_CHECK_HEADERS(sys/systeminfo.h)
86: AC_CHECK_HEADERS(string.h strings.h)
1.34 cvs 87: AC_CHECK_HEADERS(sys/syslog.h syslog.h)
1.5 cvs 88: AC_CHECK_HEADERS(sys/socket.h socket.h)
89: AC_CHECK_HEADERS(appkit/appkit.h appkit.h)
90: AC_CHECK_HEADERS(netinet/in.h in.h)
91: AC_CHECK_HEADERS(dn.h)
92: AC_CHECK_HEADERS(sys/ipc.h)
93: AC_CHECK_HEADERS(net/errno.h sys/errno.h errno.h)
94: AC_CHECK_HEADERS(pwd.h)
95: AC_CHECK_HEADERS(grp.h)
96: AC_CHECK_HEADERS(arpa/inet.h inet.h)
97: AC_CHECK_HEADERS(netdb.h)
98: AC_CHECK_HEADERS(manifest.h)
99: AC_CHECK_HEADERS(bsdtypes.h)
100: AC_CHECK_HEADERS(stdefs.h)
101: AC_CHECK_HEADERS(bsdtime.h)
102: AC_CHECK_HEADERS(sys/select.h select.h)
103: AC_CHECK_HEADERS(dnetdb.h)
104: AC_CHECK_HEADERS(libc.h)
105: AC_CHECK_HEADERS(stdlib.h)
106: AC_CHECK_HEADERS(malloc.h)
107: AC_CHECK_HEADERS(memory.h)
108: AC_CHECK_HEADERS(unixlib.h)
109: AC_CHECK_HEADERS(ctype.h)
110: AC_CHECK_HEADERS(cursesX.h curses.h)
111: AC_CHECK_HEADERS(sys/resource.h resource.h)
112: AC_HEADER_DIRENT
113: AC_CHECK_HEADERS(dir.h direct.h) dnl AC_HEADER_DIRENT only checks for some..
114: AC_HEADER_STDC
115: AC_HEADER_SYS_WAIT
116: AC_HEADER_TIME
117: AC_HEADER_STAT
118:
119: dnl
120: dnl Checks for typedefs, structures, and compiler characteristics.
121: dnl
122:
123: AC_C_CONST
124: AC_C_INLINE
125: AC_TYPE_MODE_T
126: AC_TYPE_OFF_T
127: AC_TYPE_SIZE_T
128: AC_HEADER_TIME
129: AC_STRUCT_TM
130: AC_STRUCT_TIMEZONE
131: AC_TYPE_UID_T
132:
133: dnl
134: dnl Checks for library functions.
135: dnl
136:
137: AC_FUNC_ALLOCA
138: AC_TYPE_GETGROUPS
139: AC_PROG_GCC_TRADITIONAL
140: AC_FUNC_MEMCMP
141: AC_FUNC_MMAP
142: AC_TYPE_SIGNAL
143: AC_FUNC_VPRINTF
1.25 cvs 144: AC_CHECK_FUNCS(getcwd gethostname gettimeofday getwd mkdir mktime putenv select socket strdup strerror strftime strstr strtod strtol uname lstat strcasecmp strncasecmp strchr)
1.5 cvs 145:
146: dnl
1.4 cvs 147: dnl Checking for Motif libraries and includes
148: dnl
149: dnl Borrowed from Lesstif configure.in
150: dnl Lesstif is a Great Project (TM)
151: dnl
152:
153: AC_DEFUN(AC_PATH_MOTIF_DIRECT,
154: [test -z "$motif_direct_test_library" && motif_direct_test_library=Xm
155: test -z "$motif_direct_test_function" && motif_direct_test_function=XmCreatePushButton
156: test -z "$motif_direct_test_include" && motif_direct_test_include=Xm/Xm.h
157: for ac_dir in \
158: /usr/include/Motif1.2 \
159: /usr/Motif1.2/include \
160: \
161: /usr/motif/include \
162: \
163: /usr/X11R6/include \
164: /usr/X11R5/include \
165: \
166: /usr/include/X11R6 \
167: /usr/include/X11R5 \
168: \
169: /usr/local/X11R6/include \
170: /usr/local/X11R5/include \
171: \
172: /usr/local/include/X11R6 \
173: /usr/local/include/X11R5 \
174: \
175: /usr/X11/include \
176: /usr/include/X11 \
177: /usr/local/X11/include \
178: /usr/local/include/X11 \
179: \
180: /usr/X386/include \
181: /usr/x386/include \
182: /usr/XFree86/include/X11 \
183: \
184: /usr/dt/include \
185: \
186: /usr/include \
187: /usr/local/include \
188: /usr/unsupported/include \
189: /usr/athena/include \
190: /usr/local/x11r5/include \
191: /usr/lpp/Xamples/include \
1.14 cvs 192: \
193: /usr/lesstif/include \
194: /usr/local/lesstif/include\
195: /usr/gnu/lesstif/include \
196: $HOME/lesstif/include \
1.4 cvs 197: ; \
198: do
199: if test -r "$ac_dir/$motif_direct_test_include"; then
200: no_motif= ac_motif_includes=$ac_dir
201: break
202: fi
203: done
204:
205: # Check for the libraries.
206: # See if we find them without any special options.
207: # Don't add to $LIBS permanently.
208: ac_save_LIBS="$LIBS"
209: LIBS="-l$motif_direct_test_library $LIBS"
210: # First see if replacing the include by lib works.
211: for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \
212: /usr/lib/Motif1.2 \
213: /usr/Motif1.2/lib \
214: \
215: /usr/motif/lib \
216: \
217: /usr/X11R6/lib \
218: /usr/X11R5/lib \
219: \
220: /usr/lib/X11R6 \
221: /usr/lib/X11R5 \
222: \
223: /usr/local/X11R6/lib \
224: /usr/local/X11R5/lib \
225: \
226: /usr/local/lib/X11R6 \
227: /usr/local/lib/X11R5 \
228: \
229: /usr/X11/lib \
230: /usr/lib/X11 \
231: /usr/local/X11/lib \
232: \
233: /usr/X386/lib \
234: /usr/x386/lib \
235: /usr/XFree86/lib/X11 \
236: \
237: /usr/lib \
238: /usr/local/lib \
239: /usr/unsupported/lib \
240: /usr/athena/lib \
241: /usr/local/x11r5/lib \
242: /usr/lpp/Xamples/lib \
1.14 cvs 243: \
244: /usr/lesstif/lib \
245: /usr/local/lesstif/lib\
246: /usr/gnu/lesstif/lib \
247: $HOME/lesstif/lib \
1.4 cvs 248: ; \
249: do
250: for ac_extension in a so sl; do
251: if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then
252: no_motif= ac_motif_libraries=$ac_dir
253: break 2
254: fi
255: done
1.5 cvs 256: done
257: LIBS="$ac_save_LIBS"
258: ])
1.4 cvs 259:
260: AC_DEFUN(AC_PATH_MOTIF,
261: [AC_REQUIRE_CPP()dnl
262:
263: motif_includes=NONE
264: motif_libraries=NONE
265:
266: AC_MSG_CHECKING(for Motif)
267: AC_ARG_WITH(motif, [ --with-motif enable Motif tests])
1.39 cvs 268:
1.40 ! cvs 269: if test "${CC}" = "gcc"; then
! 270: CPP="${CPP} -x c"
1.39 cvs 271: fi
1.4 cvs 272: if test "x$with_motif" = xno; then
273: no_motif=yes
274: else
275: if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then
276: no_motif=
277: else
278: AC_CACHE_VAL(ac_cv_path_motif,
279: [# One or both of these vars are not set, and there is no cached value.
280: no_motif=yes
281: AC_PATH_MOTIF_DIRECT
282:
283: if test "$no_motif" = yes; then
284: ac_cv_path_motif="no_motif=yes"
285: else
286: ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries"
287: fi])dnl
288: fi
289: eval "$ac_cv_path_motif"
290: fi # with_motif != no
291:
292: if test "$no_motif" = yes; then
293: AC_MSG_RESULT(no)
1.5 cvs 294: MOTIF_INCLUDES=
295: MOTIF_LIBRARIES=
1.4 cvs 296: else
297: test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes
298: test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries
299: ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries"
300: AC_MSG_RESULT([libraries $motif_libraries, headers $motif_includes])
1.5 cvs 301: if test "$motif_includes" != "/usr/include" ; then
302: MOTIF_INCLUDES="-I$motif_includes"
303: fi
304: if test "$motif_libraries" != "/usr/lib" ; then
305: MOTIF_LIBRARIES="-L$motif_libraries"
1.19 cvs 306: case "${host}" in
307: *-*sun-solaris* )
308: MOTIF_LIBRARIES="${MOTIF_LIBRARIES} -R$motif_libraries"
309: ;;
310: esac
1.5 cvs 311: fi
1.4 cvs 312: fi
1.5 cvs 313: AC_SUBST(MOTIF_INCLUDES)
314: AC_SUBST(MOTIF_LIBRARIES)
1.4 cvs 315: ])
316:
317: AC_PATH_MOTIF
318:
1.1 cvs 319: dnl ***************************************************************
320: dnl
321: dnl SPECIFIC STUFF : CONFIGURATION OPTIONS FOR THOT AND AMAYA
322: dnl
323: dnl ***************************************************************
324:
1.26 cvs 325: THOT_VER="2.2"
326: AMAYA_VER="1.3"
1.36 cvs 327: KAFFE_VER="cvs"
1.1 cvs 328:
329: dnl
1.6 cvs 330: dnl We use a special versoin of cextract patched for alignment
331: dnl to build the signatures of the modules functions located in f subdirs
332: dnl
333: CEXTRACT_VER="1.7"
334: CEXTRACT_FLAGS="+O"
335:
336: dnl
1.3 cvs 337: dnl Check when building with Insure from Parasoft
338: dnl
339:
1.5 cvs 340: AC_ARG_WITH(insure, [ --with-insure Uses Insure Parasoft debugger])
341: if test "$with_insure" = "yes" ; then
342: CC=insight
1.3 cvs 343: fi
344:
345: dnl
1.9 cvs 346: dnl Adjust the some variables depending on the host and compiler
347: dnl Thot NEED signed chars !!!
1.7 cvs 348: dnl
349:
1.9 cvs 350: KAFFE_ENGINE=""
1.7 cvs 351: if test "${CC}" = "gcc" ; then
352: CFLAGS="${CFLAGS} -Wall "
353: case "${host}" in
354: *-*-irix5* | *-*irix6* )
355: CFLAGS="${CFLAGS} -fsigned-char"
356: ;;
357: esac
1.14 cvs 358: fi
359:
360: if test "$ac_cv_c_const" = "no" ; then
361: CFLAGS="${CFLAGS} -DCONST= "
1.7 cvs 362: fi
363:
364: dnl
1.1 cvs 365: dnl Check for availability of amaya and thot editor sources
366: dnl
367:
1.5 cvs 368: AC_ARG_WITH(thot, [ --with-thot Build the Thot editor])
369: AC_ARG_WITH(amaya, [ --with-amaya Build the Amaya HTML browser/editor])
1.1 cvs 370:
371: build_thot="yes"
372: build_amaya="yes"
373:
374: if test "$with_thot" = "no" ; then
375: build_thot="no"
376: fi
377: if test "$with_amaya" = "no" ; then
378: build_amaya="no"
379: fi
380:
381: if test ! -f $srcdir/thot/Makefile.in ; then
382: AC_MSG_WARN(Thot editor sources not found, disabling Thot build !)
383: build_thot="no"
384: fi
385:
386: if test ! -f $srcdir/amaya/Makefile.in ; then
387: AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
388: build_amaya="no"
389: fi
390:
391: dnl
1.3 cvs 392: dnl Check for external, Thot related programs
393: dnl
394:
395: build_misc="no"
396: if test "$build_thot" = "yes" ; then
397: if test -f $srcdir/misc/Makefile.in ; then
398: build_misc="yes"
399: build_annotations="no"
400: if test -f $srcdir/misc/annotations/Makefile.in ; then
401: build_annotations="yes"
402: fi
403: if test -f $srcdir/misc/util/Makefile.in ; then
404: build_util="yes"
405: build_tableaux="no"
406: build_transform="no"
407: build_versions="no"
408: if test -f $srcdir/misc/util/tableaux/Makefile.in ; then
409: build_tableaux="yes"
410: fi
411: if test -f $srcdir/misc/util/transform/Makefile.in ; then
412: build_transform="yes"
413: fi
414: if test -f $srcdir/misc/util/versions/Makefile.in ; then
415: build_versions="yes"
416: fi
417: fi
418: fi
419: fi
420:
421: dnl
1.1 cvs 422: dnl Check for additionnal packages kaffe-xxx or libwww
423: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
424: dnl
425:
1.26 cvs 426: AC_ARG_ENABLE(java, [ --enable-java Add Kaffe Java virtual machine])
1.22 cvs 427: AC_ARG_ENABLE(javaawt, [ --enable-java-awt Add Kaffe Java Biss AWT])
1.26 cvs 428: AC_ARG_ENABLE(intr, [ --enable-intr Use Kaffe Java Interpreter])
429: AC_ARG_ENABLE(jit, [ --enable-jit Use Kaffe Java JIT Compiler])
430: AC_ARG_ENABLE(plugin, [ --enable-plugin Add Netscape Plug-Ins support])
431: AC_ARG_ENABLE(math, [ --enable-math Add Math support ])
432: AC_ARG_ENABLE(graph, [ --enable-graph Add Graphics support ])
433: AC_ARG_ENABLE(ilu, [ --enable-ilu Add ILU support])
1.1 cvs 434:
1.8 cvs 435: dnl
1.10 cvs 436: dnl Check for the Kaffe engine to use : interpreter or JIT
1.9 cvs 437: dnl
1.13 cvs 438:
439: with_java=""
1.9 cvs 440: if test "$enable_intr" = "yes" ; then
441: with_java="yes"
442: KAFFE_ENGINE="--with-engine=intrp"
443: fi
444: if test "$enable_intr" = "no" ; then
445: with_java="yes"
446: KAFFE_ENGINE="--with-engine=jit"
447: fi
448: if test "$enable_jit" = "yes" ; then
449: with_java="yes"
450: KAFFE_ENGINE="--with-engine=jit"
451: fi
452: if test "$enable_jit" = "no" ; then
453: with_java="yes"
454: KAFFE_ENGINE="--with-engine=intr"
455: fi
456:
457:
458: dnl
1.17 cvs 459: dnl java is disabled by default
1.8 cvs 460: dnl
1.13 cvs 461:
1.19 cvs 462: if test "$enable_java" = "yes" ; then
463: with_java="yes"
1.1 cvs 464: fi
1.8 cvs 465:
466: dnl
1.22 cvs 467: dnl if java, java-awt is enabled by default
468: dnl
469:
470: if test "$enable_javaawt" = "no" ; then
471: java_awt_option="-DJAVA_NO_AWT"
472: else
473: java_awt_option=""
474: fi
475:
476: dnl
1.21 cvs 477: dnl plugins support is disabled by default
1.8 cvs 478: dnl
1.13 cvs 479:
480: if test "$with_plugin" = "" ; then
1.21 cvs 481: if test "$enable_plugin" = "yes" ; then
482: with_plugin="yes"
483: else
1.17 cvs 484: with_plugin="no"
485: fi
1.10 cvs 486: fi
1.1 cvs 487:
1.8 cvs 488: dnl
1.10 cvs 489: dnl math is enabled by default
1.8 cvs 490: dnl
1.13 cvs 491: if test "$with_math" = "" ; then
492: if test "$enable_math" = "no" ; then
493: with_math="no"
494: else
495: with_math="yes"
496: fi
1.8 cvs 497: fi
498:
1.16 cvs 499: dnl
1.26 cvs 500: dnl graph is disabled by default
501: dnl
502: if test "$with_graph" = "" ; then
503: if test "$enable_graph" = "yes" ; then
504: with_graph="yes"
505: else
506: with_graph="no"
507: fi
508: fi
509:
510: dnl
1.16 cvs 511: dnl ilu is disabled by default
512: dnl
513: if test "$with_ilu" = "" ; then
514: if test "$enable_ilu" = "yes" ; then
515: with_ilu="yes"
516: else
517: with_ilu="no"
518: fi
519: fi
520:
1.22 cvs 521: dnl
522: dnl Checking for ilu
523: dnl
524:
525: ILUHOME=""
526: if test "$with_ilu" = "yes" ; then
527: dnl
528: dnl try to get first the path for the c-stubber
529: dnl
530: AC_PATH_PROG(CSTUBBER, c-stubber, c-stubber, $PATH:$ILUHOME/bin:/bin:/usr/bin:/usr/ucb/bin:/usr/ilu/bin:/usr/local/bin:/usr/local/ilu/bin:/opt/ilu/bin:$HOME/ilu/bin)
531: case "$CSTUBBER" in
532: /*/bin/c-stubber)
533: ILU_BINARIES=`dirname $CSTUBBER`
534: ILUHOME=`dirname $ILU_BINARIES`
535: ILU_LIBRARIES=$ILUHOME/lib
536: ILU_INCLUDES=$ILUHOME/include
537: ;;
538: /*/c-stubber)
539: ILU_BINARIES=`dirname $CSTUBBER`
540: ILUHOME=`dirname $ILU_BINARIES`
541: ILU_LIBRARIES=$ILUHOME/lib
542: ILU_INCLUDES=$ILUHOME/include
543: ;;
544: esac
545: if test "$CSTUBBER" = "" -o "$CSTUBBER" = "c-stubber" ; then
546: AC_MSG_WARN(ILU c-stubber binary not found, ILU disabled !)
547: with_ilu="no"
548: fi
549: fi
550:
1.19 cvs 551: if test "$build_amaya" = "yes" ; then
552:
1.36 cvs 553: if test ! -f $srcdir/kaffe-$KAFFE_VER/Makefile.in \
554: -a ! -f $srcdir/kaffe-$KAFFE_VER.tar.gz ; then
1.1 cvs 555: if test "$with_java" = "yes" ; then
556: AC_MSG_WARN(kaffe-$KAFFE_VER sources not found, disabling Java !)
557: with_java="no"
558: fi
559: fi
560:
1.15 cvs 561: if test "$with_java" = "yes" ; then
562: #
563: # Verify that Java code is available.
564: # Look first for thotlib, amaya and jigsaw classes source code
565: #
1.37 cvs 566: if test -f $srcdir/classes/org/w3c/www/protocol/http/HttpURLConnection.java \
1.15 cvs 567: ; then
568: with_java_sources="yes"
569: else
570: with_java_sources="no"
571: fi
1.37 cvs 572: #
573: # Then check for a sources ZIP for the classes.
574: #
575: if test -f $srcdir/classes/sources.zip \
576: ; then
577: with_java_sources="yes"
578: else
579: with_java_sources="no"
580: fi
581:
1.15 cvs 582: #
583: # Then check for precompiled classes packages.
584: #
1.36 cvs 585: if test -f $srcdir/classes/jigsaw.zip \
1.15 cvs 586: ; then
587: with_java_package="yes"
588: else
589: with_java_package="no"
590: fi
591:
592: #
593: # At least one of both should be available.
594: #
595: if test "$with_java_sources" = "no" -a "$with_java_package" = "no"
596: then
597: AC_MSG_WARN(Amaya Java classes not found : disabling Java!)
598: with_java="no"
1.35 cvs 599: else
600: #
601: # kaffe may require libgmp ...
602: #
603: AC_CHECK_LIB(gmp,mpz_abs)
1.1 cvs 604: fi
605: fi
606:
1.33 cvs 607: if test ! -f $srcdir/libwww/Makefile.in ; then
1.16 cvs 608: if test "$with_java" = "no" -a "$with_ilu" = "no" ; then
1.33 cvs 609: AC_MSG_WARN(libwww sources not found !!)
1.1 cvs 610: AC_MSG_WARN(Disabling Amaya build !)
611: build_amaya="no"
612: fi
613: fi
1.8 cvs 614:
615: if test ! -f $srcdir/amaya/MathML.S ; then
1.10 cvs 616: if test "$with_math" = "yes" ; then
1.8 cvs 617: AC_MSG_WARN(MathML sources not found !!)
1.26 cvs 618: AC_MSG_WARN(Disabling Math build !)
1.10 cvs 619: with_math="no"
620: MATH_OPTIONS=
1.8 cvs 621: fi
622: fi
1.26 cvs 623:
624: if test ! -f $srcdir/amaya/GraphML.S ; then
625: if test "$with_graph" = "yes" ; then
626: AC_MSG_WARN(GraphML sources not found !!)
627: AC_MSG_WARN(Disabling Graphics build !)
628: with_graph="no"
629: GRAPH_OPTIONS=
630: fi
631: fi
632:
1.16 cvs 633: if test "$with_java" = "yes" -a "$with_ilu" = "yes" ; then
634: java_ilu_option="-DWITH_ILU"
635: ilu_java_option="-DWITH_JAVA"
636: fi
1.1 cvs 637: fi
638:
639: dnl
640: dnl The options for each library or binary
641: dnl
642:
643: THOT_OPTIONS=
1.30 cvs 644: AMAYA_OPTIONS=$MATH_OPTIONS $GRAPH_OPTIONS
1.1 cvs 645: PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
646: dnl JAVA_OPTIONS="-DDEBUG_KAFFE -DDEBUG_LOCK -DDEBUG_SELECT -DDEBUG_SELECT_CHANNELS -DDEBUG_TIMING -DSYNC_DNS"
1.22 cvs 647: JAVA_OPTIONS="$java_ilu_option $java_awt_option"
1.1 cvs 648: ANNOTATIONS_OPTIONS=
649: IMGLIBS="-ljpeg -lpng -lz"
1.3 cvs 650: EXTRA_LIBS=
1.1 cvs 651:
1.16 cvs 652: ILU_OPTIONS="$ilu_java_option"
653: ILU_INCLUDES=
654: ILU_LIBRARIES=
655:
1.1 cvs 656: dnl
657: dnl Set up the PATHs needed
658: dnl
659:
660: API="\$(THOTDIR)/thotlib/include"
661: VAR="\$(THOTDIR)/thotlib/internals/var"
662: INCL="\$(THOTDIR)/thotlib/internals/h"
663: FUNC="\$(THOTDIR)/thotlib/internals/f"
664: SCHEMAS="\$(THOTDIR)/schemas"
665: SCHEMASOPERA="\$(THOTDIR)/schemasOPERA"
666: JPEGINCL="-I\$(THOTDIR)/libjpeg"
667: PNGINCL="-I\$(THOTDIR)/libpng -I\$(THOTDIR)/libpng/zlib"
668:
669: dnl
670: dnl Set up the include variables.
671: dnl
672:
673: THOTINCLUDES="-I$API -I$VAR -I$INCL -I$FUNC -I$SCHEMAS -I$SCHEMASOPERA $JPEGINCL $PNGINCL"
674: APIINCLUDES=-I$API
675: if test "$VPATHOPT" = "" ; then
676: VPATHOPT="VPATH"
677: fi
678:
679: dnl
680: dnl Exports the current values of the variables.
681: dnl
682:
683: AC_SUBST(THOT_VER)
684: AC_SUBST(AMAYA_VER)
685: AC_SUBST(KAFFE_VER)
1.6 cvs 686: AC_SUBST(CEXTRACT_VER)
687: AC_SUBST(CEXTRACT_FLAGS)
1.1 cvs 688:
1.9 cvs 689: AC_SUBST(KAFFE_ENGINE)
690:
1.1 cvs 691: AC_SUBST(THOTINCLUDES)
692: AC_SUBST(APIINCLUDES)
693: AC_SUBST(VPATHOPT)
694:
695: AC_SUBST(THOT_OPTIONS)
696: AC_SUBST(AMAYA_OPTIONS)
697: AC_SUBST(PLUGIN_OPTIONS)
698: AC_SUBST(JAVA_OPTIONS)
699: AC_SUBST(ANNOTATIONS_OPTIONS)
700: AC_SUBST(IMGLIBS)
1.3 cvs 701: AC_SUBST(EXTRA_LIBS)
1.1 cvs 702:
1.22 cvs 703: AC_SUBST(ILUHOME)
1.16 cvs 704: AC_SUBST(ILU_OPTIONS)
705: AC_SUBST(ILU_INCLUDES)
706: AC_SUBST(ILU_LIBRARIES)
707:
1.1 cvs 708: dnl
709: dnl Include the option Makefile.xxx fragment for plugin and or Java options
710: dnl
711:
712: if test "$with_plugin" = "yes" ; then
713: AC_SUBST_FILE(plugin_frag)dnl
714: plugin_frag=$srcdir/pluginlib/Makefile.plugin
715: else
716: AC_SUBST_FILE(plugin_frag)
717: plugin_frag=/dev/null
718: fi
719:
720: if test "$with_java" = "yes" ; then
1.8 cvs 721: AC_SUBST_FILE(java_frag)
1.1 cvs 722: java_frag=$srcdir/javalib/Makefile.java
723: AC_SUBST_FILE(www_frag)
724: www_frag=/dev/null
1.15 cvs 725: if test "$with_java_sources" = "yes" ; then
726: AC_SUBST_FILE(javasrc_frag)
727: javasrc_frag=$srcdir/javalib/Makefile.javasrc
728: AC_SUBST_FILE(javanosrc_frag)
729: javanosrc_frag=/dev/null
730: else
731: AC_SUBST_FILE(javasrc_frag)
732: javasrc_frag=/dev/null
733: AC_SUBST_FILE(javanosrc_frag)
734: javanosrc_frag=$srcdir/javalib/Makefile.javanosrc
735: fi
1.1 cvs 736: else
737: java_frag=/dev/null
1.29 cvs 738: javasrc_frag=/dev/null
739: javanosrc_frag=/dev/null
740:
741: if test "$with_ilu" = "yes" ; then
742: AC_SUBST_FILE(java_frag)
743: AC_SUBST_FILE(www_frag)
744: www_frag=/dev/null
745: else
746: AC_SUBST_FILE(java_frag)
747: AC_SUBST_FILE(www_frag)dnl
748: www_frag=$srcdir/amaya/Makefile.libwww
749: fi
1.16 cvs 750: fi
1.1 cvs 751:
1.10 cvs 752: if test "$with_math" = "yes" ; then
753: AC_SUBST_FILE(math_frag)
754: math_frag=$srcdir/amaya/Makefile.math
1.8 cvs 755: else
1.10 cvs 756: AC_SUBST_FILE(math_frag)
757: math_frag=/dev/null
1.8 cvs 758: fi
759:
1.26 cvs 760: if test "$with_graph" = "yes" ; then
761: AC_SUBST_FILE(graph_frag)
762: graph_frag=$srcdir/amaya/Makefile.graph
763: else
764: AC_SUBST_FILE(graph_frag)
1.31 cvs 765: graph_frag=/dev/null
1.26 cvs 766: fi
767:
1.16 cvs 768: if test "$with_ilu" = "yes" ; then
769: AC_SUBST_FILE(ilu_frag)
770: ilu_frag=$srcdir/ilulib/Makefile.ilu
771: else
772: AC_SUBST_FILE(ilu_frag)
773: ilu_frag=/dev/null
774: fi
775:
1.1 cvs 776: dnl ***************************************************************
777: dnl
778: dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
779: dnl
780: dnl ***************************************************************
781:
782: EXTRA_MAKEFILE_IN=
1.2 cvs 783: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1 cvs 784: libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2 cvs 785: tools/mkdep/Makefile \
1.1 cvs 786: tools/cextract-1.7/Makefile thotlib/Makefile \
1.5 cvs 787: thotlib/include/Makefile batch/Makefile tablelib/Makefile"
1.1 cvs 788:
789: if test "$build_amaya" = "yes" ; then
1.2 cvs 790:
1.19 cvs 791: make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2 cvs 792: EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.27 cvs 793: $srcdir/amaya/Makefile.libwww"
794:
795: if test "$$with_plugin" = "yes" ; then
796: make_output="$make_output pluginlib/Makefile"
797: EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.2 cvs 798: $srcdir/pluginlib/Makefile.plugin"
1.27 cvs 799: fi
1.2 cvs 800:
1.19 cvs 801: if test "$with_java" = "yes" ; then
802: make_output="$make_output tools/javastub/Makefile \
803: tools/dns_daemon/Makefile javalib/Makefile"
804: EXTRA_MAKEFILE_IN="$srcdir/tools/javastub/Makefile.in \
805: $srcdir/tools/dns_daemon/Makefile.in \
806: $srcdir/javalib/Makefile.in"
807: fi
1.16 cvs 808:
1.19 cvs 809: if test "$with_ilu" = "yes" ; then
810: make_output="$make_output ilulib/Makefile tools/ilustub/Makefile"
811: EXTRA_MAKEFILE_IN="$srcdir/ilulib/Makefile.in \
1.16 cvs 812: $srcdir/ilulib/Makefile.ilu \
813: $srcdir/tools/ilustub/Makefile.in"
1.19 cvs 814: fi
1.1 cvs 815: fi
816:
817: if test "$build_thot" = "yes" ; then
1.3 cvs 818:
1.5 cvs 819: make_output="$make_output thot/Makefile \
820: drawlib/Makefile indexlib/Makefile"
1.3 cvs 821: EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
1.5 cvs 822: $srcdir/thot/Makefile.in \
823: $srcdir/drawlib/Makefile.in \
824: $srcdir/indexlib/Makefile.in"
1.3 cvs 825:
826: if test "$build_misc" = "yes" ; then
827:
828: make_output="$make_output misc/Makefile"
829: EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
830: $srcdir/misc/Makefile.in"
831:
832: if test "$build_annotations" = "yes" ; then
833: make_output="$make_output misc/annotations/Makefile"
834: EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
835: $srcdir/misc/annotations/Makefile.in"
1.19 cvs 836: fi
1.3 cvs 837:
838: if test "$build_util" = "yes" ; then
839:
840: make_output="$make_output misc/util/Makefile"
841: EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
842: $srcdir/misc/util/Makefile.in"
843:
844: if test "$build_tableaux" = "yes" ; then
845:
846: make_output="$make_output misc/util/tableaux/Makefile"
847: EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
848: $srcdir/misc/util/tableaux/Makefile.in"
849:
850: fi
851: if test "$build_transform" = "yes" ; then
852:
853: make_output="$make_output misc/util/transform/Makefile"
854: EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
855: $srcdir/misc/util/transform/Makefile.in"
856:
857: fi
858: if test "$build_versions" = "yes" ; then
859:
860: make_output="$make_output misc/util/versions/Makefile"
861: EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
862: $srcdir/misc/util/versions/Makefile.in"
863:
864: fi
865: fi
866: fi
1.1 cvs 867: fi
868:
869: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6 cvs 870: AC_OUTPUT($make_output , [
871: dnl
872: dnl This fragment of shell code is executed after the
873: dnl Makefile(s) dump ...
874: dnl
875:
876: echo timestamp > stamp-h
877:
878: dnl
879: dnl Check for an upgrade in the Options numbers
880: dnl
881:
882: if test -f Options ; then
883: oldversion=`grep Version Options`
884: newversion=`grep Version Options.orig`
885: if test "$oldversion" != "$newversion" ; then
886: echo WARNING : Options files have changed, old options saved to Options.old
887: cp Options Options.old
888: cp Options.orig Options
889: exit 1
890: fi
891: fi
892: ])
1.1 cvs 893:
894: if test "$build_thot" = "yes" ; then
895: if test "$build_amaya" = "yes" ; then
896: echo Amaya and Thot packages are now configured
897: else
898: echo Thot package is now configured
899: fi
900: else
901: if test "$build_amaya" = "yes" ; then
902: echo Amaya package is now configured
903: else
904: echo Nor Amaya nor Thot package found, get the corresponding archive
905: fi
906:
907: fi
908:
909: if test "$build_amaya" = "yes" ; then
1.5 cvs 910: if test "$with_java" = "yes" -a "$with_plugin" = "yes" ; then
911: AC_MSG_WARN(Amaya configured with both Java and Plugins support)
1.16 cvs 912: dnl AC_MSG_WARN(Beware this combination doesn't work well)
1.1 cvs 913: else
1.5 cvs 914: if test "$with_java" = "yes" ; then
1.9 cvs 915: if test "$KAFFE_ENGINE" = "--with-engine=jit" ; then
916: echo Amaya configured with Java JIT support
917: else
918: if test "$KAFFE_ENGINE" = "--with-engine=intr" ; then
919: echo Amaya configured with Java interpreter support
920: else
921: echo Amaya configured with Java support
922: fi
923: fi
1.11 cvs 924: echo Using kaffe-$KAFFE_VER Java virtual machine
1.16 cvs 925: else if test "$with_ilu" = "no" ; then
1.5 cvs 926: echo Amaya configured with libWWW
927: fi
1.16 cvs 928: fi
1.5 cvs 929: if test "$with_plugin" = "yes" ; then
930: echo Amaya configured with Plugins support
931: fi
1.8 cvs 932: fi
1.10 cvs 933: if test "$with_math" = "yes" ; then
934: echo Amaya configured with Math support
1.26 cvs 935: fi
936: if test "$with_graph" = "yes" ; then
937: echo Amaya configured with Graph support
1.16 cvs 938: fi
939: if test "$with_ilu" = "yes" ; then
940: echo Amaya configured with ILU support
1.1 cvs 941: fi
1.5 cvs 942: fi
943:
944: if test "$no_motif" = yes ; then
945: echo "Motif seems not installed on this machine"
946: echo "Thot and Amaya need Motif 1.2 or 2.0"
947: echo "Thot and Amaya probably won't compile"
948: else
949: if test "$motif_includes" = "" ; then
950: echo "Motif includes were not found"
951: echo "Thot and Amaya might not compile"
952: echo "Edit your Option file"
953: else
954: if test "$motif_libraries" = "" ; then
955: echo "Motif libraries were not found"
956: echo "Thot and Amaya might not compile"
957: echo "Edit your Option file"
958: fi
959: fi
1.1 cvs 960: fi
961:
962: echo "Now start \"make all\" (GNU make preferably) to build the binaries"
1.5 cvs 963:
Webmaster