Hi, > --- a/configure.ac > +++ b/configure.ac > @@ -80,6 +80,24 @@ AC_CANONICAL_HOST > AC_C_CONST > AC_C_VOLATILE > AC_C_BIGENDIAN > +if test "$cross_compiling" = no; then > + if test "x$ac_cv_prog_cc_c99" = "xno" || test "x$ac_cv_prog_cc_c99" > = "x"; then > + # We might be on RHEL5 with a git checkout and so broken > + # autoconf. Check if CC is gcc and if it bails when given -std=gnu99. > + # If not, use that. Yuck. > + if test "x$ac_cv_c_compiler_gnu" = "xyes"; then > + CC="$CC -std=gnu99" > + AC_RUN_IFELSE( > + [AC_LANG_PROGRAM([],[[ > + return 0; > + ]])], > + [], > + [AC_MSG_ERROR([Could not find a C99 compatible compiler])]) > + else > + AC_MSG_ERROR([Could not find a C99 compatible compiler]) > + fi > + fi > +fi This break cross compiling as in this case -std=gnu99 is not added to $CC. Why not use AC_PROG_CC_C99 (present in autoconf-2.69) that is cross compiling friendly and set CC to the correct value depending on which compiler is used (GCC, AIX, HP ...) I advise you to read autoconf/c.m4. -- Beber
Attachment:
signature.asc
Description: Digital signature