diff options
author | Thomas White <taw@physics.org> | 2010-02-22 16:43:48 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-02-22 17:38:16 +0100 |
commit | 32f52f0821802aecb1d00dd1054acf25325b8599 (patch) | |
tree | ca015d81b2643c84f9d6aa974aed609c3b814b1f /configure.ac | |
parent | 39319d29e02fe2491ead6cbceb72ac93c71a54c1 (diff) |
Compile without GLib (without pain)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index fe58ccbd..6e984a2f 100644 --- a/configure.ac +++ b/configure.ac @@ -40,14 +40,30 @@ AC_ARG_ENABLE(opencl, have_opencl=true], [AC_MSG_RESULT([no])]) +haveglib=false havegtk=false -AM_PATH_GTK_2_0(2.0.0, havegtk=true, -AC_MSG_WARN([GTK not found. hdfsee will not be built.])) +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, + [ + 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])] +) AM_CONDITIONAL([HAVE_GTK], test x$havegtk = xtrue) +AM_CONDITIONAL([HAVE_GLIB], test x$haveglib = xtrue) AM_CONDITIONAL([HAVE_OPENCL], test x$have_opencl = xtrue) CFLAGS="$CFLAGS $HDF5_CFLAGS $GTK_CFLAGS $GSL_CFLAGS $OPENCL_CFLAGS" -LIBS="$LIBS $HDF5_LIBS -lm -lz $GSL_LIBS $GTK_LIBS $OPENCL_LIBS -lgthread-2.0 -lutil" +LIBS="$LIBS $HDF5_LIBS -lm -lz $GSL_LIBS $GTK_LIBS $OPENCL_LIBS" AC_OUTPUT(Makefile src/Makefile data/Makefile) |