Annotation of Amaya/configure.in, revision 1.11

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: 
                     66: dnl
1.5       cvs        67: dnl Checks for header files.
                     68: dnl
                     69: 
                     70: AC_HEADER_DIRENT
                     71: AC_HEADER_STDC
                     72: AC_HEADER_SYS_WAIT
                     73: 
                     74: AC_CHECK_HEADERS(stdio.h)
                     75: AC_CHECK_HEADERS(sys/types.h types.h)
                     76: AC_CHECK_HEADERS(sys/unistd.h unistd.h)
                     77: AC_CHECK_HEADERS(sys/fcntl.h fcntl.h)
                     78: AC_CHECK_HEADERS(sys/limits.h limits.h)
                     79: AC_CHECK_HEADERS(sys/stat.h stat.h)
                     80: AC_CHECK_HEADERS(sys/file.h)
                     81: AC_CHECK_HEADERS(sys/ioctl.h)
                     82: AC_CHECK_HEADERS(sys/time.h time.h)
                     83: AC_CHECK_HEADERS(sys/systeminfo.h)
                     84: AC_CHECK_HEADERS(string.h strings.h)
                     85: AC_CHECK_HEADERS(syslog.h)
                     86: AC_CHECK_HEADERS(sys/socket.h socket.h)
                     87: AC_CHECK_HEADERS(appkit/appkit.h appkit.h)
                     88: AC_CHECK_HEADERS(netinet/in.h in.h)
                     89: AC_CHECK_HEADERS(dn.h)
                     90: AC_CHECK_HEADERS(sys/ipc.h)
                     91: AC_CHECK_HEADERS(net/errno.h sys/errno.h errno.h)
                     92: AC_CHECK_HEADERS(pwd.h)
                     93: AC_CHECK_HEADERS(grp.h)
                     94: AC_CHECK_HEADERS(arpa/inet.h inet.h)
                     95: AC_CHECK_HEADERS(netdb.h)
                     96: AC_CHECK_HEADERS(manifest.h)
                     97: AC_CHECK_HEADERS(bsdtypes.h)
                     98: AC_CHECK_HEADERS(stdefs.h)
                     99: AC_CHECK_HEADERS(bsdtime.h)
                    100: AC_CHECK_HEADERS(sys/select.h select.h)
                    101: AC_CHECK_HEADERS(dnetdb.h)
                    102: AC_CHECK_HEADERS(libc.h)
                    103: AC_CHECK_HEADERS(stdlib.h)
                    104: AC_CHECK_HEADERS(malloc.h)
                    105: AC_CHECK_HEADERS(memory.h)
                    106: AC_CHECK_HEADERS(unixlib.h)
                    107: AC_CHECK_HEADERS(ctype.h)
                    108: AC_CHECK_HEADERS(cursesX.h curses.h)
                    109: AC_CHECK_HEADERS(sys/resource.h resource.h)
                    110: AC_HEADER_DIRENT
                    111: AC_CHECK_HEADERS(dir.h direct.h) dnl AC_HEADER_DIRENT only checks for some..
                    112: AC_HEADER_STDC
                    113: AC_HEADER_SYS_WAIT
                    114: AC_HEADER_TIME
                    115: AC_HEADER_STAT
                    116: 
                    117: dnl
                    118: dnl Checks for typedefs, structures, and compiler characteristics.
                    119: dnl
                    120: 
                    121: AC_C_CONST
                    122: AC_C_INLINE
                    123: AC_TYPE_MODE_T
                    124: AC_TYPE_OFF_T
                    125: AC_TYPE_SIZE_T
                    126: AC_HEADER_TIME
                    127: AC_STRUCT_TM
                    128: AC_STRUCT_TIMEZONE
                    129: AC_TYPE_UID_T
                    130: 
                    131: dnl
                    132: dnl Checks for library functions.
                    133: dnl
                    134: 
                    135: AC_FUNC_ALLOCA
                    136: AC_TYPE_GETGROUPS
                    137: AC_PROG_GCC_TRADITIONAL
                    138: AC_FUNC_MEMCMP
                    139: AC_FUNC_MMAP
                    140: AC_TYPE_SIGNAL
                    141: AC_FUNC_VPRINTF
                    142: AC_CHECK_FUNCS(getcwd gethostname gettimeofday getwd mkdir mktime putenv select socket strdup strerror strftime strstr strtod strtol uname)
                    143: 
                    144: dnl
