diff options
author | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-12-07 13:08:51 +0000 |
---|---|---|
committer | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-12-07 13:08:51 +0000 |
commit | acdeee2c5432855cb959c2c2f21d141cd9f4dfb7 (patch) | |
tree | b84395684ade660eeaab6d1185069921cb91287c /configure.ac | |
parent | a1f8c90bda4c5acd00a5d8b828da3d8b2e5995d8 (diff) |
Fix things
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@227 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 42432a4..254bb61 100644 --- a/configure.ac +++ b/configure.ac @@ -25,15 +25,44 @@ AC_CHECK_FUNCS([pow]) AC_CHECK_FUNCS([rint]) AC_CHECK_FUNCS([sqrt]) -AM_PATH_GTK_2_0(2.6.0,,AC_MSG_ERROR([ -*** GTK+ 2.6.0 or above is required by dtr. Please make sure you have the GTK+ +AM_PATH_GTK_2_0(2.0.0,,AC_MSG_ERROR([ +*** GTK+ 2.6.0 or above is required by DTR but no GTK+2 was found. +*** Please make sure you have the GTK+ *** development files installed. The latest version of GTK+ is *** always available at http://www.gtk.org/.])) -dnl AC_CHECK_LIB([fftw3], [fftw_execute]) -AC_CHECK_LIB(m,main) -AC_CHECK_LIB(gsl,main) -AC_CHECK_LIB(gslcblas,main) +AC_MSG_CHECKING([GTK version]) +if $PKG_CONFIG --atleast-version 2.10.0 gtk+-2.0 ; then + AC_DEFINE([HAVE_GTK_TEN], [1], [Define to 1 if GTK+ is version 2.10.0 or higher]) + AC_MSG_RESULT([2.10.0 or higher - good]) +else + AC_MSG_RESULT([Lower than 2.10.0 - might be usable if newer than 2.6.0 - let's see...]) + AM_PATH_GTK_2_0(2.6.0,,AC_MSG_ERROR([ +*** GTK+2 was found but the version number was too low. +*** GTK+ 2.6.0 or above is required by DTR. Please make sure you have the GTK+ +*** development files installed. The latest version of GTK+ is +*** always available at http://www.gtk.org/.])) +fi + +AC_CHECK_LIB(m, main) + +AC_CHECK_LIB(gslcblas,main, [], AC_MSG_ERROR([ + *** gslcblas not found. gslcblas is required to build Synth2D.])) + +AC_CHECK_LIB(gsl, main, [], AC_MSG_ERROR([ + *** gsl not found. gsl is required to build Synth2D.])) + +AC_MSG_CHECKING([libpng]) +if $PKG_CONFIG --atleast-version 1.2.0 libpng ; then + LIBPNG_VERSION=`$PKG_CONFIG --modversion libpng` + AC_MSG_RESULT($LIBPNG_VERSION) + LIBPNG_CFLAGS=`$PKG_CONFIG --cflags libpng` + LIBPNG_LIBS=`$PKG_CONFIG --libs libpng` +else + AC_MSG_RESULT([Lower than 1.2.0 or not found]) + AC_MSG_ERROR([ +*** libPNG is required to build ugliquant]) +fi AM_PATH_GTKGLEXT_1_0(1.0.0,[echo "$GTKGLEXT_LIBS"],AC_MSG_ERROR([ *** gtkglext is required to build dtr; please make sure you have the @@ -50,5 +79,8 @@ else AC_MSG_RESULT([not found. Some functions will be unavailable.]) fi +CFLAGS="$CFLAGS $CAIRO_CFLAGS $LIBPNG_CLAGS" +LIBS="$LIBS $CAIRO_LIBS $LIBPNG_LIBS" + AC_OUTPUT(Makefile src/Makefile data/Makefile) |