changeset 4112:0c3559059d6d SDL-1.2

Improved detection of mprotect()
author Sam Lantinga <slouken@libsdl.org>
date Sat, 29 Dec 2007 06:06:03 +0000
parents 42f34d595d8b
children 82dab719502e
files configure.in
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Sat Dec 29 05:30:20 2007 +0000
+++ b/configure.in	Sat Dec 29 06:06:03 2007 +0000
@@ -146,7 +146,16 @@
     if test x$ac_cv_func_strtod = xyes; then
         AC_DEFINE(HAVE_STRTOD)
     fi
-    AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf iconv sigaction setjmp nanosleep mprotect)
+    AC_CHECK_FUNC(mprotect,
+        AC_TRY_COMPILE([
+          #include <sys/types.h>
+          #include <sys/mman.h>
+        ],[
+        ],[
+        AC_DEFINE(HAVE_MPROTECT)
+        ]),
+    )
+    AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf iconv sigaction setjmp nanosleep)
 
     AC_CHECK_LIB(iconv, libiconv_open, [EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
     AC_CHECK_LIB(m, pow, [EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])