Annotation of Amaya/configure.in, revision 1.124
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:
! 362: dnl GL is used ?
! 363: if test "${with_gl}" == "yes" ; then
! 364: WX_LIBRARIES="`wx-config --gl-libs`"
! 365: else
! 366: WX_LIBRARIES="`wx-config --libs`"
! 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.61 cvs 654: dnl Check for availability of amaya sources
1.1 cvs 655: dnl
656:
657: build_amaya="yes"
658:
659: if test "$with_amaya" = "no" ; then
660: build_amaya="no"
1.45 cvs 661: else
662: if test ! -f $srcdir/amaya/Makefile.in ; then
1.1 cvs 663: AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
664: build_amaya="no"
1.45 cvs 665: fi
1.1 cvs 666: fi
667:
668: dnl
1.50 cvs 669: dnl Check for additionnal packages
1.1 cvs 670: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
671: dnl
1.93 kahan 672:
1.82 vatton 673: AC_ARG_WITH(i18n, [ --without-i18n disable internationalization support ])
1.76 vatton 674: dnl
675: dnl I18N support disabled by default
676: dnl
1.77 kahan 677:
678: if test "$with_i18n" = "" ; then
1.82 vatton 679: if test "$enable_i18n" = "no" ; then
680: with_i18n="no"
681: else
1.77 kahan 682: with_i18n="yes"
683: fi
684:
685: fi
1.76 vatton 686: if test "$with_i18n" = "yes" ; then
687: I18N_OPTIONS=-D_I18N_
688: else
689: with_i18n="no"
690: I18N_OPTIONS=""
691: fi
1.1 cvs 692:
1.75 cheyroul 693: if test "$with_gl" = "yes" ; then
694: AC_MSG_CHECKING([OpenGL])
695: for ac_dir in \
696: /usr/include \
697: /usr/X11R6/include \
698: /usr/local/include \
699: ; \
1.80 cheyroul 700: do if test -r "$ac_dir/GL/gl.h" ; then
1.75 cheyroul 701: gl_inc="yes"
1.80 cheyroul 702: GL_INC_I="$ac_dir"
703: if test "$ac_dir" != "/usr/include" ; then
704: GL_INCLUDES="-I$ac_dir"
705: fi
1.96 cheyroul 706: AC_MSG_RESULT([yes])
1.75 cheyroul 707: break
708: fi
1.80 cheyroul 709: done
710: AC_MSG_CHECKING([GLU])
1.75 cheyroul 711: for ac_dir in \
712: /usr/include/GL \
713: /usr/include \
714: /usr/X11R6/include/GL \
715: /usr/X11R6/include \
716: /usr/local/include \
717: /usr/local/include/GL \
718: ; \
719: do if test -r "$ac_dir/glu.h" ; then
720: glu_inc="yes"
1.80 cheyroul 721: GL_INC_II="$ac_dir"
722: if test "$ac_dir" != "/usr/include" ; then
723: if test "$ac_dir" != "$GL_INC_I" ; then
724: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
725: fi
726: fi
1.96 cheyroul 727: AC_MSG_RESULT([yes])
1.75 cheyroul 728: break
729: fi
730: done
1.80 cheyroul 731: AC_MSG_CHECKING([GTKGLAREA])
1.75 cheyroul 732: for ac_dir in \
733: /usr/include/GL \
734: /usr/include \
735: /usr/X11R6/include/GL \
736: /usr/X11R6/include \
737: /usr/local/include \
738: /usr/local/include/GL \
739: ; \
740: do if test -r "$ac_dir/gtkgl/gtkglarea.h" ; then
741: gtkgl_inc="yes"
1.80 cheyroul 742: if test "$ac_dir" != "/usr/include" ; then
743: if test "$ac_dir" != "$GL_INC_II" ; then
744: if test "$ac_dir" != "$GL_INC_I" ; then
745: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
746: fi
747: fi
748: fi
1.96 cheyroul 749: AC_MSG_RESULT([yes])
1.75 cheyroul 750: break
751: fi
752: done
1.80 cheyroul 753: AC_MSG_CHECKING([freetype])
754: for ac_dir in \
755: /usr/include \
756: /usr/X11R6/include \
757: /usr/local/include \
758: ; \
759: do if test -r "$ac_dir/ft2build.h" ; then
760: freetype_inc="yes"
761: GL_INCLUDES="$GL_INCLUDES `freetype-config --cflags`"
1.96 cheyroul 762: AC_MSG_RESULT([yes])
763: break
764: fi
765: done
1.104 cheyroul 766: AC_MSG_CHECKING([Xft])
767: for ac_dir in \
768: /usr/include \
769: /usr/X11R6/include \
770: /usr/local/include \
771: /usr/include/X11/Xft \
772: /usr/X11R6/include/X11/Xft \
773: /usr/local/include/X11/Xft \
774: /usr/include/X11/Xft1 \
775: /usr/X11R6/include/X11/Xft1 \
1.113 vatton 776: /usr/include/Xft2/X11/Xft/ \
1.104 cheyroul 777: /usr/local/include/X11/Xft1 \
778: /usr/include/X11/Xft2 \
779: /usr/X11R6/include/X11/Xft2 \
780: /usr/local/include/X11/Xft2 \
781: ; \
782: do if test -r "$ac_dir/Xft.h" ; then
783: xft_inc="yes"
784: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
785: AC_MSG_RESULT([yes])
786: break
787: fi
788: done
1.96 cheyroul 789: AC_MSG_CHECKING([gcc3])
790: for ac_dir in \
791: /usr/lib \
792: /usr/X11R6/lib \
793: /usr/local/lib \
794: ; \
795: do if test -r "$ac_dir/libstdc++.so.5" ; then
796: stdglu_inc="yes"
797: AC_MSG_RESULT([yes])
798: break
1.80 cheyroul 799: fi
1.96 cheyroul 800: done
801: if test "$gl_inc" = "" ; then
1.75 cheyroul 802: AC_MSG_WARN(Opengl headers (gl.h) not found !!)
803: AC_MSG_WARN(Disabling opengl build !)
804: with_gl="no"
805: GL_OPTIONS=
806: GL_INCLUDES=
807: GL_LIBRARIES=
1.81 cheyroul 808: exit 1;
1.75 cheyroul 809: fi
810: if test "$glu_inc" = "" ; then
811: AC_MSG_WARN(Glu headers (glu.h) not found !!)
812: AC_MSG_WARN(Disabling opengl build !)
1.81 cheyroul 813:
1.75 cheyroul 814: with_gl="no"
815: GL_OPTIONS=
816: GL_INCLUDES=
817: GL_LIBRARIES=
1.81 cheyroul 818: exit 1;
1.75 cheyroul 819: fi
820: if test "$gtkgl_inc" = "" ; then
821: AC_MSG_WARN(Gtkglarea headers (gktglarea.h) not found !!)
822: AC_MSG_WARN(Disabling opengl build !)
823: with_gl="no"
824: GL_OPTIONS=
825: GL_INCLUDES=
826: GL_LIBRARIES=
1.81 cheyroul 827: exit 1;
1.75 cheyroul 828: fi
1.80 cheyroul 829: if test "$freetype_inc" = "" ; then
830: AC_MSG_WARN(Freetype 2 headers (ft2build.h) not found !!)
831: AC_MSG_WARN(Disabling opengl build !)
832: with_gl="no"
833: GL_OPTIONS=
834: GL_INCLUDES=
835: GL_LIBRARIES=
1.81 cheyroul 836: exit 1;
1.80 cheyroul 837: fi
1.104 cheyroul 838: if test "$xft_inc" = "" ; then
839: AC_MSG_WARN(Xft 2 headers (Xft.h) not found !!)
840: AC_MSG_WARN(Disabling opengl build !)
841: with_gl="no"
842: GL_OPTIONS=
843: GL_INCLUDES=
844: GL_LIBRARIES=
845: exit 1;
846: fi
1.75 cheyroul 847: if test "$gl_inc" = "yes" ; then
1.79 cheyroul 848: if test "$glu_inc" = "yes" ; then
849: if test "$gtkgl_inc" = "yes" ; then
1.96 cheyroul 850: if test "$freetype_inc" = "yes" ; then
1.104 cheyroul 851: if test "$xft_inc" = "yes" ; then
852: if test "$stdglu_inc" = "yes" ; then
1.113 vatton 853: GL_LIBRARIES="-L/usr/lib -L/usr/X11R6/lib -lXmu -lXft -lfreetype -lGL -lGLU -lgtkgl -lstdc++"
1.104 cheyroul 854: else
1.113 vatton 855: GL_LIBRARIES="-L/usr/lib -L/usr/X11R6/lib -lXmu -lXft -lfreetype -lGL -lGLU -lgtkgl"
1.104 cheyroul 856: fi
857: GL_OPTIONS="-D_GL"
858: no_motif=yes
859: fi
1.80 cheyroul 860: fi
1.75 cheyroul 861: fi
862: fi
863: fi
864: AC_SUBST(GL_INCLUDES)
865: AC_SUBST(GL_LIBRARIES)
1.115 cheyroul 866: dnl PRINTIFNOTGL=" "
867: dnl #NOPRINT="#"
868: NOPRINT=""
869: PRINTIFNOTGL=" print_prog"
1.97 cheyroul 870: else
1.112 cheyroul 871: NOPRINT=""
1.97 cheyroul 872: PRINTIFNOTGL=" print_prog"
1.75 cheyroul 873: fi
1.97 cheyroul 874: AC_SUBST(PRINTIFNOTGL)
1.112 cheyroul 875: AC_SUBST(NOPRINT)
876:
1.76 vatton 877:
878: AC_ARG_ENABLE(svg, [ --disable-svg remove SVG support ])
879: AC_ARG_ENABLE(annot, [ --disable-annot remove Annotations support ])
1.93 kahan 880: AC_ARG_ENABLE(raptor, [ --disable-raptor disable the raptor RDF parser ])
1.116 kahan 881: AC_ARG_ENABLE(redland, [ --enable-redland enable the redland RDF library ])
882: AC_ARG_ENABLE(system-redland, [ --enable-system-redland try the redland RDF system library ])
1.108 kahan 883: AC_ARG_ENABLE(bookmarks, [ --enable-bookmarks enables experimental bookmark support ])
1.76 vatton 884: AC_ARG_ENABLE(generic-xml, [ --disable-generic-xml remove Generic XML support ])
885:
1.75 cheyroul 886: dnl
1.21 cvs 887: dnl plugins support is disabled by default
1.8 cvs 888: dnl
1.13 cvs 889:
890: if test "$with_plugin" = "" ; then
1.21 cvs 891: if test "$enable_plugin" = "yes" ; then
1.55 kahan 892: with_plugin="yes"
1.21 cvs 893: else
1.17 cvs 894: with_plugin="no"
895: fi
1.10 cvs 896: fi
1.1 cvs 897:
1.8 cvs 898: dnl
1.68 vatton 899: dnl svg is enabled by default
1.26 cvs 900: dnl
1.68 vatton 901: if test "$with_svg" = "" ; then
902: if test "$enable_svg" = "no" ; then
903: with_svg="no"
1.49 cvs 904: else
1.68 vatton 905: with_svg="yes"
1.26 cvs 906: fi
907: fi
908:
909: dnl
1.56 kahan 910: dnl annotations is enabled by default
1.47 cvs 911: dnl
912: if test "$with_annot" = "" ; then
1.56 kahan 913: if test "$enable_annot" = "no" ; then
914: with_annot="no"
915: else
1.54 cvs 916: with_annot="yes"
1.47 cvs 917: fi
1.99 kahan 918: else
919: with_annot="yes"
1.47 cvs 920: fi
921:
1.93 kahan 922:
923: dnl
924: dnl The raptor RDF parser is enabled by default
925: dnl
926: if test "$with_raptor" = "" ; then
927: if test "$enable_raptor" = "no" ; then
928: with_raptor="no"
929: else
1.99 kahan 930: with_raptor="yes"
1.93 kahan 931: fi
1.99 kahan 932: else
933: with_raptor="yes"
1.93 kahan 934: fi
935:
1.70 kahan 936: dnl
1.116 kahan 937: dnl The redland library is disabled by default
1.109 kahan 938: dnl
939: if test "$with_redland" = "" ; then
940: if test "$enable_redland" = "yes" ; then
941: with_redland="yes"
942: else
943: with_redland="no"
944: fi
945: else
946: with_redland="no"
947: fi
948:
949: dnl
1.116 kahan 950: dnl The redland library is disabled by default
951: dnl
952: if test "$with_system_redland" = "" ; then
953: if test "$enable_system_redland" = "yes" ; then
954: with_redland="yes"
955: with_system_redland="yes"
956: else
957: with_system_redland="no"
958: fi
959: else
960: with_system_redland="no"
961: fi
962:
963: dnl
964: dnl The bookmarks support is disabled by default
1.108 kahan 965: dnl
966: if test "$with_bookmarks" = "" ; then
967: if test "$enable_bookmarks" = "yes" ; then
968: with_bookmarks="yes"
969: else
970: with_bookmarks="no"
971: fi
972: else
973: with_bookmarks="no"
974: fi
975:
976: dnl
1.70 kahan 977: dnl Generic XML support enabled by default
978: dnl
979: if test "$with_generic_xml" = "" ; then
980: if test "$enable_generic_xml" = "no" ; then
981: with_generic_xml="no"
982: GENERIC_XML_OPTIONS=
983: else
984: with_generic_xml="yes"
985: GENERIC_XML_OPTIONS=-DXML_GENERIC
986: fi
987: fi
988:
1.120 gully 989: AC_ARG_WITH(dav, [ --with-dav enable WebDAV support (experimental) ])
1.88 kirschpi 990: dnl
991: dnl DAV support disabled by default
992: dnl
993: if test "$with_dav" = "" ; then
994: if test "$enable_dav" = "yes" ; then
995: with_dav="yes"
996: else
997: with_dav="no"
998: fi
999: fi
1000:
1001: if test "$with_dav" = "yes" ; then
1002: DAV_OPTIONS=-DDAV
1.90 kirschpi 1003: DAVDIR="davlib"
1004: LIBDAV="libwwwdav"
1005: WITHDAV="--with-dav"
1006: WWWDAV="-lwwwdav"
1.88 kirschpi 1007: else
1008: with_dav="no"
1009: DAV_OPTIONS=""
1.90 kirschpi 1010: DAVDIR=""
1011: LIBDAV=""
1012: WITHDAV=""
1013: WWWDAV=""
1.88 kirschpi 1014: fi
1015:
1.70 kahan 1016:
1.19 cvs 1017: if test "$build_amaya" = "yes" ; then
1.43 cvs 1018: if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50 cvs 1019: AC_MSG_WARN(libwww sources not found !!)
1020: AC_MSG_WARN(Disabling Amaya build !)
1021: build_amaya="no"
1.1 cvs 1022: fi
1.8 cvs 1023:
1024: if test ! -f $srcdir/amaya/MathML.S ; then
1.10 cvs 1025: if test "$with_math" = "yes" ; then
1.8 cvs 1026: AC_MSG_WARN(MathML sources not found !!)
1.26 cvs 1027: AC_MSG_WARN(Disabling Math build !)
1.10 cvs 1028: with_math="no"
1029: MATH_OPTIONS=
1.8 cvs 1030: fi
1031: fi
1.26 cvs 1032:
1.68 vatton 1033: if test ! -f $srcdir/amaya/SVG.S ; then
1034: if test "$with_svg" = "yes" ; then
1035: AC_MSG_WARN(SVG sources not found !!)
1036: AC_MSG_WARN(Disabling SVG build !)
1037: with_svg="no"
1038: SVG_OPTIONS=
1.26 cvs 1039: fi
1040: fi
1041:
1.48 cvs 1042: if test ! -f $srcdir/annotlib/Makefile.in ; then
1.47 cvs 1043: if test "$with_annot" = "yes" ; then
1044: AC_MSG_WARN(Annotation makefile not found !!)
1045: AC_MSG_WARN(Disabling Annotations build !)
1046: with_annot="no"
1047: fi
1048: fi
1.55 kahan 1049:
1.109 kahan 1050: if test "$with_raptor" = "yes" -a "$with_redland" = "yes" ; then
1051: AC_MSG_WARN(Disabling raptor build as redland is enabled !)
1052: MAKERAPTOR=['#']
1053: with_raptor="no"
1054: fi
1055:
1.108 kahan 1056: if test "$with_raptor" = "yes" -a "$with_annot" = "no" ; then
1.93 kahan 1057: AC_MSG_WARN(Disabling raptor build as annotations are disabled !)
1058: MAKERAPTOR=['#']
1059: with_raptor="no"
1060: fi
1061:
1.108 kahan 1062: if test "$with_raptor" = "yes" -a ! -d "$srcdir/libraptor" ; then
1063: AC_MSG_WARN(Raptor source dir not found !!)
1064: AC_MSG_WARN(Disabling raptor build !)
1065: MAKERAPTOR=['#']
1066: with_raptor="no"
1.109 kahan 1067: fi
1068:
1069: if test "$with_raptor" = "yes" ; then
1.108 kahan 1070: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DRAPTOR_RDF_PARSER -I\$(THOTDIR)/libraptor"
1071: AMAYA_RAPTOR_LIBS="../libraptor/.libs/libraptor.a"
1072: AMAYA_RAPTOR_SRC="amaya_comp_libraptor"
1073: AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/libraptor"
1074: fi
1075:
1.109 kahan 1076: if test "$with_redland" = "yes" -a "$with_annot" = "no" ; then
1077: AC_MSG_WARN(Disabling redland build as annotations are disabled !)
1078: MAKEREDLAND=['#']
1079: with_redland="no"
1080: fi
1081:
1.116 kahan 1082: redland_compile_source=yes
1083: if test "$with_redland" = "yes" -a "$with_system_redland" = "yes" ; then
1084: # check to see if we have a redland library
1085: AC_MSG_CHECKING(system redland library)
1.118 kahan 1086: redland_min_version=0.9.14
1.116 kahan 1087: REDLAND_CONFIG="redland-config"
1088: REDLAND_VERSION=`$REDLAND_CONFIG --version`
1089: redland_version_dec=`echo $REDLAND_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
1090: redland_min_version_dec=`echo $redland_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
1091: if test $redland_version_dec -lt $redland_min_version_dec; then
1092: AC_MSG_RESULT(no - found version $REDLAND_VERSION and minimal version is $redland_min_version)
1093: else
1094: AC_MSG_RESULT(yes - found version $REDLAND_VERSION)
1095: AC_MSG_CHECKING(checking for redland headers)
1.117 kahan 1096: dnl We should use awk here and remove the -I from the following line
1097: dnl REDLAND_HEADERS=`$REDLAND_CONFIG --cflags`
1098: REDLAND_HEADERS=""
1099: if test -e "/usr/include/redland.h" ; then
1100: REDLAND_HEADERS="/usr/include";
1101: else
1102: if test -e "/usr/local/include/redland.h" ; then
1103: REDLAND_HEADERS="/usr/local/include";
1104: fi
1105: fi
1106: if test $REDLAND_HEADERS != ""; then
1.116 kahan 1107: AC_MSG_RESULT(yes - have development version)
1108: redland_compile_source=no
1109: else
1110: AC_MSG_RESULT(no - no development version)
1111: fi
1112: fi
1113: fi
1114:
1115: if test "$with_redland" = "yes" -a "$redland_compile_source" = "yes" \
1116: -a ! -d "$srcdir/../redland" ; then
1.109 kahan 1117: AC_MSG_WARN(Redland source dir not found !!)
1118: AC_MSG_WARN(Disabling redland build !)
1119: MAKEREDLAND=['#']
1120: with_redland="no"
1121: fi
1122:
1123: if test "$with_redland" = "yes" ; then
1.116 kahan 1124: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DLIBRDF_INTERNAL=1 -DAM_REDLAND -DRAPTOR_RDF_PARSER"
1125: if test "$redland_compile_source" = "yes" ; then
1126: AMAYA_RAPTOR_SRC="amaya_comp_redland"
1127: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
1128: AMAYA_RAPTOR_LIBS="../redland/librdf/.libs/librdf.a ../redland/raptor/.libs/libraptor.a"
1129: AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
1130: else
1131: MAKEREDLAND=['#']
1132: AMAYA_RAPTOR_SRC=
1133: redland_includes=`$REDLAND_CONFIG --cflags`
1134: redland_libs=`$REDLAND_CONFIG --libs`
1135: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS"
1136: AMAYA_ANNOT_INCLUDES="$redland_includes -I\$(THOTDIR)/thotlib/include"
1137: AMAYA_ANNOT_EXTRA_LIBS="$redland_libs"
1138: AMAYA_RAPTOR_INCLUDES="$redland_includes"
1139: fi
1.109 kahan 1140: fi
1141:
1.116 kahan 1142:
1.108 kahan 1143: dnl control whether we should build the bookmarks support
1144: if test "$with_bookmarks" = "yes" -a "$with_annot" = "no" ; then
1145: AC_MSG_WARN(Disabling bookmarks build as annotations are disabled !)
1146: with_bookmarks="no"
1147: fi
1.109 kahan 1148: if test "$with_bookmarks" = "yes" -a "$with_redland" = "no" ; then
1149: AC_MSG_WARN(Disabling bookmarks build as redland is disabled !)
1.108 kahan 1150: with_bookmarks="no"
1151: fi
1152: if test "$with_bookmarks" = "yes" ; then
1153: ANNOTLIB_COMPILE_BM=
1154: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DBOOKMARKS"
1155: else
1156: ANNOTLIB_COMPILE_BM=['#']
1157: fi
1158:
1.93 kahan 1159: dnl control whether we should use libwww's rdf parser
1.109 kahan 1160: if test "$with_raptor" = "yes" -o "$with_redland" = "yes"; then
1.93 kahan 1161: dnl not all the function calls have been cleared as of today,
1162: dnl we still need libwww's rdf parser
1.98 kahan 1163: MAKE_LIBWWW_RDF_PARSER=
1164: LIBWWW_RDF_PARSER=
1.93 kahan 1165: else
1166: MAKE_LIBWWW_RDF_PARSER="libwwwxml"
1167: LIBWWW_RDF_PARSER="-lwwwxml"
1168: fi
1.70 kahan 1169:
1.55 kahan 1170: if test "$with_plugin" = "yes" ; then
1171: AC_MSG_WARN(The plugin library isn't supported anymore in Amaya !!)
1172: AC_MSG_WARN(Disabling plugin build !)
1173: with_plugin="no"
1174: fi
1175:
1.88 kirschpi 1176:
1177: if test ! -f $srcdir/davlib/Makefile.in ; then
1178: if test "$with_dav" = "yes" ; then
1179: AC_MSG_WARN(WebDAV makefile not found !!)
1180: AC_MSG_WARN(Disabling WebDAV build !)
1181: with_dav="no"
1.90 kirschpi 1182: DAVDIR=""
1183: LIBDAV=""
1184: WITHDAV=""
1185: WWWDAV=""
1.88 kirschpi 1186: fi
1187: fi
1188:
1189:
1.1 cvs 1190: fi
1191:
1192: dnl
1193: dnl The options for each library or binary
1194: dnl
1195:
1.124 ! gully 1196: THOT_OPTIONS="$I18N_OPTIONS $MOTIF_OPTIONS $GTK_OPTIONS $GL_OPTIONS $WX_OPTIONS $NOGUI_OPTIONS"
! 1197: AMAYA_OPTIONS="$MATH_OPTIONS $SVG_OPTIONS $GENERIC_XML_OPTIONS $I18N_OPTIONS $MOTIF_OPTIONS $GTK_OPTIONS $GL_OPTIONS $WX_OPTIONS $NOGUI_OPTIONS"
1.58 cvs 1198: #PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
1.123 gully 1199: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS $I18N_OPTIONS"
1.101 kahan 1200:
1.102 kahan 1201: IMGLIBS="-ljpeg -lpng -lz"
1.3 cvs 1202: EXTRA_LIBS=
1.1 cvs 1203:
1204: dnl
1205: dnl Set up the PATHs needed
1206: dnl
1207:
1208: API="\$(THOTDIR)/thotlib/include"
1209: VAR="\$(THOTDIR)/thotlib/internals/var"
1210: INCL="\$(THOTDIR)/thotlib/internals/h"
1211: FUNC="\$(THOTDIR)/thotlib/internals/f"
1212:
1213: dnl
1214: dnl Set up the include variables.
1215: dnl
1216:
1.61 cvs 1217: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58 cvs 1218: APIINCLUDES=-I${API}
1219:
1220: if test "${VPATHOPT}" = "" ; then
1.1 cvs 1221: VPATHOPT="VPATH"
1222: fi
1223:
1224: dnl
1225: dnl Exports the current values of the variables.
1226: dnl
1227:
1228: AC_SUBST(AMAYA_VER)
1.6 cvs 1229: AC_SUBST(CEXTRACT_VER)
1230: AC_SUBST(CEXTRACT_FLAGS)
1.1 cvs 1231:
1232: AC_SUBST(THOTINCLUDES)
1233: AC_SUBST(APIINCLUDES)
1234: AC_SUBST(VPATHOPT)
1235:
1.63 vatton 1236: AC_SUBST(GTK_OPTIONS)
1.1 cvs 1237: AC_SUBST(THOT_OPTIONS)
1238: AC_SUBST(AMAYA_OPTIONS)
1239: AC_SUBST(PLUGIN_OPTIONS)
1.48 cvs 1240: AC_SUBST(AMAYA_ANNOT_OPTIONS)
1.110 kahan 1241: AC_SUBST(AMAYA_ANNOT_INCLUDES)
1.116 kahan 1242: AC_SUBST(AMAYA_ANNOT_EXTRA_LIBS)
1.1 cvs 1243: AC_SUBST(IMGLIBS)
1.3 cvs 1244: AC_SUBST(EXTRA_LIBS)
1.90 kirschpi 1245:
1246: AC_SUBST(DAVDIR)
1247: AC_SUBST(LIBDAV)
1248: AC_SUBST(WITHDAV)
1249: AC_SUBST(WWWDAV)
1.1 cvs 1250:
1.93 kahan 1251: AC_SUBST(MAKERAPTOR)
1.109 kahan 1252: AC_SUBST(MAKEREDLAND)
1.108 kahan 1253: AC_SUBST(ANNOTLIB_COMPILE_BM)
1.109 kahan 1254: AC_SUBST(AMAYA_RAPTOR_SRC)
1.93 kahan 1255: AC_SUBST(AMAYA_RAPTOR_LIBS)
1256: AC_SUBST(AMAYA_RAPTOR_INCLUDES)
1257: AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
1258: AC_SUBST(LIBWWW_RDF_PARSER)
1259:
1260: AC_SUBST(SUBDIRS)
1261:
1.1 cvs 1262: dnl
1.48 cvs 1263: dnl Include the option Makefile.xxx fragment according to the configure options
1.1 cvs 1264: dnl
1265:
1266: if test "$with_plugin" = "yes" ; then
1.50 cvs 1267: AC_SUBST_FILE(plugin_frag)
1.1 cvs 1268: plugin_frag=$srcdir/pluginlib/Makefile.plugin
1269: else
1270: AC_SUBST_FILE(plugin_frag)
1271: plugin_frag=/dev/null
1272: fi
1273:
1274: AC_SUBST_FILE(www_frag)
1.49 cvs 1275: www_frag=$srcdir/amaya/Makefile.libwww
1.1 cvs 1276:
1.50 cvs 1277: if test "$with_math" = "no" ; then
1.10 cvs 1278: AC_SUBST_FILE(math_frag)
1.50 cvs 1279: math_frag=/dev/null
1.8 cvs 1280: else
1.10 cvs 1281: AC_SUBST_FILE(math_frag)
1.50 cvs 1282: math_frag=$srcdir/amaya/Makefile.math
1.8 cvs 1283: fi
1284:
1.68 vatton 1285: if test "$with_svg" = "no" ; then
1286: AC_SUBST_FILE(svg_frag)
1287: svg_frag=/dev/null
1.26 cvs 1288: else
1.68 vatton 1289: AC_SUBST_FILE(svg_frag)
1290: svg_frag=$srcdir/amaya/Makefile.svg
1.26 cvs 1291: fi
1292:
1.47 cvs 1293: if test "$with_annot" = "yes" ; then
1294: AC_SUBST_FILE(annot_frag)
1.48 cvs 1295: annot_frag=$srcdir/annotlib/Makefile.annot
1.47 cvs 1296: else
1297: AC_SUBST_FILE(annot_frag)
1298: annot_frag=/dev/null
1299: fi
1300:
1.88 kirschpi 1301: if test "$with_dav" = "yes" ; then
1302: AC_SUBST_FILE(dav_frag)
1303: dav_frag=$srcdir/davlib/Makefile.dav
1304: fi
1.16 cvs 1305:
1.1 cvs 1306: dnl ***************************************************************
1307: dnl
1308: dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
1309: dnl
1310: dnl ***************************************************************
1311:
1312: EXTRA_MAKEFILE_IN=
1.2 cvs 1313: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1 cvs 1314: libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2 cvs 1315: tools/mkdep/Makefile \
1.1 cvs 1316: tools/cextract-1.7/Makefile thotlib/Makefile \
1.5 cvs 1317: thotlib/include/Makefile batch/Makefile tablelib/Makefile"
1.1 cvs 1318:
1319: if test "$build_amaya" = "yes" ; then
1.2 cvs 1320:
1.19 cvs 1321: make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2 cvs 1322: EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.93 kahan 1323: $srcdir/amaya/Makefile.libwww"
1.27 cvs 1324:
1325: if test "$$with_plugin" = "yes" ; then
1326: make_output="$make_output pluginlib/Makefile"
1327: EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.93 kahan 1328: $srcdir/pluginlib/Makefile.plugin"
1.27 cvs 1329: fi
1.2 cvs 1330:
1.48 cvs 1331: if test "$with_annot" = "yes" ; then
1332: make_output="$make_output annotlib/Makefile"
1333: EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
1334: fi
1.88 kirschpi 1335:
1336: if test "$with_dav" = "yes" ; then
1337: make_output="$make_output davlib/Makefile"
1338: EXTRA_MAKEFILE_IN="$srcdir/davlib/Makefile.in"
1339: fi
1340:
1.1 cvs 1341: fi
1342:
1343: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6 cvs 1344: AC_OUTPUT($make_output , [
1345: dnl
1346: dnl This fragment of shell code is executed after the
1347: dnl Makefile(s) dump ...
1348: dnl
1349:
1350: echo timestamp > stamp-h
1351:
1352: dnl
1353: dnl Check for an upgrade in the Options numbers
1354: dnl
1355:
1356: if test -f Options ; then
1357: oldversion=`grep Version Options`
1358: newversion=`grep Version Options.orig`
1359: if test "$oldversion" != "$newversion" ; then
1360: echo WARNING : Options files have changed, old options saved to Options.old
1361: cp Options Options.old
1362: cp Options.orig Options
1363: exit 1
1364: fi
1365: fi
1366: ])
1.1 cvs 1367:
1368: if test "$build_amaya" = "yes" ; then
1.50 cvs 1369: echo Amaya configured with libWWW
1370: if test "$with_plugin" = "yes" ; then
1371: echo Amaya configured with Plugins support
1.8 cvs 1372: fi
1.10 cvs 1373: if test "$with_math" = "yes" ; then
1374: echo Amaya configured with Math support
1.26 cvs 1375: fi
1.68 vatton 1376: if test "$with_svg" = "yes" ; then
1377: echo Amaya configured with SVG support
1.47 cvs 1378: fi
1379: if test "$with_annot" = "yes" ; then
1380: echo Amaya configured with Annotations support
1.70 kahan 1381: fi
1.93 kahan 1382: if test "$with_raptor" = "yes" ; then
1.106 kahan 1383: echo Amaya configured with the Raptor RDF parser
1.109 kahan 1384: fi
1385: if test "$with_redland" = "yes" ; then
1.116 kahan 1386: if test "$with_system_redland" = "no" ; then
1387: echo Amaya configured with the Redland RDF library \(local source\)
1388: else
1389: echo Amaya configured with the Redland RDF library \(system\)
1390: fi
1.108 kahan 1391: fi
1392: if test "$with_bookmarks" = "yes" ; then
1393: echo Amaya configured with bookmarks support \(experimental\)
1.93 kahan 1394: fi
1.70 kahan 1395: if test "$with_generic_xml" = "yes" ; then
1396: echo Amaya configured with generic XML suppport
1397: fi
1398: if test "$with_i18n" = "yes" ; then
1.82 vatton 1399: echo Amaya configured with internationalization suppport
1.75 cheyroul 1400: fi
1401: if test "$with_gl" = "yes" ; then
1402: echo Amaya configured with Opengl Canvas Rendering \(experimental\)
1.88 kirschpi 1403: fi
1404: if test "$with_dav" = "yes" ; then
1405: echo Amaya configured with WebDAV support \(experimental\)
1.1 cvs 1406: fi
1.5 cvs 1407: fi
1408:
1.107 kahan 1409: if test "$no_graphic" = "yes" ; then
1410: echo "Amaya configured with system graphic libraries (libjpeg, libpng, zlib)"
1411: else
1412: echo "Amaya configured with static graphic libraries (libjpeg, libpng, zlib)"
1413: if test "$with_gtk" = "yes" -o "$with_gl" = "yes" ; then
1414: echo " N.B. This option may not work in your platform. If Amaya crashes"
1415: echo " when opening a PNG file. Recompile it using the system libraries."
1416: fi
1417: fi
1418:
1419: if test "$with_gtk" = "yes" ; then
1.67 vatton 1420: echo "Amaya configured with GTK"
1.120 gully 1421: fi
1422:
1423: if test "$with_motif" = "yes" ; then
1.107 kahan 1424: if test "$no_motif" = "yes" ; then
1.120 gully 1425: echo "Motif seems not installed on this machine"
1426: echo "Amaya need Motif 1.2 or 2.0"
1.105 vatton 1427: else
1428: if test "$motif_includes" = "" ; then
1429: echo "Motif includes were not found"
1430: echo "Amaya might not compile"
1431: echo "Edit your Option file"
1432: else
1433: if test "$motif_libraries" = "" ; then
1434: echo "Motif libraries were not found"
1435: echo "Amaya might not compile"
1436: echo "Edit your Option file"
1.120 gully 1437: else
1438: echo "Amaya configured with MOTIF"
1.105 vatton 1439: fi
1440: fi
1441: fi
1.124 ! gully 1442: fi
! 1443:
! 1444: if test "$with_wx" = "yes" ; then
! 1445: echo "Amaya configured with wxWindows (experimental)"
1.1 cvs 1446: fi
1447:
1.121 gully 1448: if test "$with_nogui" = "yes" ; then
1449: echo "Amaya configured with no GUI toolkit"
1450: fi
1451:
1.107 kahan 1452: echo ""
1.78 vatton 1453: echo "Now type \"make\" (GNU make preferably) to build the binaries"
1.107 kahan 1454: echo ""
1.120 gully 1455:
Webmaster