aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-02-23 00:00:58 +0100
committerThomas White <taw@bitwiz.org.uk>2010-02-23 00:00:58 +0100
commit04978022c2f5feef2dfdf3acd6fd2a2d3f503324 (patch)
tree58f7fdc6b3ecaa42a02afba7d311ab9e2adfbbf1
parentcf5248059508ace98f1f084a1a1fbc39700b836b (diff)
Better configure script
-rw-r--r--configure.ac42
1 files changed, 25 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index 6e984a2f..8a7ba550 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,34 +30,42 @@ AC_ARG_WITH(gsl,
GSL_LIBS="-L$withval/lib -lgsl -lgslcblas"],
[GSL_LIBS="-lgsl -lgslcblas"])
+
+AC_ARG_ENABLE(opencl, AS_HELP_STRING([--enable-opencl], [Enable the use of OpenCL])])
AC_MSG_CHECKING([whether to use OpenCL])
-AC_ARG_ENABLE(opencl,
-[AS_HELP_STRING([--enable-opencl], [Enable the use of OpenCL])],
-[OPENCL_CFLAGS=""
- OPENCL_LIBS="-lOpenCL"
- AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_OPENCL], [1], [Define to 1 if OpenCL is available])
- have_opencl=true],
-[AC_MSG_RESULT([no])])
+AS_IF([test "x$enable_opencl" == "xyes"],
+[
+ AC_MSG_RESULT([yes])
+ OPENCL_CFLAGS=""
+ OPENCL_LIBS="-lOpenCL"
+ AC_DEFINE([HAVE_OPENCL], [1], [Define to 1 if OpenCL is available])
+ have_opencl=true
+],
+[
+ AC_MSG_RESULT([no])
+])
+
+AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [Disable GTK+/GLib])])
haveglib=false
havegtk=false
AC_MSG_CHECKING([whether to use GTK/GLib])
-AC_ARG_ENABLE(gtk,
- [AC_HELP_STRING([--disable-gtk], [Disable GTK+/GLib])],
- [
- AC_MSG_RESULT([yes])
- AM_PATH_GTK_2_0(2.0.0,
+AS_IF([test "x$enable_gtk" != "xno"],
+[
+ AC_MSG_RESULT([yes])
+ AM_PATH_GTK_2_0(2.0.0,
[
havegtk=true
haveglib=true
AC_DEFINE([HAVE_GLIB], [1], [Define to 1 if GLib is available])
GTK_LIBS="$GTK_LIBS -lgthread-2.0 -lutil"
],
- AC_MSG_WARN([GTK not found. hdfsee will not be built.]))
- ],
- [AC_MSG_RESULT([no])]
-)
+ AC_MSG_WARN([GTK not found. hdfsee will not be built.])
+ )
+],
+[
+ AC_MSG_RESULT([no])
+])
AM_CONDITIONAL([HAVE_GTK], test x$havegtk = xtrue)
AM_CONDITIONAL([HAVE_GLIB], test x$haveglib = xtrue)