Author: cazfi Date: Sun Apr 26 17:41:10 2015 New Revision: 28885 URL: http://svn.gna.org/viewcvs/freeciv?rev=28885&view=rev Log: Added configure check that preprocessor __VA_ARGS__ handling works the way we expect.
See patch #6033 Modified: branches/S2_4/configure.ac branches/S2_4/m4/c99.m4 Modified: branches/S2_4/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_4/configure.ac?rev=28885&r1=28884&r2=28885&view=diff ============================================================================== --- branches/S2_4/configure.ac (original) +++ branches/S2_4/configure.ac Sun Apr 26 17:41:10 2015 @@ -426,6 +426,7 @@ AC_PROG_CXX FC_WORKING_CXX +FC_C99_TOKEN_CONCENATION AC_CHECK_PROG(UNAME,uname,uname,:) Modified: branches/S2_4/m4/c99.m4 URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_4/m4/c99.m4?rev=28885&r1=28884&r2=28885&view=diff ============================================================================== --- branches/S2_4/m4/c99.m4 (original) +++ branches/S2_4/m4/c99.m4 Sun Apr 26 17:41:10 2015 @@ -83,3 +83,19 @@ AC_MSG_ERROR([A compiler supporting C99's stdint.h is required]) fi ]) + +# Check that token concenation works as we expect +# +AC_DEFUN([FC_C99_TOKEN_CONCENATION], +[ +AC_CACHE_CHECK([whether preprocessor token concenation works], + [ac_cv_c99_token_concenation], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define COMBINE(a, b) a ## b + #define CALLER(...) COMBINE(, __VA_ARGS__)]], + [[CALLER(); + char *text = CALLER("string");]])], + [ac_cv_c99_token_concenation=yes],[ac_cv_c99_token_concenation=no])]) + if test "x${ac_cv_c99_token_concenation}" != "xyes" ; then + AC_MSG_ERROR([A preprocessor supporting token concenation is required]) + fi +]) _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits