Annotation of Amaya/configure.in, revision 1.207
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:
1.114 kahan 13: AC_PREREQ(2.53)
1.1 cvs 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
1.122 gully 53: AC_PROG_CXX
1.1 cvs 54: AC_PROG_LEX
55: AC_PROG_AWK
56: AC_PROG_INSTALL
57: AC_PROG_LN_S
58: AC_PROG_MAKE_SET
59: AC_PROG_RANLIB
60: AC_PATH_PROG(CP, cp, /bin/cp, $PATH:/bin:/usr/bin:/usr/ucb/bin)
61: AC_PATH_PROG(MV, mv, /bin/mv, $PATH:/bin:/usr/bin:/usr/ucb/bin)
62: AC_PATH_PROG(RM, rm, /bin/rm, $PATH:/bin:/usr/bin:/usr/ucb/bin)
63: AC_PATH_PROG(MKDIR, mkdir, /bin/mkdir, $PATH:/bin:/usr/bin:/usr/ucb/bin)
64: AC_PATH_PROG(ECHO, echo, /bin/echo, $PATH:/bin:/usr/bin:/usr/ucb/bin)
65: AC_PATH_PROG(CAT, cat, /bin/cat, $PATH:/bin:/usr/bin:/usr/ucb/bin)
66: AC_PATH_PROG(CHMOD, chmod, /bin/chmod, $PATH:/bin:/usr/bin:/usr/ucb/bin)
67: AC_PATH_PROG(SED, sed, /bin/sed, $PATH:/bin:/usr/bin:/usr/ucb/bin)
68: AC_PATH_PROG(AR, ar, /usr/bin/ar, $PATH:/bin:/usr/bin:/usr/ucb/bin)
1.6 cvs 69: AC_PATH_PROG(DIFF, diff, /usr/bin/diff, $PATH:/bin:/usr/bin:/usr/ucb/bin)
1.1 cvs 70:
1.171 vatton 71:
1.1 cvs 72: dnl
73: dnl Checks for libraries.
74: dnl
75:
76: AC_CHECK_LIB(socket, socket, )
77: AC_CHECK_LIB(inet, connect)
78: AC_CHECK_LIB(nsl, t_accept)
79: AC_CHECK_LIB(dl, dlopen)
1.141 gully 80: #AC_PATH_X
81: #AC_PATH_XTRA
1.1 cvs 82:
1.41 cvs 83: dnl
1.5 cvs 84: dnl Checks for header files.
85: dnl
86:
87: AC_HEADER_DIRENT
88: AC_HEADER_STDC
89: AC_HEADER_SYS_WAIT
90:
91: AC_CHECK_HEADERS(stdio.h)
92: AC_CHECK_HEADERS(sys/types.h types.h)
93: AC_CHECK_HEADERS(sys/unistd.h unistd.h)
94: AC_CHECK_HEADERS(sys/fcntl.h fcntl.h)
95: AC_CHECK_HEADERS(sys/limits.h limits.h)
96: AC_CHECK_HEADERS(sys/stat.h stat.h)
97: AC_CHECK_HEADERS(sys/file.h)
98: AC_CHECK_HEADERS(sys/ioctl.h)
99: AC_CHECK_HEADERS(sys/time.h time.h)
100: AC_CHECK_HEADERS(sys/systeminfo.h)
1.46 cvs 101: AC_CHECK_HEADERS(sys/string.h strings.h)
1.34 cvs 102: AC_CHECK_HEADERS(sys/syslog.h syslog.h)
1.5 cvs 103: AC_CHECK_HEADERS(sys/socket.h socket.h)
1.131 gully 104:
105: # SG: not used ? => do not compile on macosx
106: # AC_CHECK_HEADERS(appkit/appkit.h appkit.h)
107: # AC_CHECK_HEADERS(apppkit/apppkit.h apppkit.h)
108:
1.5 cvs 109: AC_CHECK_HEADERS(netinet/in.h in.h)
110: AC_CHECK_HEADERS(dn.h)
111: AC_CHECK_HEADERS(sys/ipc.h)
112: AC_CHECK_HEADERS(net/errno.h sys/errno.h errno.h)
113: AC_CHECK_HEADERS(pwd.h)
114: AC_CHECK_HEADERS(grp.h)
115: AC_CHECK_HEADERS(arpa/inet.h inet.h)
116: AC_CHECK_HEADERS(netdb.h)
117: AC_CHECK_HEADERS(manifest.h)
118: AC_CHECK_HEADERS(bsdtypes.h)
119: AC_CHECK_HEADERS(stdefs.h)
120: AC_CHECK_HEADERS(bsdtime.h)
121: AC_CHECK_HEADERS(sys/select.h select.h)
122: AC_CHECK_HEADERS(dnetdb.h)
123: AC_CHECK_HEADERS(libc.h)
124: AC_CHECK_HEADERS(stdlib.h)
125: AC_CHECK_HEADERS(malloc.h)
126: AC_CHECK_HEADERS(memory.h)
127: AC_CHECK_HEADERS(unixlib.h)
128: AC_CHECK_HEADERS(ctype.h)
129: AC_CHECK_HEADERS(cursesX.h curses.h)
130: AC_CHECK_HEADERS(sys/resource.h resource.h)
131: AC_HEADER_DIRENT
132: AC_CHECK_HEADERS(dir.h direct.h) dnl AC_HEADER_DIRENT only checks for some..
133: AC_HEADER_STDC
134: AC_HEADER_SYS_WAIT
135: AC_HEADER_TIME
136: AC_HEADER_STAT
1.103 kahan 137: AC_CHECK_HEADERS(stdint.h)
1.5 cvs 138:
139: dnl
140: dnl Checks for typedefs, structures, and compiler characteristics.
141: dnl
142:
143: AC_C_CONST
144: AC_C_INLINE
145: AC_TYPE_MODE_T
146: AC_TYPE_OFF_T
147: AC_TYPE_SIZE_T
148: AC_HEADER_TIME
149: AC_STRUCT_TM
150: AC_STRUCT_TIMEZONE
151: AC_TYPE_UID_T
152:
153: dnl
154: dnl Checks for library functions.
155: dnl
156:
157: AC_FUNC_ALLOCA
158: AC_TYPE_GETGROUPS
159: AC_PROG_GCC_TRADITIONAL
160: AC_FUNC_MEMCMP
161: AC_FUNC_MMAP
162: AC_TYPE_SIGNAL
163: AC_FUNC_VPRINTF
1.58 cvs 164: 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 165:
1.132 gully 166: #
167: # Check for operating system (UNIX / WINDOWS / MACOSX )
168: # ---------->
1.178 gully 169: # canonicalize the target OS
170: AMAYAOS="LINUX"
1.132 gully 171: case $target_os in
1.178 gully 172: aix*) AMAYAOS="LINUX" ;;
173: cygwin*) AMAYAOS="WINDOWS" ;;
174: darwin*) AMAYAOS="MACOSX" ;;
175: freebsd2*) AMAYAOS="LINUX" ;;
176: freebsd*) AMAYAOS="LINUX" ;;
177: hpux*) AMAYAOS="LINUX" ;;
178: irix*) AMAYAOS="LINUX" ;;
179: linuxaout*) AMAYAOS="LINUX" ;;
180: linux*) AMAYAOS="LINUX" ;;
181: mingw32*) AMAYAOS="WINDOWS" ;;
182: netbsd*) AMAYAOS="LINUX" ;;
183: openbsd*) AMAYAOS="LINUX" ;;
184: osf[12]*) AMAYAOS="LINUX" ;;
185: osf*) AMAYAOS="LINUX" ;;
186: solaris2*) AMAYAOS="LINUX" ;;
187: sunos4*) AMAYAOS="LINUX" ;;
188: ultrix*) AMAYAOS="LINUX" ;;
189: esac
190: AC_SUBST(AMAYAOS)
191:
192: if test "$AMAYAOS" = "WINDOWS" ; then
193: AC_MSG_ERROR(Windows port do not use configure - not yet tested.)
194: fi
195:
196: OS_OPTIONS="-D_UNIX" # default is UNIX
197: case $AMAYAOS in
198: LINUX) OS_OPTIONS="-D_UNIX" ;;
199: WINDOWS) OS_OPTIONS="-D_WINDOWS" ;; # not tested (cygwin or mingw)
200: MACOSX) OS_OPTIONS="-D_UNIX -D_MACOS" ;;
1.132 gully 201: esac
202:
1.85 vatton 203: AC_ARG_WITH(GL, [ --with-gl enable Opengl canvas (experimental) ])
204: dnl
1.175 gully 205: dnl GL canvas is disabled by default in 8.7.x
206: dnl GL canvas is enabled by default in 9.x
207: dnl - 8.7.x needs : GL, GLX, GLU, freetype2, gtkgl
208: dnl - 9.x needs : GL, GLX, GLU, freetype2, wxGLCanvas
1.85 vatton 209: dnl GL is for opengl
1.175 gully 210: dnl GlX is for XWindow integration
1.85 vatton 211: dnl GLU is for tesselation algortihms (until we extract it from this lib)
212: dnl (tesselation is used for polygons with holes in it...)
213: dnl gtkgl is for integration of opengl in GTK
1.175 gully 214: dnl freetype2 is for text drawing (fonts ...)
215: dnl wxGLCanvas is for integration of opengl in wxWidgets (WX)
1.85 vatton 216: if test "$with_gl" = "" ; then
217: if test "$enable_gl" = "yes" ; then
218: with_gl="yes"
219: else
220: with_gl="no"
221: fi
1.197 vatton 222: fi
1.85 vatton 223:
1.120 gully 224: # check if gtk gui should be used
225: AC_ARG_WITH(gtk, [ --with-gtk use GTK GUI toolkit ])
226: if test "$with_gtk" = "yes" -o "$enable_gtk" = "yes" ; then
227: if test "$withval" = "no" ; then
228: with_gtk="no"
1.197 vatton 229: with_wx="yes"
1.120 gully 230: else
231: with_gtk="yes"
1.196 cvs 232: with_wx="no"
1.120 gully 233: fi
234: fi
235:
1.197 vatton 236: # check if wxWidgets gui should be used
237: AC_ARG_WITH(wx, [ --with-wx use wxWidgets GUI toolkit])
238: if test "$with_wx" = "yes" -o "$enable_wx" = "yes" ; then
239: if test "$withval" = "no" ; then
240: with_wx="no"
241: else
242: with_wx="yes"
243: with_gtk="no"
244: fi
245: fi
1.205 vatton 246: AC_ARG_ENABLE(system-wx, [ --enable-system-wx try the wxWidgets system library ])
1.197 vatton 247: if test "$with_gtk" = "" -o "$with_wx=" = "" ; then
248: # Nothing is enable so force the default GUI toolkit (WX)
249: with_gtk="no"
250: with_wx="yes"
251: fi
252:
1.143 gully 253: # check for mesa library (OpenGL)
1.205 vatton 254: AC_ARG_WITH(MESA, [ --with-mesa enable canvas with software OpenGL implementation (Mesa) ])
1.143 gully 255: if test "$with_mesa" = "" ; then
256: if test "$enable_mesa" = "yes" ; then
257: with_mesa="yes"
258: with_gl="no"
259: else
260: with_mesa="no"
261: fi
262: fi
263:
1.124 gully 264:
1.175 gully 265: # Check if at least one GUI toolkit is enabled
1.197 vatton 266: if test "$with_wx" = "no" ; then
267: if test "$with_gtk" = "no" ; then
268: # Nothing is enable so force the default GUI toolkit (WX)
269: with_wx="yes"
270: with_gtk="no"
1.85 vatton 271: fi
272: fi
273:
1.176 gully 274: # mesa (software) gl implementation is default with wx (hardware gl implem can be choosen with --with-gl option)
1.197 vatton 275: if test "$with_wx" = "yes" -o "$with_wx" = "" ; then
1.183 carcone 276: if test "$AMAYAOS" = "MACOSX" ; then
277: with_mesa="no"
278: with_gl="yes"
279: else
1.176 gully 280: if test "$with_gl" = "no" ; then
281: with_mesa="yes"
1.175 gully 282: fi
1.183 carcone 283: fi
1.175 gully 284: fi
285:
1.121 gully 286: # check if no gui is enable
1.175 gully 287: AC_ARG_WITH(nogui, [ --with-nogui do not use GUI toolkit (not maintained) ])
1.121 gully 288: if test "$with_nogui" = "yes" -o "$enable_nogui" = "yes" ; then
289: with_nogui="yes"
290: with_gtk="no"
1.134 gully 291: with_wx="no"
1.121 gully 292: NOGUI_OPTIONS="-D_NOGUI"
293: fi
294:
1.136 gully 295: # check if wxWidgets debug is enable
1.155 carcone 296: AC_ARG_WITH(wxdebug, [ --with-wxdebug compiles wxWidgets with debuging options ])
1.136 gully 297: if test "$with_wxdebug" = "yes" ; then
298: with_wxdebug="yes"
299: else
300: with_wxdebug="no"
301: fi
302:
1.153 gully 303: # it is possible to specify wxWidgets library path,
304: # usefull for developpers who want to compile amaya with different wxWidgets version
1.155 carcone 305: AC_ARG_WITH(wxsrcdir, [ --with-wxsrcdir=... compiles Amaya with a specific wxWidgets sources path ])
1.153 gully 306: if test "$with_wxsrcdir" = "" ; then
307: with_wxsrcdir="../../wxWidgets"
308: fi
309:
310:
1.134 gully 311: if test "$with_wx" = "yes" ; then
1.120 gully 312: if test "$with_gtk" = "yes" ; then
313: echo
314: echo "****************************************************************"
315: echo " ERROR: "
316: echo " More than one GUI toolkit is enable"
317: echo " Only one GUI toolkit should be enable (turn off one)"
318: echo " exemple ok : ../configure --with-gtk "
1.134 gully 319: echo " exemple !ok : ../configure --with-gtk --with-wx"
1.120 gully 320: echo "****************************************************************"
321: echo
322: exit 1
323: fi
324: fi
1.134 gully 325:
1.152 gully 326:
327: # setup the AMAYAGUI variable used to identify used GUI when 'make install' is called
328: # now several amaya gui can coexist.
329: if test "$with_gtk" = "yes" ; then
330: AMAYAGUI="gtk"
331: fi
332: if test "$with_gl" = "yes" ; then
333: AMAYAGUI="gl"
334: fi
335: if test "$with_wx" = "yes" ; then
336: AMAYAGUI="wx"
337: fi
338: AC_SUBST(AMAYAGUI)
339:
340:
1.85 vatton 341: if test "$with_gtk" = "yes" ; then
1.134 gully 342: gdkimlib_h_found="no"
1.63 vatton 343:
1.134 gully 344: # check that gtk-config exists
345: AC_CHECK_PROG(GTKCONFIG_FOUND,gtk-config,yes,no)
346: if test "$GTKCONFIG_FOUND" = no ; then
347: AC_MSG_ERROR(Cannot find gtk-config. Please install gtk development library.)
348: fi
349:
1.131 gully 350: GTK_INCLUDES="${GTK_INCLUDES} `gtk-config --cflags`"
1.124 gully 351: AC_SUBST(GTK_INCLUDES)
352: GTK_LIBRARIES="`gtk-config --libs`"
1.134 gully 353: # GL doesn't need the imlib
1.124 gully 354: if test "${with_gl}" != "yes" ; then
1.134 gully 355: GTK_LIBRARIES="${GTK_LIBRARIES} -lgdk_imlib"
356: else
357: gdkimlib_h_found="yes"
1.124 gully 358: fi
1.106 kahan 359:
1.124 gully 360: AC_SUBST(GTK_LIBRARIES)
361: GTK_OPTIONS="-D_GTK"
1.76 vatton 362: no_graphic=yes
1.134 gully 363:
1.150 gully 364: # SG : lookingfor gtkimlib includes
365: # because not found with gtk-config on macosx
366: gtk_path_for_gdkimlib_h="`gtk-config --prefix`"
367: for ac_dir in \
368: /sw/include/ \
369: /sw/local/include \
370: /usr/include \
371: /usr/local/include \
372: "$gtk_path_for_gdkimlib_h/include" \
373: "$gtk_path_for_gdkimlib_h/local/include" \
374: ; \
375: do
376: if test -r "$ac_dir/gdk_imlib.h"; then
377: echo "found gdk_imlib.h"
378: gdkimlib_h_found="yes"
379: GTK_INCLUDES="${GTK_INCLUDES} -I$ac_dir"
380: break
381: fi
382: done
383:
1.134 gully 384: if test "$gdkimlib_h_found" = "no" ; then
385: echo
386: echo "****************************************************************"
387: echo " ERROR: gdk_imlib.h not found -"
388: echo " [please install imlib developpement package (libimlib1-devel on mandrake)]"
389: echo "****************************************************************"
390: exit 1
391: fi
1.120 gully 392: fi
393:
1.143 gully 394:
395: if test "$with_mesa" = "yes" ; then
396: # --------- compile Mesa library (opengl) --------------- #
397:
398: # check that sources of Mesa exists
399: if test ! -f ../../Mesa/Makefile ; then
400: AC_MSG_ERROR(Mesa library sources not found (opengl). Please download Mesa sources (http://www.mesa3d.org/) or remove --with-gl option !)
401: fi
402:
403: OLDDIR=`pwd`
1.152 gully 404: GL_BUILDDIR="${OLDDIR}/Mesa"
1.143 gully 405:
1.163 gully 406: echo "---> Install Mesa library into ${GL_BUILDDIR}"
1.143 gully 407:
1.163 gully 408: mkdir -p ${GL_BUILDDIR}
409: cp -r ../../Mesa/* ${GL_BUILDDIR}
1.143 gully 410:
1.152 gully 411: echo "---> Install Mesa library into ${GL_BUILDDIR} - DONE"
1.143 gully 412:
413: # this is the flags used to build amaya with OpenGL
414: GL_OPTIONS="-D_GL"
1.152 gully 415: GL_INCLUDES="-I${GL_BUILDDIR}/include"
416: GL_LIBRARIES="-Wl,-rpath,${GL_BUILDDIR}/lib -L${GL_BUILDDIR}/lib -lGL -lGLU"
417: AC_SUBST(GL_BUILDDIR)
1.143 gully 418: AC_SUBST(GL_INCLUDES)
419: AC_SUBST(GL_LIBRARIES)
420: fi
421:
1.124 gully 422: if test "$with_wx" = "yes" ; then
1.205 vatton 423: if test "$enable_system_wx" = "yes"; then
424: AC_PATH_PROG(WXCONFIG, wx-config)
425: if test -z "$WXCONFIG"; then
426: enable_system_wx="no"
427: fi
1.135 gully 428: fi
1.205 vatton 429:
430: if test "$enable_system_wx" != "yes"; then
431: # WX_SRCDIR is better to understand the code than with_wxsrcdir variable
432: if test ! -f $with_wxsrcdir/Makefile.in ; then
433: $with_wxsrcdir = ../../wxWidgets
434: fi
435: cd $with_wxsrcdir
436: WX_SRCDIR=`pwd`
437: cd -
438: AC_SUBST(WX_SRCDIR)
439:
440: # check that sources of wxWidgets exists
441: if test ! -f $WX_SRCDIR/Makefile.in ; then
442: AC_MSG_ERROR(wxWidgets library sources not found. Please download wxWidgets sources (http://www.wxwidgets.org/), or remove --with-wx option, or check --with-wxsrcdir is correct !)
443: fi
1.135 gully 444:
1.152 gully 445: # --------- configure wxWidgets library --------------- #
1.135 gully 446: echo "---> Configuring wxWidgets library."
447: OLDDIR=`pwd`
1.149 gully 448: # create the build directory (debug or release)
449: if test $with_wxdebug = yes ; then
1.152 gully 450: WX_BUILDDIR="wxWidgets_DEBUG"
1.149 gully 451: else
1.152 gully 452: WX_BUILDDIR="wxWidgets_RELEASE"
1.149 gully 453: fi
1.205 vatton 454:
1.152 gully 455: mkdir -p $WX_BUILDDIR
456: cd $WX_BUILDDIR
457: AC_SUBST(WX_BUILDDIR)
1.136 gully 458:
1.149 gully 459: # remove old configure cached options
1.135 gully 460: rm -f configarg.cache
1.136 gully 461:
462: # setup configure options
1.158 gully 463:
464: # disable unused wx features
465: # --disable-htmlhelp
466: # --disable-html
467: # --disable-docview
468: # --disable-mdi
469: # --disable-mdidoc
470: # --disable-protocols
471: # --disable-ftp
472: # --disable-http
473: # --disable-sound
1.185 gully 474: # --disable-backtrace # to avoid the buggy popup when an assert occurs
475: WXCONFIGURE_TUNNING_OPTION="--disable-printarch --disable-htmlhelp --disable-html --disable-docview --disable-mdi --disable-mdidoc --disable-sound --disable-backtrace"
1.158 gully 476:
1.178 gully 477: if test "$AMAYAOS" = "LINUX" ; then
1.135 gully 478: # LINUX
1.145 gully 479: # --enable-gtk2 use GTK+ 2.0 if available (EXPERIMENTAL)
1.158 gully 480: # --disable-shared create only static library (.a)
1.145 gully 481: # --enable-unicode compile wxString with Unicode support
482: # --with-gtk use GTK+
483: # --with-opengl use OpenGL (or Mesa)
1.205 vatton 484: WXCONFIGURE_OPTION="--build=$build_alias --host=$host_alias --target=$target_alias --with-opengl --with-gtk --enable-gtk2 --enable-unicode --enable-ipc --disable-shared --with-libpng=builtin --with-libjpeg=builtin --with-libtiff=builtin $WXCONFIGURE_TUNNING_OPTION"
1.135 gully 485: fi
1.178 gully 486: if test "$AMAYAOS" = "MACOSX" ; then
1.135 gully 487: # MACOSX
1.170 carcone 488: WXCONFIGURE_OPTION="--with-opengl --disable-shared --enable-unicode --with-libpng=builtin --with-libjpeg=builtin"
1.136 gully 489: fi
490: if test $with_wxdebug = yes ; then
1.141 gully 491: WXCONFIGURE_OPTION="$WXCONFIGURE_OPTION --enable-debug"
1.143 gully 492: # SG: I've disabled other debug options because the lib has bugs when using these flags \
493: # (maybe because these flags are not often used by wxWidgets developpers)
1.141 gully 494: # WXCONFIGURE_OPTION="$WXCONFIGURE_OPTION --enable-debug --enable-debug_cntxt --enable-debug_gdb --enable-debug_info --enable-debug_flag --enable-mem_tracing"
1.145 gully 495: else
496: WXCONFIGURE_OPTION="$WXCONFIGURE_OPTION --enable-optimise"
1.135 gully 497: fi
1.143 gully 498:
1.136 gully 499: # launch the configure
1.143 gully 500: if test "$with_mesa" = "yes" ; then
501: # use internal OpenGL (mesa) libraries
1.165 gully 502: $WX_SRCDIR/configure CFLAGS="-I${GL_BUILDDIR}/include" CXXFLAGS="-I${GL_BUILDDIR}/include" CPPFLAGS="-I${GL_BUILDDIR}/include" $WXCONFIGURE_OPTION
1.158 gully 503: #../$WX_SRCDIR/configure CFLAGS="-I${GL_BUILDDIR}/include" CXXFLAGS="-I${GL_BUILDDIR}/include" CPPFLAGS="-I${GL_BUILDDIR}/include" OPENGL_LIBS="-lGL -lGLU" $WXCONFIGURE_OPTION
1.145 gully 504: if test $? != 0 ; then
505: AC_MSG_ERROR(A problem occurs durring wxWidgets library configuration. Please fix the problem and try again.)
506: fi
1.143 gully 507: else
508: # use OpenGL system libraries
1.165 gully 509: $WX_SRCDIR/configure $WXCONFIGURE_OPTION
1.143 gully 510: fi
1.152 gully 511: cd $OLDDIR
1.135 gully 512: echo "---> Configuring wxWidgets library. - DONE"
1.143 gully 513:
1.135 gully 514: # --------- configuring wxWidgets paths --------------- #
1.152 gully 515: WXCONFIG=$WX_BUILDDIR/wx-config
1.134 gully 516: # check that wx-config exists
1.135 gully 517: if test ! -f $WXCONFIG ; then
1.143 gully 518: AC_MSG_ERROR(Cannot find wx-config. Please download wxWidgets (http://www.wxwidgets.org/))
1.134 gully 519: fi
1.144 gully 520:
521: # setup include paths
1.165 gully 522: # "-I$WX_SRCDIR/src/png -I$WX_SRCDIR/src/jpeg -I$WX_SRCDIR/src/tiff" is a temporary patch to fix incorrect generated paths by wx-config --cxxflags (remove it when wxWidgets will be fixed)
1.205 vatton 523: WX_INCLUDES="-I$WX_SRCDIR/src/png -I$WX_SRCDIR/src/jpeg -I$WX_SRCDIR/src/tiff"
524:
525: BUILDWXWIDGETS="wxwidgets"
526: AC_SUBST(BUILDWXWIDGETS)
527:
528: fi
529:
530: WX_INCLUDES="$WX_INCLUDES `$WXCONFIG --cxxflags`"
531:
1.124 gully 532: AC_SUBST(WX_INCLUDES)
533:
1.144 gully 534: # setup libraries paths
535: WX_LIBRARIES=""
536: WX_LIBRARIES_EXTRA_PARAM=""
1.157 gully 537: WXCONFIG_LIBS_PARAM="xrc,adv,core,xml,net"
1.132 gully 538: # GL is used ?
1.143 gully 539: if test "$with_gl" = "yes" -o "$with_mesa" = "yes" ; then
1.144 gully 540: WXCONFIG_LIBS_PARAM="${WXCONFIG_LIBS_PARAM},gl"
1.132 gully 541: # SG: this is a mistery why wx-config doesn't add these needed option on macosx
1.178 gully 542: if test "$AMAYAOS" = "MACOSX" ; then
1.144 gully 543: WX_LIBRARIES_EXTRA_PARAM="-framework OpenGL -framework AGL"
1.132 gully 544: fi
1.124 gully 545: fi
1.187 gully 546: if test "$AMAYAOS" = "MACOSX" ; then
1.170 carcone 547: WXCONFIG_LIBS_PARAM="${WXCONFIG_LIBS_PARAM},html"
548: fi
549:
1.152 gully 550: WX_LIBRARIES="`$WXCONFIG --libs $WXCONFIG_LIBS_PARAM` ${WX_LIBRARIES_EXTRA_PARAM}"
1.144 gully 551: AC_SUBST(WX_LIBRARIES)
1.161 gully 552:
553: WX_LINKDEPS="`$WXCONFIG --linkdeps`"
554: AC_SUBST(WX_LINKDEPS)
1.124 gully 555:
556: WX_OPTIONS="-D_WX"
1.135 gully 557: # --------- configuring wxWidgets paths - DONE --------------- #
1.132 gully 558:
559: no_graphic=yes
1.124 gully 560: fi
561:
1.63 vatton 562: if test "${GCC}" = "yes"; then
563: CPP="${CPP} -x c"
564: fi
565:
1.1 cvs 566: dnl ***************************************************************
567: dnl
1.61 cvs 568: dnl SPECIFIC STUFF : CONFIGURATION OPTIONS FOR AMAYA
1.1 cvs 569: dnl
570: dnl ***************************************************************
571:
1.158 gully 572: # Do not care with libpng or libjpeg with wx version because we use the wxwidgets one.
573: if test "$with_wx" = "no" ; then
574: # We don't use our graphic libraries for the pure GTK version (without GL)
575:
576: # if configure has option --with-graphiclibs then dont check for system graphic libs
577: # force amaya static graphic libs to be used
578: AC_ARG_WITH(graphiclibs, [ --with-graphiclibs use static libjpeg, libpng.])
579: if test "$with_graphiclibs" = "yes" -o "$enable_graphiclibs" = "yes" ; then
580: no_graphic="no"
581: else
582: no_graphic="yes"
583: fi
1.132 gully 584:
1.158 gully 585: if test "$no_graphic" = yes; then
586: dnl
587: AC_MSG_CHECKING([for libjpeg version = 6b])
588: AC_EGREP_CPP([x 62 *x],
589: [#include <jpeglib.h>
590: x JPEG_LIB_VERSION x],
591: dnl
592: AC_MSG_RESULT([yes])
593: JPEGINCL=''
1.76 vatton 594: LIBJPEG='-ljpeg'
595: MAKEJPEG=['#'],
1.158 gully 596: dnl
1.76 vatton 597: AC_MSG_RESULT([no])
1.158 gully 598: JPEGINCL='-I$(THOTDIR)/libjpeg'
1.76 vatton 599: LIBJPEG='../libjpeg.a' dnl LIBJPEG goes into amaya/Makefile.in
600: )
1.158 gully 601: dnl
602: dnl
1.95 vatton 603: AC_MSG_CHECKING([for libpng version = 1.0.x or 1.2.x])
604: AC_EGREP_CPP([x \"1.[02]\..*\" *x],
1.76 vatton 605: [#include <png.h>
606: x PNG_LIBPNG_VER_STRING x],
1.158 gully 607: dnl
608: AC_MSG_RESULT([yes])
609: PNGINCL=''
1.76 vatton 610: LIBPNG='-lpng'
611: LIBZ=''
612: MAKEPNG=['#'],
613: dnl
1.158 gully 614: AC_MSG_RESULT([no])
615: PNGINCL='-I$(THOTDIR)/libpng -I$(THOTDIR)/libpng/zlib'
1.76 vatton 616: LIBPNG='../libpng.a'
617: LIBZ='../libz.a'
618: )
1.158 gully 619: else
1.105 vatton 620: JPEGINCL='-I$(THOTDIR)/libjpeg'
1.76 vatton 621: LIBJPEG='../libjpeg.a'
1.105 vatton 622: PNGINCL='-I$(THOTDIR)/libpng -I$(THOTDIR)/libpng/zlib'
1.76 vatton 623: LIBPNG='../libpng.a'
624: LIBZ='../libz.a'
1.158 gully 625: fi
626: dnl
627: AC_SUBST(LIBJPEG)
628: AC_SUBST(LIBPNG)
629: AC_SUBST(LIBZ)
630: AC_SUBST(MAKEJPEG)
631: AC_SUBST(MAKEPNG)
632: fi # with_wx = no
1.76 vatton 633:
1.166 gully 634: # the wx version
635: AMAYAWX_MAJVER=9
1.205 vatton 636: AMAYAWX_MINVER=52
1.201 vatton 637: AMAYAWX_SUBVER=0
1.166 gully 638:
639: #the old version (to remove when switching on wx)
640: AMAYA_MAJVER=8
1.205 vatton 641: AMAYA_MINVER=52
642: AMAYA_SUBVER=0
1.166 gully 643:
1.164 gully 644: if test "$with_wx" = "yes" ; then
1.166 gully 645: APP_MAJVER=$AMAYAWX_MAJVER
646: APP_MINVER=$AMAYAWX_MINVER
647: APP_SUBVER=$AMAYAWX_SUBVER
648: else
649: APP_MAJVER=$AMAYA_MAJVER
650: APP_MINVER=$AMAYA_MINVER
651: APP_SUBVER=$AMAYA_SUBVER
652: fi
1.168 gully 653:
654: if test $APP_SUBVER = 0 ; then
655: APP_VER=$APP_MAJVER.$APP_MINVER
656: else
657: APP_VER=$APP_MAJVER.$APP_MINVER.$APP_SUBVER
658: fi
1.166 gully 659:
660: # generate a header file with the right version number, so it can be used on windows AND on unix
661: APPVERSION_H=../thotlib/internals/h/appversion.h
662: echo "#ifndef __APPVERSION_H__" > $APPVERSION_H
663: echo "#define __APPVERSION_H__" >> $APPVERSION_H
664: echo "#ifdef _WX" >> $APPVERSION_H
665: echo "#define APP_MAJVER $AMAYAWX_MAJVER" >> $APPVERSION_H
666: echo "#define APP_MINVER $AMAYAWX_MINVER" >> $APPVERSION_H
667: echo "#define APP_SUBVER $AMAYAWX_SUBVER" >> $APPVERSION_H
668: echo "#else /* _WX */" >> $APPVERSION_H
669: echo "#define APP_MAJVER $AMAYA_MAJVER" >> $APPVERSION_H
670: echo "#define APP_MINVER $AMAYA_MINVER" >> $APPVERSION_H
671: echo "#define APP_SUBVER $AMAYA_SUBVER" >> $APPVERSION_H
672: echo "#endif /* _WX */" >> $APPVERSION_H
673: echo "#endif /* __APPVERSION_H__ */" >> $APPVERSION_H
1.1 cvs 674:
675: dnl
1.6 cvs 676: dnl We use a special versoin of cextract patched for alignment
677: dnl to build the signatures of the modules functions located in f subdirs
678: dnl
679: CEXTRACT_VER="1.7"
680: CEXTRACT_FLAGS="+O"
681:
1.178 gully 682: # Check if debug is enable
683: AC_ARG_WITH(debug, [ --with-debug compiles Amaya with debuging options (-g) ])
684: if test "$with_debug" = "yes" ; then
685: with_debug="yes"
686: CFLAGS="-g"
687: CXXFLAGS="-g"
688: else
689: with_debug="no"
690: CFLAGS="-O2"
691: CXXFLAGS="-O2"
692: fi
1.7 cvs 693:
694: if test "${CC}" = "gcc" ; then
1.180 gully 695: CFLAGS="${CFLAGS} -Wall"
1.7 cvs 696: case "${host}" in
697: *-*-irix5* | *-*irix6* )
698: CFLAGS="${CFLAGS} -fsigned-char"
699: ;;
700: esac
1.14 cvs 701: fi
702:
703: if test "$ac_cv_c_const" = "no" ; then
704: CFLAGS="${CFLAGS} -DCONST= "
1.7 cvs 705: fi
706:
1.122 gully 707:
708: # force C mode (-x c)
1.123 gully 709: CFLAGS="${CFLAGS} -x c"
1.122 gully 710:
711: # C++ options (-x c++)
712: CXX_OPTIONS="-D__cplusplus"
1.180 gully 713: CXXFLAGS="${CXXFLAGS} -Wall -x c++ ${CXX_OPTIONS}"
1.122 gully 714:
1.132 gully 715: # setup LDFLAGS
716: # on macosx, specific flags must be set to avoid conflicts with allready installed libwww
717: # for exemple it's possible to install libwww with fink (fink install libwww)
718: # to avoid conflicts, we just force the linker to search for specified amaya path first
1.178 gully 719: if test "$AMAYAOS" = "MACOSX" ; then
1.132 gully 720: LDFLAGS="-Wl,-search_paths_first"
721: else
722: LDFLAGS=""
723: fi
1.128 gully 724:
725: dnl
1.61 cvs 726: dnl Check for availability of amaya sources
1.1 cvs 727: dnl
728:
729: build_amaya="yes"
730:
731: if test "$with_amaya" = "no" ; then
732: build_amaya="no"
1.45 cvs 733: else
734: if test ! -f $srcdir/amaya/Makefile.in ; then
1.1 cvs 735: AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
736: build_amaya="no"
1.45 cvs 737: fi
1.1 cvs 738: fi
739:
740: dnl
1.50 cvs 741: dnl Check for additionnal packages
1.1 cvs 742: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
743: dnl
1.93 kahan 744:
1.143 gully 745: if test "$with_gl" = "yes" -o "$with_mesa" = "yes" ; then
746:
747: # if with_gl is on then test system opengl library (GL & GLU)
748: if test "$with_gl" = "yes" ; then
1.184 carcone 749: if test "$AMAYAOS" = "LINUX" ; then
1.139 carcone 750: # setup a list of standard paths int LDFLAGS
751: # for AC_CHECK_LIB library existance checks
1.140 carcone 752: LIBS_OLD=$LIBS
1.139 carcone 753: LDFLAGS_OLD=$LDFLAGS
754: LDFLAGS="-L/usr/X11R6/lib -L/usr/lib -L/usr/local/lib"
1.75 cheyroul 755: AC_MSG_CHECKING([OpenGL])
756: for ac_dir in \
1.183 carcone 757: /usr/include \
1.75 cheyroul 758: /usr/X11R6/include \
759: /usr/local/include \
760: ; \
1.80 cheyroul 761: do if test -r "$ac_dir/GL/gl.h" ; then
1.143 gully 762: gl_inc="yes"
763: GL_INC_I="$ac_dir"
764: if test "$ac_dir" != "/usr/include" ; then
765: GL_INCLUDES="-I$ac_dir"
766: fi
767: AC_CHECK_LIB(GL,glBegin,,AC_MSG_ERROR(Cannot find OpenGL library. Please install OpenGL.))
768: AC_MSG_RESULT([yes])
769: break
770: fi
771: done
772:
1.80 cheyroul 773: AC_MSG_CHECKING([GLU])
1.75 cheyroul 774: for ac_dir in \
1.183 carcone 775: /usr/include \
776: /usr/X11R6/include \
1.75 cheyroul 777: /usr/local/include \
778: ; \
1.138 gully 779: do if test -r "$ac_dir/GL/glu.h" ; then
1.143 gully 780: glu_inc="yes"
781: GL_INC_II="$ac_dir"
782: if test "$ac_dir" != "/usr/include" ; then
783: if test "$ac_dir" != "$GL_INC_I" ; then
784: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
785: fi
786: fi
787: # now test that glu version is >= 1.2
788: AC_CHECK_LIB(GLU,gluNewTess,,AC_CHECK_LIB(glu32,gluNewTess,,AC_MSG_ERROR(Cannot find OpenGL GLU lib or existing version is < 1.2. Pease upgrade your GLU library.)))
789: AC_MSG_RESULT([yes])
790: break
791: fi
792: done
1.139 carcone 793: LDFLAGS=$LDFLAGS_OLD
1.140 carcone 794: LIBS=$LIBS_OLD
1.174 carcone 795:
1.143 gully 796: if test "$gl_inc" = "" ; then
797: AC_MSG_WARN(Opengl headers (gl.h) not found !!)
798: AC_MSG_WARN(Disabling opengl build !)
799: with_gl="no"
800: GL_OPTIONS=
801: GL_INCLUDES=
802: GL_LIBRARIES=
803: exit 1;
804: fi
805:
806: if test "$glu_inc" = "" ; then
807: AC_MSG_WARN(Glu headers (glu.h) not found !!)
808: AC_MSG_WARN(Disabling opengl build !)
809:
810: with_gl="no"
811: GL_OPTIONS=
812: GL_INCLUDES=
813: GL_LIBRARIES=
814: exit 1;
815: fi
1.184 carcone 816: fi # AMAYAOS = LINUX
1.174 carcone 817:
1.187 gully 818: if test "$AMAYAOS" = "MACOSX" ; then
1.174 carcone 819: GL_OPTIONS="-D_GL"
1.183 carcone 820: GL_INCLUDES="-I/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/"
1.174 carcone 821: GL_LIBRARIES=""
1.183 carcone 822: GL_BUILDDIR=""
1.174 carcone 823: else
824: GL_LIBRARIES="-L/usr/lib -L/usr/X11R6/lib -lGL -lGLU"
825: GL_OPTIONS="-D_GL"
1.173 carcone 826: fi
1.143 gully 827:
828: AC_SUBST(GL_INCLUDES)
829: AC_SUBST(GL_LIBRARIES)
830: fi # if with_gl
1.139 carcone 831:
1.187 gully 832: # ---------- Check for gtkglarea.h only if gtk gui is selected
1.143 gully 833: if test "$with_gtk" = "yes" ; then
834: AC_MSG_CHECKING([GTKGLAREA])
835: for ac_dir in \
1.132 gully 836: /usr/include/GL \
1.75 cheyroul 837: /usr/include \
838: /usr/X11R6/include/GL \
839: /usr/X11R6/include \
840: /usr/local/include \
841: /usr/local/include/GL \
842: ; \
1.143 gully 843: do if test -r "$ac_dir/gtkgl/gtkglarea.h" ; then
844: gtkgl_inc="yes"
845: if test "$ac_dir" != "/usr/include" ; then
846: if test "$ac_dir" != "$GL_INC_II" ; then
847: if test "$ac_dir" != "$GL_INC_I" ; then
848: GTK_GL_INCLUDES="-I$ac_dir"
849: fi
850: fi
851: fi
852: AC_MSG_RESULT([yes])
853: break
854: fi
855: done
856: GTK_GL_LIBRARIES="-lgtkgl"
857:
858: if test "$gtkgl_inc" = "" ; then
859: AC_MSG_WARN(Gtkglarea headers (gktglarea.h) not found !!)
860: AC_MSG_WARN(Disabling opengl build !)
861: with_gl="no"
862: exit 1;
863: fi
864: AC_SUBST(GTK_GL_INCLUDES)
865: AC_SUBST(GTK_GL_LIBRARIES)
1.187 gully 866: fi # "$with_gtk" = "yes"
1.132 gully 867:
1.187 gully 868: # ---------- Checking for freetype lib (fonts library)
869: if test "$AMAYAOS" = "MACOSX" ; then
1.173 carcone 870: # we use a static version of freetype lib for mac osx
1.187 gully 871: # ** search for includes (freetype.h)
872: for ac_dir in \
873: /Developer/SDKs/MacOSX10.1.5.sdk/usr/X11R6/include/ \
874: /Developer/SDKs/MacOSX10.1.5.sdk/usr/X11R6/include/freetype2/ \
875: /Developer/SDKs/MacOSX10.2.8.sdk/usr/X11R6/include/ \
876: /Developer/SDKs/MacOSX10.2.8.sdk/usr/X11R6/include/freetype2/ \
877: /Developer/SDKs/MacOSX10.3.0.sdk/usr/X11R6/include/ \
878: /Developer/SDKs/MacOSX10.3.0.sdk/usr/X11R6/include/freetype2/ \
1.207 ! vatton 879: /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/ \
! 880: /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/freetype2/ \
1.187 gully 881: /Developer/SDKs/MacOSX10.3.9.sdk/usr/X11R6/include/ \
882: /Developer/SDKs/MacOSX10.3.9.sdk/usr/X11R6/include/freetype2/ \
883: /Developer/SDKs/MacOSX10.4.0.sdk/usr/X11R6/include/ \
1.207 ! vatton 884: /Developer/SDKs/MacOSX10.4.0.sdk/usr/X11R6/include/freetype2/ \
1.190 carcone 885: /opt/local/include/ \
886: /opt/local/include/freetype2/ \
887: /usr/X11R6/include/freetype2/freetype/ \
888: ; \
1.187 gully 889: do
890: if test -r "$ac_dir/ft2build.h"; then
891: FREETYPE_INCLUDES="${FREETYPE_INCLUDES} -I$ac_dir"
1.191 carcone 892: fi
893: if test -r "$ac_dir/freetype/config/ftheader.h"; then
894: FREETYPE_INCLUDES="${FREETYPE_INCLUDES} -I$ac_dir"
1.187 gully 895: fi
896: done
897: # ** search for binary (libfreetype.a)
898: for ac_dir in \
899: /Developer/SDKs/MacOSX10.1.5.sdk/usr/X11R6/lib/ \
900: /Developer/SDKs/MacOSX10.2.8.sdk/usr/X11R6/lib/ \
901: /Developer/SDKs/MacOSX10.3.0.sdk/usr/X11R6/lib/ \
1.207 ! vatton 902: /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/ \
1.187 gully 903: /Developer/SDKs/MacOSX10.3.9.sdk/usr/X11R6/lib/ \
904: /Developer/SDKs/MacOSX10.4.0.sdk/usr/X11R6/lib/ \
1.190 carcone 905: /opt/local/lib/ \
906: /usr/X11R6/lib/ \
1.187 gully 907: ; \
908: do
909: if test -r "$ac_dir/libfreetype.a"; then
1.192 carcone 910: FREETYPE_LIBRARIES="$ac_dir/libfreetype.a"
1.187 gully 911: break
912: fi
913: done
914: else # "$AMAYAOS" = "MACOSX"
1.173 carcone 915: if test ! -f $(which freetype-config) ; then
916: AC_MSG_ERROR(Cannot find freetype library (font load/display routines). Please install it.)
917: fi
918: FREETYPE_INCLUDES=`freetype-config --cflags`
919: FREETYPE_LIBRARIES=`freetype-config --libs`
1.187 gully 920: fi # "$AMAYAOS" = "MACOSX"
921: AC_SUBST(FREETYPE_INCLUDES)
922: AC_SUBST(FREETYPE_LIBRARIES)
923:
924:
1.143 gully 925:
1.187 gully 926: # ----------- START CHECKING XFT
927: # checking for Xft which is only used on GTK version (not wxWidgets)
928: if test "$with_gtk" = "yes" ; then
1.143 gully 929:
930: # checking for xft lib
931: # (not used because xft-config doesn't exist on debian stable)
932: #if test ! -f $(which xft-config) ; then
933: # AC_MSG_ERROR(Cannot find Xft library. Please install it.)
934: #fi
935: #XFT_INCLUDES=`xft-config --cflags`
936: #XFT_LIBRARIES=`xft-config --libs`
937: #AC_SUBST(XFT_INCLUDES)
938: #AC_SUBST(XFT_LIBRARIES)
939:
940: AC_MSG_CHECKING([Xft])
941: for ac_dir in \
1.104 cheyroul 942: /usr/include \
943: /usr/X11R6/include \
944: /usr/local/include \
945: /usr/include/X11/Xft \
946: /usr/X11R6/include/X11/Xft \
947: /usr/local/include/X11/Xft \
948: /usr/include/X11/Xft1 \
949: /usr/X11R6/include/X11/Xft1 \
1.113 vatton 950: /usr/include/Xft2/X11/Xft/ \
1.104 cheyroul 951: /usr/local/include/X11/Xft1 \
952: /usr/include/X11/Xft2 \
953: /usr/X11R6/include/X11/Xft2 \
954: /usr/local/include/X11/Xft2 \
955: ; \
1.143 gully 956: do if test -r "$ac_dir/Xft.h" ; then
957: xft_inc="yes"
958: XFT_INCLUDES="-I$ac_dir"
959: AC_MSG_RESULT([yes])
960: break
961: fi
962: done
963: if test "$xft_inc" = "" ; then
964: AC_MSG_WARN(Xft 2 headers (Xft.h) not found !!)
965: AC_MSG_WARN(Disabling opengl build !)
966: with_gl="no"
967: exit 1;
968: fi
969:
970: AC_MSG_CHECKING([Xft-library])
1.155 carcone 971:
1.143 gully 972: for ac_dir in \
973: /usr/lib \
974: /usr/X11R6/lib \
975: /usr/local/lib \
976: ; \
977: do if test -r "$ac_dir/libXft.so" ; then
978: xft_lib="yes"
979: XFT_LIBRARIES="-L$ac_dir -lXft"
980: AC_MSG_RESULT([yes])
981: break
982: fi
983: done
984: if test "$xft_lib" = "" ; then
985: AC_MSG_WARN(Xft 2 librarie (libXft.so) not found !!)
986: AC_MSG_WARN(Disabling opengl build !)
987: with_gl="no"
988: exit 1;
989: fi
1.155 carcone 990:
1.143 gully 991: AC_SUBST(XFT_INCLUDES)
992: AC_SUBST(XFT_LIBRARIES)
993: # END CHECKING XFT #
1.187 gully 994: fi # "$with_gtk" = "yes"
1.143 gully 995:
996:
997: AC_MSG_CHECKING([gcc3])
998: for ac_dir in \
1.96 cheyroul 999: /usr/lib \
1000: /usr/X11R6/lib \
1001: /usr/local/lib \
1002: ; \
1.143 gully 1003: do if test -r "$ac_dir/libstdc++.so.5" ; then
1004: stdglu_inc="yes"
1005: STDCPP_LIBRARIES="-lstdc++"
1006: STDCPP_INCLUDES=""
1007: AC_MSG_RESULT([yes])
1008: break
1009: fi
1010: done
1.159 gully 1011:
1012: # not used in makefiles
1013: # AC_SUBST(STDCPP_INCLUDES)
1014: # AC_SUBST(STDCPP_LIBRARIES)
1.143 gully 1015:
1016: NOPRINT=""
1017: PRINTIFNOTGL=" print_prog"
1018:
1019: else # if with_gl or with_mesa
1020:
1021: NOPRINT=""
1022: PRINTIFNOTGL=" print_prog"
1.132 gully 1023:
1.143 gully 1024: fi # if with_gl or with_mesa
1.132 gully 1025:
1.97 cheyroul 1026: AC_SUBST(PRINTIFNOTGL)
1.112 cheyroul 1027: AC_SUBST(NOPRINT)
1028:
1.76 vatton 1029:
1030: AC_ARG_ENABLE(svg, [ --disable-svg remove SVG support ])
1031: AC_ARG_ENABLE(annot, [ --disable-annot remove Annotations support ])
1.146 kahan 1032: AC_ARG_ENABLE(redland, [ --disable-redland disable the redland RDF library ])
1.116 kahan 1033: AC_ARG_ENABLE(system-redland, [ --enable-system-redland try the redland RDF system library ])
1.108 kahan 1034: AC_ARG_ENABLE(bookmarks, [ --enable-bookmarks enables experimental bookmark support ])
1.194 vatton 1035: AC_ARG_ENABLE(templates, [ --disable-templates disables experimental templates support ])
1.76 vatton 1036: AC_ARG_ENABLE(generic-xml, [ --disable-generic-xml remove Generic XML support ])
1037:
1.75 cheyroul 1038: dnl
1.21 cvs 1039: dnl plugins support is disabled by default
1.8 cvs 1040: dnl
1.13 cvs 1041:
1042: if test "$with_plugin" = "" ; then
1.21 cvs 1043: if test "$enable_plugin" = "yes" ; then
1.55 kahan 1044: with_plugin="yes"
1.21 cvs 1045: else
1.17 cvs 1046: with_plugin="no"
1047: fi
1.10 cvs 1048: fi
1.1 cvs 1049:
1.8 cvs 1050: dnl
1.68 vatton 1051: dnl svg is enabled by default
1.26 cvs 1052: dnl
1.68 vatton 1053: if test "$with_svg" = "" ; then
1054: if test "$enable_svg" = "no" ; then
1055: with_svg="no"
1.49 cvs 1056: else
1.68 vatton 1057: with_svg="yes"
1.26 cvs 1058: fi
1059: fi
1060:
1061: dnl
1.56 kahan 1062: dnl annotations is enabled by default
1.47 cvs 1063: dnl
1064: if test "$with_annot" = "" ; then
1.56 kahan 1065: if test "$enable_annot" = "no" ; then
1066: with_annot="no"
1067: else
1.54 cvs 1068: with_annot="yes"
1.47 cvs 1069: fi
1.99 kahan 1070: else
1071: with_annot="yes"
1.47 cvs 1072: fi
1073:
1.93 kahan 1074:
1075: dnl
1.146 kahan 1076: dnl The redland library is enabled by default
1.93 kahan 1077: dnl
1.146 kahan 1078: if test "$with_redland" = "" ; then
1079: if test "$enable_redland" = "no" ; then
1080: with_redland="no"
1.93 kahan 1081: else
1.109 kahan 1082: with_redland="yes"
1083: fi
1084: else
1.146 kahan 1085: with_redland="yes"
1.109 kahan 1086: fi
1087:
1088: dnl
1.116 kahan 1089: dnl The redland library is disabled by default
1090: dnl
1091: if test "$with_system_redland" = "" ; then
1092: if test "$enable_system_redland" = "yes" ; then
1093: with_redland="yes"
1094: with_system_redland="yes"
1095: else
1096: with_system_redland="no"
1097: fi
1098: else
1099: with_system_redland="no"
1100: fi
1101:
1102: dnl
1103: dnl The bookmarks support is disabled by default
1.108 kahan 1104: dnl
1105: if test "$with_bookmarks" = "" ; then
1106: if test "$enable_bookmarks" = "yes" ; then
1107: with_bookmarks="yes"
1.125 vatton 1108: with_redland="yes"
1.108 kahan 1109: else
1110: with_bookmarks="no"
1111: fi
1112: else
1113: with_bookmarks="no"
1114: fi
1115:
1116: dnl
1.194 vatton 1117: dnl The templates support is enabled by default
1.186 tollenae 1118: dnl
1.198 vatton 1119: if test "$with_templates" = "no " -o "$enable_templates" = "no"; then
1120: with_templates="no"
1121: else
1.194 vatton 1122: if test "$with_wx" = "no"; then
1.186 tollenae 1123: AC_MSG_WARN(Templates are only available in WX version !!)
1124: AC_MSG_WARN(Disabling templates)
1125: with_templates="no"
1.197 vatton 1126: else
1127: with_templates="yes"
1.186 tollenae 1128: fi
1.197 vatton 1129: fi
1130:
1.198 vatton 1131: if test "$with_templates" = "yes" -o "$with_templates" = "" ; then
1.194 vatton 1132: TEMPLATES_OPTIONS="-DTEMPLATES"
1.186 tollenae 1133: else
1.194 vatton 1134: TEMPLATES_OPTIONS=""
1.186 tollenae 1135: fi
1136:
1.194 vatton 1137:
1.186 tollenae 1138: dnl
1.70 kahan 1139: dnl Generic XML support enabled by default
1140: dnl
1141: if test "$with_generic_xml" = "" ; then
1142: if test "$enable_generic_xml" = "no" ; then
1.194 vatton 1143: with_generic_xml="no"
1144: GENERIC_XML_OPTIONS=
1.70 kahan 1145: else
1.194 vatton 1146: with_generic_xml="yes"
1147: GENERIC_XML_OPTIONS=-DXML_GENERIC
1.70 kahan 1148: fi
1149: fi
1150:
1.88 kirschpi 1151: dnl
1.181 gully 1152: dnl WebDAV support enabled by default
1.88 kirschpi 1153: dnl
1.181 gully 1154: AC_ARG_WITH(dav, [ --with-dav enable WebDAV support (experimental) ])
1.88 kirschpi 1155: if test "$with_dav" = "" ; then
1.181 gully 1156: with_dav="yes"
1157: fi
1.88 kirschpi 1158: if test "$with_dav" = "yes" ; then
1159: DAV_OPTIONS=-DDAV
1.90 kirschpi 1160: DAVDIR="davlib"
1161: LIBDAV="libwwwdav"
1162: WITHDAV="--with-dav"
1163: WWWDAV="-lwwwdav"
1.88 kirschpi 1164: else
1165: with_dav="no"
1166: DAV_OPTIONS=""
1.90 kirschpi 1167: DAVDIR=""
1168: LIBDAV=""
1169: WITHDAV=""
1170: WWWDAV=""
1.88 kirschpi 1171: fi
1172:
1.70 kahan 1173:
1.19 cvs 1174: if test "$build_amaya" = "yes" ; then
1.43 cvs 1175: if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50 cvs 1176: AC_MSG_WARN(libwww sources not found !!)
1177: AC_MSG_WARN(Disabling Amaya build !)
1178: build_amaya="no"
1.1 cvs 1179: fi
1.8 cvs 1180:
1181: if test ! -f $srcdir/amaya/MathML.S ; then
1.10 cvs 1182: if test "$with_math" = "yes" ; then
1.8 cvs 1183: AC_MSG_WARN(MathML sources not found !!)
1.26 cvs 1184: AC_MSG_WARN(Disabling Math build !)
1.10 cvs 1185: with_math="no"
1186: MATH_OPTIONS=
1.8 cvs 1187: fi
1188: fi
1.26 cvs 1189:
1.68 vatton 1190: if test ! -f $srcdir/amaya/SVG.S ; then
1191: if test "$with_svg" = "yes" ; then
1192: AC_MSG_WARN(SVG sources not found !!)
1193: AC_MSG_WARN(Disabling SVG build !)
1194: with_svg="no"
1195: SVG_OPTIONS=
1.26 cvs 1196: fi
1197: fi
1198:
1.48 cvs 1199: if test ! -f $srcdir/annotlib/Makefile.in ; then
1.47 cvs 1200: if test "$with_annot" = "yes" ; then
1201: AC_MSG_WARN(Annotation makefile not found !!)
1202: AC_MSG_WARN(Disabling Annotations build !)
1203: with_annot="no"
1204: fi
1205: fi
1.55 kahan 1206:
1.146 kahan 1207: if test "$with_redland" = "yes" -a "$with_annot" = "no" -a "$with_bookmarks" = "no"; then
1208: AC_MSG_WARN(Disabling redland as neither annotations nor bookmarks are enabled !)
1.93 kahan 1209: MAKERAPTOR=['#']
1210: with_raptor="no"
1211: fi
1212:
1.116 kahan 1213: redland_compile_source=yes
1214: if test "$with_redland" = "yes" -a "$with_system_redland" = "yes" ; then
1215: # check to see if we have a redland library
1216: AC_MSG_CHECKING(system redland library)
1.142 kahan 1217: redland_min_version=0.9.16
1.116 kahan 1218: REDLAND_CONFIG="redland-config"
1219: REDLAND_VERSION=`$REDLAND_CONFIG --version`
1220: redland_version_dec=`echo $REDLAND_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
1221: redland_min_version_dec=`echo $redland_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
1222: if test $redland_version_dec -lt $redland_min_version_dec; then
1223: AC_MSG_RESULT(no - found version $REDLAND_VERSION and minimal version is $redland_min_version)
1224: else
1225: AC_MSG_RESULT(yes - found version $REDLAND_VERSION)
1226: AC_MSG_CHECKING(checking for redland headers)
1.117 kahan 1227: dnl We should use awk here and remove the -I from the following line
1228: dnl REDLAND_HEADERS=`$REDLAND_CONFIG --cflags`
1229: REDLAND_HEADERS=""
1230: if test -e "/usr/include/redland.h" ; then
1231: REDLAND_HEADERS="/usr/include";
1232: else
1233: if test -e "/usr/local/include/redland.h" ; then
1234: REDLAND_HEADERS="/usr/local/include";
1235: fi
1236: fi
1237: if test $REDLAND_HEADERS != ""; then
1.116 kahan 1238: AC_MSG_RESULT(yes - have development version)
1239: redland_compile_source=no
1240: else
1241: AC_MSG_RESULT(no - no development version)
1242: fi
1243: fi
1244: fi
1245:
1246: if test "$with_redland" = "yes" -a "$redland_compile_source" = "yes" \
1247: -a ! -d "$srcdir/../redland" ; then
1.109 kahan 1248: AC_MSG_WARN(Redland source dir not found !!)
1249: AC_MSG_WARN(Disabling redland build !)
1250: MAKEREDLAND=['#']
1251: with_redland="no"
1252: fi
1253:
1254: if test "$with_redland" = "yes" ; then
1.202 vatton 1255: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DAM_REDLAND -DRAPTOR_RDF_PARSER"
1.116 kahan 1256: if test "$redland_compile_source" = "yes" ; then
1257: AMAYA_RAPTOR_SRC="amaya_comp_redland"
1258: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
1259: AMAYA_RAPTOR_LIBS="../redland/librdf/.libs/librdf.a ../redland/raptor/.libs/libraptor.a"
1260: AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
1261: else
1262: MAKEREDLAND=['#']
1263: AMAYA_RAPTOR_SRC=
1264: redland_includes=`$REDLAND_CONFIG --cflags`
1265: redland_libs=`$REDLAND_CONFIG --libs`
1266: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS"
1267: AMAYA_ANNOT_INCLUDES="$redland_includes -I\$(THOTDIR)/thotlib/include"
1268: AMAYA_ANNOT_EXTRA_LIBS="$redland_libs"
1269: AMAYA_RAPTOR_INCLUDES="$redland_includes"
1270: fi
1.109 kahan 1271: fi
1272:
1.116 kahan 1273:
1.108 kahan 1274: dnl control whether we should build the bookmarks support
1.146 kahan 1275: if test "$with_annot" = "yes" -a "$with_redland" = "no" ; then
1276: AC_MSG_WARN(Disabling annotations build as redland is disabled !)
1.148 kahan 1277: with_annot="no"
1.146 kahan 1278: fi
1.108 kahan 1279: if test "$with_bookmarks" = "yes" -a "$with_annot" = "no" ; then
1280: AC_MSG_WARN(Disabling bookmarks build as annotations are disabled !)
1281: with_bookmarks="no"
1282: fi
1.109 kahan 1283: if test "$with_bookmarks" = "yes" -a "$with_redland" = "no" ; then
1284: AC_MSG_WARN(Disabling bookmarks build as redland is disabled !)
1.108 kahan 1285: with_bookmarks="no"
1286: fi
1287: if test "$with_bookmarks" = "yes" ; then
1.194 vatton 1288: ANNOTLIB_COMPILE_BM=
1289: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DBOOKMARKS"
1.108 kahan 1290: else
1.194 vatton 1291: ANNOTLIB_COMPILE_BM=['#']
1.186 tollenae 1292: fi
1293:
1.55 kahan 1294: if test "$with_plugin" = "yes" ; then
1295: AC_MSG_WARN(The plugin library isn't supported anymore in Amaya !!)
1.194 vatton 1296: AC_MSG_WARN(Disabling plugin build !)
1297: with_plugin="no"
1.55 kahan 1298: fi
1299:
1.88 kirschpi 1300:
1301: if test ! -f $srcdir/davlib/Makefile.in ; then
1302: if test "$with_dav" = "yes" ; then
1303: AC_MSG_WARN(WebDAV makefile not found !!)
1304: AC_MSG_WARN(Disabling WebDAV build !)
1305: with_dav="no"
1.90 kirschpi 1306: DAVDIR=""
1307: LIBDAV=""
1308: WITHDAV=""
1309: WWWDAV=""
1.88 kirschpi 1310: fi
1311: fi
1312:
1313:
1.1 cvs 1314: fi
1315:
1316: dnl
1317: dnl The options for each library or binary
1318: dnl
1319:
1.134 gully 1320: THOT_OPTIONS="$OS_OPTIONS $GTK_OPTIONS $GL_OPTIONS $WX_OPTIONS $NOGUI_OPTIONS"
1.179 gully 1321: if test "$with_debug" = "yes" ; then
1.186 tollenae 1322: AMAYA_OPTIONS="$OS_OPTIONS $MATH_OPTIONS $SVG_OPTIONS $GENERIC_XML_OPTIONS $GTK_OPTIONS $GL_OPTIONS $WX_OPTIONS $NOGUI_OPTIONS $TEMPLATES_OPTIONS -DAMAYA_DEBUG"
1.179 gully 1323: else
1.186 tollenae 1324: AMAYA_OPTIONS="$OS_OPTIONS $MATH_OPTIONS $SVG_OPTIONS $GENERIC_XML_OPTIONS $GTK_OPTIONS $GL_OPTIONS $WX_OPTIONS $NOGUI_OPTIONS $TEMPLATES_OPTIONS"
1.179 gully 1325: fi
1.58 cvs 1326: #PLUGIN_OPTIONS="-DPLUGIN_TRACE -DXP_UNIX"
1.129 vatton 1327: AMAYA_ANNOT_OPTIONS="$OS_OPTIONS $AMAYA_ANNOT_OPTIONS"
1.101 kahan 1328:
1.158 gully 1329: if test "$with_wx" = "yes" ; then
1330: IMGLIBS=""
1331: else
1332: IMGLIBS="-ljpeg -lpng -lz"
1333: fi
1.132 gully 1334:
1.3 cvs 1335: EXTRA_LIBS=
1.131 gully 1336: EXTRA_INCLUDES=
1337:
1338: # check for malloc.h
1339: # on macosx, this file is not at the right place
1.187 gully 1340: if test "$AMAYAOS" = "MACOSX" ; then
1.173 carcone 1341: for ac_dir in \
1342: /Developer/SDKs/MacOSX10.1.5.sdk/usr/include/objc/ \
1343: /Developer/SDKs/MacOSX10.1.5.sdk/usr/include/sys/ \
1344: /Developer/SDKs/MacOSX10.2.8.sdk/usr/include/objc/ \
1345: /Developer/SDKs/MacOSX10.2.8.sdk/usr/include/sys/ \
1346: /Developer/SDKs/MacOSX10.3.0.sdk/usr/include/objc/ \
1347: /Developer/SDKs/MacOSX10.3.0.sdk/usr/include/sys/ \
1348: ; \
1349: do
1350: if test -r "$ac_dir/malloc.h"; then
1351: echo "found malloc.h"
1352: EXTRA_INCLUDES="${EXTRA_INCLUDES} -I$ac_dir"
1353: break
1354: fi
1355: done
1.187 gully 1356: else # "$AMAYAOS" = "MACOSX"
1.131 gully 1357: for ac_dir in \
1358: /usr/include/malloc/ \
1359: /sw/include/malloc/ \
1360: ; \
1361: do
1362: if test -r "$ac_dir/malloc.h"; then
1363: echo "found malloc.h"
1364: EXTRA_INCLUDES="${EXTRA_INCLUDES} -I$ac_dir"
1365: break
1366: fi
1367: done
1.187 gully 1368: fi # "$AMAYAOS" = "MACOSX"
1.1 cvs 1369:
1370: dnl
1371: dnl Set up the PATHs needed
1372: dnl
1373:
1374: API="\$(THOTDIR)/thotlib/include"
1375: VAR="\$(THOTDIR)/thotlib/internals/var"
1376: INCL="\$(THOTDIR)/thotlib/internals/h"
1377: FUNC="\$(THOTDIR)/thotlib/internals/f"
1378:
1379: dnl
1380: dnl Set up the include variables.
1381: dnl
1382:
1.61 cvs 1383: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58 cvs 1384: APIINCLUDES=-I${API}
1385:
1386: if test "${VPATHOPT}" = "" ; then
1.1 cvs 1387: VPATHOPT="VPATH"
1388: fi
1389:
1.206 vatton 1390: AMAYA_INSTALLDIR="Amaya-${APP_VER}"
1391:
1.1 cvs 1392: dnl
1393: dnl Exports the current values of the variables.
1394: dnl
1395:
1.206 vatton 1396: AC_SUBST(AMAYA_INSTALLDIR)
1397:
1.166 gully 1398: AC_SUBST(APP_MAJVER)
1399: AC_SUBST(APP_MINVER)
1400: AC_SUBST(APP_SUBVER)
1401: AC_SUBST(APP_VER)
1.6 cvs 1402: AC_SUBST(CEXTRACT_VER)
1403: AC_SUBST(CEXTRACT_FLAGS)
1.1 cvs 1404:
1405: AC_SUBST(THOTINCLUDES)
1406: AC_SUBST(APIINCLUDES)
1407: AC_SUBST(VPATHOPT)
1408:
1.63 vatton 1409: AC_SUBST(GTK_OPTIONS)
1.1 cvs 1410: AC_SUBST(THOT_OPTIONS)
1411: AC_SUBST(AMAYA_OPTIONS)
1412: AC_SUBST(PLUGIN_OPTIONS)
1.48 cvs 1413: AC_SUBST(AMAYA_ANNOT_OPTIONS)
1.110 kahan 1414: AC_SUBST(AMAYA_ANNOT_INCLUDES)
1.116 kahan 1415: AC_SUBST(AMAYA_ANNOT_EXTRA_LIBS)
1.1 cvs 1416: AC_SUBST(IMGLIBS)
1.3 cvs 1417: AC_SUBST(EXTRA_LIBS)
1.131 gully 1418: AC_SUBST(EXTRA_INCLUDES)
1.90 kirschpi 1419:
1420: AC_SUBST(DAVDIR)
1421: AC_SUBST(LIBDAV)
1422: AC_SUBST(WITHDAV)
1423: AC_SUBST(WWWDAV)
1.1 cvs 1424:
1.93 kahan 1425: AC_SUBST(MAKERAPTOR)
1.109 kahan 1426: AC_SUBST(MAKEREDLAND)
1.108 kahan 1427: AC_SUBST(ANNOTLIB_COMPILE_BM)
1.109 kahan 1428: AC_SUBST(AMAYA_RAPTOR_SRC)
1.93 kahan 1429: AC_SUBST(AMAYA_RAPTOR_LIBS)
1430: AC_SUBST(AMAYA_RAPTOR_INCLUDES)
1431: AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
1432: AC_SUBST(LIBWWW_RDF_PARSER)
1433:
1434: AC_SUBST(SUBDIRS)
1435:
1.1 cvs 1436: dnl
1.48 cvs 1437: dnl Include the option Makefile.xxx fragment according to the configure options
1.1 cvs 1438: dnl
1439:
1440: if test "$with_plugin" = "yes" ; then
1.50 cvs 1441: AC_SUBST_FILE(plugin_frag)
1.1 cvs 1442: plugin_frag=$srcdir/pluginlib/Makefile.plugin
1443: else
1444: AC_SUBST_FILE(plugin_frag)
1445: plugin_frag=/dev/null
1446: fi
1447:
1448: AC_SUBST_FILE(www_frag)
1.49 cvs 1449: www_frag=$srcdir/amaya/Makefile.libwww
1.1 cvs 1450:
1.50 cvs 1451: if test "$with_math" = "no" ; then
1.10 cvs 1452: AC_SUBST_FILE(math_frag)
1.50 cvs 1453: math_frag=/dev/null
1.8 cvs 1454: else
1.10 cvs 1455: AC_SUBST_FILE(math_frag)
1.50 cvs 1456: math_frag=$srcdir/amaya/Makefile.math
1.8 cvs 1457: fi
1458:
1.68 vatton 1459: if test "$with_svg" = "no" ; then
1460: AC_SUBST_FILE(svg_frag)
1461: svg_frag=/dev/null
1.26 cvs 1462: else
1.68 vatton 1463: AC_SUBST_FILE(svg_frag)
1464: svg_frag=$srcdir/amaya/Makefile.svg
1.26 cvs 1465: fi
1466:
1.47 cvs 1467: if test "$with_annot" = "yes" ; then
1468: AC_SUBST_FILE(annot_frag)
1.48 cvs 1469: annot_frag=$srcdir/annotlib/Makefile.annot
1.47 cvs 1470: else
1471: AC_SUBST_FILE(annot_frag)
1472: annot_frag=/dev/null
1473: fi
1474:
1.88 kirschpi 1475: if test "$with_dav" = "yes" ; then
1476: AC_SUBST_FILE(dav_frag)
1477: dav_frag=$srcdir/davlib/Makefile.dav
1.188 vatton 1478: else
1479: AC_SUBST_FILE(dav_frag)
1480: dav_frag=/dev/null
1.88 kirschpi 1481: fi
1.16 cvs 1482:
1.186 tollenae 1483: if test "$with_templates" = "yes" ; then
1484: AC_SUBST_FILE(templates_frag)
1485: templates_frag=$srcdir/amaya/Makefile.templates
1.188 vatton 1486: else
1487: AC_SUBST_FILE(templates_frag)
1488: templates_frag=/dev/null
1.186 tollenae 1489: fi
1490:
1.1 cvs 1491: dnl ***************************************************************
1492: dnl
1493: dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
1494: dnl
1495: dnl ***************************************************************
1496:
1497: EXTRA_MAKEFILE_IN=
1.2 cvs 1498: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1 cvs 1499: libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2 cvs 1500: tools/mkdep/Makefile \
1.1 cvs 1501: tools/cextract-1.7/Makefile thotlib/Makefile \
1.193 gully 1502: thotlib/include/Makefile batch/Makefile \
1503: script_install:../batch/script_install.in \
1504: script_install_gnomekde:../batch/script_install_gnomekde.in \
1505: script_install_macosxbundle:../batch/script_install_macosxbundle.in \
1506: script_uninstall:../batch/script_uninstall.in"
1.1 cvs 1507:
1508: if test "$build_amaya" = "yes" ; then
1.2 cvs 1509:
1.19 cvs 1510: make_output="$make_output amaya/Makefile pluginlib/Makefile"
1.2 cvs 1511: EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.93 kahan 1512: $srcdir/amaya/Makefile.libwww"
1.27 cvs 1513:
1.162 gully 1514: if test "$with_plugin" = "yes" ; then
1.27 cvs 1515: make_output="$make_output pluginlib/Makefile"
1516: EXTRA_MAKEFILE_IN="$srcdir/pluginlib/Makefile.in \
1.93 kahan 1517: $srcdir/pluginlib/Makefile.plugin"
1.27 cvs 1518: fi
1.2 cvs 1519:
1.48 cvs 1520: if test "$with_annot" = "yes" ; then
1521: make_output="$make_output annotlib/Makefile"
1522: EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
1523: fi
1.88 kirschpi 1524:
1525: if test "$with_dav" = "yes" ; then
1526: make_output="$make_output davlib/Makefile"
1527: EXTRA_MAKEFILE_IN="$srcdir/davlib/Makefile.in"
1528: fi
1529:
1.205 vatton 1530: if test "$with_wx" = "yes" -a "enable_system_wx" = "yes" ; then
1.162 gully 1531: EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN $WX_SRCDIR/Makefile.in $WX_SRCDIR/configure.in"
1532: fi
1533:
1.1 cvs 1534: fi
1535:
1536: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6 cvs 1537: AC_OUTPUT($make_output , [
1538: dnl
1539: dnl This fragment of shell code is executed after the
1540: dnl Makefile(s) dump ...
1541: dnl
1542:
1543: echo timestamp > stamp-h
1544:
1545: dnl
1546: dnl Check for an upgrade in the Options numbers
1547: dnl
1548:
1549: if test -f Options ; then
1550: oldversion=`grep Version Options`
1551: newversion=`grep Version Options.orig`
1552: if test "$oldversion" != "$newversion" ; then
1553: echo WARNING : Options files have changed, old options saved to Options.old
1554: cp Options Options.old
1555: cp Options.orig Options
1556: exit 1
1557: fi
1558: fi
1.193 gully 1559: if test -f script_install ; then
1560: chmod a+x script_install
1561: fi
1562: if test -f script_install_gnomekde ; then
1563: chmod a+x script_install_gnomekde
1564: fi
1565: if test -f script_install_macosxbundle ; then
1566: chmod a+x script_install_macosxbundle
1567: fi
1568: if test -f script_uninstall ; then
1569: chmod a+x script_uninstall
1570: fi
1.6 cvs 1571: ])
1.1 cvs 1572:
1573: if test "$build_amaya" = "yes" ; then
1.164 gully 1574: echo Amaya $AMAYA_VER configured
1.50 cvs 1575: echo Amaya configured with libWWW
1576: if test "$with_plugin" = "yes" ; then
1577: echo Amaya configured with Plugins support
1.8 cvs 1578: fi
1.10 cvs 1579: if test "$with_math" = "yes" ; then
1580: echo Amaya configured with Math support
1.26 cvs 1581: fi
1.68 vatton 1582: if test "$with_svg" = "yes" ; then
1583: echo Amaya configured with SVG support
1.47 cvs 1584: fi
1585: if test "$with_annot" = "yes" ; then
1586: echo Amaya configured with Annotations support
1.70 kahan 1587: fi
1.93 kahan 1588: if test "$with_raptor" = "yes" ; then
1.106 kahan 1589: echo Amaya configured with the Raptor RDF parser
1.109 kahan 1590: fi
1591: if test "$with_redland" = "yes" ; then
1.116 kahan 1592: if test "$with_system_redland" = "no" ; then
1593: echo Amaya configured with the Redland RDF library \(local source\)
1594: else
1595: echo Amaya configured with the Redland RDF library \(system\)
1596: fi
1.108 kahan 1597: fi
1598: if test "$with_bookmarks" = "yes" ; then
1599: echo Amaya configured with bookmarks support \(experimental\)
1.93 kahan 1600: fi
1.186 tollenae 1601: if test "$with_templates" = "yes" ; then
1602: echo Amaya configured with templates support \(experimental\)
1603: fi
1.70 kahan 1604: if test "$with_generic_xml" = "yes" ; then
1.195 vatton 1605: echo Amaya configured with generic XML support
1.70 kahan 1606: fi
1.195 vatton 1607: echo Amaya configured with internationalization support
1.75 cheyroul 1608: if test "$with_gl" = "yes" ; then
1.143 gully 1609: echo Amaya configured with OpenGL Canvas Rendering \(System library\) \(experimental\)
1610: fi
1611: if test "$with_mesa" = "yes" ; then
1.181 gully 1612: echo Amaya configured with OpenGL Canvas Rendering \(MesaLib\)
1.88 kirschpi 1613: fi
1614: if test "$with_dav" = "yes" ; then
1.181 gully 1615: echo Amaya configured with WebDAV support
1.1 cvs 1616: fi
1.5 cvs 1617: fi
1618:
1.158 gully 1619: if test "$with_wx" = "no" ; then
1620: if test "$no_graphic" = "yes" ; then
1621: echo "Amaya configured with system graphic libraries (libjpeg, libpng, zlib)"
1622: else
1623: echo "Amaya configured with static graphic libraries (libjpeg, libpng, zlib)"
1624: if test "$with_gtk" = "yes" -o "$with_gl" = "yes" ; then
1625: echo " N.B. This option may not work in your platform. If Amaya crashes"
1626: echo " when opening a PNG file. Recompile it using the system libraries."
1627: fi
1628: fi
1.107 kahan 1629: fi
1630:
1631: if test "$with_gtk" = "yes" ; then
1.67 vatton 1632: echo "Amaya configured with GTK"
1.120 gully 1633: fi
1634:
1.124 gully 1635: if test "$with_wx" = "yes" ; then
1.136 gully 1636: if test "$with_wxdebug" = "yes" ; then
1.181 gully 1637: echo "Amaya configured with wxWidgets {srcdir=$WX_SRCDIR} (debug)"
1.136 gully 1638: else
1.181 gully 1639: echo "Amaya configured with wxWidgets {srcdir=$WX_SRCDIR}"
1.136 gully 1640: fi
1.1 cvs 1641: fi
1642:
1.121 gully 1643: if test "$with_nogui" = "yes" ; then
1.128 gully 1644: echo "Amaya configured without GUI toolkit"
1.121 gully 1645: fi
1.136 gully 1646:
1647:
1.107 kahan 1648: echo ""
1.78 vatton 1649: echo "Now type \"make\" (GNU make preferably) to build the binaries"
1.107 kahan 1650: echo ""
1.120 gully 1651:
Webmaster