Annotation of Amaya/configure.in, revision 1.29

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
1.25      cvs       142: 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       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  \
1.14      cvs       190:                               \
                    191:     /usr/lesstif/include      \
                    192:     /usr/local/lesstif/include\
                    193:     /usr/gnu/lesstif/include  \
                    194:     $HOME/lesstif/include     \
1.4       cvs       195:     ; \
                    196:   do
                    197:     if test -r "$ac_dir/$motif_direct_test_include"; then
                    198:       no_motif= ac_motif_includes=$ac_dir
                    199:       break
                    200:     fi
                    201:   done
                    202: 
                    203: # Check for the libraries.
                    204: # See if we find them without any special options.
                    205: # Don't add to $LIBS permanently.
                    206: ac_save_LIBS="$LIBS"
                    207: LIBS="-l$motif_direct_test_library $LIBS"
                    208: # First see if replacing the include by lib works.
                    209: for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \
                    210:     /usr/lib/Motif1.2     \
                    211:     /usr/Motif1.2/lib     \
                    212:                           \
                    213:     /usr/motif/lib        \
                    214:                           \
                    215:     /usr/X11R6/lib        \
                    216:     /usr/X11R5/lib        \
                    217:                           \
                    218:     /usr/lib/X11R6        \
                    219:     /usr/lib/X11R5        \
                    220:                           \
                    221:     /usr/local/X11R6/lib  \
                    222:     /usr/local/X11R5/lib  \
                    223:                           \
                    224:     /usr/local/lib/X11R6  \
                    225:     /usr/local/lib/X11R5  \
                    226:                           \
                    227:     /usr/X11/lib          \
                    228:     /usr/lib/X11          \
                    229:     /usr/local/X11/lib    \
                    230:                           \
                    231:     /usr/X386/lib         \
                    232:     /usr/x386/lib         \
                    233:     /usr/XFree86/lib/X11  \
                    234:                           \
                    235:     /usr/lib              \
                    236:     /usr/local/lib        \
                    237:     /usr/unsupported/lib  \
                    238:     /usr/athena/lib       \
                    239:     /usr/local/x11r5/lib  \
                    240:     /usr/lpp/Xamples/lib  \
1.14      cvs       241:                           \
                    242:     /usr/lesstif/lib      \
                    243:     /usr/local/lesstif/lib\
                    244:     /usr/gnu/lesstif/lib  \
                    245:     $HOME/lesstif/lib     \
1.4       cvs       246:     ; \
                    247: do
                    248:   for ac_extension in a so sl; do
                    249:     if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then
                    250:       no_motif= ac_motif_libraries=$ac_dir
                    251:       break 2
                    252:     fi
                    253:   done
1.5       cvs       254: done
                    255: LIBS="$ac_save_LIBS"
                    256: ])
1.4       cvs       257: 
                    258: AC_DEFUN(AC_PATH_MOTIF,
                    259: [AC_REQUIRE_CPP()dnl
                    260: 
                    261: motif_includes=NONE
                    262: motif_libraries=NONE
                    263: 
                    264: AC_MSG_CHECKING(for Motif)
                    265: AC_ARG_WITH(motif, [  --with-motif            enable Motif tests])
                    266: if test "x$with_motif" = xno; then
                    267:   no_motif=yes
                    268: else
                    269:   if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then
                    270:     no_motif=
                    271:   else
                    272: AC_CACHE_VAL(ac_cv_path_motif,
                    273: [# One or both of these vars are not set, and there is no cached value.
                    274: no_motif=yes
                    275: AC_PATH_MOTIF_DIRECT
                    276: 
                    277: if test "$no_motif" = yes; then
                    278:   ac_cv_path_motif="no_motif=yes"
                    279: else
                    280:   ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries"
                    281: fi])dnl
                    282:   fi
                    283:   eval "$ac_cv_path_motif"
                    284: fi # with_motif != no
                    285: 
                    286: if test "$no_motif" = yes; then
                    287:   AC_MSG_RESULT(no)
1.5       cvs       288:   MOTIF_INCLUDES=
                    289:   MOTIF_LIBRARIES=
1.4       cvs       290: else
                    291:   test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes
                    292:   test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries
                    293:   ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries"
                    294:   AC_MSG_RESULT([libraries $motif_libraries, headers $motif_includes])
1.5       cvs       295:   if test "$motif_includes" != "/usr/include" ; then
                    296:     MOTIF_INCLUDES="-I$motif_includes"
                    297:   fi
                    298:   if test "$motif_libraries" != "/usr/lib" ; then
                    299:     MOTIF_LIBRARIES="-L$motif_libraries"
1.19      cvs       300:     case "${host}" in
                    301:         *-*sun-solaris* )
                    302:          MOTIF_LIBRARIES="${MOTIF_LIBRARIES} -R$motif_libraries"
                    303:         ;;
                    304:     esac    
1.5       cvs       305:   fi
1.4       cvs       306: fi
1.5       cvs       307: AC_SUBST(MOTIF_INCLUDES)
                    308: AC_SUBST(MOTIF_LIBRARIES)
1.4       cvs       309: ])
                    310: 
                    311: AC_PATH_MOTIF
                    312: 
