Annotation of Amaya/configure.in, revision 1.170

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
1.122     gully      53: AC_PROG_CXX
1.1       cvs        54: AC_PROG_LEX
                     55: AC_PROG_AWK
                     56: AC_PROG_INSTALL
                     57: AC_PROG_LN_S
                     58: AC_PROG_MAKE_SET
                     59: AC_PROG_RANLIB
                     60: AC_PATH_PROG(CP, cp, /bin/cp, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     61: AC_PATH_PROG(MV, mv, /bin/mv, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     62: AC_PATH_PROG(RM, rm, /bin/rm, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     63: AC_PATH_PROG(MKDIR, mkdir, /bin/mkdir, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     64: AC_PATH_PROG(ECHO, echo, /bin/echo, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     65: AC_PATH_PROG(CAT, cat, /bin/cat, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     66: AC_PATH_PROG(CHMOD, chmod, /bin/chmod, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     67: AC_PATH_PROG(SED, sed, /bin/sed, $PATH:/bin:/usr/bin:/usr/ucb/bin)
                     68: AC_PATH_PROG(AR, ar, /usr/bin/ar, $PATH:/bin:/usr/bin:/usr/ucb/bin)
1.6       cvs        69: AC_PATH_PROG(DIFF, diff, /usr/bin/diff, $PATH:/bin:/usr/bin:/usr/ucb/bin)
1.1       cvs        70: 
                     71: dnl
                     72: dnl Checks for libraries.
                     73: dnl
                     74: 
                     75: AC_CHECK_LIB(socket, socket, )
                     76: AC_CHECK_LIB(inet, connect)
                     77: AC_CHECK_LIB(nsl, t_accept)
                     78: AC_CHECK_LIB(dl, dlopen)
1.141     gully      79: #AC_PATH_X
                     80: #AC_PATH_XTRA
1.1       cvs        81: 
1.41      cvs        82: dnl
1.5       cvs        83: dnl Checks for header files.
                     84: dnl
                     85: 
                     86: AC_HEADER_DIRENT
                     87: AC_HEADER_STDC
                     88: AC_HEADER_SYS_WAIT
                     89: 
                     90: AC_CHECK_HEADERS(stdio.h)
                     91: AC_CHECK_HEADERS(sys/types.h types.h)
                     92: AC_CHECK_HEADERS(sys/unistd.h unistd.h)
                     93: AC_CHECK_HEADERS(sys/fcntl.h fcntl.h)
                     94: AC_CHECK_HEADERS(sys/limits.h limits.h)
                     95: AC_CHECK_HEADERS(sys/stat.h stat.h)
                     96: AC_CHECK_HEADERS(sys/file.h)
                     97: AC_CHECK_HEADERS(sys/ioctl.h)
                     98: AC_CHECK_HEADERS(sys/time.h time.h)
                     99: AC_CHECK_HEADERS(sys/systeminfo.h)
1.46      cvs       100: AC_CHECK_HEADERS(sys/string.h strings.h)
1.34      cvs       101: AC_CHECK_HEADERS(sys/syslog.h syslog.h)
1.5       cvs       102: AC_CHECK_HEADERS(sys/socket.h socket.h)
1.131     gully     103: 
                    104: # SG: not used ? => do not compile on macosx
                    105: # AC_CHECK_HEADERS(appkit/appkit.h appkit.h)
                    106: # AC_CHECK_HEADERS(apppkit/apppkit.h apppkit.h)
                    107: 
1.5       cvs       108: AC_CHECK_HEADERS(netinet/in.h in.h)
                    109: AC_CHECK_HEADERS(dn.h)
                    110: AC_CHECK_HEADERS(sys/ipc.h)
                    111: AC_CHECK_HEADERS(net/errno.h sys/errno.h errno.h)
                    112: AC_CHECK_HEADERS(pwd.h)
                    113: AC_CHECK_HEADERS(grp.h)
                    114: AC_CHECK_HEADERS(arpa/inet.h inet.h)
                    115: AC_CHECK_HEADERS(netdb.h)
                    116: AC_CHECK_HEADERS(manifest.h)
                    117: AC_CHECK_HEADERS(bsdtypes.h)
                    118: AC_CHECK_HEADERS(stdefs.h)
                    119: AC_CHECK_HEADERS(bsdtime.h)
                    120: AC_CHECK_HEADERS(sys/select.h select.h)
                    121: AC_CHECK_HEADERS(dnetdb.h)
                    122: AC_CHECK_HEADERS(libc.h)
                    123: AC_CHECK_HEADERS(stdlib.h)
                    124: AC_CHECK_HEADERS(malloc.h)
                    125: AC_CHECK_HEADERS(memory.h)
                    126: AC_CHECK_HEADERS(unixlib.h)
                    127: AC_CHECK_HEADERS(ctype.h)
                    128: AC_CHECK_HEADERS(cursesX.h curses.h)
                    129: AC_CHECK_HEADERS(sys/resource.h resource.h)
                    130: AC_HEADER_DIRENT
                    131: AC_CHECK_HEADERS(dir.h direct.h) dnl AC_HEADER_DIRENT only checks for some..
                    132: AC_HEADER_STDC
                    133: AC_HEADER_SYS_WAIT
                    134: AC_HEADER_TIME
                    135: AC_HEADER_STAT
1.103     kahan     136: AC_CHECK_HEADERS(stdint.h)
1.5       cvs       137: 
                    138: dnl
                    139: dnl Checks for typedefs, structures, and compiler characteristics.
                    140: dnl
                    141: 
                    142: AC_C_CONST
                    143: AC_C_INLINE
                    144: AC_TYPE_MODE_T
                    145: AC_TYPE_OFF_T
                    146: AC_TYPE_SIZE_T
                    147: AC_HEADER_TIME
                    148: AC_STRUCT_TM
                    149: AC_STRUCT_TIMEZONE
                    150: AC_TYPE_UID_T
                    151: 
                    152: dnl
                    153: dnl Checks for library functions.
                    154: dnl
                    155: 
                    156: AC_FUNC_ALLOCA
                    157: AC_TYPE_GETGROUPS
                    158: AC_PROG_GCC_TRADITIONAL
                    159: AC_FUNC_MEMCMP
                    160: AC_FUNC_MMAP
                    161: AC_TYPE_SIGNAL
                    162: AC_FUNC_VPRINTF
1.58      cvs       163: 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       164: 
1.132     gully     165: #
                    166: # Check for operating system (UNIX / WINDOWS / MACOSX )
                    167: # ---------->
                    168: # canonicalize the target OS : default UNIX
                    169: OS_OPTIONS="-D_UNIX"
                    170: case $target_os in
                    171:   aix*)       OS_OPTIONS="-D_UNIX" ;;
                    172:   cygwin*)    OS_OPTIONS="-D_UNIX" ;;
                    173:   darwin*)    OS_OPTIONS="-D_UNIX -D_MACOS" ;;
                    174:   freebsd2*)  OS_OPTIONS="-D_UNIX" ;;
                    175:   freebsd*)   OS_OPTIONS="-D_UNIX" ;;
                    176:   hpux*)      OS_OPTIONS="-D_UNIX" ;;
                    177:   irix*)      OS_OPTIONS="-D_UNIX" ;;
                    178:   linuxaout*) OS_OPTIONS="-D_UNIX" ;;
                    179:   linux*)     OS_OPTIONS="-D_UNIX" ;;
                    180:   mingw32*)   OS_OPTIONS="-D_UNIX" ;;
                    181:   netbsd*)    OS_OPTIONS="-D_UNIX" ;;
                    182:   openbsd*)   OS_OPTIONS="-D_UNIX" ;;
                    183:   osf[12]*)   OS_OPTIONS="-D_UNIX" ;;
                    184:   osf*)       OS_OPTIONS="-D_UNIX" ;;
                    185:   solaris2*)  OS_OPTIONS="-D_UNIX" ;;
                    186:   sunos4*)    OS_OPTIONS="-D_UNIX" ;;
                    187:   ultrix*)    OS_OPTIONS="-D_UNIX" ;;
                    188: esac
                    189: 
1.85      vatton    190: AC_ARG_WITH(GL,              [  --with-gl               enable Opengl canvas (experimental) ])
                    191: dnl
                    192: dnl GL canvas is disabled by default
                    193: dnl
                    194: dnl needs Opengl, glu, Xft (xfree 4 font server)
                    195: dnl needs GTK
                    196: dnl text WILL need freetype2, ftgl
                    197: dnl GL is for opengl
                    198: dnl Glu is for text drawing (until we switch) 
                    199: dnl GLU is for tesselation algortihms (until we extract it from this lib)
                    200: dnl (tesselation is used for polygons with holes in it...)
                    201: dnl gtkgl is for integration of opengl in GTK
                    202: if test "$with_gl" = "" ; then
                    203:  if test "$enable_gl" = "yes" ; then
                    204:     with_gl="yes"
                    205:   else
                    206:     with_gl="no"
                    207:   fi
                    208: fi  
                    209: 
1.120     gully     210: # check if gtk gui should be used
                    211: AC_ARG_WITH(gtk, [  --with-gtk              use GTK GUI toolkit ])
                    212: if test "$with_gtk" = "yes" -o "$enable_gtk" = "yes" ; then
                    213:   if test "$withval" = "no" ; then
                    214:     with_gtk="no"
                    215:   else
                    216:     with_gtk="yes"
                    217:   fi
                    218: fi
                    219: 
