Annotation of Amaya/configure.in, revision 1.232
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.216 vatton 13: AC_PREREQ(2.54)
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.228 kia 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: dnl
1.175 gully 204: dnl GL canvas is disabled by default in 8.7.x
205: dnl GL canvas is enabled by default in 9.x
206: dnl - 9.x needs : GL, GLX, GLU, freetype2, wxGLCanvas
1.85 vatton 207: dnl GL is for opengl
1.175 gully 208: dnl GlX is for XWindow integration
1.85 vatton 209: dnl GLU is for tesselation algortihms (until we extract it from this lib)
210: dnl (tesselation is used for polygons with holes in it...)
1.175 gully 211: dnl freetype2 is for text drawing (fonts ...)
212: dnl wxGLCanvas is for integration of opengl in wxWidgets (WX)
1.231 vatton 213:
214: with_wx="yes"
215: AC_ARG_ENABLE(system-wx, [ --enable-system-wx try the wxWidgets system library ])
216:
1.211 vatton 217: AC_ARG_WITH([gl],
1.218 vatton 218: AC_HELP_STRING([--with-gl],[enable canvas with hardware OpenGL implementation]),
1.210 vatton 219: [case "${withval}" in
220: yes) with_gl="yes" ;;
221: no) with_gl="no" ;;
222: *) AC_MSG_ERROR(bad value ${withval} for --with-gl) ;;
223: esac],
224: [with_gl="no"])
1.85 vatton 225:
1.143 gully 226: # check for mesa library (OpenGL)
1.218 vatton 227: AC_ARG_WITH(MESA, [ --with-mesa enable canvas with software OpenGL implementation (default) ])
1.143 gully 228: if test "$with_mesa" = "" ; then
1.208 vatton 229: with_mesa="no"
1.143 gully 230: fi
231:
1.124 gully 232:
1.176 gully 233: # mesa (software) gl implementation is default with wx (hardware gl implem can be choosen with --with-gl option)
1.231 vatton 234: if test "$AMAYAOS" = "MACOSX" ; then
235: with_mesa="no"
236: with_gl="yes"
237: else
1.176 gully 238: if test "$with_gl" = "no" ; then
239: with_mesa="yes"
1.175 gully 240: fi
241: fi
242:
1.136 gully 243: # check if wxWidgets debug is enable
1.155 carcone 244: AC_ARG_WITH(wxdebug, [ --with-wxdebug compiles wxWidgets with debuging options ])
1.136 gully 245: if test "$with_wxdebug" = "yes" ; then
246: with_wxdebug="yes"
247: else
248: with_wxdebug="no"
249: fi
250:
1.153 gully 251: # it is possible to specify wxWidgets library path,
252: # usefull for developpers who want to compile amaya with different wxWidgets version
1.155 carcone 253: AC_ARG_WITH(wxsrcdir, [ --with-wxsrcdir=... compiles Amaya with a specific wxWidgets sources path ])
1.153 gully 254: if test "$with_wxsrcdir" = "" ; then
255: with_wxsrcdir="../../wxWidgets"
256: fi
257:
258:
1.152 gully 259: # setup the AMAYAGUI variable used to identify used GUI when 'make install' is called
1.231 vatton 260: AMAYAGUI="wx"
1.152 gully 261: AC_SUBST(AMAYAGUI)
262:
263:
1.143 gully 264: if test "$with_mesa" = "yes" ; then
265: # --------- compile Mesa library (opengl) --------------- #
266: # check that sources of Mesa exists
267: if test ! -f ../../Mesa/Makefile ; then
1.231 vatton 268: GL_BUILDDIR=""
269: GL_INCLUDES="-I/usr/include"
270: GL_LIBRARIES="-Wl,-rpath,usr/lib -L/usr/lib -lGL -lGLU"
271: echo "---> Use system Mesa library"
272: else
273: OLDDIR=`pwd`
274: GL_BUILDDIR="${OLDDIR}/Mesa"
275: if test ! -d "$GL_BUILDDIR" ; then
276: echo "---> Install Mesa library into ${GL_BUILDDIR}"
277: mkdir -p ${GL_BUILDDIR}
278: cp -r ../../Mesa/* ${GL_BUILDDIR}
279: echo "---> Install Mesa library into ${GL_BUILDDIR} - DONE"
280: fi
281: # this is the flags used to build amaya with OpenGL
282: GL_INCLUDES="-I${GL_BUILDDIR}/include"
283: GL_LIBRARIES="-Wl,-rpath,${GL_BUILDDIR}/lib -L${GL_BUILDDIR}/lib -lGL -lGLU"
1.214 vatton 284: fi
1.143 gully 285: GL_OPTIONS="-D_GL"
1.152 gully 286: AC_SUBST(GL_BUILDDIR)
1.143 gully 287: AC_SUBST(GL_INCLUDES)
288: AC_SUBST(GL_LIBRARIES)
289: fi
290:
1.231 vatton 291: if test "$enable_system_wx" = "yes"; then
292: AC_PATH_PROG(WXCONFIG, wx-config)
293: if test -z "$WXCONFIG"; then
294: enable_system_wx="no"
1.135 gully 295: fi
1.231 vatton 296: fi
1.205 vatton 297:
1.231 vatton 298: if test "$enable_system_wx" != "yes"; then
299: # WX_SRCDIR is better to understand the code than with_wxsrcdir variable
300: if test ! -f $with_wxsrcdir/Makefile.in ; then
301: $with_wxsrcdir = ../../wxWidgets
302: fi
303: cd $with_wxsrcdir
304: WX_SRCDIR=`pwd`
305: cd -
306: AC_SUBST(WX_SRCDIR)
307:
308: # check that sources of wxWidgets exists
309: if test ! -f $WX_SRCDIR/Makefile.in ; then
310: 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 !)
311: fi
1.135 gully 312:
1.152 gully 313: # --------- configure wxWidgets library --------------- #
1.135 gully 314: echo "---> Configuring wxWidgets library."
315: OLDDIR=`pwd`
1.149 gully 316: # create the build directory (debug or release)
317: if test $with_wxdebug = yes ; then
1.152 gully 318: WX_BUILDDIR="wxWidgets_DEBUG"
1.149 gully 319: else
1.152 gully 320: WX_BUILDDIR="wxWidgets_RELEASE"
1.149 gully 321: fi
1.205 vatton 322:
1.152 gully 323: mkdir -p $WX_BUILDDIR
324: cd $WX_BUILDDIR
325: AC_SUBST(WX_BUILDDIR)
1.136 gully 326:
1.149 gully 327: # remove old configure cached options
1.135 gully 328: rm -f configarg.cache
1.136 gully 329:
330: # setup configure options
1.158 gully 331:
332: # disable unused wx features
333: # --disable-htmlhelp
334: # --disable-html
335: # --disable-docview
336: # --disable-mdi
337: # --disable-mdidoc
338: # --disable-sound
1.225 vatton 339: # --disable-richtext
1.185 gully 340: # --disable-backtrace # to avoid the buggy popup when an assert occurs
1.229 kia 341: WXCONFIGURE_TUNNING_OPTION="--disable-printarch --disable-htmlhelp --disable-html --disable-richtext --disable-docview --disable-mdidoc --disable-sound --disable-backtrace"
1.158 gully 342:
1.178 gully 343: if test "$AMAYAOS" = "LINUX" ; then
1.135 gully 344: # LINUX
1.145 gully 345: # --enable-gtk2 use GTK+ 2.0 if available (EXPERIMENTAL)
1.158 gully 346: # --disable-shared create only static library (.a)
1.145 gully 347: # --enable-unicode compile wxString with Unicode support
348: # --with-gtk use GTK+
349: # --with-opengl use OpenGL (or Mesa)
1.232 ! vatton 350: 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 --with-libxpm=builtin $WXCONFIGURE_TUNNING_OPTION"
1.135 gully 351: fi
1.178 gully 352: if test "$AMAYAOS" = "MACOSX" ; then
1.135 gully 353: # MACOSX
1.170 carcone 354: WXCONFIGURE_OPTION="--with-opengl --disable-shared --enable-unicode --with-libpng=builtin --with-libjpeg=builtin"
1.136 gully 355: fi
356: if test $with_wxdebug = yes ; then
1.141 gully 357: WXCONFIGURE_OPTION="$WXCONFIGURE_OPTION --enable-debug"
1.143 gully 358: # SG: I've disabled other debug options because the lib has bugs when using these flags \
359: # (maybe because these flags are not often used by wxWidgets developpers)
1.141 gully 360: # WXCONFIGURE_OPTION="$WXCONFIGURE_OPTION --enable-debug --enable-debug_cntxt --enable-debug_gdb --enable-debug_info --enable-debug_flag --enable-mem_tracing"
1.145 gully 361: else
362: WXCONFIGURE_OPTION="$WXCONFIGURE_OPTION --enable-optimise"
1.135 gully 363: fi
1.143 gully 364:
1.136 gully 365: # launch the configure
1.143 gully 366: if test "$with_mesa" = "yes" ; then
367: # use internal OpenGL (mesa) libraries
1.165 gully 368: $WX_SRCDIR/configure CFLAGS="-I${GL_BUILDDIR}/include" CXXFLAGS="-I${GL_BUILDDIR}/include" CPPFLAGS="-I${GL_BUILDDIR}/include" $WXCONFIGURE_OPTION
1.158 gully 369: #../$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 370: if test $? != 0 ; then
371: AC_MSG_ERROR(A problem occurs durring wxWidgets library configuration. Please fix the problem and try again.)
372: fi
1.143 gully 373: else
374: # use OpenGL system libraries
1.165 gully 375: $WX_SRCDIR/configure $WXCONFIGURE_OPTION
1.143 gully 376: fi
1.152 gully 377: cd $OLDDIR
1.135 gully 378: echo "---> Configuring wxWidgets library. - DONE"
1.143 gully 379:
1.135 gully 380: # --------- configuring wxWidgets paths --------------- #
1.152 gully 381: WXCONFIG=$WX_BUILDDIR/wx-config
1.134 gully 382: # check that wx-config exists
1.135 gully 383: if test ! -f $WXCONFIG ; then
1.143 gully 384: AC_MSG_ERROR(Cannot find wx-config. Please download wxWidgets (http://www.wxwidgets.org/))
1.134 gully 385: fi
1.144 gully 386:
387: # setup include paths
1.165 gully 388: # "-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 389: WX_INCLUDES="-I$WX_SRCDIR/src/png -I$WX_SRCDIR/src/jpeg -I$WX_SRCDIR/src/tiff"
390: BUILDWXWIDGETS="wxwidgets"
391: AC_SUBST(BUILDWXWIDGETS)
392:
1.231 vatton 393: fi #!$enable_system_wx
1.205 vatton 394:
1.231 vatton 395: WX_INCLUDES="$WX_INCLUDES `$WXCONFIG --cxxflags`"
396: AC_SUBST(WX_INCLUDES)
1.205 vatton 397:
1.231 vatton 398: # setup libraries paths
399: WX_LIBRARIES=""
400: WX_LIBRARIES_EXTRA_PARAM=""
401: WXCONFIG_LIBS_PARAM="aui,xrc,adv,core,xml,net"
402: # GL is used ?
403: if test "$with_gl" = "yes" -o "$with_mesa" = "yes" ; then
404: WXCONFIG_LIBS_PARAM="${WXCONFIG_LIBS_PARAM},gl"
405: # SG: this is a mistery why wx-config doesn't add these needed option on macosx
406: if test "$AMAYAOS" = "MACOSX" ; then
407: WX_LIBRARIES_EXTRA_PARAM="-framework OpenGL -framework AGL"
1.124 gully 408: fi
1.231 vatton 409: fi
410: if test "$AMAYAOS" = "MACOSX" ; then
1.170 carcone 411: WXCONFIG_LIBS_PARAM="${WXCONFIG_LIBS_PARAM},html"
1.231 vatton 412: fi
1.170 carcone 413:
1.231 vatton 414: WX_LIBRARIES="`$WXCONFIG --libs $WXCONFIG_LIBS_PARAM` ${WX_LIBRARIES_EXTRA_PARAM}"
415: AC_SUBST(WX_LIBRARIES)
416: WX_LINKDEPS="`$WXCONFIG --linkdeps`"
417: AC_SUBST(WX_LINKDEPS)
418: WX_OPTIONS="-D_WX"
419: # --------- configuring wxWidgets paths - DONE --------------- #
1.124 gully 420:
1.63 vatton 421: if test "${GCC}" = "yes"; then
1.231 vatton 422: CPP="${CPP} -x c"
1.63 vatton 423: fi
424:
1.1 cvs 425: dnl ***************************************************************
426: dnl
1.61 cvs 427: dnl SPECIFIC STUFF : CONFIGURATION OPTIONS FOR AMAYA
1.1 cvs 428: dnl
429: dnl ***************************************************************
430:
1.158 gully 431: # Do not care with libpng or libjpeg with wx version because we use the wxwidgets one.
1.76 vatton 432:
1.166 gully 433: # the wx version
434: AMAYAWX_MAJVER=9
1.226 vatton 435: AMAYAWX_MINVER=99
1.201 vatton 436: AMAYAWX_SUBVER=0
1.231 vatton 437: APP_MAJVER=$AMAYAWX_MAJVER
438: APP_MINVER=$AMAYAWX_MINVER
439: APP_SUBVER=$AMAYAWX_SUBVER
440: APP_SUBVER=$AMAYA_SUBVER
1.168 gully 441:
442: if test $APP_SUBVER = 0 ; then
443: APP_VER=$APP_MAJVER.$APP_MINVER
444: else
445: APP_VER=$APP_MAJVER.$APP_MINVER.$APP_SUBVER
446: fi
1.166 gully 447:
448: # generate a header file with the right version number, so it can be used on windows AND on unix
449: APPVERSION_H=../thotlib/internals/h/appversion.h
450: echo "#ifndef __APPVERSION_H__" > $APPVERSION_H
451: echo "#define __APPVERSION_H__" >> $APPVERSION_H
452: echo "#define APP_MAJVER $AMAYAWX_MAJVER" >> $APPVERSION_H
453: echo "#define APP_MINVER $AMAYAWX_MINVER" >> $APPVERSION_H
454: echo "#define APP_SUBVER $AMAYAWX_SUBVER" >> $APPVERSION_H
455: echo "#endif /* __APPVERSION_H__ */" >> $APPVERSION_H
1.1 cvs 456:
457: dnl
1.6 cvs 458: dnl We use a special versoin of cextract patched for alignment
459: dnl to build the signatures of the modules functions located in f subdirs
460: dnl
461: CEXTRACT_VER="1.7"
462: CEXTRACT_FLAGS="+O"
463:
1.178 gully 464: # Check if debug is enable
1.218 vatton 465: AC_ARG_WITH(debug, [ --with-debug compiles Amaya with debuging options (-g) ])
1.178 gully 466: if test "$with_debug" = "yes" ; then
467: with_debug="yes"
468: CFLAGS="-g"
469: CXXFLAGS="-g"
470: else
471: with_debug="no"
472: CFLAGS="-O2"
473: CXXFLAGS="-O2"
474: fi
1.7 cvs 475:
476: if test "${CC}" = "gcc" ; then
1.180 gully 477: CFLAGS="${CFLAGS} -Wall"
1.7 cvs 478: case "${host}" in
479: *-*-irix5* | *-*irix6* )
480: CFLAGS="${CFLAGS} -fsigned-char"
481: ;;
482: esac
1.14 cvs 483: fi
484:
485: if test "$ac_cv_c_const" = "no" ; then
486: CFLAGS="${CFLAGS} -DCONST= "
1.7 cvs 487: fi
488:
1.122 gully 489:
490: # force C mode (-x c)
1.123 gully 491: CFLAGS="${CFLAGS} -x c"
1.122 gully 492:
493: # C++ options (-x c++)
494: CXX_OPTIONS="-D__cplusplus"
1.180 gully 495: CXXFLAGS="${CXXFLAGS} -Wall -x c++ ${CXX_OPTIONS}"
1.122 gully 496:
1.132 gully 497: # setup LDFLAGS
498: # on macosx, specific flags must be set to avoid conflicts with allready installed libwww
499: # for exemple it's possible to install libwww with fink (fink install libwww)
500: # to avoid conflicts, we just force the linker to search for specified amaya path first
1.178 gully 501: if test "$AMAYAOS" = "MACOSX" ; then
1.132 gully 502: LDFLAGS="-Wl,-search_paths_first"
503: else
504: LDFLAGS=""
505: fi
1.128 gully 506:
507: dnl
1.61 cvs 508: dnl Check for availability of amaya sources
1.1 cvs 509: dnl
510:
511: build_amaya="yes"
512:
513: if test "$with_amaya" = "no" ; then
514: build_amaya="no"
1.45 cvs 515: else
516: if test ! -f $srcdir/amaya/Makefile.in ; then
1.1 cvs 517: AC_MSG_WARN(Amaya browser/editor sources not found, disabling Amaya build !)
518: build_amaya="no"
1.45 cvs 519: fi
1.1 cvs 520: fi
521:
522: dnl
1.50 cvs 523: dnl Check for additionnal packages
1.1 cvs 524: dnl use AC_CONFIG_SUBDIRS to launch configure in the subdir
525: dnl
1.93 kahan 526:
1.143 gully 527: if test "$with_gl" = "yes" -o "$with_mesa" = "yes" ; then
528:
529: # if with_gl is on then test system opengl library (GL & GLU)
530: if test "$with_gl" = "yes" ; then
1.184 carcone 531: if test "$AMAYAOS" = "LINUX" ; then
1.139 carcone 532: # setup a list of standard paths int LDFLAGS
533: # for AC_CHECK_LIB library existance checks
1.140 carcone 534: LIBS_OLD=$LIBS
1.139 carcone 535: LDFLAGS_OLD=$LDFLAGS
536: LDFLAGS="-L/usr/X11R6/lib -L/usr/lib -L/usr/local/lib"
1.75 cheyroul 537: AC_MSG_CHECKING([OpenGL])
538: for ac_dir in \
1.183 carcone 539: /usr/include \
1.75 cheyroul 540: /usr/X11R6/include \
541: /usr/local/include \
542: ; \
1.80 cheyroul 543: do if test -r "$ac_dir/GL/gl.h" ; then
1.143 gully 544: gl_inc="yes"
545: GL_INC_I="$ac_dir"
546: if test "$ac_dir" != "/usr/include" ; then
547: GL_INCLUDES="-I$ac_dir"
548: fi
549: AC_CHECK_LIB(GL,glBegin,,AC_MSG_ERROR(Cannot find OpenGL library. Please install OpenGL.))
550: AC_MSG_RESULT([yes])
551: break
552: fi
553: done
554:
1.80 cheyroul 555: AC_MSG_CHECKING([GLU])
1.75 cheyroul 556: for ac_dir in \
1.183 carcone 557: /usr/include \
558: /usr/X11R6/include \
1.75 cheyroul 559: /usr/local/include \
560: ; \
1.138 gully 561: do if test -r "$ac_dir/GL/glu.h" ; then
1.143 gully 562: glu_inc="yes"
563: GL_INC_II="$ac_dir"
564: if test "$ac_dir" != "/usr/include" ; then
565: if test "$ac_dir" != "$GL_INC_I" ; then
566: GL_INCLUDES="$GL_INCLUDES -I$ac_dir"
567: fi
568: fi
569: # now test that glu version is >= 1.2
570: 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.)))
571: AC_MSG_RESULT([yes])
572: break
573: fi
574: done
1.139 carcone 575: LDFLAGS=$LDFLAGS_OLD
1.140 carcone 576: LIBS=$LIBS_OLD
1.174 carcone 577:
1.143 gully 578: if test "$gl_inc" = "" ; then
579: AC_MSG_WARN(Opengl headers (gl.h) not found !!)
580: AC_MSG_WARN(Disabling opengl build !)
581: with_gl="no"
582: GL_OPTIONS=
583: GL_INCLUDES=
584: GL_LIBRARIES=
585: exit 1;
586: fi
587:
588: if test "$glu_inc" = "" ; then
589: AC_MSG_WARN(Glu headers (glu.h) not found !!)
590: AC_MSG_WARN(Disabling opengl build !)
591:
592: with_gl="no"
593: GL_OPTIONS=
594: GL_INCLUDES=
595: GL_LIBRARIES=
596: exit 1;
597: fi
1.184 carcone 598: fi # AMAYAOS = LINUX
1.174 carcone 599:
1.187 gully 600: if test "$AMAYAOS" = "MACOSX" ; then
1.174 carcone 601: GL_OPTIONS="-D_GL"
1.183 carcone 602: GL_INCLUDES="-I/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/"
1.174 carcone 603: GL_LIBRARIES=""
1.183 carcone 604: GL_BUILDDIR=""
1.174 carcone 605: else
606: GL_LIBRARIES="-L/usr/lib -L/usr/X11R6/lib -lGL -lGLU"
607: GL_OPTIONS="-D_GL"
1.173 carcone 608: fi
1.143 gully 609:
610: AC_SUBST(GL_INCLUDES)
611: AC_SUBST(GL_LIBRARIES)
612: fi # if with_gl
1.139 carcone 613:
1.187 gully 614: # ---------- Checking for freetype lib (fonts library)
615: if test "$AMAYAOS" = "MACOSX" ; then
1.173 carcone 616: # we use a static version of freetype lib for mac osx
1.187 gully 617: # ** search for includes (freetype.h)
618: for ac_dir in \
619: /Developer/SDKs/MacOSX10.1.5.sdk/usr/X11R6/include/ \
620: /Developer/SDKs/MacOSX10.1.5.sdk/usr/X11R6/include/freetype2/ \
621: /Developer/SDKs/MacOSX10.2.8.sdk/usr/X11R6/include/ \
622: /Developer/SDKs/MacOSX10.2.8.sdk/usr/X11R6/include/freetype2/ \
623: /Developer/SDKs/MacOSX10.3.0.sdk/usr/X11R6/include/ \
624: /Developer/SDKs/MacOSX10.3.0.sdk/usr/X11R6/include/freetype2/ \
1.207 vatton 625: /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/ \
626: /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include/freetype2/ \
1.187 gully 627: /Developer/SDKs/MacOSX10.3.9.sdk/usr/X11R6/include/ \
628: /Developer/SDKs/MacOSX10.3.9.sdk/usr/X11R6/include/freetype2/ \
629: /Developer/SDKs/MacOSX10.4.0.sdk/usr/X11R6/include/ \
1.207 vatton 630: /Developer/SDKs/MacOSX10.4.0.sdk/usr/X11R6/include/freetype2/ \
1.190 carcone 631: /opt/local/include/ \
632: /opt/local/include/freetype2/ \
633: /usr/X11R6/include/freetype2/freetype/ \
634: ; \
1.187 gully 635: do
636: if test -r "$ac_dir/ft2build.h"; then
637: FREETYPE_INCLUDES="${FREETYPE_INCLUDES} -I$ac_dir"
1.191 carcone 638: fi
639: if test -r "$ac_dir/freetype/config/ftheader.h"; then
640: FREETYPE_INCLUDES="${FREETYPE_INCLUDES} -I$ac_dir"
1.187 gully 641: fi
642: done
643: # ** search for binary (libfreetype.a)
644: for ac_dir in \
645: /Developer/SDKs/MacOSX10.1.5.sdk/usr/X11R6/lib/ \
646: /Developer/SDKs/MacOSX10.2.8.sdk/usr/X11R6/lib/ \
647: /Developer/SDKs/MacOSX10.3.0.sdk/usr/X11R6/lib/ \
1.207 vatton 648: /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/ \
1.187 gully 649: /Developer/SDKs/MacOSX10.3.9.sdk/usr/X11R6/lib/ \
650: /Developer/SDKs/MacOSX10.4.0.sdk/usr/X11R6/lib/ \
1.190 carcone 651: /opt/local/lib/ \
652: /usr/X11R6/lib/ \
1.187 gully 653: ; \
654: do
655: if test -r "$ac_dir/libfreetype.a"; then
1.192 carcone 656: FREETYPE_LIBRARIES="$ac_dir/libfreetype.a"
1.187 gully 657: break
658: fi
659: done
660: else # "$AMAYAOS" = "MACOSX"
1.173 carcone 661: if test ! -f $(which freetype-config) ; then
662: AC_MSG_ERROR(Cannot find freetype library (font load/display routines). Please install it.)
663: fi
664: FREETYPE_INCLUDES=`freetype-config --cflags`
665: FREETYPE_LIBRARIES=`freetype-config --libs`
1.187 gully 666: fi # "$AMAYAOS" = "MACOSX"
667: AC_SUBST(FREETYPE_INCLUDES)
668: AC_SUBST(FREETYPE_LIBRARIES)
669:
670:
1.143 gully 671: AC_MSG_CHECKING([gcc3])
672: for ac_dir in \
1.96 cheyroul 673: /usr/lib \
674: /usr/X11R6/lib \
675: /usr/local/lib \
676: ; \
1.143 gully 677: do if test -r "$ac_dir/libstdc++.so.5" ; then
678: stdglu_inc="yes"
679: STDCPP_LIBRARIES="-lstdc++"
680: STDCPP_INCLUDES=""
681: AC_MSG_RESULT([yes])
682: break
683: fi
684: done
1.159 gully 685:
1.143 gully 686: fi # if with_gl or with_mesa
1.132 gully 687:
1.208 vatton 688: AC_ARG_ENABLE([svg],
689: AC_HELP_STRING([--disable-svg],[disable SVG support]),
690: [case "${enableval}" in
691: yes) with_svg="yes" ;;
692: no) with_svg="no" ;;
693: *) AC_MSG_ERROR(bad value ${enableval} for --disable-svg) ;;
694: esac],
695: [with_svg="yes"])
696:
1.218 vatton 697: ##########################Annotations Support####################
1.208 vatton 698: dnl
699: dnl annotations are enabled by default
700: dnl
701: AC_ARG_ENABLE([annot],
702: AC_HELP_STRING([--disable-annot],[disable Annotations support]),
703: [case "${enableval}" in
704: yes) with_annot="yes" ;;
705: no) with_annot="no" ;;
706: *) AC_MSG_ERROR(bad value ${enableval} for --disable-annot) ;;
707: esac],
708: [with_annot="yes"])
1.93 kahan 709:
1.108 kahan 710:
1.218 vatton 711: #annot need Redland
712: if test "$with_annot" = "yes" ; then
1.210 vatton 713: with_redland="yes"
714: else
715: with_redland="no"
716: fi
717:
718: AC_ARG_ENABLE([system-redland],
719: AC_HELP_STRING([--enable-system-redland],[try the redland RDF system library]),
720: [case "${enableval}" in
721: yes) with_system_redland="yes";;
722: no) with_system_redland="no" ;;
723: *) AC_MSG_ERROR(bad value ${enableval} for --enable-system-redland) ;;
724: esac],
725: [with_system_redland="no"])
726:
727: #If Redland is needed and we are asked
728: #to use the system library, check if is present
729: if test "$with_redland" = "yes" -a "$with_system_redland" = "yes" ; then
730: # check to see if we have a redland library
731: AC_PATH_PROG([REDLAND_CONFIG],[redland-config])
732:
733: if test "$REDLAND_CONFIG" = "" ; then
734: AC_MSG_WARN(Not using system-provided redland library)
735: with_system_redland="no"
736: else
737:
738: AC_MSG_CHECKING(system redland version)
739: redland_min_version=0.9.16
740: REDLAND_VERSION=`$REDLAND_CONFIG --version`
741: redland_version_dec=`echo $REDLAND_VERSION | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
742: redland_min_version_dec=`echo $redland_min_version | awk -F. '{printf("%d\n", 10000*$1 + 100*$2 + $3)};'`
743: if test $redland_version_dec -lt $redland_min_version_dec; then
744: AC_MSG_RESULT(no - found version $REDLAND_VERSION and minimal version is $redland_min_version)
745: with_system_redland="no"
746: else
747: AC_MSG_RESULT(yes - found version $REDLAND_VERSION)
748: AC_MSG_CHECKING(checking for redland headers)
749: dnl We should use awk here and remove the -I from the following line
750: dnl REDLAND_HEADERS=`$REDLAND_CONFIG --cflags`
751: REDLAND_HEADERS=""
752: if test -e "/usr/include/redland.h" ; then
753: REDLAND_HEADERS="/usr/include";
754: elif test -e "/usr/local/include/redland.h" ; then
755: REDLAND_HEADERS="/usr/local/include";
756: fi
757: if test $REDLAND_HEADERS != ""; then
758: AC_MSG_RESULT(yes - have development version)
759: else
760: AC_MSG_RESULT(no - no development version)
761: with_system_redland="no"
762: fi
763: fi
764: fi
765: fi
766:
767: #if we use the builtin library,
768: #check it is present
769: if test "$with_redland" = "yes" -a "$with_system_redland" != "yes" \
770: -a ! -d "$srcdir/../redland" ; then
771: AC_MSG_WARN(Redland source dir not found !!)
772: AC_MSG_WARN(Disabling redland build !)
773: MAKEREDLAND=['#']
774: with_redland="no"
775: fi
776:
777: #At this point, we know everything about Redland,
778: #so either set the variables we will need later,
1.218 vatton 779: #or disable Annotations
1.210 vatton 780: if test "$with_redland" = "yes" ; then
781: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -DAM_REDLAND"
782: if test "$with_system_redland" != "yes" ; then
1.224 vatton 783: AMAYA_RAPTOR_SRC="amaya_comp_redland"
1.215 vatton 784: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor "
785: AMAYA_RAPTOR_LIBS="../redland/librdf/.libs/librdf.a ../redland/raptor/.libs/libraptor.a"
786: AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/../redland/librdf -I\$(THOTDIR)/../redland/raptor"
1.210 vatton 787: else
1.224 vatton 788: MAKEREDLAND=['#']
789: AMAYA_RAPTOR_SRC=
1.210 vatton 790: redland_includes=`$REDLAND_CONFIG --cflags`
791: redland_libs=`$REDLAND_CONFIG --libs`
792: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS"
793: AMAYA_ANNOT_INCLUDES="$redland_includes -I\$(THOTDIR)/thotlib/include"
794: AMAYA_ANNOT_EXTRA_LIBS="$redland_libs"
795: AMAYA_RAPTOR_INCLUDES="$redland_includes"
796: fi
797: else
798: with_annot="no"
799: fi
800:
1.218 vatton 801: ANNOTLIB_COMPILE_BM=['#']
1.210 vatton 802:
1.218 vatton 803: ###################End of Annotations Support####################
1.210 vatton 804:
805:
1.108 kahan 806: dnl
1.194 vatton 807: dnl The templates support is enabled by default
1.186 tollenae 808: dnl
1.208 vatton 809: AC_ARG_ENABLE([templates],
810: AC_HELP_STRING([--disable-templates],[disable experimental templates support]),
811: [case "${enableval}" in
812: yes) with_templates="yes" ;;
813: no) with_templates="no" ;;
814: *) AC_MSG_ERROR(bad value ${enableval} for --disable-templates) ;;
815: esac],
816: [with_templates="yes"])
817:
818: if test "$with_templates" = yes -a "$with_wx" != "yes"; then
819: AC_MSG_WARN(Templates are only available in WX version !!)
820: AC_MSG_WARN(Disabling templates)
821: with_templates="no"
822: fi
1.197 vatton 823:
1.208 vatton 824: if test "$with_templates" = "yes" ; then
1.194 vatton 825: TEMPLATES_OPTIONS="-DTEMPLATES"
1.186 tollenae 826: else
1.194 vatton 827: TEMPLATES_OPTIONS=""
1.186 tollenae 828: fi
829:
1.194 vatton 830:
1.186 tollenae 831: dnl
1.70 kahan 832: dnl Generic XML support enabled by default
833: dnl
1.208 vatton 834: AC_ARG_ENABLE([generic-xml],
835: AC_HELP_STRING([--disable-generic-xml],[disable Generic XML support]),
836: [case "${enableval}" in
837: yes) with_generic_xml="yes" ;;
838: no) with_generic_xml="no" ;;
839: *) AC_MSG_ERROR(bad value ${enableval} for --disable-generic-xml) ;;
840: esac],
841: [with_generic_xml="yes"])
842:
1.209 vatton 843: if test "$with_generic_xml" = "yes" ; then
844: GENERIC_XML_OPTIONS="-DXML_GENERIC"
845: else
846: GENERIC_XML_OPTIONS=""
847: fi
848:
1.88 kirschpi 849: dnl
1.181 gully 850: dnl WebDAV support enabled by default
1.88 kirschpi 851: dnl
1.218 vatton 852: AC_ARG_WITH(dav, [ --with-dav enable WebDAV support (default) ])
1.88 kirschpi 853: if test "$with_dav" = "" ; then
1.181 gully 854: with_dav="yes"
855: fi
1.88 kirschpi 856: if test "$with_dav" = "yes" ; then
857: DAV_OPTIONS=-DDAV
1.90 kirschpi 858: DAVDIR="davlib"
859: LIBDAV="libwwwdav"
860: WITHDAV="--with-dav"
861: WWWDAV="-lwwwdav"
1.88 kirschpi 862: else
863: with_dav="no"
864: DAV_OPTIONS=""
1.90 kirschpi 865: DAVDIR=""
866: LIBDAV=""
867: WITHDAV=""
868: WWWDAV=""
1.88 kirschpi 869: fi
870:
1.70 kahan 871:
1.19 cvs 872: if test "$build_amaya" = "yes" ; then
1.43 cvs 873: if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50 cvs 874: AC_MSG_WARN(libwww sources not found !!)
875: AC_MSG_WARN(Disabling Amaya build !)
876: build_amaya="no"
1.1 cvs 877: fi
1.8 cvs 878:
879: if test ! -f $srcdir/amaya/MathML.S ; then
1.10 cvs 880: if test "$with_math" = "yes" ; then
1.8 cvs 881: AC_MSG_WARN(MathML sources not found !!)
1.26 cvs 882: AC_MSG_WARN(Disabling Math build !)
1.10 cvs 883: with_math="no"
884: MATH_OPTIONS=
1.8 cvs 885: fi
886: fi
1.26 cvs 887:
1.68 vatton 888: if test ! -f $srcdir/amaya/SVG.S ; then
889: if test "$with_svg" = "yes" ; then
890: AC_MSG_WARN(SVG sources not found !!)
891: AC_MSG_WARN(Disabling SVG build !)
892: with_svg="no"
893: SVG_OPTIONS=
1.26 cvs 894: fi
895: fi
896:
1.88 kirschpi 897: if test ! -f $srcdir/davlib/Makefile.in ; then
898: if test "$with_dav" = "yes" ; then
899: AC_MSG_WARN(WebDAV makefile not found !!)
900: AC_MSG_WARN(Disabling WebDAV build !)
901: with_dav="no"
1.90 kirschpi 902: DAVDIR=""
903: LIBDAV=""
904: WITHDAV=""
905: WWWDAV=""
1.88 kirschpi 906: fi
907: fi
908:
909:
1.1 cvs 910: fi
911:
912: dnl
913: dnl The options for each library or binary
914: dnl
1.231 vatton 915: THOT_OPTIONS="$OS_OPTIONS $GL_OPTIONS $WX_OPTIONS"
1.1 cvs 916:
1.231 vatton 917: AMAYA_OPTIONS="$OS_OPTIONS $MATH_OPTIONS $SVG_OPTIONS $GENERIC_XML_OPTIONS $GL_OPTIONS $WX_OPTIONS $TEMPLATES_OPTIONS"
1.211 vatton 918:
1.179 gully 919: if test "$with_debug" = "yes" ; then
1.211 vatton 920: AMAYA_OPTIONS="$AMAYA_OPTIONS -DAMAYA_DEBUG"
1.179 gully 921: fi
1.101 kahan 922:
1.158 gully 923: if test "$with_wx" = "yes" ; then
924: IMGLIBS=""
925: else
926: IMGLIBS="-ljpeg -lpng -lz"
927: fi
1.132 gully 928:
1.131 gully 929: EXTRA_INCLUDES=
930:
931: # check for malloc.h
932: # on macosx, this file is not at the right place
1.187 gully 933: if test "$AMAYAOS" = "MACOSX" ; then
1.173 carcone 934: for ac_dir in \
935: /Developer/SDKs/MacOSX10.1.5.sdk/usr/include/objc/ \
936: /Developer/SDKs/MacOSX10.1.5.sdk/usr/include/sys/ \
937: /Developer/SDKs/MacOSX10.2.8.sdk/usr/include/objc/ \
938: /Developer/SDKs/MacOSX10.2.8.sdk/usr/include/sys/ \
939: /Developer/SDKs/MacOSX10.3.0.sdk/usr/include/objc/ \
940: /Developer/SDKs/MacOSX10.3.0.sdk/usr/include/sys/ \
941: ; \
942: do
943: if test -r "$ac_dir/malloc.h"; then
944: echo "found malloc.h"
945: EXTRA_INCLUDES="${EXTRA_INCLUDES} -I$ac_dir"
946: break
947: fi
948: done
1.187 gully 949: else # "$AMAYAOS" = "MACOSX"
1.131 gully 950: for ac_dir in \
951: /usr/include/malloc/ \
952: /sw/include/malloc/ \
953: ; \
954: do
955: if test -r "$ac_dir/malloc.h"; then
956: echo "found malloc.h"
957: EXTRA_INCLUDES="${EXTRA_INCLUDES} -I$ac_dir"
958: break
959: fi
960: done
1.187 gully 961: fi # "$AMAYAOS" = "MACOSX"
1.1 cvs 962:
963: dnl
964: dnl Set up the PATHs needed
965: dnl
966:
967: API="\$(THOTDIR)/thotlib/include"
968: VAR="\$(THOTDIR)/thotlib/internals/var"
969: INCL="\$(THOTDIR)/thotlib/internals/h"
970: FUNC="\$(THOTDIR)/thotlib/internals/f"
971:
972: dnl
973: dnl Set up the include variables.
974: dnl
975:
1.61 cvs 976: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58 cvs 977: APIINCLUDES=-I${API}
978:
979: if test "${VPATHOPT}" = "" ; then
1.1 cvs 980: VPATHOPT="VPATH"
981: fi
982:
1.217 vatton 983: AMAYA_INSTALLDIR="Amaya"
1.206 vatton 984:
1.1 cvs 985: dnl
986: dnl Exports the current values of the variables.
987: dnl
988:
1.206 vatton 989: AC_SUBST(AMAYA_INSTALLDIR)
990:
1.166 gully 991: AC_SUBST(APP_MAJVER)
992: AC_SUBST(APP_MINVER)
993: AC_SUBST(APP_SUBVER)
994: AC_SUBST(APP_VER)
1.6 cvs 995: AC_SUBST(CEXTRACT_VER)
996: AC_SUBST(CEXTRACT_FLAGS)
1.1 cvs 997:
998: AC_SUBST(THOTINCLUDES)
999: AC_SUBST(APIINCLUDES)
1000: AC_SUBST(VPATHOPT)
1001:
1002: AC_SUBST(THOT_OPTIONS)
1003: AC_SUBST(AMAYA_OPTIONS)
1.48 cvs 1004: AC_SUBST(AMAYA_ANNOT_OPTIONS)
1.110 kahan 1005: AC_SUBST(AMAYA_ANNOT_INCLUDES)
1.116 kahan 1006: AC_SUBST(AMAYA_ANNOT_EXTRA_LIBS)
1.1 cvs 1007: AC_SUBST(IMGLIBS)
1.131 gully 1008: AC_SUBST(EXTRA_INCLUDES)
1.90 kirschpi 1009:
1010: AC_SUBST(DAVDIR)
1011: AC_SUBST(LIBDAV)
1012: AC_SUBST(WITHDAV)
1013: AC_SUBST(WWWDAV)
1.1 cvs 1014:
1.224 vatton 1015: AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
1016: AC_SUBST(LIBWWW_RDF_PARSER)
1017: AC_SUBST(MAKEREDLAND)
1018: #AC_SUBST(ANNOTLIB_COMPILE_BM)
1019: AC_SUBST(AMAYA_RAPTOR_SRC)
1.93 kahan 1020: AC_SUBST(AMAYA_RAPTOR_LIBS)
1021: AC_SUBST(AMAYA_RAPTOR_INCLUDES)
1022:
1023: AC_SUBST(SUBDIRS)
1024:
1.1 cvs 1025: dnl
1.48 cvs 1026: dnl Include the option Makefile.xxx fragment according to the configure options
1.1 cvs 1027: dnl
1028:
1.211 vatton 1029: www_frag=$srcdir/amaya/Makefile.libwww
1030: AC_SUBST_FILE(www_frag)
1.1 cvs 1031:
1.50 cvs 1032: if test "$with_math" = "no" ; then
1033: math_frag=/dev/null
1.8 cvs 1034: else
1.50 cvs 1035: math_frag=$srcdir/amaya/Makefile.math
1.8 cvs 1036: fi
1.211 vatton 1037: AC_SUBST_FILE(math_frag)
1.8 cvs 1038:
1.68 vatton 1039: if test "$with_svg" = "no" ; then
1040: svg_frag=/dev/null
1.26 cvs 1041: else
1.68 vatton 1042: svg_frag=$srcdir/amaya/Makefile.svg
1.26 cvs 1043: fi
1.211 vatton 1044: AC_SUBST_FILE(svg_frag)
1.26 cvs 1045:
1.47 cvs 1046: if test "$with_annot" = "yes" ; then
1.48 cvs 1047: annot_frag=$srcdir/annotlib/Makefile.annot
1.47 cvs 1048: else
1049: annot_frag=/dev/null
1050: fi
1.211 vatton 1051: AC_SUBST_FILE(annot_frag)
1.47 cvs 1052:
1.88 kirschpi 1053: if test "$with_dav" = "yes" ; then
1054: dav_frag=$srcdir/davlib/Makefile.dav
1.188 vatton 1055: else
1056: dav_frag=/dev/null
1.88 kirschpi 1057: fi
1.211 vatton 1058: AC_SUBST_FILE(dav_frag)
1.16 cvs 1059:
1.186 tollenae 1060: if test "$with_templates" = "yes" ; then
1061: templates_frag=$srcdir/amaya/Makefile.templates
1.188 vatton 1062: else
1063: templates_frag=/dev/null
1.186 tollenae 1064: fi
1.211 vatton 1065: AC_SUBST_FILE(templates_frag)
1.186 tollenae 1066:
1.1 cvs 1067: dnl ***************************************************************
1068: dnl
1069: dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
1070: dnl
1071: dnl ***************************************************************
1072:
1073: EXTRA_MAKEFILE_IN=
1.2 cvs 1074: make_output="Makefile Options.orig:Options.in tools/Makefile \
1.1 cvs 1075: libjpeg/Makefile libpng/Makefile libpng/zlib/Makefile \
1.2 cvs 1076: tools/mkdep/Makefile \
1.1 cvs 1077: tools/cextract-1.7/Makefile thotlib/Makefile \
1.193 gully 1078: thotlib/include/Makefile batch/Makefile \
1079: script_install:../batch/script_install.in \
1080: script_install_gnomekde:../batch/script_install_gnomekde.in \
1081: script_install_macosxbundle:../batch/script_install_macosxbundle.in \
1082: script_uninstall:../batch/script_uninstall.in"
1.1 cvs 1083:
1084: if test "$build_amaya" = "yes" ; then
1.208 vatton 1085: make_output="$make_output amaya/Makefile"
1.2 cvs 1086: EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.93 kahan 1087: $srcdir/amaya/Makefile.libwww"
1.27 cvs 1088:
1.48 cvs 1089: if test "$with_annot" = "yes" ; then
1090: make_output="$make_output annotlib/Makefile"
1091: EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
1092: fi
1.88 kirschpi 1093:
1094: if test "$with_dav" = "yes" ; then
1095: make_output="$make_output davlib/Makefile"
1096: EXTRA_MAKEFILE_IN="$srcdir/davlib/Makefile.in"
1097: fi
1098:
1.205 vatton 1099: if test "$with_wx" = "yes" -a "enable_system_wx" = "yes" ; then
1.162 gully 1100: EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN $WX_SRCDIR/Makefile.in $WX_SRCDIR/configure.in"
1101: fi
1102:
1.1 cvs 1103: fi
1104:
1.221 vatton 1105: dnl
1106: dnl Generate the script
1107: dnl
1108: if test "$AMAYAOS" != "MACOSX" ; then
1109: if test ! -d bin ; then
1110: mkdir -p bin
1111: fi
1112: make_output="$make_output bin/amaya:../batch/amaya.in"
1113: fi
1114:
1.1 cvs 1115: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6 cvs 1116: AC_OUTPUT($make_output , [
1117: dnl
1118: dnl This fragment of shell code is executed after the
1119: dnl Makefile(s) dump ...
1120: dnl
1121:
1122: echo timestamp > stamp-h
1123:
1124: dnl
1125: dnl Check for an upgrade in the Options numbers
1126: dnl
1127: if test -f Options ; then
1128: oldversion=`grep Version Options`
1129: newversion=`grep Version Options.orig`
1130: if test "$oldversion" != "$newversion" ; then
1131: echo WARNING : Options files have changed, old options saved to Options.old
1132: cp Options Options.old
1133: cp Options.orig Options
1134: exit 1
1135: fi
1136: fi
1.193 gully 1137: if test -f script_install ; then
1138: chmod a+x script_install
1139: fi
1140: if test -f script_install_gnomekde ; then
1141: chmod a+x script_install_gnomekde
1142: fi
1143: if test -f script_install_macosxbundle ; then
1144: chmod a+x script_install_macosxbundle
1145: fi
1146: if test -f script_uninstall ; then
1147: chmod a+x script_uninstall
1148: fi
1.227 vatton 1149: if test -f bin/amaya ; then
1150: chmod 755 bin/amaya
1151: echo WARNING : `ls -l bin/amaya`
1152: fi
1.6 cvs 1153: ])
1.1 cvs 1154:
1.222 cvs 1155: dnl
1.1 cvs 1156: if test "$build_amaya" = "yes" ; then
1.164 gully 1157: echo Amaya $AMAYA_VER configured
1.230 vatton 1158: echo Amaya configured with libWWW \(local source\)
1.10 cvs 1159: if test "$with_math" = "yes" ; then
1160: echo Amaya configured with Math support
1.26 cvs 1161: fi
1.68 vatton 1162: if test "$with_svg" = "yes" ; then
1163: echo Amaya configured with SVG support
1.47 cvs 1164: fi
1165: if test "$with_annot" = "yes" ; then
1166: echo Amaya configured with Annotations support
1.70 kahan 1167: fi
1.109 kahan 1168: if test "$with_redland" = "yes" ; then
1.116 kahan 1169: if test "$with_system_redland" = "no" ; then
1170: echo Amaya configured with the Redland RDF library \(local source\)
1171: else
1172: echo Amaya configured with the Redland RDF library \(system\)
1173: fi
1.108 kahan 1174: fi
1.186 tollenae 1175: if test "$with_templates" = "yes" ; then
1.230 vatton 1176: echo Amaya configured with templates support
1.186 tollenae 1177: fi
1.70 kahan 1178: if test "$with_generic_xml" = "yes" ; then
1.195 vatton 1179: echo Amaya configured with generic XML support
1.70 kahan 1180: fi
1.195 vatton 1181: echo Amaya configured with internationalization support
1.75 cheyroul 1182: if test "$with_gl" = "yes" ; then
1.143 gully 1183: echo Amaya configured with OpenGL Canvas Rendering \(System library\) \(experimental\)
1184: fi
1185: if test "$with_mesa" = "yes" ; then
1.181 gully 1186: echo Amaya configured with OpenGL Canvas Rendering \(MesaLib\)
1.88 kirschpi 1187: fi
1188: if test "$with_dav" = "yes" ; then
1.181 gully 1189: echo Amaya configured with WebDAV support
1.1 cvs 1190: fi
1.5 cvs 1191: fi
1192:
1.124 gully 1193: if test "$with_wx" = "yes" ; then
1.136 gully 1194: if test "$with_wxdebug" = "yes" ; then
1.181 gully 1195: echo "Amaya configured with wxWidgets {srcdir=$WX_SRCDIR} (debug)"
1.136 gully 1196: else
1.181 gully 1197: echo "Amaya configured with wxWidgets {srcdir=$WX_SRCDIR}"
1.136 gully 1198: fi
1.1 cvs 1199: fi
1200:
1.136 gully 1201:
1.107 kahan 1202: echo ""
1.78 vatton 1203: echo "Now type \"make\" (GNU make preferably) to build the binaries"
1.107 kahan 1204: echo ""
1.120 gully 1205:
Webmaster