diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-09-15 16:09:06 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-09-15 16:09:06 +0000 |
commit | 9d618e58f6e98eeadbe87495ffcaf5e2aff340e1 (patch) | |
tree | d8d349e02d7af8de23cbb199d19109f23a1b34a0 /lib/make/configure | |
parent | 2e23003cd75586bb76d9b7036348392f7700055b (diff) |
Added new second argument to CCTK_CHECK_HEADERS. This is code which should
be placed before #include <...> in the test program. E.g. to make sure something
else is included first.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1818 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/configure')
-rwxr-xr-x | lib/make/configure | 196 |
1 files changed, 106 insertions, 90 deletions
diff --git a/lib/make/configure b/lib/make/configure index 0a764aa5..6daf7abf 100755 --- a/lib/make/configure +++ b/lib/make/configure @@ -2699,12 +2699,13 @@ else cat > conftest.$ac_ext <<EOF #line 2701 "configure" #include "confdefs.h" + #include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:2708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2731,19 +2732,20 @@ for cctk_hdr in sys/time.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2735: checking for $cctk_hdr" >&5 +echo "configure:2736: 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 2740 "configure" +#line 2741 "configure" #include "confdefs.h" + #include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:2747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2766,23 +2768,24 @@ else fi done -for cctk_hdr in unistd.h +for cctk_hdr in sys/types.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2774: checking for $cctk_hdr" >&5 +echo "configure:2776: 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 2779 "configure" +#line 2781 "configure" #include "confdefs.h" + #include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:2786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2805,23 +2808,24 @@ else fi done -for cctk_hdr in string.h +for cctk_hdr in unistd.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2813: checking for $cctk_hdr" >&5 +echo "configure:2816: 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 2818 "configure" +#line 2821 "configure" #include "confdefs.h" + #include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:2825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2844,23 +2848,24 @@ else fi done -for cctk_hdr in assert.h +for cctk_hdr in string.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2852: checking for $cctk_hdr" >&5 +echo "configure:2856: 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 2857 "configure" +#line 2861 "configure" #include "confdefs.h" + #include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:2864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2883,23 +2888,24 @@ else fi done -for cctk_hdr in sys/stat.h +for cctk_hdr in assert.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2891: checking for $cctk_hdr" >&5 +echo "configure:2896: 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 2896 "configure" +#line 2901 "configure" #include "confdefs.h" + #include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:2903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2922,23 +2928,24 @@ else fi done -for cctk_hdr in getopt.h +for cctk_hdr in sys/stat.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:2930: checking for $cctk_hdr" >&5 +echo "configure:2936: 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 2935 "configure" +#line 2941 "configure" #include "confdefs.h" + #include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:2942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -2961,97 +2968,101 @@ else fi done -echo $ac_n "checking for regex.h""... $ac_c" 1>&6 -echo "configure:2966: checking for regex.h" >&5 -if eval "test \"`echo '$''{'cctk_cv_header_regex_h'+set}'`\" = set"; then +for cctk_hdr in getopt.h +do +cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 +echo "configure:2976: 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 2971 "configure" +#line 2981 "configure" #include "confdefs.h" -#include <stdio.h> -#include <regex.h> + +#include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:2979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "cctk_cv_header_regex_h=yes" + 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_regex_h=no" + eval "cctk_cv_header_$cctk_safe=no" fi rm -f conftest* fi -if eval "test \"`echo '$cctk_cv_header_regex_h'`\" = yes"; then +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 HAVE_REGEX_H 1 +#define $cctk_tr_hdr 1 EOF - + else echo "$ac_t""no" 1>&6 fi +done -for cctk_hdr in sys/types.h -do -cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3004: checking for $cctk_hdr" >&5 -if eval "test \"`echo '$''{'cctk_cv_header_$cctk_safe'+set}'`\" = set"; then +echo $ac_n "checking for regex.h""... $ac_c" 1>&6 +echo "configure:3013: checking for regex.h" >&5 +if eval "test \"`echo '$''{'cctk_cv_header_regex_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3009 "configure" +#line 3018 "configure" #include "confdefs.h" -#include <$cctk_hdr> +#include <stdio.h> +#include <regex.h> int main() { return 0; ; return 0; } EOF -if { (eval echo configure:3016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval "cctk_cv_header_$cctk_safe=yes" + eval "cctk_cv_header_regex_h=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "cctk_cv_header_$cctk_safe=no" + eval "cctk_cv_header_regex_h=no" fi rm -f conftest* fi -if eval "test \"`echo '$cctk_cv_header_'$cctk_safe`\" = yes"; then +if eval "test \"`echo '$cctk_cv_header_regex_h'`\" = 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 +#define HAVE_REGEX_H 1 EOF - + else echo "$ac_t""no" 1>&6 fi -done for cctk_hdr in sys/socket.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3043: checking for $cctk_hdr" >&5 +echo "configure:3051: 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 3048 "configure" +#line 3056 "configure" #include "confdefs.h" +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif #include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:3055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3078,19 +3089,22 @@ for cctk_hdr in netinet/in.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3082: checking for $cctk_hdr" >&5 +echo "configure:3093: 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 3087 "configure" +#line 3098 "configure" #include "confdefs.h" +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif #include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:3094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3117,19 +3131,20 @@ for cctk_hdr in winsock2.h do cctk_safe=`echo "$cctk_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $cctk_hdr""... $ac_c" 1>&6 -echo "configure:3121: checking for $cctk_hdr" >&5 +echo "configure:3135: 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 3126 "configure" +#line 3140 "configure" #include "confdefs.h" + #include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:3133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3154,12 +3169,12 @@ done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3158: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3173: 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 3163 "configure" +#line 3178 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -3168,7 +3183,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3193,12 +3208,12 @@ fi # Check if we have socklen_t available echo $ac_n "checking if socklen_t is defined""... $ac_c" 1>&6 -echo "configure:3197: checking if socklen_t is defined" >&5 +echo "configure:3212: checking if 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 3202 "configure" +#line 3217 "configure" #include "confdefs.h" #include <stdio.h> #include <stdlib.h> @@ -3218,7 +3233,7 @@ int main() { socklen_t foo; return 0 ; return 0; } EOF -if { (eval echo configure:3222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_have_socklen_t=yes" else @@ -3257,19 +3272,20 @@ 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:3261: checking for $cctk_hdr" >&5 +echo "configure:3276: 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 3266 "configure" +#line 3281 "configure" #include "confdefs.h" + #include <$cctk_hdr> int main() { -return 0; + ; return 0; } EOF -if { (eval echo configure:3273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "cctk_cv_header_$cctk_safe=yes" else @@ -3309,14 +3325,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 3313 "configure" +#line 3329 "configure" #include "confdefs.h" int main() { bool foo; ; return 0; } EOF -if { (eval echo configure:3320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_BOOL 1 @@ -3341,12 +3357,12 @@ fi for ac_func in getopt_long_only do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3345: checking for $ac_func" >&5 +echo "configure:3361: 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 3350 "configure" +#line 3366 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3369,7 +3385,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3389: \"$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 @@ -3414,12 +3430,12 @@ fi for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3418: checking for $ac_func" >&5 +echo "configure:3434: 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 3423 "configure" +#line 3439 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3442,7 +3458,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3462: \"$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 |