diff options
author | Yang Tse <yangsita@gmail.com> | 2012-04-17 05:46:30 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-04-17 13:29:58 +0200 |
commit | 41191cdd54ff7f6bbb5e65bb0cd56fe0a50b5d14 (patch) | |
tree | 82701e20931787515e89cf74304e4b63478febe9 /configure.ac | |
parent | 7e2f70a08c5ae5b43b8398f16d103914eaf30ea2 (diff) | |
download | c-ares-41191cdd54ff7f6bbb5e65bb0cd56fe0a50b5d14.tar.gz c-ares-41191cdd54ff7f6bbb5e65bb0cd56fe0a50b5d14.tar.bz2 c-ares-41191cdd54ff7f6bbb5e65bb0cd56fe0a50b5d14.zip |
configure: Windows cross-compilation fixes
CARES_BUILDING_LIBRARY and CARES_STATICLIB no longer defined in ares_config.h,
configure will generate appropriate conditionals so that mentioned symbols
get defined and used in Makefile derived from Makefile.am at compilation time.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 69dc2e6..2794cca 100644 --- a/configure.ac +++ b/configure.ac @@ -128,15 +128,17 @@ dnl libtool setup AC_PROG_LIBTOOL AC_MSG_CHECKING([if we need CARES_BUILDING_LIBRARY]) +use_cppflag_cares_building_library="no" +use_cppflag_cares_staticlib="no" case $host in *-*-mingw*) - AC_DEFINE(CARES_BUILDING_LIBRARY, 1, [when building c-ares library]) AC_MSG_RESULT(yes) + use_cppflag_cares_building_library="yes" AC_MSG_CHECKING([if we need CARES_STATICLIB]) if test "X$enable_shared" = "Xno" then - AC_DEFINE(CARES_STATICLIB, 1, [when not building a shared library]) AC_MSG_RESULT(yes) + use_cppflag_cares_staticlib="yes" else AC_MSG_RESULT(no) fi @@ -145,6 +147,8 @@ case $host in AC_MSG_RESULT(no) ;; esac +AM_CONDITIONAL(USE_CPPFLAG_CARES_BUILDING_LIBRARY, test x$use_cppflag_cares_building_library = xyes) +AM_CONDITIONAL(USE_CPPFLAG_CARES_STATICLIB, test x$use_cppflag_cares_staticlib = xyes) dnl ********************************************************************** dnl platform/compiler/architecture specific checks/flags |