summaryrefslogtreecommitdiff
blob: 532151842065aaebb92eba0d3f8219bcf24fc52c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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])