1.1       cvs       313: dnl  ***************************************************************
                    314: dnl
                    315: dnl    SPECIFIC STUFF : CONFIGURATION OPTIONS FOR THOT AND AMAYA
                    316: dnl
                    317: dnl  ***************************************************************
                    318: 
1.26      cvs       319: THOT_VER="2.2"
                    320: AMAYA_VER="1.3"
1.28      cvs       321: KAFFE_VER="snap"
1.1       cvs       322: LIBWWW_VER="5.0a"
                    323: 
                    324: dnl
1.6       cvs       325: dnl We use a special versoin of cextract patched for alignment
                    326: dnl to build the signatures of the modules functions located in f subdirs
                    327: dnl
                    328: CEXTRACT_VER="1.7"
                    329: CEXTRACT_FLAGS="+O"
                    330: 
                    331: dnl
1.3       cvs       332: dnl Check when building with Insure from Parasoft
                    333: dnl
                    334: 
1.5       cvs       335: AC_ARG_WITH(insure, [  --with-insure           Uses Insure Parasoft debugger])
                    336: if test "$with_insure" = "yes" ; then
                    337:     CC=insight
1.3       cvs       338: fi
                    339: 
                    340: dnl
1.9       cvs       341: dnl Adjust the some variables depending on the host and compiler
                    342: dnl Thot NEED signed chars !!!
1.7       cvs       343: dnl
                    344: 
1.9       cvs       345: KAFFE_ENGINE=""
1.7       cvs       346: if test "${CC}" = "gcc" ; then
                    347:   CFLAGS="${CFLAGS} -Wall "
                    348:   case "${host}" in
                    349:       *-*-irix5* | *-*irix6* )
                    350:          CFLAGS="${CFLAGS} -fsigned-char"
                    351:       ;;
                    352:   esac
1.14      cvs       353: fi
                    354: 
                    355: if test "$ac_cv_c_const" = "no" ; then
                    356:   CFLAGS="${CFLAGS} -DCONST= "
1.7       cvs       357: fi
                    358: 
                    359: dnl
1.1       cvs       360: dnl Check for availability of amaya and thot editor sources
                    361: dnl
                    362: 
1.5       cvs       363: AC_ARG_WITH(thot, [  --with-thot             Build the Thot editor])
                    364: AC_ARG_WITH(amaya, [  --with-amaya            Build the Amaya HTML browser/editor])
1.1       cvs       365: 
                    366: build_thot="yes"
                    367: build_amaya="yes"
                    368: 
                    369: if test "$with_thot" = "no" ; then
                    370:     build_thot="no"
                    371: fi
                    372: if test "$with_amaya" = "no" ; then
                    373:     build_amaya="no"
                    374: fi
                    375: 
                    376: if test ! -f $srcdir/thot/Makefile.in ; then
                    377:     AC_MSG_WARN(Thot editor sources not found, disabling Thot build !)
                    378:     build_thot="no"
                    379: fi
                    380:    
                    381: if test ! -f $srcdir/amaya/Makefile.in ; then
                    382:     AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
                    383:     build_amaya="no"
                    384: fi
                    385: 
                    386: dnl
