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