diff --git a/m4/ul.m4 b/m4/ul.m4 index 724579462..b767a481d 100644 --- a/m4/ul.m4 +++ b/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 ])