Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Improved detection of mprotect()
  • Loading branch information
slouken committed Dec 29, 2007
1 parent d2d70b7 commit d00c582
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion configure.in
Expand Up @@ -146,7 +146,16 @@ if test x$enable_libc = xyes; then
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"])
Expand Down

0 comments on commit d00c582

Please sign in to comment.