Annotation of Amaya/configure.in, revision 1.73
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.63 vatton 250: GTK_OPTIONS=
251: AC_ARG_WITH(gtk, [ --with-gtk use GTK instead of Motif])
252: if test "$withval" = "yes" ; then
253: for ac_dir in \
1.65 cvs 254: /usr/lib/glib/include \
1.63 vatton 255: /usr/X11R6/include \
256: \
257: /usr/include/X11R6 \
258: /usr/local/X11R6/include \
259: /usr/local/include/X11R6 \
260: \
261: /usr/X11/include \
262: /usr/include/X11 \
263: /usr/local/X11/include \
264: /usr/local/include/X11 \
265: \
266: /usr/X386/include \
267: /usr/x386/include \
268: /usr/XFree86/include/X11 \
269: /usr/dt/include \
270: /usr/include \
271: /usr/local/include \
272: /usr/local/lib/glib/include \
273: ; \
274: do
275: if test -r "$ac_dir/gdk/gdk.h"; then
276: no_gtk= ac_gtk_includes=$ac_dir
277: break
278: fi
279: done
280:
1.65 cvs 281: GTK_INCLUDES="`gtk-config --cflags`"
1.63 vatton 282: AC_SUBST(GTK_INCLUDES)
1.65 cvs 283: GTK_LIBRARIES="`gtk-config --libs` -lgdk_imlib -ltiff -lgif"
1.63 vatton 284: AC_SUBST(GTK_LIBRARIES)
1.65 cvs 285: GTK_OPTIONS=-D_GTK
1.63 vatton 286: no_motif=yes
287: else
1.5 cvs 288: dnl
1.4 cvs 289: dnl Checking for Motif libraries and includes
290: dnl
291: dnl Borrowed from Lesstif configure.in
292: dnl Lesstif is a Great Project (TM)
293: dnl
294:
295: AC_DEFUN(AC_PATH_MOTIF_DIRECT,
296: [test -z "$motif_direct_test_library" && motif_direct_test_library=Xm
297: test -z "$motif_direct_test_function" && motif_direct_test_function=XmCreatePushButton
298: test -z "$motif_direct_test_include" && motif_direct_test_include=Xm/Xm.h
299: for ac_dir in \
300: /usr/include/Motif1.2 \
301: /usr/Motif1.2/include \
1.71 vatton 302: /sw/Lesstif/Motif2.0/include \
1.4 cvs 303: \
304: /usr/motif/include \
305: \
306: /usr/X11R6/include \
307: /usr/X11R5/include \
308: \
309: /usr/include/X11R6 \
310: /usr/include/X11R5 \
311: \
312: /usr/local/X11R6/include \
313: /usr/local/X11R5/include \
314: \
315: /usr/local/include/X11R6 \
316: /usr/local/include/X11R5 \
317: \
318: /usr/X11/include \
319: /usr/include/X11 \
320: /usr/local/X11/include \
321: /usr/local/include/X11 \
322: \
323: /usr/X386/include \
324: /usr/x386/include \
325: /usr/XFree86/include/X11 \
326: \
327: /usr/dt/include \
328: \
329: /usr/include \
330: /usr/local/include \
331: /usr/unsupported/include \
332: /usr/athena/include \
333: /usr/local/x11r5/include \
334: /usr/lpp/Xamples/include \
1.14 cvs 335: \
336: /usr/lesstif/include \
337: /usr/local/lesstif/include\
338: /usr/gnu/lesstif/include \
339: $HOME/lesstif/include \
1.4 cvs 340: ; \
341: do
342: if test -r "$ac_dir/$motif_direct_test_include"; then
343: no_motif= ac_motif_includes=$ac_dir
344: break
345: fi
346: done
347:
348: # Check for the libraries.
349: # See if we find them without any special options.
350: # Don't add to $LIBS permanently.
351: ac_save_LIBS="$LIBS"
352: LIBS="-l$motif_direct_test_library $LIBS"
353: # First see if replacing the include by lib works.
354: for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \
355: /usr/lib/Motif1.2 \
356: /usr/Motif1.2/lib \
1.71 vatton 357: /sw/Lesstif/Motif2.0/lib \
1.4 cvs 358: \
359: /usr/motif/lib \
360: \
361: /usr/X11R6/lib \
362: /usr/X11R5/lib \
363: \
364: /usr/lib/X11R6 \
365: /usr/lib/X11R5 \
366: \
367: /usr/local/X11R6/lib \
368: /usr/local/X11R5/lib \
369: \
370: /usr/local/lib/X11R6 \
371: /usr/local/lib/X11R5 \
372: \
373: /usr/X11/lib \
374: /usr/lib/X11 \
375: /usr/local/X11/lib \
376: \
377: /usr/X386/lib \
378: /usr/x386/lib \
379: /usr/XFree86/lib/X11 \
380: \
381: /usr/lib \
382: /usr/local/lib \
383: /usr/unsupported/lib \
384: /usr/athena/lib \
385: /usr/local/x11r5/lib \
386: /usr/lpp/Xamples/lib \
1.14 cvs 387: \
388: /usr/lesstif/lib \
389: /usr/local/lesstif/lib\
390: /usr/gnu/lesstif/lib \
391: $HOME/lesstif/lib \
1.4 cvs 392: ; \
393: do
1.71 vatton 394: for ac_extension in a so sl la; do
1.4 cvs 395: if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then
396: no_motif= ac_motif_libraries=$ac_dir
397: break 2
398: fi
399: done
1.5 cvs 400: done
401: LIBS="$ac_save_LIBS"
402: ])
1.4 cvs 403:
404: AC_DEFUN(AC_PATH_MOTIF,
1.66 vatton 405: [AC_REQUIRE_CPP()
1.4 cvs 406:
407: motif_includes=NONE
408: motif_libraries=NONE
409:
410: AC_MSG_CHECKING(for Motif)
1.63 vatton 411: if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then
412: no_motif=
1.4 cvs 413: else
414: AC_CACHE_VAL(ac_cv_path_motif,
415: [# One or both of these vars are not set, and there is no cached value.
1.63 vatton 416: no_motif=yes
1.4 cvs 417: AC_PATH_MOTIF_DIRECT
418:
419: if test "$no_motif" = yes; then
1.63 vatton 420: ac_cv_path_motif="no_motif=yes"
1.4 cvs 421: else
1.63 vatton 422: ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries"
1.66 vatton 423: fi])
424: eval "$ac_cv_path_motif"
1.63 vatton 425: fi
1.4 cvs 426:
427: if test "$no_motif" = yes; then
428: AC_MSG_RESULT(no)
1.5 cvs 429: MOTIF_INCLUDES=
430: MOTIF_LIBRARIES=
1.4 cvs 431: else
432: test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes
433: test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries
434: ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries"
435: AC_MSG_RESULT([libraries $motif_libraries, headers $motif_includes])
1.5 cvs 436: if test "$motif_includes" != "/usr/include" ; then
437: MOTIF_INCLUDES="-I$motif_includes"
438: fi
439: if test "$motif_libraries" != "/usr/lib" ; then
1.64 cvs 440: MOTIF_LIBRARIES="-L$motif_libraries -lXm"
1.19 cvs 441: case "${host}" in
442: *-*sun-solaris* )
443: MOTIF_LIBRARIES="${MOTIF_LIBRARIES} -R$motif_libraries"
444: ;;
1.65 cvs 445: esac
446: else
447: MOTIF_LIBRARIES="-lXm"
1.5 cvs 448: fi
1.4 cvs 449: fi
1.5 cvs 450: AC_SUBST(MOTIF_INCLUDES)
451: AC_SUBST(MOTIF_LIBRARIES)
1.4 cvs 452: ])
453:
454: AC_PATH_MOTIF
1.66 vatton 455: fi
1.4 cvs 456:
1.63 vatton 457: if test "${GCC}" = "yes"; then
458: CPP="${CPP} -x c"
459: fi
460:
1.1 cvs 461: dnl ***************************************************************
462: dnl
1.61 cvs 463: dnl SPECIFIC STUFF : CONFIGURATION OPTIONS FOR AMAYA
1.1 cvs 464: dnl
465: dnl ***************************************************************
466:
1.68 vatton 467: AMAYA_VER="6.0"
1.1 cvs 468:
469: dnl
1.6 cvs 470: dnl We use a special versoin of cextract patched for alignment
471: dnl to build the signatures of the modules functions located in f subdirs
472: dnl
473: CEXTRACT_VER="1.7"
474: CEXTRACT_FLAGS="+O"
475:
1.3 cvs 476:
477: dnl
1.9 cvs 478: dnl Adjust the some variables depending on the host and compiler
1.61 cvs 479: dnl Thotlib NEED signed chars !!!
1.7 cvs 480: dnl
481:
482: if test "${CC}" = "gcc" ; then
1.44 cvs 483: CFLAGS="${CFLAGS} -W "
1.7 cvs 484: case "${host}" in
485: *-*-irix5* | *-*irix6* )
486: CFLAGS="${CFLAGS} -fsigned-char"
487: ;;
488: esac
1.14 cvs 489: fi
490:
491: if test "$ac_cv_c_const" = "no" ; then
492: CFLAGS="${CFLAGS} -DCONST= "
1.7 cvs 493: fi
494:
495: dnl
1.61 cvs 496: dnl Check for availability of amaya sources
1.1 cvs 497: dnl
498:
499: build_amaya="yes"
500:
501: if test "$with_amaya" = "no" ; then
502: build_amaya="no"
1.45 cvs 503: else
504: if test ! -f $srcdir/amaya/Makefile.in ; then
1.1 cvs 505: AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
506: build_amaya="no"
1.45 cvs 507: fi
1.1 cvs 508: fi
509:
1.45 cvs 510:
1.1 cvs 511: dnl
1.50 cvs 512: dnl Check for additionnal packages
1.1 cvs 513: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
514: dnl
1.70 kahan 515: AC_ARG_ENABLE(svg, [ --disable-svg remove SVG support ])
516: AC_ARG_ENABLE(annot, [ --disable-annot remove Annotations support ])
517: AC_ARG_ENABLE(generic-xml, [ --disable-generic-xml remove Generic XML support ])
518: AC_ARG_ENABLE(annot-threads, [ --disable-annot-threads remove annotation threads ])
519: AC_ARG_ENABLE(i18n, [ --with-18n enable I18N support (experimental) ])
1.1 cvs 520:
1.8 cvs 521: dnl
1.21 cvs 522: dnl plugins support is disabled by default
1.8 cvs 523: dnl
1.13 cvs 524:
525: if test "$with_plugin" = "" ; then
1.21 cvs 526: if test "$enable_plugin" = "yes" ; then
1.55 kahan 527: with_plugin="yes"
1.21 cvs 528: else
1.17 cvs 529: with_plugin="no"
530: fi
1.10 cvs 531: fi
1.1 cvs 532:
1.8 cvs 533: dnl
1.68 vatton 534: dnl svg is enabled by default
1.26 cvs 535: dnl
1.68 vatton 536: if test "$with_svg" = "" ; then
537: if test "$enable_svg" = "no" ; then
538: with_svg="no"
1.49 cvs 539: else
1.68 vatton 540: with_svg="yes"
1.26 cvs 541: fi
542: fi
543:
544: dnl
1.56 kahan 545: dnl annotations is enabled by default
1.47 cvs 546: dnl
547: if test "$with_annot" = "" ; then
1.56 kahan 548: if test "$enable_annot" = "no" ; then
549: with_annot="no"
550: else
1.54 cvs 551: with_annot="yes"
1.47 cvs 552: fi
553: fi
554:
1.70 kahan 555: dnl
556: dnl Generic XML support enabled by default
557: dnl
558: if test "$with_generic_xml" = "" ; then
559: if test "$enable_generic_xml" = "no" ; then
560: with_generic_xml="no"
561: GENERIC_XML_OPTIONS=
562: else
563: with_generic_xml="yes"
564: GENERIC_XML_OPTIONS=-DXML_GENERIC
565: fi
566: fi
567:
568: dnl
1.73 ! kahan 569: dnl Annotation thread support enabled by default
1.70 kahan 570: dnl
571: if test "$with_annot_threads" = "" ; then
1.73 ! kahan 572: if test "$enable_annot_threads" = "no" ; then
! 573: with_annot_threads="no"
1.70 kahan 574: ANNOT_THREAD_OPTIONS=-DANNOT_ON_ANNOT
575: else
1.73 ! kahan 576: with_annot_threads="yes"
1.70 kahan 577: ANNOT_THREAD_OPTIONS=
578: fi
579: fi
580:
581: dnl
582: dnl I18N support disabled by default
583: dnl
584: if test "$with_i18n" = "" ; then
585: if test "$enable_i18n" = "yes" ; then
586: with_i18n="yes"
587: I18N_OPTIONS=-D_I18N_
588: else
589: with_i18n="no"
590: I18N_OPTIONS=""
591: fi
592: fi
1.22 cvs 593:
1.19 cvs 594: if test "$build_amaya" = "yes" ; then
1.43 cvs 595: if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50 cvs 596: AC_MSG_WARN(libwww sources not found !!)
597: AC_MSG_WARN(Disabling Amaya build !)
598: build_amaya="no"
1.1 cvs 599: fi
1.8 cvs 600:
601: if test ! -f $srcdir/amaya/MathML.S ; then
1.10 cvs 602: if test "$with_math" = "yes" ; then
1.8 cvs 603: AC_MSG_WARN(MathML sources not found !!)
1.26 cvs 604: AC_MSG_WARN(Disabling Math build !)
1.10 cvs 605: with_math="no"
606: MATH_OPTIONS=
1.8 cvs 607: fi
608: fi
1.26 cvs 609:
1.68 vatton 610: if test ! -f $srcdir/amaya/SVG.S ; then
611: if test "$with_svg" = "yes" ; then
612: AC_MSG_WARN(SVG sources not found !!)
613: AC_MSG_WARN(Disabling SVG build !)
614: with_svg="no"
615: SVG_OPTIONS=
1.26 cvs 616: fi
617: fi
618:
1.48 cvs 619: if test ! -f $srcdir/annotlib/Makefile.in ; then
1.47 cvs 620: if test "$with_annot" = "yes" ; then
621: AC_MSG_WARN(Annotation makefile not found !!)
622: AC_MSG_WARN(Disabling Annotations build !)
623: with_annot="no"
624: fi
625: fi
1.55 kahan 626:
1.70 kahan 627: if test "$with_annot" = "no" -a "$with_annot_threads" = "yes" ; then
628: AC_MSG_WARN(You must select the annotation support to have threads)
629: AC_MSG_WARN(Disabling annotation thread support)
630: with_annot_threads="no"
631: ANNOT_THREAD_OPTIONS=
632: fi
633:
1.55 kahan 634: if test "$with_plugin" = "yes" ; then
635: AC_MSG_WARN(The plugin library isn't supported anymore in Amaya !!)
636: AC_MSG_WARN(Disabling plugin build !)
637: with_plugin="no"
638: fi
639:
1.1 cvs 640: fi
641:
642: dnl
643: dnl The options for each library or binary
644: dnl
645:
1.70 kahan 646: THOT_OPTIONS="$GTK_OPTIONS $I18N_OPTIONS"
647: AMAYA_OPTIONS="$MATH_OPTIONS $SVG_OPTIONS $GTK_OPTIONS $GENERIC_XML_OPTIONS $I18N_OPTIONS $ANNOT_THREAD_OPTIONS"
1.58 cvs 648: #PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
1.70 kahan 649: AMAYA_ANNOT_OPTIONS="$ANNOT_THREAD_OPTIONS"
1.1 cvs 650: IMGLIBS="-ljpeg -lpng -lz"
1.3 cvs 651: EXTRA_LIBS=
1.1 cvs 652:
653: dnl
654: dnl Set up the PATHs needed
655: dnl
656:
657: API="\$(THOTDIR)/thotlib/include"
658: VAR="\$(THOTDIR)/thotlib/internals/var"
659: INCL="\$(THOTDIR)/thotlib/internals/h"
660: FUNC="\$(THOTDIR)/thotlib/internals/f"
1.58 cvs 661: if test "${LIBPNG}" = "../libpng.a" ; then
1.52 cvs 662: #there is a modified header file we need
1.1 cvs 663: PNGINCL="-I\$(THOTDIR)/libpng -I\$(THOTDIR)/libpng/zlib"
1.58 cvs 664: fi
665: if test "${LIBJPEG}" = "../libjpeg.a" ; then
666: #there is a modified header file we need
667: JPEGINCL="-I\$(THOTDIR)/libjpeg"
668: fi
1.1 cvs 669:
670: dnl
671: dnl Set up the include variables.
672: dnl
673:
1.61 cvs 674: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58 cvs 675: APIINCLUDES=-I${API}
676:
677: if test "${VPATHOPT}" = "" ; then
1.1 cvs 678: VPATHOPT="VPATH"
679: fi
680:
681: dnl
682: dnl Exports the current values of the variables.
683: dnl
684:
685: AC_SUBST(AMAYA_VER)
1.6 cvs 686: AC_SUBST(CEXTRACT_VER)
687: AC_SUBST(CEXTRACT_FLAGS)
1.1 cvs 688:
689: AC_SUBST(THOTINCLUDES)
690: AC_SUBST(APIINCLUDES)
691: AC_SUBST(VPATHOPT)
692:
1.63 vatton 693: AC_SUBST(GTK_OPTIONS)
1.1 cvs 694: AC_SUBST(THOT_OPTIONS)
695: AC_SUBST(AMAYA_OPTIONS)
696: AC_SUBST(PLUGIN_OPTIONS)
1.48 cvs 697: AC_SUBST(AMAYA_ANNOT_OPTIONS)
1.1 cvs 698: AC_SUBST(IMGLIBS)
1.3 cvs 699: AC_SUBST(EXTRA_LIBS)
1.1 cvs 700:
701: dnl
1.48 cvs 702: dnl Include the option Makefile.xxx fragment according to the configure options
1.1 cvs 703: dnl
704:
705: if test "$with_plugin" = "yes" ; then
1.50 cvs 706: AC_SUBST_FILE(plugin_frag)
1.1 cvs 707: plugin_frag=$srcdir/pluginlib/Makefile.plugin
708: else
709: AC_SUBST_FILE(plugin_frag)
710: plugin_frag=/dev/null
711: fi
712:
713: AC_SUBST_FILE(www_frag)
1.49 cvs 714: www_frag=$srcdir/amaya/Makefile.libwww
1.1 cvs 715:
1.50 cvs 716: if test "$with_math" = "no" ; then
1.10 cvs 717: AC_SUBST_FILE(math_frag)
1.50 cvs 718: math_frag=/dev/null
1.8 cvs 719: else
1.10 cvs 720: AC_SUBST_FILE(math_frag)
1.50 cvs 721: math_frag=$srcdir/amaya/Makefile.math
1.8 cvs 722: fi
723:
1.68 vatton 724: if test "$with_svg" = "no" ; then
725: AC_SUBST_FILE(svg_frag)
726: svg_frag=/dev/null
1.26 cvs 727: else
1.68 vatton 728: AC_SUBST_FILE(svg_frag)
729: svg_frag=$srcdir/amaya/Makefile.svg
1.26 cvs 730: fi
731:
1.47 cvs 732: if test "$with_annot" = "yes" ; then
733: AC_SUBST_FILE(annot_frag)
1.48 cvs 734: annot_frag=$srcdir/annotlib/Makefile.annot
1.47 cvs 735: else
736: AC_SUBST_FILE(annot_frag)
737: annot_frag=/dev/null
738: fi
739:
1.16 cvs 740:
1.1 cvs 741: dnl ***************************************************************
742: dnl
743: dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
744: dnl
745: dnl ***************************************************************
746:
747: EXTRA_MAKEFILE_IN=
1.2 cvs 748: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1 cvs 749: libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2 cvs 750: tools/mkdep/Makefile \
1.1 cvs 751: tools/cextract-1.7/Makefile thotlib/Makefile \
1.5 cvs 752: thotlib/include/Makefile batch/Makefile tablelib/Makefile"
1.1 cvs 753:
754: if test "$build_amaya" = "yes" ; then
1.2 cvs 755:
1.19 cvs 756: make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2 cvs 757: EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.27 cvs 758: $srcdir/amaya/Makefile.libwww"
759:
760: if test "$$with_plugin" = "yes" ; then
761: make_output="$make_output pluginlib/Makefile"
762: EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.2 cvs 763: $srcdir/pluginlib/Makefile.plugin"
1.27 cvs 764: fi
1.2 cvs 765:
1.48 cvs 766: if test "$with_annot" = "yes" ; then
767: make_output="$make_output annotlib/Makefile"
768: EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
769: fi
1.1 cvs 770: fi
771:
772: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6 cvs 773: AC_OUTPUT($make_output , [
774: dnl
775: dnl This fragment of shell code is executed after the
776: dnl Makefile(s) dump ...
777: dnl
778:
779: echo timestamp > stamp-h
780:
781: dnl
782: dnl Check for an upgrade in the Options numbers
783: dnl
784:
785: if test -f Options ; then
786: oldversion=`grep Version Options`
787: newversion=`grep Version Options.orig`
788: if test "$oldversion" != "$newversion" ; then
789: echo WARNING : Options files have changed, old options saved to Options.old
790: cp Options Options.old
791: cp Options.orig Options
792: exit 1
793: fi
794: fi
795: ])
1.1 cvs 796:
797: if test "$build_amaya" = "yes" ; then
1.50 cvs 798: echo Amaya configured with libWWW
799: if test "$with_plugin" = "yes" ; then
800: echo Amaya configured with Plugins support
1.8 cvs 801: fi
1.10 cvs 802: if test "$with_math" = "yes" ; then
803: echo Amaya configured with Math support
1.26 cvs 804: fi
1.68 vatton 805: if test "$with_svg" = "yes" ; then
806: echo Amaya configured with SVG support
1.47 cvs 807: fi
808: if test "$with_annot" = "yes" ; then
809: echo Amaya configured with Annotations support
1.70 kahan 810: fi
811: if test "$with_annot_threads" = "yes" ; then
812: echo Amaya configured with Annotation threads support
813: fi
814: if test "$with_generic_xml" = "yes" ; then
815: echo Amaya configured with generic XML suppport
816: fi
817: if test "$with_i18n" = "yes" ; then
818: echo Amaya configured with I18N suppport \(experimental\)
1.1 cvs 819: fi
1.5 cvs 820: fi
821:
822: if test "$no_motif" = yes ; then
1.67 vatton 823: echo "Amaya configured with GTK"
824: else
825: if test "$no_motif" = yes ; then
1.5 cvs 826: echo "Motif seems not installed on this machine"
1.61 cvs 827: echo "Amaya need Motif 1.2 or 2.0"
1.5 cvs 828: else
829: if test "$motif_includes" = "" ; then
830: echo "Motif includes were not found"
1.61 cvs 831: echo "Amaya might not compile"
1.5 cvs 832: echo "Edit your Option file"
833: else
834: if test "$motif_libraries" = "" ; then
835: echo "Motif libraries were not found"
1.61 cvs 836: echo "Amaya might not compile"
1.5 cvs 837: echo "Edit your Option file"
1.67 vatton 838: fi
1.5 cvs 839: fi
840: fi
1.1 cvs 841: fi
842:
1.69 kahan 843: echo "Now type \"make all\" (GNU make preferably) to build the binaries"
1.48 cvs 844:
845:
846:
1.5 cvs 847:
Webmaster