diff options
Diffstat (limited to 'lib/make')
-rw-r--r-- | lib/make/cctk_Config.h.in | 4 | ||||
-rwxr-xr-x | lib/make/configure | 376 | ||||
-rw-r--r-- | lib/make/configure.in | 24 | ||||
-rw-r--r-- | lib/make/force-reconfigure | 3 |
4 files changed, 315 insertions, 92 deletions
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in index d44a13da..9af9204f 100644 --- a/lib/make/cctk_Config.h.in +++ b/lib/make/cctk_Config.h.in @@ -58,6 +58,10 @@ #undef HAVE_CRYPT_H #undef HAVE_DIRENT_H #undef HAVE_SIGNAL_H +#undef HAVE_MALLOC_H +#undef HAVE_MALLINFO +#undef HAVE_MALLOPT +#undef HAVE_M_MMAP_THRESHOLD_VALUE #undef TIME_WITH_SYS_TIME diff --git a/lib/make/configure b/lib/make/configure index 20e1e327..0dc867a0 100755 --- a/lib/make/configure +++ b/lib/make/configure @@ -3326,14 +3326,54 @@ else fi done +for cctk_hdr in malloc.h +do +cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 +echo "configure:3334: checking for $cctk_hdr" >&5 +if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3339 "configure" +#include "confdefs.h" + +#include <$cctk_hdr> +int main() { + +; return 0; } +EOF +if { (eval echo configure:3347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "cctk_cv_header_$cctk_safe=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "cctk_cv_header_$cctk_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$cctk_cv_header_'$cctk_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cctk_tr_hdr=HAVE_`echo $cctk_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $cctk_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3332: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3372: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3337 "configure" +#line 3377 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -3342,7 +3382,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3366,13 +3406,13 @@ fi #Check type of socklen # Check if we have socklen_t available -echo $ac_n "checking if socklen_t is defined""... $ac_c" 1>&6 -echo "configure:3371: checking if socklen_t is defined" >&5 +echo $ac_n "checking whether socklen_t is defined""... $ac_c" 1>&6 +echo "configure:3411: checking whether socklen_t is defined" >&5 if eval "test \"`echo '$''{'cctk_cv_have_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3376 "configure" +#line 3416 "configure" #include "confdefs.h" #include <stdio.h> #include <stdlib.h> @@ -3392,7 +3432,7 @@ int main() { socklen_t foo; return 0 ; return 0; } EOF -if { (eval echo configure:3396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_have_socklen_t=yes" else @@ -3417,12 +3457,12 @@ fi # Check if someone has defined SOCKET echo $ac_n "checking if SOCKET is defined""... $ac_c" 1>&6 -echo "configure:3421: checking if SOCKET is defined" >&5 +echo "configure:3461: checking if SOCKET is defined" >&5 if eval "test \"`echo '$''{'cctk_cv_have_SOCKET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3426 "configure" +#line 3466 "configure" #include "confdefs.h" #include <stdio.h> #include <stdlib.h> @@ -3442,7 +3482,7 @@ int main() { SOCKET foo; return 0 ; return 0; } EOF -if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_have_SOCKET=yes" else @@ -3465,21 +3505,177 @@ else echo "$ac_t""no" 1>&6 fi +ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext `CCTK_Wrap "$LIBDIR_PREFIX" "$LIBDIR_SUFFIX" "$LIBDIRS"` `CCTK_Wrap "$LIBLINK_PREFIX" "$LIBLINK_SUFFIX" "$LIBS"` >&5' +for ac_func in mallinfo +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3513: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3518 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext `CCTK_Wrap "$LIBDIR_PREFIX" "$LIBDIR_SUFFIX" "$LIBDIRS"` `CCTK_Wrap "$LIBLINK_PREFIX" "$LIBLINK_SUFFIX" "$LIBS"` >&5' +for ac_func in mallopt +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3570: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3575 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + + +# Check if M_MMAP_THRESHOLD is defined +echo $ac_n "checking whether M_MMAP_THRESHOLD is defined""... $ac_c" 1>&6 +echo "configure:3626: checking whether M_MMAP_THRESHOLD is defined" >&5 +if eval "test \"`echo '$''{'cctk_cv_have_M_MMAP_THRESHOLD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 3631 "configure" +#include "confdefs.h" +#include <stdlib.h> +#ifdef HAVE_MALLOC_H +#include <malloc.h> +#endif +int main() { +int x=M_MMAP_THRESHOLD; return 0 +; return 0; } +EOF +if { (eval echo configure:3641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "cctk_cv_have_M_MMAP_THRESHOLD=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "cctk_cv_have_M_MMAP_THRESHOLD=no" +fi +rm -f conftest* + +fi + +if test "$cctk_cv_have_M_MMAP_THRESHOLD" = 'yes'; then + cat >> confdefs.h <<\EOF +#define HAVE_M_MMAP_THRESHOLD_VALUE 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + # Check if we have __int64 echo $ac_n "checking if __int64 is defined""... $ac_c" 1>&6 -echo "configure:3471: checking if __int64 is defined" >&5 +echo "configure:3667: checking if __int64 is defined" >&5 if eval "test \"`echo '$''{'cctk_cv_have___int64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3476 "configure" +#line 3672 "configure" #include "confdefs.h" int main() { __int64 foo; return 0 ; return 0; } EOF -if { (eval echo configure:3483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_have___int64=yes" else @@ -3514,12 +3710,12 @@ cross_compiling=$ac_cv_prog_cxx_cross do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3518: checking for $cctk_hdr" >&5 +echo "configure:3714: checking for $cctk_hdr" >&5 if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3523 "configure" +#line 3719 "configure" #include "confdefs.h" #include <$cctk_hdr> @@ -3527,7 +3723,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3566,12 +3762,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ for ac_func in getopt_long_only do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3570: checking for $ac_func" >&5 +echo "configure:3766: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3575 "configure" +#line 3771 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3594,7 +3790,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3637,12 +3833,12 @@ else fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3641: checking for working const" >&5 +echo "configure:3837: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3646 "configure" +#line 3842 "configure" #include "confdefs.h" int main() { @@ -3691,7 +3887,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:3695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3712,21 +3908,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3716: checking for inline" >&5 +echo "configure:3912: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 3723 "configure" +#line 3919 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:3730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3753,14 +3949,14 @@ esac echo $ac_n "checking for C restrict""... $ac_c" 1>&6 -echo "configure:3757: checking for C restrict" >&5 +echo "configure:3953: checking for C restrict" >&5 if eval "test \"`echo '$''{'cctk_cv_c_restrict'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cctk_cv_c_restrict=no for ac_kw in restrict __restrict__ __restrict; do cat > conftest.$ac_ext <<EOF -#line 3764 "configure" +#line 3960 "configure" #include "confdefs.h" int main() { @@ -3771,7 +3967,7 @@ struct tux { char * $ac_kw arr[3]; }; ; return 0; } EOF -if { (eval echo configure:3775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_c_restrict=$ac_kw; break else @@ -3797,7 +3993,7 @@ EOF esac echo $ac_n "checking for C++ restrict""... $ac_c" 1>&6 -echo "configure:3801: checking for C++ restrict" >&5 +echo "configure:3997: checking for C++ restrict" >&5 if eval "test \"`echo '$''{'cctk_cv_cxx_restrict'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3812,7 +4008,7 @@ cross_compiling=$ac_cv_prog_cxx_cross for ac_kw in restrict __restrict__ __restrict; do cat > conftest.$ac_ext <<EOF -#line 3816 "configure" +#line 4012 "configure" #include "confdefs.h" int main() { @@ -3823,7 +4019,7 @@ struct tux { char * $ac_kw arr[3]; }; ; return 0; } EOF -if { (eval echo configure:3827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_cxx_restrict=$ac_kw; break else @@ -3857,20 +4053,20 @@ esac echo $ac_n "checking for C bool""... $ac_c" 1>&6 -echo "configure:3861: checking for C bool" >&5 +echo "configure:4057: checking for C bool" >&5 if eval "test \"`echo '$''{'cctk_cv_have_c_bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cctk_cv_have_c_bool=no cat > conftest.$ac_ext <<EOF -#line 3867 "configure" +#line 4063 "configure" #include "confdefs.h" int main() { bool foo; ; return 0; } EOF -if { (eval echo configure:3874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_c_bool=yes else @@ -3892,7 +4088,7 @@ EOF fi echo $ac_n "checking for CXX bool""... $ac_c" 1>&6 -echo "configure:3896: checking for CXX bool" >&5 +echo "configure:4092: checking for CXX bool" >&5 if eval "test \"`echo '$''{'cctk_cv_have_cxx_bool'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3906,14 +4102,14 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <<EOF -#line 3910 "configure" +#line 4106 "configure" #include "confdefs.h" int main() { bool foo; ; return 0; } EOF -if { (eval echo configure:3917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_cxx_bool=yes else @@ -3943,7 +4139,7 @@ fi echo $ac_n "checking for Fortran REAL*4""... $ac_c" 1>&6 -echo "configure:3947: checking for Fortran REAL*4" >&5 +echo "configure:4143: checking for Fortran REAL*4" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_real4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3959,7 +4155,7 @@ cat > conftest.$ac_ext <<EOF REAL*4 a end EOF -if { (eval echo configure:3963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_real4=yes else @@ -3988,7 +4184,7 @@ EOF fi echo $ac_n "checking for Fortran REAL*8""... $ac_c" 1>&6 -echo "configure:3992: checking for Fortran REAL*8" >&5 +echo "configure:4188: checking for Fortran REAL*8" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_real8'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4004,7 +4200,7 @@ cat > conftest.$ac_ext <<EOF REAL*8 a end EOF -if { (eval echo configure:4008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_real8=yes else @@ -4033,7 +4229,7 @@ EOF fi echo $ac_n "checking for Fortran REAL*16""... $ac_c" 1>&6 -echo "configure:4037: checking for Fortran REAL*16" >&5 +echo "configure:4233: checking for Fortran REAL*16" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_real16'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4049,7 +4245,7 @@ cat > conftest.$ac_ext <<EOF REAL*16 a end EOF -if { (eval echo configure:4053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_real16=yes else @@ -4079,7 +4275,7 @@ fi echo $ac_n "checking for Fortran COMPLEX*8""... $ac_c" 1>&6 -echo "configure:4083: checking for Fortran COMPLEX*8" >&5 +echo "configure:4279: checking for Fortran COMPLEX*8" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_complex8'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4095,7 +4291,7 @@ cat > conftest.$ac_ext <<EOF COMPLEX*8 a end EOF -if { (eval echo configure:4099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_complex8=yes else @@ -4124,7 +4320,7 @@ EOF fi echo $ac_n "checking for Fortran COMPLEX*16""... $ac_c" 1>&6 -echo "configure:4128: checking for Fortran COMPLEX*16" >&5 +echo "configure:4324: checking for Fortran COMPLEX*16" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_complex16'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4140,7 +4336,7 @@ cat > conftest.$ac_ext <<EOF COMPLEX*16 a end EOF -if { (eval echo configure:4144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_complex16=yes else @@ -4169,7 +4365,7 @@ EOF fi echo $ac_n "checking for Fortran COMPLEX*32""... $ac_c" 1>&6 -echo "configure:4173: checking for Fortran COMPLEX*32" >&5 +echo "configure:4369: checking for Fortran COMPLEX*32" >&5 if eval "test \"`echo '$''{'cctk_cv_have_fortran_complex32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4185,7 +4381,7 @@ cat > conftest.$ac_ext <<EOF COMPLEX*32 a end EOF -if { (eval echo configure:4189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cctk_cv_have_fortran_complex32=yes else @@ -4216,12 +4412,12 @@ fi ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext `CCTK_Wrap "$LIBDIR_PREFIX" "$LIBDIR_SUFFIX" "$LIBDIRS"` `CCTK_Wrap "$LIBLINK_PREFIX" "$LIBLINK_SUFFIX" "$LIBS"` >&5' echo $ac_n "checking for crypt""... $ac_c" 1>&6 -echo "configure:4220: checking for crypt" >&5 +echo "configure:4416: checking for crypt" >&5 if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4225 "configure" +#line 4421 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char crypt(); below. */ @@ -4244,7 +4440,7 @@ crypt(); ; return 0; } EOF -if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_crypt=yes" else @@ -4262,7 +4458,7 @@ if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in library crypt""... $ac_c" 1>&6 -echo "configure:4266: checking for crypt in library crypt" >&5 +echo "configure:4462: checking for crypt in library crypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4271,7 +4467,7 @@ else ac_save_LIBS="$LIBS" LIBS="crypt $LIBS" cat > conftest.$ac_ext <<EOF -#line 4275 "configure" +#line 4471 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4282,7 +4478,7 @@ int main() { crypt() ; return 0; } EOF -if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4323,12 +4519,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ for ac_func in finite do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4327: checking for $ac_func" >&5 +echo "configure:4523: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4332 "configure" +#line 4528 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4351,7 +4547,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4373,7 +4569,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for finite in library m""... $ac_c" 1>&6 -echo "configure:4377: checking for finite in library m" >&5 +echo "configure:4573: checking for finite in library m" >&5 ac_lib_var=`echo m'_'finite | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4382,7 +4578,7 @@ else ac_save_LIBS="$LIBS" LIBS="m $LIBS" cat > conftest.$ac_ext <<EOF -#line 4386 "configure" +#line 4582 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4393,7 +4589,7 @@ int main() { finite() ; return 0; } EOF -if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4435,12 +4631,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ for ac_func in isnan do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4439: checking for $ac_func" >&5 +echo "configure:4635: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4444 "configure" +#line 4640 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4463,7 +4659,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4485,7 +4681,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for isnan in library m""... $ac_c" 1>&6 -echo "configure:4489: checking for isnan in library m" >&5 +echo "configure:4685: checking for isnan in library m" >&5 ac_lib_var=`echo m'_'isnan | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4494,7 +4690,7 @@ else ac_save_LIBS="$LIBS" LIBS="m $LIBS" cat > conftest.$ac_ext <<EOF -#line 4498 "configure" +#line 4694 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4505,7 +4701,7 @@ int main() { isnan() ; return 0; } EOF -if { (eval echo configure:4509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4547,12 +4743,12 @@ ac_link='${CC-cc} -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ for ac_func in mkstemp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4551: checking for $ac_func" >&5 +echo "configure:4747: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4556 "configure" +#line 4752 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4575,7 +4771,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4597,7 +4793,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for mkstemp in library c""... $ac_c" 1>&6 -echo "configure:4601: checking for mkstemp in library c" >&5 +echo "configure:4797: checking for mkstemp in library c" >&5 ac_lib_var=`echo c'_'mkstemp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4606,7 +4802,7 @@ else ac_save_LIBS="$LIBS" LIBS="c $LIBS" cat > conftest.$ac_ext <<EOF -#line 4610 "configure" +#line 4806 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4617,7 +4813,7 @@ int main() { mkstemp() ; return 0; } EOF -if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4656,19 +4852,19 @@ done echo $ac_n "checking for va_copy""... $ac_c" 1>&6 -echo "configure:4660: checking for va_copy" >&5 +echo "configure:4856: checking for va_copy" >&5 if eval "test \"`echo '$''{'cctk_cv_have_va_copy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4665 "configure" +#line 4861 "configure" #include "confdefs.h" #include <stdarg.h> int main() { va_list src, dest; va_copy(dest, src); return 0 ; return 0; } EOF -if { (eval echo configure:4672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "cctk_cv_have_va_copy=yes" else @@ -4695,7 +4891,7 @@ fi if test "X$PTHREADS" = 'Xyes'; then PTHREAD_LIBS= echo $ac_n "checking for main in library c_r""... $ac_c" 1>&6 -echo "configure:4699: checking for main in library c_r" >&5 +echo "configure:4895: checking for main in library c_r" >&5 ac_lib_var=`echo c_r'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4704,14 +4900,14 @@ else ac_save_LIBS="$LIBS" LIBS="c_r $LIBS" cat > conftest.$ac_ext <<EOF -#line 4708 "configure" +#line 4904 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4732,7 +4928,7 @@ else fi echo $ac_n "checking for main in library pthread""... $ac_c" 1>&6 -echo "configure:4736: checking for main in library pthread" >&5 +echo "configure:4932: checking for main in library pthread" >&5 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4741,14 +4937,14 @@ else ac_save_LIBS="$LIBS" LIBS="pthread $LIBS" cat > conftest.$ac_ext <<EOF -#line 4745 "configure" +#line 4941 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4767,7 +4963,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in library pthreads""... $ac_c" 1>&6 -echo "configure:4771: checking for main in library pthreads" >&5 +echo "configure:4967: checking for main in library pthreads" >&5 ac_lib_var=`echo pthreads'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4776,14 +4972,14 @@ else ac_save_LIBS="$LIBS" LIBS="pthreads $LIBS" cat > conftest.$ac_ext <<EOF -#line 4780 "configure" +#line 4976 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5250,7 +5446,7 @@ if test "x$CCTK_NEED_X" = 'xyes' ; then # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:5254: checking for X" >&5 +echo "configure:5450: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -5312,12 +5508,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 5316 "configure" +#line 5512 "configure" #include "confdefs.h" #include <$x_direct_test_include> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5386,14 +5582,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <<EOF -#line 5390 "configure" +#line 5586 "configure" #include "confdefs.h" int main() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:5397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. diff --git a/lib/make/configure.in b/lib/make/configure.in index 7d00a66b..7a13f5e3 100644 --- a/lib/make/configure.in +++ b/lib/make/configure.in @@ -557,13 +557,14 @@ CCTK_CHECK_HEADERS(crypt.h,[#ifdef HAVE_UNISTD_H #include <unistd.h> #endif]) CCTK_CHECK_HEADERS(signal.h) +CCTK_CHECK_HEADERS(malloc.h) AC_HEADER_TIME #Check type of socklen # Check if we have socklen_t available -AC_MSG_CHECKING([if socklen_t is defined]) +AC_MSG_CHECKING([whether socklen_t is defined]) AC_CACHE_VAL(cctk_cv_have_socklen_t, [AC_TRY_COMPILE([#include <stdio.h> #include <stdlib.h> @@ -616,6 +617,27 @@ else AC_MSG_RESULT(no) fi +CCTK_CHECK_FUNCS(mallinfo) +CCTK_CHECK_FUNCS(mallopt) + +# Check if M_MMAP_THRESHOLD is defined +AC_MSG_CHECKING([whether M_MMAP_THRESHOLD is defined]) +AC_CACHE_VAL(cctk_cv_have_M_MMAP_THRESHOLD, +[AC_TRY_COMPILE([#include <stdlib.h> +#ifdef HAVE_MALLOC_H +#include <malloc.h> +#endif], +[int x=M_MMAP_THRESHOLD; return 0], eval "cctk_cv_have_M_MMAP_THRESHOLD=yes", +eval "cctk_cv_have_M_MMAP_THRESHOLD=no") +]) +if test "$cctk_cv_have_M_MMAP_THRESHOLD" = 'yes'; then + AC_DEFINE(HAVE_M_MMAP_THRESHOLD_VALUE) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + + # Check if we have __int64 AC_MSG_CHECKING([if __int64 is defined]) AC_CACHE_VAL(cctk_cv_have___int64, diff --git a/lib/make/force-reconfigure b/lib/make/force-reconfigure index 0d2245c5..c277c5dd 100644 --- a/lib/make/force-reconfigure +++ b/lib/make/force-reconfigure @@ -5,7 +5,7 @@ # @desc # Timestamp file for forcing reconfiguring configurations # @enddesc -# @version $Id: force-reconfigure,v 1.10 2006-07-19 11:02:36 schnetter Exp $ +# @version $Id: force-reconfigure,v 1.11 2007-05-26 20:06:56 schnetter Exp $ # @@*/ 31 Mar 2004: created @@ -17,3 +17,4 @@ 08 Nov 2004: add HAVE_HDF5_STREAM_VFD and HDF5_LFS_FLAGS makefile variables 10 Mar 2006: fix order of external/system libs on the linker command line 19 Jul 2006: detect presence of real*16 in Fortran correctly +26 May 2007: check for <malloc.h>, mallinfo, mallopt, and M_MMAP_THRESHOLD |