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