1.3       cvs       387: dnl Check for external, Thot related programs
                    388: dnl
                    389: 
                    390: build_misc="no"
                    391: if test "$build_thot" = "yes" ;  then
                    392:     if test -f $srcdir/misc/Makefile.in ; then
                    393:        build_misc="yes"
                    394:        build_annotations="no"
                    395:        if test -f $srcdir/misc/annotations/Makefile.in ; then
                    396:            build_annotations="yes"
                    397:        fi
                    398:        if test -f $srcdir/misc/util/Makefile.in ; then
                    399:            build_util="yes"
                    400:            build_tableaux="no"
                    401:            build_transform="no"
                    402:            build_versions="no"
                    403:            if test -f $srcdir/misc/util/tableaux/Makefile.in ; then
                    404:                build_tableaux="yes"
                    405:            fi
                    406:            if test -f $srcdir/misc/util/transform/Makefile.in ; then
                    407:                build_transform="yes"
                    408:            fi
                    409:            if test -f $srcdir/misc/util/versions/Makefile.in ; then
                    410:                build_versions="yes"
                    411:            fi
                    412:        fi
                    413:     fi
                    414: fi
                    415: 
                    416: dnl
1.1       cvs       417: dnl Check for additionnal packages kaffe-xxx or libwww
                    418: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
                    419: dnl
                    420: 
1.26      cvs       421: AC_ARG_ENABLE(java,    [  --enable-java           Add Kaffe Java virtual machine])
1.22      cvs       422: AC_ARG_ENABLE(javaawt, [  --enable-java-awt       Add Kaffe Java Biss AWT])
1.26      cvs       423: AC_ARG_ENABLE(intr,    [  --enable-intr           Use Kaffe Java Interpreter])
                    424: AC_ARG_ENABLE(jit,     [  --enable-jit            Use Kaffe Java JIT Compiler])
                    425: AC_ARG_ENABLE(plugin,  [  --enable-plugin         Add Netscape Plug-Ins support])
                    426: AC_ARG_ENABLE(math,    [  --enable-math           Add Math support ])
                    427: AC_ARG_ENABLE(graph,   [  --enable-graph          Add Graphics support ])
                    428: AC_ARG_ENABLE(ilu,     [  --enable-ilu            Add ILU support])
1.1       cvs       429: 
1.8       cvs       430: dnl
1.10      cvs       431: dnl Check for the Kaffe engine to use : interpreter or JIT
1.9       cvs       432: dnl
1.13      cvs       433: 
                    434: with_java=""
1.9       cvs       435: if test "$enable_intr" = "yes" ; then
                    436:     with_java="yes"
                    437:     KAFFE_ENGINE="--with-engine=intrp"
                    438: fi
                    439: if test "$enable_intr" = "no" ; then
                    440:     with_java="yes"
                    441:     KAFFE_ENGINE="--with-engine=jit"
                    442: fi
                    443: if test "$enable_jit" = "yes" ; then
                    444:     with_java="yes"
                    445:     KAFFE_ENGINE="--with-engine=jit"
                    446: fi
                    447: if test "$enable_jit" = "no" ; then
                    448:     with_java="yes"
                    449:     KAFFE_ENGINE="--with-engine=intr"
                    450: fi
                    451: 
                    452: 
                    453: dnl
1.17      cvs       454: dnl java is disabled by default
1.8       cvs       455: dnl
1.13      cvs       456: 
1.19      cvs       457: if test "$enable_java" = "yes" ; then
                    458:     with_java="yes"
1.1       cvs       459: fi
1.8       cvs       460: 
                    461: dnl
1.22      cvs       462: dnl if java, java-awt is enabled by default
                    463: dnl
                    464: 
                    465: if test "$enable_javaawt" = "no" ; then
                    466:     java_awt_option="-DJAVA_NO_AWT"
                    467: else
                    468:     java_awt_option=""
                    469: fi
                    470: 
                    471: dnl
1.21      cvs       472: dnl plugins support is disabled by default
1.8       cvs       473: dnl
1.13      cvs       474: 
                    475: if test "$with_plugin" = "" ; then
1.21      cvs       476:   if test "$enable_plugin" = "yes" ; then
                    477:     with_plugin="yes"
                    478:   else
1.17      cvs       479:     with_plugin="no"
                    480:   fi
1.10      cvs       481: fi  
1.1       cvs       482: 
1.8       cvs       483: dnl
1.10      cvs       484: dnl math is enabled by default
1.8       cvs       485: dnl
1.13      cvs       486: if test "$with_math" = "" ; then
                    487:     if test "$enable_math" = "no" ; then
                    488:        with_math="no"
                    489:     else
                    490:        with_math="yes"
                    491:     fi
