diff mbox

[1/2] ./configure: request pkg-config to provide private libs when static linking

Message ID 1327304498-11274-1-git-send-email-slyfox@inbox.ru
State New
Headers show

Commit Message

Sergei Trofimovich Jan. 23, 2012, 7:41 a.m. UTC
From: Sergei Trofimovich <slyfox@gentoo.org>

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
 configure |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Peter Maydell Jan. 23, 2012, 10:33 a.m. UTC | #1
On 23 January 2012 07:41, Sergei Trofimovich <slyfox@inbox.ru> wrote:
> From: Sergei Trofimovich <slyfox@gentoo.org>
>
> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
> ---
>  configure |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/configure b/configure
> index 467e87b..f3dcfba 100755
> --- a/configure
> +++ b/configure
> @@ -553,6 +553,7 @@ for opt do
>   --static)
>     static="yes"
>     LDFLAGS="-static $LDFLAGS"
> +    pkg_config="${pkg_config} --static"
>   ;;
>   --mandir=*) mandir="$optarg"
>   ;;

I guess this works, but it seems a bit fragile, for example
if ! has $pkg_config; then
  ...
will work, but
if ! has "$pkg_config"; then
  ...

won't.

-- PMM
diff mbox

Patch

diff --git a/configure b/configure
index 467e87b..f3dcfba 100755
--- a/configure
+++ b/configure
@@ -553,6 +553,7 @@  for opt do
   --static)
     static="yes"
     LDFLAGS="-static $LDFLAGS"
+    pkg_config="${pkg_config} --static"
   ;;
   --mandir=*) mandir="$optarg"
   ;;