Annotation of Amaya/configure.in, revision 1.116

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: 
1.114     kahan      13: AC_PREREQ(2.53)
1.1       cvs        14: AC_INIT(thotlib/internals/h/constpiv.h)
                     15: AC_REVISION
                     16: 
                     17: dnl
1.69      kahan      18: dnl Verify that configure is not being called in the Amaya directory
                     19: dnl
                     20: if test -d batch -a -f configure.in ; then
1.70      kahan      21:    echo 
                     22:    echo "****************************************************************"
1.69      kahan      23:    echo ERROR: You must invoke the configure script in a subidrectory
                     24:    echo under the Amaya tree.
                     25:    echo For example:
                     26:    echo "  cd Amaya ; mkdir obj ; cd obj ; ../configure [your options] "
1.70      kahan      27:    echo "****************************************************************"
                     28:    echo 
1.69      kahan      29:    exit 1
                     30: fi
                     31: 
                     32: dnl
1.1       cvs        33: dnl Checks for platform information
                     34: dnl
                     35: 
                     36: AC_CANONICAL_SYSTEM
                     37: AC_CONFIG_HEADER(config.h)
                     38: 
                     39: dnl
                     40: dnl Initializing Automake
                     41: dnl
                     42: 
                     43: AC_PROG_MAKE_SET
                     44: AC_ARG_PROGRAM
                     45: 
                     46: dnl
                     47: dnl Checks for programs.
                     48: dnl
                     49: 
                     50: AC_PROG_YACC
                     51: AC_PROG_CC
                     52: AC_PROG_CPP
                     53: AC_PROG_LEX
                     54: AC_PROG_AWK
                     55: AC_PROG_INSTALL
                     56: AC_PROG_LN_S
                     57: AC_PROG_MAKE_SET
                     58: AC_PROG_RANLIB
                     59: AC_PATH_PROG(CP, cp, /bin/cp, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     60: AC_PATH_PROG(MV, mv, /bin/mv, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     61: AC_PATH_PROG(RM, rm, /bin/rm, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     62: AC_PATH_PROG(MKDIR, mkdir, /bin/mkdir, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     63: AC_PATH_PROG(ECHO, echo, /bin/echo, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     64: AC_PATH_PROG(CAT, cat, /bin/cat, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     65: AC_PATH_PROG(CHMOD, chmod, /bin/chmod, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     66: AC_PATH_PROG(SED, sed, /bin/sed, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     67: AC_PATH_PROG(AR, ar, /usr/bin/ar, $PATH:/bin:/usr/bin:/usr/ucb/bin)
1.6       cvs        68: AC_PATH_PROG(DIFF, diff, /usr/bin/diff, $PATH:/bin:/usr/bin:/usr/ucb/bin)
1.1       cvs        69: 
                     70: dnl
                     71: dnl Checks for libraries.
                     72: dnl
                     73: 
                     74: AC_CHECK_LIB(socket, socket, )
                     75: AC_CHECK_LIB(inet, connect)
                     76: AC_CHECK_LIB(nsl, t_accept)
                     77: AC_CHECK_LIB(dl, dlopen)
                     78: AC_PATH_X
                     79: AC_PATH_XTRA
                     80: 
1.41      cvs        81: dnl
                     82: dnl Check for libXp
                     83: dnl
1.38      cvs        84: 
1.41      cvs        85: for ac_dir in               \
                     86:   /usr/X11R6/lib        \
                     87:   /usr/X11R5/lib        \
                     88:                             \
                     89:   /usr/lib/X11R6        \
                     90:   /usr/lib/X11R5        \
                     91:                             \
                     92:   /usr/local/X11R6/lib  \
                     93:   /usr/local/X11R5/lib  \
                     94:                             \
                     95:   /usr/local/lib/X11R6  \
                     96:   /usr/local/lib/X11R5  \
                     97:                             \
                     98:   /usr/X11/lib          \
                     99:   /usr/lib/X11          \
                    100:   /usr/local/X11/lib    \
                    101:   /usr/local/lib/X11    \
                    102:                             \
                    103:   /usr/X386/lib         \
                    104:   /usr/x386/lib         \
                    105:   /usr/XFree86/lib/X11  \
                    106:                             \
                    107:   /usr/dt/lib           \
                    108:                             \
                    109:   /usr/lib              \
                    110:   /usr/local/lib        \
                    111:   /usr/unsupported/lib  \
                    112:   /usr/athena/lib       \
                    113:   /usr/local/x11r5/lib  \
                    114:   /usr/lpp/Xamples/lib  \
                    115:                             \
                    116:   /usr/lesstif/lib      \
                    117:   /usr/local/lesstif/lib\
                    118:   /usr/gnu/lesstif/lib  \
                    119:   $HOME/lesstif/lib     \
                    120:   ; \
                    121: do
                    122:   if test -r "$ac_dir/libXp.a" -o -r "$ac_dir/libXp.so"; then
                    123:      echo "\nfound libXp.a\n"
                    124:      X_PRE_LIBS="-lXp ${X_PRE_LIBS}"
                    125:      break
                    126:   fi
                    127: done
1.1       cvs       128: dnl
1.5       cvs       129: dnl Checks for header files.
                    130: dnl
                    131: 
                    132: AC_HEADER_DIRENT
                    133: AC_HEADER_STDC
                    134: AC_HEADER_SYS_WAIT
                    135: 
                    136: AC_CHECK_HEADERS(stdio.h)
                    137: AC_CHECK_HEADERS(sys/types.h types.h)
                    138: AC_CHECK_HEADERS(sys/unistd.h unistd.h)
                    139: AC_CHECK_HEADERS(sys/fcntl.h fcntl.h)
                    140: AC_CHECK_HEADERS(sys/limits.h limits.h)
                    141: AC_CHECK_HEADERS(sys/stat.h stat.h)
                    142: AC_CHECK_HEADERS(sys/file.h)
                    143: AC_CHECK_HEADERS(sys/ioctl.h)
                    144: AC_CHECK_HEADERS(sys/time.h time.h)
                    145: AC_CHECK_HEADERS(sys/systeminfo.h)
1.46      cvs       146: AC_CHECK_HEADERS(sys/string.h strings.h)
1.34      cvs       147: AC_CHECK_HEADERS(sys/syslog.h syslog.h)
1.5       cvs       148: AC_CHECK_HEADERS(sys/socket.h socket.h)
                    149: AC_CHECK_HEADERS(appkit/appkit.h appkit.h)
1.72      vatton    150: AC_CHECK_HEADERS(apppkit/apppkit.h apppkit.h)
1.5       cvs       151: AC_CHECK_HEADERS(netinet/in.h in.h)
                    152: AC_CHECK_HEADERS(dn.h)
                    153: AC_CHECK_HEADERS(sys/ipc.h)
                    154: AC_CHECK_HEADERS(net/errno.h sys/errno.h errno.h)
                    155: AC_CHECK_HEADERS(pwd.h)
                    156: AC_CHECK_HEADERS(grp.h)
                    157: AC_CHECK_HEADERS(arpa/inet.h inet.h)
                    158: AC_CHECK_HEADERS(netdb.h)
                    159: AC_CHECK_HEADERS(manifest.h)
                    160: AC_CHECK_HEADERS(bsdtypes.h)
                    161: AC_CHECK_HEADERS(stdefs.h)
                    162: AC_CHECK_HEADERS(bsdtime.h)
                    163: AC_CHECK_HEADERS(sys/select.h select.h)
                    164: AC_CHECK_HEADERS(dnetdb.h)
                    165: AC_CHECK_HEADERS(libc.h)
                    166: AC_CHECK_HEADERS(stdlib.h)
                    167: AC_CHECK_HEADERS(malloc.h)
                    168: AC_CHECK_HEADERS(memory.h)
                    169: AC_CHECK_HEADERS(unixlib.h)
                    170: AC_CHECK_HEADERS(ctype.h)
                    171: AC_CHECK_HEADERS(cursesX.h curses.h)
                    172: AC_CHECK_HEADERS(sys/resource.h resource.h)
                    173: AC_HEADER_DIRENT
                    174: AC_CHECK_HEADERS(dir.h direct.h) dnl AC_HEADER_DIRENT only checks for some..
                    175: AC_HEADER_STDC
                    176: AC_HEADER_SYS_WAIT
                    177: AC_HEADER_TIME
                    178: AC_HEADER_STAT
1.103     kahan     179: AC_CHECK_HEADERS(stdint.h)
1.5       cvs       180: 
                    181: dnl
                    182: dnl Checks for typedefs, structures, and compiler characteristics.
                    183: dnl
                    184: 
                    185: AC_C_CONST
                    186: AC_C_INLINE
                    187: AC_TYPE_MODE_T
                    188: AC_TYPE_OFF_T
                    189: AC_TYPE_SIZE_T
                    190: AC_HEADER_TIME
                    191: AC_STRUCT_TM
                    192: AC_STRUCT_TIMEZONE
                    193: AC_TYPE_UID_T
                    194: 
                    195: dnl
                    196: dnl Checks for library functions.
                    197: dnl
                    198: 
                    199: AC_FUNC_ALLOCA
                    200: AC_TYPE_GETGROUPS
                    201: AC_PROG_GCC_TRADITIONAL
                    202: AC_FUNC_MEMCMP
                    203: AC_FUNC_MMAP
                    204: AC_TYPE_SIGNAL
                    205: AC_FUNC_VPRINTF
1.58      cvs       206: 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       207: 
1.75      cheyroul  208: 
1.85      vatton    209: 
                    210: AC_ARG_WITH(GL,              [  --with-gl               enable Opengl canvas (experimental) ])
                    211: dnl
                    212: dnl GL canvas is disabled by default
                    213: dnl
                    214: dnl needs Opengl, glu, Xft (xfree 4 font server)
                    215: dnl needs GTK
                    216: dnl text WILL need freetype2, ftgl
                    217: dnl GL is for opengl
                    218: dnl Glu is for text drawing (until we switch) 
                    219: dnl GLU is for tesselation algortihms (until we extract it from this lib)
                    220: dnl (tesselation is used for polygons with holes in it...)
                    221: dnl gtkgl is for integration of opengl in GTK
                    222: if test "$with_gl" = "" ; then
                    223:  if test "$enable_gl" = "yes" ; then
                    224:     with_gl="yes"
                    225:   else
                    226:     with_gl="no"
                    227:   fi
                    228: fi  
                    229: 
1.63      vatton    230: GTK_OPTIONS=
1.95      vatton    231: AC_ARG_WITH(gtk, [  --without-gtk              use Motif instead of GTK])
                    232: if test "$withval" = "no" ; then
1.85      vatton    233:   if test "$with_gl" = "yes" ; then
                    234:     with_gtk="yes"
1.95      vatton    235:   else
                    236:     with_gtk="no"
1.85      vatton    237:   fi
1.95      vatton    238: else
                    239:   with_gtk="yes"
1.85      vatton    240: fi
                    241: 
                    242: if test "$with_gtk" = "yes" ; then
1.63      vatton    243:   for ac_dir in               \
1.65      cvs       244:     /usr/lib/glib/include     \
1.63      vatton    245:     /usr/X11R6/include        \
                    246:                               \
                    247:     /usr/include/X11R6        \
                    248:     /usr/local/X11R6/include  \
                    249:     /usr/local/include/X11R6  \
                    250:                               \
                    251:     /usr/X11/include          \
                    252:     /usr/include/X11          \
                    253:     /usr/local/X11/include    \
                    254:     /usr/local/include/X11    \
                    255:                               \
                    256:     /usr/X386/include         \
                    257:     /usr/x386/include         \
                    258:     /usr/XFree86/include/X11  \
                    259:     /usr/dt/include           \
                    260:     /usr/include              \
                    261:     /usr/local/include        \
                    262:     /usr/local/lib/glib/include  \
                    263:     ; \
                    264:   do
                    265:     if test -r "$ac_dir/gdk/gdk.h"; then
                    266:       no_gtk= ac_gtk_includes=$ac_dir
                    267:       break
                    268:     fi
                    269:   done
                    270: 
1.65      cvs       271: GTK_INCLUDES="`gtk-config --cflags`"
1.63      vatton    272: AC_SUBST(GTK_INCLUDES)
1.106     kahan     273: GTK_LIBRARIES="`gtk-config --libs`"
                    274: dnl GL doesn't need the imlib
                    275: if test "${with_gl}" != "yes" ; then
                    276:  GTK_LIBRARIES="${GTK_LIBRARIES} -lgdk_imlib"
                    277: fi
                    278: 
1.63      vatton    279: AC_SUBST(GTK_LIBRARIES)
1.100     cheyroul  280: GTK_OPTIONS="-D_GTK -D_SVGANIM -D_SVGLIB"
1.63      vatton    281:   no_motif=yes
1.76      vatton    282:   no_graphic=yes
1.63      vatton    283: else
1.5       cvs       284: dnl
1.4       cvs       285: dnl Checking for Motif libraries and includes
                    286: dnl
                    287: dnl Borrowed from Lesstif configure.in
                    288: dnl Lesstif is a Great Project (TM)
                    289: dnl
                    290: 
                    291: AC_DEFUN(AC_PATH_MOTIF_DIRECT,
                    292: [test -z "$motif_direct_test_library" && motif_direct_test_library=Xm
                    293: test -z "$motif_direct_test_function" && motif_direct_test_function=XmCreatePushButton
                    294: test -z "$motif_direct_test_include" && motif_direct_test_include=Xm/Xm.h
                    295:   for ac_dir in               \
                    296:     /usr/include/Motif1.2     \
                    297:     /usr/Motif1.2/include     \
1.71      vatton    298:     /sw/Lesstif/Motif2.0/include \
1.4       cvs       299:                               \
                    300:     /usr/motif/include        \
                    301:                               \
                    302:     /usr/X11R6/include        \
                    303:     /usr/X11R5/include        \
                    304:                               \
                    305:     /usr/include/X11R6        \
                    306:     /usr/include/X11R5        \
                    307:                               \
                    308:     /usr/local/X11R6/include  \
                    309:     /usr/local/X11R5/include  \
                    310:                               \
                    311:     /usr/local/include/X11R6  \
                    312:     /usr/local/include/X11R5  \
                    313:                               \
                    314:     /usr/X11/include          \
                    315:     /usr/include/X11          \
                    316:     /usr/local/X11/include    \
                    317:     /usr/local/include/X11    \
                    318:                               \
                    319:     /usr/X386/include         \
                    320:     /usr/x386/include         \
                    321:     /usr/XFree86/include/X11  \
                    322:                               \
                    323:     /usr/dt/include           \
                    324:                               \
                    325:     /usr/include              \
                    326:     /usr/local/include        \
                    327:     /usr/unsupported/include  \
                    328:     /usr/athena/include       \
                    329:     /usr/local/x11r5/include  \
                    330:     /usr/lpp/Xamples/include  \
1.14      cvs       331:                               \
                    332:     /usr/lesstif/include      \
                    333:     /usr/local/lesstif/include\
                    334:     /usr/gnu/lesstif/include  \
                    335:     $HOME/lesstif/include     \
1.4       cvs       336:     ; \
                    337:   do
                    338:     if test -r "$ac_dir/$motif_direct_test_include"; then
                    339:       no_motif= ac_motif_includes=$ac_dir
                    340:       break
                    341:     fi
                    342:   done
                    343: 
                    344: # Check for the libraries.
                    345: # See if we find them without any special options.
                    346: # Don't add to $LIBS permanently.
                    347: ac_save_LIBS="$LIBS"
                    348: LIBS="-l$motif_direct_test_library $LIBS"
                    349: # First see if replacing the include by lib works.
                    350: for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \
                    351:     /usr/lib/Motif1.2     \
                    352:     /usr/Motif1.2/lib     \
1.71      vatton    353:     /sw/Lesstif/Motif2.0/lib \
1.4       cvs       354:                           \
                    355:     /usr/motif/lib        \
                    356:                           \
                    357:     /usr/X11R6/lib        \
                    358:     /usr/X11R5/lib        \
                    359:                           \
                    360:     /usr/lib/X11R6        \
                    361:     /usr/lib/X11R5        \
                    362:                           \
                    363:     /usr/local/X11R6/lib  \
                    364:     /usr/local/X11R5/lib  \
                    365:                           \
                    366:     /usr/local/lib/X11R6  \
                    367:     /usr/local/lib/X11R5  \
                    368:                           \
                    369:     /usr/X11/lib          \
                    370:     /usr/lib/X11          \
                    371:     /usr/local/X11/lib    \
                    372:                           \
                    373:     /usr/X386/lib         \
                    374:     /usr/x386/lib         \
                    375:     /usr/XFree86/lib/X11  \
                    376:                           \
                    377:     /usr/lib              \
                    378:     /usr/local/lib        \
                    379:     /usr/unsupported/lib  \
                    380:     /usr/athena/lib       \
                    381:     /usr/local/x11r5/lib  \
                    382:     /usr/lpp/Xamples/lib  \
1.14      cvs       383:                           \
                    384:     /usr/lesstif/lib      \
                    385:     /usr/local/lesstif/lib\
                    386:     /usr/gnu/lesstif/lib  \
                    387:     $HOME/lesstif/lib     \
1.4       cvs       388:     ; \
                    389: do
1.71      vatton    390:   for ac_extension in a so sl la; do
1.4       cvs       391:     if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then
                    392:       no_motif= ac_motif_libraries=$ac_dir
                    393:       break 2
                    394:     fi
                    395:   done
1.5       cvs       396: done
                    397: LIBS="$ac_save_LIBS"
                    398: ])
1.4       cvs       399: 
                    400: AC_DEFUN(AC_PATH_MOTIF,
1.66      vatton    401: [AC_REQUIRE_CPP()
1.4       cvs       402: 
                    403: motif_includes=NONE
                    404: motif_libraries=NONE
                    405: 
                    406: AC_MSG_CHECKING(for Motif)
1.63      vatton    407: if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then
                    408:     no_motif=
1.4       cvs       409: else
                    410: AC_CACHE_VAL(ac_cv_path_motif,
                    411: [# One or both of these vars are not set, and there is no cached value.
1.63      vatton    412:   no_motif=yes
1.4       cvs       413: AC_PATH_MOTIF_DIRECT
                    414: 
                    415: if test "$no_motif" = yes; then
1.63      vatton    416:     ac_cv_path_motif="no_motif=yes"
1.4       cvs       417: else
1.63      vatton    418:     ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries"
1.66      vatton    419: fi])
                    420: eval "$ac_cv_path_motif"
1.63      vatton    421: fi
1.4       cvs       422: 
                    423: if test "$no_motif" = yes; then
                    424:   AC_MSG_RESULT(no)
1.5       cvs       425:   MOTIF_INCLUDES=
                    426:   MOTIF_LIBRARIES=
1.4       cvs       427: else
                    428:   test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes
                    429:   test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries
                    430:   ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries"
                    431:   AC_MSG_RESULT([libraries $motif_libraries, headers $motif_includes])
1.5       cvs       432:   if test "$motif_includes" != "/usr/include" ; then
                    433:     MOTIF_INCLUDES="-I$motif_includes"
                    434:   fi
                    435:   if test "$motif_libraries" != "/usr/lib" ; then
1.64      cvs       436:     MOTIF_LIBRARIES="-L$motif_libraries -lXm"
1.19      cvs       437:     case "${host}" in
                    438:         *-*sun-solaris* )
                    439:          MOTIF_LIBRARIES="${MOTIF_LIBRARIES} -R$motif_libraries"
                    440:         ;;
1.65      cvs       441:     esac
                    442:   else
                    443:   MOTIF_LIBRARIES="-lXm"
1.5       cvs       444:   fi
1.4       cvs       445: fi
1.5       cvs       446: AC_SUBST(MOTIF_INCLUDES)
                    447: AC_SUBST(MOTIF_LIBRARIES)
1.4       cvs       448: ])
                    449: 
                    450: AC_PATH_MOTIF
1.66      vatton    451: fi
1.4       cvs       452: 
1.63      vatton    453: if test "${GCC}" = "yes"; then
                    454:    CPP="${CPP} -x c"
                    455: fi
                    456: 
1.1       cvs       457: dnl  ***************************************************************
                    458: dnl
1.61      cvs       459: dnl    SPECIFIC STUFF : CONFIGURATION OPTIONS FOR AMAYA
1.1       cvs       460: dnl
                    461: dnl  ***************************************************************
                    462: 
1.101     kahan     463: # We don't use our graphic libraries for the pure GTK version (without GL)
                    464: 
1.108     kahan     465: dnl echo "with gtk is ${with_gtk}, with gl is ${with_gl}\n"
1.101     kahan     466: 
                    467: if test "${with_gtk}" != "yes" -o "${with_gl}" = "yes" ; then
1.105     vatton    468:   AC_ARG_WITH(graphic-libs, [  --with-graphic-libs    use static libjpeg, libpng.])
1.101     kahan     469:   if test "$withval" = "no" ; then
                    470:     no_graphic=yes
                    471:   fi
                    472:   if test "$withval" = "yes" ; then
                    473:     no_graphic=no
                    474:   fi
1.76      vatton    475: fi
                    476: 
                    477: if test "$no_graphic" = yes; then
                    478: dnl
                    479:     AC_MSG_CHECKING([for libjpeg version = 6b])
                    480:     AC_EGREP_CPP([x 62 *x],
                    481:         [#include <jpeglib.h>
                    482:          x JPEG_LIB_VERSION x],
                    483: dnl
                    484:         AC_MSG_RESULT([yes])
1.105     vatton    485:        JPEGINCL=''
1.76      vatton    486:         LIBJPEG='-ljpeg'
                    487:         MAKEJPEG=['#'],
                    488: dnl
                    489:         AC_MSG_RESULT([no])
1.105     vatton    490:        JPEGINCL='-I$(THOTDIR)/libjpeg'
1.76      vatton    491:         LIBJPEG='../libjpeg.a'      dnl LIBJPEG goes into amaya/Makefile.in
                    492:         )
                    493: dnl    
                    494: dnl
1.95      vatton    495:     AC_MSG_CHECKING([for libpng version = 1.0.x or 1.2.x])
                    496:     AC_EGREP_CPP([x \"1.[02]\..*\" *x],
1.76      vatton    497:         [#include <png.h>
                    498:        x PNG_LIBPNG_VER_STRING x],
                    499: dnl
                    500:         AC_MSG_RESULT([yes])
1.105     vatton    501:        PNGINCL=''
1.76      vatton    502:         LIBPNG='-lpng'
                    503:         LIBZ=''
                    504:        MAKEPNG=['#'],
                    505: dnl
                    506:         AC_MSG_RESULT([no])
1.105     vatton    507:        PNGINCL='-I$(THOTDIR)/libpng -I$(THOTDIR)/libpng/zlib'
1.76      vatton    508:         LIBPNG='../libpng.a'
                    509:         LIBZ='../libz.a'
                    510:         )
                    511: else
1.105     vatton    512:     JPEGINCL='-I$(THOTDIR)/libjpeg'
1.76      vatton    513:     LIBJPEG='../libjpeg.a'
1.105     vatton    514:     PNGINCL='-I$(THOTDIR)/libpng -I$(THOTDIR)/libpng/zlib'
1.76      vatton    515:     LIBPNG='../libpng.a'
                    516:     LIBZ='../libz.a'
                    517: fi
                    518: dnl
                    519: AC_SUBST(LIBJPEG)
                    520: AC_SUBST(LIBPNG)
                    521: AC_SUBST(LIBZ)
                    522: AC_SUBST(MAKEJPEG)
                    523: AC_SUBST(MAKEPNG)
                    524: 
1.105     vatton    525: AMAYA_VER="7.0"
1.1       cvs       526: 
                    527: dnl
1.6       cvs       528: dnl We use a special versoin of cextract patched for alignment
                    529: dnl to build the signatures of the modules functions located in f subdirs
                    530: dnl
                    531: CEXTRACT_VER="1.7"
                    532: CEXTRACT_FLAGS="+O"
                    533: 
1.3       cvs       534: 
                    535: dnl
1.9       cvs       536: dnl Adjust the some variables depending on the host and compiler
1.61      cvs       537: dnl Thotlib NEED signed chars !!!
1.7       cvs       538: dnl
                    539: 
                    540: if test "${CC}" = "gcc" ; then
1.44      cvs       541:   CFLAGS="${CFLAGS} -W "
1.7       cvs       542:   case "${host}" in
                    543:       *-*-irix5* | *-*irix6* )
                    544:          CFLAGS="${CFLAGS} -fsigned-char"
                    545:       ;;
                    546:   esac
1.14      cvs       547: fi
                    548: 
                    549: if test "$ac_cv_c_const" = "no" ; then
                    550:   CFLAGS="${CFLAGS} -DCONST= "
1.7       cvs       551: fi
                    552: 
                    553: dnl
1.61      cvs       554: dnl Check for availability of amaya sources
1.1       cvs       555: dnl
                    556: 
                    557: build_amaya="yes"
                    558: 
                    559: if test "$with_amaya" = "no" ; then
                    560:     build_amaya="no"
1.45      cvs       561: else
                    562:   if test ! -f $srcdir/amaya/Makefile.in ; then
1.1       cvs       563:     AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
                    564:     build_amaya="no"
1.45      cvs       565:   fi
1.1       cvs       566: fi
                    567: 
                    568: dnl
1.50      cvs       569: dnl Check for additionnal packages
1.1       cvs       570: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
                    571: dnl
1.93      kahan     572: 
1.82      vatton    573: AC_ARG_WITH(i18n,            [  --without-i18n          disable internationalization support ])
1.76      vatton    574: dnl
                    575: dnl I18N support disabled by default
                    576: dnl
1.77      kahan     577: 
                    578: if test "$with_i18n" = "" ; then
1.82      vatton    579:   if test "$enable_i18n" = "no" ; then
                    580:     with_i18n="no"
                    581:   else
1.77      kahan     582:     with_i18n="yes"
                    583:   fi
                    584: 
                    585: fi  
1.76      vatton    586: if test "$with_i18n" = "yes" ; then
                    587:    I18N_OPTIONS=-D_I18N_
                    588: else
                    589:    with_i18n="no"
                    590:    I18N_OPTIONS=""
                    591: fi
1.1       cvs       592: 
1.75      cheyroul  593: if test "$with_gl" = "yes" ; then
                    594:        AC_MSG_CHECKING([OpenGL])
                    595:        for ac_dir in                           \
                    596:                /usr/include                    \
                    597:                /usr/X11R6/include              \
                    598:                /usr/local/include              \
                    599:                ; \
1.80      cheyroul  600:        do  if test -r "$ac_dir/GL/gl.h" ; then
1.75      cheyroul  601:                 gl_inc="yes"
1.80      cheyroul  602:                GL_INC_I="$ac_dir"
                    603:                if test "$ac_dir" != "/usr/include" ; then
                    604:                   GL_INCLUDES="-I$ac_dir"
                    605:                fi
1.96      cheyroul  606:                AC_MSG_RESULT([yes])
1.75      cheyroul  607:                        break   
                    608:            fi
1.80      cheyroul  609:        done    
                    610:        AC_MSG_CHECKING([GLU])  
1.75      cheyroul  611:        for ac_dir in                           \
                    612:                /usr/include/GL                 \
                    613:                /usr/include                    \
                    614:                /usr/X11R6/include/GL           \
                    615:                /usr/X11R6/include              \
                    616:                /usr/local/include              \
                    617:                /usr/local/include/GL           \
                    618:                ; \
                    619:        do  if test -r "$ac_dir/glu.h" ; then
                    620:                 glu_inc="yes"
1.80      cheyroul  621:                GL_INC_II="$ac_dir"
                    622:                if test "$ac_dir" != "/usr/include" ; then
                    623:                        if test "$ac_dir" != "$GL_INC_I" ; then
                    624:                            GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
                    625:                        fi
                    626:                fi
1.96      cheyroul  627:                AC_MSG_RESULT([yes])
1.75      cheyroul  628:                        break   
                    629:            fi
                    630:        done    
1.80      cheyroul  631:        AC_MSG_CHECKING([GTKGLAREA])    
1.75      cheyroul  632:        for ac_dir in                           \
                    633:                /usr/include/GL                 \
                    634:                /usr/include                    \
                    635:                /usr/X11R6/include/GL           \
                    636:                /usr/X11R6/include              \
                    637:                /usr/local/include              \
                    638:                /usr/local/include/GL           \
                    639:                ; \
                    640:        do  if test -r "$ac_dir/gtkgl/gtkglarea.h" ; then
                    641:                 gtkgl_inc="yes"
1.80      cheyroul  642:                if test "$ac_dir" != "/usr/include" ; then
                    643:                        if test "$ac_dir" != "$GL_INC_II" ; then
                    644:                                if test "$ac_dir" != "$GL_INC_I" ; then
                    645:                                        GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
                    646:                                fi
                    647:                        fi
                    648:                fi
1.96      cheyroul  649:                AC_MSG_RESULT([yes])
1.75      cheyroul  650:                        break   
                    651:            fi
                    652:        done    
1.80      cheyroul  653:        AC_MSG_CHECKING([freetype])     
                    654:        for ac_dir in                           \
                    655:                /usr/include                    \
                    656:                /usr/X11R6/include              \
                    657:                /usr/local/include              \
                    658:                ; \
                    659:        do  if test -r "$ac_dir/ft2build.h" ; then
                    660:                 freetype_inc="yes"
                    661:                GL_INCLUDES="$GL_INCLUDES `freetype-config --cflags`"
1.96      cheyroul  662:                        AC_MSG_RESULT([yes])    
                    663:                break   
                    664:            fi
                    665:        done    
1.104     cheyroul  666:         AC_MSG_CHECKING([Xft]) 
                    667:        for ac_dir in                           \
                    668:                /usr/include                    \
                    669:                /usr/X11R6/include              \
                    670:                /usr/local/include              \
                    671:                /usr/include/X11/Xft            \
                    672:                /usr/X11R6/include/X11/Xft      \
                    673:                /usr/local/include/X11/Xft      \
                    674:                /usr/include/X11/Xft1           \
                    675:                /usr/X11R6/include/X11/Xft1     \
1.113     vatton    676:                /usr/include/Xft2/X11/Xft/      \
1.104     cheyroul  677:                /usr/local/include/X11/Xft1     \
                    678:                /usr/include/X11/Xft2           \
                    679:                /usr/X11R6/include/X11/Xft2     \
                    680:                /usr/local/include/X11/Xft2     \
                    681:                ; \
                    682:        do  if test -r "$ac_dir/Xft.h" ; then
                    683:                 xft_inc="yes"
                    684:                GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
                    685:                        AC_MSG_RESULT([yes])    
                    686:                break   
                    687:            fi
                    688:        done    
1.96      cheyroul  689:        AC_MSG_CHECKING([gcc3]) 
                    690:        for ac_dir in                           \
                    691:                /usr/lib                        \
                    692:                /usr/X11R6/lib          \
                    693:                /usr/local/lib          \
                    694:                ; \
                    695:        do  if test -r "$ac_dir/libstdc++.so.5" ; then
                    696:                 stdglu_inc="yes"
                    697:                        AC_MSG_RESULT([yes])    
                    698:                break
1.80      cheyroul  699:            fi
1.96      cheyroul  700:        done
                    701:        if test "$gl_inc" = "" ; then           
1.75      cheyroul  702:                AC_MSG_WARN(Opengl headers (gl.h) not found !!)
                    703:                AC_MSG_WARN(Disabling opengl build !)
                    704:                with_gl="no"
                    705:                GL_OPTIONS=     
                    706:                GL_INCLUDES=    
                    707:                GL_LIBRARIES=
1.81      cheyroul  708:                exit 1;
1.75      cheyroul  709:        fi
                    710:        if test "$glu_inc" = "" ; then
                    711:                AC_MSG_WARN(Glu headers (glu.h) not found !!)
                    712:                AC_MSG_WARN(Disabling opengl build !)
1.81      cheyroul  713:        
1.75      cheyroul  714:                with_gl="no"
                    715:                GL_OPTIONS=     
                    716:                GL_INCLUDES=    
                    717:                GL_LIBRARIES=
1.81      cheyroul  718:                exit 1;
1.75      cheyroul  719:        fi
                    720:        if test "$gtkgl_inc" = "" ; then
                    721:                AC_MSG_WARN(Gtkglarea headers (gktglarea.h) not found !!)
                    722:                AC_MSG_WARN(Disabling opengl build !)
                    723:                with_gl="no"
                    724:                GL_OPTIONS=     
                    725:                GL_INCLUDES=    
                    726:                GL_LIBRARIES=
1.81      cheyroul  727:                exit 1;
1.75      cheyroul  728:        fi
1.80      cheyroul  729:        if test "$freetype_inc" = "" ; then
                    730:                AC_MSG_WARN(Freetype 2 headers (ft2build.h) not found !!)
                    731:                AC_MSG_WARN(Disabling opengl build !)
                    732:                with_gl="no"
                    733:                GL_OPTIONS=     
                    734:                GL_INCLUDES=
                    735:                GL_LIBRARIES=
1.81      cheyroul  736:                exit 1;
1.80      cheyroul  737:        fi
1.104     cheyroul  738:        if test "$xft_inc" = "" ; then
                    739:                AC_MSG_WARN(Xft 2 headers (Xft.h) not found !!)
                    740:                AC_MSG_WARN(Disabling opengl build !)
                    741:                with_gl="no"
                    742:                GL_OPTIONS=     
                    743:                GL_INCLUDES=
                    744:                GL_LIBRARIES=
                    745:                exit 1;
                    746:        fi
1.75      cheyroul  747:        if test "$gl_inc" = "yes" ; then
1.79      cheyroul  748:                if test "$glu_inc" = "yes" ; then
                    749:                        if test "$gtkgl_inc" = "yes" ; then
1.96      cheyroul  750:                            if test "$freetype_inc" = "yes" ; then
1.104     cheyroul  751:                                if test "$xft_inc" = "yes" ; then
                    752:                                        if test "$stdglu_inc" = "yes" ; then
1.113     vatton    753:                                           GL_LIBRARIES="-L/usr/lib -L/usr/X11R6/lib  -lXmu -lXft -lfreetype -lGL -lGLU -lgtkgl -lstdc++"
1.104     cheyroul  754:                                        else
1.113     vatton    755:                                           GL_LIBRARIES="-L/usr/lib -L/usr/X11R6/lib  -lXmu -lXft -lfreetype -lGL -lGLU -lgtkgl"
1.104     cheyroul  756:                                        fi                              
                    757:                                        GL_OPTIONS="-D_GL"
                    758:                                        no_motif=yes
                    759:                                fi
1.80      cheyroul  760:                            fi
1.75      cheyroul  761:                        fi
                    762:                fi
                    763:        fi
                    764: AC_SUBST(GL_INCLUDES)
                    765: AC_SUBST(GL_LIBRARIES)
1.115     cheyroul  766: dnl PRINTIFNOTGL=" "
                    767: dnl #NOPRINT="#"
                    768: NOPRINT=""
                    769: PRINTIFNOTGL=" print_prog"
1.97      cheyroul  770: else
1.112     cheyroul  771: NOPRINT=""
1.97      cheyroul  772: PRINTIFNOTGL=" print_prog"
1.75      cheyroul  773: fi
1.97      cheyroul  774: AC_SUBST(PRINTIFNOTGL)
1.112     cheyroul  775: AC_SUBST(NOPRINT)
                    776: 
1.76      vatton    777: 
                    778: AC_ARG_ENABLE(svg,           [  --disable-svg           remove SVG support ])
                    779: AC_ARG_ENABLE(annot,         [  --disable-annot         remove Annotations support ])
1.93      kahan     780: AC_ARG_ENABLE(raptor,        [  --disable-raptor        disable the raptor RDF parser ])
1.116   ! kahan     781: AC_ARG_ENABLE(redland,       [  --enable-redland        enable the redland RDF library ])
        !           782: AC_ARG_ENABLE(system-redland,       [  --enable-system-redland try the redland RDF system library ])
1.108     kahan     783: AC_ARG_ENABLE(bookmarks,     [  --enable-bookmarks      enables experimental bookmark support ])
1.76      vatton    784: AC_ARG_ENABLE(generic-xml,   [  --disable-generic-xml   remove Generic XML support ])
                    785: 
1.75      cheyroul  786: dnl
1.21      cvs       787: dnl plugins support is disabled by default
1.8       cvs       788: dnl
1.13      cvs       789: 
                    790: if test "$with_plugin" = "" ; then
1.21      cvs       791:   if test "$enable_plugin" = "yes" ; then
1.55      kahan     792:     with_plugin="yes"
1.21      cvs       793:   else
1.17      cvs       794:     with_plugin="no"
                    795:   fi
1.10      cvs       796: fi  
1.1       cvs       797: 
1.8       cvs       798: dnl
1.68      vatton    799: dnl svg is enabled by default
1.26      cvs       800: dnl
1.68      vatton    801: if test "$with_svg" = "" ; then
                    802:     if test "$enable_svg" = "no" ; then
                    803:        with_svg="no"
1.49      cvs       804:     else
1.68      vatton    805:        with_svg="yes"
1.26      cvs       806:     fi
                    807: fi
                    808: 
                    809: dnl
1.56      kahan     810: dnl annotations is enabled by default
1.47      cvs       811: dnl
                    812: if test "$with_annot" = "" ; then
1.56      kahan     813:     if test "$enable_annot" = "no" ; then
                    814:        with_annot="no"
                    815:     else
1.54      cvs       816:        with_annot="yes"
1.47      cvs       817:     fi
1.99      kahan     818: else
                    819:     with_annot="yes"
1.47      cvs       820: fi
                    821: 
1.93      kahan     822: 
                    823: dnl
                    824: dnl The raptor RDF parser is enabled by default
                    825: dnl
                    826: if test "$with_raptor" = "" ; then
                    827:     if test "$enable_raptor" = "no" ; then
                    828:        with_raptor="no"
                    829:     else
1.99      kahan     830:        with_raptor="yes"
1.93      kahan     831:     fi
1.99      kahan     832: else
                    833:     with_raptor="yes"
1.93      kahan     834: fi
                    835: 
1.70      kahan     836: dnl
1.116   ! kahan     837: dnl The redland library is disabled by default
1.109     kahan     838: dnl
                    839: if test "$with_redland" = "" ; then
                    840:     if test "$enable_redland" = "yes" ; then
                    841:        with_redland="yes"
                    842:     else
                    843:        with_redland="no"
                    844:     fi
                    845: else
                    846:     with_redland="no"
                    847: fi
                    848: 
                    849: dnl
1.116   ! kahan     850: dnl The redland library is disabled by default
        !           851: dnl
        !           852: if test "$with_system_redland" = "" ; then
        !           853:     if test "$enable_system_redland" = "yes" ; then
        !           854:        with_redland="yes"
        !           855:        with_system_redland="yes"
        !           856:     else
        !           857:        with_system_redland="no"
        !           858:     fi
        !           859: else
        !           860:     with_system_redland="no"
        !           861: fi
        !           862: 
        !           863: dnl
        !           864: dnl The bookmarks support is disabled by default
1.108     kahan     865: dnl
                    866: if test "$with_bookmarks" = "" ; then
                    867:     if test "$enable_bookmarks" = "yes" ; then
                    868:        with_bookmarks="yes"
                    869:     else
                    870:        with_bookmarks="no"
                    871:     fi
                    872: else
                    873:     with_bookmarks="no"
                    874: fi
                    875: 
                    876: dnl
1.70      kahan     877: dnl Generic XML support enabled by default
                    878: dnl
                    879: if test "$with_generic_xml" = "" ; then
                    880:     if test "$enable_generic_xml" = "no" ; then
                    881:        with_generic_xml="no"
                    882:        GENERIC_XML_OPTIONS=
                    883:     else
                    884:        with_generic_xml="yes"
                    885:        GENERIC_XML_OPTIONS=-DXML_GENERIC
                    886:     fi
                    887: fi
                    888: 
1.88      kirschpi  889: AC_ARG_WITH(dav,            [  --with-dav             enable WebDAV support (experimental) ])
                    890: dnl
                    891: dnl DAV support disabled by default
                    892: dnl
                    893: if test "$with_dav" = "" ; then
                    894:   if test "$enable_dav" = "yes" ; then
                    895:     with_dav="yes"
                    896:   else
                    897:     with_dav="no"
                    898:   fi
                    899: fi  
                    900: 
                    901: if test "$with_dav" = "yes" ; then
                    902:    DAV_OPTIONS=-DDAV
1.90      kirschpi  903:    DAVDIR="davlib"
                    904:    LIBDAV="libwwwdav"
                    905:    WITHDAV="--with-dav" 
                    906:    WWWDAV="-lwwwdav" 
1.88      kirschpi  907: else
                    908:    with_dav="no"
                    909:    DAV_OPTIONS=""
1.90      kirschpi  910:    DAVDIR=""
                    911:    LIBDAV=""
                    912:    WITHDAV="" 
                    913:    WWWDAV="" 
1.88      kirschpi  914: fi
                    915: 
1.70      kahan     916: 
1.19      cvs       917: if test "$build_amaya" = "yes" ; then
1.43      cvs       918:     if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50      cvs       919:        AC_MSG_WARN(libwww sources not found !!)
                    920:        AC_MSG_WARN(Disabling Amaya build !)
                    921:        build_amaya="no"
1.1       cvs       922:     fi
1.8       cvs       923: 
                    924:     if test ! -f $srcdir/amaya/MathML.S ; then
1.10      cvs       925:        if test "$with_math" = "yes" ; then
1.8       cvs       926:            AC_MSG_WARN(MathML sources not found !!)
1.26      cvs       927:            AC_MSG_WARN(Disabling Math build !)
1.10      cvs       928:            with_math="no"
                    929:            MATH_OPTIONS=
1.8       cvs       930:        fi
                    931:     fi
1.26      cvs       932: 
1.68      vatton    933:     if test ! -f $srcdir/amaya/SVG.S ; then
                    934:        if test "$with_svg" = "yes" ; then
                    935:            AC_MSG_WARN(SVG sources not found !!)
                    936:            AC_MSG_WARN(Disabling SVG build !)
                    937:            with_svg="no"
                    938:            SVG_OPTIONS=
1.26      cvs       939:        fi
                    940:     fi
                    941: 
1.48      cvs       942:     if test ! -f $srcdir/annotlib/Makefile.in ; then
1.47      cvs       943:        if test "$with_annot" = "yes" ; then
                    944:            AC_MSG_WARN(Annotation makefile not found !!)
                    945:            AC_MSG_WARN(Disabling Annotations build !)
                    946:            with_annot="no"
                    947:        fi
                    948:     fi
1.55      kahan     949: 
1.109     kahan     950:     if test "$with_raptor" = "yes" -a "$with_redland" = "yes" ; then
                    951:        AC_MSG_WARN(Disabling raptor build as redland is enabled !)
                    952:        MAKERAPTOR=['#']
                    953:        with_raptor="no"
                    954:     fi
                    955: 
1.108     kahan     956:     if test "$with_raptor" = "yes" -a "$with_annot" = "no" ; then
1.93      kahan     957:        AC_MSG_WARN(Disabling raptor build as annotations are disabled !)
                    958:        MAKERAPTOR=['#']
                    959:        with_raptor="no"
                    960:     fi
                    961: 
1.108     kahan     962:     if test "$with_raptor" = "yes" -a ! -d "$srcdir/libraptor" ; then
                    963:        AC_MSG_WARN(Raptor source dir not found !!)
                    964:        AC_MSG_WARN(Disabling raptor build !)
                    965:        MAKERAPTOR=['#']
                    966:        with_raptor="no"
1.109     kahan     967:     fi
                    968: 
                    969:     if test "$with_raptor" = "yes" ; then
1.108     kahan     970:        AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DRAPTOR_RDF_PARSER -I\$(THOTDIR)/libraptor"
                    971:        AMAYA_RAPTOR_LIBS="../libraptor/.libs/libraptor.a"
                    972:        AMAYA_RAPTOR_SRC="amaya_comp_libraptor"
                    973:        AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/libraptor"
                    974:     fi
                    975: 
1.109     kahan     976:     if test "$with_redland" = "yes" -a "$with_annot" = "no" ; then
                    977:        AC_MSG_WARN(Disabling redland build as annotations are disabled !)
                    978:        MAKEREDLAND=['#']
                    979:        with_redland="no"
                    980:     fi
                    981: 
1.116   ! kahan     982:     redland_compile_source=yes
        !           983:     if test "$with_redland" = "yes" -a "$with_system_redland" = "yes" ; then
        !           984:        # check to see if we have a redland library
        !           985:        AC_MSG_CHECKING(system redland library)
        !           986:        redland_min_version=0.9.12
        !           987:        REDLAND_CONFIG="redland-config"
        !           988:        REDLAND_VERSION=`$REDLAND_CONFIG --version`
        !           989:        redland_version_dec=`echo $REDLAND_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
        !           990:        redland_min_version_dec=`echo $redland_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
        !           991:        if test $redland_version_dec -lt $redland_min_version_dec; then
        !           992:          AC_MSG_RESULT(no - found version $REDLAND_VERSION and minimal version is $redland_min_version)
        !           993:        else
        !           994:          AC_MSG_RESULT(yes - found version $REDLAND_VERSION)
        !           995:         AC_MSG_CHECKING(checking for redland headers)
        !           996:          REDLAND_HEADERS=`$REDLAND_CONFIG --cflags`
        !           997:         REDLAND_HEADERS="$REDLAND_HEADERS/redland.h"
        !           998:          REDLAND_HEADERS="/usr/local/include/redland.h"
        !           999:         if test -e $REDLAND_HEADERS ; then
        !          1000:            AC_MSG_RESULT(yes - have development version)
        !          1001:            redland_compile_source=no
        !          1002:         else
        !          1003:            AC_MSG_RESULT(no - no development version)
        !          1004:          fi
        !          1005:        fi
        !          1006:     fi
        !          1007: 
        !          1008:     if test "$with_redland" = "yes" -a "$redland_compile_source" = "yes" \
        !          1009:        -a ! -d "$srcdir/../redland" ; then
1.109     kahan    1010:        AC_MSG_WARN(Redland source dir not found !!)
                   1011:        AC_MSG_WARN(Disabling redland build !)
                   1012:        MAKEREDLAND=['#']
                   1013:        with_redland="no"
                   1014:     fi
                   1015: 
                   1016:     if test "$with_redland" = "yes" ; then
1.116   ! kahan    1017:        AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DLIBRDF_INTERNAL=1 -DAM_REDLAND -DRAPTOR_RDF_PARSER"
        !          1018:        if test "$redland_compile_source" = "yes" ; then
        !          1019:          AMAYA_RAPTOR_SRC="amaya_comp_redland"
        !          1020:          AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
        !          1021:          AMAYA_RAPTOR_LIBS="../redland/librdf/.libs/librdf.a ../redland/raptor/.libs/libraptor.a"
        !          1022:          AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
        !          1023:        else
        !          1024:          MAKEREDLAND=['#']
        !          1025:         AMAYA_RAPTOR_SRC=
        !          1026:         redland_includes=`$REDLAND_CONFIG --cflags`
        !          1027:         redland_libs=`$REDLAND_CONFIG --libs`
        !          1028:          AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS"
        !          1029:          AMAYA_ANNOT_INCLUDES="$redland_includes -I\$(THOTDIR)/thotlib/include"
        !          1030:          AMAYA_ANNOT_EXTRA_LIBS="$redland_libs"
        !          1031:          AMAYA_RAPTOR_INCLUDES="$redland_includes"
        !          1032:        fi
1.109     kahan    1033:     fi
                   1034: 
1.116   ! kahan    1035: 
1.108     kahan    1036:     dnl control whether we should build the bookmarks support
                   1037:     if test "$with_bookmarks" = "yes" -a "$with_annot" = "no" ; then
                   1038:        AC_MSG_WARN(Disabling bookmarks build as annotations are disabled !)
                   1039:        with_bookmarks="no"
                   1040:     fi
1.109     kahan    1041:     if test "$with_bookmarks" = "yes" -a "$with_redland" = "no" ; then
                   1042:        AC_MSG_WARN(Disabling bookmarks build as redland is disabled !)
1.108     kahan    1043:        with_bookmarks="no"
                   1044:     fi
                   1045:     if test "$with_bookmarks" = "yes" ; then
                   1046:        ANNOTLIB_COMPILE_BM=
                   1047:        AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DBOOKMARKS"
                   1048:     else
                   1049:        ANNOTLIB_COMPILE_BM=['#']
                   1050:     fi
                   1051: 
1.93      kahan    1052:     dnl control whether we should use libwww's rdf parser
1.109     kahan    1053:     if test "$with_raptor" = "yes" -o "$with_redland" = "yes"; then
1.93      kahan    1054:        dnl not all the function calls have been cleared as of today, 
                   1055:        dnl we still need libwww's rdf parser 
1.98      kahan    1056:        MAKE_LIBWWW_RDF_PARSER=
                   1057:        LIBWWW_RDF_PARSER=
1.93      kahan    1058:     else
                   1059:        MAKE_LIBWWW_RDF_PARSER="libwwwxml"
                   1060:        LIBWWW_RDF_PARSER="-lwwwxml"
                   1061:     fi
1.70      kahan    1062: 
1.55      kahan    1063:     if test "$with_plugin" = "yes" ; then
                   1064:         AC_MSG_WARN(The plugin library isn't supported anymore in Amaya !!)
                   1065:        AC_MSG_WARN(Disabling plugin build !)
                   1066:        with_plugin="no"
                   1067:     fi
                   1068: 
1.88      kirschpi 1069: 
                   1070:     if test ! -f $srcdir/davlib/Makefile.in ; then
                   1071:        if test "$with_dav" = "yes" ; then
                   1072:            AC_MSG_WARN(WebDAV makefile not found !!)
                   1073:            AC_MSG_WARN(Disabling WebDAV build !)
                   1074:            with_dav="no"
1.90      kirschpi 1075:             DAVDIR=""
                   1076:             LIBDAV=""
                   1077:             WITHDAV="" 
                   1078:             WWWDAV="" 
1.88      kirschpi 1079:        fi
                   1080:     fi
                   1081:    
                   1082: 
1.1       cvs      1083: fi
                   1084: 
                   1085: dnl
                   1086: dnl The options for each library or binary
                   1087: dnl
                   1088: 
1.75      cheyroul 1089: THOT_OPTIONS="$GTK_OPTIONS $I18N_OPTIONS $GL_OPTIONS"
1.93      kahan    1090: AMAYA_OPTIONS="$MATH_OPTIONS $SVG_OPTIONS $GTK_OPTIONS $GENERIC_XML_OPTIONS $I18N_OPTIONS $GL_OPTIONS"
1.58      cvs      1091: #PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
1.93      kahan    1092: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS $I18N_OPTIONS"
1.101     kahan    1093: 
1.102     kahan    1094: IMGLIBS="-ljpeg -lpng -lz"
1.3       cvs      1095: EXTRA_LIBS=
1.1       cvs      1096: 
                   1097: dnl
                   1098: dnl Set up the PATHs needed
                   1099: dnl
                   1100: 
                   1101: API="\$(THOTDIR)/thotlib/include"
                   1102: VAR="\$(THOTDIR)/thotlib/internals/var"
                   1103: INCL="\$(THOTDIR)/thotlib/internals/h"
                   1104: FUNC="\$(THOTDIR)/thotlib/internals/f"
                   1105: 
                   1106: dnl
                   1107: dnl Set up the include variables.
                   1108: dnl
                   1109: 
1.61      cvs      1110: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58      cvs      1111: APIINCLUDES=-I${API}
                   1112:  
                   1113: if test "${VPATHOPT}" = "" ; then
1.1       cvs      1114:        VPATHOPT="VPATH"
                   1115: fi
                   1116: 
                   1117: dnl
                   1118: dnl Exports the current values of the variables.
                   1119: dnl
                   1120: 
                   1121: AC_SUBST(AMAYA_VER)
1.6       cvs      1122: AC_SUBST(CEXTRACT_VER)
                   1123: AC_SUBST(CEXTRACT_FLAGS)
1.1       cvs      1124: 
                   1125: AC_SUBST(THOTINCLUDES)
                   1126: AC_SUBST(APIINCLUDES)
                   1127: AC_SUBST(VPATHOPT)
                   1128: 
1.63      vatton   1129: AC_SUBST(GTK_OPTIONS)
1.1       cvs      1130: AC_SUBST(THOT_OPTIONS)
                   1131: AC_SUBST(AMAYA_OPTIONS)
                   1132: AC_SUBST(PLUGIN_OPTIONS)
1.48      cvs      1133: AC_SUBST(AMAYA_ANNOT_OPTIONS)
1.110     kahan    1134: AC_SUBST(AMAYA_ANNOT_INCLUDES)
1.116   ! kahan    1135: AC_SUBST(AMAYA_ANNOT_EXTRA_LIBS)
1.1       cvs      1136: AC_SUBST(IMGLIBS)
1.3       cvs      1137: AC_SUBST(EXTRA_LIBS)
1.90      kirschpi 1138: 
                   1139: AC_SUBST(DAVDIR)
                   1140: AC_SUBST(LIBDAV)
                   1141: AC_SUBST(WITHDAV)
                   1142: AC_SUBST(WWWDAV)
1.1       cvs      1143: 
1.93      kahan    1144: AC_SUBST(MAKERAPTOR)
1.109     kahan    1145: AC_SUBST(MAKEREDLAND)
1.108     kahan    1146: AC_SUBST(ANNOTLIB_COMPILE_BM)
1.109     kahan    1147: AC_SUBST(AMAYA_RAPTOR_SRC)
1.93      kahan    1148: AC_SUBST(AMAYA_RAPTOR_LIBS)
                   1149: AC_SUBST(AMAYA_RAPTOR_INCLUDES)
                   1150: AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
                   1151: AC_SUBST(LIBWWW_RDF_PARSER)
                   1152: 
                   1153: AC_SUBST(SUBDIRS)
                   1154: 
1.1       cvs      1155: dnl
1.48      cvs      1156: dnl Include the option Makefile.xxx fragment according to the configure options
1.1       cvs      1157: dnl
                   1158: 
                   1159: if test "$with_plugin" = "yes" ; then
1.50      cvs      1160:     AC_SUBST_FILE(plugin_frag)
1.1       cvs      1161:     plugin_frag=$srcdir/pluginlib/Makefile.plugin
                   1162: else
                   1163:     AC_SUBST_FILE(plugin_frag)
                   1164:     plugin_frag=/dev/null
                   1165: fi
                   1166: 
                   1167:     AC_SUBST_FILE(www_frag)
1.49      cvs      1168:     www_frag=$srcdir/amaya/Makefile.libwww
1.1       cvs      1169: 
1.50      cvs      1170: if test "$with_math" = "no" ; then
1.10      cvs      1171:     AC_SUBST_FILE(math_frag)
1.50      cvs      1172:     math_frag=/dev/null
1.8       cvs      1173: else
1.10      cvs      1174:     AC_SUBST_FILE(math_frag)
1.50      cvs      1175:     math_frag=$srcdir/amaya/Makefile.math
1.8       cvs      1176: fi
                   1177: 
1.68      vatton   1178: if test "$with_svg" = "no" ; then
                   1179:     AC_SUBST_FILE(svg_frag)
                   1180:     svg_frag=/dev/null
1.26      cvs      1181: else
1.68      vatton   1182:     AC_SUBST_FILE(svg_frag)
                   1183:     svg_frag=$srcdir/amaya/Makefile.svg
1.26      cvs      1184: fi
                   1185: 
1.47      cvs      1186: if test "$with_annot" = "yes" ; then
                   1187:     AC_SUBST_FILE(annot_frag)
1.48      cvs      1188:     annot_frag=$srcdir/annotlib/Makefile.annot
1.47      cvs      1189: else
                   1190:     AC_SUBST_FILE(annot_frag)
                   1191:     annot_frag=/dev/null
                   1192: fi
                   1193: 
1.88      kirschpi 1194: if test "$with_dav" = "yes" ; then
                   1195:     AC_SUBST_FILE(dav_frag)
                   1196:     dav_frag=$srcdir/davlib/Makefile.dav
                   1197: fi
1.16      cvs      1198: 
1.1       cvs      1199: dnl  ***************************************************************
                   1200: dnl
                   1201: dnl      FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
                   1202: dnl
                   1203: dnl  ***************************************************************
                   1204: 
                   1205: EXTRA_MAKEFILE_IN=
1.2       cvs      1206: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1       cvs      1207:        libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2       cvs      1208:        tools/mkdep/Makefile \
1.1       cvs      1209:        tools/cextract-1.7/Makefile thotlib/Makefile \
1.5       cvs      1210:        thotlib/include/Makefile batch/Makefile tablelib/Makefile"
1.1       cvs      1211: 
                   1212: if test "$build_amaya" = "yes" ; then
1.2       cvs      1213: 
1.19      cvs      1214:     make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2       cvs      1215:     EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.93      kahan    1216:     $srcdir/amaya/Makefile.libwww"
1.27      cvs      1217: 
                   1218:     if test "$$with_plugin" = "yes" ; then
                   1219:        make_output="$make_output pluginlib/Makefile"
                   1220:        EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.93      kahan    1221:        $srcdir/pluginlib/Makefile.plugin"
1.27      cvs      1222:     fi
1.2       cvs      1223: 
1.48      cvs      1224:     if test "$with_annot" = "yes" ; then
                   1225:        make_output="$make_output annotlib/Makefile"
                   1226:        EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
                   1227:     fi
1.88      kirschpi 1228: 
                   1229:     if test "$with_dav" = "yes" ; then
                   1230:        make_output="$make_output davlib/Makefile"
                   1231:        EXTRA_MAKEFILE_IN="$srcdir/davlib/Makefile.in"
                   1232:     fi
                   1233: 
1.1       cvs      1234: fi
                   1235: 
                   1236: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6       cvs      1237: AC_OUTPUT($make_output , [
                   1238: dnl
                   1239: dnl This fragment of shell code is executed after the
                   1240: dnl Makefile(s) dump ...
                   1241: dnl
                   1242: 
                   1243: echo timestamp > stamp-h
                   1244: 
                   1245: dnl
                   1246: dnl Check for an upgrade in the Options numbers
                   1247: dnl
                   1248: 
                   1249: if test -f Options ; then
                   1250:    oldversion=`grep Version Options`
                   1251:    newversion=`grep Version Options.orig`
                   1252:    if test "$oldversion" != "$newversion" ; then
                   1253:        echo WARNING : Options files have changed, old options saved to Options.old
                   1254:        cp Options Options.old
                   1255:        cp Options.orig Options
                   1256:        exit 1
                   1257:    fi
                   1258: fi
                   1259: ])
1.1       cvs      1260: 
                   1261: if test "$build_amaya" = "yes" ; then
1.50      cvs      1262:     echo Amaya configured with libWWW
                   1263:     if test "$with_plugin" = "yes" ; then
                   1264:         echo Amaya configured with Plugins support
1.8       cvs      1265:     fi
1.10      cvs      1266:     if test "$with_math" = "yes" ; then
                   1267:        echo Amaya configured with Math support
1.26      cvs      1268:     fi
1.68      vatton   1269:     if test "$with_svg" = "yes" ; then
                   1270:        echo Amaya configured with SVG support
1.47      cvs      1271:     fi
                   1272:     if test "$with_annot" = "yes" ; then
                   1273:        echo Amaya configured with Annotations support
1.70      kahan    1274:     fi
1.93      kahan    1275:     if test "$with_raptor" = "yes" ; then
1.106     kahan    1276:        echo Amaya configured with the Raptor RDF parser
1.109     kahan    1277:     fi
                   1278:     if test "$with_redland" = "yes" ; then
1.116   ! kahan    1279:        if test "$with_system_redland" = "no" ; then
        !          1280:          echo Amaya configured with the Redland RDF library \(local source\)
        !          1281:        else
        !          1282:          echo Amaya configured with the Redland RDF library \(system\)
        !          1283:        fi
1.108     kahan    1284:     fi
                   1285:     if test "$with_bookmarks" = "yes" ; then
                   1286:        echo Amaya configured with bookmarks support \(experimental\)
1.93      kahan    1287:     fi
1.70      kahan    1288:     if test "$with_generic_xml" = "yes" ; then
                   1289:        echo Amaya configured with generic XML suppport
                   1290:     fi
                   1291:     if test "$with_i18n" = "yes" ; then
1.82      vatton   1292:        echo Amaya configured with internationalization suppport
1.75      cheyroul 1293:     fi 
                   1294:     if test "$with_gl" = "yes" ; then
                   1295:        echo Amaya configured with Opengl Canvas Rendering \(experimental\)
1.88      kirschpi 1296:     fi
                   1297:     if test "$with_dav" = "yes" ; then
                   1298:        echo Amaya configured with WebDAV support \(experimental\)
1.1       cvs      1299:     fi
1.5       cvs      1300: fi
                   1301: 
1.107     kahan    1302: if test "$no_graphic" = "yes" ; then
                   1303:     echo "Amaya configured with system graphic libraries (libjpeg, libpng, zlib)"
                   1304: else
                   1305:     echo "Amaya configured with static graphic libraries (libjpeg, libpng, zlib)"
                   1306:     if test "$with_gtk" = "yes" -o "$with_gl" = "yes" ; then
                   1307:       echo "  N.B. This option may not work in your platform. If Amaya crashes"
                   1308:       echo "  when opening a PNG file. Recompile it using the system libraries."
                   1309:     fi
                   1310: fi
                   1311: 
                   1312: if test "$with_gtk" = "yes" ; then
1.67      vatton   1313:     echo "Amaya configured with GTK"
1.106     kahan    1314: else 
1.107     kahan    1315:   if test "$no_motif" = "yes" ; then
1.5       cvs      1316:     echo "Motif seems not installed on this machine"
1.61      cvs      1317:     echo "Amaya need Motif 1.2 or 2.0"
1.105     vatton   1318:   else
                   1319:     if test "$motif_includes" = "" ; then
                   1320:       echo "Motif includes were not found"
                   1321:       echo "Amaya might not compile"
                   1322:       echo "Edit your Option file"
                   1323:     else
                   1324:       if test "$motif_libraries" = "" ; then
                   1325:         echo "Motif libraries were not found"
                   1326:         echo "Amaya might not compile"
                   1327:         echo "Edit your Option file"
                   1328:       fi
                   1329:     fi
                   1330:   fi
1.1       cvs      1331: fi
                   1332: 
1.107     kahan    1333: echo ""
1.78      vatton   1334: echo "Now type \"make\" (GNU make preferably) to build the binaries"
1.107     kahan    1335: echo ""

Webmaster