check the value of the null pointer, and print a warning if it's not zero
authortsauerbeck <tsauerbeck>
Thu, 26 May 2005 15:33:26 +0000 (15:33 +0000)
committertsauerbeck <tsauerbeck@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 26 May 2005 15:33:26 +0000 (15:33 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/e17/libs/eet@14962 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.in

index 92e8001..7dc3a31 100644 (file)
@@ -50,6 +50,20 @@ AC_DEFINE(__USE_GNU, , [Enable GNU extensions])
 
 AC_CHECK_FUNCS(fmemopen open_memstream realpath)
 
+dnl Check whether the null pointer is zero on this arch
+AC_MSG_CHECKING([value of the null pointer])
+AC_TRY_RUN([
+#include <stdlib.h>
+int main () {
+void *foo = NULL;
+int bar = (int) foo;
+
+return (int) foo;}
+], AC_MSG_RESULT([\o/]), [
+       AC_MSG_RESULT([o_O])
+       AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
+])
+
 if test "x${bindir}" = 'x${exec_prefix}/bin'; then
   if test "x${exec_prefix}" = "xNONE"; then
     if test "x${prefix}" = "xNONE"; then