diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-07-23 17:02:04 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-07-23 17:02:04 +0000 |
commit | ab5a9520df637dc450d5a1d9ff77f7ce872311ca (patch) | |
tree | aeb403a0ac5bc46c988981dc397a989eabff6ee3 | |
parent | cb388e4df89183ce40b85615c75a9ba691e2c640 (diff) | |
download | gtk+-ab5a9520df637dc450d5a1d9ff77f7ce872311ca.tar.gz |
Dectect if cups allows access to the http_t authstring field.
2007-07-23 Matthias Clasen <mclasen@redhat.com>
* configure.in: Dectect if cups allows access to the http_t
authstring field.
* modules/printbackends/cups/gtkcupsutils.c: Rely on the
HAVE_HTTP_AUTHSTRING define done by configure.
svn path=/trunk/; revision=18527
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.in | 9 | ||||
-rw-r--r-- | modules/printbackends/cups/gtkcupsutils.c | 4 |
3 files changed, 17 insertions, 4 deletions
@@ -1,3 +1,11 @@ +2007-07-23 Matthias Clasen <mclasen@redhat.com> + + * configure.in: Dectect if cups allows access to the http_t + authstring field. + + * modules/printbackends/cups/gtkcupsutils.c: Rely on the + HAVE_HTTP_AUTHSTRING define done by configure. + 2007-07-23 Emmanuele Bassi <ebassi@gnome.org> * gtk/gtkrecentchooserdefault.c: Port the GtkRecentChooser default diff --git a/configure.in b/configure.in index ba88e887a8..1230f38ad0 100644 --- a/configure.in +++ b/configure.in @@ -1572,6 +1572,15 @@ if test "x$CUPS_CONFIG" != "xno"; then fi AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno") +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" + +AC_SUBST(HAVE_HTTP_AUTHSTRING) + gtk_save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS" diff --git a/modules/printbackends/cups/gtkcupsutils.c b/modules/printbackends/cups/gtkcupsutils.c index faf369347a..32d433f1fe 100644 --- a/modules/printbackends/cups/gtkcupsutils.c +++ b/modules/printbackends/cups/gtkcupsutils.c @@ -30,10 +30,6 @@ #include <stdlib.h> #include <time.h> -#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR > 1) || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR == 1 && CUPS_VERSION_PATCH >= 20) -#define HAVE_HTTP_AUTHSTRING 1 -#endif - typedef void (*GtkCupsRequestStateFunc) (GtkCupsRequest *request); static void _connect (GtkCupsRequest *request); |