Annotation of Amaya/configure.in, revision 1.38

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

Webmaster