From: Marco van Wieringen Date: Thu, 3 Feb 2011 20:25:19 +0000 (+0100) Subject: Add configure magic for detecting getpagesize X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8b8ead3aae4df812b142681c0b65aa1c3a5a7bd2;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"