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