aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure60
-rw-r--r--configure.ac53
2 files changed, 87 insertions, 26 deletions
diff --git a/configure b/configure
index aa57f823..d8b89ea5 100755
--- a/configure
+++ b/configure
@@ -739,6 +739,8 @@ with_gsl
enable_opencl
enable_gtk
enable_gtktest
+enable_png
+enable_tiff
with_libtiff
'
ac_precious_vars='build_alias
@@ -1383,6 +1385,8 @@ Optional Features:
--enable-opencl Enable the use of OpenCL
--disable-gtk Disable GTK+/GLib
--disable-gtktest do not try to compile and run a test GTK+ program
+ --disable-png Disable the use of libPNG
+ --disable-tiff Disable the use of libTIFF
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -5702,34 +5706,72 @@ done
-{ $as_echo "$as_me:$LINENO: checking libpng" >&5
+{ $as_echo "$as_me:$LINENO: checking whether to use PNG" >&5
+$as_echo_n "checking whether to use PNG... " >&6; }
+# Check whether --enable-png was given.
+if test "${enable_png+set}" = set; then
+ enableval=$enable_png;
+fi
+
+if test "x$enable_png" != "xno"; then
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ { $as_echo "$as_me:$LINENO: checking libpng" >&5
$as_echo_n "checking libpng... " >&6; }
-if $PKG_CONFIG --atleast-version 1.2.0 libpng ; then
- LIBPNG_VERSION=`$PKG_CONFIG --modversion libpng`
- { $as_echo "$as_me:$LINENO: result: $LIBPNG_VERSION" >&5
+ if $PKG_CONFIG --atleast-version 1.2.0 libpng ; then
+ LIBPNG_VERSION=`$PKG_CONFIG --modversion libpng`
+ { $as_echo "$as_me:$LINENO: result: $LIBPNG_VERSION" >&5
$as_echo "$LIBPNG_VERSION" >&6; }
- LIBPNG_CFLAGS=`$PKG_CONFIG --cflags libpng`
- LIBPNG_LIBS=`$PKG_CONFIG --libs libpng`
+ LIBPNG_CFLAGS=`$PKG_CONFIG --cflags libpng`
+ LIBPNG_LIBS=`$PKG_CONFIG --libs libpng`
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBPNG 1
_ACEOF
-else
- { $as_echo "$as_me:$LINENO: result: Lower than 1.2.0 or not found" >&5
+ else
+ { $as_echo "$as_me:$LINENO: result: Lower than 1.2.0 or not found" >&5
$as_echo "Lower than 1.2.0 or not found" >&6; }
+ fi
+
+else
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
fi
+{ $as_echo "$as_me:$LINENO: checking whether to use TIFF" >&5
+$as_echo_n "checking whether to use TIFF... " >&6; }
+# Check whether --enable-tiff was given.
+if test "${enable_tiff+set}" = set; then
+ enableval=$enable_tiff;
+fi
+
+if test "x$enable_tiff" != "xno"; then
+
+
# Check whether --with-libtiff was given.
if test "${with_libtiff+set}" = set; then
withval=$with_libtiff; LIBTIFF_CFLAGS="-I$withval/include"
- LIBTIFF_LIBS="-L$withval/lib -ltiff"
+ LIBTIFF_LIBS="-L$withval/lib -ltiff"
else
LIBTIFF_LIBS="-ltiff"
fi
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
CFLAGS="$CFLAGS $HDF5_CFLAGS $GTK_CFLAGS $GSL_CFLAGS $OPENCL_CFLAGS -pthread"
diff --git a/configure.ac b/configure.ac
index 405f95f4..3dba3c16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,23 +91,42 @@ AC_CHECK_FUNCS(forkpty,
)
-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`
- AC_DEFINE([HAVE_LIBPNG], [1], [Define to 1 if libPNG is available])
-else
- AC_MSG_RESULT([Lower than 1.2.0 or not found])
-fi
-
-
-AC_ARG_WITH(libtiff,
-[AS_HELP_STRING([--with-libtiff], [specify location of libTIFF library])],
-[LIBTIFF_CFLAGS="-I$withval/include"
- LIBTIFF_LIBS="-L$withval/lib -ltiff"],
-[LIBTIFF_LIBS="-ltiff"])
+AC_MSG_CHECKING([whether to use PNG])
+AC_ARG_ENABLE([png],
+ AS_HELP_STRING([--disable-png], [Disable the use of libPNG]))
+AS_IF([test "x$enable_png" != "xno"],
+[
+ AC_MSG_RESULT([yes])
+ 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`
+ AC_DEFINE([HAVE_LIBPNG], [1], [Define to 1 if libPNG is available])
+ else
+ AC_MSG_RESULT([Lower than 1.2.0 or not found])
+ fi
+],[
+ AC_MSG_RESULT([no])
+])
+
+
+AC_MSG_CHECKING([whether to use TIFF])
+AC_ARG_ENABLE([tiff],
+ AS_HELP_STRING([--disable-tiff], [Disable the use of libTIFF]))
+AS_IF([test "x$enable_tiff" != "xno"],
+[
+ AC_ARG_WITH(libtiff,
+ [AS_HELP_STRING([--with-libtiff], [specify location of libTIFF library])],
+ [LIBTIFF_CFLAGS="-I$withval/include"
+ LIBTIFF_LIBS="-L$withval/lib -ltiff"],
+ [LIBTIFF_LIBS="-ltiff"])
+ AC_MSG_RESULT([yes])
+],
+[
+ AC_MSG_RESULT([no])
+])
CFLAGS="$CFLAGS $HDF5_CFLAGS $GTK_CFLAGS $GSL_CFLAGS $OPENCL_CFLAGS -pthread"