1.8       cvs       492: fi
                    493: 
1.16      cvs       494: dnl
1.26      cvs       495: dnl graph is disabled by default
                    496: dnl
                    497: if test "$with_graph" = "" ; then
                    498:     if test "$enable_graph" = "yes" ; then
                    499:        with_graph="yes"
                    500:     else
                    501:        with_graph="no"
                    502:     fi
                    503: fi
                    504: 
                    505: dnl
1.16      cvs       506: dnl ilu is disabled by default
                    507: dnl
                    508: if test "$with_ilu" = "" ; then
                    509:     if test "$enable_ilu" = "yes" ; then
                    510:        with_ilu="yes"
                    511:     else
                    512:        with_ilu="no"
                    513:     fi
                    514: fi
                    515: 
1.22      cvs       516: dnl
                    517: dnl Checking for ilu
                    518: dnl
                    519: 
                    520: ILUHOME=""
                    521: if test "$with_ilu" = "yes" ; then
                    522:     dnl
                    523:     dnl try to get first the path for the c-stubber
                    524:     dnl
                    525:     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)
                    526:     case "$CSTUBBER" in
                    527:         /*/bin/c-stubber) 
                    528:            ILU_BINARIES=`dirname $CSTUBBER`
                    529:            ILUHOME=`dirname $ILU_BINARIES`
                    530:            ILU_LIBRARIES=$ILUHOME/lib
                    531:            ILU_INCLUDES=$ILUHOME/include
                    532:            ;;
                    533:         /*/c-stubber) 
                    534:            ILU_BINARIES=`dirname $CSTUBBER`
                    535:            ILUHOME=`dirname $ILU_BINARIES`
                    536:            ILU_LIBRARIES=$ILUHOME/lib
                    537:            ILU_INCLUDES=$ILUHOME/include
                    538:            ;;
                    539:     esac
                    540:     if test "$CSTUBBER" = "" -o "$CSTUBBER" = "c-stubber" ; then
                    541:        AC_MSG_WARN(ILU c-stubber binary not found, ILU disabled !)
                    542:        with_ilu="no"
                    543:     fi
                    544: fi
                    545: 
1.19      cvs       546: if test "$build_amaya" = "yes" ; then
                    547: 
1.1       cvs       548:     if test ! -f $srcdir/kaffe-$KAFFE_VER/Makefile.in ; then
                    549:        if test "$with_java" = "yes" ; then
                    550:            AC_MSG_WARN(kaffe-$KAFFE_VER sources not found, disabling Java !)
                    551:            with_java="no"
                    552:        fi
                    553:     fi
                    554: 
1.15      cvs       555:     if test "$with_java" = "yes" ; then
                    556:        #
                    557:        # Verify that Java code is available.
                    558:        # Look first for thotlib, amaya and jigsaw classes source code
                    559:        #
1.24      cvs       560:        if test -f $srcdir/classes/org/w3c/thotlib/Element.java -a \
                    561:                -f $srcdir/classes/org/w3c/amaya/amayaInit.java -a \
                    562:                -f $srcdir/classes/org/w3c/www/protocol/http/HttpURLConnection.java \
1.15      cvs       563:                ; then
                    564:            with_java_sources="yes"
                    565:        else
                    566:            with_java_sources="no"
                    567:        fi 
                    568:        #
1.22      cvs       569:        # Verify that BISS AWT implemetation is available.
                    570:        #
                    571:        if test -f $srcdir/kaffe-$KAFFE_VER/packages/biss-net.com/APIawt/classes/biss.zip ; then
                    572:            java_awt_option="$java_awt_option"
                    573:        else
                    574:            java_awt_option="$java_awt_option -DJAVA_NO_AWT"
                    575:        fi 
                    576:        #
1.15      cvs       577:        # Then check for precompiled classes packages.
                    578:        #
                    579:        if test -f $srcdir/classes/thotlib.zip -a \
                    580:                -f $srcdir/classes/amaya.zip -a \
                    581:                -f $srcdir/classes/jigsaw.zip \
                    582:                ; then
                    583:            with_java_package="yes"
                    584:        else
                    585:            with_java_package="no"
                    586:        fi 
                    587: 
                    588:        #
                    589:        # At least one of both should be available.
                    590:        #
                    591:        if test "$with_java_sources" = "no" -a "$with_java_package" = "no"
                    592:        then
                    593:            AC_MSG_WARN(Amaya Java classes not found : disabling Java!)
                    594:             with_java="no"