1.4       cvs       145: dnl Checking for Motif libraries and includes
                    146: dnl
                    147: dnl Borrowed from Lesstif configure.in
                    148: dnl Lesstif is a Great Project (TM)
                    149: dnl
                    150: 
                    151: AC_DEFUN(AC_PATH_MOTIF_DIRECT,
                    152: [test -z "$motif_direct_test_library" && motif_direct_test_library=Xm
                    153: test -z "$motif_direct_test_function" && motif_direct_test_function=XmCreatePushButton
                    154: test -z "$motif_direct_test_include" && motif_direct_test_include=Xm/Xm.h
                    155:   for ac_dir in               \
                    156:     /usr/include/Motif1.2     \
                    157:     /usr/Motif1.2/include     \
                    158:                               \
                    159:     /usr/motif/include        \
                    160:                               \
                    161:     /usr/X11R6/include        \
                    162:     /usr/X11R5/include        \
                    163:                               \
                    164:     /usr/include/X11R6        \
                    165:     /usr/include/X11R5        \
                    166:                               \
                    167:     /usr/local/X11R6/include  \
                    168:     /usr/local/X11R5/include  \
                    169:                               \
                    170:     /usr/local/include/X11R6  \
                    171:     /usr/local/include/X11R5  \
                    172:                               \
                    173:     /usr/X11/include          \
                    174:     /usr/include/X11          \
                    175:     /usr/local/X11/include    \
                    176:     /usr/local/include/X11    \
                    177:                               \
                    178:     /usr/X386/include         \
                    179:     /usr/x386/include         \
                    180:     /usr/XFree86/include/X11  \
                    181:                               \
                    182:     /usr/dt/include           \
                    183:                               \
                    184:     /usr/include              \
                    185:     /usr/local/include        \
                    186:     /usr/unsupported/include  \
                    187:     /usr/athena/include       \
                    188:     /usr/local/x11r5/include  \
                    189:     /usr/lpp/Xamples/include  \
                    190:     ; \
                    191:   do
                    192:     if test -r "$ac_dir/$motif_direct_test_include"; then
                    193:       no_motif= ac_motif_includes=$ac_dir
                    194:       break
                    195:     fi
                    196:   done
                    197: 
                    198: # Check for the libraries.
                    199: # See if we find them without any special options.
                    200: # Don't add to $LIBS permanently.
                    201: ac_save_LIBS="$LIBS"
                    202: LIBS="-l$motif_direct_test_library $LIBS"
                    203: # First see if replacing the include by lib works.
                    204: for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \
                    205:     /usr/lib/Motif1.2     \
                    206:     /usr/Motif1.2/lib     \
                    207:                           \
                    208:     /usr/motif/lib        \
                    209:                           \
                    210:     /usr/X11R6/lib        \
                    211:     /usr/X11R5/lib        \
                    212:                           \
                    213:     /usr/lib/X11R6        \
                    214:     /usr/lib/X11R5        \
                    215:                           \
                    216:     /usr/local/X11R6/lib  \
                    217:     /usr/local/X11R5/lib  \
                    218:                           \
                    219:     /usr/local/lib/X11R6  \
                    220:     /usr/local/lib/X11R5  \
                    221:                           \
                    222:     /usr/X11/lib          \
                    223:     /usr/lib/X11          \
                    224:     /usr/local/X11/lib    \
                    225:                           \
                    226:     /usr/X386/lib         \
                    227:     /usr/x386/lib         \
                    228:     /usr/XFree86/lib/X11  \
                    229:                           \
                    230:     /usr/lib              \
                    231:     /usr/local/lib        \
                    232:     /usr/unsupported/lib  \
                    233:     /usr/athena/lib       \
                    234:     /usr/local/x11r5/lib  \
                    235:     /usr/lpp/Xamples/lib  \
                    236:     ; \
                    237: do
                    238:   for ac_extension in a so sl; do
                    239:     if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then
                    240:       no_motif= ac_motif_libraries=$ac_dir
                    241:       break 2
                    242:     fi
                    243:   done
1.5       cvs       244: done
                    245: LIBS="$ac_save_LIBS"
                    246: ])
