Commit 9e118713 authored by Matthias Clasen's avatar Matthias Clasen

Move print backend list to configure.ac

We already juggle the print backends here, might as well
produce the list.
parent eee59473
...@@ -1462,6 +1462,7 @@ else ...@@ -1462,6 +1462,7 @@ else
PRINT_BACKENDS="$PRINT_BACKENDS cups" PRINT_BACKENDS="$PRINT_BACKENDS cups"
AM_CONDITIONAL(HAVE_CUPS, true) AM_CONDITIONAL(HAVE_CUPS, true)
have_cups=yes
gtk_save_cflags="$CFLAGS" gtk_save_cflags="$CFLAGS"
CFLAGS="$CUPS_CFLAGS" CFLAGS="$CUPS_CFLAGS"
...@@ -1521,8 +1522,9 @@ else ...@@ -1521,8 +1522,9 @@ else
PKG_CHECK_MODULES(JSON_GLIB, [json-glib-1.0], have_json_glib=yes, have_json_glib=no) PKG_CHECK_MODULES(JSON_GLIB, [json-glib-1.0], have_json_glib=yes, have_json_glib=no)
if test "x$have_rest" = "xyes" -a "x$have_json_glib" = "xyes"; then if test "x$have_rest" = "xyes" -a "x$have_json_glib" = "xyes"; then
PRINT_BACKENDS="$PRINT_BACKENDS cloudprint" PRINT_BACKENDS="$PRINT_BACKENDS cloudprint"
have_cloudprint=yes
fi fi
AM_CONDITIONAL(HAVE_CLOUDPRINT, test "x$have_rest" = "xyes" -a "x$have_json_glib" = "xyes") AM_CONDITIONAL(HAVE_CLOUDPRINT, test "x$have_cloudprint" = "xyes")
fi fi
if test "x$enable_cloudprint" = "xyes" -a "x$have_rest" = "xno"; then if test "x$enable_cloudprint" = "xyes" -a "x$have_rest" = "xno"; then
...@@ -1537,8 +1539,6 @@ if test "x$enable_cloudprint" = "xyes" -a "x$have_json_glib" = "xno"; then ...@@ -1537,8 +1539,6 @@ if test "x$enable_cloudprint" = "xyes" -a "x$have_json_glib" = "xno"; then
]) ])
fi fi
AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
gtk_save_cppflags="$CPPFLAGS" gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS" CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
...@@ -1558,7 +1558,6 @@ fi ...@@ -1558,7 +1558,6 @@ fi
CPPFLAGS="$gtk_save_cppflags" CPPFLAGS="$gtk_save_cppflags"
AC_ARG_ENABLE(test-print-backend, AC_ARG_ENABLE(test-print-backend,
[AS_HELP_STRING([--enable-test-print-backend], [AS_HELP_STRING([--enable-test-print-backend],
[build test print backend])],, [build test print backend])],,
...@@ -1572,6 +1571,21 @@ if test "$os_win32" = "yes"; then ...@@ -1572,6 +1571,21 @@ if test "$os_win32" = "yes"; then
AC_CHECK_TYPES([IPrintDialogCallback],[],[],[[#include <windows.h>]]) AC_CHECK_TYPES([IPrintDialogCallback],[],[],[[#include <windows.h>]])
fi fi
GTK_PRINT_BACKENDS="file"
if test "$have_papi" = "yes"; then
GTK_PRINT_BACKENDS="$GTK_PRINT_BACKENDS,papi"
fi
if test "$have_cups" = "yes"; then
GTK_PRINT_BACKENDS="$GTK_PRINT_BACKENDS,cups"
fi
if test "$have_papi" != "yes" -a "$have_cups" != "yes"; then
GTK_PRINT_BACKENDS="$GTK_PRINT_BACKENDS,lpr"
fi
if test "$have_cloudprint" = "yes"; then
GTK_PRINT_BACKENDS="$GTK_PRINT_BACKENDS,cloudprint"
fi
AC_SUBST(GTK_PRINT_BACKENDS)
################################################################ ################################################################
# Strip -export-dynamic from the link lines of various libraries # Strip -export-dynamic from the link lines of various libraries
################################################################ ################################################################
......
...@@ -8,36 +8,6 @@ else ...@@ -8,36 +8,6 @@ else
GTK_PRINT_PREVIEW_COMMAND="evince --unlink-tempfile --preview --print-settings %s %f" GTK_PRINT_PREVIEW_COMMAND="evince --unlink-tempfile --preview --print-settings %s %f"
endif endif
if HAVE_CLOUDPRINT
if HAVE_PAPI_CUPS
GTK_PRINT_BACKENDS=file,papi,cups,cloudprint
else
if HAVE_CUPS
GTK_PRINT_BACKENDS=file,cups,cloudprint
else
if HAVE_PAPI
GTK_PRINT_BACKENDS=file,papi,cloudprint
else
GTK_PRINT_BACKENDS=file,lpr,cloudprint
endif
endif
endif
else
if HAVE_PAPI_CUPS
GTK_PRINT_BACKENDS=file,papi,cups
else
if HAVE_CUPS
GTK_PRINT_BACKENDS=file,cups
else
if HAVE_PAPI
GTK_PRINT_BACKENDS=file,papi
else
GTK_PRINT_BACKENDS=file,lpr
endif
endif
endif
endif
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gtk\" \ -DG_LOG_DOMAIN=\"Gtk\" \
-DGTK_LIBDIR=\"$(libdir)\" \ -DGTK_LIBDIR=\"$(libdir)\" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment