]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
don't run pkg-config for features explicitly disabled
authorMichael Tokarev <mjt@tls.msk.ru>
Sat, 25 May 2013 09:17:21 +0000 (13:17 +0400)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 1 Jun 2013 10:25:38 +0000 (14:25 +0400)
We test pkg-config for curses and curl even if those are explicitly
disabled.  Move these tests inside `if "$feature" != "no"' sections.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
configure

index 918dc36e88043e024ad9961b2fa054da3bcb6b26..269382a3985781bbb61d90a668783210fb1f1e83 100755 (executable)
--- a/configure
+++ b/configure
@@ -2153,13 +2153,12 @@ fi
 
 ##########################################
 # curses probe
-if test "$mingw32" = "yes" ; then
+if test "$curses" != "no" ; then
+  if test "$mingw32" = "yes" ; then
     curses_list="-lpdcurses"
-else
+  else
     curses_list="-lncurses:-lcurses:$($pkg_config --libs ncurses 2>/dev/null)"
-fi
-
-if test "$curses" != "no" ; then
+  fi
   curses_found=no
   cat > $TMPC << EOF
 #include <curses.h>
@@ -2191,14 +2190,12 @@ fi
 
 ##########################################
 # curl probe
-
-if $pkg_config libcurl --modversion >/dev/null 2>&1; then
-  curlconfig="$pkg_config libcurl"
-else
-  curlconfig=curl-config
-fi
-
 if test "$curl" != "no" ; then
+  if $pkg_config libcurl --modversion >/dev/null 2>&1; then
+    curlconfig="$pkg_config libcurl"
+  else
+    curlconfig=curl-config
+  fi
   cat > $TMPC << EOF
 #include <curl/curl.h>
 int main(void) { curl_easy_init(); curl_multi_setopt(0, 0, 0); return 0; }