8140762: Specifying --without-LIB if not needed should not result in warning
authorihse
Thu, 29 Oct 2015 15:24:36 +0100
changeset 33393 0f584e7d6ab6
parent 33373 4a0312f2894b
child 33394 dbd286b8742f
8140762: Specifying --without-LIB if not needed should not result in warning Reviewed-by: erikj
common/autoconf/generated-configure.sh
common/autoconf/lib-alsa.m4
common/autoconf/lib-cups.m4
common/autoconf/lib-ffi.m4
common/autoconf/lib-freetype.m4
common/autoconf/lib-x11.m4
--- a/common/autoconf/generated-configure.sh	Wed Jul 05 20:56:54 2017 +0200
+++ b/common/autoconf/generated-configure.sh	Thu Oct 29 15:24:36 2015 +0100
@@ -4595,7 +4595,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1445964676
+DATE_WHEN_GENERATED=1446128654
 
 ###############################################################################
 #
@@ -46894,7 +46894,7 @@
 
 
   if test "x$NEEDS_LIB_X11" = xfalse; then
-    if test "x${with_x}" != x; then
+    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
     fi
@@ -47790,9 +47790,10 @@
 
 
   if test "x$NEEDS_LIB_CUPS" = xfalse; then
-    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
-$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
+    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
+        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
+$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
     fi
     CUPS_CFLAGS=
   else
@@ -47922,11 +47923,14 @@
   FREETYPE_BUNDLE_LIB_PATH=
 
   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
-    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
-$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
-    fi
-    if test "x$enable_freetype_bundling" != x; then
+    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
+        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
+        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
+        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
+$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
+    fi
+    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
     fi
@@ -51926,9 +51930,11 @@
 
 
   if test "x$NEEDS_LIB_ALSA" = xfalse; then
-    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
-$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
+    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
+        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
+        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
+$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
     fi
     ALSA_CFLAGS=
     ALSA_LIBS=
@@ -52105,9 +52111,11 @@
 
 
   if test "x$NEEDS_LIB_FFI" = xfalse; then
-    if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi is ignored" >&5
-$as_echo "$as_me: WARNING: libffi not used, so --with-libffi is ignored" >&2;}
+    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
+        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
+        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
+$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
     fi
     LIBFFI_CFLAGS=
     LIBFFI_LIBS=
--- a/common/autoconf/lib-alsa.m4	Wed Jul 05 20:56:54 2017 +0200
+++ b/common/autoconf/lib-alsa.m4	Thu Oct 29 15:24:36 2015 +0100
@@ -37,8 +37,10 @@
       [specify directory for the alsa library])])
 
   if test "x$NEEDS_LIB_ALSA" = xfalse; then
-    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
-      AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
+    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
+        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
+        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
+      AC_MSG_WARN([[alsa not used, so --with-alsa[-*] is ignored]])
     fi
     ALSA_CFLAGS=
     ALSA_LIBS=
--- a/common/autoconf/lib-cups.m4	Wed Jul 05 20:56:54 2017 +0200
+++ b/common/autoconf/lib-cups.m4	Thu Oct 29 15:24:36 2015 +0100
@@ -35,8 +35,9 @@
       [specify directory for the cups include files])])
 
   if test "x$NEEDS_LIB_CUPS" = xfalse; then
-    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
-      AC_MSG_WARN([cups not used, so --with-cups is ignored])
+    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
+        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
+      AC_MSG_WARN([[cups not used, so --with-cups[-*] is ignored]])
     fi
     CUPS_CFLAGS=
   else
--- a/common/autoconf/lib-ffi.m4	Wed Jul 05 20:56:54 2017 +0200
+++ b/common/autoconf/lib-ffi.m4	Thu Oct 29 15:24:36 2015 +0100
@@ -37,8 +37,10 @@
       [specify directory for the libffi library])])
 
   if test "x$NEEDS_LIB_FFI" = xfalse; then
-    if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
-      AC_MSG_WARN([libffi not used, so --with-libffi is ignored])
+    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
+        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
+        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
+      AC_MSG_WARN([[libffi not used, so --with-libffi[-*] is ignored]])
     fi
     LIBFFI_CFLAGS=
     LIBFFI_LIBS=
--- a/common/autoconf/lib-freetype.m4	Wed Jul 05 20:56:54 2017 +0200
+++ b/common/autoconf/lib-freetype.m4	Thu Oct 29 15:24:36 2015 +0100
@@ -202,10 +202,13 @@
   FREETYPE_BUNDLE_LIB_PATH=
 
   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
-    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
-      AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
+    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
+        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
+        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
+        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
+      AC_MSG_WARN([[freetype not used, so --with-freetype[-*] is ignored]])
     fi
-    if test "x$enable_freetype_bundling" != x; then
+    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
       AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored])
     fi
   else
--- a/common/autoconf/lib-x11.m4	Wed Jul 05 20:56:54 2017 +0200
+++ b/common/autoconf/lib-x11.m4	Thu Oct 29 15:24:36 2015 +0100
@@ -29,7 +29,7 @@
 AC_DEFUN_ONCE([LIB_SETUP_X11],
 [
   if test "x$NEEDS_LIB_X11" = xfalse; then
-    if test "x${with_x}" != x; then
+    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
       AC_MSG_WARN([X11 is not used, so --with-x is ignored])
     fi
     X_CFLAGS=