From: Marco van Wieringen Date: Thu, 3 Feb 2011 20:25:19 +0000 (+0100) Subject: Add configure magic for detecting getpagesize X-Git-Tag: Release-7.0.0~1157 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d01c15385ab6985f0504bb3dc6d4099de68e4df7;p=bacula%2Fbacula Add configure magic for detecting getpagesize --- diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in index 2fb4214085..c84e7e8b12 100644 --- a/bacula/autoconf/config.h.in +++ b/bacula/autoconf/config.h.in @@ -414,7 +414,7 @@ /* Define to 1 if you have the `getmntinfo' function. */ #undef HAVE_GETMNTINFO -/* Define to 1 if you have the `getpagesize' function. */ +/* Set if have getpagesize */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the `getpid' function. */ diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 3deee535ee..690b548e60 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -2399,6 +2399,7 @@ AC_CHECK_FUNCS( \ [echo 'configure: cannot find needed function.'; exit 1] ) +AC_CHECK_FUNCS(getpagesize, [AC_DEFINE(HAVE_GETPAGESIZE, 1, [Set if have getpagesize])]) AC_CHECK_FUNCS(malloc_trim, [AC_DEFINE(HAVE_MALLOC_TRIM, 1, [Set if have malloc_trim])]) AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)]) diff --git a/bacula/configure b/bacula/configure index 06e0a90f5e..53f7c3aaf8 100755 --- a/bacula/configure +++ b/bacula/configure @@ -27556,6 +27556,20 @@ fi done +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF + +$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h + +fi +done + + for ac_func in malloc_trim do : ac_fn_c_check_func "$LINENO" "malloc_trim" "ac_cv_func_malloc_trim"