1.4       cvs       247: 
                    248: AC_DEFUN(AC_PATH_MOTIF,
                    249: [AC_REQUIRE_CPP()dnl
                    250: 
                    251: motif_includes=NONE
                    252: motif_libraries=NONE
                    253: 
                    254: AC_MSG_CHECKING(for Motif)
                    255: AC_ARG_WITH(motif, [  --with-motif            enable Motif tests])
                    256: if test "x$with_motif" = xno; then
                    257:   no_motif=yes
                    258: else
                    259:   if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then
                    260:     no_motif=
                    261:   else
                    262: AC_CACHE_VAL(ac_cv_path_motif,
                    263: [# One or both of these vars are not set, and there is no cached value.
                    264: no_motif=yes
                    265: AC_PATH_MOTIF_DIRECT
                    266: 
                    267: if test "$no_motif" = yes; then
                    268:   ac_cv_path_motif="no_motif=yes"
                    269: else
                    270:   ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries"
                    271: fi])dnl
                    272:   fi
                    273:   eval "$ac_cv_path_motif"
                    274: fi # with_motif != no
                    275: 
                    276: if test "$no_motif" = yes; then
                    277:   AC_MSG_RESULT(no)
1.5       cvs       278:   MOTIF_INCLUDES=
                    279:   MOTIF_LIBRARIES=
1.4       cvs       280: else
                    281:   test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes
                    282:   test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries
                    283:   ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries"
                    284:   AC_MSG_RESULT([libraries $motif_libraries, headers $motif_includes])
1.5       cvs       285:   if test "$motif_includes" != "/usr/include" ; then
                    286:     MOTIF_INCLUDES="-I$motif_includes"
                    287:   fi
                    288:   if test "$motif_libraries" != "/usr/lib" ; then
                    289:     MOTIF_LIBRARIES="-L$motif_libraries"
                    290:   fi
1.4       cvs       291: fi
1.5       cvs       292: AC_SUBST(MOTIF_INCLUDES)
                    293: AC_SUBST(MOTIF_LIBRARIES)
1.4       cvs       294: ])
                    295: 
                    296: AC_PATH_MOTIF
                    297: 
1.1       cvs       298: dnl  ***************************************************************
                    299: dnl
                    300: dnl    SPECIFIC STUFF : CONFIGURATION OPTIONS FOR THOT AND AMAYA
                    301: dnl
                    302: dnl  ***************************************************************
                    303: 
                    304: THOT_VER="2.1a"
                    305: AMAYA_VER="1.0a"
1.11    ! cvs       306: KAFFE_VER="0.9.1"
1.1       cvs       307: LIBWWW_VER="5.0a"
                    308: 
                    309: dnl
1.6       cvs       310: dnl We use a special versoin of cextract patched for alignment
                    311: dnl to build the signatures of the modules functions located in f subdirs
                    312: dnl
                    313: CEXTRACT_VER="1.7"
                    314: CEXTRACT_FLAGS="+O"
                    315: 
                    316: dnl
1.3       cvs       317: dnl Check when building with Insure from Parasoft
                    318: dnl
                    319: 
1.5       cvs       320: AC_ARG_WITH(insure, [  --with-insure           Uses Insure Parasoft debugger])
                    321: if test "$with_insure" = "yes" ; then
                    322:     CC=insight