1.155     carcone   220: # check if mac version is used
                    221: AC_ARG_WITH(mac, [  --with-mac              generate mac version ])
                    222: if test "$with_mac" = "" ; then
                    223:  if test "$enable_mac" = "yes" ; then
                    224:     with_mac="yes"
                    225:   else
                    226:     with_mac="no"
                    227:   fi
                    228: fi
                    229: 
1.143     gully     230: # check for mesa library (OpenGL)
1.155     carcone   231: AC_ARG_WITH(MESA,              [  --with-mesa             enable OpenGL canvas with internal MesaLib (only used with wxWidgets GUI) ])
1.143     gully     232: if test "$with_mesa" = "" ; then
                    233:  if test "$enable_mesa" = "yes" ; then
                    234:     with_mesa="yes"
                    235:     with_gl="no"
                    236:   else
                    237:     with_mesa="no"
                    238:   fi
                    239: fi
                    240: 
                    241: # check if wxWidgets gui should be used
                    242: AC_ARG_WITH(wx, [  --with-wx               use wxWidgets GUI toolkit (experimental)])
1.124     gully     243: if test "$with_wx" = "yes" -o "$enable_wx" = "yes" ; then
                    244:   if test "$withval" = "no" ; then
                    245:     with_wx="no"
                    246:   else
                    247:     with_wx="yes"
1.143     gully     248:     # force mesa or opengl with wxWidgets (mesa is used in priority)
                    249:     if test "$with_gl" = "no" ; then
                    250:       with_mesa="yes"
                    251:     fi
1.124     gully     252:   fi
                    253: fi
                    254: 
1.134     gully     255: # Check if iat least one GUI toolkit is enabled
                    256: if test "$with_wx" = "no" -o "$with_wx" = "" ; then
                    257:   if test "$with_gtk" = "no" -o "$with_gtk" = "" ; then
                    258:     # Nothing is enable so force the default GUI toolkit (GTK)
                    259:     with_wx="no"
                    260:     with_gtk="yes"
1.85      vatton    261:   fi
                    262: fi
                    263: 
1.121     gully     264: # check if no gui is enable
                    265: AC_ARG_WITH(nogui, [  --with-nogui            do not use GUI toolkit ])
                    266: if test "$with_nogui" = "yes" -o "$enable_nogui" = "yes" ; then
                    267:   with_nogui="yes"
                    268:   with_gtk="no"
1.134     gully     269:   with_wx="no"
1.121     gully     270:   NOGUI_OPTIONS="-D_NOGUI"
                    271: fi
                    272: 
1.136     gully     273: # check if wxWidgets debug is enable
1.155     carcone   274: AC_ARG_WITH(wxdebug,              [  --with-wxdebug          compiles wxWidgets with debuging options ])
1.136     gully     275: if test "$with_wxdebug" = "yes" ; then
                    276:   with_wxdebug="yes"
                    277: else
                    278:   with_wxdebug="no"
                    279: fi
                    280: 
1.153     gully     281: # it is possible to specify wxWidgets library path,
                    282: # usefull for developpers who want to compile amaya with different wxWidgets version
1.155     carcone   283: AC_ARG_WITH(wxsrcdir, [  --with-wxsrcdir=...     compiles Amaya with a specific wxWidgets sources path ])
1.153     gully     284: if test "$with_wxsrcdir" = "" ; then
                    285:   with_wxsrcdir="../../wxWidgets"
                    286: fi
                    287: 
                    288: 
1.134     gully     289: if test "$with_wx" = "yes" ; then
1.120     gully     290:   if test "$with_gtk" = "yes" ; then
                    291:     echo 
                    292:     echo "****************************************************************"
                    293:     echo " ERROR: "
                    294:     echo " More than one GUI toolkit is enable"
                    295:     echo " Only one GUI toolkit should be enable (turn off one)"
                    296:     echo " exemple ok :  ../configure --with-gtk "
1.134     gully     297:     echo " exemple !ok : ../configure --with-gtk --with-wx"
1.120     gully     298:     echo "****************************************************************"
                    299:     echo 
                    300:     exit 1
                    301:   fi
                    302: fi
1.134     gully     303: 
1.152     gully     304: 
                    305: # setup the AMAYAGUI variable used to identify used GUI when 'make install' is called
                    306: # now several amaya gui can coexist.
                    307: if test "$with_gtk" = "yes" ; then
                    308:   AMAYAGUI="gtk"
                    309: fi
                    310: if test "$with_gl" = "yes" ; then
                    311:   AMAYAGUI="gl"
                    312: fi
                    313: if test "$with_wx" = "yes" ; then
                    314:   AMAYAGUI="wx"
                    315: fi
                    316: AC_SUBST(AMAYAGUI)
                    317: 
                    318: 
1.85      vatton    319: if test "$with_gtk" = "yes" ; then
1.134     gully     320:   gdkimlib_h_found="no"
1.63      vatton    321: 
1.134     gully     322:   # check that gtk-config exists
                    323:   AC_CHECK_PROG(GTKCONFIG_FOUND,gtk-config,yes,no)
                    324:   if test "$GTKCONFIG_FOUND" = no ; then
                    325:     AC_MSG_ERROR(Cannot find gtk-config. Please install gtk development library.)
                    326:   fi
                    327:                    
1.131     gully     328:   GTK_INCLUDES="${GTK_INCLUDES} `gtk-config --cflags`"
1.124     gully     329:   AC_SUBST(GTK_INCLUDES)
                    330:   GTK_LIBRARIES="`gtk-config --libs`"
1.134     gully     331:   # GL doesn't need the imlib
1.124     gully     332:   if test "${with_gl}" != "yes" ; then
1.134     gully     333:     GTK_LIBRARIES="${GTK_LIBRARIES} -lgdk_imlib"
                    334:   else
                    335:     gdkimlib_h_found="yes"
1.124     gully     336:   fi
1.106     kahan     337: 
1.124     gully     338:   AC_SUBST(GTK_LIBRARIES)
                    339:   GTK_OPTIONS="-D_GTK"
1.76      vatton    340:   no_graphic=yes
1.134     gully     341: 
1.150     gully     342:   # SG : lookingfor gtkimlib includes
                    343:   #      because not found with gtk-config on macosx
                    344:   gtk_path_for_gdkimlib_h="`gtk-config --prefix`"
                    345:   for ac_dir in               \
                    346:     /sw/include/              \
                    347:     /sw/local/include         \
                    348:     /usr/include              \
                    349:     /usr/local/include        \
                    350:     "$gtk_path_for_gdkimlib_h/include" \
                    351:     "$gtk_path_for_gdkimlib_h/local/include" \
                    352:     ; \
                    353:   do
                    354:     if test -r "$ac_dir/gdk_imlib.h"; then
                    355:       echo "found gdk_imlib.h"
                    356:       gdkimlib_h_found="yes"
                    357:       GTK_INCLUDES="${GTK_INCLUDES} -I$ac_dir"
                    358:       break
                    359:     fi
                    360:   done 
                    361: 
1.134     gully     362:   if test "$gdkimlib_h_found" = "no" ; then
                    363:     echo
                    364:     echo "****************************************************************"
                    365:     echo " ERROR: gdk_imlib.h not found -"
                    366:     echo " [please install imlib developpement package (libimlib1-devel on mandrake)]"
                    367:     echo "****************************************************************"
                    368:     exit 1
                    369:   fi                                                                                         
1.120     gully     370: fi
                    371: 
