]> granicus.if.org Git - php/commitdiff
add PHP_CHECK_64BIT macro to be able to detect 64-bit platform in ./configure
authorAntony Dovgal <tony2001@php.net>
Sun, 12 Sep 2004 06:35:51 +0000 (06:35 +0000)
committerAntony Dovgal <tony2001@php.net>
Sun, 12 Sep 2004 06:35:51 +0000 (06:35 +0000)
acinclude.m4

index 22fa4287284a57f0cd554abb85e8275340e8d6f2..923d7f0d389fe40b2c9da3f353892c25d4072af2 100644 (file)
@@ -1931,3 +1931,18 @@ dnl See ADD_EXTENSION_DEP in win32 build
 AC_DEFUN(PHP_ADD_EXTENSION_DEP, [])
 
 
+dnl PHP_CHECK_64BIT([do if 32], [do if 64])
+dnl This macro is used to detect if we're at 64-bit platform or not.
+dnl It could be useful for those external libs, that have different precompiled 
+dnl versions in different directories.
+AC_DEFUN(PHP_CHECK_64BIT,[
+  AC_CHECK_SIZEOF(int)
+  AC_MSG_CHECKING([checking if we're at 64-bit platform])
+  if test "$ac_cv_sizeof_int" = "4" ; then
+    AC_MSG_RESULT([no])
+    $1
+  else
+    AC_MSG_RESULT([yes])
+    $2
+  fi
+])