summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2011-11-12 13:42:31 -0800
committerGeoff Levand <geoff@infradead.org>2011-11-12 14:05:19 -0800
commitf5d6bf0af6aa5e6f1d51e00a617910ddfb76e32c (patch)
treef9988d56b6470e79a0f7aa2b7e34c158fae2c110 /configure.ac
parentb8e57298d53e38d660128a795a4c12ecccfde964 (diff)
downloadpetitboot-f5d6bf0af6aa5e6f1d51e00a617910ddfb76e32c.zip
petitboot-f5d6bf0af6aa5e6f1d51e00a617910ddfb76e32c.tar.gz
Add va-copy check to configure.ac
Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d9fe8ad..d123556 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,31 @@ 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])],
OpenPOWER on IntegriCloud