diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2009-02-18 09:15:07 +0000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2009-02-21 11:06:22 +1100 |
commit | d7196a1972f05a17abf979fe71231ccf94e13976 (patch) | |
tree | fd8ca934a0da03050bde612e6722a685b31949b6 /configure.ac | |
parent | 9bde93d47a288769167a3e283c632d826e7b558e (diff) | |
download | petitboot-d7196a1972f05a17abf979fe71231ccf94e13976.zip petitboot-d7196a1972f05a17abf979fe71231ccf94e13976.tar.gz |
petitboot: Add --with-twin config option
Make the build of the GUI components conditional on the installation
of libtwin. Also, add options --with-twin and --without-twin to allow the
user to override the default.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 88e5833..467104a 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,25 @@ fi AC_PROG_CC AC_PROG_INSTALL -PKG_CHECK_MODULES([twin], [libtwin]) +AC_ARG_WITH([twin], + [AS_HELP_STRING([--with-twin], + [build GUI versions using the twin window system])], + [], + [with_twin=check]) + +LIBTWIN= +AS_IF([test "x$with_twin" != xno], + [PKG_CHECK_MODULES([twin], [libtwin], [], + [AC_MSG_RESULT([$twin_PKG_ERRORS]) + AC_MSG_RESULT([Consider adjusting PKG_CONFIG_PATH environment variable])]) + AC_CHECK_LIB([twin], [main], + [AC_SUBST([LIBTWIN], ["-ltwin"]) + AC_DEFINE([HAVE_LIBTWIN], [1], [Define if you have libtwin])], + [if test "x$with_twin" != xcheck; then + AC_MSG_FAILURE([--with-twin was given, but test for twin failed]) + fi], + [${twin_LIBS}])]) + mkdir -p discover ui/test ui/common lib/talloc lib/pb-protocol lib/list \ lib/waiter lib/log |