Annotation of Amaya/configure.in, revision 1.239
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.233 vatton 354: WXCONFIGURE_OPTION="--with-opengl --disable-shared --disable-tga --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
1.234 vatton 434: AMAYAWX_MAJVER=10
1.235 vatton 435: AMAYAWX_MINVER=1
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.237 vatton 711: #annot need Raptor
1.218 vatton 712: if test "$with_annot" = "yes" ; then
1.237 vatton 713: with_raptor="yes"
1.210 vatton 714: else
1.237 vatton 715: with_raptor="no"
1.210 vatton 716: fi
717:
1.237 vatton 718: AC_ARG_ENABLE([system-raptor],
719: AC_HELP_STRING([--enable-system-raptor],[try the raptor RDF system library]),
1.210 vatton 720: [case "${enableval}" in
1.237 vatton 721: yes) with_system_raptor="yes";;
722: no) with_system_raptor="no" ;;
723: *) AC_MSG_ERROR(bad value ${enableval} for --enable-system-raptor) ;;
1.210 vatton 724: esac],
1.237 vatton 725: [with_system_raptor="no"])
1.210 vatton 726:
1.237 vatton 727: #If Raptor is needed and we are asked
1.210 vatton 728: #to use the system library, check if is present
1.237 vatton 729: if test "$with_raptor" = "yes" -a "$with_system_raptor" = "yes" ; then
730: # check to see if we have a raptor library
731: AC_PATH_PROG([RAPTOR_CONFIG],[raptor-config])
732:
733: if test "$RAPTOR_CONFIG" = "" ; then
1.239 ! vatton 734: AC_MSG_WARN(Not using system-provided Raptor library)
! 735: with_system_raptor="no"
1.210 vatton 736: fi
737: fi
738:
739: #if we use the builtin library,
740: #check it is present
1.237 vatton 741: if test "$with_raptor" = "yes" -a "$with_system_raptor" != "yes" \
742: -a ! -d "$srcdir/../redland/raptor" ; then
743: AC_MSG_WARN(Raptor source dir not found !!)
744: AC_MSG_WARN(Disabling raptor build !)
745: with_raptor="no"
1.210 vatton 746: fi
747:
1.237 vatton 748: #At this point, we know everything about Raptor,
1.210 vatton 749: #so either set the variables we will need later,
1.218 vatton 750: #or disable Annotations
1.237 vatton 751: if test "$with_raptor" = "yes" ; then
752: if test "$with_system_raptor" != "yes" ; then
753: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS -I\$(THOTDIR)/../redland/raptor "
1.238 vatton 754: AMAYA_RAPTOR_LIBS="../raptor/.libs/libraptor.a"
1.237 vatton 755: AMAYA_RAPTOR_INCLUDES="-I\$(THOTDIR)/../redland/raptor"
756: BUILDRAPTOR="raptor"
757: CURRENTPATH="`pwd`"
758: mkdir $BUILDRAPTOR
759: cd $BUILDRAPTOR &&
760: CC="$CC" CXX="$CXX" \
761: CPPFLAGS="-I$CURRENTPATH/../../libwww/modules/expat/lib" \
762: LDFLAGS="-L$CURRENTPATH/libwww/modules/expat -L$CURRENTPATH/libwww/modules/expat/.libs" \
763: ../../../redland/raptor/configure \
764: --build=$build_alias --host=$host_alias --target=$target_alias \
765: --disable-shared \
766: --with-xml-parser=expat \
767: --with-www=none
768: $ECHO "Raptor is configured"
769: $ECHO "Patching the raptor_config.h file to avoid including glib2-0"
770: $CP raptor_config.h raptor_config.h.orig
771: $SED "s/\(\#define HAVE_G_UTF8_NORMALIZE 1\)/\/* \1 *\//" \
772: raptor_config.h.orig > raptor_config.h
773: $RM raptor_config.h.orig
774: $ECHO "Raptor is patched"
775: cd ..
1.210 vatton 776: else
1.237 vatton 777: raptor_includes=`$RAPTOR_CONFIG --cflags`
1.239 ! vatton 778: raptor_libs="-lraptor"
! 779: BUILDRAPTOR=""
1.210 vatton 780: AMAYA_ANNOT_OPTIONS="$AMAYA_ANNOT_OPTIONS"
1.237 vatton 781: AMAYA_ANNOT_INCLUDES="$raptor_includes -I\$(THOTDIR)/thotlib/include"
782: AMAYA_ANNOT_EXTRA_LIBS="$raptor_libs"
783: AMAYA_RAPTOR_INCLUDES="$raptor_includes"
1.210 vatton 784: fi
785: else
786: with_annot="no"
787: fi
788:
1.218 vatton 789: ANNOTLIB_COMPILE_BM=['#']
1.210 vatton 790:
1.237 vatton 791: AC_SUBST(BUILDRAPTOR)
792:
793: AC_SUBST(AMAYA_ANNOT_OPTIONS)
794: AC_SUBST(AMAYA_ANNOT_INCLUDES)
795: AC_SUBST(AMAYA_ANNOT_EXTRA_LIBS)
796:
797: AC_SUBST(ANNOTLIB_COMPILE_BM)
798: AC_SUBST(AMAYA_RAPTOR_LIBS)
799: AC_SUBST(AMAYA_RAPTOR_INCLUDES)
800:
1.218 vatton 801: ###################End of Annotations Support####################
1.210 vatton 802:
803:
1.108 kahan 804: dnl
1.194 vatton 805: dnl The templates support is enabled by default
1.186 tollenae 806: dnl
1.208 vatton 807: AC_ARG_ENABLE([templates],
808: AC_HELP_STRING([--disable-templates],[disable experimental templates support]),
809: [case "${enableval}" in
810: yes) with_templates="yes" ;;
811: no) with_templates="no" ;;
812: *) AC_MSG_ERROR(bad value ${enableval} for --disable-templates) ;;
813: esac],
814: [with_templates="yes"])
815:
816: if test "$with_templates" = yes -a "$with_wx" != "yes"; then
817: AC_MSG_WARN(Templates are only available in WX version !!)
818: AC_MSG_WARN(Disabling templates)
819: with_templates="no"
820: fi
1.197 vatton 821:
1.208 vatton 822: if test "$with_templates" = "yes" ; then
1.194 vatton 823: TEMPLATES_OPTIONS="-DTEMPLATES"
1.186 tollenae 824: else
1.194 vatton 825: TEMPLATES_OPTIONS=""
1.186 tollenae 826: fi
827:
1.194 vatton 828:
1.186 tollenae 829: dnl
1.70 kahan 830: dnl Generic XML support enabled by default
831: dnl
1.208 vatton 832: AC_ARG_ENABLE([generic-xml],
833: AC_HELP_STRING([--disable-generic-xml],[disable Generic XML support]),
834: [case "${enableval}" in
835: yes) with_generic_xml="yes" ;;
836: no) with_generic_xml="no" ;;
837: *) AC_MSG_ERROR(bad value ${enableval} for --disable-generic-xml) ;;
838: esac],
839: [with_generic_xml="yes"])
840:
1.209 vatton 841: if test "$with_generic_xml" = "yes" ; then
842: GENERIC_XML_OPTIONS="-DXML_GENERIC"
843: else
844: GENERIC_XML_OPTIONS=""
845: fi
846:
1.88 kirschpi 847: dnl
1.181 gully 848: dnl WebDAV support enabled by default
1.88 kirschpi 849: dnl
1.218 vatton 850: AC_ARG_WITH(dav, [ --with-dav enable WebDAV support (default) ])
1.88 kirschpi 851: if test "$with_dav" = "" ; then
1.181 gully 852: with_dav="yes"
853: fi
1.88 kirschpi 854: if test "$with_dav" = "yes" ; then
855: DAV_OPTIONS=-DDAV
1.90 kirschpi 856: DAVDIR="davlib"
857: LIBDAV="libwwwdav"
858: WITHDAV="--with-dav"
859: WWWDAV="-lwwwdav"
1.88 kirschpi 860: else
861: with_dav="no"
862: DAV_OPTIONS=""
1.90 kirschpi 863: DAVDIR=""
864: LIBDAV=""
865: WITHDAV=""
866: WWWDAV=""
1.88 kirschpi 867: fi
868:
1.70 kahan 869:
1.19 cvs 870: if test "$build_amaya" = "yes" ; then
1.43 cvs 871: if test ! -f $srcdir/../libwww/Makefile.in ; then
1.50 cvs 872: AC_MSG_WARN(libwww sources not found !!)
873: AC_MSG_WARN(Disabling Amaya build !)
874: build_amaya="no"
1.1 cvs 875: fi
1.8 cvs 876:
877: if test ! -f $srcdir/amaya/MathML.S ; then
1.10 cvs 878: if test "$with_math" = "yes" ; then
1.8 cvs 879: AC_MSG_WARN(MathML sources not found !!)
1.26 cvs 880: AC_MSG_WARN(Disabling Math build !)
1.10 cvs 881: with_math="no"
882: MATH_OPTIONS=
1.8 cvs 883: fi
884: fi
1.26 cvs 885:
1.68 vatton 886: if test ! -f $srcdir/amaya/SVG.S ; then
887: if test "$with_svg" = "yes" ; then
888: AC_MSG_WARN(SVG sources not found !!)
889: AC_MSG_WARN(Disabling SVG build !)
890: with_svg="no"
891: SVG_OPTIONS=
1.26 cvs 892: fi
893: fi
894:
1.88 kirschpi 895: if test ! -f $srcdir/davlib/Makefile.in ; then
896: if test "$with_dav" = "yes" ; then
897: AC_MSG_WARN(WebDAV makefile not found !!)
898: AC_MSG_WARN(Disabling WebDAV build !)
899: with_dav="no"
1.90 kirschpi 900: DAVDIR=""
901: LIBDAV=""
902: WITHDAV=""
903: WWWDAV=""
1.88 kirschpi 904: fi
905: fi
906:
907:
1.1 cvs 908: fi
909:
910: dnl
911: dnl The options for each library or binary
912: dnl
1.231 vatton 913: THOT_OPTIONS="$OS_OPTIONS $GL_OPTIONS $WX_OPTIONS"
1.1 cvs 914:
1.231 vatton 915: AMAYA_OPTIONS="$OS_OPTIONS $MATH_OPTIONS $SVG_OPTIONS $GENERIC_XML_OPTIONS $GL_OPTIONS $WX_OPTIONS $TEMPLATES_OPTIONS"
1.211 vatton 916:
1.179 gully 917: if test "$with_debug" = "yes" ; then
1.211 vatton 918: AMAYA_OPTIONS="$AMAYA_OPTIONS -DAMAYA_DEBUG"
1.179 gully 919: fi
1.101 kahan 920:
1.158 gully 921: if test "$with_wx" = "yes" ; then
922: IMGLIBS=""
923: else
924: IMGLIBS="-ljpeg -lpng -lz"
925: fi
1.132 gully 926:
1.131 gully 927: EXTRA_INCLUDES=
928:
929: # check for malloc.h
930: # on macosx, this file is not at the right place
1.187 gully 931: if test "$AMAYAOS" = "MACOSX" ; then
1.173 carcone 932: for ac_dir in \
933: /Developer/SDKs/MacOSX10.1.5.sdk/usr/include/objc/ \
934: /Developer/SDKs/MacOSX10.1.5.sdk/usr/include/sys/ \
935: /Developer/SDKs/MacOSX10.2.8.sdk/usr/include/objc/ \
936: /Developer/SDKs/MacOSX10.2.8.sdk/usr/include/sys/ \
937: /Developer/SDKs/MacOSX10.3.0.sdk/usr/include/objc/ \
938: /Developer/SDKs/MacOSX10.3.0.sdk/usr/include/sys/ \
1.233 vatton 939: /Developer/SDKs/MacOSX10.4u.sdk/usr/include/objc/ \
940: /Developer/SDKs/MacOSX10.4u.sdk/usr/include/sys/ \
941: /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/objc/ \
942: /Developer/SDKs/MacOSX10.3.9.sdk/usr/include/sys/ \
1.173 carcone 943: ; \
944: do
945: if test -r "$ac_dir/malloc.h"; then
946: echo "found malloc.h"
947: EXTRA_INCLUDES="${EXTRA_INCLUDES} -I$ac_dir"
948: break
949: fi
950: done
1.187 gully 951: else # "$AMAYAOS" = "MACOSX"
1.131 gully 952: for ac_dir in \
953: /usr/include/malloc/ \
954: /sw/include/malloc/ \
955: ; \
956: do
957: if test -r "$ac_dir/malloc.h"; then
958: echo "found malloc.h"
959: EXTRA_INCLUDES="${EXTRA_INCLUDES} -I$ac_dir"
960: break
961: fi
962: done
1.187 gully 963: fi # "$AMAYAOS" = "MACOSX"
1.1 cvs 964:
965: dnl
966: dnl Set up the PATHs needed
967: dnl
968:
969: API="\$(THOTDIR)/thotlib/include"
970: VAR="\$(THOTDIR)/thotlib/internals/var"
971: INCL="\$(THOTDIR)/thotlib/internals/h"
972: FUNC="\$(THOTDIR)/thotlib/internals/f"
973:
974: dnl
975: dnl Set up the include variables.
976: dnl
977:
1.61 cvs 978: THOTINCLUDES="-I${API} -I${VAR} -I${INCL} -I${FUNC} ${JPEGINCL} ${PNGINCL}"
1.58 cvs 979: APIINCLUDES=-I${API}
980:
981: if test "${VPATHOPT}" = "" ; then
1.1 cvs 982: VPATHOPT="VPATH"
983: fi
984:
1.217 vatton 985: AMAYA_INSTALLDIR="Amaya"
1.206 vatton 986:
1.1 cvs 987: dnl
988: dnl Exports the current values of the variables.
989: dnl
990:
1.206 vatton 991: AC_SUBST(AMAYA_INSTALLDIR)
992:
1.166 gully 993: AC_SUBST(APP_MAJVER)
994: AC_SUBST(APP_MINVER)
995: AC_SUBST(APP_SUBVER)
996: AC_SUBST(APP_VER)
1.6 cvs 997: AC_SUBST(CEXTRACT_VER)
998: AC_SUBST(CEXTRACT_FLAGS)
1.1 cvs 999:
1000: AC_SUBST(THOTINCLUDES)
1001: AC_SUBST(APIINCLUDES)
1002: AC_SUBST(VPATHOPT)
1003:
1004: AC_SUBST(THOT_OPTIONS)
1005: AC_SUBST(AMAYA_OPTIONS)
1006: AC_SUBST(IMGLIBS)
1.131 gully 1007: AC_SUBST(EXTRA_INCLUDES)
1.90 kirschpi 1008:
1009: AC_SUBST(DAVDIR)
1010: AC_SUBST(LIBDAV)
1011: AC_SUBST(WITHDAV)
1012: AC_SUBST(WWWDAV)
1.1 cvs 1013:
1.224 vatton 1014: AC_SUBST(MAKE_LIBWWW_RDF_PARSER)
1015: AC_SUBST(LIBWWW_RDF_PARSER)
1016: #AC_SUBST(ANNOTLIB_COMPILE_BM)
1.93 kahan 1017: AC_SUBST(AMAYA_RAPTOR_LIBS)
1018: AC_SUBST(AMAYA_RAPTOR_INCLUDES)
1019:
1020: AC_SUBST(SUBDIRS)
1021:
1.1 cvs 1022: dnl
1.48 cvs 1023: dnl Include the option Makefile.xxx fragment according to the configure options
1.1 cvs 1024: dnl
1025:
1.211 vatton 1026: www_frag=$srcdir/amaya/Makefile.libwww
1027: AC_SUBST_FILE(www_frag)
1.1 cvs 1028:
1.50 cvs 1029: if test "$with_math" = "no" ; then
1030: math_frag=/dev/null
1.8 cvs 1031: else
1.50 cvs 1032: math_frag=$srcdir/amaya/Makefile.math
1.8 cvs 1033: fi
1.211 vatton 1034: AC_SUBST_FILE(math_frag)
1.8 cvs 1035:
1.68 vatton 1036: if test "$with_svg" = "no" ; then
1037: svg_frag=/dev/null
1.26 cvs 1038: else
1.68 vatton 1039: svg_frag=$srcdir/amaya/Makefile.svg
1.26 cvs 1040: fi
1.211 vatton 1041: AC_SUBST_FILE(svg_frag)
1.26 cvs 1042:
1.47 cvs 1043: if test "$with_annot" = "yes" ; then
1.48 cvs 1044: annot_frag=$srcdir/annotlib/Makefile.annot
1.47 cvs 1045: else
1046: annot_frag=/dev/null
1047: fi
1.211 vatton 1048: AC_SUBST_FILE(annot_frag)
1.47 cvs 1049:
1.88 kirschpi 1050: if test "$with_dav" = "yes" ; then
1051: dav_frag=$srcdir/davlib/Makefile.dav
1.188 vatton 1052: else
1053: dav_frag=/dev/null
1.88 kirschpi 1054: fi
1.211 vatton 1055: AC_SUBST_FILE(dav_frag)
1.16 cvs 1056:
1.186 tollenae 1057: if test "$with_templates" = "yes" ; then
1058: templates_frag=$srcdir/amaya/Makefile.templates
1.188 vatton 1059: else
1060: templates_frag=/dev/null
1.186 tollenae 1061: fi
1.211 vatton 1062: AC_SUBST_FILE(templates_frag)
1.186 tollenae 1063:
1.1 cvs 1064: dnl ***************************************************************
1065: dnl
1066: dnl FINAL STEP : PRODUCE ALL THE MAKEFILES AND CONFIG FILES
1067: dnl
1068: dnl ***************************************************************
1069:
1070: EXTRA_MAKEFILE_IN=
1.2 cvs 1071: make_output="Makefile Options.orig:Options.in tools/Makefile \
1072: tools/mkdep/Makefile \
1.1 cvs 1073: tools/cextract-1.7/Makefile thotlib/Makefile \
1.193 gully 1074: thotlib/include/Makefile batch/Makefile \
1075: script_install:../batch/script_install.in \
1076: script_install_gnomekde:../batch/script_install_gnomekde.in \
1077: script_install_macosxbundle:../batch/script_install_macosxbundle.in \
1078: script_uninstall:../batch/script_uninstall.in"
1.1 cvs 1079:
1080: if test "$build_amaya" = "yes" ; then
1.208 vatton 1081: make_output="$make_output amaya/Makefile"
1.2 cvs 1082: EXTRA_MAKEFILE_IN="$srcdir/amaya/Makefile.in \
1.93 kahan 1083: $srcdir/amaya/Makefile.libwww"
1.27 cvs 1084:
1.48 cvs 1085: if test "$with_annot" = "yes" ; then
1086: make_output="$make_output annotlib/Makefile"
1087: EXTRA_MAKEFILE_IN="$srcdir/annotlib/Makefile.in"
1088: fi
1.88 kirschpi 1089:
1090: if test "$with_dav" = "yes" ; then
1091: make_output="$make_output davlib/Makefile"
1092: EXTRA_MAKEFILE_IN="$srcdir/davlib/Makefile.in"
1093: fi
1094:
1.205 vatton 1095: if test "$with_wx" = "yes" -a "enable_system_wx" = "yes" ; then
1.162 gully 1096: EXTRA_MAKEFILE_IN="$EXTRA_MAKEFILE_IN $WX_SRCDIR/Makefile.in $WX_SRCDIR/configure.in"
1097: fi
1098:
1.1 cvs 1099: fi
1100:
1.221 vatton 1101: dnl
1102: dnl Generate the script
1103: dnl
1104: if test "$AMAYAOS" != "MACOSX" ; then
1105: if test ! -d bin ; then
1106: mkdir -p bin
1107: fi
1108: make_output="$make_output bin/amaya:../batch/amaya.in"
1109: fi
1110:
1.1 cvs 1111: AC_SUBST(EXTRA_MAKEFILE_IN)
1.6 cvs 1112: AC_OUTPUT($make_output , [
1113: dnl
1114: dnl This fragment of shell code is executed after the
1115: dnl Makefile(s) dump ...
1116: dnl
1117:
1118: echo timestamp > stamp-h
1119:
1120: dnl
1121: dnl Check for an upgrade in the Options numbers
1122: dnl
1123: if test -f Options ; then
1124: oldversion=`grep Version Options`
1125: newversion=`grep Version Options.orig`
1126: if test "$oldversion" != "$newversion" ; then
1127: echo WARNING : Options files have changed, old options saved to Options.old
1128: cp Options Options.old
1129: cp Options.orig Options
1130: exit 1
1131: fi
1132: fi
1.193 gully 1133: if test -f script_install ; then
1134: chmod a+x script_install
1135: fi
1136: if test -f script_install_gnomekde ; then
1137: chmod a+x script_install_gnomekde
1138: fi
1139: if test -f script_install_macosxbundle ; then
1140: chmod a+x script_install_macosxbundle
1141: fi
1142: if test -f script_uninstall ; then
1143: chmod a+x script_uninstall
1144: fi
1.227 vatton 1145: if test -f bin/amaya ; then
1146: chmod 755 bin/amaya
1147: echo WARNING : `ls -l bin/amaya`
1148: fi
1.6 cvs 1149: ])
1.1 cvs 1150:
1.222 cvs 1151: dnl
1.1 cvs 1152: if test "$build_amaya" = "yes" ; then
1.164 gully 1153: echo Amaya $AMAYA_VER configured
1.230 vatton 1154: echo Amaya configured with libWWW \(local source\)
1.10 cvs 1155: if test "$with_math" = "yes" ; then
1156: echo Amaya configured with Math support
1.26 cvs 1157: fi
1.68 vatton 1158: if test "$with_svg" = "yes" ; then
1159: echo Amaya configured with SVG support
1.47 cvs 1160: fi
1161: if test "$with_annot" = "yes" ; then
1162: echo Amaya configured with Annotations support
1.239 ! vatton 1163: if test "$with_system_raptor" = "yes" ; then
! 1164: echo Amaya configured with the RaptorF library \(system\)
! 1165: else
! 1166: echo Amaya configured with the Raptor library \(system\)
! 1167: fi
1.108 kahan 1168: fi
1.186 tollenae 1169: if test "$with_templates" = "yes" ; then
1.230 vatton 1170: echo Amaya configured with templates support
1.186 tollenae 1171: fi
1.70 kahan 1172: if test "$with_generic_xml" = "yes" ; then
1.195 vatton 1173: echo Amaya configured with generic XML support
1.70 kahan 1174: fi
1.195 vatton 1175: echo Amaya configured with internationalization support
1.75 cheyroul 1176: if test "$with_gl" = "yes" ; then
1.143 gully 1177: echo Amaya configured with OpenGL Canvas Rendering \(System library\) \(experimental\)
1178: fi
1179: if test "$with_mesa" = "yes" ; then
1.181 gully 1180: echo Amaya configured with OpenGL Canvas Rendering \(MesaLib\)
1.88 kirschpi 1181: fi
1182: if test "$with_dav" = "yes" ; then
1.181 gully 1183: echo Amaya configured with WebDAV support
1.1 cvs 1184: fi
1.5 cvs 1185: fi
1186:
1.124 gully 1187: if test "$with_wx" = "yes" ; then
1.136 gully 1188: if test "$with_wxdebug" = "yes" ; then
1.181 gully 1189: echo "Amaya configured with wxWidgets {srcdir=$WX_SRCDIR} (debug)"
1.136 gully 1190: else
1.181 gully 1191: echo "Amaya configured with wxWidgets {srcdir=$WX_SRCDIR}"
1.136 gully 1192: fi
1.1 cvs 1193: fi
1194:
1.136 gully 1195:
1.107 kahan 1196: echo ""
1.78 vatton 1197: echo "Now type \"make\" (GNU make preferably) to build the binaries"
1.107 kahan 1198: echo ""
1.120 gully 1199:
Webmaster