Annotation of Amaya/configure.in, revision 1.49

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

Webmaster