1 ## configure.ac -- Process this file with autoconf to produce configure
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; version 2 of the License.
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 # GNU General Public License for more details.
12 # You should have received a copy of the GNU General Public License
13 # along with this program; if not, write to the Free Software
14 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 AC_INIT([petitboot], [0.3], [Geoff Levand <geoff@infradead.org>])
19 AC_CONFIG_HEADERS([config.h])
20 AC_CONFIG_FILES([Makefile])
22 default_CFLAGS="--std=gnu99 -O2 -g -Wall -W -Wunused -Wstrict-prototypes \
23 -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Winline"
25 if test "x$CFLAGS" = "x"; then
26 CFLAGS="$default_CFLAGS"
32 AC_CHECK_HEADERS([stdarg.h])
33 AC_CHECK_HEADERS([varargs.h])
34 #AC_CHECK_FUNCS([va_copy])
36 dnl Checking for va_copy availability
37 AC_MSG_CHECKING([for va_copy])
38 AC_TRY_LINK([#include <stdarg.h>
39 va_list ap1,ap2;], [va_copy(ap1,ap2);],
42 AC_MSG_RESULT($have_va_copy)
43 if test x"$have_va_copy" = x"yes"; then
44 AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
46 AC_MSG_CHECKING([for __va_copy])
47 AC_TRY_LINK([#include <stdarg.h>
48 va_list ap1,ap2;], [__va_copy(ap1,ap2);],
51 AC_MSG_RESULT($have___va_copy)
52 if test x"$have___va_copy" = x"yes"; then
53 AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
58 [AS_HELP_STRING([--enable-ps3],
59 [build support for the PS3 game console])],
63 AS_IF([test "x$enable_ps3" != xno], [AC_SUBST([ENABLE_PS3], ["y"])], [])
66 [AS_HELP_STRING([--with-twin],
67 [build GUI versions using the twin window system])],
73 AS_IF([test "x$with_twin" != xno],
74 [PKG_CHECK_MODULES([twin], [libtwin], [],
75 [AC_MSG_RESULT([$twin_PKG_ERRORS])
76 AC_MSG_RESULT([Consider adjusting PKG_CONFIG_PATH environment variable])])
77 AC_CHECK_LIB([twin], [main],
78 [AC_SUBST([LIBTWIN], ["-ltwin"])
79 AC_SUBST([PBTWIN], ["y"])
80 AC_DEFINE([HAVE_LIBTWIN], [1], [Define if you have libtwin])],
81 [if test "x$with_twin" != xcheck; then
82 AC_MSG_FAILURE([--with-twin was given, but test for twin failed])
85 AC_CHECK_HEADERS([libtwin/twin_x11.h])
86 AC_CHECK_HEADERS([libtwin/twin_fbdev.h])])
89 [AS_HELP_STRING([--enable-x11],
94 AS_IF([test "x$enable_x11" != xno], [AC_SUBST([ENABLE_X11], ["y"])], [])
97 mkdir -p discover lib/list lib/log lib/pb-protocol lib/system lib/talloc \
98 lib/waiter test ui/common ui/ncurses ui/test ui/twin utils