Annotation of Amaya/configure.in, revision 1.130
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
124: echo "\nfound libXp.a\n"
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)
150: AC_CHECK_HEADERS(appkit/appkit.h appkit.h)
1.72 vatton 151: AC_CHECK_HEADERS(apppkit/apppkit.h apppkit.h)
1.5 cvs 152: AC_CHECK_HEADERS(netinet/in.h in.h)
153: AC_CHECK_HEADERS(dn.h)
154: AC_CHECK_HEADERS(sys/ipc.h)
155: AC_CHECK_HEADERS(net/errno.h sys/errno.h errno.h)
156: AC_CHECK_HEADERS(pwd.h)
157: AC_CHECK_HEADERS(grp.h)
158: AC_CHECK_HEADERS(arpa/inet.h inet.h)
159: AC_CHECK_HEADERS(netdb.h)
160: AC_CHECK_HEADERS(manifest.h)
161: AC_CHECK_HEADERS(bsdtypes.h)
162: AC_CHECK_HEADERS(stdefs.h)
163: AC_CHECK_HEADERS(bsdtime.h)
164: AC_CHECK_HEADERS(sys/select.h select.h)
165: AC_CHECK_HEADERS(dnetdb.h)
166: AC_CHECK_HEADERS(libc.h)
167: AC_CHECK_HEADERS(stdlib.h)
168: AC_CHECK_HEADERS(malloc.h)
169: AC_CHECK_HEADERS(memory.h)
170: AC_CHECK_HEADERS(unixlib.h)
171: AC_CHECK_HEADERS(ctype.h)
172: AC_CHECK_HEADERS(cursesX.h curses.h)
173: AC_CHECK_HEADERS(sys/resource.h resource.h)
174: AC_HEADER_DIRENT
175: AC_CHECK_HEADERS(dir.h direct.h) dnl AC_HEADER_DIRENT only checks for some..
176: AC_HEADER_STDC
177: AC_HEADER_SYS_WAIT
178: AC_HEADER_TIME
179: AC_HEADER_STAT
1.103 kahan 180: AC_CHECK_HEADERS(stdint.h)
1.5 cvs 181:
182: dnl
183: dnl Checks for typedefs, structures, and compiler characteristics.
184: dnl
185:
186: AC_C_CONST
187: AC_C_INLINE
188: AC_TYPE_MODE_T
189: AC_TYPE_OFF_T
190: AC_TYPE_SIZE_T
191: AC_HEADER_TIME
192: AC_STRUCT_TM
193: AC_STRUCT_TIMEZONE
194: AC_TYPE_UID_T
195:
196: dnl
197: dnl Checks for library functions.
198: dnl
199:
200: AC_FUNC_ALLOCA
201: AC_TYPE_GETGROUPS
202: AC_PROG_GCC_TRADITIONAL
203: AC_FUNC_MEMCMP
204: AC_FUNC_MMAP
205: AC_TYPE_SIGNAL
206: AC_FUNC_VPRINTF
1.58 cvs 207: 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 208:
1.85 vatton 209: AC_ARG_WITH(GL, [ --with-gl enable Opengl canvas (experimental) ])
210: dnl
211: dnl GL canvas is disabled by default
212: dnl
213: dnl needs Opengl, glu, Xft (xfree 4 font server)
214: dnl needs GTK
215: dnl text WILL need freetype2, ftgl
216: dnl GL is for opengl
217: dnl Glu is for text drawing (until we switch)
218: dnl GLU is for tesselation algortihms (until we extract it from this lib)
219: dnl (tesselation is used for polygons with holes in it...)
220: dnl gtkgl is for integration of opengl in GTK
221: if test "$with_gl" = "" ; then
222: if test "$enable_gl" = "yes" ; then
223: with_gl="yes"
224: else
225: with_gl="no"
226: fi
227: fi
228:
1.120 gully 229: #GTK_OPTIONS=
230: #AC_ARG_WITH(gtk, [ --without-gtk use Motif instead of GTK])
231: #if test "$withval" = "no" ; then
232: # if test "$with_gl" = "yes" ; then
233: # with_gtk="yes"
234: # else
235: # with_gtk="no"
236: # fi
237: #else
238: # with_gtk="yes"
239: #fi
240:
241: # check if gtk gui should be used
242: AC_ARG_WITH(gtk, [ --with-gtk use GTK GUI toolkit ])
243: if test "$with_gtk" = "yes" -o "$enable_gtk" = "yes" ; then
244: if test "$withval" = "no" ; then
245: with_gtk="no"
246: else
247: with_gtk="yes"
248: fi
249: fi
250:
251: # check if motif gui should be used
252: AC_ARG_WITH(motif, [ --with-motif use MOTIF GUI toolkit ])
253: if test "$with_motif" = "yes" -o "$enable_motif" = "yes" ; then
254: with_motif="yes"
255: no_motif=no
256: fi
257:
1.124 gully 258: # check if wxWindows gui should be used
259: AC_ARG_WITH(wx, [ --with-wx use wxWindows GUI toolkit (experimental)])
260: if test "$with_wx" = "yes" -o "$enable_wx" = "yes" ; then
261: if test "$withval" = "no" ; then
262: with_wx="no"
263: else
264: with_wx="yes"
265: fi
266: fi
267:
1.120 gully 268: # Check if a GUI toolkit is enabled
269: if test "$with_motif" = "no" -o "$with_motif" = "" ; then
1.124 gully 270: if test "$with_wx" = "no" -o "$with_wx" = "" ; then
271: if test "$with_gtk" = "no" -o "$with_gtk" = "" ; then
272: # Default GUI toolkits
273: with_motif="no"
274: with_wx="no"
275: no_motif=yes
276: with_gtk="yes"
277: fi
1.85 vatton 278: fi
279: fi
280:
1.121 gully 281: # check if no gui is enable
282: AC_ARG_WITH(nogui, [ --with-nogui do not use GUI toolkit ])
283: if test "$with_nogui" = "yes" -o "$enable_nogui" = "yes" ; then
284: with_nogui="yes"
285: with_motif="no"
286: no_motif=yes
287: with_gtk="no"
288: NOGUI_OPTIONS="-D_NOGUI"
289: fi
290:
1.120 gully 291: if test "$with_motif" = "yes" ; then
292: if test "$with_gtk" = "yes" ; then
293: echo
294: echo "****************************************************************"
295: echo " ERROR: "
296: echo " More than one GUI toolkit is enable"
297: echo " Only one GUI toolkit should be enable (turn off one)"
298: echo " exemple ok : ../configure --with-gtk "
299: echo " exemple !ok : ../configure --with-gtk --with-motif"
300: echo "****************************************************************"
301: echo
302: exit 1
303: fi
304: if test "$with_gl" = "yes" ; then
305: echo
306: echo "****************************************************************"
307: echo " ERROR: "
308: echo " MOTIF GUI doesn't support OpenGL canvas (turn off --with-gl)"
309: echo "****************************************************************"
310: echo
311: exit 1
312: fi
313: fi
314:
1.85 vatton 315: if test "$with_gtk" = "yes" ; then
1.63 vatton 316: for ac_dir in \
1.65 cvs 317: /usr/lib/glib/include \
1.63 vatton 318: /usr/X11R6/include \
319: \
320: /usr/include/X11R6 \
321: /usr/local/X11R6/include \
322: /usr/local/include/X11R6 \
323: \
324: /usr/X11/include \
325: /usr/include/X11 \
326: /usr/local/X11/include \
327: /usr/local/include/X11 \
328: \
329: /usr/X386/include \
330: /usr/x386/include \
331: /usr/XFree86/include/X11 \
332: /usr/dt/include \
333: /usr/include \
334: /usr/local/include \
335: /usr/local/lib/glib/include \
336: ; \
337: do
338: if test -r "$ac_dir/gdk/gdk.h"; then
339: no_gtk= ac_gtk_includes=$ac_dir
340: break
341: fi
342: done
343:
1.124 gully 344: GTK_INCLUDES="`gtk-config --cflags`"
345: AC_SUBST(GTK_INCLUDES)
346: GTK_LIBRARIES="`gtk-config --libs`"
347: dnl GL doesn't need the imlib
348: if test "${with_gl}" != "yes" ; then
349: GTK_LIBRARIES="${GTK_LIBRARIES} -lgdk_imlib"
350: fi
1.106 kahan 351:
1.124 gully 352: AC_SUBST(GTK_LIBRARIES)
353: GTK_OPTIONS="-D_GTK"
1.63 vatton 354: no_motif=yes
1.76 vatton 355: no_graphic=yes
1.120 gully 356: fi
357:
1.124 gully 358: if test "$with_wx" = "yes" ; then
359: WX_INCLUDES="`wx-config --cxxflags`"
360: AC_SUBST(WX_INCLUDES)
361:
1.126 gully 362: WX_LIBRARIES="`wx-config --libs`"
363:
1.124 gully 364: dnl GL is used ?
1.126 gully 365: if test "${with_gl}" = "yes" ; then
366: WX_LIBRARIES="${WX_LIBRARIES} `wx-config --gl-libs`"
1.124 gully 367: fi
368:
1.130 ! gully 369: dnl xrc ressources are used
! 370: WX_LIBRARIES="${WX_LIBRARIES} -l`wx-config --basename`_xrc-`wx-config --release`"
! 371:
1.124 gully 372: AC_SUBST(WX_LIBRARIES)
373: WX_OPTIONS="-D_WX"
374: fi
375:
1.120 gully 376: if test "$with_motif" = "yes" ; then
1.5 cvs 377: dnl
1.4 cvs 378: dnl Checking for Motif libraries and includes
379: dnl
380: dnl Borrowed from Lesstif configure.in
381: dnl Lesstif is a Great Project (TM)
382: dnl
383:
384: AC_DEFUN(AC_PATH_MOTIF_DIRECT,
385: [test -z "$motif_direct_test_library" && motif_direct_test_library=Xm
386: test -z "$motif_direct_test_function" && motif_direct_test_function=XmCreatePushButton
387: test -z "$motif_direct_test_include" && motif_direct_test_include=Xm/Xm.h
388: for ac_dir in \
389: /usr/include/Motif1.2 \
390: /usr/Motif1.2/include \
1.71 vatton 391: /sw/Lesstif/Motif2.0/include \
1.4 cvs 392: \
393: /usr/motif/include \
394: \
395: /usr/X11R6/include \
396: /usr/X11R5/include \
397: \
398: /usr/include/X11R6 \
399: /usr/include/X11R5 \
400: \
401: /usr/local/X11R6/include \
402: /usr/local/X11R5/include \
403: \
404: /usr/local/include/X11R6 \
405: /usr/local/include/X11R5 \
406: \
407: /usr/X11/include \
408: /usr/include/X11 \
409: /usr/local/X11/include \
410: /usr/local/include/X11 \
411: \
412: /usr/X386/include \
413: /usr/x386/include \
414: /usr/XFree86/include/X11 \
415: \
416: /usr/dt/include \
417: \
418: /usr/include \
419: /usr/local/include \
420: /usr/unsupported/include \
421: /usr/athena/include \
422: /usr/local/x11r5/include \
423: /usr/lpp/Xamples/include \
1.14 cvs 424: \
425: /usr/lesstif/include \
426: /usr/local/lesstif/include\
427: /usr/gnu/lesstif/include \
428: $HOME/lesstif/include \
1.4 cvs 429: ; \
430: do
431: if test -r "$ac_dir/$motif_direct_test_include"; then
432: no_motif= ac_motif_includes=$ac_dir
433: break
434: fi
435: done
436:
437: # Check for the libraries.
438: # See if we find them without any special options.
439: # Don't add to $LIBS permanently.
440: ac_save_LIBS="$LIBS"
441: LIBS="-l$motif_direct_test_library $LIBS"
442: # First see if replacing the include by lib works.
443: for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \
444: /usr/lib/Motif1.2 \
445: /usr/Motif1.2/lib \
1.71 vatton 446: /sw/Lesstif/Motif2.0/lib \
1.4 cvs 447: \
448: /usr/motif/lib \
449: \
450: /usr/X11R6/lib \
451: /usr/X11R5/lib \
452: \
453: /usr/lib/X11R6 \
454: /usr/lib/X11R5 \
455: \
456: /usr/local/X11R6/lib \
457: /usr/local/X11R5/lib \
458: \
459: /usr/local/lib/X11R6 \
460: /usr/local/lib/X11R5 \
461: \
462: /usr/X11/lib \
463: /usr/lib/X11 \
464: /usr/local/X11/lib \
465: \
466: /usr/X386/lib \
467: /usr/x386/lib \
468: /usr/XFree86/lib/X11 \
469: \
470: /usr/lib \
471: /usr/local/lib \
472: /usr/unsupported/lib \
473: /usr/athena/lib \
474: /usr/local/x11r5/lib \
475: /usr/lpp/Xamples/lib \
1.14 cvs 476: \
477: /usr/lesstif/lib \
478: /usr/local/lesstif/lib\
479: /usr/gnu/lesstif/lib \
480: $HOME/lesstif/lib \
1.4 cvs 481: ; \
482: do
1.71 vatton 483: for ac_extension in a so sl la; do
1.4 cvs 484: if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then
485: no_motif= ac_motif_libraries=$ac_dir
486: break 2
487: fi
488: done
1.5 cvs 489: done
490: LIBS="$ac_save_LIBS"
491: ])
1.4 cvs 492:
493: AC_DEFUN(AC_PATH_MOTIF,
1.66 vatton 494: [AC_REQUIRE_CPP()
1.4 cvs 495:
496: motif_includes=NONE
497: motif_libraries=NONE
498:
499: AC_MSG_CHECKING(for Motif)
1.63 vatton 500: if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then
501: no_motif=
1.4 cvs 502: else
503: AC_CACHE_VAL(ac_cv_path_motif,
504: [# One or both of these vars are not set, and there is no cached value.
1.63 vatton 505: no_motif=yes
1.4 cvs 506: AC_PATH_MOTIF_DIRECT
507:
508: if test "$no_motif" = yes; then
1.63 vatton 509: ac_cv_path_motif="no_motif=yes"
1.4 cvs 510: else
1.63 vatton 511: ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries"
1.66 vatton 512: fi])
513: eval "$ac_cv_path_motif"
1.63 vatton 514: fi
1.4 cvs 515:
516: if test "$no_motif" = yes; then
517: AC_MSG_RESULT(no)
1.5 cvs 518: MOTIF_INCLUDES=
519: MOTIF_LIBRARIES=
1.4 cvs 520: else
521: test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes
522: test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries
523: ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries"
524: AC_MSG_RESULT([libraries $motif_libraries, headers $motif_includes])
1.5 cvs 525: if test "$motif_includes" != "/usr/include" ; then
526: MOTIF_INCLUDES="-I$motif_includes"
527: fi
528: if test "$motif_libraries" != "/usr/lib" ; then
1.64 cvs 529: MOTIF_LIBRARIES="-L$motif_libraries -lXm"
1.19 cvs 530: case "${host}" in
531: *-*sun-solaris* )
532: MOTIF_LIBRARIES="${MOTIF_LIBRARIES} -R$motif_libraries"
533: ;;
1.65 cvs 534: esac
535: else
536: MOTIF_LIBRARIES="-lXm"
1.5 cvs 537: fi
1.4 cvs 538: fi
1.5 cvs 539: AC_SUBST(MOTIF_INCLUDES)
540: AC_SUBST(MOTIF_LIBRARIES)
1.4 cvs 541: ])
542:
1.120 gully 543: MOTIF_OPTIONS="-D_MOTIF"
544:
1.4 cvs 545: AC_PATH_MOTIF
1.66 vatton 546: fi
1.4 cvs 547:
1.63 vatton 548: if test "${GCC}" = "yes"; then
549: CPP="${CPP} -x c"
550: fi
551:
1.1 cvs 552: dnl ***************************************************************
553: dnl
1.61 cvs 554: dnl SPECIFIC STUFF : CONFIGURATION OPTIONS FOR AMAYA
1.1 cvs 555: dnl
556: dnl ***************************************************************
557:
1.101 kahan 558: # We don't use our graphic libraries for the pure GTK version (without GL)
559:
1.108 kahan 560: dnl echo "with gtk is ${with_gtk}, with gl is ${with_gl}\n"
1.101 kahan 561:
562: if test "${with_gtk}" != "yes" -o "${with_gl}" = "yes" ; then
1.120 gully 563: AC_ARG_WITH(graphic-libs, [ --with-graphic-libs use static libjpeg, libpng.])
1.101 kahan 564: if test "$withval" = "no" ; then
565: no_graphic=yes
566: fi
567: if test "$withval" = "yes" ; then
568: no_graphic=no
569: fi
1.76 vatton 570: fi
571:
572: if test "$no_graphic" = yes; then
573: dnl
574: AC_MSG_CHECKING([for libjpeg version = 6b])
575: AC_EGREP_CPP([x 62 *x],
576: [#include <jpeglib.h>
577: x JPEG_LIB_VERSION x],
578: dnl
579: AC_MSG_RESULT([yes])
1.105 vatton 580: JPEGINCL=''
1.76 vatton 581: LIBJPEG='-ljpeg'
582: MAKEJPEG=['#'],
583: dnl
584: AC_MSG_RESULT([no])
1.105 vatton 585: JPEGINCL='-I$(THOTDIR)/libjpeg'
1.76 vatton 586: LIBJPEG='../libjpeg.a' dnl LIBJPEG goes into amaya/Makefile.in
587: )
588: dnl
589: dnl
1.95 vatton 590: AC_MSG_CHECKING([for libpng version = 1.0.x or 1.2.x])
591: AC_EGREP_CPP([x \"1.[02]\..*\" *x],
1.76 vatton 592: [#include <png.h>
593: x PNG_LIBPNG_VER_STRING x],
594: dnl
595: AC_MSG_RESULT([yes])
1.105 vatton 596: PNGINCL=''
1.76 vatton 597: LIBPNG='-lpng'
598: LIBZ=''
599: MAKEPNG=['#'],
600: dnl
601: AC_MSG_RESULT([no])
1.105 vatton 602: PNGINCL='-I$(THOTDIR)/libpng -I$(THOTDIR)/libpng/zlib'
1.76 vatton 603: LIBPNG='../libpng.a'
604: LIBZ='../libz.a'
605: )
606: else
1.105 vatton 607: JPEGINCL='-I$(THOTDIR)/libjpeg'
1.76 vatton 608: LIBJPEG='../libjpeg.a'
1.105 vatton 609: PNGINCL='-I$(THOTDIR)/libpng -I$(THOTDIR)/libpng/zlib'
1.76 vatton 610: LIBPNG='../libpng.a'
611: LIBZ='../libz.a'
612: fi
613: dnl
614: AC_SUBST(LIBJPEG)
615: AC_SUBST(LIBPNG)
616: AC_SUBST(LIBZ)
617: AC_SUBST(MAKEJPEG)
618: AC_SUBST(MAKEPNG)
619:
1.119 vatton 620: AMAYA_VER="8.2"
1.1 cvs 621:
622: dnl
1.6 cvs 623: dnl We use a special versoin of cextract patched for alignment
624: dnl to build the signatures of the modules functions located in f subdirs
625: dnl
626: CEXTRACT_VER="1.7"
627: CEXTRACT_FLAGS="+O"
628:
1.3 cvs 629:
630: dnl
1.9 cvs 631: dnl Adjust the some variables depending on the host and compiler
1.61 cvs 632: dnl Thotlib NEED signed chars !!!
1.7 cvs 633: dnl
634:
635: if test "${CC}" = "gcc" ; then
1.44 cvs 636: CFLAGS="${CFLAGS} -W "
1.7 cvs 637: case "${host}" in
638: *-*-irix5* | *-*irix6* )
639: CFLAGS="${CFLAGS} -fsigned-char"
640: ;;
641: esac
1.14 cvs 642: fi
643:
644: if test "$ac_cv_c_const" = "no" ; then
645: CFLAGS="${CFLAGS} -DCONST= "
1.7 cvs 646: fi
647:
1.122 gully 648:
649: # force C mode (-x c)
1.123 gully 650: CFLAGS="${CFLAGS} -x c"
1.122 gully 651:
652: # C++ options (-x c++)
653: CXX_OPTIONS="-D__cplusplus"
1.123 gully 654: CXXFLAGS="${CXXFLAGS} -W -x c++ ${CXX_OPTIONS}"
1.122 gully 655:
1.7 cvs 656: dnl
1.128 gully 657: dnl Check for operating system (UNIX / WINDOWS / MACOSX )
658: dnl TODO : how to know the OS ... add some test to detect automaticaly
659: dnl
660: OS_OPTIONS="-D_UNIX"
661:
662: dnl
1.61 cvs 663: dnl Check for availability of amaya sources
1.1 cvs 664: dnl
665:
666: build_amaya="yes"
667:
668: if test "$with_amaya" = "no" ; then
669: build_amaya="no"
1.45 cvs 670: else
671: if test ! -f $srcdir/amaya/Makefile.in ; then
1.1 cvs 672: AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
673: build_amaya="no"
1.45 cvs 674: fi
1.1 cvs 675: fi
676:
677: dnl
1.50 cvs 678: dnl Check for additionnal packages
1.1 cvs 679: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
680: dnl
1.93 kahan 681:
1.75 cheyroul 682: if test "$with_gl" = "yes" ; then
683: AC_MSG_CHECKING([OpenGL])
684: for ac_dir in \
685: /usr/include \
686: /usr/X11R6/include \
687: /usr/local/include \
688: ; \
1.80 cheyroul 689: do if test -r "$ac_dir/GL/gl.h" ; then
1.75 cheyroul 690: gl_inc="yes"
1.80 cheyroul 691: GL_INC_I="$ac_dir"
692: if test "$ac_dir" != "/usr/include" ; then
693: GL_INCLUDES="-I$ac_dir"
694: fi
1.96 cheyroul 695: AC_MSG_RESULT([yes])
1.75 cheyroul 696: break
697: fi
1.80 cheyroul 698: done
699: AC_MSG_CHECKING([GLU])
1.75 cheyroul 700: for ac_dir in \
701: /usr/include/GL \
702: /usr/include \
703: /usr/X11R6/include/GL \
704: /usr/X11R6/include \
705: /usr/local/include \
706: /usr/local/include/GL \
707: ; \
708: do if test -r "$ac_dir/glu.h" ; then
709: glu_inc="yes"
1.80 cheyroul 710: GL_INC_II="$ac_dir"
711: if test "$ac_dir" != "/usr/include" ; then
712: if test "$ac_dir" != "$GL_INC_I" ; then
713: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
714: fi
715: fi
1.96 cheyroul 716: AC_MSG_RESULT([yes])
1.75 cheyroul 717: break
718: fi
719: done
1.80 cheyroul 720: AC_MSG_CHECKING([GTKGLAREA])
1.75 cheyroul 721: for ac_dir in \
722: /usr/include/GL \
723: /usr/include \
724: /usr/X11R6/include/GL \
725: /usr/X11R6/include \
726: /usr/local/include \
727: /usr/local/include/GL \
728: ; \
729: do if test -r "$ac_dir/gtkgl/gtkglarea.h" ; then
730: gtkgl_inc="yes"
1.80 cheyroul 731: if test "$ac_dir" != "/usr/include" ; then
732: if test "$ac_dir" != "$GL_INC_II" ; then
733: if test "$ac_dir" != "$GL_INC_I" ; then
734: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
735: fi
736: fi
737: fi
1.96 cheyroul 738: AC_MSG_RESULT([yes])
1.75 cheyroul 739: break
740: fi
741: done
1.80 cheyroul 742: AC_MSG_CHECKING([freetype])
743: for ac_dir in \
744: /usr/include \
745: /usr/X11R6/include \
746: /usr/local/include \
747: ; \
748: do if test -r "$ac_dir/ft2build.h" ; then
749: freetype_inc="yes"
750: GL_INCLUDES="$GL_INCLUDES `freetype-config --cflags`"
1.96 cheyroul 751: AC_MSG_RESULT([yes])
752: break
753: fi
754: done
1.104 cheyroul 755: AC_MSG_CHECKING([Xft])
756: for ac_dir in \
757: /usr/include \
758: /usr/X11R6/include \
759: /usr/local/include \
760: /usr/include/X11/Xft \
761: /usr/X11R6/include/X11/Xft \
762: /usr/local/include/X11/Xft \
763: /usr/include/X11/Xft1 \
764: /usr/X11R6/include/X11/Xft1 \
1.113 vatton 765: /usr/include/Xft2/X11/Xft/ \
1.104 cheyroul 766: /usr/local/include/X11/Xft1 \
767: /usr/include/X11/Xft2 \
768: /usr/X11R6/include/X11/Xft2 \
769: /usr/local/include/X11/Xft2 \
770: ; \
771: do if test -r "$ac_dir/Xft.h" ; then
772: xft_inc="yes"
773: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
774: AC_MSG_RESULT([yes])
775: break
776: fi
777: done
1.96 cheyroul 778: AC_MSG_CHECKING([gcc3])
779: for ac_dir in \
780: /usr/lib \
781: /usr/X11R6/lib \
782: /usr/local/lib \
783: ; \
784: do if test -r "$ac_dir/libstdc++.so.5" ; then
785: stdglu_inc="yes"
786: AC_MSG_RESULT([yes])
787: break
1.80 cheyroul 788: fi
1.96 cheyroul 789: done
790: if test "$gl_inc" = "" ; then
1.75 cheyroul 791: AC_MSG_WARN(Opengl headers (gl.h) not found !!)
792: AC_MSG_WARN(Disabling opengl build !)
793: with_gl="no"
794: GL_OPTIONS=
795: GL_INCLUDES=
796: GL_LIBRARIES=
1.81 cheyroul 797: exit 1;
1.75 cheyroul 798: fi
799: if test "$glu_inc" = "" ; then
800: AC_MSG_WARN(Glu headers (glu.h) not found !!)
801: AC_MSG_WARN(Disabling opengl build !)
1.81 cheyroul 802:
1.75 cheyroul 803: with_gl="no"
804: GL_OPTIONS=
805: GL_INCLUDES=
806: GL_LIBRARIES=
1.81 cheyroul 807: exit 1;
1.75 cheyroul 808: fi
809: if test "$gtkgl_inc" = "" ; then
810: AC_MSG_WARN(Gtkglarea headers (gktglarea.h) not found !!)
811: AC_MSG_WARN(Disabling opengl build !)
812: with_gl="no"
813: GL_OPTIONS=
814: GL_INCLUDES=
815: GL_LIBRARIES=
1.81 cheyroul 816: exit 1;
1.75 cheyroul 817: fi
1.80 cheyroul 818: if test "$freetype_inc" = "" ; then
819: AC_MSG_WARN(Freetype 2 headers (ft2build.h) not found !!)
820: AC_MSG_WARN(Disabling opengl build !)
821: with_gl="no"
822: GL_OPTIONS=
823: GL_INCLUDES=
824: GL_LIBRARIES=
1.81 cheyroul 825: exit 1;
1.80 cheyroul 826: fi
1.104 cheyroul 827: if test "$xft_inc" = "" ; then
828: AC_MSG_WARN(Xft 2 headers (Xft.h) not found !!)
829: AC_MSG_WARN(Disabling opengl build !)
830: with_gl="no"
831: GL_OPTIONS=
832: GL_INCLUDES=
833: GL_LIBRARIES=
834: exit 1;
835: fi
1.75 cheyroul 836: if test "$gl_inc" = "yes" ; then
1.79 cheyroul 837: if test "$glu_inc" = "yes" ; then
838: if test "$gtkgl_inc" = "yes" ; then
1.96 cheyroul 839: if test "$freetype_inc" = "yes" ; then
1.104 cheyroul 840: if test "$xft_inc" = "yes" ; then
841: if test "$stdglu_inc" = "yes" ; then
1.113 vatton 842: GL_LIBRARIES="-L/usr/lib -L/usr/X11R6/lib -lXmu -lXft -lfreetype -lGL -lGLU -lgtkgl -lstdc++"
1.104 cheyroul 843: else
1.113 vatton 844: GL_LIBRARIES="-L/usr/lib -L/usr/X11R6/lib -lXmu -lXft -lfreetype -lGL -lGLU -lgtkgl"
1.104 cheyroul 845: fi
846: GL_OPTIONS="-D_GL"
847: no_motif=yes
848: fi
1.80 cheyroul 849: fi
1.75 cheyroul 850: fi
851: fi
852: fi
853: AC_SUBST(GL_INCLUDES)
854: AC_SUBST(GL_LIBRARIES)
1.115 cheyroul 855: dnl PRINTIFNOTGL=" "
856: dnl #NOPRINT="#"
857: NOPRINT=""
858: PRINTIFNOTGL=" print_prog"
1.97 cheyroul 859: else
1.112 cheyroul 860: NOPRINT=""
1.97 cheyroul 861: PRINTIFNOTGL=" print_prog"
1.75 cheyroul 862: fi
1.97 cheyroul 863: AC_SUBST(PRINTIFNOTGL)
1.112 cheyroul 864: AC_SUBST(NOPRINT)
865:
1.76 vatton 866:
867: AC_ARG_ENABLE(svg, [ --disable-svg remove SVG support ])
868: AC_ARG_ENABLE(annot, [ --disable-annot remove Annotations support ])
1.93 kahan 869: AC_ARG_ENABLE(raptor, [ --disable-raptor disable the raptor RDF parser ])
1.116 kahan 870: AC_ARG_ENABLE(redland, [ --enable-redland enable the redland RDF library ])
871: AC_ARG_ENABLE(system-redland, [ --enable-system-redland try the redland RDF system library ])
1.108 kahan 872: AC_ARG_ENABLE(bookmarks, [ --enable-bookmarks enables experimental bookmark support ])
1.76 vatton 873: AC_ARG_ENABLE(generic-xml, [ --disable-generic-xml remove Generic XML support ])
874:
1.75 cheyroul 875: dnl
1.21 cvs 876: dnl plugins support is disabled by default
1.8 cvs 877: dnl
1.13 cvs 878:
879: if test "$with_plugin" = "" ; then
1.21 cvs 880: if test "$enable_plugin" = "yes" ; then
1.55 kahan 881: with_plugin="yes"
1.21 cvs 882: else
1.17 cvs 883: with_plugin="no"
884: fi
1.10 cvs 885: fi
1.1 cvs 886:
1.8 cvs 887: dnl
1.68 vatton 888: dnl svg is enabled by default
1.26 cvs 889: dnl
1.68 vatton 890: if test "$with_svg" = "" ; then
891: if test "$enable_svg" = "no" ; then
892: with_svg="no"
1.49 cvs 893: else
1.68 vatton 894: with_svg="yes"
1.26 cvs 895: fi
896: fi
897:
898: dnl
1.56 kahan 899: dnl annotations is enabled by default
1.47 cvs 900: dnl
901: if test "$with_annot" = "" ; then
1.56 kahan 902: if test "$enable_annot" = "no" ; then
903: with_annot="no"
904: else
1.54 cvs 905: with_annot="yes"
1.47 cvs 906: fi
1.99 kahan 907: else
908: with_annot="yes"
1.47 cvs 909: fi
910:
1.93 kahan 911:
912: dnl
913: dnl The raptor RDF parser is enabled by default
914: dnl
915: if test "$with_raptor" = "" ; then
916: if test "$enable_raptor" = "no" ; then
917: with_raptor="no"
918: else
1.99 kahan 919: with_raptor="yes"
1.93 kahan 920: fi
1.99 kahan 921: else
922: with_raptor="yes"
1.93 kahan 923: fi
924:
1.70 kahan 925: dnl
1.116 kahan 926: dnl The redland library is disabled by default
1.109 kahan 927: dnl
928: if test "$with_redland" = "" ; then
929: if test "$enable_redland" = "yes" ; then
930: with_redland="yes"
931: else
932: with_redland="no"
933: fi
934: else
935: with_redland="no"
936: fi
937:
938: dnl
1.116 kahan 939: dnl The redland library is disabled by default
940: dnl
941: if test "$with_system_redland" = "" ; then
942: if test "$enable_system_redland" = "yes" ; then
943: with_redland="yes"
944: with_system_redland="yes"
945: else
946: with_system_redland="no"
947: fi
948: else
949: with_system_redland="no"
950: fi
951:
952: dnl
953: dnl The bookmarks support is disabled by default
1.108 kahan 954: dnl
955: if test "$with_bookmarks" = "" ; then
956: if test "$enable_bookmarks" = "yes" ; then
957: with_bookmarks="yes"
1.125 vatton 958: with_redland="yes"
1.108 kahan 959: else
960: with_bookmarks="no"
961: fi
962: else
963: with_bookmarks="no"
964: fi
965:
966: dnl
1.70 kahan 967: dnl Generic XML support enabled by default
968: dnl
969: if test "$with_generic_xml" = "" ; then
970: if test "$enable_generic_xml" = "no" ; then
971: with_generic_xml="no"
972: GENERIC_XML_OPTIONS=
973: else
974: with_generic_xml="yes"
975: GENERIC_XML_OPTIONS=-DXML_GENERIC
976: fi
977: fi
978:
1.120 gully 979: AC_ARG_WITH(dav, [ --with-dav enable WebDAV support (experimental) ])
1.88 kirschpi 980: dnl
981: dnl DAV support disabled by default
982: dnl
983: if test "$with_dav" = "" ; then
984: if test "$enable_dav" = "yes" ; then
985: with_dav="yes"
986: else
987: with_dav="no"
988: fi
989: fi
990:
991: if test "$with_dav" = "yes" ; then
992: DAV_OPTIONS=-DDAV
1.90 kirschpi 993: DAVDIR="davlib"
994: LIBDAV="libwwwdav"
995: WITHDAV="--with-dav"
996: WWWDAV="-lwwwdav"
1.88 kirschpi 997: else
998: with_dav="no"
999: DAV_OPTIONS=""
1.90 kirschpi 1000: DAVDIR=""
1001: LIBDAV=""
1002: WITHDAV=""
1003: WWWDAV=""
1.88 kirschpi 1004: fi
1005:
1.70 kahan 1006:
1.19 cvs 1007: if test "$build_amaya" = "yes" ; then
1.43 cvs 1008: if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50 cvs 1009: AC_MSG_WARN(libwww sources not found !!)
1010: AC_MSG_WARN(Disabling Amaya build !)
1011: build_amaya="no"
1.1 cvs 1012: fi
1.8 cvs 1013:
1014: if test ! -f $srcdir/amaya/MathML.S ; then
1.10 cvs 1015: if test "$with_math" = "yes" ; then
1.8 cvs 1016: AC_MSG_WARN(MathML sources not found !!)
1.26 cvs 1017: AC_MSG_WARN(Disabling Math build !)
1.10 cvs 1018: with_math="no"
1019: MATH_OPTIONS=
1.8 cvs 1020: fi
1021: fi
1.26 cvs 1022:
1.68 vatton 1023: if test ! -f $srcdir/amaya/SVG.S ; then
1024: if test "$with_svg" = "yes" ; then
1025: AC_MSG_WARN(SVG sources not found !!)
1026: AC_MSG_WARN(Disabling SVG build !)
1027: with_svg="no"
1028: SVG_OPTIONS=
1.26 cvs 1029: fi
1030: fi
1031:
1.48 cvs 1032: if test ! -f $srcdir/annotlib/Makefile.in ; then
1.47 cvs 1033: if test "$with_annot" = "yes" ; then
1034: AC_MSG_WARN(Annotation makefile not found !!)
1035: AC_MSG_WARN(Disabling Annotations build !)
1036: with_annot="no"
1037: fi
1038: fi
1.55 kahan 1039:
1.109 kahan 1040: if test "$with_raptor" = "yes" -a "$with_redland" = "yes" ; then
1041: AC_MSG_WARN(Disabling raptor build as redland is enabled !)
1042: MAKERAPTOR=['#']
1043: with_raptor="no"
1044: fi
1045:
1.108 kahan 1046: if test "$with_raptor" = "yes" -a "$with_annot" = "no" ; then
1.93 kahan 1047: AC_MSG_WARN(Disabling raptor build as annotations are disabled !)
1048: MAKERAPTOR=['#']
1049: with_raptor="no"
1050: fi
1051:
1.108 kahan 1052: if test "$with_raptor" = "yes" -a ! -d "$srcdir/libraptor" ; then
1053: AC_MSG_WARN(Raptor source dir not found !!)
1054: AC_MSG_WARN(Disabling raptor build !)
1055: MAKERAPTOR=['#']
1056: with_raptor="no"
1.109 kahan 1057: fi
1058:
1059: if test "$with_raptor" = "yes" ; then
1.108 kahan 1060: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DRAPTOR_RDF_PARSER -I\$(THOTDIR)/libraptor"
1061: AMAYA_RAPTOR_LIBS="../libraptor/.libs/libraptor.a"
1062: AMAYA_RAPTOR_SRC="amaya_comp_libraptor"
1063: AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/libraptor"
1064: fi
1065:
1.109 kahan 1066: if test "$with_redland" = "yes" -a "$with_annot" = "no" ; then
1067: AC_MSG_WARN(Disabling redland build as annotations are disabled !)
1068: MAKEREDLAND=['#']
1069: with_redland="no"
1070: fi
1071:
1.116 kahan 1072: redland_compile_source=yes
1073: if test "$with_redland" = "yes" -a "$with_system_redland" = "yes" ; then
1074: # check to see if we have a redland library
1075: AC_MSG_CHECKING(system redland library)
1.118 kahan 1076: redland_min_version=0.9.14
1.116 kahan 1077: REDLAND_CONFIG="redland-config"
1078: REDLAND_VERSION=`$REDLAND_CONFIG --version`
1079: redland_version_dec=`echo $REDLAND_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
1080: redland_min_version_dec=`echo $redland_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
1081: if test $redland_version_dec -lt $redland_min_version_dec; then
1082: AC_MSG_RESULT(no - found version $REDLAND_VERSION and minimal version is $redland_min_version)
1083: else
1084: AC_MSG_RESULT(yes - found version $REDLAND_VERSION)
1085: AC_MSG_CHECKING(checking for redland headers)
1.117 kahan 1086: dnl We should use awk here and remove the -I from the following line
1087: dnl REDLAND_HEADERS=`$REDLAND_CONFIG --cflags`
1088: REDLAND_HEADERS=""
1089: if test -e "/usr/include/redland.h" ; then
1090: REDLAND_HEADERS="/usr/include";
1091: else
1092: if test -e "/usr/local/include/redland.h" ; then
1093: REDLAND_HEADERS="/usr/local/include";
1094: fi
1095: fi
1096: if test $REDLAND_HEADERS != ""; then
1.116 kahan 1097: AC_MSG_RESULT(yes - have development version)
1098: redland_compile_source=no
1099: else
1100: AC_MSG_RESULT(no - no development version)
1101: fi
1102: fi
1103: fi
1104:
1105: if test "$with_redland" = "yes" -a "$redland_compile_source" = "yes" \
1106: -a ! -d "$srcdir/../redland" ; then
1.109 kahan 1107: AC_MSG_WARN(Redland source dir not found !!)
1108: AC_MSG_WARN(Disabling redland build !)
1109: MAKEREDLAND=['#']
1110: with_redland="no"
1111: fi
1112:
1113: if test "$with_redland" = "yes" ; then
1.116 kahan 1114: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DLIBRDF_INTERNAL=1 -DAM_REDLAND -DRAPTOR_RDF_PARSER"
1115: if test "$redland_compile_source" = "yes" ; then
1116: AMAYA_RAPTOR_SRC="amaya_comp_redland"
1117: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
1118: AMAYA_RAPTOR_LIBS="../redland/librdf/.libs/librdf.a ../redland/raptor/.libs/libraptor.a"
1119: AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
1120: else
1121: MAKEREDLAND=['#']
1122: AMAYA_RAPTOR_SRC=
1123: redland_includes=`$REDLAND_CONFIG --cflags`
1124: redland_libs=`$REDLAND_CONFIG --libs`
1125: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS"
1126: AMAYA_ANNOT_INCLUDES="$redland_includes -I\$(THOTDIR)/thotlib/include"
1127: AMAYA_ANNOT_EXTRA_LIBS="$redland_libs"
1128: AMAYA_RAPTOR_INCLUDES="$redland_includes"
1129: fi
1.109 kahan 1130: fi
1131:
1.116 kahan 1132:
1.108 kahan 1133: dnl control whether we should build the bookmarks support
1134: if test "$with_bookmarks" = "yes" -a "$with_annot" = "no" ; then
1135: AC_MSG_WARN(Disabling bookmarks build as annotations are disabled !)
1136: with_bookmarks="no"
1137: fi
1.109 kahan 1138: if test "$with_bookmarks" = "yes" -a "$with_redland" = "no" ; then
1139: AC_MSG_WARN(Disabling bookmarks build as redland is disabled !)
1.108 kahan 1140: with_bookmarks="no"
1141: fi
1142: if test "$with_bookmarks" = "yes" ; then
1143: ANNOTLIB_COMPILE_BM=
1144: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DBOOKMARKS"
1145: else
1146: ANNOTLIB_COMPILE_BM=['#']
1147: fi
1148:
1.93 kahan 1149: dnl control whether we should use libwww's rdf parser
1.109 kahan 1150: if test "$with_raptor" = "yes" -o "$with_redland" = "yes"; then
1.93 kahan 1151: dnl not all the function calls have been cleared as of today,
1152: dnl we still need libwww's rdf parser
1.98 kahan 1153: MAKE_LIBWWW_RDF_PARSER=
1154: LIBWWW_RDF_PARSER=
1.93 kahan 1155: else
1156: MAKE_LIBWWW_RDF_PARSER="libwwwxml"
1157: LIBWWW_RDF_PARSER="-lwwwxml"
1158: fi
1.70 kahan 1159:
1.55 kahan 1160: if test "$with_plugin" = "yes" ; then
1161: AC_MSG_WARN(The plugin library isn't supported anymore in Amaya !!)
1162: AC_MSG_WARN(Disabling plugin build !)
1163: with_plugin="no"
1164: fi
1165:
1.88 kirschpi 1166:
1167: if test ! -f $srcdir/davlib/Makefile.in ; then
1168: if test "$with_dav" = "yes" ; then
1169: AC_MSG_WARN(WebDAV makefile not found !!)
1170: AC_MSG_WARN(Disabling WebDAV build !)
1171: with_dav="no"
1.90 kirschpi 1172: DAVDIR=""
1173: LIBDAV=""
1174: WITHDAV=""
1175: WWWDAV=""
1.88 kirschpi 1176: fi
1177: fi
1178:
1179:
1.1 cvs 1180: fi
1181:
1182: dnl
1183: dnl The options for each library or binary
1184: dnl
1185:
1.129 vatton 1186: THOT_OPTIONS="$OS_OPTIONS $MOTIF_OPTIONS $GTK_OPTIONS $GL_OPTIONS $WX_OPTIONS $NOGUI_OPTIONS"
1187: AMAYA_OPTIONS="$OS_OPTIONS $MATH_OPTIONS $SVG_OPTIONS $GENERIC_XML_OPTIONS $MOTIF_OPTIONS $GTK_OPTIONS $GL_OPTIONS $WX_OPTIONS $NOGUI_OPTIONS"
1.58 cvs 1188: #PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
1.129 vatton 1189: AMAYA_ANNOT_OPTIONS="$OS_OPTIONS $AMAYA_ANNOT_OPTIONS"
1.101 kahan 1190:
1.102 kahan 1191: IMGLIBS="-ljpeg -lpng -lz"
1.3 cvs 1192: EXTRA_LIBS=
1.1 cvs 1193:
1194: dnl
1195: dnl Set up the PATHs needed
1196: dnl
1197:
1198: API="\$(THOTDIR)/thotlib/include"
1199: VAR="\$(THOTDIR)/thotlib/internals/var"
1200: INCL="\$(THOTDIR)/thotlib/internals/h"
1201: FUNC="\$(THOTDIR)/thotlib/internals/f"
1202:
1203: dnl
1204: dnl Set up the include variables.
1205: dnl
1206:
1.61 cvs 1207: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58 cvs 1208: APIINCLUDES=-I${API}
1209:
1210: if test "${VPATHOPT}" = "" ; then
1.1 cvs 1211: VPATHOPT="VPATH"
1212: fi
1213:
1214: dnl
1215: dnl Exports the current values of the variables.
1216: dnl
1217:
1218: AC_SUBST(AMAYA_VER)
1.6 cvs 1219: AC_SUBST(CEXTRACT_VER)
1220: AC_SUBST(CEXTRACT_FLAGS)
1.1 cvs 1221:
1222: AC_SUBST(THOTINCLUDES)
1223: AC_SUBST(APIINCLUDES)
1224: AC_SUBST(VPATHOPT)
1225:
1.63 vatton 1226: AC_SUBST(GTK_OPTIONS)
1.1 cvs 1227: AC_SUBST(THOT_OPTIONS)
1228: AC_SUBST(AMAYA_OPTIONS)
1229: AC_SUBST(PLUGIN_OPTIONS)
1.48 cvs 1230: AC_SUBST(AMAYA_ANNOT_OPTIONS)
1.110 kahan 1231: AC_SUBST(AMAYA_ANNOT_INCLUDES)
1.116 kahan 1232: AC_SUBST(AMAYA_ANNOT_EXTRA_LIBS)
1.1 cvs 1233: AC_SUBST(IMGLIBS)
1.3 cvs 1234: AC_SUBST(EXTRA_LIBS)
1.90 kirschpi 1235:
1236: AC_SUBST(DAVDIR)
1237: AC_SUBST(LIBDAV)
1238: AC_SUBST(WITHDAV)
1239: AC_SUBST(WWWDAV)
1.1 cvs 1240:
1.93 kahan 1241: AC_SUBST(MAKERAPTOR)
1.109 kahan 1242: AC_SUBST(MAKEREDLAND)
1.108 kahan 1243: AC_SUBST(ANNOTLIB_COMPILE_BM)
1.109 kahan 1244: AC_SUBST(AMAYA_RAPTOR_SRC)
1.93 kahan 1245: AC_SUBST(AMAYA_RAPTOR_LIBS)
1246: AC_SUBST(AMAYA_RAPTOR_INCLUDES)
1247: AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
1248: AC_SUBST(LIBWWW_RDF_PARSER)
1249:
1250: AC_SUBST(SUBDIRS)
1251:
1.1 cvs 1252: dnl
1.48 cvs 1253: dnl Include the option Makefile.xxx fragment according to the configure options
1.1 cvs 1254: dnl
1255:
1256: if test "$with_plugin" = "yes" ; then
1.50 cvs 1257: AC_SUBST_FILE(plugin_frag)
1.1 cvs 1258: plugin_frag=$srcdir/pluginlib/Makefile.plugin
1259: else
1260: AC_SUBST_FILE(plugin_frag)
1261: plugin_frag=/dev/null
1262: fi
1263:
1264: AC_SUBST_FILE(www_frag)
1.49 cvs 1265: www_frag=$srcdir/amaya/Makefile.libwww
1.1 cvs 1266:
1.50 cvs 1267: if test "$with_math" = "no" ; then
1.10 cvs 1268: AC_SUBST_FILE(math_frag)
1.50 cvs 1269: math_frag=/dev/null
1.8 cvs 1270: else
1.10 cvs 1271: AC_SUBST_FILE(math_frag)
1.50 cvs 1272: math_frag=$srcdir/amaya/Makefile.math
1.8 cvs 1273: fi
1274:
1.68 vatton 1275: if test "$with_svg" = "no" ; then
1276: AC_SUBST_FILE(svg_frag)
1277: svg_frag=/dev/null
1.26 cvs 1278: else
1.68 vatton 1279: AC_SUBST_FILE(svg_frag)
1280: svg_frag=$srcdir/amaya/Makefile.svg
1.26 cvs 1281: fi
1282:
1.47 cvs 1283: if test "$with_annot" = "yes" ; then
1284: AC_SUBST_FILE(annot_frag)
1.48 cvs 1285: annot_frag=$srcdir/annotlib/Makefile.annot
1.47 cvs 1286: else
1287: AC_SUBST_FILE(annot_frag)
1288: annot_frag=/dev/null
1289: fi
1290:
1.88 kirschpi 1291: if test "$with_dav" = "yes" ; then
1292: AC_SUBST_FILE(dav_frag)
1293: dav_frag=$srcdir/davlib/Makefile.dav
1294: fi
1.16 cvs 1295:
1.1 cvs 1296: dnl ***************************************************************
1297: dnl
1298: dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
1299: dnl
1300: dnl ***************************************************************
1301:
1302: EXTRA_MAKEFILE_IN=
1.2 cvs 1303: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1 cvs 1304: libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2 cvs 1305: tools/mkdep/Makefile \
1.1 cvs 1306: tools/cextract-1.7/Makefile thotlib/Makefile \
1.127 vatton 1307: thotlib/include/Makefile batch/Makefile"
1.1 cvs 1308:
1309: if test "$build_amaya" = "yes" ; then
1.2 cvs 1310:
1.19 cvs 1311: make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2 cvs 1312: EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.93 kahan 1313: $srcdir/amaya/Makefile.libwww"
1.27 cvs 1314:
1315: if test "$$with_plugin" = "yes" ; then
1316: make_output="$make_output pluginlib/Makefile"
1317: EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.93 kahan 1318: $srcdir/pluginlib/Makefile.plugin"
1.27 cvs 1319: fi
1.2 cvs 1320:
1.48 cvs 1321: if test "$with_annot" = "yes" ; then
1322: make_output="$make_output annotlib/Makefile"
1323: EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
1324: fi
1.88 kirschpi 1325:
1326: if test "$with_dav" = "yes" ; then
1327: make_output="$make_output davlib/Makefile"
1328: EXTRA_MAKEFILE_IN="$srcdir/davlib/Makefile.in"
1329: fi
1330:
1.1 cvs 1331: fi
1332:
1333: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6 cvs 1334: AC_OUTPUT($make_output , [
1335: dnl
1336: dnl This fragment of shell code is executed after the
1337: dnl Makefile(s) dump ...
1338: dnl
1339:
1340: echo timestamp > stamp-h
1341:
1342: dnl
1343: dnl Check for an upgrade in the Options numbers
1344: dnl
1345:
1346: if test -f Options ; then
1347: oldversion=`grep Version Options`
1348: newversion=`grep Version Options.orig`
1349: if test "$oldversion" != "$newversion" ; then
1350: echo WARNING : Options files have changed, old options saved to Options.old
1351: cp Options Options.old
1352: cp Options.orig Options
1353: exit 1
1354: fi
1355: fi
1356: ])
1.1 cvs 1357:
1358: if test "$build_amaya" = "yes" ; then
1.50 cvs 1359: echo Amaya configured with libWWW
1360: if test "$with_plugin" = "yes" ; then
1361: echo Amaya configured with Plugins support
1.8 cvs 1362: fi
1.10 cvs 1363: if test "$with_math" = "yes" ; then
1364: echo Amaya configured with Math support
1.26 cvs 1365: fi
1.68 vatton 1366: if test "$with_svg" = "yes" ; then
1367: echo Amaya configured with SVG support
1.47 cvs 1368: fi
1369: if test "$with_annot" = "yes" ; then
1370: echo Amaya configured with Annotations support
1.70 kahan 1371: fi
1.93 kahan 1372: if test "$with_raptor" = "yes" ; then
1.106 kahan 1373: echo Amaya configured with the Raptor RDF parser
1.109 kahan 1374: fi
1375: if test "$with_redland" = "yes" ; then
1.116 kahan 1376: if test "$with_system_redland" = "no" ; then
1377: echo Amaya configured with the Redland RDF library \(local source\)
1378: else
1379: echo Amaya configured with the Redland RDF library \(system\)
1380: fi
1.108 kahan 1381: fi
1382: if test "$with_bookmarks" = "yes" ; then
1383: echo Amaya configured with bookmarks support \(experimental\)
1.93 kahan 1384: fi
1.70 kahan 1385: if test "$with_generic_xml" = "yes" ; then
1386: echo Amaya configured with generic XML suppport
1387: fi
1.129 vatton 1388: echo Amaya configured with internationalization suppport
1.75 cheyroul 1389: if test "$with_gl" = "yes" ; then
1.128 gully 1390: echo Amaya configured with OpenGL Canvas Rendering \(experimental\)
1.88 kirschpi 1391: fi
1392: if test "$with_dav" = "yes" ; then
1393: echo Amaya configured with WebDAV support \(experimental\)
1.1 cvs 1394: fi
1.5 cvs 1395: fi
1396:
1.107 kahan 1397: if test "$no_graphic" = "yes" ; then
1398: echo "Amaya configured with system graphic libraries (libjpeg, libpng, zlib)"
1399: else
1400: echo "Amaya configured with static graphic libraries (libjpeg, libpng, zlib)"
1401: if test "$with_gtk" = "yes" -o "$with_gl" = "yes" ; then
1402: echo " N.B. This option may not work in your platform. If Amaya crashes"
1403: echo " when opening a PNG file. Recompile it using the system libraries."
1404: fi
1405: fi
1406:
1407: if test "$with_gtk" = "yes" ; then
1.67 vatton 1408: echo "Amaya configured with GTK"
1.120 gully 1409: fi
1410:
1411: if test "$with_motif" = "yes" ; then
1.107 kahan 1412: if test "$no_motif" = "yes" ; then
1.120 gully 1413: echo "Motif seems not installed on this machine"
1414: echo "Amaya need Motif 1.2 or 2.0"
1.105 vatton 1415: else
1416: if test "$motif_includes" = "" ; then
1417: echo "Motif includes were not found"
1418: echo "Amaya might not compile"
1419: echo "Edit your Option file"
1420: else
1421: if test "$motif_libraries" = "" ; then
1422: echo "Motif libraries were not found"
1423: echo "Amaya might not compile"
1424: echo "Edit your Option file"
1.120 gully 1425: else
1426: echo "Amaya configured with MOTIF"
1.105 vatton 1427: fi
1428: fi
1429: fi
1.124 gully 1430: fi
1431:
1432: if test "$with_wx" = "yes" ; then
1433: echo "Amaya configured with wxWindows (experimental)"
1.1 cvs 1434: fi
1435:
1.121 gully 1436: if test "$with_nogui" = "yes" ; then
1.128 gully 1437: echo "Amaya configured without GUI toolkit"
1.121 gully 1438: fi
1439:
1.107 kahan 1440: echo ""
1.78 vatton 1441: echo "Now type \"make\" (GNU make preferably) to build the binaries"
1.107 kahan 1442: echo ""
1.120 gully 1443:
Webmaster