changeset 1120:124e9f0b9af5

[gaim-migrate @ 1130] Need to use AC_TRY_COMPILE instead of AC_CHECK_HEADER to get CFLAGS for X headers in case if they are not in a good place. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 22 Nov 2000 06:25:20 +0000
parents ba292594e938
children d0c35780792b
files configure.in gen
diffstat 2 files changed, 17 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Wed Nov 22 02:03:14 2000 +0000
+++ b/configure.in	Wed Nov 22 06:25:20 2000 +0000
@@ -103,25 +103,26 @@
 	LIBS="$LIBS $GTK_LIBS"
 	AC_PATH_PROG(gaimpath, gaim)
 fi
+CFLAGS="$CFLAGS $GTK_CFLAGS"
 
 dnl Check for XScreenSaver
 if test "x$enable_xss" = "xyes" ; then
-       XSS_LIBS="no"
-       XSS_HEADERS="no"
-       AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS=""],[],[-lX11 -lXext -lm])
-       AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="-lXss"],[],[-lX11 -lXext -lm])
-       if test \! "$XSS_LIBS" = "no"; then
-               AC_CHECK_HEADER(X11/extensions/scrnsaver.h,[XSS_HEADERS="yes"])
-               if test "$XSS_HEADERS" = "yes"; then
-                       dnl Found the libs and the headers
-                       AC_DEFINE(USE_SCREENSAVER)
-                       LIBS="$LIBS $XSS_LIBS"
-               fi
-       else
-               XSS_LIBS=""
-       fi
+	XSS_LIBS="no"
+	XSS_HEADERS="no"
+	AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS=""],[],[-lX11 -lXext -lm])
+	AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="-lXss"],[],[-lX11 -lXext -lm])
+	if test \! "$XSS_LIBS" = "no"; then
+		AC_TRY_COMPILE([
+#include <X11/extensions/scrnsaver.h>
+				],[],[],[
+				AC_DEFINE(USE_SCREENSAVER)
+				LIBS="$LIBS $XSS_LIBS"
+				])
+	else
+	       XSS_LIBS=""
+	fi
 else
-       XSS_LIBS=""
+	XSS_LIBS=""
 fi
 
 
@@ -131,8 +132,6 @@
 	AC_DEFINE(NO_MULTI)
 fi
 
-CFLAGS="$CFLAGS $GTK_CFLAGS"
-
 if test "x$enable_plugins" = xyes ; then
 	AC_DEFINE(GAIM_PLUGINS)
 fi
--- a/gen	Wed Nov 22 02:03:14 2000 +0000
+++ b/gen	Wed Nov 22 06:25:20 2000 +0000
@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/bin/sh
 aclocal -I m4 ; autoheader ; autoconf ; automake