Add generic UI countdown timer
[petitboot] / configure.ac
index 650d60b2fe2194dd81b90a79ccdfba5811624bd6..cb43f8c804308b00e290e184ab877e7a73ca5743 100644 (file)
@@ -29,8 +29,38 @@ fi
 AC_PROG_CC
 AC_PROG_INSTALL
 
-PKG_CHECK_MODULES([twin], [libtwin])
+AC_ARG_ENABLE([ps3],
+       [AS_HELP_STRING([--enable-ps3],
+               [build support for the PS3 game console])],
+       [],
+       [enable_ps3=check])
 
-mkdir -p discover ui/test ui/common lib/talloc lib/pb-protocol lib/list
+AS_IF([test "x$enable_ps3" != xno],
+       [AC_SUBST([ENABLE_PS3], ["y"])],
+       [AC_SUBST([ENABLE_PS3], ["n"])])
+
+AC_ARG_WITH([twin],
+       [AS_HELP_STRING([--with-twin],
+               [build GUI versions using the twin window system])],
+       [],
+       [with_twin=check])
+
+PBTWIN=
+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_SUBST([PBTWIN], ["y"])
+                       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 lib/list lib/log lib/pb-protocol lib/system lib/talloc \
+       lib/waiter test ui/common ui/ncurses ui/test ui/twin utils
 
 AC_OUTPUT