add a check for c99 %a format support - so all those people with mysterious

errors will know why and who to contact for fixes (not us!)

SVN revision: 19763
This commit is contained in:
Carsten Haitzler 2006-01-14 08:59:42 +00:00
parent 8ff26002a5
commit ba5cc5b100
1 changed files with 29 additions and 7 deletions

View File

@ -55,17 +55,39 @@ dnl Check whether the null pointer is zero on this arch
AC_MSG_CHECKING([value of the null pointer])
#include <stdlib.h>
int main () {
void *foo = NULL;
int bar = (int) foo;
return (int) foo;}
], AC_MSG_RESULT([\o/]), [
int main (int argc, char **argv) {
void *foo = NULL;
int bar = (int)foo;
return (int)foo;
], AC_MSG_RESULT([yes]), [
AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
], AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
AC_MSG_CHECKING([OS libc C99 '%a' support])
#include <stdio.h>
int main(int argc, char **argv) {
char buf[4096];
float ival = 0.1234, oval = 0.0;
snprintf(buf, sizeof(buf), "%a", (double)ival);
sscanf(buf, "%a", &oval);
if (ival != oval) return -1;
return 0;
], AC_MSG_RESULT([yes]), [
AC_MSG_ERROR([Unsupported Operating System!
Your OS does not support C99's '%a' string format. Eet cannot function without
it. Please contact your OS vendor to get updates for C99 '%a' floating point
format read/write support or change operating systems for one with support
for an already very old standard. (Linux is known to support this, as is
Solaris 10)])
], AC_MSG_WARN([Cannot check when cross-compiling -- assuming C99 '%a' support is OK])
if test "x${bindir}" = 'x${exec_prefix}/bin'; then
if test "x${exec_prefix}" = "xNONE"; then
if test "x${prefix}" = "xNONE"; then