1AC_DEFUN([EPOS_CXX_OPTION], 2[AC_MSG_CHECKING([for $2], [epos_cv_cxx_opt_$1]) 3AC_CACHE_VAL(epos_cv_cxx_opt_$1, 4[ cat > conftest.cc <<EOF 5#include <stdio.h> 6int main(int argc, char **argv) 7{ 8 if (argc < 0 || ((int)argv) == 0) printf(""); 9 return 0; 10} 11EOF 12epos_cv_cxx_opt_$1="unknown" 13for opt in $3; do 14 ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${opt} -o conftest conftest.cc 2>conftest2 1>&5 || continue 15 msg=`cat conftest2` 16 if test -z "$msg"; then 17 epos_cv_cxx_opt_$1=$opt 18 break 19 fi 20done 21rm -f conftest conftest2 conftest.cc]) 22AC_MSG_RESULT(${epos_cv_cxx_opt_$1}) 23if test "x${epos_cv_cxx_opt_$1}" = "xunknown"; then 24 $1= 25else 26 $1=${epos_cv_cxx_opt_$1} 27fi]) 28 29 30