mirror of
https://github.com/zeromq/libzmq.git
synced 2025-05-31 00:04:39 +02:00
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>
This commit is contained in:
parent
3dbd5d5872
commit
925595259b
27
acinclude.m4
27
acinclude.m4
@ -1,3 +1,30 @@
|
|||||||
|
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 ##############################################################################
|
||||||
dnl # AC_CHECK_LANG_ICC #
|
dnl # AC_CHECK_LANG_ICC #
|
||||||
dnl # Check if the current language is compiled using ICC #
|
dnl # Check if the current language is compiled using ICC #
|
||||||
|
19
configure.in
19
configure.in
@ -33,11 +33,15 @@ AC_PROG_CC
|
|||||||
AC_PROG_CC_C99
|
AC_PROG_CC_C99
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
AC_LIBTOOL_WIN32_DLL
|
|
||||||
AC_PROG_LIBTOOL
|
|
||||||
AC_PROG_SED
|
AC_PROG_SED
|
||||||
AC_PROG_AWK
|
AC_PROG_AWK
|
||||||
|
|
||||||
|
# Host specific checks
|
||||||
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
|
# Libtool configuration for different targets. See acinclude.m4
|
||||||
|
AC_CONFIG_LIBTOOL
|
||||||
|
|
||||||
# Check for ICC and Sun Studio compilers
|
# Check for ICC and Sun Studio compilers
|
||||||
AC_LANG(C)
|
AC_LANG(C)
|
||||||
AC_CHECK_LANG_ICC
|
AC_CHECK_LANG_ICC
|
||||||
@ -82,9 +86,6 @@ werror="yes"
|
|||||||
# Whether we are on mingw or not.
|
# Whether we are on mingw or not.
|
||||||
on_mingw32="no"
|
on_mingw32="no"
|
||||||
|
|
||||||
# Host speciffic checks
|
|
||||||
AC_CANONICAL_HOST
|
|
||||||
|
|
||||||
# Set some default features required by 0MQ code.
|
# Set some default features required by 0MQ code.
|
||||||
CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS"
|
CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS"
|
||||||
|
|
||||||
@ -194,6 +195,10 @@ case "${host_os}" in
|
|||||||
# mingw32 defines __int64_t as long long
|
# mingw32 defines __int64_t as long long
|
||||||
CPPFLAGS="-Wno-long-long ${CPPFLAGS} "
|
CPPFLAGS="-Wno-long-long ${CPPFLAGS} "
|
||||||
on_mingw32="yes"
|
on_mingw32="yes"
|
||||||
|
|
||||||
|
if test "x$enable_static" = "xyes"; then
|
||||||
|
AC_MSG_ERROR([Building static libraries is not supported under MinGW32])
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*cygwin*)
|
*cygwin*)
|
||||||
# Define on Cygwin to enable all library features
|
# Define on Cygwin to enable all library features
|
||||||
@ -204,6 +209,10 @@ case "${host_os}" in
|
|||||||
LDFLAGS="${LDFLAGS} -L/usr/lib/e2fsprogs"
|
LDFLAGS="${LDFLAGS} -L/usr/lib/e2fsprogs"
|
||||||
AC_CHECK_LIB(uuid, uuid_generate, ,
|
AC_CHECK_LIB(uuid, uuid_generate, ,
|
||||||
[AC_MSG_ERROR([cannot link with -luuid, install the e2fsprogs package.])])
|
[AC_MSG_ERROR([cannot link with -luuid, install the e2fsprogs package.])])
|
||||||
|
|
||||||
|
if test "x$enable_static" = "xyes"; then
|
||||||
|
AC_MSG_ERROR([Building static libraries is not supported under Cygwin])
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
AC_MSG_ERROR([unsupported system: ${host_os}.])
|
AC_MSG_ERROR([unsupported system: ${host_os}.])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user