X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=df219553ac8f746bb4dfe3d2976eed1681310fbe;hb=a06692172dd04c95f264c7bff81d69ca02294d70;hp=4061795badf2e6595df1a3949f7e9acfe3bf2760;hpb=ec2afe5e94d9fcd72bb58e572f0251c7557325f7;p=rrdtool.git diff --git a/configure.ac b/configure.ac index 4061795..df21955 100644 --- a/configure.ac +++ b/configure.ac @@ -56,7 +56,7 @@ AH_BOTTOM([ /* define strrchr, strchr and memcpy, memmove in terms of bsd funcs make sure you are NOT using bcopy, index or rindex in the code */ -#if STDC_HEADERS +#ifdef STDC_HEADERS # include #else # ifndef HAVE_STRCHR @@ -70,30 +70,35 @@ char *strchr (), *strrchr (); # endif #endif +/* enable posix_fadvise on linux */ +#if defined(HAVE_POSIX_FADVISE) && defined(HAVE_FCNTL_H) +#define __USE_XOPEN2K 1 +#include +#endif -#if NO_NULL_REALLOC +#ifdef NO_NULL_REALLOC # define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) )) #else # define rrd_realloc(a,b) realloc((a), (b)) #endif -#if NEED_MALLOC_MALLOC_H +#ifdef NEED_MALLOC_MALLOC_H # include #endif -#if HAVE_MATH_H +#ifdef HAVE_MATH_H # include #endif -#if HAVE_FLOAT_H +#ifdef HAVE_FLOAT_H # include #endif -#if HAVE_IEEEFP_H +#ifdef HAVE_IEEEFP_H # include #endif -#if HAVE_FP_CLASS_H +#ifdef HAVE_FP_CLASS_H # include #endif @@ -243,7 +248,7 @@ AC_C_BIGENDIAN dnl for each function found we get a definition in config.h dnl of the form HAVE_FUNCTION -AC_CHECK_FUNCS(tzset mbstowcs opendir readdir chdir chroot getuid setlocale strerror strerror_r snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday) +AC_CHECK_FUNCS(tzset mbstowcs opendir readdir chdir chroot getuid setlocale strerror strerror_r snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday posix_fadvise madvise) if test "x$enable_mmap" = xyes; then