build-sys: don't call pkg-config --static if unnecessary
Addresses: https://github.com/util-linux/util-linux/issues/2327 Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
3a4d70419c
commit
08b35072b9
1 changed files with 6 additions and 4 deletions
10
m4/ul.m4
10
m4/ul.m4
|
@ -30,10 +30,12 @@ dnl
|
|||
dnl Calls pkg-config --static
|
||||
dnl
|
||||
AC_DEFUN([UL_PKG_STATIC], [
|
||||
if AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$2"]); then
|
||||
$1=`$PKG_CONFIG --libs --static "$2"`
|
||||
else
|
||||
AC_MSG_ERROR([pkg-config description of $2, needed for static build, is not available])
|
||||
if test "$enable_static" != xno; then
|
||||
if AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$2"]); then
|
||||
$1=`$PKG_CONFIG --libs --static "$2"`
|
||||
else
|
||||
AC_MSG_ERROR([pkg-config description of $2, needed for static build, is not available])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue