summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-04-09 21:24:16 +0200
committerYang Tse <yangsita@gmail.com>2012-04-09 21:24:16 +0200
commit21423497efe36c70615d0a54e040f76043823345 (patch)
tree28baa5aa512f4352ef7a0dfd34bd6fc7c6f8d7b3 /configure.ac
parent01b0f1061da2bd7a8703f4c8aa846a9088d7ab3e (diff)
downloadcurl-21423497efe36c70615d0a54e040f76043823345.tar.gz
configure: Windows cross-compilation fixes
BUILDING_LIBCURL and CURL_STATICLIB are no longer defined in curl_config.h, configure will generate appropriate conditionals so that mentioned symbols get defined and used in Makefiles at compilation time
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 6 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 81521ff29..976553c10 100644
--- a/configure.ac
+++ b/configure.ac
@@ -236,21 +236,18 @@ esac
AC_MSG_RESULT($mimpure)
AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes)
-dnl 'STATICLIB' is, in spite of its name, not generic but only for static-only
-dnl builds on Windows
-AM_CONDITIONAL(STATICLIB, false)
-
AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
+use_cppflag_building_libcurl="no"
+use_cppflag_curl_staticlib="no"
case $host in
*-*-mingw*)
- AC_DEFINE(BUILDING_LIBCURL, 1, [when building libcurl itself])
AC_MSG_RESULT(yes)
+ use_cppflag_building_libcurl="yes"
AC_MSG_CHECKING([if we need CURL_STATICLIB])
if test "X$enable_shared" = "Xno"
then
- AC_DEFINE(CURL_STATICLIB, 1, [when not building a shared library])
AC_MSG_RESULT(yes)
- AM_CONDITIONAL(STATICLIB, true)
+ use_cppflag_curl_staticlib="yes"
else
AC_MSG_RESULT(no)
fi
@@ -259,6 +256,8 @@ case $host in
AC_MSG_RESULT(no)
;;
esac
+AM_CONDITIONAL(USE_CPPFLAG_BUILDING_LIBCURL, test x$use_cppflag_building_libcurl = xyes)
+AM_CONDITIONAL(USE_CPPFLAG_CURL_STATICLIB, test x$use_cppflag_curl_staticlib = xyes)
# Determine whether all dependent libraries must be specified when linking
if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"