MacOSX compatibility: check whether memcpy is a macro, and if #undef it to get the...
[citadel.git] / webcit / configure.ac
index e89cd999da10f583d2f1dda2991578a713cb919e..9b33da91bdf5d13b154d182351bab81f2b543231 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl $Id$
-AC_INIT([WebCit], [8.11], [http://www.citadel.org/])
+AC_INIT([WebCit], [8.13], [http://www.citadel.org/])
 
 
 AC_SUBST(PROG_SUBDIRS)
@@ -252,6 +252,35 @@ AC_CHECK_HEADER(libcitadel.h,
        ]
 )
 
+AC_MSG_CHECKING([whether your system likes memcpy + HKEY]) 
+AC_TRY_COMPILE([
+#define _GNU_SOURCE
+#include <ctype.h>
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+#include <sys/select.h>
+#include <fcntl.h>
+#include <sys/types.h>
+
+#include "lib/libcitadel.h"
+],
+[
+       char foo[22];
+       memcpy(foo, HKEY("foo"));
+       
+],
+               [
+
+                 AC_MSG_RESULT([yes])
+               ],
+               [ 
+                 AC_DEFINE(UNDEF_MEMCPY, [], [whether we need to undefine memcpy])
+                 AC_MSG_RESULT([no])
+               ]
+)
 
 dnl Checks for the Expat XML parser.
 AC_CHECK_HEADER(expat.h,