Branch oldpackages for 14.07
[14.07/packages.git] / devel / dmalloc / patches / 100-configure_pagesize.patch
1 --- a/configure
2 +++ b/configure
3 @@ -857,6 +857,11 @@ Optional Features:
4     --enable-threads        build in thread support (disabled by default)
5     --enable-shlib          build shared libraries (disabled by default)
6  
7 +Optional Packages:
8 +  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
9 +  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
10 +  --with-pagesize=nbits   log base 2 of machine page size
11 +
12  Some influential environment variables:
13    CC          C compiler command
14    CFLAGS      C compiler flags
15 @@ -5307,6 +5312,14 @@ done
16  echo "$as_me:$LINENO: checking basic-block size" >&5
17  echo $ECHO_N "checking basic-block size... $ECHO_C" >&6
18  ac_cv_page_size=0
19 +
20 +# Check whether --with-pagesize or --without-pagesize was given.
21 +if test "${with_pagesize+set}" = set; then
22 +  withval="$with_pagesize"
23 +  case "$withval" in ?|1?) ac_cv_page_size=$withval; esac
24 +else
25 +  : # default to probing, set above
26 +fi;
27  if test $ac_cv_page_size = 0; then
28     if test "$cross_compiling" = yes; then
29    { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
30 --- a/configure.ac
31 +++ b/configure.ac
32 @@ -349,6 +349,12 @@ AC_MSG_RESULT([$ac_cv_use_mmap])
33  AC_CHECK_FUNCS(getpagesize)
34  AC_MSG_CHECKING([basic-block size])
35  ac_cv_page_size=0
36 +AC_ARG_WITH(pagesize,
37 +    [ AC_HELP_STRING([--with-pagesize=nbits],
38 +               [log base 2 of machine page size] ) ],
39 +    [ case "$withval" in ?|1?) ac_cv_page_size=$withval; esac ],
40 +    [ : # default to probing, set above ],
41 +)
42  if test $ac_cv_page_size = 0; then
43     AC_RUN_IFELSE([main() { if (getpagesize()<=2048) exit(0); else exit(1); }],
44         [ ac_cv_page_size=11 ] )