diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-05-16 11:12:35 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2005-05-16 11:12:35 +0000 |
commit | 96cca220809188c8326c0f3f4e1af83037178437 (patch) | |
tree | 9d9d97bab13ebd5ee741b85556e9535c62250a1b /lib/make | |
parent | 1fb8751fd88060aa90b10cc255607073feba0bd2 (diff) |
Check for availability of va_copy(3).
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4052 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make')
-rw-r--r-- | lib/make/cctk_Config.h.in | 1 | ||||
-rwxr-xr-x | lib/make/configure | 55 | ||||
-rw-r--r-- | lib/make/configure.in | 16 |
3 files changed, 63 insertions, 9 deletions
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in index 87b1c10a..fc9cc4a5 100644 --- a/lib/make/cctk_Config.h.in +++ b/lib/make/cctk_Config.h.in @@ -22,6 +22,7 @@ #undef HAVE_FINITE #undef HAVE_ISNAN #undef HAVE_MKSTEMP +#undef HAVE_VA_COPY /* Do we have mode_t ? */ #undef HAVE_MODE_T diff --git a/lib/make/configure b/lib/make/configure index d3e34ea4..63653706 100755 --- a/lib/make/configure +++ b/lib/make/configure @@ -4434,10 +4434,47 @@ done +echo $ac_n "checking for va_copy""... $ac_c" 1>&6 +echo "configure:4439: 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 4444 "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:4451: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "cctk_cv_have_va_copy=no" +fi +rm -f conftest* + +fi + +if test "$cctk_cv_have_va_copy" = 'yes'; then + cat >> confdefs.h <<\EOF +#define HAVE_VA_COPY 1 +EOF + + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +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:4441: checking for main in library c_r" >&5 +echo "configure:4478: 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 @@ -4446,14 +4483,14 @@ else ac_save_LIBS="$LIBS" LIBS="c_r $LIBS" cat > conftest.$ac_ext <<EOF -#line 4450 "configure" +#line 4487 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4494: \"$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 @@ -4474,7 +4511,7 @@ else fi echo $ac_n "checking for main in library pthread""... $ac_c" 1>&6 -echo "configure:4478: checking for main in library pthread" >&5 +echo "configure:4515: 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 @@ -4483,14 +4520,14 @@ else ac_save_LIBS="$LIBS" LIBS="pthread $LIBS" cat > conftest.$ac_ext <<EOF -#line 4487 "configure" +#line 4524 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4531: \"$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 @@ -4509,7 +4546,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:4513: checking for main in library pthreads" >&5 +echo "configure:4550: 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 @@ -4518,14 +4555,14 @@ else ac_save_LIBS="$LIBS" LIBS="pthreads $LIBS" cat > conftest.$ac_ext <<EOF -#line 4522 "configure" +#line 4559 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4566: \"$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 diff --git a/lib/make/configure.in b/lib/make/configure.in index 416814ae..f9a534fb 100644 --- a/lib/make/configure.in +++ b/lib/make/configure.in @@ -541,6 +541,22 @@ CCTK_CHECK_FUNCS(isnan, , CCTK_CHECK_LIB_FUNC(m, isnan)) dnl Do we have mkstemp(3) CCTK_CHECK_FUNCS(mkstemp, , CCTK_CHECK_LIB_FUNC(c, mkstemp)) +dnl Do we have va_copy(3) +AC_MSG_CHECKING([for va_copy]) +AC_CACHE_VAL(cctk_cv_have_va_copy, +[AC_TRY_LINK( +[#include <stdarg.h>], +[va_list src, dest; va_copy(dest, src); return 0], eval "cctk_cv_have_va_copy=yes", +eval "cctk_cv_have_va_copy=no") +]) +if test "$cctk_cv_have_va_copy" = 'yes'; then + AC_DEFINE(HAVE_VA_COPY) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + + dnl Checks for availability of pthreads library. if test "X$PTHREADS" = 'Xyes'; then PTHREAD_LIBS= |