+ # We need LLONG_MAX and annoyingly GCC doesn't always give it to us
+ # by default.
+ AC_CACHE_CHECK([what C version to ask for],[rjk_cv_cstd],[
+ AC_TRY_COMPILE([#include <limits.h>],[
+ long long n = LLONG_MAX;
+ ],[rjk_cv_cstd=default],[
+ old_CC="$CC"
+ CC="${CC} -std=gnu99"
+ AC_TRY_COMPILE([#include <limits.h>],[
+ long long n = LLONG_MAX;
+ ],[rjk_cv_cstd=gnu99],[rjk_cv_cstd=unknown])
+ CC="$old_CC"
+ ])
+ ])
+ case $rjk_cv_cstd in
+ default | unknown )
+ ;;
+ * )
+ CC="${CC} -std=${rjk_cv_cstd}"
+ ;;
+ esac
+