From ff45bb3a851deae376ca60d2b69f32dc0bcb6ea0 Mon Sep 17 00:00:00 2001 From: sterlingpickens Date: Fri, 2 May 2014 09:44:10 -0700 Subject: [PATCH] Update configure.ac #include no #include needed in linux, fixes make warning --- configure.ac | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index e7eed741..688d23c4 100644 --- a/configure.ac +++ b/configure.ac @@ -295,12 +295,21 @@ fi AM_CONDITIONAL(USE_GIT_VERSION, [test x$usegitver = xyes]) #check execv signature -AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - int execv(const char*, char *const*); - ])], - AC_DEFINE([EXECV_2ND_ARG_TYPE], [char* const*], [int execv(const char*, char*const*);]), - AC_DEFINE([EXECV_2ND_ARG_TYPE], [const char* const*], [int execv(const char*, const char*const*);])) +if test "x$have_linux" == xtrue; then + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + #include + int execv(const char*, char *const*); + ])], + AC_DEFINE([EXECV_2ND_ARG_TYPE], [char* const*], [int execv(const char*, char*const*);]), + AC_DEFINE([EXECV_2ND_ARG_TYPE], [const char* const*], [int execv(const char*, const char*const*);])) +else + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + #include + int execv(const char*, char *const*); + ])], + AC_DEFINE([EXECV_2ND_ARG_TYPE], [char* const*], [int execv(const char*, char*const*);]), + AC_DEFINE([EXECV_2ND_ARG_TYPE], [const char* const*], [int execv(const char*, const char*const*);])) +fi dnl CCAN wants to know a lot of vars. # All the configuration checks. Regrettably, the __attribute__ checks will