1.3       cvs       323: fi
                    324: 
                    325: dnl
1.9       cvs       326: dnl Adjust the some variables depending on the host and compiler
                    327: dnl Thot NEED signed chars !!!
1.7       cvs       328: dnl
                    329: 
1.9       cvs       330: KAFFE_ENGINE=""
1.7       cvs       331: if test "${CC}" = "gcc" ; then
                    332:   CFLAGS="${CFLAGS} -Wall "
                    333:   case "${host}" in
                    334:       *-*-irix5* | *-*irix6* )
                    335:          CFLAGS="${CFLAGS} -fsigned-char"
                    336:       ;;
1.9       cvs       337:       *solaris* )
                    338:         KAFFE_ENGINE="--with-engine=intrp"
                    339:       ;;
1.7       cvs       340:   esac
                    341: fi
                    342: 
                    343: dnl
1.1       cvs       344: dnl Check for availability of amaya and thot editor sources
                    345: dnl
                    346: 
1.5       cvs       347: AC_ARG_WITH(thot, [  --with-thot             Build the Thot editor])
                    348: AC_ARG_WITH(amaya, [  --with-amaya            Build the Amaya HTML browser/editor])
1.1       cvs       349: 
                    350: build_thot="yes"
                    351: build_amaya="yes"
                    352: 
                    353: if test "$with_thot" = "no" ; then
                    354:     build_thot="no"
                    355: fi
                    356: if test "$with_amaya" = "no" ; then
                    357:     build_amaya="no"
                    358: fi
                    359: 
                    360: if test ! -f $srcdir/thot/Makefile.in ; then
                    361:     AC_MSG_WARN(Thot editor sources not found, disabling Thot build !)
                    362:     build_thot="no"
                    363: fi
                    364:    
                    365: if test ! -f $srcdir/amaya/Makefile.in ; then
                    366:     AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
                    367:     build_amaya="no"
                    368: fi
                    369: 
                    370: dnl
1.3       cvs       371: dnl Check for external, Thot related programs
                    372: dnl
                    373: 
                    374: build_misc="no"
                    375: if test "$build_thot" = "yes" ;  then
                    376:     if test -f $srcdir/misc/Makefile.in ; then
                    377:        build_misc="yes"
                    378:        build_annotations="no"
                    379:        if test -f $srcdir/misc/annotations/Makefile.in ; then
                    380:            build_annotations="yes"
                    381:        fi
                    382:        if test -f $srcdir/misc/util/Makefile.in ; then
                    383:            build_util="yes"
                    384:            build_tableaux="no"
                    385:            build_transform="no"
                    386:            build_versions="no"
                    387:            if test -f $srcdir/misc/util/tableaux/Makefile.in ; then
                    388:                build_tableaux="yes"
                    389:            fi
                    390:            if test -f $srcdir/misc/util/transform/Makefile.in ; then
                    391:                build_transform="yes"
                    392:            fi
                    393:            if test -f $srcdir/misc/util/versions/Makefile.in ; then
                    394:                build_versions="yes"
                    395:            fi
                    396:        fi
                    397:     fi
                    398: fi
                    399: 
                    400: dnl
1.1       cvs       401: dnl Check for additionnal packages kaffe-xxx or libwww
                    402: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
                    403: dnl
                    404: 
1.5       cvs       405: AC_ARG_ENABLE(java, [  --enable-java           Add Kaffe Java virtual machine])
1.9       cvs       406: AC_ARG_ENABLE(intr, [  --enable-intr           Use Kaffe Java Interpreter])
1.10      cvs       407: AC_ARG_ENABLE(jit, [  --enable-jit             Use Kaffe Java JIT Compiler])
                    408: AC_ARG_ENABLE(plugin, [  --enable-plugin       Add Netscape Plug-Ins support])
                    409: AC_ARG_ENABLE(math, [  --enable-math             Add Math support ])
