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