Annotation of Amaya/configure.in, revision 1.93
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:
13: AC_PREREQ(2.2)
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
179:
180: dnl
181: dnl Checks for typedefs, structures, and compiler characteristics.
182: dnl
183:
184: AC_C_CONST
185: AC_C_INLINE
186: AC_TYPE_MODE_T
187: AC_TYPE_OFF_T
188: AC_TYPE_SIZE_T
189: AC_HEADER_TIME
190: AC_STRUCT_TM
191: AC_STRUCT_TIMEZONE
192: AC_TYPE_UID_T
193:
194: dnl
195: dnl Checks for library functions.
196: dnl
197:
198: AC_FUNC_ALLOCA
199: AC_TYPE_GETGROUPS
200: AC_PROG_GCC_TRADITIONAL
201: AC_FUNC_MEMCMP
202: AC_FUNC_MMAP
203: AC_TYPE_SIGNAL
204: AC_FUNC_VPRINTF
1.58 cvs 205: 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 206:
1.75 cheyroul 207:
1.85 vatton 208:
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.63 vatton 229: GTK_OPTIONS=
230: AC_ARG_WITH(gtk, [ --with-gtk use GTK instead of Motif])
231: if test "$withval" = "yes" ; then
1.85 vatton 232: with_gtk="yes"
233: else
234: if test "$with_gl" = "yes" ; then
235: with_gtk="yes"
236: fi
237: fi
238:
239: if test "$with_gtk" = "yes" ; then
1.63 vatton 240: for ac_dir in \
1.65 cvs 241: /usr/lib/glib/include \
1.63 vatton 242: /usr/X11R6/include \
243: \
244: /usr/include/X11R6 \
245: /usr/local/X11R6/include \
246: /usr/local/include/X11R6 \
247: \
248: /usr/X11/include \
249: /usr/include/X11 \
250: /usr/local/X11/include \
251: /usr/local/include/X11 \
252: \
253: /usr/X386/include \
254: /usr/x386/include \
255: /usr/XFree86/include/X11 \
256: /usr/dt/include \
257: /usr/include \
258: /usr/local/include \
259: /usr/local/lib/glib/include \
260: ; \
261: do
262: if test -r "$ac_dir/gdk/gdk.h"; then
263: no_gtk= ac_gtk_includes=$ac_dir
264: break
265: fi
266: done
267:
1.65 cvs 268: GTK_INCLUDES="`gtk-config --cflags`"
1.63 vatton 269: AC_SUBST(GTK_INCLUDES)
1.87 kahan 270: GTK_LIBRARIES="`gtk-config --libs` -lgdk_imlib"
1.63 vatton 271: AC_SUBST(GTK_LIBRARIES)
1.65 cvs 272: GTK_OPTIONS=-D_GTK
1.63 vatton 273: no_motif=yes
1.76 vatton 274: no_graphic=yes
1.63 vatton 275: else
1.5 cvs 276: dnl
1.4 cvs 277: dnl Checking for Motif libraries and includes
278: dnl
279: dnl Borrowed from Lesstif configure.in
280: dnl Lesstif is a Great Project (TM)
281: dnl
282:
283: AC_DEFUN(AC_PATH_MOTIF_DIRECT,
284: [test -z "$motif_direct_test_library" && motif_direct_test_library=Xm
285: test -z "$motif_direct_test_function" && motif_direct_test_function=XmCreatePushButton
286: test -z "$motif_direct_test_include" && motif_direct_test_include=Xm/Xm.h
287: for ac_dir in \
288: /usr/include/Motif1.2 \
289: /usr/Motif1.2/include \
1.71 vatton 290: /sw/Lesstif/Motif2.0/include \
1.4 cvs 291: \
292: /usr/motif/include \
293: \
294: /usr/X11R6/include \
295: /usr/X11R5/include \
296: \
297: /usr/include/X11R6 \
298: /usr/include/X11R5 \
299: \
300: /usr/local/X11R6/include \
301: /usr/local/X11R5/include \
302: \
303: /usr/local/include/X11R6 \
304: /usr/local/include/X11R5 \
305: \
306: /usr/X11/include \
307: /usr/include/X11 \
308: /usr/local/X11/include \
309: /usr/local/include/X11 \
310: \
311: /usr/X386/include \
312: /usr/x386/include \
313: /usr/XFree86/include/X11 \
314: \
315: /usr/dt/include \
316: \
317: /usr/include \
318: /usr/local/include \
319: /usr/unsupported/include \
320: /usr/athena/include \
321: /usr/local/x11r5/include \
322: /usr/lpp/Xamples/include \
1.14 cvs 323: \
324: /usr/lesstif/include \
325: /usr/local/lesstif/include\
326: /usr/gnu/lesstif/include \
327: $HOME/lesstif/include \
1.4 cvs 328: ; \
329: do
330: if test -r "$ac_dir/$motif_direct_test_include"; then
331: no_motif= ac_motif_includes=$ac_dir
332: break
333: fi
334: done
335:
336: # Check for the libraries.
337: # See if we find them without any special options.
338: # Don't add to $LIBS permanently.
339: ac_save_LIBS="$LIBS"
340: LIBS="-l$motif_direct_test_library $LIBS"
341: # First see if replacing the include by lib works.
342: for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \
343: /usr/lib/Motif1.2 \
344: /usr/Motif1.2/lib \
1.71 vatton 345: /sw/Lesstif/Motif2.0/lib \
1.4 cvs 346: \
347: /usr/motif/lib \
348: \
349: /usr/X11R6/lib \
350: /usr/X11R5/lib \
351: \
352: /usr/lib/X11R6 \
353: /usr/lib/X11R5 \
354: \
355: /usr/local/X11R6/lib \
356: /usr/local/X11R5/lib \
357: \
358: /usr/local/lib/X11R6 \
359: /usr/local/lib/X11R5 \
360: \
361: /usr/X11/lib \
362: /usr/lib/X11 \
363: /usr/local/X11/lib \
364: \
365: /usr/X386/lib \
366: /usr/x386/lib \
367: /usr/XFree86/lib/X11 \
368: \
369: /usr/lib \
370: /usr/local/lib \
371: /usr/unsupported/lib \
372: /usr/athena/lib \
373: /usr/local/x11r5/lib \
374: /usr/lpp/Xamples/lib \
1.14 cvs 375: \
376: /usr/lesstif/lib \
377: /usr/local/lesstif/lib\
378: /usr/gnu/lesstif/lib \
379: $HOME/lesstif/lib \
1.4 cvs 380: ; \
381: do
1.71 vatton 382: for ac_extension in a so sl la; do
1.4 cvs 383: if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then
384: no_motif= ac_motif_libraries=$ac_dir
385: break 2
386: fi
387: done
1.5 cvs 388: done
389: LIBS="$ac_save_LIBS"
390: ])
1.4 cvs 391:
392: AC_DEFUN(AC_PATH_MOTIF,
1.66 vatton 393: [AC_REQUIRE_CPP()
1.4 cvs 394:
395: motif_includes=NONE
396: motif_libraries=NONE
397:
398: AC_MSG_CHECKING(for Motif)
1.63 vatton 399: if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then
400: no_motif=
1.4 cvs 401: else
402: AC_CACHE_VAL(ac_cv_path_motif,
403: [# One or both of these vars are not set, and there is no cached value.
1.63 vatton 404: no_motif=yes
1.4 cvs 405: AC_PATH_MOTIF_DIRECT
406:
407: if test "$no_motif" = yes; then
1.63 vatton 408: ac_cv_path_motif="no_motif=yes"
1.4 cvs 409: else
1.63 vatton 410: ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries"
1.66 vatton 411: fi])
412: eval "$ac_cv_path_motif"
1.63 vatton 413: fi
1.4 cvs 414:
415: if test "$no_motif" = yes; then
416: AC_MSG_RESULT(no)
1.5 cvs 417: MOTIF_INCLUDES=
418: MOTIF_LIBRARIES=
1.4 cvs 419: else
420: test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes
421: test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries
422: ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries"
423: AC_MSG_RESULT([libraries $motif_libraries, headers $motif_includes])
1.5 cvs 424: if test "$motif_includes" != "/usr/include" ; then
425: MOTIF_INCLUDES="-I$motif_includes"
426: fi
427: if test "$motif_libraries" != "/usr/lib" ; then
1.64 cvs 428: MOTIF_LIBRARIES="-L$motif_libraries -lXm"
1.19 cvs 429: case "${host}" in
430: *-*sun-solaris* )
431: MOTIF_LIBRARIES="${MOTIF_LIBRARIES} -R$motif_libraries"
432: ;;
1.65 cvs 433: esac
434: else
435: MOTIF_LIBRARIES="-lXm"
1.5 cvs 436: fi
1.4 cvs 437: fi
1.5 cvs 438: AC_SUBST(MOTIF_INCLUDES)
439: AC_SUBST(MOTIF_LIBRARIES)
1.4 cvs 440: ])
441:
442: AC_PATH_MOTIF
1.66 vatton 443: fi
1.4 cvs 444:
1.63 vatton 445: if test "${GCC}" = "yes"; then
446: CPP="${CPP} -x c"
447: fi
448:
1.1 cvs 449: dnl ***************************************************************
450: dnl
1.61 cvs 451: dnl SPECIFIC STUFF : CONFIGURATION OPTIONS FOR AMAYA
1.1 cvs 452: dnl
453: dnl ***************************************************************
454:
1.76 vatton 455: AC_ARG_WITH(graphic-libs, [ --without-graphic-libs doesn't use provided libjpeg, libpng.])
456: if test "$withval" = "no" ; then
1.83 vatton 457: no_graphic=yes
458: fi
459: if test "$withval" = "yes" ; then
460: no_graphic=no
1.76 vatton 461: fi
462:
463: if test "$no_graphic" = yes; then
464: dnl
465: AC_MSG_CHECKING([for libjpeg version = 6b])
466: AC_EGREP_CPP([x 62 *x],
467: [#include <jpeglib.h>
468: x JPEG_LIB_VERSION x],
469: dnl
470: AC_MSG_RESULT([yes])
471: LIBJPEG='-ljpeg'
472: MAKEJPEG=['#'],
473: dnl
474: AC_MSG_RESULT([no])
475: LIBJPEG='../libjpeg.a' dnl LIBJPEG goes into amaya/Makefile.in
476: )
477: dnl
478: dnl
479: AC_MSG_CHECKING([for libpng version = 1.0.x])
480: AC_EGREP_CPP([x \"1.0\..*\" *x],
481: [#include <png.h>
482: x PNG_LIBPNG_VER_STRING x],
483: dnl
484: AC_MSG_RESULT([yes])
485: LIBPNG='-lpng'
486: LIBZ=''
487: MAKEPNG=['#'],
488: dnl
489: AC_MSG_RESULT([no])
490: LIBPNG='../libpng.a'
491: LIBZ='../libz.a'
492: )
493: else
494: LIBJPEG='../libjpeg.a'
495: LIBPNG='../libpng.a'
496: LIBZ='../libz.a'
497: fi
498: dnl
499: AC_SUBST(LIBJPEG)
500: AC_SUBST(LIBPNG)
501: AC_SUBST(LIBZ)
502: AC_SUBST(MAKEJPEG)
503: AC_SUBST(MAKEPNG)
504:
1.68 vatton 505: AMAYA_VER="6.0"
1.1 cvs 506:
507: dnl
1.6 cvs 508: dnl We use a special versoin of cextract patched for alignment
509: dnl to build the signatures of the modules functions located in f subdirs
510: dnl
511: CEXTRACT_VER="1.7"
512: CEXTRACT_FLAGS="+O"
513:
1.3 cvs 514:
515: dnl
1.9 cvs 516: dnl Adjust the some variables depending on the host and compiler
1.61 cvs 517: dnl Thotlib NEED signed chars !!!
1.7 cvs 518: dnl
519:
520: if test "${CC}" = "gcc" ; then
1.44 cvs 521: CFLAGS="${CFLAGS} -W "
1.7 cvs 522: case "${host}" in
523: *-*-irix5* | *-*irix6* )
524: CFLAGS="${CFLAGS} -fsigned-char"
525: ;;
526: esac
1.14 cvs 527: fi
528:
529: if test "$ac_cv_c_const" = "no" ; then
530: CFLAGS="${CFLAGS} -DCONST= "
1.7 cvs 531: fi
532:
533: dnl
1.61 cvs 534: dnl Check for availability of amaya sources
1.1 cvs 535: dnl
536:
537: build_amaya="yes"
538:
539: if test "$with_amaya" = "no" ; then
540: build_amaya="no"
1.45 cvs 541: else
542: if test ! -f $srcdir/amaya/Makefile.in ; then
1.1 cvs 543: AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
544: build_amaya="no"
1.45 cvs 545: fi
1.1 cvs 546: fi
547:
548: dnl
1.50 cvs 549: dnl Check for additionnal packages
1.1 cvs 550: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
551: dnl
1.93 ! kahan 552:
1.82 vatton 553: AC_ARG_WITH(i18n, [ --without-i18n disable internationalization support ])
1.76 vatton 554: dnl
555: dnl I18N support disabled by default
556: dnl
1.77 kahan 557:
558: if test "$with_i18n" = "" ; then
1.82 vatton 559: if test "$enable_i18n" = "no" ; then
560: with_i18n="no"
561: else
1.77 kahan 562: with_i18n="yes"
563: fi
564:
565: fi
1.76 vatton 566: if test "$with_i18n" = "yes" ; then
567: I18N_OPTIONS=-D_I18N_
568: else
569: with_i18n="no"
570: I18N_OPTIONS=""
571: fi
1.1 cvs 572:
1.75 cheyroul 573: if test "$with_gl" = "yes" ; then
574: AC_MSG_CHECKING([OpenGL])
575: for ac_dir in \
576: /usr/include \
577: /usr/X11R6/include \
578: /usr/local/include \
579: ; \
1.80 cheyroul 580: do if test -r "$ac_dir/GL/gl.h" ; then
1.75 cheyroul 581: gl_inc="yes"
1.80 cheyroul 582: GL_INC_I="$ac_dir"
583: if test "$ac_dir" != "/usr/include" ; then
584: GL_INCLUDES="-I$ac_dir"
585: fi
1.75 cheyroul 586: break
587: fi
1.80 cheyroul 588: done
589: AC_MSG_CHECKING([GLU])
1.75 cheyroul 590: for ac_dir in \
591: /usr/include/GL \
592: /usr/include \
593: /usr/X11R6/include/GL \
594: /usr/X11R6/include \
595: /usr/local/include \
596: /usr/local/include/GL \
597: ; \
598: do if test -r "$ac_dir/glu.h" ; then
599: glu_inc="yes"
1.80 cheyroul 600: GL_INC_II="$ac_dir"
601: if test "$ac_dir" != "/usr/include" ; then
602: if test "$ac_dir" != "$GL_INC_I" ; then
603: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
604: fi
605: fi
1.75 cheyroul 606: break
607: fi
608: done
1.80 cheyroul 609: AC_MSG_CHECKING([GTKGLAREA])
1.75 cheyroul 610: for ac_dir in \
611: /usr/include/GL \
612: /usr/include \
613: /usr/X11R6/include/GL \
614: /usr/X11R6/include \
615: /usr/local/include \
616: /usr/local/include/GL \
617: ; \
618: do if test -r "$ac_dir/gtkgl/gtkglarea.h" ; then
619: gtkgl_inc="yes"
1.80 cheyroul 620: if test "$ac_dir" != "/usr/include" ; then
621: if test "$ac_dir" != "$GL_INC_II" ; then
622: if test "$ac_dir" != "$GL_INC_I" ; then
623: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
624: fi
625: fi
626: fi
1.75 cheyroul 627: break
628: fi
629: done
1.80 cheyroul 630: AC_MSG_CHECKING([freetype])
631: for ac_dir in \
632: /usr/include \
633: /usr/X11R6/include \
634: /usr/local/include \
635: ; \
636: do if test -r "$ac_dir/ft2build.h" ; then
637: freetype_inc="yes"
638: GL_INCLUDES="$GL_INCLUDES `freetype-config --cflags`"
639: break
640: fi
641: done
1.75 cheyroul 642: if test "$gl_inc" = "" ; then
643: AC_MSG_WARN(Opengl headers (gl.h) not found !!)
644: AC_MSG_WARN(Disabling opengl build !)
645: with_gl="no"
646: GL_OPTIONS=
647: GL_INCLUDES=
648: GL_LIBRARIES=
1.81 cheyroul 649: exit 1;
1.75 cheyroul 650: fi
651: if test "$glu_inc" = "" ; then
652: AC_MSG_WARN(Glu headers (glu.h) not found !!)
653: AC_MSG_WARN(Disabling opengl build !)
1.81 cheyroul 654:
1.75 cheyroul 655: with_gl="no"
656: GL_OPTIONS=
657: GL_INCLUDES=
658: GL_LIBRARIES=
1.81 cheyroul 659: exit 1;
1.75 cheyroul 660: fi
661: if test "$gtkgl_inc" = "" ; then
662: AC_MSG_WARN(Gtkglarea headers (gktglarea.h) not found !!)
663: AC_MSG_WARN(Disabling opengl build !)
664: with_gl="no"
665: GL_OPTIONS=
666: GL_INCLUDES=
667: GL_LIBRARIES=
1.81 cheyroul 668: exit 1;
1.75 cheyroul 669: fi
1.80 cheyroul 670: if test "$freetype_inc" = "" ; then
671: AC_MSG_WARN(Freetype 2 headers (ft2build.h) not found !!)
672: AC_MSG_WARN(Disabling opengl build !)
673: with_gl="no"
674: GL_OPTIONS=
675: GL_INCLUDES=
676: GL_LIBRARIES=
1.81 cheyroul 677: exit 1;
1.80 cheyroul 678: fi
1.75 cheyroul 679: if test "$gl_inc" = "yes" ; then
1.79 cheyroul 680: if test "$glu_inc" = "yes" ; then
681: if test "$gtkgl_inc" = "yes" ; then
1.80 cheyroul 682: if test "$freetype_inc" = "yes" ; then
683: GL_LIBRARIES=" -lXmu -lXft -lfreetype -lGL -lGLU -lgtkgl "
1.79 cheyroul 684: GL_OPTIONS=-D_GL
685: no_motif=yes
1.80 cheyroul 686: fi
1.75 cheyroul 687: fi
688: fi
689: fi
690: AC_SUBST(GL_INCLUDES)
691: AC_SUBST(GL_LIBRARIES)
692: fi
1.76 vatton 693:
694: AC_ARG_ENABLE(svg, [ --disable-svg remove SVG support ])
695: AC_ARG_ENABLE(annot, [ --disable-annot remove Annotations support ])
1.93 ! kahan 696: AC_ARG_ENABLE(raptor, [ --disable-raptor disable the raptor RDF parser ])
1.76 vatton 697: AC_ARG_ENABLE(generic-xml, [ --disable-generic-xml remove Generic XML support ])
698:
1.75 cheyroul 699: dnl
1.21 cvs 700: dnl plugins support is disabled by default
1.8 cvs 701: dnl
1.13 cvs 702:
703: if test "$with_plugin" = "" ; then
1.21 cvs 704: if test "$enable_plugin" = "yes" ; then
1.55 kahan 705: with_plugin="yes"
1.21 cvs 706: else
1.17 cvs 707: with_plugin="no"
708: fi
1.10 cvs 709: fi
1.1 cvs 710:
1.8 cvs 711: dnl
1.68 vatton 712: dnl svg is enabled by default
1.26 cvs 713: dnl
1.68 vatton 714: if test "$with_svg" = "" ; then
715: if test "$enable_svg" = "no" ; then
716: with_svg="no"
1.49 cvs 717: else
1.68 vatton 718: with_svg="yes"
1.26 cvs 719: fi
720: fi
721:
722: dnl
1.56 kahan 723: dnl annotations is enabled by default
1.47 cvs 724: dnl
725: if test "$with_annot" = "" ; then
1.56 kahan 726: if test "$enable_annot" = "no" ; then
727: with_annot="no"
728: else
1.54 cvs 729: with_annot="yes"
1.47 cvs 730: fi
731: fi
732:
1.93 ! kahan 733:
! 734: dnl
! 735: dnl The raptor RDF parser is enabled by default
! 736: dnl
! 737: if test "$with_raptor" = "" ; then
! 738: if test "$enable_raptor" = "no" ; then
! 739: with_raptor="no"
! 740: else
! 741: with_raptor"yes"
! 742: fi
! 743: fi
! 744:
1.70 kahan 745: dnl
746: dnl Generic XML support enabled by default
747: dnl
748: if test "$with_generic_xml" = "" ; then
749: if test "$enable_generic_xml" = "no" ; then
750: with_generic_xml="no"
751: GENERIC_XML_OPTIONS=
752: else
753: with_generic_xml="yes"
754: GENERIC_XML_OPTIONS=-DXML_GENERIC
755: fi
756: fi
757:
1.88 kirschpi 758: AC_ARG_WITH(dav, [ --with-dav enable WebDAV support (experimental) ])
759: dnl
760: dnl DAV support disabled by default
761: dnl
762: if test "$with_dav" = "" ; then
763: if test "$enable_dav" = "yes" ; then
764: with_dav="yes"
765: else
766: with_dav="no"
767: fi
768: fi
769:
770: if test "$with_dav" = "yes" ; then
771: DAV_OPTIONS=-DDAV
1.90 kirschpi 772: DAVDIR="davlib"
773: LIBDAV="libwwwdav"
774: WITHDAV="--with-dav"
775: WWWDAV="-lwwwdav"
1.88 kirschpi 776: else
777: with_dav="no"
778: DAV_OPTIONS=""
1.90 kirschpi 779: DAVDIR=""
780: LIBDAV=""
781: WITHDAV=""
782: WWWDAV=""
1.88 kirschpi 783: fi
784:
1.70 kahan 785:
1.19 cvs 786: if test "$build_amaya" = "yes" ; then
1.43 cvs 787: if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50 cvs 788: AC_MSG_WARN(libwww sources not found !!)
789: AC_MSG_WARN(Disabling Amaya build !)
790: build_amaya="no"
1.1 cvs 791: fi
1.8 cvs 792:
793: if test ! -f $srcdir/amaya/MathML.S ; then
1.10 cvs 794: if test "$with_math" = "yes" ; then
1.8 cvs 795: AC_MSG_WARN(MathML sources not found !!)
1.26 cvs 796: AC_MSG_WARN(Disabling Math build !)
1.10 cvs 797: with_math="no"
798: MATH_OPTIONS=
1.8 cvs 799: fi
800: fi
1.26 cvs 801:
1.68 vatton 802: if test ! -f $srcdir/amaya/SVG.S ; then
803: if test "$with_svg" = "yes" ; then
804: AC_MSG_WARN(SVG sources not found !!)
805: AC_MSG_WARN(Disabling SVG build !)
806: with_svg="no"
807: SVG_OPTIONS=
1.26 cvs 808: fi
809: fi
810:
1.48 cvs 811: if test ! -f $srcdir/annotlib/Makefile.in ; then
1.47 cvs 812: if test "$with_annot" = "yes" ; then
813: AC_MSG_WARN(Annotation makefile not found !!)
814: AC_MSG_WARN(Disabling Annotations build !)
815: with_annot="no"
816: fi
817: fi
1.55 kahan 818:
1.93 ! kahan 819: if test "$with_annot" = "yes" -a "$with_raptor" = "yes" ; then
! 820: if test ! -d "$srcdir/libraptor" ; then
! 821: AC_MSG_WARN(Raptor source dir not found !!)
! 822: AC_MSG_WARN(Disabling raptor build !)
! 823: MAKERAPTOR=['#']
! 824: with_raptor="no"
! 825: else
! 826: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DRAPTOR_RDF_PARSER -I\$(THOTDIR)/libraptor"
! 827: AMAYA_RAPTOR_LIBS="-L../libraptor/.libs -lraptor"
! 828: AMAYA_RAPTOR_SRC="amaya_comp_libraptor"
! 829: AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/libraptor"
! 830: fi
! 831: else
! 832: AC_MSG_WARN(Disabling raptor build as annotations are disabled !)
! 833: MAKERAPTOR=['#']
! 834: with_raptor="no"
! 835: fi
! 836:
! 837: dnl control whether we should use libwww's rdf parser
! 838: if test "$with_raptor" = "yes" ; then
! 839: dnl not all the function calls have been cleared as of today,
! 840: dnl we still need libwww's rdf parser
! 841: MAKE_LIBWWW_RDF_PARSER="libwwwxml"
! 842: LIBWWW_RDF_PARSER="-lwwwxml"
! 843: dnl MAKE_LIBWWW_RDF_PARSER=
! 844: dnl# LIBWWW_RDF_PARSER=
! 845: else
! 846: MAKE_LIBWWW_RDF_PARSER="libwwwxml"
! 847: LIBWWW_RDF_PARSER="-lwwwxml"
! 848: fi
1.70 kahan 849:
1.55 kahan 850: if test "$with_plugin" = "yes" ; then
851: AC_MSG_WARN(The plugin library isn't supported anymore in Amaya !!)
852: AC_MSG_WARN(Disabling plugin build !)
853: with_plugin="no"
854: fi
855:
1.88 kirschpi 856:
857: if test ! -f $srcdir/davlib/Makefile.in ; then
858: if test "$with_dav" = "yes" ; then
859: AC_MSG_WARN(WebDAV makefile not found !!)
860: AC_MSG_WARN(Disabling WebDAV build !)
861: with_dav="no"
1.90 kirschpi 862: DAVDIR=""
863: LIBDAV=""
864: WITHDAV=""
865: WWWDAV=""
1.88 kirschpi 866: fi
867: fi
868:
869:
1.1 cvs 870: fi
871:
872: dnl
873: dnl The options for each library or binary
874: dnl
875:
1.75 cheyroul 876: THOT_OPTIONS="$GTK_OPTIONS $I18N_OPTIONS $GL_OPTIONS"
1.93 ! kahan 877: AMAYA_OPTIONS="$MATH_OPTIONS $SVG_OPTIONS $GTK_OPTIONS $GENERIC_XML_OPTIONS $I18N_OPTIONS $GL_OPTIONS"
1.58 cvs 878: #PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
1.93 ! kahan 879: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS $I18N_OPTIONS"
1.1 cvs 880: IMGLIBS="-ljpeg -lpng -lz"
1.3 cvs 881: EXTRA_LIBS=
1.1 cvs 882:
883: dnl
884: dnl Set up the PATHs needed
885: dnl
886:
887: API="\$(THOTDIR)/thotlib/include"
888: VAR="\$(THOTDIR)/thotlib/internals/var"
889: INCL="\$(THOTDIR)/thotlib/internals/h"
890: FUNC="\$(THOTDIR)/thotlib/internals/f"
1.58 cvs 891: if test "${LIBPNG}" = "../libpng.a" ; then
1.52 cvs 892: #there is a modified header file we need
1.1 cvs 893: PNGINCL="-I\$(THOTDIR)/libpng -I\$(THOTDIR)/libpng/zlib"
1.58 cvs 894: fi
895: if test "${LIBJPEG}" = "../libjpeg.a" ; then
896: #there is a modified header file we need
897: JPEGINCL="-I\$(THOTDIR)/libjpeg"
898: fi
1.1 cvs 899:
900: dnl
901: dnl Set up the include variables.
902: dnl
903:
1.61 cvs 904: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58 cvs 905: APIINCLUDES=-I${API}
906:
907: if test "${VPATHOPT}" = "" ; then
1.1 cvs 908: VPATHOPT="VPATH"
909: fi
910:
911: dnl
912: dnl Exports the current values of the variables.
913: dnl
914:
915: AC_SUBST(AMAYA_VER)
1.6 cvs 916: AC_SUBST(CEXTRACT_VER)
917: AC_SUBST(CEXTRACT_FLAGS)
1.1 cvs 918:
919: AC_SUBST(THOTINCLUDES)
920: AC_SUBST(APIINCLUDES)
921: AC_SUBST(VPATHOPT)
922:
1.63 vatton 923: AC_SUBST(GTK_OPTIONS)
1.1 cvs 924: AC_SUBST(THOT_OPTIONS)
925: AC_SUBST(AMAYA_OPTIONS)
926: AC_SUBST(PLUGIN_OPTIONS)
1.48 cvs 927: AC_SUBST(AMAYA_ANNOT_OPTIONS)
1.1 cvs 928: AC_SUBST(IMGLIBS)
1.3 cvs 929: AC_SUBST(EXTRA_LIBS)
1.90 kirschpi 930:
931: AC_SUBST(DAVDIR)
932: AC_SUBST(LIBDAV)
933: AC_SUBST(WITHDAV)
934: AC_SUBST(WWWDAV)
1.1 cvs 935:
1.93 ! kahan 936: AC_SUBST(MAKERAPTOR)
! 937: AC_SUBST(AMAYA_RAPTOR_LIBS)
! 938: AC_SUBST(AMAYA_RAPTOR_SRC)
! 939: AC_SUBST(AMAYA_RAPTOR_INCLUDES)
! 940: AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
! 941: AC_SUBST(LIBWWW_RDF_PARSER)
! 942:
! 943: AC_SUBST(SUBDIRS)
! 944:
1.1 cvs 945: dnl
1.48 cvs 946: dnl Include the option Makefile.xxx fragment according to the configure options
1.1 cvs 947: dnl
948:
949: if test "$with_plugin" = "yes" ; then
1.50 cvs 950: AC_SUBST_FILE(plugin_frag)
1.1 cvs 951: plugin_frag=$srcdir/pluginlib/Makefile.plugin
952: else
953: AC_SUBST_FILE(plugin_frag)
954: plugin_frag=/dev/null
955: fi
956:
957: AC_SUBST_FILE(www_frag)
1.49 cvs 958: www_frag=$srcdir/amaya/Makefile.libwww
1.1 cvs 959:
1.50 cvs 960: if test "$with_math" = "no" ; then
1.10 cvs 961: AC_SUBST_FILE(math_frag)
1.50 cvs 962: math_frag=/dev/null
1.8 cvs 963: else
1.10 cvs 964: AC_SUBST_FILE(math_frag)
1.50 cvs 965: math_frag=$srcdir/amaya/Makefile.math
1.8 cvs 966: fi
967:
1.68 vatton 968: if test "$with_svg" = "no" ; then
969: AC_SUBST_FILE(svg_frag)
970: svg_frag=/dev/null
1.26 cvs 971: else
1.68 vatton 972: AC_SUBST_FILE(svg_frag)
973: svg_frag=$srcdir/amaya/Makefile.svg
1.26 cvs 974: fi
975:
1.47 cvs 976: if test "$with_annot" = "yes" ; then
977: AC_SUBST_FILE(annot_frag)
1.48 cvs 978: annot_frag=$srcdir/annotlib/Makefile.annot
1.47 cvs 979: else
980: AC_SUBST_FILE(annot_frag)
981: annot_frag=/dev/null
982: fi
983:
1.88 kirschpi 984: if test "$with_dav" = "yes" ; then
985: AC_SUBST_FILE(dav_frag)
986: dav_frag=$srcdir/davlib/Makefile.dav
987: fi
1.16 cvs 988:
1.1 cvs 989: dnl ***************************************************************
990: dnl
991: dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
992: dnl
993: dnl ***************************************************************
994:
995: EXTRA_MAKEFILE_IN=
1.2 cvs 996: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1 cvs 997: libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2 cvs 998: tools/mkdep/Makefile \
1.1 cvs 999: tools/cextract-1.7/Makefile thotlib/Makefile \
1.5 cvs 1000: thotlib/include/Makefile batch/Makefile tablelib/Makefile"
1.1 cvs 1001:
1002: if test "$build_amaya" = "yes" ; then
1.2 cvs 1003:
1.19 cvs 1004: make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2 cvs 1005: EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.93 ! kahan 1006: $srcdir/amaya/Makefile.libwww"
1.27 cvs 1007:
1008: if test "$$with_plugin" = "yes" ; then
1009: make_output="$make_output pluginlib/Makefile"
1010: EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.93 ! kahan 1011: $srcdir/pluginlib/Makefile.plugin"
1.27 cvs 1012: fi
1.2 cvs 1013:
1.48 cvs 1014: if test "$with_annot" = "yes" ; then
1015: make_output="$make_output annotlib/Makefile"
1016: EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
1017: fi
1.88 kirschpi 1018:
1019: if test "$with_dav" = "yes" ; then
1020: make_output="$make_output davlib/Makefile"
1021: EXTRA_MAKEFILE_IN="$srcdir/davlib/Makefile.in"
1022: fi
1023:
1.1 cvs 1024: fi
1025:
1026: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6 cvs 1027: AC_OUTPUT($make_output , [
1028: dnl
1029: dnl This fragment of shell code is executed after the
1030: dnl Makefile(s) dump ...
1031: dnl
1032:
1033: echo timestamp > stamp-h
1034:
1035: dnl
1036: dnl Check for an upgrade in the Options numbers
1037: dnl
1038:
1039: if test -f Options ; then
1040: oldversion=`grep Version Options`
1041: newversion=`grep Version Options.orig`
1042: if test "$oldversion" != "$newversion" ; then
1043: echo WARNING : Options files have changed, old options saved to Options.old
1044: cp Options Options.old
1045: cp Options.orig Options
1046: exit 1
1047: fi
1048: fi
1049: ])
1.1 cvs 1050:
1051: if test "$build_amaya" = "yes" ; then
1.50 cvs 1052: echo Amaya configured with libWWW
1053: if test "$with_plugin" = "yes" ; then
1054: echo Amaya configured with Plugins support
1.8 cvs 1055: fi
1.10 cvs 1056: if test "$with_math" = "yes" ; then
1057: echo Amaya configured with Math support
1.26 cvs 1058: fi
1.68 vatton 1059: if test "$with_svg" = "yes" ; then
1060: echo Amaya configured with SVG support
1.47 cvs 1061: fi
1062: if test "$with_annot" = "yes" ; then
1063: echo Amaya configured with Annotations support
1.70 kahan 1064: fi
1.93 ! kahan 1065: if test "$with_raptor" = "yes" ; then
! 1066: echo Amaya configured to use the raptor RDF parser
! 1067: fi
1.70 kahan 1068: if test "$with_generic_xml" = "yes" ; then
1069: echo Amaya configured with generic XML suppport
1070: fi
1071: if test "$with_i18n" = "yes" ; then
1.82 vatton 1072: echo Amaya configured with internationalization suppport
1.75 cheyroul 1073: fi
1074: if test "$with_gl" = "yes" ; then
1075: echo Amaya configured with Opengl Canvas Rendering \(experimental\)
1.88 kirschpi 1076: fi
1077: if test "$with_dav" = "yes" ; then
1078: echo Amaya configured with WebDAV support \(experimental\)
1.1 cvs 1079: fi
1.5 cvs 1080: fi
1081:
1082: if test "$no_motif" = yes ; then
1.67 vatton 1083: echo "Amaya configured with GTK"
1.76 vatton 1084: echo "Amaya configured without static graphic libraries (libjpeg, libpng)"
1.67 vatton 1085: else
1.76 vatton 1086: if test "$no_motif" = yes ; then
1087: echo "Amaya configured without static graphic libraries (libjpeg, libpng)"
1088: fi
1.67 vatton 1089: if test "$no_motif" = yes ; then
1.5 cvs 1090: echo "Motif seems not installed on this machine"
1.61 cvs 1091: echo "Amaya need Motif 1.2 or 2.0"
1.5 cvs 1092: else
1093: if test "$motif_includes" = "" ; then
1094: echo "Motif includes were not found"
1.61 cvs 1095: echo "Amaya might not compile"
1.5 cvs 1096: echo "Edit your Option file"
1097: else
1098: if test "$motif_libraries" = "" ; then
1099: echo "Motif libraries were not found"
1.61 cvs 1100: echo "Amaya might not compile"
1.5 cvs 1101: echo "Edit your Option file"
1.67 vatton 1102: fi
1.5 cvs 1103: fi
1104: fi
1.1 cvs 1105: fi
1106:
1.78 vatton 1107: echo "Now type \"make\" (GNU make preferably) to build the binaries"
1.48 cvs 1108:
1109:
1110:
1.5 cvs 1111:
Webmaster