Annotation of Amaya/configure.in, revision 1.174

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

Webmaster