[gtk+] Fix --enable-{cups,papi} handling
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Fix --enable-{cups,papi} handling
- Date: Sun, 30 Aug 2009 00:25:00 +0000 (UTC)
commit a8715045ce60882fe45000b7a819b9bf1d93f379
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 29 20:21:21 2009 -0400
Fix --enable-{cups,papi} handling
The configure script was not doing the right thing when these
options where explicitly given. Reported by Marvin Schmidt in bug 593012.
configure.in | 35 +++++++++++++++++++++++------------
1 files changed, 23 insertions(+), 12 deletions(-)
---
diff --git a/configure.in b/configure.in
index fcb7ca5..7093a0a 100644
--- a/configure.in
+++ b/configure.in
@@ -1841,10 +1841,19 @@ AC_ARG_ENABLE(cups,
[disable cups print backend])],,
[enable_cups=auto])
-if test "x$enable_cups" = "xauto"
-then
+if test "x$enable_cups" = "xno"; then
+ AM_CONDITIONAL(HAVE_CUPS, false)
+else
AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
- if test "x$CUPS_CONFIG" != "xno"; then
+ if test "x$CUPS_CONFIG" = "xno"; then
+ if test "x$enable_cups" = "xauto"; then
+ AM_CONDITIONAL(HAVE_CUPS, false)
+ else
+ AC_MSG_ERROR([
+*** cups not found.
+])
+ fi
+ else
CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
CUPS_LIBS=`$CUPS_CONFIG --libs`
@@ -1865,7 +1874,8 @@ then
AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
fi
- AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
+
+ AM_CONDITIONAL(HAVE_CUPS, true)
gtk_save_cflags="$CFLAGS"
CFLAGS="$CUPS_CFLAGS"
@@ -1881,9 +1891,6 @@ then
LIBS="$CUPS_LIBS"
AC_CHECK_FUNCS(httpGetAuthString)
LIBS="$gtk_save_libs"
-
-else
- AM_CONDITIONAL(HAVE_CUPS, false)
fi
# Checks to see if we should compile with PAPI backend for GTK+
@@ -1894,19 +1901,23 @@ AC_ARG_ENABLE(papi,
[disable papi print backend])],,
[enable_papi=auto])
-if test "x$enable_papi" = "xauto"
-then
+if test "x$enable_papi" = "xno"; then
+ AM_CONDITIONAL(HAVE_PAPI, false)
+else
AC_MSG_CHECKING(libpapi)
AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
if test $have_papi = yes; then
AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
fi
AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
-else
- AM_CONDITIONAL(HAVE_PAPI, false)
+ if test "x$enable_papi" = "xyes" -a "x$have_papi" = "xno"; then
+ AC_MSG_ERROR([
+*** papi not found.
+])
+ fi
fi
-AM_CONDITIONAL(HAVE_PAPI_CUPS, test $have_papi = yes && test "x$CUPS_CONFIG" != "xno")
+AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]