1.1       cvs       410: 
1.8       cvs       411: dnl
1.10      cvs       412: dnl Check for the Kaffe engine to use : interpreter or JIT
1.9       cvs       413: dnl
                    414: if test "$enable_intr" = "yes" ; then
                    415:     with_java="yes"
                    416:     KAFFE_ENGINE="--with-engine=intrp"
                    417: fi
                    418: if test "$enable_intr" = "no" ; then
                    419:     with_java="yes"
                    420:     KAFFE_ENGINE="--with-engine=jit"
                    421: fi
                    422: if test "$enable_jit" = "yes" ; then
                    423:     with_java="yes"
                    424:     KAFFE_ENGINE="--with-engine=jit"
                    425: fi
                    426: if test "$enable_jit" = "no" ; then
                    427:     with_java="yes"
                    428:     KAFFE_ENGINE="--with-engine=intr"
                    429: fi
                    430: 
                    431: 
                    432: dnl
1.8       cvs       433: dnl java is enable by default
                    434: dnl
1.1       cvs       435: if test "$enable_java" = "no" ; then
                    436:     with_java="no"
                    437: else
                    438:     with_java="yes"
                    439: fi
1.8       cvs       440: 
                    441: dnl
1.10      cvs       442: dnl plugins are disabled by default if using java else enabled by default
1.8       cvs       443: dnl
1.10      cvs       444: if test "$with_java" = "yes" ; then
                    445:   if test "$enable_plugin" = "yes" ; then
1.1       cvs       446:     with_plugin="yes"
1.10      cvs       447:   else
                    448:     with_plugin="no"
                    449:   fi
1.1       cvs       450: else
1.10      cvs       451:   if test "$enable_plugin" = "no" ; then
1.1       cvs       452:     with_plugin="no"
1.10      cvs       453:   else
                    454:     with_plugin="yes"
                    455:   fi
                    456: fi  
1.1       cvs       457: 
1.8       cvs       458: dnl
1.10      cvs       459: dnl math is enabled by default
1.8       cvs       460: dnl
1.10      cvs       461: if test "$enable_math" = "no" ; then
                    462:     with_math="no"
1.8       cvs       463: else
1.10      cvs       464:     with_math="yes"
1.8       cvs       465: fi
                    466: 
1.1       cvs       467: if test "$build_amaya" = "yes" ; then 
                    468:     if test ! -f $srcdir/kaffe-$KAFFE_VER/Makefile.in ; then
                    469:        if test "$with_java" = "yes" ; then
                    470:            AC_MSG_WARN(kaffe-$KAFFE_VER sources not found, disabling Java !)
                    471:            with_java="no"
                    472:        fi
                    473:     fi
                    474: 
                    475:     if test ! -f $srcdir/classes/thotlib.zip ; then
                    476:        if test "$with_java" = "yes" ; then
                    477:            AC_MSG_WARN(Java classes not found, disabling Java !)
                    478:            with_java="no"
                    479:        fi
                    480:     fi
                    481: 
                    482:     if test ! -f $srcdir/w3c-libwww-$LIBWWW_VER/Makefile.in ; then
                    483:        if test "$with_java" = "no" ; then
                    484:            AC_MSG_WARN(w3c-libwww-$LIBWWW_VER sources not found !!)
                    485:            AC_MSG_WARN(Disabling Amaya build !)
                    486:            build_amaya="no"
                    487:        fi
                    488:     fi
1.8       cvs       489: 
                    490:     if test ! -f $srcdir/amaya/MathML.S ; then
1.10      cvs       491:        if test "$with_math" = "yes" ; then
1.8       cvs       492:            AC_MSG_WARN(MathML sources not found !!)
1.10      cvs       493:            AC_MSG_WARN(Disabling MATH build !)
                    494:            with_math="no"
                    495:            MATH_OPTIONS=
1.8       cvs       496:        fi
                    497:     fi
