Annotation of Amaya/configure.in, revision 1.102
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.100 cheyroul 274: GTK_OPTIONS="-D_GTK -D_SVGANIM -D_SVGLIB"
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.101 kahan 457: # We don't use our graphic libraries for the pure GTK version (without GL)
458:
459: echo "with gtk is ${with_gtk}, with gl is ${with_gl}\n"
460:
461: if test "${with_gtk}" != "yes" -o "${with_gl}" = "yes" ; then
462: AC_ARG_WITH(graphic-libs, [ --without-graphic-libs doesn't use provided libjpeg, libpng.])
463: if test "$withval" = "no" ; then
464: no_graphic=yes
465: fi
466: if test "$withval" = "yes" ; then
467: no_graphic=no
468: fi
1.76 vatton 469: fi
470:
471: if test "$no_graphic" = yes; then
472: dnl
473: AC_MSG_CHECKING([for libjpeg version = 6b])
474: AC_EGREP_CPP([x 62 *x],
475: [#include <jpeglib.h>
476: x JPEG_LIB_VERSION x],
477: dnl
478: AC_MSG_RESULT([yes])
479: LIBJPEG='-ljpeg'
480: MAKEJPEG=['#'],
481: dnl
482: AC_MSG_RESULT([no])
483: LIBJPEG='../libjpeg.a' dnl LIBJPEG goes into amaya/Makefile.in
484: )
485: dnl
486: dnl
1.95 vatton 487: AC_MSG_CHECKING([for libpng version = 1.0.x or 1.2.x])
488: AC_EGREP_CPP([x \"1.[02]\..*\" *x],
1.76 vatton 489: [#include <png.h>
490: x PNG_LIBPNG_VER_STRING x],
491: dnl
492: AC_MSG_RESULT([yes])
493: LIBPNG='-lpng'
494: LIBZ=''
495: MAKEPNG=['#'],
496: dnl
497: AC_MSG_RESULT([no])
498: LIBPNG='../libpng.a'
499: LIBZ='../libz.a'
500: )
501: else
502: LIBJPEG='../libjpeg.a'
503: LIBPNG='../libpng.a'
504: LIBZ='../libz.a'
505: fi
506: dnl
507: AC_SUBST(LIBJPEG)
508: AC_SUBST(LIBPNG)
509: AC_SUBST(LIBZ)
510: AC_SUBST(MAKEJPEG)
511: AC_SUBST(MAKEPNG)
512:
1.68 vatton 513: AMAYA_VER="6.0"
1.1 cvs 514:
515: dnl
1.6 cvs 516: dnl We use a special versoin of cextract patched for alignment
517: dnl to build the signatures of the modules functions located in f subdirs
518: dnl
519: CEXTRACT_VER="1.7"
520: CEXTRACT_FLAGS="+O"
521:
1.3 cvs 522:
523: dnl
1.9 cvs 524: dnl Adjust the some variables depending on the host and compiler
1.61 cvs 525: dnl Thotlib NEED signed chars !!!
1.7 cvs 526: dnl
527:
528: if test "${CC}" = "gcc" ; then
1.44 cvs 529: CFLAGS="${CFLAGS} -W "
1.7 cvs 530: case "${host}" in
531: *-*-irix5* | *-*irix6* )
532: CFLAGS="${CFLAGS} -fsigned-char"
533: ;;
534: esac
1.14 cvs 535: fi
536:
537: if test "$ac_cv_c_const" = "no" ; then
538: CFLAGS="${CFLAGS} -DCONST= "
1.7 cvs 539: fi
540:
541: dnl
1.61 cvs 542: dnl Check for availability of amaya sources
1.1 cvs 543: dnl
544:
545: build_amaya="yes"
546:
547: if test "$with_amaya" = "no" ; then
548: build_amaya="no"
1.45 cvs 549: else
550: if test ! -f $srcdir/amaya/Makefile.in ; then
1.1 cvs 551: AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
552: build_amaya="no"
1.45 cvs 553: fi
1.1 cvs 554: fi
555:
556: dnl
1.50 cvs 557: dnl Check for additionnal packages
1.1 cvs 558: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
559: dnl
1.93 kahan 560:
1.82 vatton 561: AC_ARG_WITH(i18n, [ --without-i18n disable internationalization support ])
1.76 vatton 562: dnl
563: dnl I18N support disabled by default
564: dnl
1.77 kahan 565:
566: if test "$with_i18n" = "" ; then
1.82 vatton 567: if test "$enable_i18n" = "no" ; then
568: with_i18n="no"
569: else
1.77 kahan 570: with_i18n="yes"
571: fi
572:
573: fi
1.76 vatton 574: if test "$with_i18n" = "yes" ; then
575: I18N_OPTIONS=-D_I18N_
576: else
577: with_i18n="no"
578: I18N_OPTIONS=""
579: fi
1.1 cvs 580:
1.75 cheyroul 581: if test "$with_gl" = "yes" ; then
582: AC_MSG_CHECKING([OpenGL])
583: for ac_dir in \
584: /usr/include \
585: /usr/X11R6/include \
586: /usr/local/include \
587: ; \
1.80 cheyroul 588: do if test -r "$ac_dir/GL/gl.h" ; then
1.75 cheyroul 589: gl_inc="yes"
1.80 cheyroul 590: GL_INC_I="$ac_dir"
591: if test "$ac_dir" != "/usr/include" ; then
592: GL_INCLUDES="-I$ac_dir"
593: fi
1.96 cheyroul 594: AC_MSG_RESULT([yes])
1.75 cheyroul 595: break
596: fi
1.80 cheyroul 597: done
598: AC_MSG_CHECKING([GLU])
1.75 cheyroul 599: for ac_dir in \
600: /usr/include/GL \
601: /usr/include \
602: /usr/X11R6/include/GL \
603: /usr/X11R6/include \
604: /usr/local/include \
605: /usr/local/include/GL \
606: ; \
607: do if test -r "$ac_dir/glu.h" ; then
608: glu_inc="yes"
1.80 cheyroul 609: GL_INC_II="$ac_dir"
610: if test "$ac_dir" != "/usr/include" ; then
611: if test "$ac_dir" != "$GL_INC_I" ; then
612: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
613: fi
614: fi
1.96 cheyroul 615: AC_MSG_RESULT([yes])
1.75 cheyroul 616: break
617: fi
618: done
1.80 cheyroul 619: AC_MSG_CHECKING([GTKGLAREA])
1.75 cheyroul 620: for ac_dir in \
621: /usr/include/GL \
622: /usr/include \
623: /usr/X11R6/include/GL \
624: /usr/X11R6/include \
625: /usr/local/include \
626: /usr/local/include/GL \
627: ; \
628: do if test -r "$ac_dir/gtkgl/gtkglarea.h" ; then
629: gtkgl_inc="yes"
1.80 cheyroul 630: if test "$ac_dir" != "/usr/include" ; then
631: if test "$ac_dir" != "$GL_INC_II" ; then
632: if test "$ac_dir" != "$GL_INC_I" ; then
633: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
634: fi
635: fi
636: fi
1.96 cheyroul 637: AC_MSG_RESULT([yes])
1.75 cheyroul 638: break
639: fi
640: done
1.80 cheyroul 641: AC_MSG_CHECKING([freetype])
642: for ac_dir in \
643: /usr/include \
644: /usr/X11R6/include \
645: /usr/local/include \
646: ; \
647: do if test -r "$ac_dir/ft2build.h" ; then
648: freetype_inc="yes"
649: GL_INCLUDES="$GL_INCLUDES `freetype-config --cflags`"
1.96 cheyroul 650: AC_MSG_RESULT([yes])
651: break
652: fi
653: done
654:
655: AC_MSG_CHECKING([gcc3])
656: for ac_dir in \
657: /usr/lib \
658: /usr/X11R6/lib \
659: /usr/local/lib \
660: ; \
661: do if test -r "$ac_dir/libstdc++.so.5" ; then
662: stdglu_inc="yes"
663: AC_MSG_RESULT([yes])
664: break
1.80 cheyroul 665: fi
1.96 cheyroul 666: done
667: if test "$gl_inc" = "" ; then
1.75 cheyroul 668: AC_MSG_WARN(Opengl headers (gl.h) not found !!)
669: AC_MSG_WARN(Disabling opengl build !)
670: with_gl="no"
671: GL_OPTIONS=
672: GL_INCLUDES=
673: GL_LIBRARIES=
1.81 cheyroul 674: exit 1;
1.75 cheyroul 675: fi
676: if test "$glu_inc" = "" ; then
677: AC_MSG_WARN(Glu headers (glu.h) not found !!)
678: AC_MSG_WARN(Disabling opengl build !)
1.81 cheyroul 679:
1.75 cheyroul 680: with_gl="no"
681: GL_OPTIONS=
682: GL_INCLUDES=
683: GL_LIBRARIES=
1.81 cheyroul 684: exit 1;
1.75 cheyroul 685: fi
686: if test "$gtkgl_inc" = "" ; then
687: AC_MSG_WARN(Gtkglarea headers (gktglarea.h) not found !!)
688: AC_MSG_WARN(Disabling opengl build !)
689: with_gl="no"
690: GL_OPTIONS=
691: GL_INCLUDES=
692: GL_LIBRARIES=
1.81 cheyroul 693: exit 1;
1.75 cheyroul 694: fi
1.80 cheyroul 695: if test "$freetype_inc" = "" ; then
696: AC_MSG_WARN(Freetype 2 headers (ft2build.h) not found !!)
697: AC_MSG_WARN(Disabling opengl build !)
698: with_gl="no"
699: GL_OPTIONS=
700: GL_INCLUDES=
701: GL_LIBRARIES=
1.81 cheyroul 702: exit 1;
1.80 cheyroul 703: fi
1.75 cheyroul 704: if test "$gl_inc" = "yes" ; then
1.79 cheyroul 705: if test "$glu_inc" = "yes" ; then
706: if test "$gtkgl_inc" = "yes" ; then
1.96 cheyroul 707: if test "$freetype_inc" = "yes" ; then
708: if test "$stdglu_inc" = "yes" ; then
709: GL_LIBRARIES=" -lXmu -lXft -lfreetype -lGL -lGLU -lgtkgl -lstdc++"
710: else
711: GL_LIBRARIES=" -lXmu -lXft -lfreetype -lGL -lGLU -lgtkgl"
712: fi
1.100 cheyroul 713: GL_OPTIONS="-D_GL"
1.79 cheyroul 714: no_motif=yes
1.80 cheyroul 715: fi
1.75 cheyroul 716: fi
717: fi
718: fi
719: AC_SUBST(GL_INCLUDES)
720: AC_SUBST(GL_LIBRARIES)
1.97 cheyroul 721: PRINTIFNOTGL=" "
722: else
723: PRINTIFNOTGL=" print_prog"
1.75 cheyroul 724: fi
1.97 cheyroul 725: AC_SUBST(PRINTIFNOTGL)
1.76 vatton 726:
727: AC_ARG_ENABLE(svg, [ --disable-svg remove SVG support ])
728: AC_ARG_ENABLE(annot, [ --disable-annot remove Annotations support ])
1.93 kahan 729: AC_ARG_ENABLE(raptor, [ --disable-raptor disable the raptor RDF parser ])
1.76 vatton 730: AC_ARG_ENABLE(generic-xml, [ --disable-generic-xml remove Generic XML support ])
731:
1.75 cheyroul 732: dnl
1.21 cvs 733: dnl plugins support is disabled by default
1.8 cvs 734: dnl
1.13 cvs 735:
736: if test "$with_plugin" = "" ; then
1.21 cvs 737: if test "$enable_plugin" = "yes" ; then
1.55 kahan 738: with_plugin="yes"
1.21 cvs 739: else
1.17 cvs 740: with_plugin="no"
741: fi
1.10 cvs 742: fi
1.1 cvs 743:
1.8 cvs 744: dnl
1.68 vatton 745: dnl svg is enabled by default
1.26 cvs 746: dnl
1.68 vatton 747: if test "$with_svg" = "" ; then
748: if test "$enable_svg" = "no" ; then
749: with_svg="no"
1.49 cvs 750: else
1.68 vatton 751: with_svg="yes"
1.26 cvs 752: fi
753: fi
754:
755: dnl
1.56 kahan 756: dnl annotations is enabled by default
1.47 cvs 757: dnl
758: if test "$with_annot" = "" ; then
1.56 kahan 759: if test "$enable_annot" = "no" ; then
760: with_annot="no"
761: else
1.54 cvs 762: with_annot="yes"
1.47 cvs 763: fi
1.99 kahan 764: else
765: with_annot="yes"
1.47 cvs 766: fi
767:
1.93 kahan 768:
769: dnl
770: dnl The raptor RDF parser is enabled by default
771: dnl
772: if test "$with_raptor" = "" ; then
773: if test "$enable_raptor" = "no" ; then
774: with_raptor="no"
775: else
1.99 kahan 776: with_raptor="yes"
1.93 kahan 777: fi
1.99 kahan 778: else
779: with_raptor="yes"
1.93 kahan 780: fi
781:
1.70 kahan 782: dnl
783: dnl Generic XML support enabled by default
784: dnl
785: if test "$with_generic_xml" = "" ; then
786: if test "$enable_generic_xml" = "no" ; then
787: with_generic_xml="no"
788: GENERIC_XML_OPTIONS=
789: else
790: with_generic_xml="yes"
791: GENERIC_XML_OPTIONS=-DXML_GENERIC
792: fi
793: fi
794:
1.88 kirschpi 795: AC_ARG_WITH(dav, [ --with-dav enable WebDAV support (experimental) ])
796: dnl
797: dnl DAV support disabled by default
798: dnl
799: if test "$with_dav" = "" ; then
800: if test "$enable_dav" = "yes" ; then
801: with_dav="yes"
802: else
803: with_dav="no"
804: fi
805: fi
806:
807: if test "$with_dav" = "yes" ; then
808: DAV_OPTIONS=-DDAV
1.90 kirschpi 809: DAVDIR="davlib"
810: LIBDAV="libwwwdav"
811: WITHDAV="--with-dav"
812: WWWDAV="-lwwwdav"
1.88 kirschpi 813: else
814: with_dav="no"
815: DAV_OPTIONS=""
1.90 kirschpi 816: DAVDIR=""
817: LIBDAV=""
818: WITHDAV=""
819: WWWDAV=""
1.88 kirschpi 820: fi
821:
1.70 kahan 822:
1.19 cvs 823: if test "$build_amaya" = "yes" ; then
1.43 cvs 824: if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50 cvs 825: AC_MSG_WARN(libwww sources not found !!)
826: AC_MSG_WARN(Disabling Amaya build !)
827: build_amaya="no"
1.1 cvs 828: fi
1.8 cvs 829:
830: if test ! -f $srcdir/amaya/MathML.S ; then
1.10 cvs 831: if test "$with_math" = "yes" ; then
1.8 cvs 832: AC_MSG_WARN(MathML sources not found !!)
1.26 cvs 833: AC_MSG_WARN(Disabling Math build !)
1.10 cvs 834: with_math="no"
835: MATH_OPTIONS=
1.8 cvs 836: fi
837: fi
1.26 cvs 838:
1.68 vatton 839: if test ! -f $srcdir/amaya/SVG.S ; then
840: if test "$with_svg" = "yes" ; then
841: AC_MSG_WARN(SVG sources not found !!)
842: AC_MSG_WARN(Disabling SVG build !)
843: with_svg="no"
844: SVG_OPTIONS=
1.26 cvs 845: fi
846: fi
847:
1.48 cvs 848: if test ! -f $srcdir/annotlib/Makefile.in ; then
1.47 cvs 849: if test "$with_annot" = "yes" ; then
850: AC_MSG_WARN(Annotation makefile not found !!)
851: AC_MSG_WARN(Disabling Annotations build !)
852: with_annot="no"
853: fi
854: fi
1.55 kahan 855:
1.93 kahan 856: if test "$with_annot" = "yes" -a "$with_raptor" = "yes" ; then
857: if test ! -d "$srcdir/libraptor" ; then
858: AC_MSG_WARN(Raptor source dir not found !!)
859: AC_MSG_WARN(Disabling raptor build !)
860: MAKERAPTOR=['#']
861: with_raptor="no"
862: else
863: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DRAPTOR_RDF_PARSER -I\$(THOTDIR)/libraptor"
1.94 kahan 864: AMAYA_RAPTOR_LIBS="../libraptor/.libs/libraptor.a"
1.93 kahan 865: AMAYA_RAPTOR_SRC="amaya_comp_libraptor"
866: AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/libraptor"
867: fi
868: else
869: AC_MSG_WARN(Disabling raptor build as annotations are disabled !)
870: MAKERAPTOR=['#']
871: with_raptor="no"
872: fi
873:
874: dnl control whether we should use libwww's rdf parser
875: if test "$with_raptor" = "yes" ; then
876: dnl not all the function calls have been cleared as of today,
877: dnl we still need libwww's rdf parser
1.98 kahan 878: MAKE_LIBWWW_RDF_PARSER=
879: LIBWWW_RDF_PARSER=
1.93 kahan 880: else
881: MAKE_LIBWWW_RDF_PARSER="libwwwxml"
882: LIBWWW_RDF_PARSER="-lwwwxml"
883: fi
1.70 kahan 884:
1.55 kahan 885: if test "$with_plugin" = "yes" ; then
886: AC_MSG_WARN(The plugin library isn't supported anymore in Amaya !!)
887: AC_MSG_WARN(Disabling plugin build !)
888: with_plugin="no"
889: fi
890:
1.88 kirschpi 891:
892: if test ! -f $srcdir/davlib/Makefile.in ; then
893: if test "$with_dav" = "yes" ; then
894: AC_MSG_WARN(WebDAV makefile not found !!)
895: AC_MSG_WARN(Disabling WebDAV build !)
896: with_dav="no"
1.90 kirschpi 897: DAVDIR=""
898: LIBDAV=""
899: WITHDAV=""
900: WWWDAV=""
1.88 kirschpi 901: fi
902: fi
903:
904:
1.1 cvs 905: fi
906:
907: dnl
908: dnl The options for each library or binary
909: dnl
910:
1.75 cheyroul 911: THOT_OPTIONS="$GTK_OPTIONS $I18N_OPTIONS $GL_OPTIONS"
1.93 kahan 912: AMAYA_OPTIONS="$MATH_OPTIONS $SVG_OPTIONS $GTK_OPTIONS $GENERIC_XML_OPTIONS $I18N_OPTIONS $GL_OPTIONS"
1.58 cvs 913: #PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
1.93 kahan 914: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS $I18N_OPTIONS"
1.101 kahan 915:
1.102 ! kahan 916: IMGLIBS="-ljpeg -lpng -lz"
1.3 cvs 917: EXTRA_LIBS=
1.1 cvs 918:
919: dnl
920: dnl Set up the PATHs needed
921: dnl
922:
923: API="\$(THOTDIR)/thotlib/include"
924: VAR="\$(THOTDIR)/thotlib/internals/var"
925: INCL="\$(THOTDIR)/thotlib/internals/h"
926: FUNC="\$(THOTDIR)/thotlib/internals/f"
1.58 cvs 927: if test "${LIBPNG}" = "../libpng.a" ; then
1.52 cvs 928: #there is a modified header file we need
1.1 cvs 929: PNGINCL="-I\$(THOTDIR)/libpng -I\$(THOTDIR)/libpng/zlib"
1.58 cvs 930: fi
931: if test "${LIBJPEG}" = "../libjpeg.a" ; then
932: #there is a modified header file we need
933: JPEGINCL="-I\$(THOTDIR)/libjpeg"
934: fi
1.1 cvs 935:
936: dnl
937: dnl Set up the include variables.
938: dnl
939:
1.61 cvs 940: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58 cvs 941: APIINCLUDES=-I${API}
942:
943: if test "${VPATHOPT}" = "" ; then
1.1 cvs 944: VPATHOPT="VPATH"
945: fi
946:
947: dnl
948: dnl Exports the current values of the variables.
949: dnl
950:
951: AC_SUBST(AMAYA_VER)
1.6 cvs 952: AC_SUBST(CEXTRACT_VER)
953: AC_SUBST(CEXTRACT_FLAGS)
1.1 cvs 954:
955: AC_SUBST(THOTINCLUDES)
956: AC_SUBST(APIINCLUDES)
957: AC_SUBST(VPATHOPT)
958:
1.63 vatton 959: AC_SUBST(GTK_OPTIONS)
1.1 cvs 960: AC_SUBST(THOT_OPTIONS)
961: AC_SUBST(AMAYA_OPTIONS)
962: AC_SUBST(PLUGIN_OPTIONS)
1.48 cvs 963: AC_SUBST(AMAYA_ANNOT_OPTIONS)
1.1 cvs 964: AC_SUBST(IMGLIBS)
1.3 cvs 965: AC_SUBST(EXTRA_LIBS)
1.90 kirschpi 966:
967: AC_SUBST(DAVDIR)
968: AC_SUBST(LIBDAV)
969: AC_SUBST(WITHDAV)
970: AC_SUBST(WWWDAV)
1.1 cvs 971:
1.93 kahan 972: AC_SUBST(MAKERAPTOR)
973: AC_SUBST(AMAYA_RAPTOR_LIBS)
974: AC_SUBST(AMAYA_RAPTOR_SRC)
975: AC_SUBST(AMAYA_RAPTOR_INCLUDES)
976: AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
977: AC_SUBST(LIBWWW_RDF_PARSER)
978:
979: AC_SUBST(SUBDIRS)
980:
1.1 cvs 981: dnl
1.48 cvs 982: dnl Include the option Makefile.xxx fragment according to the configure options
1.1 cvs 983: dnl
984:
985: if test "$with_plugin" = "yes" ; then
1.50 cvs 986: AC_SUBST_FILE(plugin_frag)
1.1 cvs 987: plugin_frag=$srcdir/pluginlib/Makefile.plugin
988: else
989: AC_SUBST_FILE(plugin_frag)
990: plugin_frag=/dev/null
991: fi
992:
993: AC_SUBST_FILE(www_frag)
1.49 cvs 994: www_frag=$srcdir/amaya/Makefile.libwww
1.1 cvs 995:
1.50 cvs 996: if test "$with_math" = "no" ; then
1.10 cvs 997: AC_SUBST_FILE(math_frag)
1.50 cvs 998: math_frag=/dev/null
1.8 cvs 999: else
1.10 cvs 1000: AC_SUBST_FILE(math_frag)
1.50 cvs 1001: math_frag=$srcdir/amaya/Makefile.math
1.8 cvs 1002: fi
1003:
1.68 vatton 1004: if test "$with_svg" = "no" ; then
1005: AC_SUBST_FILE(svg_frag)
1006: svg_frag=/dev/null
1.26 cvs 1007: else
1.68 vatton 1008: AC_SUBST_FILE(svg_frag)
1009: svg_frag=$srcdir/amaya/Makefile.svg
1.26 cvs 1010: fi
1011:
1.47 cvs 1012: if test "$with_annot" = "yes" ; then
1013: AC_SUBST_FILE(annot_frag)
1.48 cvs 1014: annot_frag=$srcdir/annotlib/Makefile.annot
1.47 cvs 1015: else
1016: AC_SUBST_FILE(annot_frag)
1017: annot_frag=/dev/null
1018: fi
1019:
1.88 kirschpi 1020: if test "$with_dav" = "yes" ; then
1021: AC_SUBST_FILE(dav_frag)
1022: dav_frag=$srcdir/davlib/Makefile.dav
1023: fi
1.16 cvs 1024:
1.1 cvs 1025: dnl ***************************************************************
1026: dnl
1027: dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
1028: dnl
1029: dnl ***************************************************************
1030:
1031: EXTRA_MAKEFILE_IN=
1.2 cvs 1032: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1 cvs 1033: libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2 cvs 1034: tools/mkdep/Makefile \
1.1 cvs 1035: tools/cextract-1.7/Makefile thotlib/Makefile \
1.5 cvs 1036: thotlib/include/Makefile batch/Makefile tablelib/Makefile"
1.1 cvs 1037:
1038: if test "$build_amaya" = "yes" ; then
1.2 cvs 1039:
1.19 cvs 1040: make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2 cvs 1041: EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.93 kahan 1042: $srcdir/amaya/Makefile.libwww"
1.27 cvs 1043:
1044: if test "$$with_plugin" = "yes" ; then
1045: make_output="$make_output pluginlib/Makefile"
1046: EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.93 kahan 1047: $srcdir/pluginlib/Makefile.plugin"
1.27 cvs 1048: fi
1.2 cvs 1049:
1.48 cvs 1050: if test "$with_annot" = "yes" ; then
1051: make_output="$make_output annotlib/Makefile"
1052: EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
1053: fi
1.88 kirschpi 1054:
1055: if test "$with_dav" = "yes" ; then
1056: make_output="$make_output davlib/Makefile"
1057: EXTRA_MAKEFILE_IN="$srcdir/davlib/Makefile.in"
1058: fi
1059:
1.1 cvs 1060: fi
1061:
1062: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6 cvs 1063: AC_OUTPUT($make_output , [
1064: dnl
1065: dnl This fragment of shell code is executed after the
1066: dnl Makefile(s) dump ...
1067: dnl
1068:
1069: echo timestamp > stamp-h
1070:
1071: dnl
1072: dnl Check for an upgrade in the Options numbers
1073: dnl
1074:
1075: if test -f Options ; then
1076: oldversion=`grep Version Options`
1077: newversion=`grep Version Options.orig`
1078: if test "$oldversion" != "$newversion" ; then
1079: echo WARNING : Options files have changed, old options saved to Options.old
1080: cp Options Options.old
1081: cp Options.orig Options
1082: exit 1
1083: fi
1084: fi
1085: ])
1.1 cvs 1086:
1087: if test "$build_amaya" = "yes" ; then
1.50 cvs 1088: echo Amaya configured with libWWW
1089: if test "$with_plugin" = "yes" ; then
1090: echo Amaya configured with Plugins support
1.8 cvs 1091: fi
1.10 cvs 1092: if test "$with_math" = "yes" ; then
1093: echo Amaya configured with Math support
1.26 cvs 1094: fi
1.68 vatton 1095: if test "$with_svg" = "yes" ; then
1096: echo Amaya configured with SVG support
1.47 cvs 1097: fi
1098: if test "$with_annot" = "yes" ; then
1099: echo Amaya configured with Annotations support
1.70 kahan 1100: fi
1.93 kahan 1101: if test "$with_raptor" = "yes" ; then
1102: echo Amaya configured to use the raptor RDF parser
1103: fi
1.70 kahan 1104: if test "$with_generic_xml" = "yes" ; then
1105: echo Amaya configured with generic XML suppport
1106: fi
1107: if test "$with_i18n" = "yes" ; then
1.82 vatton 1108: echo Amaya configured with internationalization suppport
1.75 cheyroul 1109: fi
1110: if test "$with_gl" = "yes" ; then
1111: echo Amaya configured with Opengl Canvas Rendering \(experimental\)
1.88 kirschpi 1112: fi
1113: if test "$with_dav" = "yes" ; then
1114: echo Amaya configured with WebDAV support \(experimental\)
1.1 cvs 1115: fi
1.5 cvs 1116: fi
1117:
1118: if test "$no_motif" = yes ; then
1.67 vatton 1119: echo "Amaya configured with GTK"
1.76 vatton 1120: echo "Amaya configured without static graphic libraries (libjpeg, libpng)"
1.67 vatton 1121: else
1.76 vatton 1122: if test "$no_motif" = yes ; then
1123: echo "Amaya configured without static graphic libraries (libjpeg, libpng)"
1124: fi
1.67 vatton 1125: if test "$no_motif" = yes ; then
1.5 cvs 1126: echo "Motif seems not installed on this machine"
1.61 cvs 1127: echo "Amaya need Motif 1.2 or 2.0"
1.5 cvs 1128: else
1129: if test "$motif_includes" = "" ; then
1130: echo "Motif includes were not found"
1.61 cvs 1131: echo "Amaya might not compile"
1.5 cvs 1132: echo "Edit your Option file"
1133: else
1134: if test "$motif_libraries" = "" ; then
1135: echo "Motif libraries were not found"
1.61 cvs 1136: echo "Amaya might not compile"
1.5 cvs 1137: echo "Edit your Option file"
1.67 vatton 1138: fi
1.5 cvs 1139: fi
1140: fi
1.1 cvs 1141: fi
1142:
1.78 vatton 1143: echo "Now type \"make\" (GNU make preferably) to build the binaries"
1.48 cvs 1144:
1145:
1146:
1.5 cvs 1147:
Webmaster