mirror of https://github.com/moparisthebest/curl
Fix libcurl.pc and curl-config generation for static MingW* cross builds
This commit is contained in:
parent
b061fed981
commit
a379a4c163
|
@ -240,6 +240,7 @@ AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes)
|
||||||
AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
|
AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
|
||||||
use_cppflag_building_libcurl="no"
|
use_cppflag_building_libcurl="no"
|
||||||
use_cppflag_curl_staticlib="no"
|
use_cppflag_curl_staticlib="no"
|
||||||
|
CPPFLAG_CURL_STATICLIB=""
|
||||||
case $host in
|
case $host in
|
||||||
*-*-mingw*)
|
*-*-mingw*)
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
@ -249,6 +250,7 @@ case $host in
|
||||||
then
|
then
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
use_cppflag_curl_staticlib="yes"
|
use_cppflag_curl_staticlib="yes"
|
||||||
|
CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB"
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
|
@ -259,6 +261,7 @@ case $host in
|
||||||
esac
|
esac
|
||||||
AM_CONDITIONAL(USE_CPPFLAG_BUILDING_LIBCURL, test x$use_cppflag_building_libcurl = xyes)
|
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)
|
AM_CONDITIONAL(USE_CPPFLAG_CURL_STATICLIB, test x$use_cppflag_curl_staticlib = xyes)
|
||||||
|
AC_SUBST(CPPFLAG_CURL_STATICLIB)
|
||||||
|
|
||||||
# Determine whether all dependent libraries must be specified when linking
|
# Determine whether all dependent libraries must be specified when linking
|
||||||
if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
|
if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 2001 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 2001 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
|
@ -24,6 +24,7 @@
|
||||||
prefix=@prefix@
|
prefix=@prefix@
|
||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
includedir=@includedir@
|
includedir=@includedir@
|
||||||
|
cppflag_curl_staticlib=@CPPFLAG_CURL_STATICLIB@
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
|
@ -128,10 +129,15 @@ while test $# -gt 0; do
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--cflags)
|
--cflags)
|
||||||
if test "X@includedir@" = "X/usr/include"; then
|
if test "X$cppflag_curl_staticlib" = "X-DCURL_STATICLIB"; then
|
||||||
echo ""
|
CPPFLAG_CURL_STATICLIB="-DCURL_STATICLIB "
|
||||||
else
|
else
|
||||||
echo "-I@includedir@"
|
CPPFLAG_CURL_STATICLIB=""
|
||||||
|
fi
|
||||||
|
if test "X@includedir@" = "X/usr/include"; then
|
||||||
|
echo "$(CPPFLAG_CURL_STATICLIB)"
|
||||||
|
else
|
||||||
|
echo "$(CPPFLAG_CURL_STATICLIB)-I@includedir@"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
|
@ -36,4 +36,4 @@ Description: Library to transfer files with ftp, http, etc.
|
||||||
Version: @CURLVERSION@
|
Version: @CURLVERSION@
|
||||||
Libs: -L${libdir} -lcurl @LIBS@
|
Libs: -L${libdir} -lcurl @LIBS@
|
||||||
Libs.private: @LIBCURL_LIBS@ @LIBS@
|
Libs.private: @LIBCURL_LIBS@ @LIBS@
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir} @CPPFLAG_CURL_STATICLIB@
|
||||||
|
|
Loading…
Reference in New Issue