1.1       cvs       498: fi
                    499: 
                    500: dnl
                    501: dnl The options for each library or binary
                    502: dnl
                    503: 
                    504: THOT_OPTIONS=
1.10      cvs       505: AMAYA_OPTIONS="-DCOUGAR" $MATH_OPTIONS
1.1       cvs       506: PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
                    507: dnl JAVA_OPTIONS="-DDEBUG_KAFFE -DDEBUG_LOCK -DDEBUG_SELECT -DDEBUG_SELECT_CHANNELS -DDEBUG_TIMING -DSYNC_DNS"
                    508: JAVA_OPTIONS=
                    509: ANNOTATIONS_OPTIONS=
                    510: IMGLIBS="-ljpeg -lpng -lz"
1.3       cvs       511: EXTRA_LIBS=
1.1       cvs       512: 
                    513: dnl
                    514: dnl Set up the PATHs needed
                    515: dnl
                    516: 
                    517: API="\$(THOTDIR)/thotlib/include"
                    518: VAR="\$(THOTDIR)/thotlib/internals/var"
                    519: INCL="\$(THOTDIR)/thotlib/internals/h"
                    520: FUNC="\$(THOTDIR)/thotlib/internals/f"
                    521: SCHEMAS="\$(THOTDIR)/schemas"
                    522: SCHEMASOPERA="\$(THOTDIR)/schemasOPERA"
                    523: JPEGINCL="-I\$(THOTDIR)/libjpeg"
                    524: PNGINCL="-I\$(THOTDIR)/libpng -I\$(THOTDIR)/libpng/zlib"
                    525: 
                    526: dnl
                    527: dnl Set up the include variables.
                    528: dnl
                    529: 
                    530: THOTINCLUDES="-I$API -I$VAR -I$INCL -I$FUNC -I$SCHEMAS -I$SCHEMASOPERA $JPEGINCL $PNGINCL"
                    531: APIINCLUDES=-I$API 
                    532: if test "$VPATHOPT" = "" ; then
                    533:        VPATHOPT="VPATH"
                    534: fi
                    535: 
                    536: dnl
                    537: dnl Exports the current values of the variables.
                    538: dnl
                    539: 
                    540: AC_SUBST(THOT_VER)
                    541: AC_SUBST(AMAYA_VER)
                    542: AC_SUBST(LIBWWW_VER)
                    543: AC_SUBST(KAFFE_VER)
1.6       cvs       544: AC_SUBST(CEXTRACT_VER)
                    545: AC_SUBST(CEXTRACT_FLAGS)
1.1       cvs       546: 
1.9       cvs       547: AC_SUBST(KAFFE_ENGINE)
                    548: 
1.1       cvs       549: AC_SUBST(THOTINCLUDES)
                    550: AC_SUBST(APIINCLUDES)
                    551: AC_SUBST(VPATHOPT)
                    552: 
                    553: AC_SUBST(THOT_OPTIONS)
                    554: AC_SUBST(AMAYA_OPTIONS)
                    555: AC_SUBST(PLUGIN_OPTIONS)
                    556: AC_SUBST(JAVA_OPTIONS)
                    557: AC_SUBST(ANNOTATIONS_OPTIONS)
                    558: AC_SUBST(IMGLIBS)
1.3       cvs       559: AC_SUBST(EXTRA_LIBS)
1.1       cvs       560: 
                    561: dnl
                    562: dnl Include the option Makefile.xxx fragment for plugin and or Java options
                    563: dnl
                    564: 
                    565: if test "$with_plugin" = "yes" ; then
                    566:     AC_SUBST_FILE(plugin_frag)dnl
                    567:     plugin_frag=$srcdir/pluginlib/Makefile.plugin
                    568: else
                    569:     AC_SUBST_FILE(plugin_frag)
                    570:     plugin_frag=/dev/null
                    571: fi
                    572: 
                    573: if test "$with_java" = "yes" ; then
