Annotation of Amaya/configure.in, revision 1.68

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

Webmaster