1.1       cvs       595:        fi
                    596:     fi
                    597: 
                    598:     if test ! -f $srcdir/w3c-libwww-$LIBWWW_VER/Makefile.in ; then
1.16      cvs       599:        if test "$with_java" = "no" -a "$with_ilu" = "no" ; then
1.1       cvs       600:            AC_MSG_WARN(w3c-libwww-$LIBWWW_VER sources not found !!)
                    601:            AC_MSG_WARN(Disabling Amaya build !)
                    602:            build_amaya="no"
                    603:        fi
                    604:     fi
1.8       cvs       605: 
                    606:     if test ! -f $srcdir/amaya/MathML.S ; then
1.10      cvs       607:        if test "$with_math" = "yes" ; then
1.8       cvs       608:            AC_MSG_WARN(MathML sources not found !!)
1.26      cvs       609:            AC_MSG_WARN(Disabling Math build !)
1.10      cvs       610:            with_math="no"
                    611:            MATH_OPTIONS=
1.8       cvs       612:        fi
                    613:     fi
1.26      cvs       614: 
                    615:     if test ! -f $srcdir/amaya/GraphML.S ; then
                    616:        if test "$with_graph" = "yes" ; then
                    617:            AC_MSG_WARN(GraphML sources not found !!)
                    618:            AC_MSG_WARN(Disabling Graphics build !)
                    619:            with_graph="no"
                    620:            GRAPH_OPTIONS=
                    621:        fi
                    622:     fi
                    623: 
1.16      cvs       624:     if test "$with_java" = "yes" -a "$with_ilu" = "yes" ; then
                    625:         java_ilu_option="-DWITH_ILU"
                    626:         ilu_java_option="-DWITH_JAVA"
                    627:     fi
1.1       cvs       628: fi
                    629: 
                    630: dnl
                    631: dnl The options for each library or binary
                    632: dnl
                    633: 
                    634: THOT_OPTIONS=
1.26      cvs       635: AMAYA_OPTIONS="-DCOUGAR" $MATH_OPTIONS $GRAPH_OPTIONS
1.1       cvs       636: PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
                    637: dnl JAVA_OPTIONS="-DDEBUG_KAFFE -DDEBUG_LOCK -DDEBUG_SELECT -DDEBUG_SELECT_CHANNELS -DDEBUG_TIMING -DSYNC_DNS"
1.22      cvs       638: JAVA_OPTIONS="$java_ilu_option $java_awt_option"
1.1       cvs       639: ANNOTATIONS_OPTIONS=
                    640: IMGLIBS="-ljpeg -lpng -lz"
1.3       cvs       641: EXTRA_LIBS=
1.1       cvs       642: 
1.16      cvs       643: ILU_OPTIONS="$ilu_java_option"
                    644: ILU_INCLUDES=
                    645: ILU_LIBRARIES=
                    646: 
1.1       cvs       647: dnl
                    648: dnl Set up the PATHs needed
                    649: dnl
                    650: 
                    651: API="\$(THOTDIR)/thotlib/include"
                    652: VAR="\$(THOTDIR)/thotlib/internals/var"
                    653: INCL="\$(THOTDIR)/thotlib/internals/h"
                    654: FUNC="\$(THOTDIR)/thotlib/internals/f"
                    655: SCHEMAS="\$(THOTDIR)/schemas"
                    656: SCHEMASOPERA="\$(THOTDIR)/schemasOPERA"
                    657: JPEGINCL="-I\$(THOTDIR)/libjpeg"
                    658: PNGINCL="-I\$(THOTDIR)/libpng -I\$(THOTDIR)/libpng/zlib"
                    659: 
                    660: dnl
                    661: dnl Set up the include variables.
                    662: dnl
                    663: 
                    664: THOTINCLUDES="-I$API -I$VAR -I$INCL -I$FUNC -I$SCHEMAS -I$SCHEMASOPERA $JPEGINCL $PNGINCL"
                    665: APIINCLUDES=-I$API 
                    666: if test "$VPATHOPT" = "" ; then
                    667:        VPATHOPT="VPATH"
                    668: fi
                    669: 
                    670: dnl
                    671: dnl Exports the current values of the variables.
                    672: dnl
                    673: 
                    674: AC_SUBST(THOT_VER)
                    675: AC_SUBST(AMAYA_VER)
                    676: AC_SUBST(LIBWWW_VER)
                    677: AC_SUBST(KAFFE_VER)
