Annotation of Amaya/configure.in, revision 1.98
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)
1.97 cheyroul 715: PRINTIFNOTGL=" "
716: else
717: PRINTIFNOTGL=" print_prog"
1.75 cheyroul 718: fi
1.97 cheyroul 719: AC_SUBST(PRINTIFNOTGL)
1.76 vatton 720:
721: AC_ARG_ENABLE(svg, [ --disable-svg remove SVG support ])
722: AC_ARG_ENABLE(annot, [ --disable-annot remove Annotations support ])
1.93 kahan 723: AC_ARG_ENABLE(raptor, [ --disable-raptor disable the raptor RDF parser ])
1.76 vatton 724: AC_ARG_ENABLE(generic-xml, [ --disable-generic-xml remove Generic XML support ])
725:
1.75 cheyroul 726: dnl
1.21 cvs 727: dnl plugins support is disabled by default
1.8 cvs 728: dnl
1.13 cvs 729:
730: if test "$with_plugin" = "" ; then
1.21 cvs 731: if test "$enable_plugin" = "yes" ; then
1.55 kahan 732: with_plugin="yes"
1.21 cvs 733: else
1.17 cvs 734: with_plugin="no"
735: fi
1.10 cvs 736: fi
1.1 cvs 737:
1.8 cvs 738: dnl
1.68 vatton 739: dnl svg is enabled by default
1.26 cvs 740: dnl
1.68 vatton 741: if test "$with_svg" = "" ; then
742: if test "$enable_svg" = "no" ; then
743: with_svg="no"
1.49 cvs 744: else
1.68 vatton 745: with_svg="yes"
1.26 cvs 746: fi
747: fi
748:
749: dnl
1.56 kahan 750: dnl annotations is enabled by default
1.47 cvs 751: dnl
752: if test "$with_annot" = "" ; then
1.56 kahan 753: if test "$enable_annot" = "no" ; then
754: with_annot="no"
755: else
1.54 cvs 756: with_annot="yes"
1.47 cvs 757: fi
758: fi
759:
1.93 kahan 760:
761: dnl
762: dnl The raptor RDF parser is enabled by default
763: dnl
764: if test "$with_raptor" = "" ; then
765: if test "$enable_raptor" = "no" ; then
766: with_raptor="no"
767: else
768: with_raptor"yes"
769: fi
770: fi
771:
1.70 kahan 772: dnl
773: dnl Generic XML support enabled by default
774: dnl
775: if test "$with_generic_xml" = "" ; then
776: if test "$enable_generic_xml" = "no" ; then
777: with_generic_xml="no"
778: GENERIC_XML_OPTIONS=
779: else
780: with_generic_xml="yes"
781: GENERIC_XML_OPTIONS=-DXML_GENERIC
782: fi
783: fi
784:
1.88 kirschpi 785: AC_ARG_WITH(dav, [ --with-dav enable WebDAV support (experimental) ])
786: dnl
787: dnl DAV support disabled by default
788: dnl
789: if test "$with_dav" = "" ; then
790: if test "$enable_dav" = "yes" ; then
791: with_dav="yes"
792: else
793: with_dav="no"
794: fi
795: fi
796:
797: if test "$with_dav" = "yes" ; then
798: DAV_OPTIONS=-DDAV
1.90 kirschpi 799: DAVDIR="davlib"
800: LIBDAV="libwwwdav"
801: WITHDAV="--with-dav"
802: WWWDAV="-lwwwdav"
1.88 kirschpi 803: else
804: with_dav="no"
805: DAV_OPTIONS=""
1.90 kirschpi 806: DAVDIR=""
807: LIBDAV=""
808: WITHDAV=""
809: WWWDAV=""
1.88 kirschpi 810: fi
811:
1.70 kahan 812:
1.19 cvs 813: if test "$build_amaya" = "yes" ; then
1.43 cvs 814: if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50 cvs 815: AC_MSG_WARN(libwww sources not found !!)
816: AC_MSG_WARN(Disabling Amaya build !)
817: build_amaya="no"
1.1 cvs 818: fi
1.8 cvs 819:
820: if test ! -f $srcdir/amaya/MathML.S ; then
1.10 cvs 821: if test "$with_math" = "yes" ; then
1.8 cvs 822: AC_MSG_WARN(MathML sources not found !!)
1.26 cvs 823: AC_MSG_WARN(Disabling Math build !)
1.10 cvs 824: with_math="no"
825: MATH_OPTIONS=
1.8 cvs 826: fi
827: fi
1.26 cvs 828:
1.68 vatton 829: if test ! -f $srcdir/amaya/SVG.S ; then
830: if test "$with_svg" = "yes" ; then
831: AC_MSG_WARN(SVG sources not found !!)
832: AC_MSG_WARN(Disabling SVG build !)
833: with_svg="no"
834: SVG_OPTIONS=
1.26 cvs 835: fi
836: fi
837:
1.48 cvs 838: if test ! -f $srcdir/annotlib/Makefile.in ; then
1.47 cvs 839: if test "$with_annot" = "yes" ; then
840: AC_MSG_WARN(Annotation makefile not found !!)
841: AC_MSG_WARN(Disabling Annotations build !)
842: with_annot="no"
843: fi
844: fi
1.55 kahan 845:
1.93 kahan 846: if test "$with_annot" = "yes" -a "$with_raptor" = "yes" ; then
847: if test ! -d "$srcdir/libraptor" ; then
848: AC_MSG_WARN(Raptor source dir not found !!)
849: AC_MSG_WARN(Disabling raptor build !)
850: MAKERAPTOR=['#']
851: with_raptor="no"
852: else
853: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DRAPTOR_RDF_PARSER -I\$(THOTDIR)/libraptor"
1.94 kahan 854: AMAYA_RAPTOR_LIBS="../libraptor/.libs/libraptor.a"
1.93 kahan 855: AMAYA_RAPTOR_SRC="amaya_comp_libraptor"
856: AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/libraptor"
857: fi
858: else
859: AC_MSG_WARN(Disabling raptor build as annotations are disabled !)
860: MAKERAPTOR=['#']
861: with_raptor="no"
862: fi
863:
864: dnl control whether we should use libwww's rdf parser
865: if test "$with_raptor" = "yes" ; then
866: dnl not all the function calls have been cleared as of today,
867: dnl we still need libwww's rdf parser
1.98 ! kahan 868: MAKE_LIBWWW_RDF_PARSER=
! 869: LIBWWW_RDF_PARSER=
1.93 kahan 870: else
871: MAKE_LIBWWW_RDF_PARSER="libwwwxml"
872: LIBWWW_RDF_PARSER="-lwwwxml"
873: fi
1.70 kahan 874:
1.55 kahan 875: if test "$with_plugin" = "yes" ; then
876: AC_MSG_WARN(The plugin library isn't supported anymore in Amaya !!)
877: AC_MSG_WARN(Disabling plugin build !)
878: with_plugin="no"
879: fi
880:
1.88 kirschpi 881:
882: if test ! -f $srcdir/davlib/Makefile.in ; then
883: if test "$with_dav" = "yes" ; then
884: AC_MSG_WARN(WebDAV makefile not found !!)
885: AC_MSG_WARN(Disabling WebDAV build !)
886: with_dav="no"
1.90 kirschpi 887: DAVDIR=""
888: LIBDAV=""
889: WITHDAV=""
890: WWWDAV=""
1.88 kirschpi 891: fi
892: fi
893:
894:
1.1 cvs 895: fi
896:
897: dnl
898: dnl The options for each library or binary
899: dnl
900:
1.75 cheyroul 901: THOT_OPTIONS="$GTK_OPTIONS $I18N_OPTIONS $GL_OPTIONS"
1.93 kahan 902: AMAYA_OPTIONS="$MATH_OPTIONS $SVG_OPTIONS $GTK_OPTIONS $GENERIC_XML_OPTIONS $I18N_OPTIONS $GL_OPTIONS"
1.58 cvs 903: #PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
1.93 kahan 904: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS $I18N_OPTIONS"
1.1 cvs 905: IMGLIBS="-ljpeg -lpng -lz"
1.3 cvs 906: EXTRA_LIBS=
1.1 cvs 907:
908: dnl
909: dnl Set up the PATHs needed
910: dnl
911:
912: API="\$(THOTDIR)/thotlib/include"
913: VAR="\$(THOTDIR)/thotlib/internals/var"
914: INCL="\$(THOTDIR)/thotlib/internals/h"
915: FUNC="\$(THOTDIR)/thotlib/internals/f"
1.58 cvs 916: if test "${LIBPNG}" = "../libpng.a" ; then
1.52 cvs 917: #there is a modified header file we need
1.1 cvs 918: PNGINCL="-I\$(THOTDIR)/libpng -I\$(THOTDIR)/libpng/zlib"
1.58 cvs 919: fi
920: if test "${LIBJPEG}" = "../libjpeg.a" ; then
921: #there is a modified header file we need
922: JPEGINCL="-I\$(THOTDIR)/libjpeg"
923: fi
1.1 cvs 924:
925: dnl
926: dnl Set up the include variables.
927: dnl
928:
1.61 cvs 929: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58 cvs 930: APIINCLUDES=-I${API}
931:
932: if test "${VPATHOPT}" = "" ; then
1.1 cvs 933: VPATHOPT="VPATH"
934: fi
935:
936: dnl
937: dnl Exports the current values of the variables.
938: dnl
939:
940: AC_SUBST(AMAYA_VER)
1.6 cvs 941: AC_SUBST(CEXTRACT_VER)
942: AC_SUBST(CEXTRACT_FLAGS)
1.1 cvs 943:
944: AC_SUBST(THOTINCLUDES)
945: AC_SUBST(APIINCLUDES)
946: AC_SUBST(VPATHOPT)
947:
1.63 vatton 948: AC_SUBST(GTK_OPTIONS)
1.1 cvs 949: AC_SUBST(THOT_OPTIONS)
950: AC_SUBST(AMAYA_OPTIONS)
951: AC_SUBST(PLUGIN_OPTIONS)
1.48 cvs 952: AC_SUBST(AMAYA_ANNOT_OPTIONS)
1.1 cvs 953: AC_SUBST(IMGLIBS)
1.3 cvs 954: AC_SUBST(EXTRA_LIBS)
1.90 kirschpi 955:
956: AC_SUBST(DAVDIR)
957: AC_SUBST(LIBDAV)
958: AC_SUBST(WITHDAV)
959: AC_SUBST(WWWDAV)
1.1 cvs 960:
1.93 kahan 961: AC_SUBST(MAKERAPTOR)
962: AC_SUBST(AMAYA_RAPTOR_LIBS)
963: AC_SUBST(AMAYA_RAPTOR_SRC)
964: AC_SUBST(AMAYA_RAPTOR_INCLUDES)
965: AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
966: AC_SUBST(LIBWWW_RDF_PARSER)
967:
968: AC_SUBST(SUBDIRS)
969:
1.1 cvs 970: dnl
1.48 cvs 971: dnl Include the option Makefile.xxx fragment according to the configure options
1.1 cvs 972: dnl
973:
974: if test "$with_plugin" = "yes" ; then
1.50 cvs 975: AC_SUBST_FILE(plugin_frag)
1.1 cvs 976: plugin_frag=$srcdir/pluginlib/Makefile.plugin
977: else
978: AC_SUBST_FILE(plugin_frag)
979: plugin_frag=/dev/null
980: fi
981:
982: AC_SUBST_FILE(www_frag)
1.49 cvs 983: www_frag=$srcdir/amaya/Makefile.libwww
1.1 cvs 984:
1.50 cvs 985: if test "$with_math" = "no" ; then
1.10 cvs 986: AC_SUBST_FILE(math_frag)
1.50 cvs 987: math_frag=/dev/null
1.8 cvs 988: else
1.10 cvs 989: AC_SUBST_FILE(math_frag)
1.50 cvs 990: math_frag=$srcdir/amaya/Makefile.math
1.8 cvs 991: fi
992:
1.68 vatton 993: if test "$with_svg" = "no" ; then
994: AC_SUBST_FILE(svg_frag)
995: svg_frag=/dev/null
1.26 cvs 996: else
1.68 vatton 997: AC_SUBST_FILE(svg_frag)
998: svg_frag=$srcdir/amaya/Makefile.svg
1.26 cvs 999: fi
1000:
1.47 cvs 1001: if test "$with_annot" = "yes" ; then
1002: AC_SUBST_FILE(annot_frag)
1.48 cvs 1003: annot_frag=$srcdir/annotlib/Makefile.annot
1.47 cvs 1004: else
1005: AC_SUBST_FILE(annot_frag)
1006: annot_frag=/dev/null
1007: fi
1008:
1.88 kirschpi 1009: if test "$with_dav" = "yes" ; then
1010: AC_SUBST_FILE(dav_frag)
1011: dav_frag=$srcdir/davlib/Makefile.dav
1012: fi
1.16 cvs 1013:
1.1 cvs 1014: dnl ***************************************************************
1015: dnl
1016: dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
1017: dnl
1018: dnl ***************************************************************
1019:
1020: EXTRA_MAKEFILE_IN=
1.2 cvs 1021: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1 cvs 1022: libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2 cvs 1023: tools/mkdep/Makefile \
1.1 cvs 1024: tools/cextract-1.7/Makefile thotlib/Makefile \
1.5 cvs 1025: thotlib/include/Makefile batch/Makefile tablelib/Makefile"
1.1 cvs 1026:
1027: if test "$build_amaya" = "yes" ; then
1.2 cvs 1028:
1.19 cvs 1029: make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2 cvs 1030: EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.93 kahan 1031: $srcdir/amaya/Makefile.libwww"
1.27 cvs 1032:
1033: if test "$$with_plugin" = "yes" ; then
1034: make_output="$make_output pluginlib/Makefile"
1035: EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.93 kahan 1036: $srcdir/pluginlib/Makefile.plugin"
1.27 cvs 1037: fi
1.2 cvs 1038:
1.48 cvs 1039: if test "$with_annot" = "yes" ; then
1040: make_output="$make_output annotlib/Makefile"
1041: EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
1042: fi
1.88 kirschpi 1043:
1044: if test "$with_dav" = "yes" ; then
1045: make_output="$make_output davlib/Makefile"
1046: EXTRA_MAKEFILE_IN="$srcdir/davlib/Makefile.in"
1047: fi
1048:
1.1 cvs 1049: fi
1050:
1051: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6 cvs 1052: AC_OUTPUT($make_output , [
1053: dnl
1054: dnl This fragment of shell code is executed after the
1055: dnl Makefile(s) dump ...
1056: dnl
1057:
1058: echo timestamp > stamp-h
1059:
1060: dnl
1061: dnl Check for an upgrade in the Options numbers
1062: dnl
1063:
1064: if test -f Options ; then
1065: oldversion=`grep Version Options`
1066: newversion=`grep Version Options.orig`
1067: if test "$oldversion" != "$newversion" ; then
1068: echo WARNING : Options files have changed, old options saved to Options.old
1069: cp Options Options.old
1070: cp Options.orig Options
1071: exit 1
1072: fi
1073: fi
1074: ])
1.1 cvs 1075:
1076: if test "$build_amaya" = "yes" ; then
1.50 cvs 1077: echo Amaya configured with libWWW
1078: if test "$with_plugin" = "yes" ; then
1079: echo Amaya configured with Plugins support
1.8 cvs 1080: fi
1.10 cvs 1081: if test "$with_math" = "yes" ; then
1082: echo Amaya configured with Math support
1.26 cvs 1083: fi
1.68 vatton 1084: if test "$with_svg" = "yes" ; then
1085: echo Amaya configured with SVG support
1.47 cvs 1086: fi
1087: if test "$with_annot" = "yes" ; then
1088: echo Amaya configured with Annotations support
1.70 kahan 1089: fi
1.93 kahan 1090: if test "$with_raptor" = "yes" ; then
1091: echo Amaya configured to use the raptor RDF parser
1092: fi
1.70 kahan 1093: if test "$with_generic_xml" = "yes" ; then
1094: echo Amaya configured with generic XML suppport
1095: fi
1096: if test "$with_i18n" = "yes" ; then
1.82 vatton 1097: echo Amaya configured with internationalization suppport
1.75 cheyroul 1098: fi
1099: if test "$with_gl" = "yes" ; then
1100: echo Amaya configured with Opengl Canvas Rendering \(experimental\)
1.88 kirschpi 1101: fi
1102: if test "$with_dav" = "yes" ; then
1103: echo Amaya configured with WebDAV support \(experimental\)
1.1 cvs 1104: fi
1.5 cvs 1105: fi
1106:
1107: if test "$no_motif" = yes ; then
1.67 vatton 1108: echo "Amaya configured with GTK"
1.76 vatton 1109: echo "Amaya configured without static graphic libraries (libjpeg, libpng)"
1.67 vatton 1110: else
1.76 vatton 1111: if test "$no_motif" = yes ; then
1112: echo "Amaya configured without static graphic libraries (libjpeg, libpng)"
1113: fi
1.67 vatton 1114: if test "$no_motif" = yes ; then
1.5 cvs 1115: echo "Motif seems not installed on this machine"
1.61 cvs 1116: echo "Amaya need Motif 1.2 or 2.0"
1.5 cvs 1117: else
1118: if test "$motif_includes" = "" ; then
1119: echo "Motif includes were not found"
1.61 cvs 1120: echo "Amaya might not compile"
1.5 cvs 1121: echo "Edit your Option file"
1122: else
1123: if test "$motif_libraries" = "" ; then
1124: echo "Motif libraries were not found"
1.61 cvs 1125: echo "Amaya might not compile"
1.5 cvs 1126: echo "Edit your Option file"
1.67 vatton 1127: fi
1.5 cvs 1128: fi
1129: fi
1.1 cvs 1130: fi
1131:
1.78 vatton 1132: echo "Now type \"make\" (GNU make preferably) to build the binaries"
1.48 cvs 1133:
1134:
1135:
1.5 cvs 1136:
Webmaster