Annotation of Amaya/configure.in, revision 1.176

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

Webmaster