[PATCH v2] staging: usbip: userspace: allow `configure --with-tcp-wrappers`

W. Trevor King wking at tremily.us
Fri Aug 17 04:02:38 UTC 2012


When `--with-tcp-wrappers` is passed to `configure`, the previous code
always reset LIBS to $saved_LIBS, regardless of whether libwrap was
found or not.  The current code makes the `--with-tcp-wrappers` case
look more like the default case, and it only resets LIBS if libwrap
was not found.
---

Oops, I thought I'd tested the version that I mailed in, but obviously
not.  This version actually works.  Changes since v1:

 	     else
-		     AC_MSG_RESULT([no])
-		     LIBS="$saved_LIBS"],
-	     fi
+		     AC_MSG_RESULT([no]);
+		     LIBS="$saved_LIBS"
+	     fi],
 	    dnl [ACTION-IF-NOT-GIVEN]

 drivers/staging/usbip/userspace/configure.ac | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/usbip/userspace/configure.ac b/drivers/staging/usbip/userspace/configure.ac
index bf5cf49..43e641e 100644
--- a/drivers/staging/usbip/userspace/configure.ac
+++ b/drivers/staging/usbip/userspace/configure.ac
@@ -56,11 +56,11 @@ AC_ARG_WITH([tcp-wrappers],
 	    [AS_HELP_STRING([--with-tcp-wrappers],
 			    [use the libwrap (TCP wrappers) library])],
 	    dnl [ACTION-IF-GIVEN]
-	    [saved_LIBS="$LIBS"
-	     if test "$withval" = "yes"; then
+	    [if test "$withval" = "yes"; then
 		     AC_MSG_RESULT([yes])
 		     AC_MSG_CHECKING([for hosts_access in -lwrap])
-		     LIBS="-lwrap $LIBS"
+		     saved_LIBS="$LIBS"
+		     LIBS="-lwrap $saved_LIBS"
 		     AC_TRY_LINK(
 		       [int hosts_access(); int allow_severity, deny_severity;],
 		       [hosts_access()],
@@ -69,9 +69,9 @@ AC_ARG_WITH([tcp-wrappers],
 				  [use tcp wrapper]) wrap_LIB="-lwrap"],
 		       [AC_MSG_RESULT([not found]); exit 1])
 	     else
-		     AC_MSG_RESULT([no])
-	     fi
-	     LIBS="$saved_LIBS"],
+		     AC_MSG_RESULT([no]);
+		     LIBS="$saved_LIBS"
+	     fi],
 	    dnl [ACTION-IF-NOT-GIVEN]
 	    [AC_MSG_RESULT([(default)])
 	     AC_MSG_CHECKING([for hosts_access in -lwrap])
-- 
1.7.11.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20120817/0e75c0cf/attachment.asc>


More information about the devel mailing list