Add --disable-cups option. (#513826, Alberto Ruiz)

2008-03-05  Johan Dahlin  <johan@gnome.org>

    * configure.in: Add --disable-cups option.
    (#513826, Alberto Ruiz)


svn path=/trunk/; revision=19715
This commit is contained in:
Johan Dahlin
2008-03-05 16:43:10 +00:00
committed by Johan Dahlin
parent 22900f7853
commit e9b26a6412
2 changed files with 44 additions and 30 deletions

View File

@ -1,5 +1,8 @@
2008-03-05 Johan Dahlin <johan@gnome.org>
* configure.in: Add --disable-cups option.
(#513826, Alberto Ruiz)
* gtk/gtk.h:
* gtk/Makefile.am:
Separate broken and deprecated sources and headers into different sections

View File

@ -1596,8 +1596,15 @@ LIBS="$old_LIBS"
# Printing system checks
################################################################
AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
if test "x$CUPS_CONFIG" != "xno"; then
AC_ARG_ENABLE(cups,
[AC_HELP_STRING([--disable-cups]
[disable cups print backend])],,
[enable_cups=auto])
if test "x$enable_cups" = "xauto"
then
AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
if test "x$CUPS_CONFIG" != "xno"; then
CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
CUPS_LIBS=`$CUPS_CONFIG --libs`
@ -1616,22 +1623,26 @@ if test "x$CUPS_CONFIG" != "xno"; then
AC_SUBST(CUPS_LIBS)
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")
fi
AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
gtk_save_cflags="$CFLAGS"
CFLAGS="$CUPS_CFLAGS"
AC_TRY_COMPILE([#include <cups/http.h>],
gtk_save_cflags="$CFLAGS"
CFLAGS="$CUPS_CFLAGS"
AC_TRY_COMPILE([#include <cups/http.h>],
[http_t http; char *s = http.authstring;],
[AC_DEFINE(HAVE_HTTP_AUTHSTRING,[],[Define if cups http_t authstring field is accessible])],)
CFLAGS="$gtk_save_cflags"
CFLAGS="$gtk_save_cflags"
AC_SUBST(HAVE_HTTP_AUTHSTRING)
AC_SUBST(HAVE_HTTP_AUTHSTRING)
gtk_save_libs="$LIBS"
LIBS="$CUPS_LIBS"
AC_CHECK_FUNCS(httpGetAuthString)
LIBS="$gtk_save_libs"
gtk_save_libs="$LIBS"
LIBS="$CUPS_LIBS"
AC_CHECK_FUNCS(httpGetAuthString)
LIBS="$gtk_save_libs"
else
AM_CONDITIONAL(HAVE_CUPS, false)
fi
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"