1
AC_INIT([3Depict], [0.0.10], [mycae@yahoo.com])
1
AC_INIT([3Depict], [0.0.13], [mycae@yahoo.com])
2
2
AM_INIT_AUTOMAKE([foreign])
5
AM_CONFIG_HEADER([config.h])
5
AC_CONFIG_HEADERS([config.h])
6
6
AC_CONFIG_FILES([Makefile src/Makefile])
8
#Lets check if we have windres, and assume this only exists under
10
AM_CONDITIONAL(HAVE_WINDRES, which windres > /dev/null)
12
8
#Ok, lets try using gcc style precompiled headers.
13
9
AM_CONDITIONAL(USE_PRECOMPILED_HEADERS, 1)
35
AM_CONDITIONAL(HAVE_WINDRES, which ${host_os}windres > /dev/null && which windres >> /dev/null)
39
37
#Append the --gl-libs flag
40
38
WX_LIBS="$WX_LIBS `$WX_CONFIG_PATH --gl-libs`"
42
#wx-config is a little unreliable in cross-compile mode
43
# Manually append -DUNICODE to cppflags/cxxflags
44
WX_CXXFLAGS="$WX_CXXFLAGS -DUNICODE"
45
WX_CPPFLAGS="$WX_CPPFLAGS -DUNICODE"
212
221
PNG_LIBS="$with_libpng_link"
214
PKG_CHECK_MODULES(PNG, libpng >= 1.2)
224
AC_CHECK_LIB([png],[png_create_write_struct_2] ,
225
[PNG_LIBS=-lpng], [PNG_USE_PKG_CFG=yes],-lm)
227
if test x"$PNG_USE_PKG_CFG" == x"yes" ; then
228
PKG_CHECK_MODULES(PNG, libpng >= 1.2)
217
232
AC_SUBST(PNG_LIBS)
260
275
#Check for Mathgl
262
277
CFLAGS_ORIG="$CFLAGS"
278
LDFLAGS_ORIG="$LDFLAGS"
281
[ --enable-mgl2 Enable mathgl 2.x support])
265
283
AC_ARG_WITH(mgl-flags,
266
284
[ --with-mgl-flags=PATH : specify compiler flags for mathgl])
267
285
if test x"$with_mgl_flags" != x"" ; then
268
CFLAGS="$CFLAGS $with_mgl_flags"
286
MGL_CFLAGS="$with_mgl_flags"
270
287
AC_SUBST(MGL_CFLAGS)
289
CFLAGS="$CFLAGS $MGL_CFLAGS"
273
291
AC_ARG_WITH(mgl-libs,
274
292
[ --with-mgl-libs=PATH : specify linker flag (library) for mathgl])
275
293
if test x"$with_mgl_libs" != x"" ; then
276
LIBS="$LDFLAGS $with_mgl_libs"
294
MGL_LIBS="$with_mgl_libs"
278
LIBS="$LDFLAGS -lmgl"
283
AC_CHECK_HEADER([mgl/mgl_c.h],[AC_DEFINE(HAVE_MGL_H,[],[Have got mathgl headers])],
284
[AC_MSG_ERROR([Required MathGL headers not found (looking for mgl/mgl_c.h) - is mathgl developement scode installed?])])
299
LDFLAGS="$LDFLAGS $MGL_LIBS"
301
#mathgl 2, under linux (at least debian) installs headers
302
# into /usr/include/mgl2/
304
# mathgl1.x uses mgl_c.h as c functions.
305
# mathgl2.x uses mgl_cf.h for c functions.
306
MGL_HEADER_TESTFILE=mgl/mgl_c.h
308
if test x"${enable_mgl2}" == x"yes" ; then
309
AC_DEFINE(USE_MGL2, 1 , ["Enable mgl2 support"])
315
mingw*|windows*|winnt)
318
#if enable mgl2, substitute header
319
if test -z "${enable_mgl2}" ; then
320
AC_MSG_RESULT(["mathgl check: assuming mathgl 1.x"])
322
#note file rename under mgl2 mgl_c->mgl_cf
323
MGL_HEADER_TESTFILE="mgl2/mgl_cf.h"
330
#mgl2 is installed into different path (at least under debian)
331
AC_CHECK_HEADER([${MGL_HEADER_TESTFILE}],[AC_DEFINE(HAVE_MGL_H,[],[Have got mathgl headers])],
332
[AC_MSG_ERROR([Required MathGL headers not found (looking for ${MGL_HEADER_TESTFILE}) - is mathgl development code installed?])])
333
AC_CHECK_LIB(mgl, mgl_set_def_param, [AC_DEFINE(HAVE_MGL,[],[MathGL compilation OK])] , AC_MSG_ERROR([Required MathGL libraries not found]), -lmgl)
285
335
CFLAGS="$CFLAGS_ORIG"
336
LDFLAGS="$LDFLAGS_ORIG"
364
414
#Note that GLIBCXX_DEBUG cannot exist with GLIBCXX_PARALLEL
365
415
DEBUG_FLAGS="-DDEBUG"
367
419
DEBUG_FLAGS="-DDEBUG -D_GLIBCXX_DEBUG"
369
422
AC_SUBST(DEBUG_FLAGS)
424
if test x"$GCC" = xyes; then
425
# Strip optimsation flags from debug build
427
CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9s]*//g'`
428
CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/-O[0-9s]*//g'`
431
CXXFLAGS="$CXXFLAGS -g"
371
436
if test x"$enable_debug_checks" !=x"yes" ;