]> git.ozlabs.org Git - petitboot/blobdiff - configure.ac
Add va-copy check to configure.ac
[petitboot] / configure.ac
index cb43f8c804308b00e290e184ab877e7a73ca5743..d12355667c303d52832b0208524853ff6b281e59 100644 (file)
@@ -14,7 +14,7 @@
 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-AC_INIT([petitboot], [0.2], [Jeremy Kerr <jk@ozlabs.org>])
+AC_INIT([petitboot], [0.3], [Geoff Levand <geoff@infradead.org>])
 
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([Makefile])
@@ -29,15 +29,38 @@ fi
 AC_PROG_CC
 AC_PROG_INSTALL
 
+AC_CHECK_HEADERS([stdarg.h])
+AC_CHECK_HEADERS([varargs.h])
+#AC_CHECK_FUNCS([va_copy])
+
+dnl Checking for va_copy availability
+AC_MSG_CHECKING([for va_copy])
+AC_TRY_LINK([#include <stdarg.h>
+va_list ap1,ap2;], [va_copy(ap1,ap2);],
+have_va_copy=yes,
+have_va_copy=no)
+AC_MSG_RESULT($have_va_copy)
+if test x"$have_va_copy" = x"yes"; then
+    AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
+else
+    AC_MSG_CHECKING([for __va_copy])
+    AC_TRY_LINK([#include <stdarg.h>
+    va_list ap1,ap2;], [__va_copy(ap1,ap2);],
+    have___va_copy=yes,
+    have___va_copy=no)
+    AC_MSG_RESULT($have___va_copy)
+    if test x"$have___va_copy" = x"yes"; then
+        AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
+    fi
+fi
+
 AC_ARG_ENABLE([ps3],
        [AS_HELP_STRING([--enable-ps3],
                [build support for the PS3 game console])],
        [],
        [enable_ps3=check])
 
-AS_IF([test "x$enable_ps3" != xno],
-       [AC_SUBST([ENABLE_PS3], ["y"])],
-       [AC_SUBST([ENABLE_PS3], ["n"])])
+AS_IF([test "x$enable_ps3" != xno], [AC_SUBST([ENABLE_PS3], ["y"])], [])
 
 AC_ARG_WITH([twin],
        [AS_HELP_STRING([--with-twin],