1.6       cvs       678: AC_SUBST(CEXTRACT_VER)
                    679: AC_SUBST(CEXTRACT_FLAGS)
1.1       cvs       680: 
1.9       cvs       681: AC_SUBST(KAFFE_ENGINE)
                    682: 
1.1       cvs       683: AC_SUBST(THOTINCLUDES)
                    684: AC_SUBST(APIINCLUDES)
                    685: AC_SUBST(VPATHOPT)
                    686: 
                    687: AC_SUBST(THOT_OPTIONS)
                    688: AC_SUBST(AMAYA_OPTIONS)
                    689: AC_SUBST(PLUGIN_OPTIONS)
                    690: AC_SUBST(JAVA_OPTIONS)
                    691: AC_SUBST(ANNOTATIONS_OPTIONS)
                    692: AC_SUBST(IMGLIBS)
1.3       cvs       693: AC_SUBST(EXTRA_LIBS)
1.1       cvs       694: 
1.22      cvs       695: AC_SUBST(ILUHOME)
1.16      cvs       696: AC_SUBST(ILU_OPTIONS)
                    697: AC_SUBST(ILU_INCLUDES)
                    698: AC_SUBST(ILU_LIBRARIES)
                    699: 
1.1       cvs       700: dnl
                    701: dnl Include the option Makefile.xxx fragment for plugin and or Java options
                    702: dnl
                    703: 
                    704: if test "$with_plugin" = "yes" ; then
                    705:     AC_SUBST_FILE(plugin_frag)dnl
                    706:     plugin_frag=$srcdir/pluginlib/Makefile.plugin
                    707: else
                    708:     AC_SUBST_FILE(plugin_frag)
                    709:     plugin_frag=/dev/null
                    710: fi
                    711: 
                    712: if test "$with_java" = "yes" ; then
1.8       cvs       713:     AC_SUBST_FILE(java_frag)
1.1       cvs       714:     java_frag=$srcdir/javalib/Makefile.java
                    715:     AC_SUBST_FILE(www_frag)
                    716:     www_frag=/dev/null
1.15      cvs       717:     if test "$with_java_sources" = "yes" ; then
                    718:        AC_SUBST_FILE(javasrc_frag)
                    719:        javasrc_frag=$srcdir/javalib/Makefile.javasrc
                    720:        AC_SUBST_FILE(javanosrc_frag)
                    721:        javanosrc_frag=/dev/null
                    722:     else
                    723:        AC_SUBST_FILE(javasrc_frag)
                    724:        javasrc_frag=/dev/null
                    725:        AC_SUBST_FILE(javanosrc_frag)
                    726:        javanosrc_frag=$srcdir/javalib/Makefile.javanosrc
                    727:     fi
1.1       cvs       728: else
                    729:     java_frag=/dev/null
1.29    ! cvs       730:     javasrc_frag=/dev/null
        !           731:     javanosrc_frag=/dev/null
        !           732: 
        !           733:     if test "$with_ilu" = "yes" ; then
        !           734:        AC_SUBST_FILE(java_frag)
        !           735:        AC_SUBST_FILE(www_frag)
        !           736:        www_frag=/dev/null
        !           737:     else
        !           738:        AC_SUBST_FILE(java_frag)
        !           739:        AC_SUBST_FILE(www_frag)dnl
        !           740:        www_frag=$srcdir/amaya/Makefile.libwww
        !           741:     fi
1.16      cvs       742: fi
1.1       cvs       743: 
1.10      cvs       744: if test "$with_math" = "yes" ; then
                    745:     AC_SUBST_FILE(math_frag)
                    746:     math_frag=$srcdir/amaya/Makefile.math
1.8       cvs       747: else
1.10      cvs       748:     AC_SUBST_FILE(math_frag)
                    749:     math_frag=/dev/null
1.8       cvs       750: fi
                    751: 
1.26      cvs       752: if test "$with_graph" = "yes" ; then
                    753:     AC_SUBST_FILE(graph_frag)
                    754:     graph_frag=$srcdir/amaya/Makefile.graph
                    755: else
                    756:     AC_SUBST_FILE(graph_frag)
