Don't check for iwlib.h if SKIP_LIBRARY_CHECKS is set. (Bug 509060) r=bsmedberg
authorL. David Baron <dbaron@dbaron.org>
Fri, 11 Sep 2009 06:46:35 -0400
changeset 32391 454210f6bb52501496ece9cff5d9cbdd7f039348
parent 32390 60b208d3f9b83b25fa711a217dee9b3c3f753ece
child 32392 3d331523f2ad361f005a3cc77f21e509bccb224d
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs509060
milestone1.9.3a1pre
Don't check for iwlib.h if SKIP_LIBRARY_CHECKS is set. (Bug 509060) r=bsmedberg
configure.in
--- a/configure.in
+++ b/configure.in
@@ -7809,47 +7809,42 @@ fi
 dnl
 dnl option to disable necko's wifi scanner
 dnl
 MOZ_ARG_DISABLE_BOOL(necko-wifi,
 [  --disable-necko-wifi   Disable necko wifi scanner],
     NECKO_WIFI=,
     NECKO_WIFI=1
 )
-if test "$NECKO_WIFI"; then
+
+if test "$OS_ARCH" = "OS2"; then
+  dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
   NECKO_WIFI=
-  if test "$OS_ARCH" = "Linux"; then
-    AC_CHECK_HEADER([iwlib.h])
-    if test "$ac_cv_header_iwlib_h" = "yes"; then
-      NECKO_WIFI=1
-    else
-      AC_MSG_ERROR([Can't find header iwlib.h for Necko WiFi scanning (might be in package libiw-dev (Ubuntu) or wireless-tools-devel (Fedora)); use --disable-necko-wifi to disable])
-    fi
-  elif test "$OS_ARCH" = "Darwin"; then
-    NECKO_WIFI=1
-  elif test "$OS_ARCH" = "WINNT"; then
-    NECKO_WIFI=1
-  elif test "$OS_ARCH" = "WINCE"; then
-    NECKO_WIFI=1    
-  elif test "$OS_ARCH" = "OS2"; then
-    dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
-    NECKO_WIFI=
-  else
-    AC_MSG_ERROR([Necko WiFi scanning not supported on your platform, use --disable-necko-wifi])
+fi
+if test "$NECKO_WIFI" -a \
+        "$OS_ARCH" != "Linux" -a \
+        "$OS_ARCH" != "Darwin" -a \
+        "$OS_ARCH" != "WINNT" -a \
+        "$OS_ARCH" != "WINCE"; then
+  AC_MSG_ERROR([Necko WiFi scanning not supported on your platform, use --disable-necko-wifi])
+fi
+
+if test -z "$SKIP_LIBRARY_CHECKS" -a "$NECKO_WIFI" -a "$OS_ARCH" = "Linux"
+then
+  AC_CHECK_HEADER([iwlib.h])
+  if test "$ac_cv_header_iwlib_h" != "yes"; then
+    AC_MSG_ERROR([Can't find header iwlib.h for Necko WiFi scanning (might be in package libiw-dev (Ubuntu) or wireless-tools-devel (Fedora)); use --disable-necko-wifi to disable])
   fi
-  AC_SUBST(NECKO_WIFI)
-  
-  if test "$NECKO_WIFI"; then
-    AC_DEFINE(NECKO_WIFI)
-  fi
-
+fi
+
+if test "$NECKO_WIFI"; then
+  AC_DEFINE(NECKO_WIFI)
 fi
 AC_SUBST(NECKO_WIFI)
 
-
 dnl
 dnl option to minimize size of necko's i/o buffers
 dnl
 MOZ_ARG_ENABLE_BOOL(necko-small-buffers,
 [  --enable-necko-small-buffers
                           Minimize size of necko's i/o buffers],
     NECKO_SMALL_BUFFERS=1,
     NECKO_SMALL_BUFFERS=)