X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fax_platform.m4;h=ba46a5402dd0860bb7a9579729bebf202c49f321;hb=7fa883aca713b99985cf35750ab0e2ffe6ce58e0;hp=01ff25d90abd58f28cc055d3703fccae6af1dd3f;hpb=a782b52ac1e87fa8e3757c6a5263bf7d01a1160c;p=awesomized%2Flibmemcached diff --git a/m4/ax_platform.m4 b/m4/ax_platform.m4 index 01ff25d9..ba46a540 100644 --- a/m4/ax_platform.m4 +++ b/m4/ax_platform.m4 @@ -12,31 +12,26 @@ # # LICENSE # -# Copyright (c) 2012 Brian Aker +# Copyright (c) 2012-2013 Brian Aker # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 3 +#serial 4 # AC_DEFUN([AX_PLATFORM], [AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_CANONICAL_TARGET]) AC_DEFINE_UNQUOTED([HOST_VENDOR],["$host_vendor"],[Vendor of Build System]) AC_DEFINE_UNQUOTED([HOST_OS],["$host_os"], [OS of Build System]) AC_DEFINE_UNQUOTED([HOST_CPU],["$host_cpu"], [CPU of Build System]) - AC_DEFINE_UNQUOTED([TARGET_VENDOR],["$target_vendor"],[Vendor of Target System]) - AC_DEFINE_UNQUOTED([TARGET_OS],["$target_os"], [OS of Target System]) - AC_DEFINE_UNQUOTED([TARGET_CPU],["$target_cpu"], [CPU of Target System]) - - AS_CASE([$target_os], + AS_CASE([$host_os], [*mingw*], - [TARGET_WINDOWS="true" - AC_DEFINE([TARGET_OS_WINDOWS], [1], [Whether we are building for Windows]) + [HOST_WINDOWS="true" + AC_DEFINE([HOST_OS_WINDOWS], [1], [Whether we are building for Windows]) AC_DEFINE([EAI_SYSTEM], [11], [Another magical number]) AH_BOTTOM([ #ifndef HAVE_SYS_SOCKET_H @@ -45,16 +40,17 @@ # define SHUT_RDWR SD_BOTH #endif ])], - [*freebsd*],[AC_DEFINE([TARGET_OS_FREEBSD],[1],[Whether we are building for FreeBSD]) + [*freebsd*],[AC_DEFINE([HOST_OS_FREEBSD],[1],[Whether we are building for FreeBSD]) AC_DEFINE([__APPLE_CC__],[1],[Workaround for bug in FreeBSD headers])], - [*solaris*],[AC_DEFINE([TARGET_OS_SOLARIS],[1],[Whether we are building for Solaris])], + [*solaris*],[AC_DEFINE([HOST_OS_SOLARIS],[1],[Whether we are building for Solaris])], [*darwin*], - [TARGET_OSX="true"], + [HOST_OSX="true"], [*linux*], - [TARGET_LINUX="true" - AC_DEFINE([TARGET_OS_LINUX],[1],[Whether we build for Linux])]) + [HOST_LINUX="true" + AC_DEFINE([HOST_OS_LINUX],[1],[Whether we build for Linux])]) - AM_CONDITIONAL([BUILD_WIN32],[test "x${TARGET_WINDOWS}" = "xtrue"]) - AM_CONDITIONAL([TARGET_OSX],[test "x${TARGET_OSX}" = "xtrue"]) - AM_CONDITIONAL([TARGET_LINUX],[test "x${TARGET_LINUX}" = "xtrue"]) + AM_CONDITIONAL([BUILD_WIN32],[test "x${HOST_WINDOWS}" = "xtrue"]) + AM_CONDITIONAL([HOST_OSX],[test "x${HOST_OSX}" = "xtrue"]) + AM_CONDITIONAL([HOST_LINUX],[test "x${HOST_LINUX}" = "xtrue"]) + AM_CONDITIONAL([HOST_FREEBSD],[test "x${HOST_OS_FREEBSD}" = "xtrue"]) ])