1.28      cvs       757:     graph_frag=$srcdir/amaya/Makefile.nograph
1.26      cvs       758: fi
                    759: 
1.16      cvs       760: if test "$with_ilu" = "yes" ; then
                    761:     AC_SUBST_FILE(ilu_frag)
                    762:     ilu_frag=$srcdir/ilulib/Makefile.ilu
                    763: else
                    764:     AC_SUBST_FILE(ilu_frag)
                    765:     ilu_frag=/dev/null
                    766: fi
                    767: 
1.1       cvs       768: dnl  ***************************************************************
                    769: dnl
                    770: dnl      FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
                    771: dnl
                    772: dnl  ***************************************************************
                    773: 
                    774: EXTRA_MAKEFILE_IN=
1.2       cvs       775: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1       cvs       776:        libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2       cvs       777:        tools/mkdep/Makefile \
1.1       cvs       778:        tools/cextract-1.7/Makefile thotlib/Makefile \
1.5       cvs       779:        thotlib/include/Makefile batch/Makefile tablelib/Makefile"
1.1       cvs       780: 
                    781: if test "$build_amaya" = "yes" ; then
1.2       cvs       782: 
1.19      cvs       783:     make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2       cvs       784:     EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.27      cvs       785: $srcdir/amaya/Makefile.libwww"
                    786: 
                    787:     if test "$$with_plugin" = "yes" ; then
                    788:        make_output="$make_output pluginlib/Makefile"
                    789:        EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.2       cvs       790: $srcdir/pluginlib/Makefile.plugin"
1.27      cvs       791:     fi
1.2       cvs       792: 
1.19      cvs       793:     if test "$with_java" = "yes" ; then
                    794:        make_output="$make_output tools/javastub/Makefile \
                    795: tools/dns_daemon/Makefile javalib/Makefile"
                    796:        EXTRA_MAKEFILE_IN="$srcdir/tools/javastub/Makefile.in \
                    797: $srcdir/tools/dns_daemon/Makefile.in \
                    798: $srcdir/javalib/Makefile.in"
                    799:     fi
1.16      cvs       800: 
1.19      cvs       801:     if test "$with_ilu" = "yes" ; then
                    802:        make_output="$make_output ilulib/Makefile tools/ilustub/Makefile"
                    803:        EXTRA_MAKEFILE_IN="$srcdir/ilulib/Makefile.in \
1.16      cvs       804: $srcdir/ilulib/Makefile.ilu \
                    805: $srcdir/tools/ilustub/Makefile.in"
1.19      cvs       806:     fi
1.1       cvs       807: fi
                    808: 
                    809: if test "$build_thot" = "yes" ; then
1.3       cvs       810: 
1.5       cvs       811:     make_output="$make_output thot/Makefile \
                    812: drawlib/Makefile indexlib/Makefile"
1.3       cvs       813:     EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
1.5       cvs       814: $srcdir/thot/Makefile.in \
                    815: $srcdir/drawlib/Makefile.in \
                    816: $srcdir/indexlib/Makefile.in"
1.3       cvs       817: 
                    818:     if test "$build_misc" = "yes" ; then
                    819: 
                    820:        make_output="$make_output misc/Makefile"
                    821:        EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    822: $srcdir/misc/Makefile.in"
                    823: 
                    824:        if test "$build_annotations" = "yes" ; then
                    825:            make_output="$make_output misc/annotations/Makefile"
                    826:            EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    827: $srcdir/misc/annotations/Makefile.in"
1.19      cvs       828:        fi
1.3       cvs       829: 
                    830:        if test "$build_util" = "yes" ; then
                    831: 
                    832:            make_output="$make_output misc/util/Makefile"
                    833:            EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    834: $srcdir/misc/util/Makefile.in"
                    835: 
                    836:            if test "$build_tableaux" = "yes" ; then
                    837: 
                    838:                make_output="$make_output misc/util/tableaux/Makefile"
                    839:                EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    840: $srcdir/misc/util/tableaux/Makefile.in"
                    841: 
                    842:            fi
                    843:            if test "$build_transform" = "yes" ; then
                    844: 
                    845:                make_output="$make_output misc/util/transform/Makefile"
                    846:                EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    847: $srcdir/misc/util/transform/Makefile.in"
                    848: 
                    849:            fi
                    850:            if test "$build_versions" = "yes" ; then
                    851: 
                    852:                make_output="$make_output misc/util/versions/Makefile"
                    853:                EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN \
                    854: $srcdir/misc/util/versions/Makefile.in"
                    855: 
                    856:            fi
                    857:        fi
                    858:     fi
