Annotation of Amaya/configure.in, revision 1.75
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:
1.62 cvs 70: AC_ARG_WITH(graphic-libs, [ --without-graphic-libs doesn't use provided libjpeg, libpng.])
71: if test "$withval" = "no" ; then
1.52 cvs 72: dnl
73: AC_MSG_CHECKING([for libjpeg version = 6b])
1.58 cvs 74: AC_EGREP_CPP([x 62 *x],
1.52 cvs 75: [#include <jpeglib.h>
76: x JPEG_LIB_VERSION x],
77: dnl
78: AC_MSG_RESULT([yes])
79: LIBJPEG='-ljpeg'
80: MAKEJPEG=['#'],
81: dnl
82: AC_MSG_RESULT([no])
83: LIBJPEG='../libjpeg.a' dnl LIBJPEG goes into amaya/Makefile.in
84: )
85: dnl
86: dnl
1.57 cvs 87: AC_MSG_CHECKING([for libpng version = 1.0.x])
1.58 cvs 88: AC_EGREP_CPP([x \"1.0\..*\" *x],
1.52 cvs 89: [#include <png.h>
90: x PNG_LIBPNG_VER_STRING x],
91: dnl
92: AC_MSG_RESULT([yes])
93: LIBPNG='-lpng'
94: LIBZ=''
95: MAKEPNG=['#'],
96: dnl
97: AC_MSG_RESULT([no])
98: LIBPNG='../libpng.a'
99: LIBZ='../libz.a'
100: )
101: else
102: LIBJPEG='../libjpeg.a'
103: LIBPNG='../libpng.a'
104: LIBZ='../libz.a'
105: fi
106: dnl
107: AC_SUBST(LIBJPEG)
108: AC_SUBST(LIBPNG)
109: AC_SUBST(LIBZ)
110: AC_SUBST(MAKEJPEG)
111: AC_SUBST(MAKEPNG)
112:
1.1 cvs 113: dnl
114: dnl Checks for libraries.
115: dnl
116:
117: AC_CHECK_LIB(socket, socket, )
118: AC_CHECK_LIB(inet, connect)
119: AC_CHECK_LIB(nsl, t_accept)
120: AC_CHECK_LIB(dl, dlopen)
121: AC_PATH_X
122: AC_PATH_XTRA
123:
1.41 cvs 124: dnl
125: dnl Check for libXp
126: dnl
1.38 cvs 127:
1.41 cvs 128: for ac_dir in \
129: /usr/X11R6/lib \
130: /usr/X11R5/lib \
131: \
132: /usr/lib/X11R6 \
133: /usr/lib/X11R5 \
134: \
135: /usr/local/X11R6/lib \
136: /usr/local/X11R5/lib \
137: \
138: /usr/local/lib/X11R6 \
139: /usr/local/lib/X11R5 \
140: \
141: /usr/X11/lib \
142: /usr/lib/X11 \
143: /usr/local/X11/lib \
144: /usr/local/lib/X11 \
145: \
146: /usr/X386/lib \
147: /usr/x386/lib \
148: /usr/XFree86/lib/X11 \
149: \
150: /usr/dt/lib \
151: \
152: /usr/lib \
153: /usr/local/lib \
154: /usr/unsupported/lib \
155: /usr/athena/lib \
156: /usr/local/x11r5/lib \
157: /usr/lpp/Xamples/lib \
158: \
159: /usr/lesstif/lib \
160: /usr/local/lesstif/lib\
161: /usr/gnu/lesstif/lib \
162: $HOME/lesstif/lib \
163: ; \
164: do
165: if test -r "$ac_dir/libXp.a" -o -r "$ac_dir/libXp.so"; then
166: echo "\nfound libXp.a\n"
167: X_PRE_LIBS="-lXp ${X_PRE_LIBS}"
168: break
169: fi
170: done
1.1 cvs 171: dnl
1.5 cvs 172: dnl Checks for header files.
173: dnl
174:
175: AC_HEADER_DIRENT
176: AC_HEADER_STDC
177: AC_HEADER_SYS_WAIT
178:
179: AC_CHECK_HEADERS(stdio.h)
180: AC_CHECK_HEADERS(sys/types.h types.h)
181: AC_CHECK_HEADERS(sys/unistd.h unistd.h)
182: AC_CHECK_HEADERS(sys/fcntl.h fcntl.h)
183: AC_CHECK_HEADERS(sys/limits.h limits.h)
184: AC_CHECK_HEADERS(sys/stat.h stat.h)
185: AC_CHECK_HEADERS(sys/file.h)
186: AC_CHECK_HEADERS(sys/ioctl.h)
187: AC_CHECK_HEADERS(sys/time.h time.h)
188: AC_CHECK_HEADERS(sys/systeminfo.h)
1.46 cvs 189: AC_CHECK_HEADERS(sys/string.h strings.h)
1.34 cvs 190: AC_CHECK_HEADERS(sys/syslog.h syslog.h)
1.5 cvs 191: AC_CHECK_HEADERS(sys/socket.h socket.h)
192: AC_CHECK_HEADERS(appkit/appkit.h appkit.h)
1.72 vatton 193: AC_CHECK_HEADERS(apppkit/apppkit.h apppkit.h)
1.5 cvs 194: AC_CHECK_HEADERS(netinet/in.h in.h)
195: AC_CHECK_HEADERS(dn.h)
196: AC_CHECK_HEADERS(sys/ipc.h)
197: AC_CHECK_HEADERS(net/errno.h sys/errno.h errno.h)
198: AC_CHECK_HEADERS(pwd.h)
199: AC_CHECK_HEADERS(grp.h)
200: AC_CHECK_HEADERS(arpa/inet.h inet.h)
201: AC_CHECK_HEADERS(netdb.h)
202: AC_CHECK_HEADERS(manifest.h)
203: AC_CHECK_HEADERS(bsdtypes.h)
204: AC_CHECK_HEADERS(stdefs.h)
205: AC_CHECK_HEADERS(bsdtime.h)
206: AC_CHECK_HEADERS(sys/select.h select.h)
207: AC_CHECK_HEADERS(dnetdb.h)
208: AC_CHECK_HEADERS(libc.h)
209: AC_CHECK_HEADERS(stdlib.h)
210: AC_CHECK_HEADERS(malloc.h)
211: AC_CHECK_HEADERS(memory.h)
212: AC_CHECK_HEADERS(unixlib.h)
213: AC_CHECK_HEADERS(ctype.h)
214: AC_CHECK_HEADERS(cursesX.h curses.h)
215: AC_CHECK_HEADERS(sys/resource.h resource.h)
216: AC_HEADER_DIRENT
217: AC_CHECK_HEADERS(dir.h direct.h) dnl AC_HEADER_DIRENT only checks for some..
218: AC_HEADER_STDC
219: AC_HEADER_SYS_WAIT
220: AC_HEADER_TIME
221: AC_HEADER_STAT
222:
223: dnl
224: dnl Checks for typedefs, structures, and compiler characteristics.
225: dnl
226:
227: AC_C_CONST
228: AC_C_INLINE
229: AC_TYPE_MODE_T
230: AC_TYPE_OFF_T
231: AC_TYPE_SIZE_T
232: AC_HEADER_TIME
233: AC_STRUCT_TM
234: AC_STRUCT_TIMEZONE
235: AC_TYPE_UID_T
236:
237: dnl
238: dnl Checks for library functions.
239: dnl
240:
241: AC_FUNC_ALLOCA
242: AC_TYPE_GETGROUPS
243: AC_PROG_GCC_TRADITIONAL
244: AC_FUNC_MEMCMP
245: AC_FUNC_MMAP
246: AC_TYPE_SIGNAL
247: AC_FUNC_VPRINTF
1.58 cvs 248: 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 249:
1.75 ! cheyroul 250:
1.63 vatton 251: GTK_OPTIONS=
252: AC_ARG_WITH(gtk, [ --with-gtk use GTK instead of Motif])
253: if test "$withval" = "yes" ; then
254: for ac_dir in \
1.65 cvs 255: /usr/lib/glib/include \
1.63 vatton 256: /usr/X11R6/include \
257: \
258: /usr/include/X11R6 \
259: /usr/local/X11R6/include \
260: /usr/local/include/X11R6 \
261: \
262: /usr/X11/include \
263: /usr/include/X11 \
264: /usr/local/X11/include \
265: /usr/local/include/X11 \
266: \
267: /usr/X386/include \
268: /usr/x386/include \
269: /usr/XFree86/include/X11 \
270: /usr/dt/include \
271: /usr/include \
272: /usr/local/include \
273: /usr/local/lib/glib/include \
274: ; \
275: do
276: if test -r "$ac_dir/gdk/gdk.h"; then
277: no_gtk= ac_gtk_includes=$ac_dir
278: break
279: fi
280: done
281:
1.65 cvs 282: GTK_INCLUDES="`gtk-config --cflags`"
1.63 vatton 283: AC_SUBST(GTK_INCLUDES)
1.65 cvs 284: GTK_LIBRARIES="`gtk-config --libs` -lgdk_imlib -ltiff -lgif"
1.63 vatton 285: AC_SUBST(GTK_LIBRARIES)
1.65 cvs 286: GTK_OPTIONS=-D_GTK
1.63 vatton 287: no_motif=yes
288: else
1.5 cvs 289: dnl
1.4 cvs 290: dnl Checking for Motif libraries and includes
291: dnl
292: dnl Borrowed from Lesstif configure.in
293: dnl Lesstif is a Great Project (TM)
294: dnl
295:
296: AC_DEFUN(AC_PATH_MOTIF_DIRECT,
297: [test -z "$motif_direct_test_library" && motif_direct_test_library=Xm
298: test -z "$motif_direct_test_function" && motif_direct_test_function=XmCreatePushButton
299: test -z "$motif_direct_test_include" && motif_direct_test_include=Xm/Xm.h
300: for ac_dir in \
301: /usr/include/Motif1.2 \
302: /usr/Motif1.2/include \
1.71 vatton 303: /sw/Lesstif/Motif2.0/include \
1.4 cvs 304: \
305: /usr/motif/include \
306: \
307: /usr/X11R6/include \
308: /usr/X11R5/include \
309: \
310: /usr/include/X11R6 \
311: /usr/include/X11R5 \
312: \
313: /usr/local/X11R6/include \
314: /usr/local/X11R5/include \
315: \
316: /usr/local/include/X11R6 \
317: /usr/local/include/X11R5 \
318: \
319: /usr/X11/include \
320: /usr/include/X11 \
321: /usr/local/X11/include \
322: /usr/local/include/X11 \
323: \
324: /usr/X386/include \
325: /usr/x386/include \
326: /usr/XFree86/include/X11 \
327: \
328: /usr/dt/include \
329: \
330: /usr/include \
331: /usr/local/include \
332: /usr/unsupported/include \
333: /usr/athena/include \
334: /usr/local/x11r5/include \
335: /usr/lpp/Xamples/include \
1.14 cvs 336: \
337: /usr/lesstif/include \
338: /usr/local/lesstif/include\
339: /usr/gnu/lesstif/include \
340: $HOME/lesstif/include \
1.4 cvs 341: ; \
342: do
343: if test -r "$ac_dir/$motif_direct_test_include"; then
344: no_motif= ac_motif_includes=$ac_dir
345: break
346: fi
347: done
348:
349: # Check for the libraries.
350: # See if we find them without any special options.
351: # Don't add to $LIBS permanently.
352: ac_save_LIBS="$LIBS"
353: LIBS="-l$motif_direct_test_library $LIBS"
354: # First see if replacing the include by lib works.
355: for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \
356: /usr/lib/Motif1.2 \
357: /usr/Motif1.2/lib \
1.71 vatton 358: /sw/Lesstif/Motif2.0/lib \
1.4 cvs 359: \
360: /usr/motif/lib \
361: \
362: /usr/X11R6/lib \
363: /usr/X11R5/lib \
364: \
365: /usr/lib/X11R6 \
366: /usr/lib/X11R5 \
367: \
368: /usr/local/X11R6/lib \
369: /usr/local/X11R5/lib \
370: \
371: /usr/local/lib/X11R6 \
372: /usr/local/lib/X11R5 \
373: \
374: /usr/X11/lib \
375: /usr/lib/X11 \
376: /usr/local/X11/lib \
377: \
378: /usr/X386/lib \
379: /usr/x386/lib \
380: /usr/XFree86/lib/X11 \
381: \
382: /usr/lib \
383: /usr/local/lib \
384: /usr/unsupported/lib \
385: /usr/athena/lib \
386: /usr/local/x11r5/lib \
387: /usr/lpp/Xamples/lib \
1.14 cvs 388: \
389: /usr/lesstif/lib \
390: /usr/local/lesstif/lib\
391: /usr/gnu/lesstif/lib \
392: $HOME/lesstif/lib \
1.4 cvs 393: ; \
394: do
1.71 vatton 395: for ac_extension in a so sl la; do
1.4 cvs 396: if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then
397: no_motif= ac_motif_libraries=$ac_dir
398: break 2
399: fi
400: done
1.5 cvs 401: done
402: LIBS="$ac_save_LIBS"
403: ])
1.4 cvs 404:
405: AC_DEFUN(AC_PATH_MOTIF,
1.66 vatton 406: [AC_REQUIRE_CPP()
1.4 cvs 407:
408: motif_includes=NONE
409: motif_libraries=NONE
410:
411: AC_MSG_CHECKING(for Motif)
1.63 vatton 412: if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then
413: no_motif=
1.4 cvs 414: else
415: AC_CACHE_VAL(ac_cv_path_motif,
416: [# One or both of these vars are not set, and there is no cached value.
1.63 vatton 417: no_motif=yes
1.4 cvs 418: AC_PATH_MOTIF_DIRECT
419:
420: if test "$no_motif" = yes; then
1.63 vatton 421: ac_cv_path_motif="no_motif=yes"
1.4 cvs 422: else
1.63 vatton 423: ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries"
1.66 vatton 424: fi])
425: eval "$ac_cv_path_motif"
1.63 vatton 426: fi
1.4 cvs 427:
428: if test "$no_motif" = yes; then
429: AC_MSG_RESULT(no)
1.5 cvs 430: MOTIF_INCLUDES=
431: MOTIF_LIBRARIES=
1.4 cvs 432: else
433: test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes
434: test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries
435: ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries"
436: AC_MSG_RESULT([libraries $motif_libraries, headers $motif_includes])
1.5 cvs 437: if test "$motif_includes" != "/usr/include" ; then
438: MOTIF_INCLUDES="-I$motif_includes"
439: fi
440: if test "$motif_libraries" != "/usr/lib" ; then
1.64 cvs 441: MOTIF_LIBRARIES="-L$motif_libraries -lXm"
1.19 cvs 442: case "${host}" in
443: *-*sun-solaris* )
444: MOTIF_LIBRARIES="${MOTIF_LIBRARIES} -R$motif_libraries"
445: ;;
1.65 cvs 446: esac
447: else
448: MOTIF_LIBRARIES="-lXm"
1.5 cvs 449: fi
1.4 cvs 450: fi
1.5 cvs 451: AC_SUBST(MOTIF_INCLUDES)
452: AC_SUBST(MOTIF_LIBRARIES)
1.4 cvs 453: ])
454:
455: AC_PATH_MOTIF
1.66 vatton 456: fi
1.4 cvs 457:
1.63 vatton 458: if test "${GCC}" = "yes"; then
459: CPP="${CPP} -x c"
460: fi
461:
1.1 cvs 462: dnl ***************************************************************
463: dnl
1.61 cvs 464: dnl SPECIFIC STUFF : CONFIGURATION OPTIONS FOR AMAYA
1.1 cvs 465: dnl
466: dnl ***************************************************************
467:
1.68 vatton 468: AMAYA_VER="6.0"
1.1 cvs 469:
470: dnl
1.6 cvs 471: dnl We use a special versoin of cextract patched for alignment
472: dnl to build the signatures of the modules functions located in f subdirs
473: dnl
474: CEXTRACT_VER="1.7"
475: CEXTRACT_FLAGS="+O"
476:
1.3 cvs 477:
478: dnl
1.9 cvs 479: dnl Adjust the some variables depending on the host and compiler
1.61 cvs 480: dnl Thotlib NEED signed chars !!!
1.7 cvs 481: dnl
482:
483: if test "${CC}" = "gcc" ; then
1.44 cvs 484: CFLAGS="${CFLAGS} -W "
1.7 cvs 485: case "${host}" in
486: *-*-irix5* | *-*irix6* )
487: CFLAGS="${CFLAGS} -fsigned-char"
488: ;;
489: esac
1.14 cvs 490: fi
491:
492: if test "$ac_cv_c_const" = "no" ; then
493: CFLAGS="${CFLAGS} -DCONST= "
1.7 cvs 494: fi
495:
496: dnl
1.61 cvs 497: dnl Check for availability of amaya sources
1.1 cvs 498: dnl
499:
500: build_amaya="yes"
501:
502: if test "$with_amaya" = "no" ; then
503: build_amaya="no"
1.45 cvs 504: else
505: if test ! -f $srcdir/amaya/Makefile.in ; then
1.1 cvs 506: AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
507: build_amaya="no"
1.45 cvs 508: fi
1.1 cvs 509: fi
510:
1.45 cvs 511:
1.1 cvs 512: dnl
1.50 cvs 513: dnl Check for additionnal packages
1.1 cvs 514: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
515: dnl
1.70 kahan 516: AC_ARG_ENABLE(svg, [ --disable-svg remove SVG support ])
517: AC_ARG_ENABLE(annot, [ --disable-annot remove Annotations support ])
518: AC_ARG_ENABLE(generic-xml, [ --disable-generic-xml remove Generic XML support ])
519: AC_ARG_ENABLE(annot-threads, [ --disable-annot-threads remove annotation threads ])
520: AC_ARG_ENABLE(i18n, [ --with-18n enable I18N support (experimental) ])
1.75 ! cheyroul 521: AC_ARG_ENABLE(GL, [ --with-gl enable Opengl canvas (experimental) ])
! 522:
1.1 cvs 523:
1.8 cvs 524: dnl
1.75 ! cheyroul 525: dnl GL canvas is disabled by default
! 526: dnl
! 527: dnl needs Opengl, glut, glu,
! 528: dnl needs GTK
! 529: dnl text WILL need freetype2, ftgl
! 530: dnl GL is for opengl
! 531: dnl Xmu is for a linking in Glut
! 532: dnl Glu is for text drawing (until we switch)
! 533: dnl GLU is for tesselation algortihms (until we extract it from this lib)
! 534: dnl (tesselation is used for polygons with holes in it...)
! 535: dnl gtkgl is for integration of opengl in GTK
! 536: if test "$with_gl" = "" ; then
! 537: if test "$enable_gl" = "yes" ; then
! 538: with_gl="yes"
! 539: else
! 540: with_gl="no"
! 541: fi
! 542: fi
! 543: if test "$with_gl" = "yes" ; then
! 544: AC_MSG_CHECKING([OpenGL])
! 545: for ac_dir in \
! 546: /usr/include/GL \
! 547: /usr/include \
! 548: /usr/X11R6/include/GL \
! 549: /usr/X11R6/include \
! 550: /usr/local/include \
! 551: /usr/local/include/GL \
! 552: ; \
! 553: do if test -r "$ac_dir/gl.h" ; then
! 554: gl_inc="yes"
! 555: break
! 556: fi
! 557: done
! 558: for ac_dir in \
! 559: /usr/include/GL \
! 560: /usr/include \
! 561: /usr/X11R6/include/GL \
! 562: /usr/X11R6/include \
! 563: /usr/local/include \
! 564: /usr/local/include/GL \
! 565: ; \
! 566: do if test -r "$ac_dir/glut.h" ; then
! 567: glut_inc="yes"
! 568: break
! 569: fi
! 570: done
! 571: for ac_dir in \
! 572: /usr/include/GL \
! 573: /usr/include \
! 574: /usr/X11R6/include/GL \
! 575: /usr/X11R6/include \
! 576: /usr/local/include \
! 577: /usr/local/include/GL \
! 578: ; \
! 579: do if test -r "$ac_dir/glu.h" ; then
! 580: glu_inc="yes"
! 581: break
! 582: fi
! 583: done
! 584: for ac_dir in \
! 585: /usr/include/GL \
! 586: /usr/include \
! 587: /usr/X11R6/include/GL \
! 588: /usr/X11R6/include \
! 589: /usr/local/include \
! 590: /usr/local/include/GL \
! 591: ; \
! 592: do if test -r "$ac_dir/gtkgl/gtkglarea.h" ; then
! 593: gtkgl_inc="yes"
! 594: break
! 595: fi
! 596: done
! 597: if test "$gl_inc" = "" ; then
! 598: AC_MSG_WARN(Opengl headers (gl.h) not found !!)
! 599: AC_MSG_WARN(Disabling opengl build !)
! 600: with_gl="no"
! 601: GL_OPTIONS=
! 602: GL_INCLUDES=
! 603: GL_LIBRARIES=
! 604: fi
! 605: if test "$glut_inc" = "" ; then
! 606: AC_MSG_WARN(Glut headers (glut.h) not found !!)
! 607: AC_MSG_WARN(Disabling opengl build !)
! 608: with_gl="no"
! 609: GL_OPTIONS=
! 610: GL_INCLUDES=
! 611: GL_LIBRARIES=
! 612: fi
! 613: if test "$glu_inc" = "" ; then
! 614: AC_MSG_WARN(Glu headers (glu.h) not found !!)
! 615: AC_MSG_WARN(Disabling opengl build !)
! 616: with_gl="no"
! 617: GL_OPTIONS=
! 618: GL_INCLUDES=
! 619: GL_LIBRARIES=
! 620: fi
! 621: if test "$gtkgl_inc" = "" ; then
! 622: AC_MSG_WARN(Gtkglarea headers (gktglarea.h) not found !!)
! 623: AC_MSG_WARN(Disabling opengl build !)
! 624: with_gl="no"
! 625: GL_OPTIONS=
! 626: GL_INCLUDES=
! 627: GL_LIBRARIES=
! 628: fi
! 629: if test "$gl_inc" = "yes" ; then
! 630: if test "$glut_inc" = "yes" ; then
! 631: if test "$glu_inc" = "yes" ; then
! 632: if test "$gtkgl_inc" = "yes" ; then
! 633: GL_INCLUDES="-I$ac_dir "
! 634: GL_LIBRARIES=" -lXmu -lGL -lglut -lGLU -lgtkgl "
! 635: GL_OPTIONS=-D_GL
! 636: no_motif=yes
! 637: fi
! 638: fi
! 639: fi
! 640: fi
! 641: AC_SUBST(GL_INCLUDES)
! 642: AC_SUBST(GL_LIBRARIES)
! 643: fi
! 644: dnl
1.21 cvs 645: dnl plugins support is disabled by default
1.8 cvs 646: dnl
1.13 cvs 647:
648: if test "$with_plugin" = "" ; then
1.21 cvs 649: if test "$enable_plugin" = "yes" ; then
1.55 kahan 650: with_plugin="yes"
1.21 cvs 651: else
1.17 cvs 652: with_plugin="no"
653: fi
1.10 cvs 654: fi
1.1 cvs 655:
1.8 cvs 656: dnl
1.68 vatton 657: dnl svg is enabled by default
1.26 cvs 658: dnl
1.68 vatton 659: if test "$with_svg" = "" ; then
660: if test "$enable_svg" = "no" ; then
661: with_svg="no"
1.49 cvs 662: else
1.68 vatton 663: with_svg="yes"
1.26 cvs 664: fi
665: fi
666:
667: dnl
1.56 kahan 668: dnl annotations is enabled by default
1.47 cvs 669: dnl
670: if test "$with_annot" = "" ; then
1.56 kahan 671: if test "$enable_annot" = "no" ; then
672: with_annot="no"
673: else
1.54 cvs 674: with_annot="yes"
1.47 cvs 675: fi
676: fi
677:
1.70 kahan 678: dnl
679: dnl Generic XML support enabled by default
680: dnl
681: if test "$with_generic_xml" = "" ; then
682: if test "$enable_generic_xml" = "no" ; then
683: with_generic_xml="no"
684: GENERIC_XML_OPTIONS=
685: else
686: with_generic_xml="yes"
687: GENERIC_XML_OPTIONS=-DXML_GENERIC
688: fi
689: fi
690:
691: dnl
1.73 kahan 692: dnl Annotation thread support enabled by default
1.70 kahan 693: dnl
694: if test "$with_annot_threads" = "" ; then
1.73 kahan 695: if test "$enable_annot_threads" = "no" ; then
696: with_annot_threads="no"
1.74 kahan 697: ANNOT_THREAD_OPTIONS=
1.70 kahan 698: else
1.73 kahan 699: with_annot_threads="yes"
1.74 kahan 700: ANNOT_THREAD_OPTIONS=-DANNOT_ON_ANNOT
1.70 kahan 701: fi
702: fi
703:
704: dnl
705: dnl I18N support disabled by default
706: dnl
707: if test "$with_i18n" = "" ; then
708: if test "$enable_i18n" = "yes" ; then
709: with_i18n="yes"
710: I18N_OPTIONS=-D_I18N_
711: else
712: with_i18n="no"
713: I18N_OPTIONS=""
714: fi
715: fi
1.22 cvs 716:
1.19 cvs 717: if test "$build_amaya" = "yes" ; then
1.43 cvs 718: if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50 cvs 719: AC_MSG_WARN(libwww sources not found !!)
720: AC_MSG_WARN(Disabling Amaya build !)
721: build_amaya="no"
1.1 cvs 722: fi
1.8 cvs 723:
724: if test ! -f $srcdir/amaya/MathML.S ; then
1.10 cvs 725: if test "$with_math" = "yes" ; then
1.8 cvs 726: AC_MSG_WARN(MathML sources not found !!)
1.26 cvs 727: AC_MSG_WARN(Disabling Math build !)
1.10 cvs 728: with_math="no"
729: MATH_OPTIONS=
1.8 cvs 730: fi
731: fi
1.26 cvs 732:
1.68 vatton 733: if test ! -f $srcdir/amaya/SVG.S ; then
734: if test "$with_svg" = "yes" ; then
735: AC_MSG_WARN(SVG sources not found !!)
736: AC_MSG_WARN(Disabling SVG build !)
737: with_svg="no"
738: SVG_OPTIONS=
1.26 cvs 739: fi
740: fi
741:
1.48 cvs 742: if test ! -f $srcdir/annotlib/Makefile.in ; then
1.47 cvs 743: if test "$with_annot" = "yes" ; then
744: AC_MSG_WARN(Annotation makefile not found !!)
745: AC_MSG_WARN(Disabling Annotations build !)
746: with_annot="no"
747: fi
748: fi
1.55 kahan 749:
1.70 kahan 750: if test "$with_annot" = "no" -a "$with_annot_threads" = "yes" ; then
751: AC_MSG_WARN(You must select the annotation support to have threads)
752: AC_MSG_WARN(Disabling annotation thread support)
753: with_annot_threads="no"
754: ANNOT_THREAD_OPTIONS=
755: fi
756:
1.55 kahan 757: if test "$with_plugin" = "yes" ; then
758: AC_MSG_WARN(The plugin library isn't supported anymore in Amaya !!)
759: AC_MSG_WARN(Disabling plugin build !)
760: with_plugin="no"
761: fi
762:
1.1 cvs 763: fi
764:
765: dnl
766: dnl The options for each library or binary
767: dnl
768:
1.75 ! cheyroul 769: THOT_OPTIONS="$GTK_OPTIONS $I18N_OPTIONS $GL_OPTIONS"
! 770: AMAYA_OPTIONS="$MATH_OPTIONS $SVG_OPTIONS $GTK_OPTIONS $GENERIC_XML_OPTIONS $I18N_OPTIONS $ANNOT_THREAD_OPTIONS $GL_OPTIONS"
1.58 cvs 771: #PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
1.70 kahan 772: AMAYA_ANNOT_OPTIONS="$ANNOT_THREAD_OPTIONS"
1.1 cvs 773: IMGLIBS="-ljpeg -lpng -lz"
1.3 cvs 774: EXTRA_LIBS=
1.1 cvs 775:
776: dnl
777: dnl Set up the PATHs needed
778: dnl
779:
780: API="\$(THOTDIR)/thotlib/include"
781: VAR="\$(THOTDIR)/thotlib/internals/var"
782: INCL="\$(THOTDIR)/thotlib/internals/h"
783: FUNC="\$(THOTDIR)/thotlib/internals/f"
1.58 cvs 784: if test "${LIBPNG}" = "../libpng.a" ; then
1.52 cvs 785: #there is a modified header file we need
1.1 cvs 786: PNGINCL="-I\$(THOTDIR)/libpng -I\$(THOTDIR)/libpng/zlib"
1.58 cvs 787: fi
788: if test "${LIBJPEG}" = "../libjpeg.a" ; then
789: #there is a modified header file we need
790: JPEGINCL="-I\$(THOTDIR)/libjpeg"
791: fi
1.1 cvs 792:
793: dnl
794: dnl Set up the include variables.
795: dnl
796:
1.61 cvs 797: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58 cvs 798: APIINCLUDES=-I${API}
799:
800: if test "${VPATHOPT}" = "" ; then
1.1 cvs 801: VPATHOPT="VPATH"
802: fi
803:
804: dnl
805: dnl Exports the current values of the variables.
806: dnl
807:
808: AC_SUBST(AMAYA_VER)
1.6 cvs 809: AC_SUBST(CEXTRACT_VER)
810: AC_SUBST(CEXTRACT_FLAGS)
1.1 cvs 811:
812: AC_SUBST(THOTINCLUDES)
813: AC_SUBST(APIINCLUDES)
814: AC_SUBST(VPATHOPT)
815:
1.63 vatton 816: AC_SUBST(GTK_OPTIONS)
1.1 cvs 817: AC_SUBST(THOT_OPTIONS)
818: AC_SUBST(AMAYA_OPTIONS)
819: AC_SUBST(PLUGIN_OPTIONS)
1.48 cvs 820: AC_SUBST(AMAYA_ANNOT_OPTIONS)
1.1 cvs 821: AC_SUBST(IMGLIBS)
1.3 cvs 822: AC_SUBST(EXTRA_LIBS)
1.1 cvs 823:
824: dnl
1.48 cvs 825: dnl Include the option Makefile.xxx fragment according to the configure options
1.1 cvs 826: dnl
827:
828: if test "$with_plugin" = "yes" ; then
1.50 cvs 829: AC_SUBST_FILE(plugin_frag)
1.1 cvs 830: plugin_frag=$srcdir/pluginlib/Makefile.plugin
831: else
832: AC_SUBST_FILE(plugin_frag)
833: plugin_frag=/dev/null
834: fi
835:
836: AC_SUBST_FILE(www_frag)
1.49 cvs 837: www_frag=$srcdir/amaya/Makefile.libwww
1.1 cvs 838:
1.50 cvs 839: if test "$with_math" = "no" ; then
1.10 cvs 840: AC_SUBST_FILE(math_frag)
1.50 cvs 841: math_frag=/dev/null
1.8 cvs 842: else
1.10 cvs 843: AC_SUBST_FILE(math_frag)
1.50 cvs 844: math_frag=$srcdir/amaya/Makefile.math
1.8 cvs 845: fi
846:
1.68 vatton 847: if test "$with_svg" = "no" ; then
848: AC_SUBST_FILE(svg_frag)
849: svg_frag=/dev/null
1.26 cvs 850: else
1.68 vatton 851: AC_SUBST_FILE(svg_frag)
852: svg_frag=$srcdir/amaya/Makefile.svg
1.26 cvs 853: fi
854:
1.47 cvs 855: if test "$with_annot" = "yes" ; then
856: AC_SUBST_FILE(annot_frag)
1.48 cvs 857: annot_frag=$srcdir/annotlib/Makefile.annot
1.47 cvs 858: else
859: AC_SUBST_FILE(annot_frag)
860: annot_frag=/dev/null
861: fi
862:
1.16 cvs 863:
1.1 cvs 864: dnl ***************************************************************
865: dnl
866: dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
867: dnl
868: dnl ***************************************************************
869:
870: EXTRA_MAKEFILE_IN=
1.2 cvs 871: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1 cvs 872: libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2 cvs 873: tools/mkdep/Makefile \
1.1 cvs 874: tools/cextract-1.7/Makefile thotlib/Makefile \
1.5 cvs 875: thotlib/include/Makefile batch/Makefile tablelib/Makefile"
1.1 cvs 876:
877: if test "$build_amaya" = "yes" ; then
1.2 cvs 878:
1.19 cvs 879: make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2 cvs 880: EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.27 cvs 881: $srcdir/amaya/Makefile.libwww"
882:
883: if test "$$with_plugin" = "yes" ; then
884: make_output="$make_output pluginlib/Makefile"
885: EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.2 cvs 886: $srcdir/pluginlib/Makefile.plugin"
1.27 cvs 887: fi
1.2 cvs 888:
1.48 cvs 889: if test "$with_annot" = "yes" ; then
890: make_output="$make_output annotlib/Makefile"
891: EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
892: fi
1.1 cvs 893: fi
894:
895: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6 cvs 896: AC_OUTPUT($make_output , [
897: dnl
898: dnl This fragment of shell code is executed after the
899: dnl Makefile(s) dump ...
900: dnl
901:
902: echo timestamp > stamp-h
903:
904: dnl
905: dnl Check for an upgrade in the Options numbers
906: dnl
907:
908: if test -f Options ; then
909: oldversion=`grep Version Options`
910: newversion=`grep Version Options.orig`
911: if test "$oldversion" != "$newversion" ; then
912: echo WARNING : Options files have changed, old options saved to Options.old
913: cp Options Options.old
914: cp Options.orig Options
915: exit 1
916: fi
917: fi
918: ])
1.1 cvs 919:
920: if test "$build_amaya" = "yes" ; then
1.50 cvs 921: echo Amaya configured with libWWW
922: if test "$with_plugin" = "yes" ; then
923: echo Amaya configured with Plugins support
1.8 cvs 924: fi
1.10 cvs 925: if test "$with_math" = "yes" ; then
926: echo Amaya configured with Math support
1.26 cvs 927: fi
1.68 vatton 928: if test "$with_svg" = "yes" ; then
929: echo Amaya configured with SVG support
1.47 cvs 930: fi
931: if test "$with_annot" = "yes" ; then
932: echo Amaya configured with Annotations support
1.70 kahan 933: fi
934: if test "$with_annot_threads" = "yes" ; then
935: echo Amaya configured with Annotation threads support
936: fi
937: if test "$with_generic_xml" = "yes" ; then
938: echo Amaya configured with generic XML suppport
939: fi
940: if test "$with_i18n" = "yes" ; then
941: echo Amaya configured with I18N suppport \(experimental\)
1.75 ! cheyroul 942: fi
! 943: if test "$with_gl" = "yes" ; then
! 944: echo Amaya configured with Opengl Canvas Rendering \(experimental\)
1.1 cvs 945: fi
1.5 cvs 946: fi
947:
948: if test "$no_motif" = yes ; then
1.67 vatton 949: echo "Amaya configured with GTK"
950: else
951: if test "$no_motif" = yes ; then
1.5 cvs 952: echo "Motif seems not installed on this machine"
1.61 cvs 953: echo "Amaya need Motif 1.2 or 2.0"
1.5 cvs 954: else
955: if test "$motif_includes" = "" ; then
956: echo "Motif includes were not found"
1.61 cvs 957: echo "Amaya might not compile"
1.5 cvs 958: echo "Edit your Option file"
959: else
960: if test "$motif_libraries" = "" ; then
961: echo "Motif libraries were not found"
1.61 cvs 962: echo "Amaya might not compile"
1.5 cvs 963: echo "Edit your Option file"
1.67 vatton 964: fi
1.5 cvs 965: fi
966: fi
1.1 cvs 967: fi
968:
1.69 kahan 969: echo "Now type \"make all\" (GNU make preferably) to build the binaries"
1.48 cvs 970:
971:
972:
1.5 cvs 973:
Webmaster