1.8       cvs       574:     AC_SUBST_FILE(java_frag)
1.1       cvs       575:     java_frag=$srcdir/javalib/Makefile.java
                    576:     AC_SUBST_FILE(www_frag)
                    577:     www_frag=/dev/null
                    578: else
                    579:     AC_SUBST_FILE(java_frag)
                    580:     java_frag=/dev/null
                    581:     AC_SUBST_FILE(www_frag)dnl
                    582:     www_frag=$srcdir/amaya/Makefile.libwww
                    583: fi
                    584: 
1.10      cvs       585: if test "$with_math" = "yes" ; then
                    586:     AC_SUBST_FILE(math_frag)
                    587:     math_frag=$srcdir/amaya/Makefile.math
1.8       cvs       588: else
1.10      cvs       589:     AC_SUBST_FILE(math_frag)
                    590:     math_frag=/dev/null
1.8       cvs       591: fi
                    592: 
1.1       cvs       593: dnl  ***************************************************************
                    594: dnl
                    595: dnl      FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
                    596: dnl
                    597: dnl  ***************************************************************
                    598: 
                    599: EXTRA_MAKEFILE_IN=
1.2       cvs       600: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1       cvs       601:        libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2       cvs       602:        tools/mkdep/Makefile \
1.1       cvs       603:        tools/cextract-1.7/Makefile thotlib/Makefile \
1.5       cvs       604:        thotlib/include/Makefile batch/Makefile tablelib/Makefile"
1.1       cvs       605: 
                    606: if test "$build_amaya" = "yes" ; then
1.2       cvs       607: 
                    608:     make_output="$make_output amaya/Makefile \
                    609: tools/javastub/Makefile tools/dns_daemon/Makefile javalib/Makefile \
                    610: pluginlib/Makefile"
                    611: 
                    612:     EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
                    613: $srcdir/amaya/Makefile.libwww \
                    614: $srcdir/tools/javastub/Makefile.in \
                    615: $srcdir/tools/dns_daemon/Makefile.in \
                    616: $srcdir/javalib/Makefile.in \
                    617: $srcdir/pluginlib/Makefile.in \
                    618: $srcdir/pluginlib/Makefile.plugin"
                    619: 
1.1       cvs       620: fi
                    621: 
                    622: if test "$build_thot" = "yes" ; then
1.3       cvs       623: 
1.5       cvs       624:     make_output="$make_output thot/Makefile \
                    625: drawlib/Makefile indexlib/Makefile"
                    626: 
1.3       cvs       627:     EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
1.5       cvs       628: $srcdir/thot/Makefile.in \
                    629: $srcdir/drawlib/Makefile.in \
                    630: $srcdir/indexlib/Makefile.in"
1.3       cvs       631: 
                    632:     if test "$build_misc" = "yes" ; then
                    633: 
                    634:        make_output="$make_output misc/Makefile"
                    635:        EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    636: $srcdir/misc/Makefile.in"
                    637: 
                    638:        if test "$build_annotations" = "yes" ; then
                    639: 
                    640:            make_output="$make_output misc/annotations/Makefile"
                    641:            EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    642: $srcdir/misc/annotations/Makefile.in"
                    643: 
                    644:        fi
                    645:        if test "$build_util" = "yes" ; then
                    646: 
                    647:            make_output="$make_output misc/util/Makefile"
                    648:            EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    649: $srcdir/misc/util/Makefile.in"
                    650: 
                    651:            if test "$build_tableaux" = "yes" ; then
                    652: 
                    653:                make_output="$make_output misc/util/tableaux/Makefile"
                    654:                EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    655: $srcdir/misc/util/tableaux/Makefile.in"
                    656: 
                    657:            fi
                    658:            if test "$build_transform" = "yes" ; then
                    659: 
                    660:                make_output="$make_output misc/util/transform/Makefile"
                    661:                EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    662: $srcdir/misc/util/transform/Makefile.in"
                    663: 
                    664:            fi
                    665:            if test "$build_versions" = "yes" ; then
                    666: 
                    667:                make_output="$make_output misc/util/versions/Makefile"
                    668:                EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    669: $srcdir/misc/util/versions/Makefile.in"
                    670: 
                    671:            fi
                    672:        fi
                    673:     fi
