Added HAVE_MEMCPY and HAVE_MEMSET in config.h
diff --git a/config.h.in b/config.h.in
index 0843d74..6568eba 100644
--- a/config.h.in
+++ b/config.h.in
@@ -6,6 +6,12 @@
/* define if the compiler supports basic C++11 syntax */
#undef HAVE_CXX11
+/* 1 if have memcpy in memory.h. */
+#undef HAVE_MEMCPY
+
+/* 1 if have memset in memory.h. */
+#undef HAVE_MEMSET
+
/* 1 if have the `std::shared_ptr' class. */
#undef HAVE_STD_SHARED_PTR
diff --git a/configure b/configure
index 226bbb5..c65fafe 100755
--- a/configure
+++ b/configure
@@ -4337,6 +4337,81 @@
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memcpy" >&5
+$as_echo_n "checking for memcpy... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <memory.h>
+ void test() { unsigned char buffer[1]; memcpy(buffer, buffer, 1); }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMCPY 1
+_ACEOF
+
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMCPY 0
+_ACEOF
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memset" >&5
+$as_echo_n "checking for memset... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <memory.h>
+ void test() { unsigned char buffer[1]; memset(buffer, 0, 1); }
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMSET 1
+_ACEOF
+
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMSET 0
+_ACEOF
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
diff --git a/configure.ac b/configure.ac
index 3c82010..ae0303c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,29 @@
AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 0, [1 if have the `boost::shared_ptr' class.])
])
+AC_MSG_CHECKING([for memcpy])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[#include <memory.h>]]
+ [[void test() { unsigned char buffer[1]; memcpy(buffer, buffer, 1); }]])
+], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 1, [1 if have memcpy in memory.h.])
+], [
+ AC_MSG_RESULT([no])
+ AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 0, [1 if have memcpy in memory.h.])
+])
+AC_MSG_CHECKING([for memset])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[#include <memory.h>]]
+ [[void test() { unsigned char buffer[1]; memset(buffer, 0, 1); }]])
+], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE_UNQUOTED([HAVE_MEMSET], 1, [1 if have memset in memory.h.])
+], [
+ AC_MSG_RESULT([no])
+ AC_DEFINE_UNQUOTED([HAVE_MEMSET], 0, [1 if have memset in memory.h.])
+])
+
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)