Annotation of Amaya/configure.in, revision 1.225

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

Webmaster