* [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when static linking
@ 2012-08-20 21:39 Yann E. MORIN
2012-08-20 21:39 ` [Qemu-trivial] [PATCH 2/3] configure: fix detection for SDL " Yann E. MORIN
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Yann E. MORIN @ 2012-08-20 21:39 UTC (permalink / raw)
To: qemu-trivial; +Cc: Yann E. MORIN
Currently, configure uses the same code-path to check for cURL libraries,
whether we are doing a static or dynamic build.
Fix that by pasing the proper arguments: '--static-libs' for curl-config
and '--static --libs' for pkg-config when a static build is attempted.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
configure | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 60d266f..8f8ae8a 100755
--- a/configure
+++ b/configure
@@ -2077,8 +2077,10 @@ fi
if $pkg_config libcurl --modversion >/dev/null 2>&1; then
curlconfig="$pkg_config libcurl"
+ curlconfig_staticlibs="--static --libs"
else
curlconfig=curl-config
+ curlconfig_staticlibs="--static-libs"
fi
if test "$curl" != "no" ; then
@@ -2087,7 +2089,11 @@ if test "$curl" != "no" ; then
int main(void) { curl_easy_init(); curl_multi_setopt(0, 0, 0); return 0; }
EOF
curl_cflags=`$curlconfig --cflags 2>/dev/null`
- curl_libs=`$curlconfig --libs 2>/dev/null`
+ if test "$static" = "yes" ; then
+ curl_libs=`$curlconfig $curlconfig_staticlibs 2>/dev/null`
+ else
+ curl_libs=`$curlconfig --libs 2>/dev/null`
+ fi
if compile_prog "$curl_cflags" "$curl_libs" ; then
curl=yes
libs_tools="$curl_libs $libs_tools"
--
1.7.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-trivial] [PATCH 2/3] configure: fix detection for SDL libs when static linking
2012-08-20 21:39 [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when static linking Yann E. MORIN
@ 2012-08-20 21:39 ` Yann E. MORIN
2012-08-20 21:39 ` [Qemu-trivial] [PATCH 3/3] configure: fix detection for Spice " Yann E. MORIN
2012-08-24 11:02 ` [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL " Stefan Hajnoczi
2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2012-08-20 21:39 UTC (permalink / raw)
To: qemu-trivial; +Cc: Yann E. MORIN
If using pkg-config, we must use '--static --libs', not '--static-libs'
which is solely for sdl-config.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
configure | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 8f8ae8a..5b52f9d 100755
--- a/configure
+++ b/configure
@@ -1645,9 +1645,11 @@ fi
if $pkg_config sdl --modversion >/dev/null 2>&1; then
sdlconfig="$pkg_config sdl"
+ sdlconfig_staticlibs="--static --libs"
_sdlversion=`$sdlconfig --modversion 2>/dev/null | sed 's/[^0-9]//g'`
elif has ${sdl_config}; then
sdlconfig="$sdl_config"
+ sdlconfig_staticlibs="--static-libs"
_sdlversion=`$sdlconfig --version | sed 's/[^0-9]//g'`
else
if test "$sdl" = "yes" ; then
@@ -1668,7 +1670,7 @@ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
EOF
sdl_cflags=`$sdlconfig --cflags 2> /dev/null`
if test "$static" = "yes" ; then
- sdl_libs=`$sdlconfig --static-libs 2>/dev/null`
+ sdl_libs=`$sdlconfig $sdlconfig_staticlibs 2>/dev/null`
else
sdl_libs=`$sdlconfig --libs 2> /dev/null`
fi
--
1.7.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-trivial] [PATCH 3/3] configure: fix detection for Spice libs when static linking
2012-08-20 21:39 [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when static linking Yann E. MORIN
2012-08-20 21:39 ` [Qemu-trivial] [PATCH 2/3] configure: fix detection for SDL " Yann E. MORIN
@ 2012-08-20 21:39 ` Yann E. MORIN
2012-08-24 11:02 ` [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL " Stefan Hajnoczi
2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2012-08-20 21:39 UTC (permalink / raw)
To: qemu-trivial; +Cc: Yann E. MORIN
Currently, configure uses the same code-path to check for Spice libraries,
whether we are doing a static or dynamic build.
Fix that by pasing '--static --libs' for pkg-config when a static build
is attempted.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
configure | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index 5b52f9d..4d3aea4 100755
--- a/configure
+++ b/configure
@@ -2702,7 +2702,11 @@ if test "$spice" != "no" ; then
int main(void) { spice_server_new(); return 0; }
EOF
spice_cflags=$($pkg_config --cflags spice-protocol spice-server 2>/dev/null)
- spice_libs=$($pkg_config --libs spice-protocol spice-server 2>/dev/null)
+ if test "$static" = "yes" ; then
+ spice_libs=$($pkg_config --static --libs spice-protocol spice-server 2>/dev/null)
+ else
+ spice_libs=$($pkg_config --libs spice-protocol spice-server 2>/dev/null)
+ fi
if $pkg_config --atleast-version=0.8.2 spice-server >/dev/null 2>&1 && \
$pkg_config --atleast-version=0.8.1 spice-protocol > /dev/null 2>&1 && \
compile_prog "$spice_cflags" "$spice_libs" ; then
--
1.7.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when static linking
2012-08-20 21:39 [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when static linking Yann E. MORIN
2012-08-20 21:39 ` [Qemu-trivial] [PATCH 2/3] configure: fix detection for SDL " Yann E. MORIN
2012-08-20 21:39 ` [Qemu-trivial] [PATCH 3/3] configure: fix detection for Spice " Yann E. MORIN
@ 2012-08-24 11:02 ` Stefan Hajnoczi
2012-08-27 17:21 ` Yann E. MORIN
2 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2012-08-24 11:02 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: qemu-trivial
On Mon, Aug 20, 2012 at 11:39:07PM +0200, Yann E. MORIN wrote:
> Currently, configure uses the same code-path to check for cURL libraries,
> whether we are doing a static or dynamic build.
>
> Fix that by pasing the proper arguments: '--static-libs' for curl-config
> and '--static --libs' for pkg-config when a static build is attempted.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
> configure | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
Can you set pkgconfig --static --libs in one place so the if [ "$static"
= "yes" ] code isn't duplicated several times? (This is a general
question about the entire patch series.)
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when static linking
2012-08-24 11:02 ` [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL " Stefan Hajnoczi
@ 2012-08-27 17:21 ` Yann E. MORIN
0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2012-08-27 17:21 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-trivial
Stefan, All,
On Friday 24 August 2012 13:02:24 Stefan Hajnoczi wrote:
> On Mon, Aug 20, 2012 at 11:39:07PM +0200, Yann E. MORIN wrote:
> > Currently, configure uses the same code-path to check for cURL libraries,
> > whether we are doing a static or dynamic build.
> >
> > Fix that by pasing the proper arguments: '--static-libs' for curl-config
> > and '--static --libs' for pkg-config when a static build is attempted.
> >
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > ---
> > configure | 8 +++++++-
> > 1 files changed, 7 insertions(+), 1 deletions(-)
>
> Can you set pkgconfig --static --libs in one place so the if [ "$static"
> = "yes" ] code isn't duplicated several times? (This is a general
> question about the entire patch series.)
Yes, it perfectly makes sense; I'll work on this. Thank you!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-27 17:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 21:39 [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL libs when static linking Yann E. MORIN
2012-08-20 21:39 ` [Qemu-trivial] [PATCH 2/3] configure: fix detection for SDL " Yann E. MORIN
2012-08-20 21:39 ` [Qemu-trivial] [PATCH 3/3] configure: fix detection for Spice " Yann E. MORIN
2012-08-24 11:02 ` [Qemu-trivial] [PATCH 1/3] configure: fix detection for cURL " Stefan Hajnoczi
2012-08-27 17:21 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).