1.143     gully     372: 
                    373: if test "$with_mesa" = "yes" ; then
                    374:   # --------- compile Mesa library (opengl) --------------- #
                    375: 
                    376:   # check that sources of Mesa exists
                    377:   if test ! -f ../../Mesa/Makefile ; then
                    378:     AC_MSG_ERROR(Mesa library sources not found (opengl). Please download Mesa sources (http://www.mesa3d.org/) or remove --with-gl option !)
                    379:   fi
                    380: 
                    381:   OLDDIR=`pwd`
1.152     gully     382:   GL_BUILDDIR="${OLDDIR}/Mesa"
1.143     gully     383: 
1.163     gully     384:   echo "---> Install Mesa library into ${GL_BUILDDIR}"
1.143     gully     385: 
1.163     gully     386:   mkdir -p ${GL_BUILDDIR}
                    387:   cp -r ../../Mesa/* ${GL_BUILDDIR}
1.143     gully     388: 
1.152     gully     389:   echo "---> Install Mesa library into ${GL_BUILDDIR} - DONE"
1.143     gully     390: 
                    391:   # this is the flags used to build amaya with OpenGL
                    392:   GL_OPTIONS="-D_GL"
1.152     gully     393:   GL_INCLUDES="-I${GL_BUILDDIR}/include"
                    394:   GL_LIBRARIES="-Wl,-rpath,${GL_BUILDDIR}/lib -L${GL_BUILDDIR}/lib -lGL -lGLU"
                    395:   AC_SUBST(GL_BUILDDIR)
1.143     gully     396:   AC_SUBST(GL_INCLUDES)
                    397:   AC_SUBST(GL_LIBRARIES)
                    398: fi
                    399: 
1.124     gully     400: if test "$with_wx" = "yes" ; then
1.153     gully     401:   # WX_SRCDIR is better to understand the code than with_wxsrcdir variable
1.165     gully     402:   if test ! -f $with_wxsrcdir/Makefile.in ; then
                    403:     $with_wxsrcdir = ../../wxWidgets
                    404:   fi
                    405:   cd $with_wxsrcdir
                    406:   WX_SRCDIR=`pwd`
                    407:   cd -
1.153     gully     408:   AC_SUBST(WX_SRCDIR)
                    409: 
1.135     gully     410:   # check that sources of wxWidgets exists
1.153     gully     411:   if test ! -f $WX_SRCDIR/Makefile.in ; then
                    412:     AC_MSG_ERROR(wxWidgets library sources not found. Please download wxWidgets sources (http://www.wxwidgets.org/), or remove --with-wx option, or check --with-wxsrcdir is correct !)
1.135     gully     413:   fi
                    414: 
1.152     gully     415:   # --------- configure wxWidgets library --------------- #
1.135     gully     416:   echo "---> Configuring wxWidgets library."
                    417:   OLDDIR=`pwd`
1.149     gully     418:   # create the build directory (debug or release)
                    419:   if test $with_wxdebug = yes ; then
1.152     gully     420:     WX_BUILDDIR="wxWidgets_DEBUG"
1.149     gully     421:   else
1.152     gully     422:     WX_BUILDDIR="wxWidgets_RELEASE"
1.149     gully     423:   fi
1.152     gully     424:   mkdir -p $WX_BUILDDIR
                    425:   cd $WX_BUILDDIR
                    426:   AC_SUBST(WX_BUILDDIR)
1.136     gully     427: 
1.149     gully     428:   # remove old configure cached options
1.135     gully     429:   rm -f configarg.cache
1.136     gully     430: 
                    431:   # setup configure options
1.158     gully     432:   
                    433:   # disable unused wx features
                    434:   #   --disable-htmlhelp
                    435:   #   --disable-html
                    436:   #   --disable-docview
                    437:   #   --disable-mdi
                    438:   #   --disable-mdidoc
                    439:   #   --disable-protocols
                    440:   #   --disable-ftp
                    441:   #   --disable-http
                    442:   #   --disable-sound
1.169     quint     443:   WXCONFIGURE_TUNNING_OPTION="--disable-printarch --disable-htmlhelp --disable-html --disable-docview --disable-mdi --disable-mdidoc --disable-sound"
1.158     gully     444:   
1.135     gully     445:   if test "$OS_OPTIONS" = "-D_UNIX" ; then
                    446:     # LINUX
1.145     gully     447:     #   --enable-gtk2           use GTK+ 2.0 if available (EXPERIMENTAL)
1.158     gully     448:     #   --disable-shared        create only static library (.a)
1.145     gully     449:     #   --enable-unicode        compile wxString with Unicode support
                    450:     #   --with-gtk              use GTK+
                    451:     #   --with-opengl           use OpenGL (or Mesa)
1.158     gully     452:     WXCONFIGURE_OPTION="--with-opengl --with-gtk --enable-gtk2 --enable-unicode --enable-ipc --disable-shared  --with-libpng=builtin --with-libjpeg=builtin --with-libtiff=builtin $WXCONFIGURE_TUNNING_OPTION"
1.135     gully     453:   fi
                    454:   if test "$OS_OPTIONS" = "-D_UNIX -D_MACOS" ; then
                    455:     # MACOSX
1.155     carcone   456:     # AC_MSG_ERROR(TODO: configurer wxWidgets pour MACOSX)
1.145     gully     457:     # --with-mac              use Mac OS X
1.156     carcone   458:       with_mac="yes"
1.170   ! carcone   459:     WXCONFIGURE_OPTION="--with-opengl --disable-shared --enable-unicode --with-libpng=builtin --with-libjpeg=builtin"
1.136     gully     460:   fi
                    461:   if test $with_wxdebug = yes ; then
1.141     gully     462:     WXCONFIGURE_OPTION="$WXCONFIGURE_OPTION --enable-debug"
1.143     gully     463:     # SG: I've disabled other debug options because the lib has bugs when using these flags \
                    464:     # (maybe because these flags are not often used by wxWidgets developpers)
1.141     gully     465:     # WXCONFIGURE_OPTION="$WXCONFIGURE_OPTION --enable-debug --enable-debug_cntxt --enable-debug_gdb --enable-debug_info --enable-debug_flag --enable-mem_tracing"
1.145     gully     466:   else
                    467:     WXCONFIGURE_OPTION="$WXCONFIGURE_OPTION --enable-optimise"
1.135     gully     468:   fi
1.143     gully     469: 
1.136     gully     470:   # launch the configure
1.143     gully     471:   if test "$with_mesa" = "yes" ; then
                    472:     # use internal OpenGL (mesa) libraries
1.165     gully     473:     $WX_SRCDIR/configure CFLAGS="-I${GL_BUILDDIR}/include" CXXFLAGS="-I${GL_BUILDDIR}/include" CPPFLAGS="-I${GL_BUILDDIR}/include" $WXCONFIGURE_OPTION
1.158     gully     474:     #../$WX_SRCDIR/configure CFLAGS="-I${GL_BUILDDIR}/include" CXXFLAGS="-I${GL_BUILDDIR}/include" CPPFLAGS="-I${GL_BUILDDIR}/include" OPENGL_LIBS="-lGL -lGLU" $WXCONFIGURE_OPTION
1.145     gully     475:     if test $? != 0 ; then
                    476:       AC_MSG_ERROR(A problem occurs durring wxWidgets library configuration. Please fix the problem and try again.)
                    477:     fi
1.143     gully     478:   else
                    479:     # use OpenGL system libraries
1.165     gully     480:     $WX_SRCDIR/configure $WXCONFIGURE_OPTION    
1.143     gully     481:   fi
1.152     gully     482:   cd $OLDDIR
1.135     gully     483:   echo "---> Configuring wxWidgets library. - DONE"
1.143     gully     484: 
1.135     gully     485:   # --------- configuring wxWidgets paths --------------- #
1.152     gully     486:   WXCONFIG=$WX_BUILDDIR/wx-config
1.134     gully     487:   # check that wx-config exists
1.135     gully     488:   if test ! -f $WXCONFIG ; then
1.143     gully     489:     AC_MSG_ERROR(Cannot find wx-config. Please download wxWidgets (http://www.wxwidgets.org/))
1.134     gully     490:   fi
1.144     gully     491: 
                    492:   # setup include paths  
1.165     gully     493:   # "-I$WX_SRCDIR/src/png -I$WX_SRCDIR/src/jpeg -I$WX_SRCDIR/src/tiff" is a temporary patch to fix incorrect generated paths by wx-config --cxxflags (remove it when wxWidgets will be fixed)
                    494:   WX_INCLUDES="-I$WX_SRCDIR/src/png -I$WX_SRCDIR/src/jpeg -I$WX_SRCDIR/src/tiff `$WXCONFIG --cxxflags`"
1.124     gully     495:   AC_SUBST(WX_INCLUDES)
                    496: 
1.144     gully     497:   # setup libraries paths
                    498:   WX_LIBRARIES=""
                    499:   WX_LIBRARIES_EXTRA_PARAM=""
1.157     gully     500:   WXCONFIG_LIBS_PARAM="xrc,adv,core,xml,net"
1.132     gully     501:   # GL is used ?
1.143     gully     502:   if test "$with_gl" = "yes" -o "$with_mesa" = "yes" ; then
1.144     gully     503:     WXCONFIG_LIBS_PARAM="${WXCONFIG_LIBS_PARAM},gl"
1.132     gully     504:     # SG: this is a mistery why wx-config doesn't add these needed option on macosx
                    505:     if test "$OS_OPTIONS" = "-D_UNIX -D_MACOS" ; then
1.144     gully     506:       WX_LIBRARIES_EXTRA_PARAM="-framework OpenGL -framework AGL"
1.132     gully     507:     fi
1.124     gully     508:   fi
1.170   ! carcone   509:  if test "$with_mac" = "yes" ; then
        !           510:    WXCONFIG_LIBS_PARAM="${WXCONFIG_LIBS_PARAM},html"
        !           511:  fi
        !           512: 
1.152     gully     513:   WX_LIBRARIES="`$WXCONFIG --libs $WXCONFIG_LIBS_PARAM` ${WX_LIBRARIES_EXTRA_PARAM}"
1.144     gully     514:   AC_SUBST(WX_LIBRARIES)
1.161     gully     515:   
                    516:   WX_LINKDEPS="`$WXCONFIG --linkdeps`"
                    517:   AC_SUBST(WX_LINKDEPS)
1.124     gully     518: 
                    519:   WX_OPTIONS="-D_WX"
1.135     gully     520:   # --------- configuring wxWidgets paths - DONE --------------- #
1.132     gully     521: 
                    522:   no_graphic=yes
1.124     gully     523: fi
                    524: 
1.63      vatton    525: if test "${GCC}" = "yes"; then
                    526:    CPP="${CPP} -x c"
                    527: fi
                    528: 
1.1       cvs       529: dnl  ***************************************************************
                    530: dnl
1.61      cvs       531: dnl    SPECIFIC STUFF : CONFIGURATION OPTIONS FOR AMAYA
1.1       cvs       532: dnl
                    533: dnl  ***************************************************************
                    534: 
1.158     gully     535: # Do not care with libpng or libjpeg with wx version because we use the wxwidgets one.
                    536: if test "$with_wx" = "no" ; then
                    537:   # We don't use our graphic libraries for the pure GTK version (without GL)
                    538: 
                    539:   # if configure has option --with-graphiclibs then dont check for system graphic libs
                    540:   # force amaya static graphic libs to be used
                    541:   AC_ARG_WITH(graphiclibs, [  --with-graphiclibs      use static libjpeg, libpng.])
                    542:   if test "$with_graphiclibs" = "yes" -o "$enable_graphiclibs" = "yes" ; then
                    543:     no_graphic="no"
                    544:   else
                    545:     no_graphic="yes"
                    546:   fi
1.132     gully     547:                  
1.158     gully     548:   if test "$no_graphic" = yes; then
                    549:   dnl
                    550:       AC_MSG_CHECKING([for libjpeg version = 6b])
                    551:       AC_EGREP_CPP([x 62 *x],
                    552:           [#include <jpeglib.h>
                    553:            x JPEG_LIB_VERSION x],
                    554:   dnl
                    555:       AC_MSG_RESULT([yes])
                    556:         JPEGINCL=''
1.76      vatton    557:         LIBJPEG='-ljpeg'
                    558:         MAKEJPEG=['#'],
1.158     gully     559:   dnl
1.76      vatton    560:         AC_MSG_RESULT([no])
1.158     gully     561:         JPEGINCL='-I$(THOTDIR)/libjpeg'
1.76      vatton    562:         LIBJPEG='../libjpeg.a'      dnl LIBJPEG goes into amaya/Makefile.in
                    563:         )
1.158     gully     564:   dnl    
                    565:   dnl
1.95      vatton    566:     AC_MSG_CHECKING([for libpng version = 1.0.x or 1.2.x])
                    567:     AC_EGREP_CPP([x \"1.[02]\..*\" *x],
1.76      vatton    568:         [#include <png.h>
                    569:        x PNG_LIBPNG_VER_STRING x],
1.158     gully     570:   dnl
                    571:     AC_MSG_RESULT([yes])
                    572:         PNGINCL=''
1.76      vatton    573:         LIBPNG='-lpng'
                    574:         LIBZ=''
                    575:        MAKEPNG=['#'],
                    576: dnl
1.158     gully     577:     AC_MSG_RESULT([no])
                    578:            PNGINCL='-I$(THOTDIR)/libpng -I$(THOTDIR)/libpng/zlib'
1.76      vatton    579:         LIBPNG='../libpng.a'
                    580:         LIBZ='../libz.a'
                    581:         )
1.158     gully     582:   else
1.105     vatton    583:     JPEGINCL='-I$(THOTDIR)/libjpeg'
1.76      vatton    584:     LIBJPEG='../libjpeg.a'
1.105     vatton    585:     PNGINCL='-I$(THOTDIR)/libpng -I$(THOTDIR)/libpng/zlib'
1.76      vatton    586:     LIBPNG='../libpng.a'
                    587:     LIBZ='../libz.a'
1.158     gully     588:   fi
                    589:   dnl
                    590:   AC_SUBST(LIBJPEG)
                    591:   AC_SUBST(LIBPNG)
                    592:   AC_SUBST(LIBZ)
                    593:   AC_SUBST(MAKEJPEG)
                    594:   AC_SUBST(MAKEPNG)
                    595: fi # with_wx = no
1.76      vatton    596: 
1.166     gully     597: # the wx version
                    598: AMAYAWX_MAJVER=9
1.167     gully     599: AMAYAWX_MINVER=1
                    600: AMAYAWX_SUBVER=0
1.166     gully     601: 
                    602: #the old version (to remove when switching on wx)
                    603: AMAYA_MAJVER=8
                    604: AMAYA_MINVER=7
                    605: AMAYA_SUBVER=2
                    606: 
1.164     gully     607: if test "$with_wx" = "yes" ; then
1.166     gully     608:   APP_MAJVER=$AMAYAWX_MAJVER
                    609:   APP_MINVER=$AMAYAWX_MINVER
                    610:   APP_SUBVER=$AMAYAWX_SUBVER
                    611: else
                    612:   APP_MAJVER=$AMAYA_MAJVER
                    613:   APP_MINVER=$AMAYA_MINVER
                    614:   APP_SUBVER=$AMAYA_SUBVER
                    615: fi
1.168     gully     616: 
                    617: if test $APP_SUBVER = 0 ; then
                    618:   APP_VER=$APP_MAJVER.$APP_MINVER
                    619: else
                    620:   APP_VER=$APP_MAJVER.$APP_MINVER.$APP_SUBVER
                    621: fi
1.166     gully     622: 
                    623: # generate a header file with the right version number, so it can be used on windows AND on unix
                    624: APPVERSION_H=../thotlib/internals/h/appversion.h
                    625: echo "#ifndef __APPVERSION_H__" > $APPVERSION_H
                    626: echo "#define __APPVERSION_H__" >> $APPVERSION_H
                    627: echo "#ifdef _WX" >> $APPVERSION_H
                    628: echo "#define APP_MAJVER $AMAYAWX_MAJVER" >> $APPVERSION_H
                    629: echo "#define APP_MINVER $AMAYAWX_MINVER" >> $APPVERSION_H
                    630: echo "#define APP_SUBVER $AMAYAWX_SUBVER" >> $APPVERSION_H
                    631: echo "#else /* _WX */" >> $APPVERSION_H
                    632: echo "#define APP_MAJVER $AMAYA_MAJVER" >> $APPVERSION_H
                    633: echo "#define APP_MINVER $AMAYA_MINVER" >> $APPVERSION_H
                    634: echo "#define APP_SUBVER $AMAYA_SUBVER" >> $APPVERSION_H
                    635: echo "#endif /* _WX */" >> $APPVERSION_H
                    636: echo "#endif /* __APPVERSION_H__ */" >> $APPVERSION_H
1.1       cvs       637: 
                    638: dnl
1.6       cvs       639: dnl We use a special versoin of cextract patched for alignment
                    640: dnl to build the signatures of the modules functions located in f subdirs
                    641: dnl
                    642: CEXTRACT_VER="1.7"
                    643: CEXTRACT_FLAGS="+O"
                    644: 
1.3       cvs       645: 
                    646: dnl
1.9       cvs       647: dnl Adjust the some variables depending on the host and compiler
1.61      cvs       648: dnl Thotlib NEED signed chars !!!
1.7       cvs       649: dnl
                    650: 
                    651: if test "${CC}" = "gcc" ; then
1.44      cvs       652:   CFLAGS="${CFLAGS} -W "
1.7       cvs       653:   case "${host}" in
                    654:       *-*-irix5* | *-*irix6* )
                    655:          CFLAGS="${CFLAGS} -fsigned-char"
                    656:       ;;
                    657:   esac
1.14      cvs       658: fi
                    659: 
                    660: if test "$ac_cv_c_const" = "no" ; then
                    661:   CFLAGS="${CFLAGS} -DCONST= "
1.7       cvs       662: fi
                    663: 
1.122     gully     664: 
                    665: # force C mode (-x c)
1.123     gully     666: CFLAGS="${CFLAGS} -x c"
1.122     gully     667: 
                    668: # C++ options (-x c++)
                    669: CXX_OPTIONS="-D__cplusplus"
1.123     gully     670: CXXFLAGS="${CXXFLAGS} -W -x c++ ${CXX_OPTIONS}"
1.122     gully     671: 
1.132     gully     672: # setup LDFLAGS
                    673: # on macosx, specific flags must be set to avoid conflicts with allready installed libwww
                    674: # for exemple it's possible to install libwww with fink (fink install libwww)
                    675: # to avoid conflicts, we just force the linker to search for specified amaya path first
1.133     gully     676: if test "$OS_OPTIONS" = "-D_UNIX -D_MACOS" ; then
1.132     gully     677:   LDFLAGS="-Wl,-search_paths_first"
                    678: else
                    679:   LDFLAGS=""
                    680: fi
1.128     gully     681: 
                    682: dnl
1.61      cvs       683: dnl Check for availability of amaya sources
1.1       cvs       684: dnl
                    685: 
                    686: build_amaya="yes"
                    687: 
                    688: if test "$with_amaya" = "no" ; then
                    689:     build_amaya="no"
1.45      cvs       690: else
                    691:   if test ! -f $srcdir/amaya/Makefile.in ; then
1.1       cvs       692:     AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
                    693:     build_amaya="no"
1.45      cvs       694:   fi
1.1       cvs       695: fi
                    696: 
                    697: dnl
1.50      cvs       698: dnl Check for additionnal packages
1.1       cvs       699: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
                    700: dnl
1.93      kahan     701: 
1.143     gully     702: if test "$with_gl" = "yes" -o "$with_mesa" = "yes" ; then
                    703: 
                    704:   # if with_gl is on then test system opengl library (GL & GLU)
                    705:   if test "$with_gl" = "yes" ; then
1.139     carcone   706:        # setup a list of standard paths int LDFLAGS
                    707:        # for AC_CHECK_LIB library existance checks
1.140     carcone   708:        LIBS_OLD=$LIBS
1.139     carcone   709:        LDFLAGS_OLD=$LDFLAGS
                    710:        LDFLAGS="-L/usr/X11R6/lib -L/usr/lib -L/usr/local/lib"
1.75      cheyroul  711:        AC_MSG_CHECKING([OpenGL])
                    712:        for ac_dir in                           \
                    713:                /usr/include                    \
                    714:                /usr/X11R6/include              \
                    715:                /usr/local/include              \
                    716:                ; \
1.80      cheyroul  717:        do  if test -r "$ac_dir/GL/gl.h" ; then
1.143     gully     718:           gl_inc="yes"
                    719:           GL_INC_I="$ac_dir"
                    720:           if test "$ac_dir" != "/usr/include" ; then
                    721:             GL_INCLUDES="-I$ac_dir"
                    722:          fi
                    723:           AC_CHECK_LIB(GL,glBegin,,AC_MSG_ERROR(Cannot find OpenGL library. Please install OpenGL.))
                    724:           AC_MSG_RESULT([yes])
                    725:                  break 
                    726:         fi
                    727:        done
                    728:        
1.80      cheyroul  729:        AC_MSG_CHECKING([GLU])  
1.75      cheyroul  730:        for ac_dir in                           \
                    731:                /usr/include                    \
                    732:                /usr/X11R6/include              \
                    733:                /usr/local/include              \
                    734:                ; \
1.138     gully     735:        do  if test -r "$ac_dir/GL/glu.h" ; then
1.143     gully     736:           glu_inc="yes"
                    737:           GL_INC_II="$ac_dir"
                    738:           if test "$ac_dir" != "/usr/include" ; then
                    739:             if test "$ac_dir" != "$GL_INC_I" ; then
                    740:               GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
                    741:             fi
                    742:           fi
                    743:           # now test that glu version is >= 1.2
                    744:           AC_CHECK_LIB(GLU,gluNewTess,,AC_CHECK_LIB(glu32,gluNewTess,,AC_MSG_ERROR(Cannot find OpenGL GLU lib or existing version is < 1.2. Pease upgrade your GLU library.)))
                    745:           AC_MSG_RESULT([yes])
                    746:                  break 
                    747:         fi
                    748:         done
1.139     carcone   749:        LDFLAGS=$LDFLAGS_OLD
1.140     carcone   750:        LIBS=$LIBS_OLD
1.143     gully     751:     if test "$gl_inc" = "" ; then              
                    752:       AC_MSG_WARN(Opengl headers (gl.h) not found !!)
                    753:       AC_MSG_WARN(Disabling opengl build !)
                    754:       with_gl="no"
                    755:       GL_OPTIONS=      
                    756:       GL_INCLUDES=     
                    757:       GL_LIBRARIES=
                    758:       exit 1;
                    759:     fi
                    760: 
                    761:     if test "$glu_inc" = "" ; then
                    762:       AC_MSG_WARN(Glu headers (glu.h) not found !!)
                    763:       AC_MSG_WARN(Disabling opengl build !)
                    764:   
                    765:       with_gl="no"
                    766:       GL_OPTIONS=      
                    767:       GL_INCLUDES=     
                    768:       GL_LIBRARIES=
                    769:       exit 1;
                    770:     fi
                    771:     
                    772:     GL_LIBRARIES="-L/usr/lib -L/usr/X11R6/lib -lGL -lGLU"
                    773:     GL_OPTIONS="-D_GL"
                    774: 
                    775:     AC_SUBST(GL_INCLUDES)
                    776:     AC_SUBST(GL_LIBRARIES)
                    777:   fi # if with_gl
1.139     carcone   778:        
1.143     gully     779:   # check for gtkglarea.h only if gtk gui is selected
                    780:   if test "$with_gtk" = "yes" ; then
                    781:     AC_MSG_CHECKING([GTKGLAREA])
                    782:     for ac_dir in                              \
1.132     gully     783:                /usr/include/GL                 \
1.75      cheyroul  784:                /usr/include                    \
                    785:                /usr/X11R6/include/GL           \
                    786:                /usr/X11R6/include              \
                    787:                /usr/local/include              \
                    788:                /usr/local/include/GL           \
                    789:                ; \
1.143     gully     790:     do  if test -r "$ac_dir/gtkgl/gtkglarea.h" ; then
                    791:       gtkgl_inc="yes"
                    792:         if test "$ac_dir" != "/usr/include" ; then
                    793:           if test "$ac_dir" != "$GL_INC_II" ; then
                    794:             if test "$ac_dir" != "$GL_INC_I" ; then
                    795:               GTK_GL_INCLUDES="-I$ac_dir"
                    796:             fi
                    797:           fi
                    798:         fi
                    799:         AC_MSG_RESULT([yes])
                    800:         break  
                    801:     fi
                    802:     done
                    803:     GTK_GL_LIBRARIES="-lgtkgl"
                    804: 
                    805:     if test "$gtkgl_inc" = "" ; then
                    806:       AC_MSG_WARN(Gtkglarea headers (gktglarea.h) not found !!)
                    807:       AC_MSG_WARN(Disabling opengl build !)
                    808:       with_gl="no"
                    809:       exit 1;
                    810:     fi
                    811:     AC_SUBST(GTK_GL_INCLUDES)
                    812:     AC_SUBST(GTK_GL_LIBRARIES)
                    813:   fi
1.132     gully     814: 
1.143     gully     815:   # checking for freetype lib (fonts library)
                    816:   if test ! -f $(which freetype-config) ; then
                    817:     AC_MSG_ERROR(Cannot find freetype library (font load/display routines). Please install it.)
                    818:   fi
                    819:   FREETYPE_INCLUDES=`freetype-config --cflags`
                    820:   FREETYPE_LIBRARIES=`freetype-config --libs`
                    821:   AC_SUBST(FREETYPE_INCLUDES)
                    822:   AC_SUBST(FREETYPE_LIBRARIES)
                    823: 
                    824: 
                    825:   # checking for xft lib
                    826:   # (not used because xft-config doesn't exist on debian stable)
                    827:   #if test ! -f $(which xft-config) ; then
                    828:   #  AC_MSG_ERROR(Cannot find Xft library. Please install it.)
                    829:   #fi
                    830:   #XFT_INCLUDES=`xft-config --cflags`
                    831:   #XFT_LIBRARIES=`xft-config --libs`
                    832:   #AC_SUBST(XFT_INCLUDES)
                    833:   #AC_SUBST(XFT_LIBRARIES)
                    834: 
                    835:   # START CHECKING XFT #
                    836:   # checking for Xft (old way)
                    837:   AC_MSG_CHECKING([Xft])
                    838:   for ac_dir in                        \
1.104     cheyroul  839:                /usr/include                    \
                    840:                /usr/X11R6/include              \
                    841:                /usr/local/include              \
                    842:                /usr/include/X11/Xft            \
                    843:                /usr/X11R6/include/X11/Xft      \
                    844:                /usr/local/include/X11/Xft      \
                    845:                /usr/include/X11/Xft1           \
                    846:                /usr/X11R6/include/X11/Xft1     \
1.113     vatton    847:                /usr/include/Xft2/X11/Xft/      \
1.104     cheyroul  848:                /usr/local/include/X11/Xft1     \
                    849:                /usr/include/X11/Xft2           \
                    850:                /usr/X11R6/include/X11/Xft2     \
                    851:                /usr/local/include/X11/Xft2     \
                    852:                ; \
1.143     gully     853:   do  if test -r "$ac_dir/Xft.h" ; then
                    854:     xft_inc="yes"
                    855:     XFT_INCLUDES="-I$ac_dir"
                    856:     AC_MSG_RESULT([yes])       
                    857:     break      
                    858:   fi
                    859:   done 
                    860:   if test "$xft_inc" = "" ; then
                    861:     AC_MSG_WARN(Xft 2 headers (Xft.h) not found !!)
                    862:     AC_MSG_WARN(Disabling opengl build !)
                    863:       with_gl="no"
                    864:       exit 1;
                    865:   fi
                    866: 
                    867:   AC_MSG_CHECKING([Xft-library])
1.155     carcone   868:  
                    869: if test "$with_mac" = "yes" ; then
                    870:   for ac_dir in                        \
                    871:                /usr/lib                        \
                    872:                /usr/X11R6/lib                  \
                    873:                /opt/local/lib                  \
                    874:                ; \
                    875:   do  if test -r "$ac_dir/libXft.2.dylib" ; then
                    876:     xft_lib="yes"
                    877:     XFT_LIBRARIES="-L$ac_dir -lXft"
                    878:     AC_MSG_RESULT([yes])
                    879:     break      
                    880:   fi
                    881:   done 
                    882:   if test "$xft_lib" = "" ; then
                    883:     AC_MSG_WARN(Xft.2 library (libXft.2.dylib) not found !!)
                    884:     AC_MSG_WARN(Disabling opengl build !)
                    885:       with_gl="no"
                    886:       exit 1;
                    887:   fi
                    888: else
1.143     gully     889:   for ac_dir in                        \
                    890:                /usr/lib                        \
                    891:                /usr/X11R6/lib                  \
                    892:                /usr/local/lib                  \
                    893:                ; \
                    894:   do  if test -r "$ac_dir/libXft.so" ; then
                    895:     xft_lib="yes"
                    896:     XFT_LIBRARIES="-L$ac_dir -lXft"
                    897:     AC_MSG_RESULT([yes])
                    898:     break      
                    899:   fi
                    900:   done 
                    901:   if test "$xft_lib" = "" ; then
                    902:     AC_MSG_WARN(Xft 2 librarie (libXft.so) not found !!)
                    903:     AC_MSG_WARN(Disabling opengl build !)
                    904:       with_gl="no"
                    905:       exit 1;
                    906:   fi
1.155     carcone   907: fi
                    908: 
1.143     gully     909:   AC_SUBST(XFT_INCLUDES)
                    910:   AC_SUBST(XFT_LIBRARIES)
                    911:   # END CHECKING XFT #
                    912: 
                    913: 
                    914:   AC_MSG_CHECKING([gcc3])      
                    915:   for ac_dir in                        \
1.96      cheyroul  916:                /usr/lib                        \
                    917:                /usr/X11R6/lib          \
                    918:                /usr/local/lib          \
                    919:                ; \
1.143     gully     920:   do  if test -r "$ac_dir/libstdc++.so.5" ; then
                    921:     stdglu_inc="yes"
                    922:     STDCPP_LIBRARIES="-lstdc++"
                    923:     STDCPP_INCLUDES=""
                    924:     AC_MSG_RESULT([yes])       
                    925:     break
                    926:   fi
                    927:   done
1.159     gully     928: 
                    929: # not used in makefiles
                    930: #  AC_SUBST(STDCPP_INCLUDES)
                    931: #  AC_SUBST(STDCPP_LIBRARIES)
1.143     gully     932: 
                    933:   NOPRINT=""
                    934:   PRINTIFNOTGL=" print_prog"
                    935: 
                    936: else # if with_gl or with_mesa
                    937: 
                    938:   NOPRINT=""
                    939:   PRINTIFNOTGL=" print_prog"
1.132     gully     940: 
1.143     gully     941: fi # if with_gl or with_mesa
1.132     gully     942: 
1.97      cheyroul  943: AC_SUBST(PRINTIFNOTGL)
1.112     cheyroul  944: AC_SUBST(NOPRINT)
                    945: 
1.76      vatton    946: 
                    947: AC_ARG_ENABLE(svg,           [  --disable-svg           remove SVG support ])
                    948: AC_ARG_ENABLE(annot,         [  --disable-annot         remove Annotations support ])
1.146     kahan     949: AC_ARG_ENABLE(redland,       [  --disable-redland       disable the redland RDF library ])
1.116     kahan     950: AC_ARG_ENABLE(system-redland,       [  --enable-system-redland try the redland RDF system library ])
1.108     kahan     951: AC_ARG_ENABLE(bookmarks,     [  --enable-bookmarks      enables experimental bookmark support ])
1.76      vatton    952: AC_ARG_ENABLE(generic-xml,   [  --disable-generic-xml   remove Generic XML support ])
                    953: 
1.75      cheyroul  954: dnl
1.21      cvs       955: dnl plugins support is disabled by default
1.8       cvs       956: dnl
1.13      cvs       957: 
                    958: if test "$with_plugin" = "" ; then
1.21      cvs       959:   if test "$enable_plugin" = "yes" ; then
1.55      kahan     960:     with_plugin="yes"
1.21      cvs       961:   else
1.17      cvs       962:     with_plugin="no"
                    963:   fi
1.10      cvs       964: fi  
1.1       cvs       965: 
1.8       cvs       966: dnl
1.68      vatton    967: dnl svg is enabled by default
1.26      cvs       968: dnl
1.68      vatton    969: if test "$with_svg" = "" ; then
                    970:     if test "$enable_svg" = "no" ; then
                    971:        with_svg="no"
1.49      cvs       972:     else
1.68      vatton    973:        with_svg="yes"
1.26      cvs       974:     fi
                    975: fi
                    976: 
                    977: dnl
1.56      kahan     978: dnl annotations is enabled by default
1.47      cvs       979: dnl
                    980: if test "$with_annot" = "" ; then
1.56      kahan     981:     if test "$enable_annot" = "no" ; then
                    982:        with_annot="no"
                    983:     else
1.54      cvs       984:        with_annot="yes"
1.47      cvs       985:     fi
1.99      kahan     986: else
                    987:     with_annot="yes"
1.47      cvs       988: fi
                    989: 
1.93      kahan     990: 
                    991: dnl
1.146     kahan     992: dnl The redland library is enabled by default
1.93      kahan     993: dnl
1.146     kahan     994: if test "$with_redland" = "" ; then
                    995:     if test "$enable_redland" = "no" ; then
                    996:        with_redland="no"
1.93      kahan     997:     else
1.109     kahan     998:        with_redland="yes"
                    999:     fi
                   1000: else
1.146     kahan    1001:     with_redland="yes"
1.109     kahan    1002: fi
                   1003: 
                   1004: dnl
1.116     kahan    1005: dnl The redland library is disabled by default
                   1006: dnl
                   1007: if test "$with_system_redland" = "" ; then
                   1008:     if test "$enable_system_redland" = "yes" ; then
                   1009:        with_redland="yes"
                   1010:        with_system_redland="yes"
                   1011:     else
                   1012:        with_system_redland="no"
                   1013:     fi
                   1014: else
                   1015:     with_system_redland="no"
                   1016: fi
                   1017: 
                   1018: dnl
                   1019: dnl The bookmarks support is disabled by default
1.108     kahan    1020: dnl
                   1021: if test "$with_bookmarks" = "" ; then
                   1022:     if test "$enable_bookmarks" = "yes" ; then
                   1023:        with_bookmarks="yes"
1.125     vatton   1024:        with_redland="yes"
1.108     kahan    1025:     else
                   1026:        with_bookmarks="no"
                   1027:     fi
                   1028: else
                   1029:     with_bookmarks="no"
                   1030: fi
                   1031: 
                   1032: dnl
1.70      kahan    1033: dnl Generic XML support enabled by default
                   1034: dnl
                   1035: if test "$with_generic_xml" = "" ; then
                   1036:     if test "$enable_generic_xml" = "no" ; then
                   1037:        with_generic_xml="no"
                   1038:        GENERIC_XML_OPTIONS=
                   1039:     else
                   1040:        with_generic_xml="yes"
                   1041:        GENERIC_XML_OPTIONS=-DXML_GENERIC
                   1042:     fi
                   1043: fi
                   1044: 
1.120     gully    1045: AC_ARG_WITH(dav,            [  --with-dav              enable WebDAV support (experimental) ])
1.88      kirschpi 1046: dnl
                   1047: dnl DAV support disabled by default
                   1048: dnl
                   1049: if test "$with_dav" = "" ; then
                   1050:   if test "$enable_dav" = "yes" ; then
                   1051:     with_dav="yes"
                   1052:   else
                   1053:     with_dav="no"
                   1054:   fi
                   1055: fi  
                   1056: 
                   1057: if test "$with_dav" = "yes" ; then
                   1058:    DAV_OPTIONS=-DDAV
1.90      kirschpi 1059:    DAVDIR="davlib"
                   1060:    LIBDAV="libwwwdav"
                   1061:    WITHDAV="--with-dav" 
                   1062:    WWWDAV="-lwwwdav" 
1.88      kirschpi 1063: else
                   1064:    with_dav="no"
                   1065:    DAV_OPTIONS=""
1.90      kirschpi 1066:    DAVDIR=""
                   1067:    LIBDAV=""
                   1068:    WITHDAV="" 
                   1069:    WWWDAV="" 
1.88      kirschpi 1070: fi
                   1071: 
1.70      kahan    1072: 
1.19      cvs      1073: if test "$build_amaya" = "yes" ; then
1.43      cvs      1074:     if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50      cvs      1075:        AC_MSG_WARN(libwww sources not found !!)
                   1076:        AC_MSG_WARN(Disabling Amaya build !)
                   1077:        build_amaya="no"
1.1       cvs      1078:     fi
1.8       cvs      1079: 
                   1080:     if test ! -f $srcdir/amaya/MathML.S ; then
1.10      cvs      1081:        if test "$with_math" = "yes" ; then
1.8       cvs      1082:            AC_MSG_WARN(MathML sources not found !!)
1.26      cvs      1083:            AC_MSG_WARN(Disabling Math build !)
1.10      cvs      1084:            with_math="no"
                   1085:            MATH_OPTIONS=
1.8       cvs      1086:        fi
                   1087:     fi
1.26      cvs      1088: 
1.68      vatton   1089:     if test ! -f $srcdir/amaya/SVG.S ; then
                   1090:        if test "$with_svg" = "yes" ; then
                   1091:            AC_MSG_WARN(SVG sources not found !!)
                   1092:            AC_MSG_WARN(Disabling SVG build !)
                   1093:            with_svg="no"
                   1094:            SVG_OPTIONS=
1.26      cvs      1095:        fi
                   1096:     fi
                   1097: 
1.48      cvs      1098:     if test ! -f $srcdir/annotlib/Makefile.in ; then
1.47      cvs      1099:        if test "$with_annot" = "yes" ; then
                   1100:            AC_MSG_WARN(Annotation makefile not found !!)
                   1101:            AC_MSG_WARN(Disabling Annotations build !)
                   1102:            with_annot="no"
                   1103:        fi
                   1104:     fi
1.55      kahan    1105: 
1.146     kahan    1106:     if test "$with_redland" = "yes" -a "$with_annot" = "no" -a "$with_bookmarks" = "no"; then
                   1107:        AC_MSG_WARN(Disabling redland as neither annotations nor bookmarks are enabled !)
1.93      kahan    1108:        MAKERAPTOR=['#']
                   1109:        with_raptor="no"
                   1110:     fi
                   1111: 
1.116     kahan    1112:     redland_compile_source=yes
                   1113:     if test "$with_redland" = "yes" -a "$with_system_redland" = "yes" ; then
                   1114:        # check to see if we have a redland library
                   1115:        AC_MSG_CHECKING(system redland library)
1.142     kahan    1116:        redland_min_version=0.9.16
1.116     kahan    1117:        REDLAND_CONFIG="redland-config"
                   1118:        REDLAND_VERSION=`$REDLAND_CONFIG --version`
                   1119:        redland_version_dec=`echo $REDLAND_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
                   1120:        redland_min_version_dec=`echo $redland_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
                   1121:        if test $redland_version_dec -lt $redland_min_version_dec; then
                   1122:          AC_MSG_RESULT(no - found version $REDLAND_VERSION and minimal version is $redland_min_version)
                   1123:        else
                   1124:          AC_MSG_RESULT(yes - found version $REDLAND_VERSION)
                   1125:         AC_MSG_CHECKING(checking for redland headers)
1.117     kahan    1126:         dnl  We should use awk here and remove the -I from the following line
                   1127:          dnl REDLAND_HEADERS=`$REDLAND_CONFIG --cflags`
                   1128:         REDLAND_HEADERS=""
                   1129:         if test -e "/usr/include/redland.h" ; then
                   1130:           REDLAND_HEADERS="/usr/include";
                   1131:         else 
                   1132:            if test -e "/usr/local/include/redland.h" ; then
                   1133:             REDLAND_HEADERS="/usr/local/include";
                   1134:            fi
                   1135:          fi        
                   1136:         if test $REDLAND_HEADERS != ""; then
1.116     kahan    1137:            AC_MSG_RESULT(yes - have development version)
                   1138:            redland_compile_source=no
                   1139:         else
                   1140:            AC_MSG_RESULT(no - no development version)
                   1141:          fi
                   1142:        fi
                   1143:     fi
                   1144: 
                   1145:     if test "$with_redland" = "yes" -a "$redland_compile_source" = "yes" \
                   1146:        -a ! -d "$srcdir/../redland" ; then
1.109     kahan    1147:        AC_MSG_WARN(Redland source dir not found !!)
                   1148:        AC_MSG_WARN(Disabling redland build !)
                   1149:        MAKEREDLAND=['#']
                   1150:        with_redland="no"
                   1151:     fi
                   1152: 
                   1153:     if test "$with_redland" = "yes" ; then
1.116     kahan    1154:        AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DLIBRDF_INTERNAL=1 -DAM_REDLAND -DRAPTOR_RDF_PARSER"
                   1155:        if test "$redland_compile_source" = "yes" ; then
                   1156:          AMAYA_RAPTOR_SRC="amaya_comp_redland"
                   1157:          AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
                   1158:          AMAYA_RAPTOR_LIBS="../redland/librdf/.libs/librdf.a ../redland/raptor/.libs/libraptor.a"
                   1159:          AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
                   1160:        else
                   1161:          MAKEREDLAND=['#']
                   1162:         AMAYA_RAPTOR_SRC=
                   1163:         redland_includes=`$REDLAND_CONFIG --cflags`
                   1164:         redland_libs=`$REDLAND_CONFIG --libs`
                   1165:          AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS"
                   1166:          AMAYA_ANNOT_INCLUDES="$redland_includes -I\$(THOTDIR)/thotlib/include"
                   1167:          AMAYA_ANNOT_EXTRA_LIBS="$redland_libs"
                   1168:          AMAYA_RAPTOR_INCLUDES="$redland_includes"
                   1169:        fi
1.109     kahan    1170:     fi
                   1171: 
1.116     kahan    1172: 
1.108     kahan    1173:     dnl control whether we should build the bookmarks support
1.146     kahan    1174:     if test "$with_annot" = "yes" -a "$with_redland" = "no" ; then
                   1175:        AC_MSG_WARN(Disabling annotations build as redland is disabled !)
1.148     kahan    1176:        with_annot="no"
1.146     kahan    1177:     fi
1.108     kahan    1178:     if test "$with_bookmarks" = "yes" -a "$with_annot" = "no" ; then
                   1179:        AC_MSG_WARN(Disabling bookmarks build as annotations are disabled !)
                   1180:        with_bookmarks="no"
                   1181:     fi
1.109     kahan    1182:     if test "$with_bookmarks" = "yes" -a "$with_redland" = "no" ; then
                   1183:        AC_MSG_WARN(Disabling bookmarks build as redland is disabled !)
1.108     kahan    1184:        with_bookmarks="no"
                   1185:     fi
                   1186:     if test "$with_bookmarks" = "yes" ; then
                   1187:        ANNOTLIB_COMPILE_BM=
                   1188:        AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DBOOKMARKS"
                   1189:     else
                   1190:        ANNOTLIB_COMPILE_BM=['#']
                   1191:     fi
                   1192: 
1.55      kahan    1193:     if test "$with_plugin" = "yes" ; then
                   1194:         AC_MSG_WARN(The plugin library isn't supported anymore in Amaya !!)
                   1195:        AC_MSG_WARN(Disabling plugin build !)
                   1196:        with_plugin="no"
                   1197:     fi
                   1198: 
1.88      kirschpi 1199: 
                   1200:     if test ! -f $srcdir/davlib/Makefile.in ; then
                   1201:        if test "$with_dav" = "yes" ; then
                   1202:            AC_MSG_WARN(WebDAV makefile not found !!)
                   1203:            AC_MSG_WARN(Disabling WebDAV build !)
                   1204:            with_dav="no"
1.90      kirschpi 1205:             DAVDIR=""
                   1206:             LIBDAV=""
                   1207:             WITHDAV="" 
                   1208:             WWWDAV="" 
1.88      kirschpi 1209:        fi
                   1210:     fi
                   1211:    
                   1212: 
1.1       cvs      1213: fi
                   1214: 
                   1215: dnl
                   1216: dnl The options for each library or binary
                   1217: dnl
                   1218: 
1.134     gully    1219: THOT_OPTIONS="$OS_OPTIONS $GTK_OPTIONS $GL_OPTIONS $WX_OPTIONS $NOGUI_OPTIONS"
                   1220: AMAYA_OPTIONS="$OS_OPTIONS $MATH_OPTIONS $SVG_OPTIONS $GENERIC_XML_OPTIONS $GTK_OPTIONS $GL_OPTIONS $WX_OPTIONS $NOGUI_OPTIONS"
1.58      cvs      1221: #PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
1.129     vatton   1222: AMAYA_ANNOT_OPTIONS="$OS_OPTIONS $AMAYA_ANNOT_OPTIONS"
1.101     kahan    1223: 
1.158     gully    1224: if test "$with_wx" = "yes" ; then
                   1225:   IMGLIBS=""
                   1226: else
                   1227:   IMGLIBS="-ljpeg -lpng -lz"
                   1228: fi
1.132     gully    1229: 
1.3       cvs      1230: EXTRA_LIBS=
1.131     gully    1231: EXTRA_INCLUDES=
                   1232: 
                   1233: # check for malloc.h
                   1234: # on macosx, this file is not at the right place
                   1235: for ac_dir in               \
                   1236:   /usr/include/malloc/      \
                   1237:   /sw/include/malloc/       \
                   1238:   ; \
                   1239: do
                   1240:   if test -r "$ac_dir/malloc.h"; then
                   1241:     echo "found malloc.h"
                   1242:     EXTRA_INCLUDES="${EXTRA_INCLUDES} -I$ac_dir"
                   1243:     break
                   1244:   fi
                   1245: done
1.1       cvs      1246: 
                   1247: dnl
                   1248: dnl Set up the PATHs needed
                   1249: dnl
                   1250: 
                   1251: API="\$(THOTDIR)/thotlib/include"
                   1252: VAR="\$(THOTDIR)/thotlib/internals/var"
                   1253: INCL="\$(THOTDIR)/thotlib/internals/h"
                   1254: FUNC="\$(THOTDIR)/thotlib/internals/f"
                   1255: 
                   1256: dnl
                   1257: dnl Set up the include variables.
                   1258: dnl
                   1259: 
1.61      cvs      1260: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58      cvs      1261: APIINCLUDES=-I${API}
                   1262:  
                   1263: if test "${VPATHOPT}" = "" ; then
1.1       cvs      1264:        VPATHOPT="VPATH"
                   1265: fi
                   1266: 
                   1267: dnl
                   1268: dnl Exports the current values of the variables.
                   1269: dnl
                   1270: 
1.166     gully    1271: AC_SUBST(APP_MAJVER)
                   1272: AC_SUBST(APP_MINVER)
                   1273: AC_SUBST(APP_SUBVER)
                   1274: AC_SUBST(APP_VER)
1.6       cvs      1275: AC_SUBST(CEXTRACT_VER)
                   1276: AC_SUBST(CEXTRACT_FLAGS)
1.1       cvs      1277: 
                   1278: AC_SUBST(THOTINCLUDES)
                   1279: AC_SUBST(APIINCLUDES)
                   1280: AC_SUBST(VPATHOPT)
                   1281: 
1.63      vatton   1282: AC_SUBST(GTK_OPTIONS)
1.1       cvs      1283: AC_SUBST(THOT_OPTIONS)
                   1284: AC_SUBST(AMAYA_OPTIONS)
                   1285: AC_SUBST(PLUGIN_OPTIONS)
1.48      cvs      1286: AC_SUBST(AMAYA_ANNOT_OPTIONS)
1.110     kahan    1287: AC_SUBST(AMAYA_ANNOT_INCLUDES)
1.116     kahan    1288: AC_SUBST(AMAYA_ANNOT_EXTRA_LIBS)
1.1       cvs      1289: AC_SUBST(IMGLIBS)
1.3       cvs      1290: AC_SUBST(EXTRA_LIBS)
1.131     gully    1291: AC_SUBST(EXTRA_INCLUDES)
1.90      kirschpi 1292: 
                   1293: AC_SUBST(DAVDIR)
                   1294: AC_SUBST(LIBDAV)
                   1295: AC_SUBST(WITHDAV)
                   1296: AC_SUBST(WWWDAV)
1.1       cvs      1297: 
1.93      kahan    1298: AC_SUBST(MAKERAPTOR)
1.109     kahan    1299: AC_SUBST(MAKEREDLAND)
1.108     kahan    1300: AC_SUBST(ANNOTLIB_COMPILE_BM)
1.109     kahan    1301: AC_SUBST(AMAYA_RAPTOR_SRC)
1.93      kahan    1302: AC_SUBST(AMAYA_RAPTOR_LIBS)
                   1303: AC_SUBST(AMAYA_RAPTOR_INCLUDES)
                   1304: AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
                   1305: AC_SUBST(LIBWWW_RDF_PARSER)
                   1306: 
                   1307: AC_SUBST(SUBDIRS)
                   1308: 
1.1       cvs      1309: dnl
1.48      cvs      1310: dnl Include the option Makefile.xxx fragment according to the configure options
1.1       cvs      1311: dnl
                   1312: 
                   1313: if test "$with_plugin" = "yes" ; then
1.50      cvs      1314:     AC_SUBST_FILE(plugin_frag)
1.1       cvs      1315:     plugin_frag=$srcdir/pluginlib/Makefile.plugin
                   1316: else
                   1317:     AC_SUBST_FILE(plugin_frag)
                   1318:     plugin_frag=/dev/null
                   1319: fi
                   1320: 
                   1321:     AC_SUBST_FILE(www_frag)
1.49      cvs      1322:     www_frag=$srcdir/amaya/Makefile.libwww
1.1       cvs      1323: 
1.50      cvs      1324: if test "$with_math" = "no" ; then
1.10      cvs      1325:     AC_SUBST_FILE(math_frag)
1.50      cvs      1326:     math_frag=/dev/null
1.8       cvs      1327: else
1.10      cvs      1328:     AC_SUBST_FILE(math_frag)
1.50      cvs      1329:     math_frag=$srcdir/amaya/Makefile.math
1.8       cvs      1330: fi
                   1331: 
1.68      vatton   1332: if test "$with_svg" = "no" ; then
                   1333:     AC_SUBST_FILE(svg_frag)
                   1334:     svg_frag=/dev/null
1.26      cvs      1335: else
1.68      vatton   1336:     AC_SUBST_FILE(svg_frag)
                   1337:     svg_frag=$srcdir/amaya/Makefile.svg
1.26      cvs      1338: fi
                   1339: 
1.47      cvs      1340: if test "$with_annot" = "yes" ; then
                   1341:     AC_SUBST_FILE(annot_frag)
1.48      cvs      1342:     annot_frag=$srcdir/annotlib/Makefile.annot
1.47      cvs      1343: else
                   1344:     AC_SUBST_FILE(annot_frag)
                   1345:     annot_frag=/dev/null
                   1346: fi
                   1347: 
1.88      kirschpi 1348: if test "$with_dav" = "yes" ; then
                   1349:     AC_SUBST_FILE(dav_frag)
                   1350:     dav_frag=$srcdir/davlib/Makefile.dav
                   1351: fi
1.16      cvs      1352: 
1.1       cvs      1353: dnl  ***************************************************************
                   1354: dnl
                   1355: dnl      FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
                   1356: dnl
                   1357: dnl  ***************************************************************
                   1358: 
                   1359: EXTRA_MAKEFILE_IN=
1.2       cvs      1360: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1       cvs      1361:        libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2       cvs      1362:        tools/mkdep/Makefile \
1.1       cvs      1363:        tools/cextract-1.7/Makefile thotlib/Makefile \
1.127     vatton   1364:        thotlib/include/Makefile batch/Makefile"
1.1       cvs      1365: 
                   1366: if test "$build_amaya" = "yes" ; then
1.2       cvs      1367: 
1.19      cvs      1368:     make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2       cvs      1369:     EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.93      kahan    1370:     $srcdir/amaya/Makefile.libwww"
1.27      cvs      1371: 
1.162     gully    1372:     if test "$with_plugin" = "yes" ; then
1.27      cvs      1373:        make_output="$make_output pluginlib/Makefile"
                   1374:        EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.93      kahan    1375:        $srcdir/pluginlib/Makefile.plugin"
1.27      cvs      1376:     fi
1.2       cvs      1377: 
1.48      cvs      1378:     if test "$with_annot" = "yes" ; then
                   1379:        make_output="$make_output annotlib/Makefile"
                   1380:        EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
                   1381:     fi
1.88      kirschpi 1382: 
                   1383:     if test "$with_dav" = "yes" ; then
                   1384:        make_output="$make_output davlib/Makefile"
                   1385:        EXTRA_MAKEFILE_IN="$srcdir/davlib/Makefile.in"
                   1386:     fi
                   1387: 
1.162     gully    1388:     if test "$with_wx" = "yes" ; then
                   1389:        EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN $WX_SRCDIR/Makefile.in $WX_SRCDIR/configure.in"
                   1390:     fi
                   1391: 
1.1       cvs      1392: fi
                   1393: 
                   1394: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6       cvs      1395: AC_OUTPUT($make_output , [
                   1396: dnl
                   1397: dnl This fragment of shell code is executed after the
                   1398: dnl Makefile(s) dump ...
                   1399: dnl
                   1400: 
                   1401: echo timestamp > stamp-h
                   1402: 
                   1403: dnl
                   1404: dnl Check for an upgrade in the Options numbers
                   1405: dnl
                   1406: 
                   1407: if test -f Options ; then
                   1408:    oldversion=`grep Version Options`
                   1409:    newversion=`grep Version Options.orig`
                   1410:    if test "$oldversion" != "$newversion" ; then
                   1411:        echo WARNING : Options files have changed, old options saved to Options.old
                   1412:        cp Options Options.old
                   1413:        cp Options.orig Options
                   1414:        exit 1
                   1415:    fi
                   1416: fi
                   1417: ])
1.1       cvs      1418: 
                   1419: if test "$build_amaya" = "yes" ; then
1.164     gully    1420:     echo Amaya $AMAYA_VER configured
1.50      cvs      1421:     echo Amaya configured with libWWW
                   1422:     if test "$with_plugin" = "yes" ; then
                   1423:         echo Amaya configured with Plugins support
1.8       cvs      1424:     fi
1.10      cvs      1425:     if test "$with_math" = "yes" ; then
                   1426:        echo Amaya configured with Math support
1.26      cvs      1427:     fi
1.68      vatton   1428:     if test "$with_svg" = "yes" ; then
                   1429:        echo Amaya configured with SVG support
1.47      cvs      1430:     fi
                   1431:     if test "$with_annot" = "yes" ; then
                   1432:        echo Amaya configured with Annotations support
1.70      kahan    1433:     fi
1.93      kahan    1434:     if test "$with_raptor" = "yes" ; then
1.106     kahan    1435:        echo Amaya configured with the Raptor RDF parser
1.109     kahan    1436:     fi
                   1437:     if test "$with_redland" = "yes" ; then
1.116     kahan    1438:        if test "$with_system_redland" = "no" ; then
                   1439:          echo Amaya configured with the Redland RDF library \(local source\)
                   1440:        else
                   1441:          echo Amaya configured with the Redland RDF library \(system\)
                   1442:        fi
1.108     kahan    1443:     fi
                   1444:     if test "$with_bookmarks" = "yes" ; then
                   1445:        echo Amaya configured with bookmarks support \(experimental\)
1.93      kahan    1446:     fi
1.70      kahan    1447:     if test "$with_generic_xml" = "yes" ; then
                   1448:        echo Amaya configured with generic XML suppport
                   1449:     fi
1.129     vatton   1450:     echo Amaya configured with internationalization suppport
1.75      cheyroul 1451:     if test "$with_gl" = "yes" ; then
1.143     gully    1452:        echo Amaya configured with OpenGL Canvas Rendering \(System library\) \(experimental\)
                   1453:     fi
                   1454:     if test "$with_mesa" = "yes" ; then
                   1455:        echo Amaya configured with OpenGL Canvas Rendering \(MesaLib\) \(experimental\)
1.88      kirschpi 1456:     fi
                   1457:     if test "$with_dav" = "yes" ; then
                   1458:        echo Amaya configured with WebDAV support \(experimental\)
1.1       cvs      1459:     fi
1.5       cvs      1460: fi
                   1461: 
1.158     gully    1462: if test "$with_wx" = "no" ; then
                   1463:   if test "$no_graphic" = "yes" ; then
                   1464:       echo "Amaya configured with system graphic libraries (libjpeg, libpng, zlib)"
                   1465:   else
                   1466:       echo "Amaya configured with static graphic libraries (libjpeg, libpng, zlib)"
                   1467:       if test "$with_gtk" = "yes" -o "$with_gl" = "yes" ; then
                   1468:         echo "  N.B. This option may not work in your platform. If Amaya crashes"
                   1469:         echo "  when opening a PNG file. Recompile it using the system libraries."
                   1470:       fi
                   1471:   fi
1.107     kahan    1472: fi
                   1473: 
                   1474: if test "$with_gtk" = "yes" ; then
1.67      vatton   1475:     echo "Amaya configured with GTK"
1.120     gully    1476: fi
                   1477: 
1.124     gully    1478: if test "$with_wx" = "yes" ; then
1.136     gully    1479:   if test "$with_wxdebug" = "yes" ; then
1.153     gully    1480:     echo "Amaya configured with wxWidgets {srcdir=$WX_SRCDIR} (debug) (experimental)"
1.136     gully    1481:   else
1.153     gully    1482:     echo "Amaya configured with wxWidgets {srcdir=$WX_SRCDIR} (experimental)"
1.136     gully    1483:   fi
1.1       cvs      1484: fi
                   1485: 
1.121     gully    1486: if test "$with_nogui" = "yes" ; then
1.128     gully    1487:   echo "Amaya configured without GUI toolkit"
1.121     gully    1488: fi
1.136     gully    1489: 
                   1490: 
1.107     kahan    1491: echo ""
1.78      vatton   1492: echo "Now type \"make\" (GNU make preferably) to build the binaries"
1.107     kahan    1493: echo ""
1.120     gully    1494: 

Webmaster