diff --git a/configure.ac b/configure.ac
index b34534e11a78472b1366abdb90878cdd6cdde58a..8862057089a496ace08fb00deb4a5f681d503277 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,8 +226,8 @@ int main(void)
 		else
 		    CURSES_LIB="-lslang"
 		fi
-		CURSES_LIB_NAME=slang], [
-		AC_MSG_RESULT(no)
+		CURSES_LIB_NAME=slang],
+		[AC_MSG_RESULT(no)
 		# We might need the term library
 		for termlib in ncurses curses termcap terminfo termlib; do
 		    AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])