Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: usbip: userspace: allow `configure --with-tcp-wrappers`

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.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

W. Trevor King and committed by
Greg Kroah-Hartman
ce591f76 93efc55b

+6 -6
+6 -6
drivers/staging/usbip/userspace/configure.ac
··· 56 56 [AS_HELP_STRING([--with-tcp-wrappers], 57 57 [use the libwrap (TCP wrappers) library])], 58 58 dnl [ACTION-IF-GIVEN] 59 - [saved_LIBS="$LIBS" 60 - if test "$withval" = "yes"; then 59 + [if test "$withval" = "yes"; then 61 60 AC_MSG_RESULT([yes]) 62 61 AC_MSG_CHECKING([for hosts_access in -lwrap]) 63 - LIBS="-lwrap $LIBS" 62 + saved_LIBS="$LIBS" 63 + LIBS="-lwrap $saved_LIBS" 64 64 AC_TRY_LINK( 65 65 [int hosts_access(); int allow_severity, deny_severity;], 66 66 [hosts_access()], ··· 69 69 [use tcp wrapper]) wrap_LIB="-lwrap"], 70 70 [AC_MSG_RESULT([not found]); exit 1]) 71 71 else 72 - AC_MSG_RESULT([no]) 73 - fi 74 - LIBS="$saved_LIBS"], 72 + AC_MSG_RESULT([no]); 73 + LIBS="$saved_LIBS" 74 + fi], 75 75 dnl [ACTION-IF-NOT-GIVEN] 76 76 [AC_MSG_RESULT([(default)]) 77 77 AC_MSG_CHECKING([for hosts_access in -lwrap])