aboutsummaryrefslogtreecommitdiffstats
path: root/m4/macros/c_void_p.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/macros/c_void_p.m4')
-rw-r--r--m4/macros/c_void_p.m422
1 files changed, 22 insertions, 0 deletions
diff --git a/m4/macros/c_void_p.m4 b/m4/macros/c_void_p.m4
new file mode 100644
index 000000000000..3977c9be86c8
--- /dev/null
+++ b/m4/macros/c_void_p.m4
@@ -0,0 +1,22 @@
+dnl ######################################################################
+dnl check if compiler can handle "void *"
+AC_DEFUN([AMU_C_VOID_P],
+[
+AC_CACHE_CHECK(if compiler can handle void *,
+ac_cv_c_void_p,
+[
+# try to compile a program which uses void *
+AC_TRY_COMPILE(
+[ ],
+[
+void *vp;
+], ac_cv_c_void_p=yes, ac_cv_c_void_p=no)
+])
+if test "$ac_cv_c_void_p" = yes
+then
+ AC_DEFINE(voidp, void *)
+else
+ AC_DEFINE(voidp, char *)
+fi
+])
+dnl ======================================================================