diff configure.in @ 4157:9c31ddae80a1

[gaim-migrate @ 4385] I'm commiting this so Robot101 will leave me alone. Here's some session management stuff. Happy Gnome People. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Tue, 31 Dec 2002 05:22:56 +0000
parents 9bcb42faccc0
children da30c4977c43
line wrap: on
line diff
--- a/configure.in	Tue Dec 31 02:53:41 2002 +0000
+++ b/configure.in	Tue Dec 31 05:22:56 2002 +0000
@@ -142,9 +142,10 @@
 AC_PATH_PROG(gaimpath, gaim)
 CFLAGS="$CFLAGS $GTK_CFLAGS -DGTK_ENABLE_BROKEN"
 
+AC_PATH_X
+
 dnl Check for XScreenSaver
 if test "x$enable_xss" = "xyes" ; then
-	AC_PATH_X
 	old_LIBS="$LIBS"
 	LIBS="$LIBS $GTK_LIBS -L$x_libraries"
 	XSS_LIBS="no"
@@ -168,6 +169,24 @@
 fi
 AC_SUBST(XSS_LIBS)
 
+
+dnl Check for X session management libs
+if test "x$enable_sm" = "xyes"; then
+	enable_sm=no
+	AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [-L$x_libraries -lICE])
+	if test "$found_sm_lib" = "true"; then
+		AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="-L$x_libraries -lSM -lICE" enable_sm=yes)
+	fi
+else
+	SM_LIBS=""
+	enable_sm=no
+fi
+AC_SUBST(SM_LIBS)
+if test "$enable_sm" = "yes"; then
+	AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.])
+fi
+
+
 AC_DEFUN(GC_TM_GMTOFF,
 [AC_REQUIRE([AC_STRUCT_TM])dnl
 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,