summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2009-08-29 20:21:21 -0400
committerMatthias Clasen <mclasen@redhat.com>2009-08-29 20:23:07 -0400
commita8715045ce60882fe45000b7a819b9bf1d93f379 (patch)
treeea86dc93c71f3848677a7cc242771a6a5af3d70c /configure.in
parent7e4e2c636e77a68a8b5b524588543dc383cb895c (diff)
downloadgtk+-a8715045ce60882fe45000b7a819b9bf1d93f379.tar.gz
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.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in35
1 files changed, 23 insertions, 12 deletions
diff --git a/configure.in b/configure.in
index fcb7ca590f..7093a0a054 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"