1.1       cvs       859: fi
                    860: 
                    861: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6       cvs       862: AC_OUTPUT($make_output , [
                    863: dnl
                    864: dnl This fragment of shell code is executed after the
                    865: dnl Makefile(s) dump ...
                    866: dnl
                    867: 
                    868: echo timestamp > stamp-h
                    869: 
                    870: dnl
                    871: dnl Check for an upgrade in the Options numbers
                    872: dnl
                    873: 
                    874: if test -f Options ; then
                    875:    oldversion=`grep Version Options`
                    876:    newversion=`grep Version Options.orig`
                    877:    if test "$oldversion" != "$newversion" ; then
                    878:        echo WARNING : Options files have changed, old options saved to Options.old
                    879:        cp Options Options.old
                    880:        cp Options.orig Options
                    881:        exit 1
                    882:    fi
                    883: fi
                    884: ])
1.1       cvs       885: 
                    886: if test "$build_thot" = "yes" ; then
                    887:     if test "$build_amaya" = "yes" ; then
                    888:        echo Amaya and Thot packages are now configured
                    889:     else
                    890:        echo Thot package is now configured
                    891:     fi
                    892: else
                    893:     if test "$build_amaya" = "yes" ; then
                    894:        echo Amaya package is now configured
                    895:     else
                    896:        echo Nor Amaya nor Thot package found, get the corresponding archive
                    897:     fi
                    898: 
                    899: fi
                    900: 
                    901: if test "$build_amaya" = "yes" ; then
1.5       cvs       902:     if test "$with_java" = "yes" -a "$with_plugin" = "yes" ; then
                    903:         AC_MSG_WARN(Amaya configured with both Java and Plugins support)
1.16      cvs       904: dnl        AC_MSG_WARN(Beware this combination doesn't work well)
1.1       cvs       905:     else
1.5       cvs       906:        if test "$with_java" = "yes" ; then
1.9       cvs       907:            if test "$KAFFE_ENGINE" = "--with-engine=jit" ;  then
                    908:               echo Amaya configured with Java JIT support
                    909:            else
                    910:                if test "$KAFFE_ENGINE" = "--with-engine=intr" ;  then
                    911:                    echo Amaya configured with Java interpreter support
                    912:                else
                    913:                    echo Amaya configured with Java support
                    914:                fi
                    915:             fi
1.11      cvs       916:            echo Using kaffe-$KAFFE_VER Java virtual machine
1.16      cvs       917:        else if test "$with_ilu" = "no" ; then
1.5       cvs       918:            echo Amaya configured with libWWW
                    919:        fi
1.16      cvs       920:        fi
1.5       cvs       921:        if test "$with_plugin" = "yes" ; then
                    922:            echo Amaya configured with Plugins support
                    923:        fi
1.8       cvs       924:     fi
1.10      cvs       925:     if test "$with_math" = "yes" ; then
                    926:        echo Amaya configured with Math support
1.26      cvs       927:     fi
                    928:     if test "$with_graph" = "yes" ; then
                    929:        echo Amaya configured with Graph support
1.16      cvs       930:     fi
                    931:     if test "$with_ilu" = "yes" ; then
                    932:        echo Amaya configured with ILU support
1.1       cvs       933:     fi
1.5       cvs       934: fi
                    935: 
                    936: if test "$no_motif" = yes ; then
                    937:     echo "Motif seems not installed on this machine"
                    938:     echo "Thot and Amaya need Motif 1.2 or 2.0"
                    939:     echo "Thot and Amaya probably won't compile"
                    940: else
                    941: if test "$motif_includes" = "" ; then
                    942:     echo "Motif includes were not found"
                    943:     echo "Thot and Amaya might not compile"
                    944:     echo "Edit your Option file"
                    945: else
                    946: if test "$motif_libraries" = "" ; then
                    947:     echo "Motif libraries were not found"
                    948:     echo "Thot and Amaya might not compile"
                    949:     echo "Edit your Option file"
                    950: fi
                    951: fi
1.1       cvs       952: fi
                    953: 
                    954: echo "Now start \"make all\" (GNU make preferably) to build the binaries"
1.5       cvs       955: 

Webmaster