Skip to contentSkip to conversation

don't run pkg-config for features explicitly disabled

PATCH In review Michael Tokarev 2 participants 2 messages May 25, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 don't run pkg-config for features explicitly disabled

We test pkg-config for curses and curl even if those are explicitly disabled. Move these tests inside `if "$feature" != "no"' sections.

---
 configure |   21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)
configure +9 -12
index 5ae7e4a..dff93f1 100755
@@ -2154,13 +2154,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>
@@ -2192,14 +2191,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; }
Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/1
#1 lore raw

Am 25.05.2013 11:19, schrieb Michael Tokarev:

Quoted 4 lines

We test pkg-config for curses and curl even if those are explicitly disabled. Move these tests inside `if "$feature" != "no"' sections.

Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg