Skip to content
Snippets Groups Projects
Commit 284d3c2a authored by Thimo Neubauer's avatar Thimo Neubauer
Browse files

removed unused pagesize-test

[[Imported from SVN: r2400]]
parent 8923437f
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
ALLM4S = acx_mpi.m4 acx_pthread.m4 alberta.m4 alu3dgrid.m4 ax_check_gl.m4 \
blas.m4 dimension.m4 dune_all.m4 dune_amira.m4 dune_compiler.m4 \
dune_deprecated.m4 dune.m4 dune_mpi.m4 dune_pagesize.m4 f5.m4 grape.m4 \
dune_deprecated.m4 dune.m4 dune_mpi.m4 f5.m4 grape.m4 \
parmetis.m4 hdf5.m4 inkscape.m4 opengl.m4 ug.m4 xdr.m4
aclocaldir = $(datadir)/aclocal
......
......@@ -54,7 +54,6 @@ dnl check all components
AC_REQUIRE([DUNE_MPI])
AC_REQUIRE([DUNE_PATH_PARMETIS])
AC_REQUIRE([DUNE_PATH_ALU3DGRID])
AC_REQUIRE([DUNE_GETPAGESIZE])
if test x$HAVE_DUNE != x1 ; then
AC_MSG_ERROR([Can't work without the DUNE-library. Maybe you have to supply your DUNE-directory as --with-dune=dir])
......
# $Id$
#################################
# getpagesize
# -----------
# On some systems, the page size is available as the macro
# PAGE_SIZE in the header file `sys/param.h'. On others, the page size
# is available via the sysconf function. If none of those work, you
# must generally simply guess a value such as 4096.
#################################
AC_DEFUN([DUNE_GETPAGESIZE],[
AC_REQUIRE([AC_PROG_CC])
AC_MSG_NOTICE([Checking how to determine PAGESIZE])
#################################
# user defined pagesize
#################################
AC_ARG_WITH(pagesize,
AC_HELP_STRING([--with-pagesize=PAGESIZE],[pagesize of this system]))
if test x$with_pagesize != x ; then
DUNE_PAGESIZE=$with_pagesize
AC_MSG_NOTICE([using user defined value])
fi
#################################
# test int getpagesize(void);
#################################
cat >conftest.c <<_ACEOF
#include <unistd.h>
#include <stdio.h>
int main() { printf("%i", getpagesize()); return 0; }
_ACEOF
if test x$DUNE_PAGESIZE == x ; then
AC_MSG_CHECKING([for int getpagesize(void)])
if $CC $CFLAGS conftest.c -o conftest.$ac_exeext >&5; then
DUNE_PAGESIZE=`./conftest.$ac_exeext`
rm -f conftest.$ac_exeext
fi
AC_MSG_RESULT(yes)
fi
#################################
# test int getpagesize(void);
#################################
cat >conftest.c <<_ACEOF
#include <unistd.h>
#include <stdio.h>
int main() { printf("%i", sysconf(_SC_PAGESIZE)); return 0; }
_ACEOF
if test x$DUNE_PAGESIZE == x ; then
AC_MSG_CHECKING([for int sysconf(_SC_PAGESIZE)])
if $CC $CFLAGS conftest.c -o conftest.$ac_exeext >&5; then
DUNE_PAGESIZE=`./conftest.$ac_exeext`
rm -f conftest.$ac_exeext
fi
AC_MSG_RESULT(yes)
fi
#################################
# test int getpagesize(void);
#################################
cat >conftest.c <<_ACEOF
#include <unistd.h>
#include <stdio.h>
int main() { printf("%i", sysconf(_SC_PAGE_SIZE)); return 0; }
_ACEOF
if test x$DUNE_PAGESIZE == x ; then
AC_MSG_CHECKING([for int sysconf(_SC_PAGE_SIZE)])
if $CC $CFLAGS conftest.c -o conftest.$ac_exeext >&5; then
DUNE_PAGESIZE=`./conftest.$ac_exeext`
rm -f conftest.$ac_exeext
fi
AC_MSG_RESULT(yes)
fi
#################################
# test int getpagesize(void);
#################################
cat >conftest.c <<_ACEOF
#include <sys/param.h>
#include <stdio.h>
int main() { printf("%i", PAGE_SIZE); return 0; }
_ACEOF
if test x$DUNE_PAGESIZE == x ; then
AC_MSG_CHECKING([for definition of PAGE_SIZE in sys/param.h])
if $CC $CFLAGS conftest.c -o conftest.$ac_exeext >&5; then
DUNE_PAGESIZE=`./conftest.$ac_exeext`
rm -f conftest.$ac_exeext
fi
AC_MSG_RESULT(yes)
fi
#################################
# fall back to default
#################################
if test x$DUNE_PAGESIZE == x ; then
DUNE_PAGESIZE=4096
AC_MSG_WARN([failed to determine PAGE_SIZE, falling back to default 4096])
fi
#################################
# store pagesize & clean up
#################################
AC_DEFINE_UNQUOTED(DUNE_PAGESIZE, $DUNE_PAGESIZE, [Pagesize of this system])
AC_MSG_NOTICE([setting DUNE_PAGESIZE to $DUNE_PAGESIZE])
rm -f conftest.c
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment