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