1.1       cvs       674: fi
                    675: 
                    676: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6       cvs       677: AC_OUTPUT($make_output , [
                    678: dnl
                    679: dnl This fragment of shell code is executed after the
                    680: dnl Makefile(s) dump ...
                    681: dnl
                    682: 
                    683: echo timestamp > stamp-h
                    684: 
                    685: dnl
                    686: dnl Check for an upgrade in the Options numbers
                    687: dnl
                    688: 
                    689: if test -f Options ; then
                    690:    oldversion=`grep Version Options`
                    691:    newversion=`grep Version Options.orig`
                    692:    if test "$oldversion" != "$newversion" ; then
                    693:        echo WARNING : Options files have changed, old options saved to Options.old
                    694:        cp Options Options.old
                    695:        cp Options.orig Options
                    696:        exit 1
                    697:    fi
                    698: fi
                    699: ])
1.1       cvs       700: 
                    701: if test "$build_thot" = "yes" ; then
                    702:     if test "$build_amaya" = "yes" ; then
                    703:        echo Amaya and Thot packages are now configured
                    704:     else
                    705:        echo Thot package is now configured
                    706:     fi
                    707: else
                    708:     if test "$build_amaya" = "yes" ; then
                    709:        echo Amaya package is now configured
                    710:     else
                    711:        echo Nor Amaya nor Thot package found, get the corresponding archive
                    712:     fi
                    713: 
                    714: fi
                    715: 
                    716: if test "$build_amaya" = "yes" ; then
1.5       cvs       717:     if test "$with_java" = "yes" -a "$with_plugin" = "yes" ; then
                    718:         AC_MSG_WARN(Amaya configured with both Java and Plugins support)
                    719:         AC_MSG_WARN(Beware this combination doesn't work well)
1.1       cvs       720:     else
1.5       cvs       721:        if test "$with_java" = "yes" ; then
1.9       cvs       722:            if test "$KAFFE_ENGINE" = "--with-engine=jit" ;  then
                    723:               echo Amaya configured with Java JIT support
                    724:            else
                    725:                if test "$KAFFE_ENGINE" = "--with-engine=intr" ;  then
                    726:                    echo Amaya configured with Java interpreter support
                    727:                else
                    728:                    echo Amaya configured with Java support
                    729:                fi
                    730:             fi
1.11    ! cvs       731:            echo Using kaffe-$KAFFE_VER Java virtual machine
1.5       cvs       732:        else
                    733:            echo Amaya configured with libWWW
                    734:        fi
                    735:        if test "$with_plugin" = "yes" ; then
                    736:            echo Amaya configured with Plugins support
                    737:        fi
1.8       cvs       738:     fi
1.10      cvs       739:     if test "$with_math" = "yes" ; then
                    740:        echo Amaya configured with Math support
1.1       cvs       741:     fi
1.5       cvs       742: fi
                    743: 
                    744: if test "$no_motif" = yes ; then
                    745:     echo "Motif seems not installed on this machine"
                    746:     echo "Thot and Amaya need Motif 1.2 or 2.0"
                    747:     echo "Thot and Amaya probably won't compile"
                    748: else
                    749: if test "$motif_includes" = "" ; then
                    750:     echo "Motif includes were not found"
                    751:     echo "Thot and Amaya might not compile"
                    752:     echo "Edit your Option file"
                    753: else
                    754: if test "$motif_libraries" = "" ; then
                    755:     echo "Motif libraries were not found"
                    756:     echo "Thot and Amaya might not compile"
                    757:     echo "Edit your Option file"
                    758: fi
                    759: fi
1.1       cvs       760: fi
                    761: 
                    762: echo "Now start \"make all\" (GNU make preferably) to build the binaries"
1.5       cvs       763: 

Webmaster