Prototype of AC_ARG_WITH is the following :
AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])

action-if-given is executed only if a option --{with,without}-smclient is
given to the configure script, is nothing is given action-if-not-given is
executed.

The problem was SMCLIENT_PKGS="sm >= 1.0.0" was assigned ONLY IF nothing was
given to the configure (default behaviour) so in action-if-not-given.
If the user gave --with-smclient=stuff "[]" was executed, and then
SMCLIENT_PKGS was empty, then the PKG_CHECK_MODULES into the if statement
didn't check it, and necesseraly libSM's cflags and libs wasn't found.

 configure.ac |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 821c52b..3d8d7c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,19 +157,19 @@ GDK_TARGET="$($PKG_CONFIG --variable target gdk-2.0)"
 SMCLIENT_PKGS=
 AC_MSG_CHECKING([which smclient backend to use])
 AC_ARG_WITH([smclient],
-  [AS_HELP_STRING([--with-smclient-backend],[which smclient backend to use (no|xsmp|win32|quartz)])],
-  [],
-  [case "$GDK_TARGET" in
-    x11) case "$with_platform" in
-           gnome) with_smclient=xsmp SMCLIENT_PKGS="sm >= 1.0.0" ;;
-           *) with_smclient=no ;;
-         esac ;;
-    win32|quartz) with_smclient=$GDK_TARGET ;;
-    *) with_smclient=no ;;
-   esac])
+  [AS_HELP_STRING([--with-smclient-backend],[which smclient backend to use (no|xsmp|win32|quartz)])])
 AC_MSG_RESULT([$with_smclient])
 
 if test "$with_smclient" != "no"; then
+   case "$GDK_TARGET" in
+   	x11)
+	   case "$with_platform" in
+           	gnome) with_smclient=xsmp SMCLIENT_PKGS="sm >= 1.0.0" ;;
+           	*) with_smclient=no ;;
+           esac ;;
+        win32|quartz) with_smclient=$GDK_TARGET ;;
+        *) with_smclient=no ;;
+   esac
   AC_DEFINE([WITH_SMCLIENT],[1],[Define if smclient is enabled])
 
   PKG_CHECK_MODULES([SMCLIENT],[gtk+-2.0 gthread-2.0 $SMCLIENT_PKGS])
