summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMikko Koppanen <mkoppanen@php.net>2010-11-17 15:06:51 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-11-17 15:06:51 +0100
commit925595259b51dd84711b620afdf02245e537a38f (patch)
tree1ede18b236ca8cede87b494ce06d1ce6e239b574 /acinclude.m4
parent3dbd5d58723bdc31eb00a6ebf4f643059a432f8c (diff)
MinGW32 build fixes
After long discussions in IRC we came to conclusion that there is no elegant way to handle static builds with MinGW32. This patch sets AC_DISABLE_STATIC by default on MinGW32 and Cygwin Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m427
1 files changed, 27 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index e2cef30..631caa8 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,4 +1,31 @@
dnl ##############################################################################
+dnl # AC_CONFIG_LIBTOOL #
+dnl # Configure libtool. $host_os needs to be set before calling this macro #
+dnl ##############################################################################
+AC_DEFUN([AC_CONFIG_LIBTOOL], [{
+
+ if test "x${host_os}" = "x"; then
+ AC_MSG_ERROR([AC@&t@_CANONICAL_HOST not called before calling AC@&t@_CONFIG_LIBTOOL])
+ fi
+
+ # Libtool configuration for different targets
+ case "${host_os}" in
+ *mingw32*|*cygwin*)
+ # Disable static build by default
+ AC_DISABLE_STATIC
+ ;;
+ *)
+ # Everything else with static enabled
+ AC_ENABLE_STATIC
+ ;;
+ esac
+
+ AC_LIBTOOL_WIN32_DLL
+ AC_PROG_LIBTOOL
+}])
+
+
+dnl ##############################################################################
dnl # AC_CHECK_LANG_ICC #
dnl # Check if the current language is compiled using ICC #
dnl # Adapted from http://software.intel.com/en-us/forums/showthread.php?t=67984 #