]> git.sur5r.net Git - bacula/bacula/commitdiff
Add configure magic for detecting getpagesize
authorMarco van Wieringen <mvw@planets.elm.net>
Thu, 3 Feb 2011 20:25:19 +0000 (21:25 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 5 Feb 2011 13:27:37 +0000 (14:27 +0100)
bacula/autoconf/config.h.in
bacula/autoconf/configure.in
bacula/configure

index 2fb4214085c0c1dabfb30c3e5a9edfc46c8a554c..c84e7e8b1281a98ad08fac11b8a7c37a2df4b79f 100644 (file)
 /* 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. */
index 3deee535eef7defd5284f57260b0e6941f83ff2a..690b548e605034d85d641d14318312229352fc1a 100644 (file)
@@ -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)])
index 06e0a90f5e184ddf0fcee1b221638ff50a9e1d14..53f7c3aaf842417592fb3333b6fa0b6e4f276eb6 100755 (executable)
 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"