Changeset 4845
- Timestamp:
- 06/29/09 01:08:44 (5 months ago)
- Files:
-
- 1 modified
-
mpich2/trunk/configure.in (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mpich2/trunk/configure.in
r4819 r4845 3159 3159 PAC_C_VOLATILE 3160 3160 PAC_C_RESTRICT 3161 3162 saveCFLAGS=$CFLAGS 3163 CFLAGS="$CFLAGS $MPICH2_EXTRA_CFLAGS" 3161 3164 AC_C_INLINE 3165 CFLAGS=$saveCFLAGS 3166 3162 3167 PAC_C_GNU_ATTRIBUTE 3163 3168 # We need to check for the endianess in order to implement the … … 5085 5090 if test "$ac_cv_func_vsnprintf" = "yes" ; then 5086 5091 # vsnprintf may be declared in stdio.h and may need stdarg.h 5092 saveCFLAGS=$CFLAGS 5093 CFLAGS="$CFLAGS $MPICH2_EXTRA_CFLAGS" 5087 5094 PAC_FUNC_NEEDS_DECL([#include <stdio.h> 5088 5095 #include <stdarg.h>],vsnprintf) 5096 CFLAGS=$saveCFLAGS 5089 5097 fi 5090 5098 # We would like to use strerror in the file namepublisher; it is also used … … 5095 5103 AC_CHECK_FUNCS(snprintf) 5096 5104 if test "$ac_cv_func_snprintf" = "yes" ; then 5105 saveCFLAGS=$CFLAGS 5106 CFLAGS="$CFLAGS $MPICH2_EXTRA_CFLAGS" 5097 5107 PAC_FUNC_NEEDS_DECL([#include <stdio.h>],snprintf) 5108 CFLAGS=$saveCFLAGS 5098 5109 fi 5099 5110 # if we are using stdarg, we may need va_copy . Test to see if we have it … … 5104 5115 # test in confdb/aclocal_cc.m4). 5105 5116 AC_CACHE_CHECK([for va_copy],pac_cv_func_va_copy,[ 5117 saveCFLAGS=$CFLAGS 5118 CFLAGS="$CFLAGS $MPICH2_EXTRA_CFLAGS" 5106 5119 AC_TRY_LINK([ 5107 5120 #include <stdarg.h> … … 5114 5127 } 5115 5128 ],[foo1("a test %d", 3);],pac_cv_func_va_copy=yes,pac_cv_func_va_copy=no)]) 5129 CFLAGS=$saveCFLAGS 5130 5116 5131 if test "$pac_cv_func_va_copy" = "yes" ; then 5117 5132 AC_DEFINE(HAVE_VA_COPY,1,[Define if we have va_copy]) 5118 fi 5119 # We might have __va_copy... 5120 if test "$pac_cv_func_va_copy" != "yes" ; then 5133 else 5121 5134 AC_CACHE_CHECK([for __va_copy],pac_cv_func___va_copy,[ 5135 saveCFLAGS=$CFLAGS 5136 CFLAGS="$CFLAGS $MPICH2_EXTRA_CFLAGS" 5122 5137 AC_TRY_LINK([ 5123 5138 #include <stdarg.h> … … 5130 5145 } 5131 5146 ],[foo1("a test %d", 3);],pac_cv_func___va_copy=yes,pac_cv_func___va_copy=no)]) 5147 CFLAGS=$saveCFLAGS 5132 5148 if test "$pac_cv_func___va_copy" = "yes" ; then 5133 AC_DEFINE(HAVE___VA_COPY,1,[Define if we have __va_copy])5149 AC_DEFINE(HAVE___VA_COPY,1,[Define if we have __va_copy]) 5134 5150 fi 5135 5151 fi … … 5165 5181 if test "$ac_cv_func_strdup" = "yes" ; then 5166 5182 # Do we need to declare strdup? 5183 saveCFLAGS=$CFLAGS 5184 CFLAGS="$CFLAGS $MPICH2_EXTRA_CFLAGS" 5167 5185 PAC_FUNC_NEEDS_DECL([#include <string.h>],strdup) 5186 CFLAGS=$saveCFLAGS 5168 5187 fi 5169 5188 else … … 5196 5215 AC_HAVE_FUNCS(mkstemp) 5197 5216 if test "$ac_cv_func_mkstemp" = "yes" ; then 5217 saveCFLAGS=$CFLAGS 5218 CFLAGS="$CFLAGS $MPICH2_EXTRA_CFLAGS" 5198 5219 PAC_FUNC_NEEDS_DECL([#include <stdlib.h>],mkstemp) 5220 CFLAGS=$saveCFLAGS 5199 5221 fi 5200 5222 # fdopen() converts from an fd to a FILE* 5201 5223 AC_HAVE_FUNCS(fdopen) 5202 5224 if test "$ac_cv_func_fdopen" = "yes" ; then 5225 saveCFLAGS=$CFLAGS 5226 CFLAGS="$CFLAGS $MPICH2_EXTRA_CFLAGS" 5203 5227 PAC_FUNC_NEEDS_DECL([#include <stdlib.h>],fdopen) 5228 CFLAGS=$saveCFLAGS 5204 5229 fi 5205 5230 # putenv() sets environment variable 5206 5231 AC_HAVE_FUNCS(putenv) 5207 5232 if test "$ac_cv_func_putenv" = "yes" ; then 5233 saveCFLAGS=$CFLAGS 5234 CFLAGS="$CFLAGS $MPICH2_EXTRA_CFLAGS" 5208 5235 PAC_FUNC_NEEDS_DECL([#include <stdlib.h>],putenv) 5236 CFLAGS=$saveCFLAGS 5209 5237 fi 5210 5238
