cpdb-backend-cups-2.0b7/0000775000175000017500000000000014755604654010634 5cpdb-backend-cups-2.0b7/data/0000775000175000017500000000000014755604654011545 5cpdb-backend-cups-2.0b7/data/Makefile.in0000664000175000017500000003411614755604641013533 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = data ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(servicedir)" DATA = $(service_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPDB_BACKEND_DIR = @CPDB_BACKEND_DIR@ CPDB_CFLAGS = @CPDB_CFLAGS@ CPDB_LIBS = @CPDB_LIBS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@ GIOUNIX_LIBS = @GIOUNIX_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBCUPSFILTERS_CFLAGS = @LIBCUPSFILTERS_CFLAGS@ LIBCUPSFILTERS_LIBS = @LIBCUPSFILTERS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ org.cups.cupsd.Notifier.xml \ org.openprinting.Backend.CUPS.service.in # Dbus service file servicedir = $(DBUS_SERVICES_DIR) service_in_files = org.openprinting.Backend.CUPS.service.in service_DATA = $(service_in_files:.service.in=.service) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign data/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-serviceDATA: $(service_DATA) @$(NORMAL_INSTALL) @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(servicedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(servicedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(servicedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(servicedir)" || exit $$?; \ done uninstall-serviceDATA: @$(NORMAL_UNINSTALL) @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(servicedir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(servicedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-serviceDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-serviceDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-local \ cscopelist-am ctags-am distclean distclean-generic distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-serviceDATA \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-serviceDATA .PRECIOUS: Makefile $(service_DATA): $(service_in_files) Makefile @sed -e "s|\@cpdb_backend_dir\@|$(CPDB_BACKEND_DIR)|" $<> $@ clean-local: rm -rf $(service_DATA) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: cpdb-backend-cups-2.0b7/data/Makefile.am0000664000175000017500000000062614755604632013521 EXTRA_DIST = \ org.cups.cupsd.Notifier.xml \ org.openprinting.Backend.CUPS.service.in # Dbus service file servicedir = $(DBUS_SERVICES_DIR) service_in_files = org.openprinting.Backend.CUPS.service.in service_DATA = $(service_in_files:.service.in=.service) $(service_DATA): $(service_in_files) Makefile @sed -e "s|\@cpdb_backend_dir\@|$(CPDB_BACKEND_DIR)|" $<> $@ clean-local: rm -rf $(service_DATA) cpdb-backend-cups-2.0b7/data/org.openprinting.Backend.CUPS.service.in0000664000175000017500000000012014755604632021042 [D-BUS Service] Name=org.openprinting.Backend.CUPS Exec=@cpdb_backend_dir@/cups cpdb-backend-cups-2.0b7/data/org.cups.cupsd.Notifier.xml0000664000175000017500000001277314755604632016650 cpdb-backend-cups-2.0b7/src/0000775000175000017500000000000014755604654011423 5cpdb-backend-cups-2.0b7/src/print_backend_cups.c0000664000175000017500000006312414755604632015346 #include #include #include #include #include #include "cups-notifier.h" #include #include "backend_helper.h" #define _CUPS_NO_DEPRECATED 1 #define BUS_NAME "org.openprinting.Backend.CUPS" static void on_name_acquired(GDBusConnection *connection, const gchar *name, gpointer not_used); static void acquire_session_bus_name(); gpointer list_printers(gpointer _dialog_name); int send_printer_added(void *_dialog_name, unsigned flags, cups_dest_t *dest); void connect_to_signals(); BackendObj *b; void update_printer_lists() { GHashTableIter iter; gpointer key, value; g_hash_table_iter_init(&iter, b->dialogs); while (g_hash_table_iter_next(&iter, &key, &value)) { const char *dialog_name = key; refresh_printer_list(b, dialog_name); } } static void on_printer_state_changed (CupsNotifier *object, const gchar *text, const gchar *printer_uri, const gchar *printer, guint printer_state, const gchar *printer_state_reasons, gboolean printer_is_accepting_jobs, gpointer user_data) { logdebug("Printer state change on printer %s: %s\n", printer, text); GHashTableIter iter; gpointer key, value; g_hash_table_iter_init(&iter, b->dialogs); while (g_hash_table_iter_next(&iter, &key, &value)) { const char *dialog_name = key; PrinterCUPS *p = get_printer_by_name(b, dialog_name, printer); const char *state = get_printer_state(p); send_printer_state_changed_signal(b, dialog_name, printer, state, printer_is_accepting_jobs); } } static void on_printer_added (CupsNotifier *object, const gchar *text, const gchar *printer_uri, const gchar *printer, guint printer_state, const gchar *printer_state_reasons, gboolean printer_is_accepting_jobs, gpointer user_data) { logdebug("Printer added: %s\n", text); update_printer_lists(); } static void on_printer_deleted (CupsNotifier *object, const gchar *text, const gchar *printer_uri, const gchar *printer, guint printer_state, const gchar *printer_state_reasons, gboolean printer_is_accepting_jobs, gpointer user_data) { logdebug("Printer deleted: %s\n", text); update_printer_lists(); } int main() { /* Initialize internal default settings of the CUPS library */ int p = ippPort(); b = get_new_BackendObj(); cpdbInit(); acquire_session_bus_name(BUS_NAME); int subscription_id = create_subscription(); g_timeout_add_seconds (NOTIFY_LEASE_DURATION - 60, renew_subscription_timeout, &subscription_id); GError *error = NULL; CupsNotifier *cups_notifier = cups_notifier_proxy_new_for_bus_sync(G_BUS_TYPE_SYSTEM, 0, NULL, CUPS_DBUS_PATH, NULL, &error); if (error) { logwarn("Error creating cups notify handler: %s", error->message); g_error_free(error); cups_notifier = NULL; } if (cups_notifier != NULL) { g_signal_connect(cups_notifier, "printer-state-changed", G_CALLBACK(on_printer_deleted), NULL); g_signal_connect(cups_notifier, "printer-deleted", G_CALLBACK(on_printer_deleted), NULL); g_signal_connect(cups_notifier, "printer-added", G_CALLBACK(on_printer_added), NULL); } GMainLoop *loop = g_main_loop_new(NULL, FALSE); g_main_loop_run(loop); /* Main loop exited */ logdebug("Main loop exited"); g_main_loop_unref(loop); loop = NULL; cancel_subscription(subscription_id); if (cups_notifier) g_object_unref(cups_notifier); } static void acquire_session_bus_name(char *bus_name) { g_bus_own_name(G_BUS_TYPE_SESSION, bus_name, 0, //flags NULL, //bus_acquired_handler on_name_acquired, //name acquired handler NULL, //name_lost handler NULL, //user_data NULL); //user_data free function } static void on_name_acquired(GDBusConnection *connection, const gchar *name, gpointer not_used) { b->dbus_connection = connection; b->skeleton = print_backend_skeleton_new(); connect_to_signals(); connect_to_dbus(b, CPDB_BACKEND_OBJ_PATH); } static gboolean on_handle_get_all_printers(PrintBackend *interface, GDBusMethodInvocation *invocation, gpointer user_data) { int num_printers; GHashTableIter iter; gpointer key, value; GVariantBuilder builder; GVariant *printer, *printers; cups_dest_t *dest; gboolean accepting_jobs; const char *state; char *name, *info, *location, *make; GHashTable *table = cups_get_all_printers(); const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); add_frontend(b, dialog_name); num_printers = g_hash_table_size(table); if (num_printers == 0) { printers = g_variant_new_array(G_VARIANT_TYPE ("(v)"), NULL, 0); print_backend_complete_get_all_printers(interface, invocation, 0, printers); return TRUE; } g_hash_table_iter_init(&iter, table); g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY); while (g_hash_table_iter_next(&iter, &key, &value)) { name = key; dest = value; logdebug("Found printer : %s\n", name); info = cups_retrieve_string(dest, "printer-info"); location = cups_retrieve_string(dest, "printer-location"); make = cups_retrieve_string(dest, "printer-make-and-model"); accepting_jobs = cups_is_accepting_jobs(dest); state = cups_printer_state(dest); add_printer_to_dialog(b, dialog_name, dest); char *printer_name = get_printer_name_for_cups_dest(dest); printer = g_variant_new(CPDB_PRINTER_ARGS, printer_name, printer_name, info, location, make, accepting_jobs, state, BACKEND_NAME); g_variant_builder_add(&builder, "(v)", printer); g_free(printer_name); free(key); cupsFreeDests(1, value); free(info); free(location); free(make); } g_hash_table_destroy(table); printers = g_variant_builder_end(&builder); print_backend_complete_get_all_printers(interface, invocation, num_printers, printers); return TRUE; } static gboolean on_handle_get_filtered_printer_list(PrintBackend *interface, GDBusMethodInvocation *invocation, gpointer user_data) { int num_printers; GHashTableIter iter; gpointer key, value; GVariantBuilder builder; GVariant *printer, *printers; cups_dest_t *dest; gboolean accepting_jobs; const char *state; char *name, *info, *location, *make; const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); GHashTable *table = cups_get_printers(get_hide_temp(b, dialog_name), get_hide_remote(b, dialog_name)); add_frontend(b, dialog_name); num_printers = g_hash_table_size(table); if (num_printers == 0) { printers = g_variant_new_array(G_VARIANT_TYPE ("(v)"), NULL, 0); print_backend_complete_get_filtered_printer_list(interface, invocation, 0, printers); return TRUE; } g_hash_table_iter_init(&iter, table); g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY); while (g_hash_table_iter_next(&iter, &key, &value)) { name = key; dest = value; logdebug("Found printer : %s\n", name); info = cups_retrieve_string(dest, "printer-info"); location = cups_retrieve_string(dest, "printer-location"); make = cups_retrieve_string(dest, "printer-make-and-model"); accepting_jobs = cups_is_accepting_jobs(dest); state = cups_printer_state(dest); add_printer_to_dialog(b, dialog_name, dest); char *printer_name = get_printer_name_for_cups_dest(dest); printer = g_variant_new(CPDB_PRINTER_ARGS, printer_name, printer_name, info, location, make, accepting_jobs, state, BACKEND_NAME); g_variant_builder_add(&builder, "(v)", printer); g_free(printer_name); free(key); cupsFreeDests(1, value); free(info); free(location); free(make); } g_hash_table_destroy(table); printers = g_variant_builder_end(&builder); print_backend_complete_get_filtered_printer_list(interface, invocation, num_printers, printers); return TRUE; } static gboolean on_handle_get_all_translations(PrintBackend *interface, GDBusMethodInvocation *invocation, const gchar *printer_name, const gchar *locale, gpointer user_data) { PrinterCUPS *p; GVariant *translations; const char *dialog_name; dialog_name = g_dbus_method_invocation_get_sender(invocation); p = get_printer_by_name(b, dialog_name, printer_name); translations = get_printer_translations(p, locale); print_backend_complete_get_all_translations(interface, invocation, translations); return TRUE; } gpointer list_printers(gpointer _dialog_name) { const char *dialog_name = (const char *)_dialog_name; g_message("New thread for dialog at %s\n", dialog_name); int *cancel = get_dialog_cancel(b, dialog_name); cupsEnumDests(CUPS_DEST_FLAGS_NONE, -1, //NO timeout cancel, 0, //TYPE 0, //MASK send_printer_added, _dialog_name); g_message("Exiting thread for dialog at %s\n", dialog_name); return NULL; } int send_printer_added(void *_dialog_name, unsigned flags, cups_dest_t *dest) { const char *dialog_name = (const char *)_dialog_name; char *printer_name = get_printer_name_for_cups_dest(dest); if (dialog_contains_printer(b, dialog_name, printer_name)) { g_message("%s already sent.\n", printer_name); return 1; } add_printer_to_dialog(b, dialog_name, dest); send_printer_added_signal(b, dialog_name, dest); g_message(" Sent notification for printer %s\n", printer_name); g_free(printer_name); /** dest will be automatically freed later. * Don't explicitly free it */ return 1; //continue enumeration } static void on_handle_do_listing(PrintBackend *interface, GDBusMethodInvocation *invocation, gboolean is_listed, gpointer not_used) { if(!is_listed){ const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); Dialog *d = find_dialog(b, dialog_name); if (d && d->keep_alive) return; set_dialog_cancel(b, dialog_name); remove_frontend(b, dialog_name); if (no_frontends(b)) { g_message("No frontends connected .. exiting backend.\n"); exit(EXIT_SUCCESS); } } } static void on_handle_show_remote_printers(PrintBackend *interface, GDBusMethodInvocation *invocation, gboolean is_visible, gpointer not_used) { const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); if (!is_visible){ if (!get_hide_remote(b, dialog_name)) { set_dialog_cancel(b, dialog_name); set_hide_remote_printers(b, dialog_name); refresh_printer_list(b, dialog_name); } } else if (is_visible){ if (get_hide_remote(b, dialog_name)) { set_dialog_cancel(b, dialog_name); unset_hide_remote_printers(b, dialog_name); refresh_printer_list(b, dialog_name); } } } static void on_handle_show_temporary_printers(PrintBackend *interface, GDBusMethodInvocation *invocation, gboolean is_visible, gpointer not_used) { const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); if (!is_visible){ if (!get_hide_temp(b, dialog_name)) { set_dialog_cancel(b, dialog_name); set_hide_temp_printers(b, dialog_name); refresh_printer_list(b, dialog_name); } } else if (is_visible){ if (get_hide_temp(b, dialog_name)) { set_dialog_cancel(b, dialog_name); unset_hide_temp_printers(b, dialog_name); refresh_printer_list(b, dialog_name); } } } static gboolean on_handle_is_accepting_jobs(PrintBackend *interface, GDBusMethodInvocation *invocation, const gchar *printer_name, gpointer user_data) { const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); cups_dest_t *dest = get_dest_by_name(b, dialog_name, printer_name); g_assert_nonnull(dest); print_backend_complete_is_accepting_jobs(interface, invocation, cups_is_accepting_jobs(dest)); return TRUE; } static gboolean on_handle_get_printer_state(PrintBackend *interface, GDBusMethodInvocation *invocation, const gchar *printer_name, gpointer user_data) { const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); /// potential risk PrinterCUPS *p = get_printer_by_name(b, dialog_name, printer_name); const char *state = get_printer_state(p); logdebug("%s is %s\n", printer_name, state); print_backend_complete_get_printer_state(interface, invocation, state); return TRUE; } static gboolean on_handle_get_option_translation(PrintBackend *interface, GDBusMethodInvocation *invocation, const gchar *printer_name, const gchar *option_name, const gchar *locale, gpointer user_data) { const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); /// potential risk PrinterCUPS *p = get_printer_by_name(b, dialog_name, printer_name); char *translation = get_option_translation(p, option_name, locale); if (translation == NULL) translation = g_strdup(option_name); print_backend_complete_get_option_translation(interface, invocation, translation); return TRUE; } static gboolean on_handle_get_choice_translation(PrintBackend *interface, GDBusMethodInvocation *invocation, const gchar *printer_name, const gchar *option_name, const gchar *choice_name, const gchar *locale, gpointer user_data) { const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); /// potential risk PrinterCUPS *p = get_printer_by_name(b, dialog_name, printer_name); char *translation = get_choice_translation(p, option_name, choice_name, locale); if (translation == NULL) translation = g_strdup(choice_name); print_backend_complete_get_choice_translation(interface, invocation, translation); return TRUE; } static gboolean on_handle_get_group_translation(PrintBackend *interface, GDBusMethodInvocation *invocation, const gchar *printer_name, const gchar *group_name, const gchar *locale, gpointer user_data) { char *translation = cpdbGetGroupTranslation2(group_name, locale); print_backend_complete_get_group_translation(interface, invocation, translation); free(translation); return TRUE; } static gboolean on_handle_ping(PrintBackend *interface, GDBusMethodInvocation *invocation, const gchar *printer_name, gpointer user_data) { const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); /// potential risk PrinterCUPS *p = get_printer_by_name(b, dialog_name, printer_name); print_backend_complete_ping(interface, invocation); return TRUE; } static gboolean on_handle_print_socket(PrintBackend *interface, GDBusMethodInvocation *invocation, const gchar *printer_id, int num_settings, GVariant *settings, const gchar *title, gpointer user_data) { const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); PrinterCUPS *p = get_printer_by_name(b, dialog_name, printer_id); // Call the renamed function char jobid[32]; char socket[256]; print_socket(p, num_settings, settings, jobid, socket, title); // Complete the D-Bus method call with the result print_backend_complete_print_socket(interface, invocation, jobid, socket); return TRUE; } static gboolean on_handle_get_all_options(PrintBackend *interface, GDBusMethodInvocation *invocation, const gchar *printer_name, gpointer user_data) { const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); /// potential risk PrinterCUPS *p = get_printer_by_name(b, dialog_name, printer_name); Media *medias; int media_count = get_all_media(p, &medias); GVariantBuilder *builder; GVariant *media_variant; builder = g_variant_builder_new(G_VARIANT_TYPE("a(siiia(iiii))")); for (int i = 0; i < media_count; i++) { GVariant *tuple = pack_media(&medias[i]); g_variant_builder_add_value(builder, tuple); } media_variant = g_variant_builder_end(builder); Option *options; int count = get_all_options(p, &options); count = add_media_to_options(p, medias, media_count, &options, count); GVariant *variant; builder = g_variant_builder_new(G_VARIANT_TYPE("a(sssia(s))")); for (int i = 0; i < count; i++) { GVariant *tuple = pack_option(&options[i]); g_variant_builder_add_value(builder, tuple); //g_variant_unref(tuple); } variant = g_variant_builder_end(builder); print_backend_complete_get_all_options(interface, invocation, count, variant, media_count, media_variant); free_options(count, options); return TRUE; } static gboolean on_handle_get_default_printer(PrintBackend *interface, GDBusMethodInvocation *invocation, gpointer user_data) { char *def = get_default_printer(b); logdebug("%s\n", def); print_backend_complete_get_default_printer(interface, invocation, def); return TRUE; } static gboolean on_handle_keep_alive(PrintBackend *interface, GDBusMethodInvocation *invocation, gpointer user_data) { const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); Dialog *d = find_dialog(b, dialog_name); d->keep_alive = TRUE; print_backend_complete_keep_alive(interface, invocation); return TRUE; } static gboolean on_handle_replace(PrintBackend *interface, GDBusMethodInvocation *invocation, const gchar *previous_name, gpointer user_data) { const char *dialog_name = g_dbus_method_invocation_get_sender(invocation); Dialog *d = find_dialog(b, previous_name); if (d != NULL) { g_hash_table_steal(b->dialogs, previous_name); g_hash_table_insert(b->dialogs, g_strdup(dialog_name), d); g_message("Replaced %s --> %s\n", previous_name, dialog_name); } print_backend_complete_replace(interface, invocation); return TRUE; } void connect_to_signals() { PrintBackend *skeleton = b->skeleton; g_signal_connect(skeleton, //instance "handle-get-filtered-printer-list", //signal name G_CALLBACK(on_handle_get_filtered_printer_list), //callback NULL); g_signal_connect(skeleton, //instance "handle-get-all-printers", //signal name G_CALLBACK(on_handle_get_all_printers), //callback NULL); g_signal_connect(skeleton, //instance "handle-get-all-options", //signal name G_CALLBACK(on_handle_get_all_options), //callback NULL); g_signal_connect(skeleton, //instance "handle-ping", //signal name G_CALLBACK(on_handle_ping), //callback NULL); g_signal_connect(skeleton, //instance "handle-get-default-printer", //signal name G_CALLBACK(on_handle_get_default_printer), //callback NULL); g_signal_connect(skeleton, //instance "handle-print-socket", //signal name G_CALLBACK(on_handle_print_socket), //callback NULL); g_signal_connect(skeleton, //instance "handle-get-printer-state", //signal name G_CALLBACK(on_handle_get_printer_state), //callback NULL); g_signal_connect(skeleton, //instance "handle-do-listing", //signal name G_CALLBACK(on_handle_do_listing), //callback NULL); g_signal_connect(skeleton, //instance "handle-show-remote-printers", //signal name G_CALLBACK(on_handle_show_remote_printers), //callback NULL); g_signal_connect(skeleton, //instance "handle-show-temporary-printers", //signal name G_CALLBACK(on_handle_show_temporary_printers), //callback NULL); g_signal_connect(skeleton, //instance "handle-is-accepting-jobs", //signal name G_CALLBACK(on_handle_is_accepting_jobs), //callback NULL); g_signal_connect(skeleton, //instance "handle-keep-alive", //signal name G_CALLBACK(on_handle_keep_alive), //callback NULL); g_signal_connect(skeleton, //instance "handle-replace", //signal name G_CALLBACK(on_handle_replace), //callback NULL); g_signal_connect(skeleton, //instance "handle-get-option-translation", //signal name G_CALLBACK(on_handle_get_option_translation), //callback NULL); g_signal_connect(skeleton, //instance "handle-get-choice-translation", //signal name G_CALLBACK(on_handle_get_choice_translation), //callback NULL); g_signal_connect(skeleton, //instance "handle-get-group-translation", //signal name G_CALLBACK(on_handle_get_group_translation), //callback NULL); g_signal_connect(skeleton, "handle-get-all-translations", G_CALLBACK(on_handle_get_all_translations), NULL); } cpdb-backend-cups-2.0b7/src/cups-notifier.c0000664000175000017500000037120714755604654014310 /* * This file is generated by gdbus-codegen, do not modify it. * * The license of this code is the same as for the D-Bus interface description * it was derived from. Note that it links to GLib, so must comply with the * LGPL linking clauses. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "cups-notifier.h" #include #ifdef G_OS_UNIX # include #endif #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) #define g_marshal_value_peek_char(v) g_value_get_schar (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) #define g_marshal_value_peek_long(v) g_value_get_long (v) #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) #define g_marshal_value_peek_enum(v) g_value_get_enum (v) #define g_marshal_value_peek_flags(v) g_value_get_flags (v) #define g_marshal_value_peek_float(v) g_value_get_float (v) #define g_marshal_value_peek_double(v) g_value_get_double (v) #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) #define g_marshal_value_peek_param(v) g_value_get_param (v) #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) #define g_marshal_value_peek_variant(v) g_value_get_variant (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the * g_value_get_*() functions */ #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int #define g_marshal_value_peek_char(v) (v)->data[0].v_int #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint #define g_marshal_value_peek_int(v) (v)->data[0].v_int #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint #define g_marshal_value_peek_long(v) (v)->data[0].v_long #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong #define g_marshal_value_peek_float(v) (v)->data[0].v_float #define g_marshal_value_peek_double(v) (v)->data[0].v_double #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ typedef struct { GDBusArgInfo parent_struct; gboolean use_gvariant; } _ExtendedGDBusArgInfo; typedef struct { GDBusMethodInfo parent_struct; const gchar *signal_name; gboolean pass_fdlist; } _ExtendedGDBusMethodInfo; typedef struct { GDBusSignalInfo parent_struct; const gchar *signal_name; } _ExtendedGDBusSignalInfo; typedef struct { GDBusPropertyInfo parent_struct; const gchar *hyphen_name; guint use_gvariant : 1; guint emits_changed_signal : 1; } _ExtendedGDBusPropertyInfo; typedef struct { GDBusInterfaceInfo parent_struct; const gchar *hyphen_name; } _ExtendedGDBusInterfaceInfo; typedef struct { const _ExtendedGDBusPropertyInfo *info; guint prop_id; GValue orig_value; /* the value before the change */ } ChangedProperty; static void _changed_property_free (ChangedProperty *data) { g_value_unset (&data->orig_value); g_free (data); } static gboolean _g_strv_equal0 (gchar **a, gchar **b) { gboolean ret = FALSE; guint n; if (a == NULL && b == NULL) { ret = TRUE; goto out; } if (a == NULL || b == NULL) goto out; if (g_strv_length (a) != g_strv_length (b)) goto out; for (n = 0; a[n] != NULL; n++) if (g_strcmp0 (a[n], b[n]) != 0) goto out; ret = TRUE; out: return ret; } static gboolean _g_variant_equal0 (GVariant *a, GVariant *b) { gboolean ret = FALSE; if (a == NULL && b == NULL) { ret = TRUE; goto out; } if (a == NULL || b == NULL) goto out; ret = g_variant_equal (a, b); out: return ret; } G_GNUC_UNUSED static gboolean _g_value_equal (const GValue *a, const GValue *b) { gboolean ret = FALSE; g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); switch (G_VALUE_TYPE (a)) { case G_TYPE_BOOLEAN: ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); break; case G_TYPE_UCHAR: ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); break; case G_TYPE_INT: ret = (g_value_get_int (a) == g_value_get_int (b)); break; case G_TYPE_UINT: ret = (g_value_get_uint (a) == g_value_get_uint (b)); break; case G_TYPE_INT64: ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); break; case G_TYPE_UINT64: ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); break; case G_TYPE_DOUBLE: { /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ gdouble da = g_value_get_double (a); gdouble db = g_value_get_double (b); ret = memcmp (&da, &db, sizeof (gdouble)) == 0; } break; case G_TYPE_STRING: ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); break; case G_TYPE_VARIANT: ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); break; default: if (G_VALUE_TYPE (a) == G_TYPE_STRV) ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); else g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); break; } return ret; } static void _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN ( GClosure *closure, GValue *return_value G_GNUC_UNUSED, unsigned int n_param_values, const GValue *param_values, void *invocation_hint G_GNUC_UNUSED, void *marshal_data) { typedef void (*_GDbusCodegenMarshalVoid_StringStringStringUintStringBooleanFunc) (void *data1, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, void *data2); _GDbusCodegenMarshalVoid_StringStringStringUintStringBooleanFunc callback; GCClosure *cc = (GCClosure*) closure; void *data1, *data2; g_return_if_fail (n_param_values == 7); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (_GDbusCodegenMarshalVoid_StringStringStringUintStringBooleanFunc) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_string (param_values + 3), g_marshal_value_peek_uint (param_values + 4), g_marshal_value_peek_string (param_values + 5), g_marshal_value_peek_boolean (param_values + 6), data2); } static void _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN_UINT_UINT_STRING_STRING_UINT ( GClosure *closure, GValue *return_value G_GNUC_UNUSED, unsigned int n_param_values, const GValue *param_values, void *invocation_hint G_GNUC_UNUSED, void *marshal_data) { typedef void (*_GDbusCodegenMarshalVoid_StringStringStringUintStringBooleanUintUintStringStringUintFunc) (void *data1, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed, void *data2); _GDbusCodegenMarshalVoid_StringStringStringUintStringBooleanUintUintStringStringUintFunc callback; GCClosure *cc = (GCClosure*) closure; void *data1, *data2; g_return_if_fail (n_param_values == 12); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (_GDbusCodegenMarshalVoid_StringStringStringUintStringBooleanUintUintStringStringUintFunc) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_string (param_values + 3), g_marshal_value_peek_uint (param_values + 4), g_marshal_value_peek_string (param_values + 5), g_marshal_value_peek_boolean (param_values + 6), g_marshal_value_peek_uint (param_values + 7), g_marshal_value_peek_uint (param_values + 8), g_marshal_value_peek_string (param_values + 9), g_marshal_value_peek_string (param_values + 10), g_marshal_value_peek_uint (param_values + 11), data2); } /* ------------------------------------------------------------------------ * Code for interface org.cups.cupsd.Notifier * ------------------------------------------------------------------------ */ /** * SECTION:CupsNotifier * @title: CupsNotifier * @short_description: Generated C code for the org.cups.cupsd.Notifier D-Bus interface * * This section contains code for working with the org.cups.cupsd.Notifier D-Bus interface in C. */ enum { CUPS__NOTIFIER_SERVER_STARTED, CUPS__NOTIFIER_SERVER_RESTARTED, CUPS__NOTIFIER_SERVER_STOPPED, CUPS__NOTIFIER_SERVER_AUDIT, CUPS__NOTIFIER_PRINTER_ADDED, CUPS__NOTIFIER_PRINTER_DELETED, CUPS__NOTIFIER_PRINTER_MODIFIED, CUPS__NOTIFIER_PRINTER_RESTARTED, CUPS__NOTIFIER_PRINTER_STOPPED, CUPS__NOTIFIER_PRINTER_SHUTDOWN, CUPS__NOTIFIER_PRINTER_STATE_CHANGED, CUPS__NOTIFIER_PRINTER_FINISHINGS_CHANGED, CUPS__NOTIFIER_PRINTER_MEDIA_CHANGED, CUPS__NOTIFIER_JOB_CREATED, CUPS__NOTIFIER_JOB_COMPLETED, CUPS__NOTIFIER_JOB_STATE, }; static unsigned CUPS__NOTIFIER_SIGNALS[16] = { 0 }; /* ---- Introspection data for org.cups.cupsd.Notifier ---- */ static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_server_started_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_server_started_ARG_pointers[] = { &_cups_notifier_signal_info_server_started_ARG_text.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_server_started = { { -1, (gchar *) "ServerStarted", (GDBusArgInfo **) &_cups_notifier_signal_info_server_started_ARG_pointers, NULL }, "server-started" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_server_restarted_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_server_restarted_ARG_pointers[] = { &_cups_notifier_signal_info_server_restarted_ARG_text.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_server_restarted = { { -1, (gchar *) "ServerRestarted", (GDBusArgInfo **) &_cups_notifier_signal_info_server_restarted_ARG_pointers, NULL }, "server-restarted" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_server_stopped_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_server_stopped_ARG_pointers[] = { &_cups_notifier_signal_info_server_stopped_ARG_text.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_server_stopped = { { -1, (gchar *) "ServerStopped", (GDBusArgInfo **) &_cups_notifier_signal_info_server_stopped_ARG_pointers, NULL }, "server-stopped" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_server_audit_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_server_audit_ARG_pointers[] = { &_cups_notifier_signal_info_server_audit_ARG_text.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_server_audit = { { -1, (gchar *) "ServerAudit", (GDBusArgInfo **) &_cups_notifier_signal_info_server_audit_ARG_pointers, NULL }, "server-audit" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_added_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_added_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_added_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_added_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_added_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_added_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_printer_added_ARG_pointers[] = { &_cups_notifier_signal_info_printer_added_ARG_text.parent_struct, &_cups_notifier_signal_info_printer_added_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_printer_added_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_printer_added_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_printer_added_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_printer_added_ARG_printer_is_accepting_jobs.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_printer_added = { { -1, (gchar *) "PrinterAdded", (GDBusArgInfo **) &_cups_notifier_signal_info_printer_added_ARG_pointers, NULL }, "printer-added" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_deleted_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_deleted_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_deleted_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_deleted_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_deleted_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_deleted_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_printer_deleted_ARG_pointers[] = { &_cups_notifier_signal_info_printer_deleted_ARG_text.parent_struct, &_cups_notifier_signal_info_printer_deleted_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_printer_deleted_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_printer_deleted_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_printer_deleted_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_printer_deleted_ARG_printer_is_accepting_jobs.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_printer_deleted = { { -1, (gchar *) "PrinterDeleted", (GDBusArgInfo **) &_cups_notifier_signal_info_printer_deleted_ARG_pointers, NULL }, "printer-deleted" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_modified_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_modified_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_modified_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_modified_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_modified_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_modified_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_printer_modified_ARG_pointers[] = { &_cups_notifier_signal_info_printer_modified_ARG_text.parent_struct, &_cups_notifier_signal_info_printer_modified_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_printer_modified_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_printer_modified_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_printer_modified_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_printer_modified_ARG_printer_is_accepting_jobs.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_printer_modified = { { -1, (gchar *) "PrinterModified", (GDBusArgInfo **) &_cups_notifier_signal_info_printer_modified_ARG_pointers, NULL }, "printer-modified" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_restarted_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_restarted_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_restarted_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_restarted_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_restarted_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_restarted_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_printer_restarted_ARG_pointers[] = { &_cups_notifier_signal_info_printer_restarted_ARG_text.parent_struct, &_cups_notifier_signal_info_printer_restarted_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_printer_restarted_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_printer_restarted_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_printer_restarted_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_printer_restarted_ARG_printer_is_accepting_jobs.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_printer_restarted = { { -1, (gchar *) "PrinterRestarted", (GDBusArgInfo **) &_cups_notifier_signal_info_printer_restarted_ARG_pointers, NULL }, "printer-restarted" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_stopped_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_stopped_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_stopped_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_stopped_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_stopped_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_stopped_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_printer_stopped_ARG_pointers[] = { &_cups_notifier_signal_info_printer_stopped_ARG_text.parent_struct, &_cups_notifier_signal_info_printer_stopped_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_printer_stopped_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_printer_stopped_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_printer_stopped_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_printer_stopped_ARG_printer_is_accepting_jobs.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_printer_stopped = { { -1, (gchar *) "PrinterStopped", (GDBusArgInfo **) &_cups_notifier_signal_info_printer_stopped_ARG_pointers, NULL }, "printer-stopped" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_shutdown_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_shutdown_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_shutdown_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_shutdown_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_shutdown_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_shutdown_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_printer_shutdown_ARG_pointers[] = { &_cups_notifier_signal_info_printer_shutdown_ARG_text.parent_struct, &_cups_notifier_signal_info_printer_shutdown_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_printer_shutdown_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_printer_shutdown_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_printer_shutdown_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_printer_shutdown_ARG_printer_is_accepting_jobs.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_printer_shutdown = { { -1, (gchar *) "PrinterShutdown", (GDBusArgInfo **) &_cups_notifier_signal_info_printer_shutdown_ARG_pointers, NULL }, "printer-shutdown" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_state_changed_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_state_changed_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_state_changed_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_state_changed_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_state_changed_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_state_changed_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_printer_state_changed_ARG_pointers[] = { &_cups_notifier_signal_info_printer_state_changed_ARG_text.parent_struct, &_cups_notifier_signal_info_printer_state_changed_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_printer_state_changed_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_printer_state_changed_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_printer_state_changed_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_printer_state_changed_ARG_printer_is_accepting_jobs.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_printer_state_changed = { { -1, (gchar *) "PrinterStateChanged", (GDBusArgInfo **) &_cups_notifier_signal_info_printer_state_changed_ARG_pointers, NULL }, "printer-state-changed" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_finishings_changed_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_finishings_changed_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_finishings_changed_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_finishings_changed_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_finishings_changed_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_finishings_changed_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_printer_finishings_changed_ARG_pointers[] = { &_cups_notifier_signal_info_printer_finishings_changed_ARG_text.parent_struct, &_cups_notifier_signal_info_printer_finishings_changed_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_printer_finishings_changed_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_printer_finishings_changed_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_printer_finishings_changed_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_printer_finishings_changed_ARG_printer_is_accepting_jobs.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_printer_finishings_changed = { { -1, (gchar *) "PrinterFinishingsChanged", (GDBusArgInfo **) &_cups_notifier_signal_info_printer_finishings_changed_ARG_pointers, NULL }, "printer-finishings-changed" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_media_changed_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_media_changed_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_media_changed_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_media_changed_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_media_changed_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_printer_media_changed_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_printer_media_changed_ARG_pointers[] = { &_cups_notifier_signal_info_printer_media_changed_ARG_text.parent_struct, &_cups_notifier_signal_info_printer_media_changed_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_printer_media_changed_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_printer_media_changed_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_printer_media_changed_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_printer_media_changed_ARG_printer_is_accepting_jobs.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_printer_media_changed = { { -1, (gchar *) "PrinterMediaChanged", (GDBusArgInfo **) &_cups_notifier_signal_info_printer_media_changed_ARG_pointers, NULL }, "printer-media-changed" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_created_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_created_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_created_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_created_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_created_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_created_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_created_ARG_job_id = { { -1, (gchar *) "job_id", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_created_ARG_job_state = { { -1, (gchar *) "job_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_created_ARG_job_state_reasons = { { -1, (gchar *) "job_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_created_ARG_job_name = { { -1, (gchar *) "job_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_created_ARG_job_impressions_completed = { { -1, (gchar *) "job_impressions_completed", (gchar *) "u", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_job_created_ARG_pointers[] = { &_cups_notifier_signal_info_job_created_ARG_text.parent_struct, &_cups_notifier_signal_info_job_created_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_job_created_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_job_created_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_job_created_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_job_created_ARG_printer_is_accepting_jobs.parent_struct, &_cups_notifier_signal_info_job_created_ARG_job_id.parent_struct, &_cups_notifier_signal_info_job_created_ARG_job_state.parent_struct, &_cups_notifier_signal_info_job_created_ARG_job_state_reasons.parent_struct, &_cups_notifier_signal_info_job_created_ARG_job_name.parent_struct, &_cups_notifier_signal_info_job_created_ARG_job_impressions_completed.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_job_created = { { -1, (gchar *) "JobCreated", (GDBusArgInfo **) &_cups_notifier_signal_info_job_created_ARG_pointers, NULL }, "job-created" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_completed_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_completed_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_completed_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_completed_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_completed_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_completed_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_completed_ARG_job_id = { { -1, (gchar *) "job_id", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_completed_ARG_job_state = { { -1, (gchar *) "job_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_completed_ARG_job_state_reasons = { { -1, (gchar *) "job_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_completed_ARG_job_name = { { -1, (gchar *) "job_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_completed_ARG_job_impressions_completed = { { -1, (gchar *) "job_impressions_completed", (gchar *) "u", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_job_completed_ARG_pointers[] = { &_cups_notifier_signal_info_job_completed_ARG_text.parent_struct, &_cups_notifier_signal_info_job_completed_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_job_completed_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_job_completed_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_job_completed_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_job_completed_ARG_printer_is_accepting_jobs.parent_struct, &_cups_notifier_signal_info_job_completed_ARG_job_id.parent_struct, &_cups_notifier_signal_info_job_completed_ARG_job_state.parent_struct, &_cups_notifier_signal_info_job_completed_ARG_job_state_reasons.parent_struct, &_cups_notifier_signal_info_job_completed_ARG_job_name.parent_struct, &_cups_notifier_signal_info_job_completed_ARG_job_impressions_completed.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_job_completed = { { -1, (gchar *) "JobCompleted", (GDBusArgInfo **) &_cups_notifier_signal_info_job_completed_ARG_pointers, NULL }, "job-completed" }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_state_ARG_text = { { -1, (gchar *) "text", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_state_ARG_printer_uri = { { -1, (gchar *) "printer_uri", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_state_ARG_printer_name = { { -1, (gchar *) "printer_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_state_ARG_printer_state = { { -1, (gchar *) "printer_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_state_ARG_printer_state_reasons = { { -1, (gchar *) "printer_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_state_ARG_printer_is_accepting_jobs = { { -1, (gchar *) "printer_is_accepting_jobs", (gchar *) "b", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_state_ARG_job_id = { { -1, (gchar *) "job_id", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_state_ARG_job_state = { { -1, (gchar *) "job_state", (gchar *) "u", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_state_ARG_job_state_reasons = { { -1, (gchar *) "job_state_reasons", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_state_ARG_job_name = { { -1, (gchar *) "job_name", (gchar *) "s", NULL }, FALSE }; static const _ExtendedGDBusArgInfo _cups_notifier_signal_info_job_state_ARG_job_impressions_completed = { { -1, (gchar *) "job_impressions_completed", (gchar *) "u", NULL }, FALSE }; static const GDBusArgInfo * const _cups_notifier_signal_info_job_state_ARG_pointers[] = { &_cups_notifier_signal_info_job_state_ARG_text.parent_struct, &_cups_notifier_signal_info_job_state_ARG_printer_uri.parent_struct, &_cups_notifier_signal_info_job_state_ARG_printer_name.parent_struct, &_cups_notifier_signal_info_job_state_ARG_printer_state.parent_struct, &_cups_notifier_signal_info_job_state_ARG_printer_state_reasons.parent_struct, &_cups_notifier_signal_info_job_state_ARG_printer_is_accepting_jobs.parent_struct, &_cups_notifier_signal_info_job_state_ARG_job_id.parent_struct, &_cups_notifier_signal_info_job_state_ARG_job_state.parent_struct, &_cups_notifier_signal_info_job_state_ARG_job_state_reasons.parent_struct, &_cups_notifier_signal_info_job_state_ARG_job_name.parent_struct, &_cups_notifier_signal_info_job_state_ARG_job_impressions_completed.parent_struct, NULL }; static const _ExtendedGDBusSignalInfo _cups_notifier_signal_info_job_state = { { -1, (gchar *) "JobState", (GDBusArgInfo **) &_cups_notifier_signal_info_job_state_ARG_pointers, NULL }, "job-state" }; static const GDBusSignalInfo * const _cups_notifier_signal_info_pointers[] = { &_cups_notifier_signal_info_server_started.parent_struct, &_cups_notifier_signal_info_server_restarted.parent_struct, &_cups_notifier_signal_info_server_stopped.parent_struct, &_cups_notifier_signal_info_server_audit.parent_struct, &_cups_notifier_signal_info_printer_added.parent_struct, &_cups_notifier_signal_info_printer_deleted.parent_struct, &_cups_notifier_signal_info_printer_modified.parent_struct, &_cups_notifier_signal_info_printer_restarted.parent_struct, &_cups_notifier_signal_info_printer_stopped.parent_struct, &_cups_notifier_signal_info_printer_shutdown.parent_struct, &_cups_notifier_signal_info_printer_state_changed.parent_struct, &_cups_notifier_signal_info_printer_finishings_changed.parent_struct, &_cups_notifier_signal_info_printer_media_changed.parent_struct, &_cups_notifier_signal_info_job_created.parent_struct, &_cups_notifier_signal_info_job_completed.parent_struct, &_cups_notifier_signal_info_job_state.parent_struct, NULL }; static const _ExtendedGDBusInterfaceInfo _cups_notifier_interface_info = { { -1, (gchar *) "org.cups.cupsd.Notifier", NULL, (GDBusSignalInfo **) &_cups_notifier_signal_info_pointers, NULL, NULL }, "notifier", }; /** * cups_notifier_interface_info: * * Gets a machine-readable description of the org.cups.cupsd.Notifier D-Bus interface. * * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. */ GDBusInterfaceInfo * cups_notifier_interface_info (void) { return (GDBusInterfaceInfo *) &_cups_notifier_interface_info.parent_struct; } /** * cups_notifier_override_properties: * @klass: The class structure for a #GObject derived class. * @property_id_begin: The property id to assign to the first overridden property. * * Overrides all #GObject properties in the #CupsNotifier interface for a concrete class. * The properties are overridden in the order they are defined. * * Returns: The last property id. */ guint cups_notifier_override_properties (GObjectClass *klass G_GNUC_UNUSED, guint property_id_begin) { return property_id_begin - 1; } inline static void cups_notifier_signal_marshal_server_started ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { g_cclosure_marshal_VOID__STRING (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_server_restarted ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { g_cclosure_marshal_VOID__STRING (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_server_stopped ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { g_cclosure_marshal_VOID__STRING (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_server_audit ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { g_cclosure_marshal_VOID__STRING (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_printer_added ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_printer_deleted ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_printer_modified ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_printer_restarted ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_printer_stopped ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_printer_shutdown ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_printer_state_changed ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_printer_finishings_changed ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_printer_media_changed ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_job_created ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN_UINT_UINT_STRING_STRING_UINT (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_job_completed ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN_UINT_UINT_STRING_STRING_UINT (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } inline static void cups_notifier_signal_marshal_job_state ( GClosure *closure, GValue *return_value, unsigned int n_param_values, const GValue *param_values, void *invocation_hint, void *marshal_data) { _g_dbus_codegen_marshal_VOID__STRING_STRING_STRING_UINT_STRING_BOOLEAN_UINT_UINT_STRING_STRING_UINT (closure, return_value, n_param_values, param_values, invocation_hint, marshal_data); } /** * CupsNotifier: * * Abstract interface type for the D-Bus interface org.cups.cupsd.Notifier. */ /** * CupsNotifierIface: * @parent_iface: The parent interface. * @job_completed: Handler for the #CupsNotifier::job-completed signal. * @job_created: Handler for the #CupsNotifier::job-created signal. * @job_state: Handler for the #CupsNotifier::job-state signal. * @printer_added: Handler for the #CupsNotifier::printer-added signal. * @printer_deleted: Handler for the #CupsNotifier::printer-deleted signal. * @printer_finishings_changed: Handler for the #CupsNotifier::printer-finishings-changed signal. * @printer_media_changed: Handler for the #CupsNotifier::printer-media-changed signal. * @printer_modified: Handler for the #CupsNotifier::printer-modified signal. * @printer_restarted: Handler for the #CupsNotifier::printer-restarted signal. * @printer_shutdown: Handler for the #CupsNotifier::printer-shutdown signal. * @printer_state_changed: Handler for the #CupsNotifier::printer-state-changed signal. * @printer_stopped: Handler for the #CupsNotifier::printer-stopped signal. * @server_audit: Handler for the #CupsNotifier::server-audit signal. * @server_restarted: Handler for the #CupsNotifier::server-restarted signal. * @server_started: Handler for the #CupsNotifier::server-started signal. * @server_stopped: Handler for the #CupsNotifier::server-stopped signal. * * Virtual table for the D-Bus interface org.cups.cupsd.Notifier. */ typedef CupsNotifierIface CupsNotifierInterface; G_DEFINE_INTERFACE (CupsNotifier, cups_notifier, G_TYPE_OBJECT) static void cups_notifier_default_init (CupsNotifierIface *iface) { /* GObject signals for received D-Bus signals: */ /** * CupsNotifier::server-started: * @object: A #CupsNotifier. * @arg_text: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "ServerStarted" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_SERVER_STARTED] = g_signal_new ("server-started", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, server_started), NULL, NULL, cups_notifier_signal_marshal_server_started, G_TYPE_NONE, 1, G_TYPE_STRING); /** * CupsNotifier::server-restarted: * @object: A #CupsNotifier. * @arg_text: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "ServerRestarted" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_SERVER_RESTARTED] = g_signal_new ("server-restarted", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, server_restarted), NULL, NULL, cups_notifier_signal_marshal_server_restarted, G_TYPE_NONE, 1, G_TYPE_STRING); /** * CupsNotifier::server-stopped: * @object: A #CupsNotifier. * @arg_text: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "ServerStopped" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_SERVER_STOPPED] = g_signal_new ("server-stopped", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, server_stopped), NULL, NULL, cups_notifier_signal_marshal_server_stopped, G_TYPE_NONE, 1, G_TYPE_STRING); /** * CupsNotifier::server-audit: * @object: A #CupsNotifier. * @arg_text: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "ServerAudit" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_SERVER_AUDIT] = g_signal_new ("server-audit", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, server_audit), NULL, NULL, cups_notifier_signal_marshal_server_audit, G_TYPE_NONE, 1, G_TYPE_STRING); /** * CupsNotifier::printer-added: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "PrinterAdded" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_ADDED] = g_signal_new ("printer-added", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, printer_added), NULL, NULL, cups_notifier_signal_marshal_printer_added, G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN); /** * CupsNotifier::printer-deleted: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "PrinterDeleted" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_DELETED] = g_signal_new ("printer-deleted", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, printer_deleted), NULL, NULL, cups_notifier_signal_marshal_printer_deleted, G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN); /** * CupsNotifier::printer-modified: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "PrinterModified" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_MODIFIED] = g_signal_new ("printer-modified", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, printer_modified), NULL, NULL, cups_notifier_signal_marshal_printer_modified, G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN); /** * CupsNotifier::printer-restarted: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "PrinterRestarted" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_RESTARTED] = g_signal_new ("printer-restarted", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, printer_restarted), NULL, NULL, cups_notifier_signal_marshal_printer_restarted, G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN); /** * CupsNotifier::printer-stopped: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "PrinterStopped" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_STOPPED] = g_signal_new ("printer-stopped", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, printer_stopped), NULL, NULL, cups_notifier_signal_marshal_printer_stopped, G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN); /** * CupsNotifier::printer-shutdown: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "PrinterShutdown" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_SHUTDOWN] = g_signal_new ("printer-shutdown", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, printer_shutdown), NULL, NULL, cups_notifier_signal_marshal_printer_shutdown, G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN); /** * CupsNotifier::printer-state-changed: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "PrinterStateChanged" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_STATE_CHANGED] = g_signal_new ("printer-state-changed", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, printer_state_changed), NULL, NULL, cups_notifier_signal_marshal_printer_state_changed, G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN); /** * CupsNotifier::printer-finishings-changed: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "PrinterFinishingsChanged" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_FINISHINGS_CHANGED] = g_signal_new ("printer-finishings-changed", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, printer_finishings_changed), NULL, NULL, cups_notifier_signal_marshal_printer_finishings_changed, G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN); /** * CupsNotifier::printer-media-changed: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "PrinterMediaChanged" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_MEDIA_CHANGED] = g_signal_new ("printer-media-changed", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, printer_media_changed), NULL, NULL, cups_notifier_signal_marshal_printer_media_changed, G_TYPE_NONE, 6, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN); /** * CupsNotifier::job-created: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * @arg_job_id: Argument. * @arg_job_state: Argument. * @arg_job_state_reasons: Argument. * @arg_job_name: Argument. * @arg_job_impressions_completed: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "JobCreated" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_JOB_CREATED] = g_signal_new ("job-created", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, job_created), NULL, NULL, cups_notifier_signal_marshal_job_created, G_TYPE_NONE, 11, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT); /** * CupsNotifier::job-completed: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * @arg_job_id: Argument. * @arg_job_state: Argument. * @arg_job_state_reasons: Argument. * @arg_job_name: Argument. * @arg_job_impressions_completed: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "JobCompleted" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_JOB_COMPLETED] = g_signal_new ("job-completed", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, job_completed), NULL, NULL, cups_notifier_signal_marshal_job_completed, G_TYPE_NONE, 11, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT); /** * CupsNotifier::job-state: * @object: A #CupsNotifier. * @arg_text: Argument. * @arg_printer_uri: Argument. * @arg_printer_name: Argument. * @arg_printer_state: Argument. * @arg_printer_state_reasons: Argument. * @arg_printer_is_accepting_jobs: Argument. * @arg_job_id: Argument. * @arg_job_state: Argument. * @arg_job_state_reasons: Argument. * @arg_job_name: Argument. * @arg_job_impressions_completed: Argument. * * On the client-side, this signal is emitted whenever the D-Bus signal "JobState" is received. * * On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal. */ CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_JOB_STATE] = g_signal_new ("job-state", G_TYPE_FROM_INTERFACE (iface), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CupsNotifierIface, job_state), NULL, NULL, cups_notifier_signal_marshal_job_state, G_TYPE_NONE, 11, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT); } /** * cups_notifier_emit_server_started: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * * Emits the "ServerStarted" D-Bus signal. */ void cups_notifier_emit_server_started ( CupsNotifier *object, const gchar *arg_text) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_SERVER_STARTED], 0, arg_text); } /** * cups_notifier_emit_server_restarted: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * * Emits the "ServerRestarted" D-Bus signal. */ void cups_notifier_emit_server_restarted ( CupsNotifier *object, const gchar *arg_text) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_SERVER_RESTARTED], 0, arg_text); } /** * cups_notifier_emit_server_stopped: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * * Emits the "ServerStopped" D-Bus signal. */ void cups_notifier_emit_server_stopped ( CupsNotifier *object, const gchar *arg_text) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_SERVER_STOPPED], 0, arg_text); } /** * cups_notifier_emit_server_audit: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * * Emits the "ServerAudit" D-Bus signal. */ void cups_notifier_emit_server_audit ( CupsNotifier *object, const gchar *arg_text) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_SERVER_AUDIT], 0, arg_text); } /** * cups_notifier_emit_printer_added: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * * Emits the "PrinterAdded" D-Bus signal. */ void cups_notifier_emit_printer_added ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_ADDED], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs); } /** * cups_notifier_emit_printer_deleted: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * * Emits the "PrinterDeleted" D-Bus signal. */ void cups_notifier_emit_printer_deleted ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_DELETED], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs); } /** * cups_notifier_emit_printer_modified: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * * Emits the "PrinterModified" D-Bus signal. */ void cups_notifier_emit_printer_modified ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_MODIFIED], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs); } /** * cups_notifier_emit_printer_restarted: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * * Emits the "PrinterRestarted" D-Bus signal. */ void cups_notifier_emit_printer_restarted ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_RESTARTED], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs); } /** * cups_notifier_emit_printer_stopped: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * * Emits the "PrinterStopped" D-Bus signal. */ void cups_notifier_emit_printer_stopped ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_STOPPED], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs); } /** * cups_notifier_emit_printer_shutdown: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * * Emits the "PrinterShutdown" D-Bus signal. */ void cups_notifier_emit_printer_shutdown ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_SHUTDOWN], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs); } /** * cups_notifier_emit_printer_state_changed: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * * Emits the "PrinterStateChanged" D-Bus signal. */ void cups_notifier_emit_printer_state_changed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_STATE_CHANGED], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs); } /** * cups_notifier_emit_printer_finishings_changed: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * * Emits the "PrinterFinishingsChanged" D-Bus signal. */ void cups_notifier_emit_printer_finishings_changed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_FINISHINGS_CHANGED], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs); } /** * cups_notifier_emit_printer_media_changed: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * * Emits the "PrinterMediaChanged" D-Bus signal. */ void cups_notifier_emit_printer_media_changed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_PRINTER_MEDIA_CHANGED], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs); } /** * cups_notifier_emit_job_created: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * @arg_job_id: Argument to pass with the signal. * @arg_job_state: Argument to pass with the signal. * @arg_job_state_reasons: Argument to pass with the signal. * @arg_job_name: Argument to pass with the signal. * @arg_job_impressions_completed: Argument to pass with the signal. * * Emits the "JobCreated" D-Bus signal. */ void cups_notifier_emit_job_created ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_JOB_CREATED], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs, arg_job_id, arg_job_state, arg_job_state_reasons, arg_job_name, arg_job_impressions_completed); } /** * cups_notifier_emit_job_completed: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * @arg_job_id: Argument to pass with the signal. * @arg_job_state: Argument to pass with the signal. * @arg_job_state_reasons: Argument to pass with the signal. * @arg_job_name: Argument to pass with the signal. * @arg_job_impressions_completed: Argument to pass with the signal. * * Emits the "JobCompleted" D-Bus signal. */ void cups_notifier_emit_job_completed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_JOB_COMPLETED], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs, arg_job_id, arg_job_state, arg_job_state_reasons, arg_job_name, arg_job_impressions_completed); } /** * cups_notifier_emit_job_state: * @object: A #CupsNotifier. * @arg_text: Argument to pass with the signal. * @arg_printer_uri: Argument to pass with the signal. * @arg_printer_name: Argument to pass with the signal. * @arg_printer_state: Argument to pass with the signal. * @arg_printer_state_reasons: Argument to pass with the signal. * @arg_printer_is_accepting_jobs: Argument to pass with the signal. * @arg_job_id: Argument to pass with the signal. * @arg_job_state: Argument to pass with the signal. * @arg_job_state_reasons: Argument to pass with the signal. * @arg_job_name: Argument to pass with the signal. * @arg_job_impressions_completed: Argument to pass with the signal. * * Emits the "JobState" D-Bus signal. */ void cups_notifier_emit_job_state ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed) { g_signal_emit (object, CUPS__NOTIFIER_SIGNALS[CUPS__NOTIFIER_JOB_STATE], 0, arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs, arg_job_id, arg_job_state, arg_job_state_reasons, arg_job_name, arg_job_impressions_completed); } /* ------------------------------------------------------------------------ */ /** * CupsNotifierProxy: * * The #CupsNotifierProxy structure contains only private data and should only be accessed using the provided API. */ /** * CupsNotifierProxyClass: * @parent_class: The parent class. * * Class structure for #CupsNotifierProxy. */ struct _CupsNotifierProxyPrivate { GData *qdata; }; static void cups_notifier_proxy_iface_init (CupsNotifierIface *iface); #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 G_DEFINE_TYPE_WITH_CODE (CupsNotifierProxy, cups_notifier_proxy, G_TYPE_DBUS_PROXY, G_ADD_PRIVATE (CupsNotifierProxy) G_IMPLEMENT_INTERFACE (CUPS_TYPE_NOTIFIER, cups_notifier_proxy_iface_init)) #else G_DEFINE_TYPE_WITH_CODE (CupsNotifierProxy, cups_notifier_proxy, G_TYPE_DBUS_PROXY, G_IMPLEMENT_INTERFACE (CUPS_TYPE_NOTIFIER, cups_notifier_proxy_iface_init)) #endif static void cups_notifier_proxy_finalize (GObject *object) { CupsNotifierProxy *proxy = CUPS_NOTIFIER_PROXY (object); g_datalist_clear (&proxy->priv->qdata); G_OBJECT_CLASS (cups_notifier_proxy_parent_class)->finalize (object); } static void cups_notifier_proxy_get_property (GObject *object G_GNUC_UNUSED, guint prop_id G_GNUC_UNUSED, GValue *value G_GNUC_UNUSED, GParamSpec *pspec G_GNUC_UNUSED) { } static void cups_notifier_proxy_set_property (GObject *object G_GNUC_UNUSED, guint prop_id G_GNUC_UNUSED, const GValue *value G_GNUC_UNUSED, GParamSpec *pspec G_GNUC_UNUSED) { } static void cups_notifier_proxy_g_signal (GDBusProxy *proxy, const gchar *sender_name G_GNUC_UNUSED, const gchar *signal_name, GVariant *parameters) { _ExtendedGDBusSignalInfo *info; GVariantIter iter; GVariant *child; GValue *paramv; gsize num_params; gsize n; guint signal_id; info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_cups_notifier_interface_info.parent_struct, signal_name); if (info == NULL) return; num_params = g_variant_n_children (parameters); paramv = g_new0 (GValue, num_params + 1); g_value_init (¶mv[0], CUPS_TYPE_NOTIFIER); g_value_set_object (¶mv[0], proxy); g_variant_iter_init (&iter, parameters); n = 1; while ((child = g_variant_iter_next_value (&iter)) != NULL) { _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; if (arg_info->use_gvariant) { g_value_init (¶mv[n], G_TYPE_VARIANT); g_value_set_variant (¶mv[n], child); n++; } else g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); g_variant_unref (child); } signal_id = g_signal_lookup (info->signal_name, CUPS_TYPE_NOTIFIER); g_signal_emitv (paramv, signal_id, 0, NULL); for (n = 0; n < num_params + 1; n++) g_value_unset (¶mv[n]); g_free (paramv); } static void cups_notifier_proxy_g_properties_changed (GDBusProxy *_proxy, GVariant *changed_properties, const gchar *const *invalidated_properties) { CupsNotifierProxy *proxy = CUPS_NOTIFIER_PROXY (_proxy); guint n; const gchar *key; GVariantIter *iter; _ExtendedGDBusPropertyInfo *info; g_variant_get (changed_properties, "a{sv}", &iter); while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) { info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cups_notifier_interface_info.parent_struct, key); g_datalist_remove_data (&proxy->priv->qdata, key); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); } g_variant_iter_free (iter); for (n = 0; invalidated_properties[n] != NULL; n++) { info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cups_notifier_interface_info.parent_struct, invalidated_properties[n]); g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); if (info != NULL) g_object_notify (G_OBJECT (proxy), info->hyphen_name); } } static void cups_notifier_proxy_init (CupsNotifierProxy *proxy) { #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 proxy->priv = cups_notifier_proxy_get_instance_private (proxy); #else proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, CUPS_TYPE_NOTIFIER_PROXY, CupsNotifierProxyPrivate); #endif g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), cups_notifier_interface_info ()); } static void cups_notifier_proxy_class_init (CupsNotifierProxyClass *klass) { GObjectClass *gobject_class; GDBusProxyClass *proxy_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = cups_notifier_proxy_finalize; gobject_class->get_property = cups_notifier_proxy_get_property; gobject_class->set_property = cups_notifier_proxy_set_property; proxy_class = G_DBUS_PROXY_CLASS (klass); proxy_class->g_signal = cups_notifier_proxy_g_signal; proxy_class->g_properties_changed = cups_notifier_proxy_g_properties_changed; #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 g_type_class_add_private (klass, sizeof (CupsNotifierProxyPrivate)); #endif } static void cups_notifier_proxy_iface_init (CupsNotifierIface *iface G_GNUC_UNUSED) { } /** * cups_notifier_proxy_new: * @connection: A #GDBusConnection. * @flags: Flags from the #GDBusProxyFlags enumeration. * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. * @object_path: An object path. * @cancellable: (nullable): A #GCancellable or %NULL. * @callback: A #GAsyncReadyCallback to call when the request is satisfied. * @user_data: User data to pass to @callback. * * Asynchronously creates a proxy for the D-Bus interface org.cups.cupsd.Notifier. See g_dbus_proxy_new() for more details. * * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call cups_notifier_proxy_new_finish() to get the result of the operation. * * See cups_notifier_proxy_new_sync() for the synchronous, blocking version of this constructor. */ void cups_notifier_proxy_new ( GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_async_initable_new_async (CUPS_TYPE_NOTIFIER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.cups.cupsd.Notifier", NULL); } /** * cups_notifier_proxy_new_finish: * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cups_notifier_proxy_new(). * @error: Return location for error or %NULL * * Finishes an operation started with cups_notifier_proxy_new(). * * Returns: (transfer full) (type CupsNotifierProxy): The constructed proxy object or %NULL if @error is set. */ CupsNotifier * cups_notifier_proxy_new_finish ( GAsyncResult *res, GError **error) { GObject *ret; GObject *source_object; source_object = g_async_result_get_source_object (res); ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); g_object_unref (source_object); if (ret != NULL) return CUPS_NOTIFIER (ret); else return NULL; } /** * cups_notifier_proxy_new_sync: * @connection: A #GDBusConnection. * @flags: Flags from the #GDBusProxyFlags enumeration. * @name: (nullable): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. * @object_path: An object path. * @cancellable: (nullable): A #GCancellable or %NULL. * @error: Return location for error or %NULL * * Synchronously creates a proxy for the D-Bus interface org.cups.cupsd.Notifier. See g_dbus_proxy_new_sync() for more details. * * The calling thread is blocked until a reply is received. * * See cups_notifier_proxy_new() for the asynchronous version of this constructor. * * Returns: (transfer full) (type CupsNotifierProxy): The constructed proxy object or %NULL if @error is set. */ CupsNotifier * cups_notifier_proxy_new_sync ( GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error) { GInitable *ret; ret = g_initable_new (CUPS_TYPE_NOTIFIER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.cups.cupsd.Notifier", NULL); if (ret != NULL) return CUPS_NOTIFIER (ret); else return NULL; } /** * cups_notifier_proxy_new_for_bus: * @bus_type: A #GBusType. * @flags: Flags from the #GDBusProxyFlags enumeration. * @name: A bus name (well-known or unique). * @object_path: An object path. * @cancellable: (nullable): A #GCancellable or %NULL. * @callback: A #GAsyncReadyCallback to call when the request is satisfied. * @user_data: User data to pass to @callback. * * Like cups_notifier_proxy_new() but takes a #GBusType instead of a #GDBusConnection. * * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). * You can then call cups_notifier_proxy_new_for_bus_finish() to get the result of the operation. * * See cups_notifier_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. */ void cups_notifier_proxy_new_for_bus ( GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_async_initable_new_async (CUPS_TYPE_NOTIFIER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.cups.cupsd.Notifier", NULL); } /** * cups_notifier_proxy_new_for_bus_finish: * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to cups_notifier_proxy_new_for_bus(). * @error: Return location for error or %NULL * * Finishes an operation started with cups_notifier_proxy_new_for_bus(). * * Returns: (transfer full) (type CupsNotifierProxy): The constructed proxy object or %NULL if @error is set. */ CupsNotifier * cups_notifier_proxy_new_for_bus_finish ( GAsyncResult *res, GError **error) { GObject *ret; GObject *source_object; source_object = g_async_result_get_source_object (res); ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); g_object_unref (source_object); if (ret != NULL) return CUPS_NOTIFIER (ret); else return NULL; } /** * cups_notifier_proxy_new_for_bus_sync: * @bus_type: A #GBusType. * @flags: Flags from the #GDBusProxyFlags enumeration. * @name: A bus name (well-known or unique). * @object_path: An object path. * @cancellable: (nullable): A #GCancellable or %NULL. * @error: Return location for error or %NULL * * Like cups_notifier_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. * * The calling thread is blocked until a reply is received. * * See cups_notifier_proxy_new_for_bus() for the asynchronous version of this constructor. * * Returns: (transfer full) (type CupsNotifierProxy): The constructed proxy object or %NULL if @error is set. */ CupsNotifier * cups_notifier_proxy_new_for_bus_sync ( GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error) { GInitable *ret; ret = g_initable_new (CUPS_TYPE_NOTIFIER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.cups.cupsd.Notifier", NULL); if (ret != NULL) return CUPS_NOTIFIER (ret); else return NULL; } /* ------------------------------------------------------------------------ */ /** * CupsNotifierSkeleton: * * The #CupsNotifierSkeleton structure contains only private data and should only be accessed using the provided API. */ /** * CupsNotifierSkeletonClass: * @parent_class: The parent class. * * Class structure for #CupsNotifierSkeleton. */ struct _CupsNotifierSkeletonPrivate { GValue *properties; GList *changed_properties; GSource *changed_properties_idle_source; GMainContext *context; GMutex lock; }; static void _cups_notifier_skeleton_handle_method_call ( GDBusConnection *connection G_GNUC_UNUSED, const gchar *sender G_GNUC_UNUSED, const gchar *object_path G_GNUC_UNUSED, const gchar *interface_name, const gchar *method_name, GVariant *parameters, GDBusMethodInvocation *invocation, gpointer user_data) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (user_data); _ExtendedGDBusMethodInfo *info; GVariantIter iter; GVariant *child; GValue *paramv; gsize num_params; guint num_extra; gsize n; guint signal_id; GValue return_value = G_VALUE_INIT; info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); g_assert (info != NULL); num_params = g_variant_n_children (parameters); num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); n = 0; g_value_init (¶mv[n], CUPS_TYPE_NOTIFIER); g_value_set_object (¶mv[n++], skeleton); g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); g_value_set_object (¶mv[n++], invocation); if (info->pass_fdlist) { #ifdef G_OS_UNIX g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); #else g_assert_not_reached (); #endif } g_variant_iter_init (&iter, parameters); while ((child = g_variant_iter_next_value (&iter)) != NULL) { _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; if (arg_info->use_gvariant) { g_value_init (¶mv[n], G_TYPE_VARIANT); g_value_set_variant (¶mv[n], child); n++; } else g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); g_variant_unref (child); } signal_id = g_signal_lookup (info->signal_name, CUPS_TYPE_NOTIFIER); g_value_init (&return_value, G_TYPE_BOOLEAN); g_signal_emitv (paramv, signal_id, 0, &return_value); if (!g_value_get_boolean (&return_value)) g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); g_value_unset (&return_value); for (n = 0; n < num_params + num_extra; n++) g_value_unset (¶mv[n]); g_free (paramv); } static GVariant * _cups_notifier_skeleton_handle_get_property ( GDBusConnection *connection G_GNUC_UNUSED, const gchar *sender G_GNUC_UNUSED, const gchar *object_path G_GNUC_UNUSED, const gchar *interface_name G_GNUC_UNUSED, const gchar *property_name, GError **error, gpointer user_data) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (user_data); GValue value = G_VALUE_INIT; GParamSpec *pspec; _ExtendedGDBusPropertyInfo *info; GVariant *ret; ret = NULL; info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cups_notifier_interface_info.parent_struct, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) { g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); } else { g_value_init (&value, pspec->value_type); g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); g_value_unset (&value); } return ret; } static gboolean _cups_notifier_skeleton_handle_set_property ( GDBusConnection *connection G_GNUC_UNUSED, const gchar *sender G_GNUC_UNUSED, const gchar *object_path G_GNUC_UNUSED, const gchar *interface_name G_GNUC_UNUSED, const gchar *property_name, GVariant *variant, GError **error, gpointer user_data) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (user_data); GValue value = G_VALUE_INIT; GParamSpec *pspec; _ExtendedGDBusPropertyInfo *info; gboolean ret; ret = FALSE; info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_cups_notifier_interface_info.parent_struct, property_name); g_assert (info != NULL); pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); if (pspec == NULL) { g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); } else { if (info->use_gvariant) g_value_set_variant (&value, variant); else g_dbus_gvariant_to_gvalue (variant, &value); g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); g_value_unset (&value); ret = TRUE; } return ret; } static const GDBusInterfaceVTable _cups_notifier_skeleton_vtable = { _cups_notifier_skeleton_handle_method_call, _cups_notifier_skeleton_handle_get_property, _cups_notifier_skeleton_handle_set_property, {NULL} }; static GDBusInterfaceInfo * cups_notifier_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) { return cups_notifier_interface_info (); } static GDBusInterfaceVTable * cups_notifier_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) { return (GDBusInterfaceVTable *) &_cups_notifier_skeleton_vtable; } static GVariant * cups_notifier_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (_skeleton); GVariantBuilder builder; guint n; g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); if (_cups_notifier_interface_info.parent_struct.properties == NULL) goto out; for (n = 0; _cups_notifier_interface_info.parent_struct.properties[n] != NULL; n++) { GDBusPropertyInfo *info = _cups_notifier_interface_info.parent_struct.properties[n]; if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) { GVariant *value; value = _cups_notifier_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", info->name, NULL, skeleton); if (value != NULL) { g_variant_take_ref (value); g_variant_builder_add (&builder, "{sv}", info->name, value); g_variant_unref (value); } } } out: return g_variant_builder_end (&builder); } static void cups_notifier_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton G_GNUC_UNUSED) { } static void _cups_notifier_on_signal_server_started ( CupsNotifier *object, const gchar *arg_text) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(s)", arg_text)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "ServerStarted", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_server_restarted ( CupsNotifier *object, const gchar *arg_text) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(s)", arg_text)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "ServerRestarted", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_server_stopped ( CupsNotifier *object, const gchar *arg_text) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(s)", arg_text)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "ServerStopped", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_server_audit ( CupsNotifier *object, const gchar *arg_text) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(s)", arg_text)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "ServerAudit", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_printer_added ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusb)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "PrinterAdded", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_printer_deleted ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusb)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "PrinterDeleted", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_printer_modified ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusb)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "PrinterModified", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_printer_restarted ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusb)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "PrinterRestarted", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_printer_stopped ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusb)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "PrinterStopped", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_printer_shutdown ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusb)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "PrinterShutdown", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_printer_state_changed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusb)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "PrinterStateChanged", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_printer_finishings_changed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusb)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "PrinterFinishingsChanged", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_printer_media_changed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusb)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "PrinterMediaChanged", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_job_created ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusbuussu)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs, arg_job_id, arg_job_state, arg_job_state_reasons, arg_job_name, arg_job_impressions_completed)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "JobCreated", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_job_completed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusbuussu)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs, arg_job_id, arg_job_state, arg_job_state_reasons, arg_job_name, arg_job_impressions_completed)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "JobCompleted", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void _cups_notifier_on_signal_job_state ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); GList *connections, *l; GVariant *signal_variant; connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); signal_variant = g_variant_ref_sink (g_variant_new ("(sssusbuussu)", arg_text, arg_printer_uri, arg_printer_name, arg_printer_state, arg_printer_state_reasons, arg_printer_is_accepting_jobs, arg_job_id, arg_job_state, arg_job_state_reasons, arg_job_name, arg_job_impressions_completed)); for (l = connections; l != NULL; l = l->next) { GDBusConnection *connection = l->data; g_dbus_connection_emit_signal (connection, NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.cups.cupsd.Notifier", "JobState", signal_variant, NULL); } g_variant_unref (signal_variant); g_list_free_full (connections, g_object_unref); } static void cups_notifier_skeleton_iface_init (CupsNotifierIface *iface); #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 G_DEFINE_TYPE_WITH_CODE (CupsNotifierSkeleton, cups_notifier_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, G_ADD_PRIVATE (CupsNotifierSkeleton) G_IMPLEMENT_INTERFACE (CUPS_TYPE_NOTIFIER, cups_notifier_skeleton_iface_init)) #else G_DEFINE_TYPE_WITH_CODE (CupsNotifierSkeleton, cups_notifier_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, G_IMPLEMENT_INTERFACE (CUPS_TYPE_NOTIFIER, cups_notifier_skeleton_iface_init)) #endif static void cups_notifier_skeleton_finalize (GObject *object) { CupsNotifierSkeleton *skeleton = CUPS_NOTIFIER_SKELETON (object); g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); if (skeleton->priv->changed_properties_idle_source != NULL) g_source_destroy (skeleton->priv->changed_properties_idle_source); g_main_context_unref (skeleton->priv->context); g_mutex_clear (&skeleton->priv->lock); G_OBJECT_CLASS (cups_notifier_skeleton_parent_class)->finalize (object); } static void cups_notifier_skeleton_init (CupsNotifierSkeleton *skeleton) { #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 skeleton->priv = cups_notifier_skeleton_get_instance_private (skeleton); #else skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, CUPS_TYPE_NOTIFIER_SKELETON, CupsNotifierSkeletonPrivate); #endif g_mutex_init (&skeleton->priv->lock); skeleton->priv->context = g_main_context_ref_thread_default (); } static void cups_notifier_skeleton_class_init (CupsNotifierSkeletonClass *klass) { GObjectClass *gobject_class; GDBusInterfaceSkeletonClass *skeleton_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = cups_notifier_skeleton_finalize; skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); skeleton_class->get_info = cups_notifier_skeleton_dbus_interface_get_info; skeleton_class->get_properties = cups_notifier_skeleton_dbus_interface_get_properties; skeleton_class->flush = cups_notifier_skeleton_dbus_interface_flush; skeleton_class->get_vtable = cups_notifier_skeleton_dbus_interface_get_vtable; #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 g_type_class_add_private (klass, sizeof (CupsNotifierSkeletonPrivate)); #endif } static void cups_notifier_skeleton_iface_init (CupsNotifierIface *iface) { iface->server_started = _cups_notifier_on_signal_server_started; iface->server_restarted = _cups_notifier_on_signal_server_restarted; iface->server_stopped = _cups_notifier_on_signal_server_stopped; iface->server_audit = _cups_notifier_on_signal_server_audit; iface->printer_added = _cups_notifier_on_signal_printer_added; iface->printer_deleted = _cups_notifier_on_signal_printer_deleted; iface->printer_modified = _cups_notifier_on_signal_printer_modified; iface->printer_restarted = _cups_notifier_on_signal_printer_restarted; iface->printer_stopped = _cups_notifier_on_signal_printer_stopped; iface->printer_shutdown = _cups_notifier_on_signal_printer_shutdown; iface->printer_state_changed = _cups_notifier_on_signal_printer_state_changed; iface->printer_finishings_changed = _cups_notifier_on_signal_printer_finishings_changed; iface->printer_media_changed = _cups_notifier_on_signal_printer_media_changed; iface->job_created = _cups_notifier_on_signal_job_created; iface->job_completed = _cups_notifier_on_signal_job_completed; iface->job_state = _cups_notifier_on_signal_job_state; } /** * cups_notifier_skeleton_new: * * Creates a skeleton object for the D-Bus interface org.cups.cupsd.Notifier. * * Returns: (transfer full) (type CupsNotifierSkeleton): The skeleton object. */ CupsNotifier * cups_notifier_skeleton_new (void) { return CUPS_NOTIFIER (g_object_new (CUPS_TYPE_NOTIFIER_SKELETON, NULL)); } cpdb-backend-cups-2.0b7/src/testpdf.ppd0000664000175000017500000003541614755604632013526 *PPD-Adobe: "4.3" *% *% This PPD file is for using a PDF printer in its native PDF mode, with *% option settings controlled via PJL commands. It uses CUPS with the *% OpenPrinting cups-filters package. *% *% This PPD is experimental. It is possible that some of the options *% and settings do not make sense or do not cause any change on the output. *% It can even happen that with certain settings nothing or an error page *% comes out. *% *% Licensed under Apache License v2.0. See the file "LICENSE" for more *% information. *% *% You may save this file as 'Generic-PDF_Printer-PDF.ppd' *% *% *FormatVersion: "4.3" *FileVersion: "1.1" *LanguageVersion: English *LanguageEncoding: ISOLatin1 *PCFileName: "PDF.PPD" *Manufacturer: "Generic" *Product: "(Generic PDF Printer)" *cupsVersion: 1.0 *cupsManualCopies: True *cupsModelNumber: 2 *ModelName: "Generic PDF Printer" *ShortNickName: "Generic PDF Printer" *NickName: "Generic PDF Printer" *PSVersion: "(3010.107) 0" *LanguageLevel: "3" *ColorDevice: True *DefaultColorSpace: CMYK *FileSystem: False *Throughput: "30" *LandscapeOrientation: Plus90 *TTRasterizer: Type42 *1284DeviceID: "MFG:Generic;CMD:PJL,PDF;MDL:PDF Printer;CLS:PRINTER;DES:Generic PDF Printer;DRV:DPDF,R1,M0;" *JCLBegin: "<1B>%-12345X@PJL JOB<0A>" *JCLToPDFInterpreter: "@PJL ENTER LANGUAGE = PDF<0A>" *JCLEnd: "<1B>%-12345X@PJL EOJ <0A><1B>%-12345X" *cupsFilter: "application/vnd.cups-pdf 0 -" *OpenGroup: General/General *JCLOpenUI *PageSize/Page Size: PickOne *OrderDependency: 100 JCLSetup *PageSize *DefaultPageSize: Letter *PageSize Letter/Letter: "@PJL SET PAPER=LETTER<0A>" *PageSize Letter.Fullbleed/Letter (Borderless): "@PJL SET PAPER=LETTER<0A>" *PageSize A4/A4: "@PJL SET PAPER=A4<0A>" *PageSize A4.Fullbleed/A4 (Borderless): "@PJL SET PAPER=A4<0A>" *PageSize A5/A5: "@PJL SET PAPER=A5<0A>" *PageSize A5.Fullbleed/A5 (Borderless): "@PJL SET PAPER=A5<0A>" *PageSize A6/A6: "@PJL SET PAPER=A6<0A>" *PageSize A6.Fullbleed/A6 (Borderless): "@PJL SET PAPER=A6<0A>" *PageSize ISOB5/ISO B5: "@PJL SET PAPER=B5<0A>" *PageSize ISOB5.Fullbleed/ISO B5 (Borderless): "@PJL SET PAPER=B5<0A>" *PageSize EnvC5/C5: "@PJL SET PAPER=C5<0A>" *PageSize EnvC5.Fullbleed/C5 (Borderless): "@PJL SET PAPER=C5<0A>" *PageSize Env10/Com 10: "@PJL SET PAPER=COM10<0A>" *PageSize Env10.Fullbleed/Com 10 (Borderless): "@PJL SET PAPER=COM10<0A>" *PageSize EnvDL/DL: "@PJL SET PAPER=DL<0A>" *PageSize EnvDL.Fullbleed/DL (Borderless): "@PJL SET PAPER=DL<0A>" *PageSize 5x13/Eight Point 5x13: "@PJL SET PAPER=EIGHTPOINT5X13<0A>" *PageSize 5x13.Fullbleed/Eight Point 5x13 (Borderless): "@PJL SET PAPER=EIGHTPOINT5X13<0A>" *PageSize EnvC6/Envelope C6: "@PJL SET PAPER=ENVELOPEC6<0A>" *PageSize EnvC6.Fullbleed/Envelope C6 (Borderless): "@PJL SET PAPER=ENVELOPEC6<0A>" *PageSize Executive/Executive: "@PJL SET PAPER=EXECUTIVE<0A>" *PageSize Executive.Fullbleed/Executive (Borderless): "@PJL SET PAPER=EXECUTIVE<0A>" *PageSize B5/JIS B5: "@PJL SET PAPER=JISB5<0A>" *PageSize B5.Fullbleed/JIS B5 (Borderless): "@PJL SET PAPER=JISB5<0A>" *PageSize B6/JIS B6: "@PJL SET PAPER=JISB6<0A>" *PageSize B6.Fullbleed/JIS B6 (Borderless): "@PJL SET PAPER=JISB6<0A>" *PageSize Legal/Legal: "@PJL SET PAPER=LEGAL<0A>" *PageSize Legal.Fullbleed/Legal (Borderless): "@PJL SET PAPER=LEGAL<0A>" *PageSize EnvMonarch/Monarch: "@PJL SET PAPER=MONARCH<0A>" *PageSize EnvMonarch.Fullbleed/Monarch (Borderless): "@PJL SET PAPER=MONARCH<0A>" *PageSize 69x95mm/16K: "@PJL SET PAPER=SIZE16K195x270<0A>" *PageSize 69x95mm.Fullbleed/16K (Borderless): "@PJL SET PAPER=SIZE16K195x270<0A>" *PageSize Statement/Statement: "@PJL SET PAPER=STATEMENT<0A>" *PageSize Statement.Fullbleed/Statement (Borderless): "@PJL SET PAPER=STATEMENT<0A>" *JCLCloseUI: *PageSize *JCLOpenUI *PageRegion: PickOne *OrderDependency: 100 JCLSetup *PageRegion *DefaultPageRegion: Letter *PageRegion Letter/Letter: "@PJL SET PAPER=LETTER<0A>" *PageRegion Letter.Fullbleed/Letter (Borderless): "@PJL SET PAPER=LETTER<0A>" *PageRegion A4/A4: "@PJL SET PAPER=A4<0A>" *PageRegion A4.Fullbleed/A4 (Borderless): "@PJL SET PAPER=A4<0A>" *PageRegion A5/A5: "@PJL SET PAPER=A5<0A>" *PageRegion A5.Fullbleed/A5 (Borderless): "@PJL SET PAPER=A5<0A>" *PageRegion A6/A6: "@PJL SET PAPER=A6<0A>" *PageRegion A6.Fullbleed/A6 (Borderless): "@PJL SET PAPER=A6<0A>" *PageRegion ISOB5/ISO B5: "@PJL SET PAPER=B5<0A>" *PageRegion ISOB5.Fullbleed/ISO B5 (Borderless): "@PJL SET PAPER=B5<0A>" *PageRegion EnvC5/C5: "@PJL SET PAPER=C5<0A>" *PageRegion EnvC5.Fullbleed/C5 (Borderless): "@PJL SET PAPER=C5<0A>" *PageRegion Env10/Com 10: "@PJL SET PAPER=COM10<0A>" *PageRegion Env10.Fullbleed/Com 10 (Borderless): "@PJL SET PAPER=COM10<0A>" *PageRegion EnvDL/DL: "@PJL SET PAPER=DL<0A>" *PageRegion EnvDL.Fullbleed/DL (Borderless): "@PJL SET PAPER=DL<0A>" *PageRegion 5x13/Eight Point 5x13: "@PJL SET PAPER=EIGHTPOINT5X13<0A>" *PageRegion 5x13.Fullbleed/Eight Point 5x13 (Borderless): "@PJL SET PAPER=EIGHTPOINT5X13<0A>" *PageRegion EnvC6/Envelope C6: "@PJL SET PAPER=ENVELOPEC6<0A>" *PageRegion EnvC6.Fullbleed/Envelope C6 (Borderless): "@PJL SET PAPER=ENVELOPEC6<0A>" *PageRegion Executive/Executive: "@PJL SET PAPER=EXECUTIVE<0A>" *PageRegion Executive.Fullbleed/Executive (Borderless): "@PJL SET PAPER=EXECUTIVE<0A>" *PageRegion B5/JIS B5: "@PJL SET PAPER=JISB5<0A>" *PageRegion B5.Fullbleed/JIS B5 (Borderless): "@PJL SET PAPER=JISB5<0A>" *PageRegion B6/JIS B6: "@PJL SET PAPER=JISB6<0A>" *PageRegion B6.Fullbleed/JIS B6 (Borderless): "@PJL SET PAPER=JISB6<0A>" *PageRegion Legal/Legal: "@PJL SET PAPER=LEGAL<0A>" *PageRegion Legal.Fullbleed/Legal (Borderless): "@PJL SET PAPER=LEGAL<0A>" *PageRegion EnvMonarch/Monarch: "@PJL SET PAPER=MONARCH<0A>" *PageRegion EnvMonarch.Fullbleed/Monarch (Borderless): "@PJL SET PAPER=MONARCH<0A>" *PageRegion 69x95mm/16K: "@PJL SET PAPER=SIZE16K195x270<0A>" *PageRegion 69x95mm.Fullbleed/16K (Borderless): "@PJL SET PAPER=SIZE16K195x270<0A>" *PageRegion Statement/Statement: "@PJL SET PAPER=STATEMENT<0A>" *PageRegion Statement.Fullbleed/Statement (Borderless): "@PJL SET PAPER=STATEMENT<0A>" *JCLCloseUI: *PageRegion *DefaultImageableArea: Letter *ImageableArea Letter/Letter: "18 36 594 756" *ImageableArea Letter.Fullbleed/Letter (Borderless): "0 0 612 792" *ImageableArea A4/A4: "18 36 577 806" *ImageableArea A4.Fullbleed/A4 (Borderless): "0 0 595 842" *ImageableArea A5/A5: "18 36 402 559" *ImageableArea A5.Fullbleed/A5 (Borderless): "0 0 420 595" *ImageableArea A6/A6: "18 36 279 384" *ImageableArea A6.Fullbleed/A6 (Borderless): "0 0 297 420" *ImageableArea ISOB5/ISO B5: "18 36 480 672" *ImageableArea ISOB5.Fullbleed/ISO B5 (Borderless): "0 0 498 708" *ImageableArea EnvC5/C5: "18 36 441 613" *ImageableArea EnvC5.Fullbleed/C5 (Borderless): "0 0 459 649" *ImageableArea Env10/Com 10: "18 36 279 648" *ImageableArea Env10.Fullbleed/Com 10 (Borderless): "0 0 297 684" *ImageableArea EnvDL/DL: "18 36 293 587" *ImageableArea EnvDL.Fullbleed/DL (Borderless): "0 0 311 623" *ImageableArea 5x13/Eight Point 5x13: "18 36 342 900" *ImageableArea 5x13.Fullbleed/Eight Point 5x13 (Borderless): "0 0 360 936" *ImageableArea EnvC6/Envelope C6: "18 36 305 423" *ImageableArea EnvC6.Fullbleed/Envelope C6 (Borderless): "0 0 323 459" *ImageableArea Executive/Executive: "18 36 504 720" *ImageableArea Executive.Fullbleed/Executive (Borderless): "0 0 522 756" *ImageableArea B5/JIS B5: "18 36 500 691" *ImageableArea B5.Fullbleed/JIS B5 (Borderless): "0 0 518 727" *ImageableArea B6/JIS B6: "18 36 344 482" *ImageableArea B6.Fullbleed/JIS B6 (Borderless): "0 0 362 518" *ImageableArea Legal/Legal: "18 36 594 972" *ImageableArea Legal.Fullbleed/Legal (Borderless): "0 0 612 1008" *ImageableArea EnvMonarch/Monarch: "18 36 261 504" *ImageableArea EnvMonarch.Fullbleed/Monarch (Borderless): "0 0 279 540" *ImageableArea 69x95mm/16K: "18 36 177 234" *ImageableArea 69x95mm.Fullbleed/16K (Borderless): "0 0 195 270" *ImageableArea Statement/Statement: "18 36 378 576" *ImageableArea Statement.Fullbleed/Statement (Borderless): "0 0 396 612" *DefaultPaperDimension: Letter *PaperDimension Letter/Letter: "612 792" *PaperDimension Letter.Fullbleed/Letter (Borderless): "612 792" *PaperDimension A4/A4: "595 842" *PaperDimension A4.Fullbleed/A4 (Borderless): "595 842" *PaperDimension A5/A5: "420 595" *PaperDimension A5.Fullbleed/A5 (Borderless): "420 595" *PaperDimension A6/A6: "297 420" *PaperDimension A6.Fullbleed/A6 (Borderless): "297 420" *PaperDimension ISOB5/ISO B5: "498 708" *PaperDimension ISOB5.Fullbleed/ISO B5 (Borderless): "498 708" *PaperDimension EnvC5/C5: "459 649" *PaperDimension EnvC5.Fullbleed/C5 (Borderless): "459 649" *PaperDimension Env10/Com 10: "297 684" *PaperDimension Env10.Fullbleed/Com 10 (Borderless): "297 684" *PaperDimension EnvDL/DL: "311 623" *PaperDimension EnvDL.Fullbleed/DL (Borderless): "311 623" *PaperDimension 5x13/Eight Point 5x13: "360 936" *PaperDimension 5x13.Fullbleed/Eight Point 5x13 (Borderless): "360 936" *PaperDimension EnvC6/Envelope C6: "323 459" *PaperDimension EnvC6.Fullbleed/Envelope C6 (Borderless): "323 459" *PaperDimension Executive/Executive: "522 756" *PaperDimension Executive.Fullbleed/Executive (Borderless): "522 756" *PaperDimension B5/JIS B5: "518 727" *PaperDimension B5.Fullbleed/JIS B5 (Borderless): "518 727" *PaperDimension B6/JIS B6: "362 518" *PaperDimension B6.Fullbleed/JIS B6 (Borderless): "362 518" *PaperDimension Legal/Legal: "612 1008" *PaperDimension Legal.Fullbleed/Legal (Borderless): "612 1008" *PaperDimension EnvMonarch/Monarch: "279 540" *PaperDimension EnvMonarch.Fullbleed/Monarch (Borderless): "279 540" *PaperDimension 69x95mm/16K: "195 270" *PaperDimension 69x95mm.Fullbleed/16K (Borderless): "195 270" *PaperDimension Statement/Statement: "396 612" *PaperDimension Statement.Fullbleed/Statement (Borderless): "396 612" *JCLOpenUI *manualfeed/Manual Feed of Paper: PickOne *OrderDependency: 100 JCLSetup *manualfeed *Defaultmanualfeed: off *manualfeed off/Off: "@PJL SET MANUALFEED=OFF<0A>" *manualfeed on/On: "@PJL SET MANUALFEED=ON<0A>" *JCLCloseUI: *manualfeed *JCLOpenUI *manualduplex/Manual duplex: PickOne *OrderDependency: 100 JCLSetup *manualduplex *Defaultmanualduplex: off *manualduplex off/Off: "@PJL SET MANUALDUPLEX=OFF<0A>" *manualduplex on/On: "@PJL SET MANUALDUPLEX=ON<0A>" *JCLCloseUI: *manualduplex *JCLOpenUI *Duplex/Double-Sided Printing: PickOne *OrderDependency: 100 JCLSetup *Duplex *DefaultDuplex: None *Duplex None/Off: "@PJL SET DUPLEX=OFF<0A>" *Duplex DuplexNoTumble/Long-Edge binding: "@PJL SET DUPLEX=ON<0A>@PJL SET BINDING=LONGEDGE<0A>" *Duplex DuplexTumble/Short-Edge binding: "@PJL SET DUPLEX=ON<0A>@PJL SET BINDING=SHORTEDGE<0A>" *JCLCloseUI: *Duplex *JCLOpenUI *ColorModel/Color: PickOne *OrderDependency: 100 JCLSetup *ColorModel *DefaultColorModel: color *ColorModel color/Color: "@PJL SET RENDERMODE=COLOR<0A>" *ColorModel grayscale/Black and White: "@PJL SET RENDERMODE=GRAYSCALE<0A>" *JCLCloseUI: *ColorModel *JCLOpenUI *Resolution/Resolution: PickOne *OrderDependency: 100 JCLSetup *Resolution *DefaultResolution: 600dpi *Resolution 300dpi/300 dpi: "@PJL SET RESOLUTION=300<0A>" *Resolution 600dpi/600 dpi: "@PJL SET RESOLUTION=600<0A>" *Resolution 1200dpi/1200 dpi: "@PJL SET RESOLUTION=1200<0A>" *JCLCloseUI: *Resolution *JCLOpenUI *ret/Resolution Enhancement: PickOne *OrderDependency: 100 JCLSetup *ret *Defaultret: notset *ret dark/Dark: "@PJL SET RET=DARK<0A>" *ret light/Light: "@PJL SET RET=LIGHT<0A>" *ret medium/Medium: "@PJL SET RET=MEDIUM<0A>" *ret notset/Not Set: "@PJL SET RET=NOTSET<0A>" *ret off/Off: "@PJL SET RET=OFF<0A>" *JCLCloseUI: *ret *JCLOpenUI *borderless/Borderless Printing: PickOne *OrderDependency: 100 JCLSetup *borderless *Defaultborderless: on *borderless off/Off: "@PJL SET BORDERLESS=OFF<0A>" *borderless on/On: "@PJL SET BORDERLESS=ON<0A>" *JCLCloseUI: *borderless *JCLOpenUI *edgetoedge/Edge to edge: PickOne *OrderDependency: 100 JCLSetup *edgetoedge *Defaultedgetoedge: yes *edgetoedge no/No: "@PJL SET EDGETOEDGE=NO<0A>" *edgetoedge yes/Yes: "@PJL SET EDGETOEDGE=YES<0A>" *JCLCloseUI: *edgetoedge *JCLOpenUI *joboffset/Job Offset: PickOne *OrderDependency: 100 JCLSetup *joboffset *Defaultjoboffset: on *joboffset off/Off: "@PJL SET JOBOFFSET=OFF<0A>" *joboffset on/On: "@PJL SET JOBOFFSET=ON<0A>" *JCLCloseUI: *joboffset *JCLOpenUI *lowsupplies/On low supplies: PickOne *OrderDependency: 100 JCLSetup *lowsupplies *Defaultlowsupplies: continue *lowsupplies continue/Continue: "@PJL SET LOWSUPPLIES=CONTINUE<0A>" *lowsupplies stop/Stop: "@PJL SET LOWSUPPLIES=STOP<0A>" *JCLCloseUI: *lowsupplies *JCLOpenUI *overridea4withletter/Override A4 with Letter: PickOne *OrderDependency: 100 JCLSetup *overridea4withletter *Defaultoverridea4withletter: yes *overridea4withletter no/No: "@PJL SET OVERRIDEA4WITHLETTER=NO<0A>" *overridea4withletter yes/Yes: "@PJL SET OVERRIDEA4WITHLETTER=YES<0A>" *JCLCloseUI: *overridea4withletter *CloseGroup: General *% Generic boilerplate PPD stuff as standard PostScript fonts and so on *DefaultFont: Courier *Font AvantGarde-Book: Standard "(001.006S)" Standard ROM *Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM *Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM *Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM *Font Bookman-Demi: Standard "(001.004S)" Standard ROM *Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM *Font Bookman-Light: Standard "(001.004S)" Standard ROM *Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM *Font Courier: Standard "(002.004S)" Standard ROM *Font Courier-Bold: Standard "(002.004S)" Standard ROM *Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM *Font Courier-Oblique: Standard "(002.004S)" Standard ROM *Font Helvetica: Standard "(001.006S)" Standard ROM *Font Helvetica-Bold: Standard "(001.007S)" Standard ROM *Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM *Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM *Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM *Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM *Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM *Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM *Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM *Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM *Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM *Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM *Font Palatino-Bold: Standard "(001.005S)" Standard ROM *Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM *Font Palatino-Italic: Standard "(001.005S)" Standard ROM *Font Palatino-Roman: Standard "(001.005S)" Standard ROM *Font Symbol: Special "(001.007S)" Special ROM *Font Times-Bold: Standard "(001.007S)" Standard ROM *Font Times-BoldItalic: Standard "(001.009S)" Standard ROM *Font Times-Italic: Standard "(001.007S)" Standard ROM *Font Times-Roman: Standard "(001.007S)" Standard ROM *Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM *Font ZapfDingbats: Special "(001.004S)" Standard ROM cpdb-backend-cups-2.0b7/src/Makefile.in0000664000175000017500000011575714755604641013424 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # cups-notifier VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ backend_PROGRAMS = cups$(EXEEXT) subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(backenddir)" PROGRAMS = $(backend_PROGRAMS) am_cups_OBJECTS = cups-print_backend_cups.$(OBJEXT) \ cups-backend_helper.$(OBJEXT) cups-cups-notifier.$(OBJEXT) cups_OBJECTS = $(am_cups_OBJECTS) am__DEPENDENCIES_1 = cups_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/cups-backend_helper.Po \ ./$(DEPDIR)/cups-cups-notifier.Po \ ./$(DEPDIR)/cups-print_backend_cups.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(cups_SOURCES) DIST_SOURCES = $(cups_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/depcomp \ $(top_srcdir)/build-aux/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPDB_BACKEND_DIR = @CPDB_BACKEND_DIR@ CPDB_CFLAGS = @CPDB_CFLAGS@ CPDB_LIBS = @CPDB_LIBS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@ GIOUNIX_LIBS = @GIOUNIX_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBCUPSFILTERS_CFLAGS = @LIBCUPSFILTERS_CFLAGS@ LIBCUPSFILTERS_LIBS = @LIBCUPSFILTERS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ cups_notifier_sources = \ cups-notifier.c \ cups-notifier.h BUILT_SOURCES = $(cups_notifier_sources) CLEANFILES = $(BUILT_SOURCES) backenddir = $(CPDB_BACKEND_DIR) cups_SOURCES = \ print_backend_cups.c \ backend_helper.c backend_helper.h \ cups-notifier.c cups-notifier.h cups_CPPFLAGS = $(CPDB_CFLAGS) $(LIBCUPSFILTERS_CFLAGS) $(GLIB_CFLAGS) \ $(GIO_CFLAGS) $(GIOUNIX_CFLAGS) cups_LDADD = -lcups -lpthread -lm -lcrypt $(CPDB_LIBS) \ $(LIBCUPSFILTERS_LIBS) $(GLIB_LIBS) $(GIO_LIBS) \ $(GIOUNIX_LIBS) # ================================ # Tests ("make test"/"make check") # ================================ TESTS = \ run-tests.sh EXTRA_DIST = \ run-tests.sh \ test.convs \ testpdf.ppd all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-backendPROGRAMS: $(backend_PROGRAMS) @$(NORMAL_INSTALL) @list='$(backend_PROGRAMS)'; test -n "$(backenddir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(backenddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(backenddir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(backenddir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(backenddir)$$dir" || exit $$?; \ } \ ; done uninstall-backendPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(backend_PROGRAMS)'; test -n "$(backenddir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(backenddir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(backenddir)" && rm -f $$files clean-backendPROGRAMS: -test -z "$(backend_PROGRAMS)" || rm -f $(backend_PROGRAMS) cups$(EXEEXT): $(cups_OBJECTS) $(cups_DEPENDENCIES) $(EXTRA_cups_DEPENDENCIES) @rm -f cups$(EXEEXT) $(AM_V_CCLD)$(LINK) $(cups_OBJECTS) $(cups_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cups-backend_helper.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cups-cups-notifier.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cups-print_backend_cups.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` cups-print_backend_cups.o: print_backend_cups.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cups-print_backend_cups.o -MD -MP -MF $(DEPDIR)/cups-print_backend_cups.Tpo -c -o cups-print_backend_cups.o `test -f 'print_backend_cups.c' || echo '$(srcdir)/'`print_backend_cups.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cups-print_backend_cups.Tpo $(DEPDIR)/cups-print_backend_cups.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_backend_cups.c' object='cups-print_backend_cups.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cups-print_backend_cups.o `test -f 'print_backend_cups.c' || echo '$(srcdir)/'`print_backend_cups.c cups-print_backend_cups.obj: print_backend_cups.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cups-print_backend_cups.obj -MD -MP -MF $(DEPDIR)/cups-print_backend_cups.Tpo -c -o cups-print_backend_cups.obj `if test -f 'print_backend_cups.c'; then $(CYGPATH_W) 'print_backend_cups.c'; else $(CYGPATH_W) '$(srcdir)/print_backend_cups.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cups-print_backend_cups.Tpo $(DEPDIR)/cups-print_backend_cups.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='print_backend_cups.c' object='cups-print_backend_cups.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cups-print_backend_cups.obj `if test -f 'print_backend_cups.c'; then $(CYGPATH_W) 'print_backend_cups.c'; else $(CYGPATH_W) '$(srcdir)/print_backend_cups.c'; fi` cups-backend_helper.o: backend_helper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cups-backend_helper.o -MD -MP -MF $(DEPDIR)/cups-backend_helper.Tpo -c -o cups-backend_helper.o `test -f 'backend_helper.c' || echo '$(srcdir)/'`backend_helper.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cups-backend_helper.Tpo $(DEPDIR)/cups-backend_helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='backend_helper.c' object='cups-backend_helper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cups-backend_helper.o `test -f 'backend_helper.c' || echo '$(srcdir)/'`backend_helper.c cups-backend_helper.obj: backend_helper.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cups-backend_helper.obj -MD -MP -MF $(DEPDIR)/cups-backend_helper.Tpo -c -o cups-backend_helper.obj `if test -f 'backend_helper.c'; then $(CYGPATH_W) 'backend_helper.c'; else $(CYGPATH_W) '$(srcdir)/backend_helper.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cups-backend_helper.Tpo $(DEPDIR)/cups-backend_helper.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='backend_helper.c' object='cups-backend_helper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cups-backend_helper.obj `if test -f 'backend_helper.c'; then $(CYGPATH_W) 'backend_helper.c'; else $(CYGPATH_W) '$(srcdir)/backend_helper.c'; fi` cups-cups-notifier.o: cups-notifier.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cups-cups-notifier.o -MD -MP -MF $(DEPDIR)/cups-cups-notifier.Tpo -c -o cups-cups-notifier.o `test -f 'cups-notifier.c' || echo '$(srcdir)/'`cups-notifier.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cups-cups-notifier.Tpo $(DEPDIR)/cups-cups-notifier.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cups-notifier.c' object='cups-cups-notifier.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cups-cups-notifier.o `test -f 'cups-notifier.c' || echo '$(srcdir)/'`cups-notifier.c cups-cups-notifier.obj: cups-notifier.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cups-cups-notifier.obj -MD -MP -MF $(DEPDIR)/cups-cups-notifier.Tpo -c -o cups-cups-notifier.obj `if test -f 'cups-notifier.c'; then $(CYGPATH_W) 'cups-notifier.c'; else $(CYGPATH_W) '$(srcdir)/cups-notifier.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cups-cups-notifier.Tpo $(DEPDIR)/cups-cups-notifier.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cups-notifier.c' object='cups-cups-notifier.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cups_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cups-cups-notifier.obj `if test -f 'cups-notifier.c'; then $(CYGPATH_W) 'cups-notifier.c'; else $(CYGPATH_W) '$(srcdir)/cups-notifier.c'; fi` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? run-tests.sh.log: run-tests.sh @p='run-tests.sh'; \ b='run-tests.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(backenddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-backendPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/cups-backend_helper.Po -rm -f ./$(DEPDIR)/cups-cups-notifier.Po -rm -f ./$(DEPDIR)/cups-print_backend_cups.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-backendPROGRAMS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/cups-backend_helper.Po -rm -f ./$(DEPDIR)/cups-cups-notifier.Po -rm -f ./$(DEPDIR)/cups-print_backend_cups.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-backendPROGRAMS .MAKE: all check check-am install install-am install-exec \ install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ check-am clean clean-backendPROGRAMS clean-generic \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am \ install-backendPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am recheck tags tags-am uninstall uninstall-am \ uninstall-backendPROGRAMS .PRECIOUS: Makefile $(cups_notifier_sources): ../data/org.cups.cupsd.Notifier.xml gdbus-codegen \ --interface-prefix org.cups.cupsd \ --c-namespace Cups \ --generate-c-code cups-notifier \ ../data/org.cups.cupsd.Notifier.xml # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: cpdb-backend-cups-2.0b7/src/cups-notifier.h0000664000175000017500000003211114755604654014301 /* * This file is generated by gdbus-codegen, do not modify it. * * The license of this code is the same as for the D-Bus interface description * it was derived from. Note that it links to GLib, so must comply with the * LGPL linking clauses. */ #ifndef __CUPS_NOTIFIER_H__ #define __CUPS_NOTIFIER_H__ #include G_BEGIN_DECLS /* ------------------------------------------------------------------------ */ /* Declarations for org.cups.cupsd.Notifier */ #define CUPS_TYPE_NOTIFIER (cups_notifier_get_type ()) #define CUPS_NOTIFIER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CUPS_TYPE_NOTIFIER, CupsNotifier)) #define CUPS_IS_NOTIFIER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CUPS_TYPE_NOTIFIER)) #define CUPS_NOTIFIER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), CUPS_TYPE_NOTIFIER, CupsNotifierIface)) struct _CupsNotifier; typedef struct _CupsNotifier CupsNotifier; typedef struct _CupsNotifierIface CupsNotifierIface; struct _CupsNotifierIface { GTypeInterface parent_iface; void (*job_completed) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed); void (*job_created) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed); void (*job_state) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed); void (*printer_added) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void (*printer_deleted) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void (*printer_finishings_changed) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void (*printer_media_changed) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void (*printer_modified) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void (*printer_restarted) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void (*printer_shutdown) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void (*printer_state_changed) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void (*printer_stopped) ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void (*server_audit) ( CupsNotifier *object, const gchar *arg_text); void (*server_restarted) ( CupsNotifier *object, const gchar *arg_text); void (*server_started) ( CupsNotifier *object, const gchar *arg_text); void (*server_stopped) ( CupsNotifier *object, const gchar *arg_text); }; GType cups_notifier_get_type (void) G_GNUC_CONST; GDBusInterfaceInfo *cups_notifier_interface_info (void); guint cups_notifier_override_properties (GObjectClass *klass, guint property_id_begin); /* D-Bus signal emissions functions: */ void cups_notifier_emit_server_started ( CupsNotifier *object, const gchar *arg_text); void cups_notifier_emit_server_restarted ( CupsNotifier *object, const gchar *arg_text); void cups_notifier_emit_server_stopped ( CupsNotifier *object, const gchar *arg_text); void cups_notifier_emit_server_audit ( CupsNotifier *object, const gchar *arg_text); void cups_notifier_emit_printer_added ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void cups_notifier_emit_printer_deleted ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void cups_notifier_emit_printer_modified ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void cups_notifier_emit_printer_restarted ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void cups_notifier_emit_printer_stopped ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void cups_notifier_emit_printer_shutdown ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void cups_notifier_emit_printer_state_changed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void cups_notifier_emit_printer_finishings_changed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void cups_notifier_emit_printer_media_changed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs); void cups_notifier_emit_job_created ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed); void cups_notifier_emit_job_completed ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed); void cups_notifier_emit_job_state ( CupsNotifier *object, const gchar *arg_text, const gchar *arg_printer_uri, const gchar *arg_printer_name, guint arg_printer_state, const gchar *arg_printer_state_reasons, gboolean arg_printer_is_accepting_jobs, guint arg_job_id, guint arg_job_state, const gchar *arg_job_state_reasons, const gchar *arg_job_name, guint arg_job_impressions_completed); /* ---- */ #define CUPS_TYPE_NOTIFIER_PROXY (cups_notifier_proxy_get_type ()) #define CUPS_NOTIFIER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CUPS_TYPE_NOTIFIER_PROXY, CupsNotifierProxy)) #define CUPS_NOTIFIER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CUPS_TYPE_NOTIFIER_PROXY, CupsNotifierProxyClass)) #define CUPS_NOTIFIER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CUPS_TYPE_NOTIFIER_PROXY, CupsNotifierProxyClass)) #define CUPS_IS_NOTIFIER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CUPS_TYPE_NOTIFIER_PROXY)) #define CUPS_IS_NOTIFIER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CUPS_TYPE_NOTIFIER_PROXY)) typedef struct _CupsNotifierProxy CupsNotifierProxy; typedef struct _CupsNotifierProxyClass CupsNotifierProxyClass; typedef struct _CupsNotifierProxyPrivate CupsNotifierProxyPrivate; struct _CupsNotifierProxy { /*< private >*/ GDBusProxy parent_instance; CupsNotifierProxyPrivate *priv; }; struct _CupsNotifierProxyClass { GDBusProxyClass parent_class; }; GType cups_notifier_proxy_get_type (void) G_GNUC_CONST; #if GLIB_CHECK_VERSION(2, 44, 0) G_DEFINE_AUTOPTR_CLEANUP_FUNC (CupsNotifierProxy, g_object_unref) #endif void cups_notifier_proxy_new ( GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); CupsNotifier *cups_notifier_proxy_new_finish ( GAsyncResult *res, GError **error); CupsNotifier *cups_notifier_proxy_new_sync ( GDBusConnection *connection, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error); void cups_notifier_proxy_new_for_bus ( GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); CupsNotifier *cups_notifier_proxy_new_for_bus_finish ( GAsyncResult *res, GError **error); CupsNotifier *cups_notifier_proxy_new_for_bus_sync ( GBusType bus_type, GDBusProxyFlags flags, const gchar *name, const gchar *object_path, GCancellable *cancellable, GError **error); /* ---- */ #define CUPS_TYPE_NOTIFIER_SKELETON (cups_notifier_skeleton_get_type ()) #define CUPS_NOTIFIER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CUPS_TYPE_NOTIFIER_SKELETON, CupsNotifierSkeleton)) #define CUPS_NOTIFIER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CUPS_TYPE_NOTIFIER_SKELETON, CupsNotifierSkeletonClass)) #define CUPS_NOTIFIER_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CUPS_TYPE_NOTIFIER_SKELETON, CupsNotifierSkeletonClass)) #define CUPS_IS_NOTIFIER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CUPS_TYPE_NOTIFIER_SKELETON)) #define CUPS_IS_NOTIFIER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CUPS_TYPE_NOTIFIER_SKELETON)) typedef struct _CupsNotifierSkeleton CupsNotifierSkeleton; typedef struct _CupsNotifierSkeletonClass CupsNotifierSkeletonClass; typedef struct _CupsNotifierSkeletonPrivate CupsNotifierSkeletonPrivate; struct _CupsNotifierSkeleton { /*< private >*/ GDBusInterfaceSkeleton parent_instance; CupsNotifierSkeletonPrivate *priv; }; struct _CupsNotifierSkeletonClass { GDBusInterfaceSkeletonClass parent_class; }; GType cups_notifier_skeleton_get_type (void) G_GNUC_CONST; #if GLIB_CHECK_VERSION(2, 44, 0) G_DEFINE_AUTOPTR_CLEANUP_FUNC (CupsNotifierSkeleton, g_object_unref) #endif CupsNotifier *cups_notifier_skeleton_new (void); G_END_DECLS #endif /* __CUPS_NOTIFIER_H__ */ cpdb-backend-cups-2.0b7/src/Makefile.am0000664000175000017500000000213214755604632013371 # cups-notifier cups_notifier_sources = \ cups-notifier.c \ cups-notifier.h $(cups_notifier_sources): ../data/org.cups.cupsd.Notifier.xml gdbus-codegen \ --interface-prefix org.cups.cupsd \ --c-namespace Cups \ --generate-c-code cups-notifier \ ../data/org.cups.cupsd.Notifier.xml BUILT_SOURCES = $(cups_notifier_sources) CLEANFILES = $(BUILT_SOURCES) backenddir = $(CPDB_BACKEND_DIR) backend_PROGRAMS = cups cups_SOURCES = \ print_backend_cups.c \ backend_helper.c backend_helper.h \ cups-notifier.c cups-notifier.h cups_CPPFLAGS = $(CPDB_CFLAGS) cups_CPPFLAGS += $(LIBCUPSFILTERS_CFLAGS) cups_CPPFLAGS += $(GLIB_CFLAGS) cups_CPPFLAGS += $(GIO_CFLAGS) cups_CPPFLAGS += $(GIOUNIX_CFLAGS) cups_LDADD = -lcups -lpthread -lm -lcrypt cups_LDADD += $(CPDB_LIBS) cups_LDADD += $(LIBCUPSFILTERS_LIBS) cups_LDADD += $(GLIB_LIBS) cups_LDADD += $(GIO_LIBS) cups_LDADD += $(GIOUNIX_LIBS) # ================================ # Tests ("make test"/"make check") # ================================ TESTS = \ run-tests.sh EXTRA_DIST = \ run-tests.sh \ test.convs \ testpdf.ppd cpdb-backend-cups-2.0b7/src/backend_helper.c0000664000175000017500000022326614755604632014444 #include "backend_helper.h" #include #include #include #include #include #include #include #include #define MAX_ADDRESSES 10 #define _CUPS_NO_DEPRECATED 1 static http_t *system_conn = NULL; static unsigned int HttpLocalTimeout = 5; Mappings *map; char *get_printer_name_for_cups_dest(const cups_dest_t *dest) { if (!dest) return NULL; if (dest->instance) return g_strconcat(dest->name, "/", dest->instance, NULL); return g_strdup(dest->name); } /*****************BackendObj********************************/ BackendObj *get_new_BackendObj() { map = get_new_Mappings(); BackendObj *b = (BackendObj *)(malloc(sizeof(BackendObj))); b->dbus_connection = NULL; b->dialogs = g_hash_table_new_full(g_str_hash, g_str_equal, (GDestroyNotify)free_string, (GDestroyNotify)free_Dialog); b->num_frontends = 0; b->obj_path = NULL; b->default_printer = NULL; return b; } /** Don't free the returned value; it is owned by BackendObj */ char *get_default_printer(BackendObj *b) { /**first query to see if the user default printer is set**/ int num_dests; cups_dest_t *dests; num_dests = cupsGetDests2(CUPS_HTTP_DEFAULT, &dests); /** Get the list of all destinations */ cups_dest_t *dest = cupsGetDest(NULL, NULL, num_dests, dests); /** Get the default one */ if (dest) { /** Return the user default printer */ char *def = get_printer_name_for_cups_dest(dest); cupsFreeDests(num_dests, dests); g_free(b->default_printer); b->default_printer = def; return def; } cupsFreeDests(num_dests, dests); /** Then query the system default printer **/ ipp_t *request = ippNewRequest(IPP_OP_CUPS_GET_DEFAULT); ipp_t *response; ipp_attribute_t *attr; if ((response = cupsDoRequest(CUPS_HTTP_DEFAULT, request, "/")) != NULL) { if ((attr = ippFindAttribute(response, "printer-name", IPP_TAG_NAME)) != NULL) { g_free(b->default_printer); b->default_printer = g_strdup(ippGetString(attr, 0, NULL)); ippDelete(response); return b->default_printer; } } ippDelete(response); g_free(b->default_printer); b->default_printer = NULL; return b->default_printer; } void connect_to_dbus(BackendObj *b, char *obj_path) { b->obj_path = obj_path; GError *error = NULL; g_dbus_interface_skeleton_export(G_DBUS_INTERFACE_SKELETON(b->skeleton), b->dbus_connection, obj_path, &error); if (error) { logerror("Error connecting CUPS Backend to D-Bus.\n"); } } void add_frontend(BackendObj *b, const char *dialog_name) { Dialog *d = get_new_Dialog(); g_hash_table_insert(b->dialogs, g_strdup(dialog_name), d); b->num_frontends++; } void remove_frontend(BackendObj *b, const char *dialog_name) { Dialog *d = (Dialog *)(g_hash_table_lookup(b->dialogs, dialog_name)); if (d) { g_hash_table_remove(b->dialogs, dialog_name); b->num_frontends--; } g_message("Removed Frontend entry for %s", dialog_name); } gboolean no_frontends(BackendObj *b) { if ((b->num_frontends) == 0) return TRUE; return FALSE; } Dialog *find_dialog(BackendObj *b, const char *dialog_name) { Dialog *d = (Dialog *)(g_hash_table_lookup(b->dialogs, dialog_name)); return d; } int *get_dialog_cancel(BackendObj *b, const char *dialog_name) { Dialog *d = (Dialog *)(g_hash_table_lookup(b->dialogs, dialog_name)); return (d ? &d->cancel : NULL); } void set_dialog_cancel(BackendObj *b, const char *dialog_name) { int *x = get_dialog_cancel(b, dialog_name); if (x) *x = 1; } void reset_dialog_cancel(BackendObj *b, const char *dialog_name) { int *x = get_dialog_cancel(b, dialog_name); if (x) *x = 0; } void set_hide_remote_printers(BackendObj *b, const char *dialog_name) { Dialog *d = (Dialog *)(g_hash_table_lookup(b->dialogs, dialog_name)); if (d) d->hide_remote = TRUE; } void unset_hide_remote_printers(BackendObj *b, const char *dialog_name) { Dialog *d = (Dialog *)(g_hash_table_lookup(b->dialogs, dialog_name)); if (d) d->hide_remote = FALSE; } void set_hide_temp_printers(BackendObj *b, const char *dialog_name) { Dialog *d = (Dialog *)(g_hash_table_lookup(b->dialogs, dialog_name)); if (d) d->hide_temp = TRUE; } void unset_hide_temp_printers(BackendObj *b, const char *dialog_name) { Dialog *d = (Dialog *)(g_hash_table_lookup(b->dialogs, dialog_name)); if (d) d->hide_temp = FALSE; } static int http_timeout_cb(http_t *http, void *user_data) { logdebug("HTTP timeout! (consider increasing HttpLocalTimeout/HttpRemoteTimeout value)\n"); return (0); } /* Connect to the system's CUPS daemon and also tell the libcups functions to use the system's CUPS */ static http_t * http_connect_system(void) { const char *server = cupsServer(); int port = ippPort(); if (!system_conn) { if (server[0] == '/') logdebug("Creating http connection to CUPS daemon via domain socket: %s\n", server); else logdebug("Creating http connection to CUPS daemon: %s:%d\n", server, port); system_conn = httpConnect2(server, port, NULL, AF_UNSPEC, cupsEncryption(), 1, 3000, NULL); } if (system_conn) { httpSetTimeout(system_conn, HttpLocalTimeout, http_timeout_cb, NULL); } else { if (server[0] == '/') logwarn("Failed creating http connection to CUPS daemon via domain socket: %s\n", server); else logwarn("Failed creating http connection to CUPS daemon: %s:%d\n", server, port); } return (system_conn); } /* Close connection to system's CUPS */ static void http_close_system(void) { logdebug("Closing connection to system's CUPS daemon.\n"); if (system_conn) { httpClose(system_conn); system_conn = NULL; } } /* Create a subscription for D-Bus notifications on the system's CUPS. This makes the CUPS daemon fire up a D-Bus notifier process. */ int create_subscription () { ipp_t *req; ipp_t *resp; ipp_attribute_t *attr; int id = 0; http_t *conn = NULL; conn = http_connect_system(); if (conn == NULL) { logwarn("Cannot connect to local CUPS to subscribe to notifications.\n"); return (0); } req = ippNewRequest(IPP_OP_CREATE_PRINTER_SUBSCRIPTIONS); ippAddString(req, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, "/"); ippAddString(req, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, "notify-events", NULL, "all"); ippAddString(req, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI, "notify-recipient-uri", NULL, "dbus://"); ippAddInteger(req, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER, "notify-lease-duration", NOTIFY_LEASE_DURATION); resp = cupsDoRequest(conn, req, "/"); if (!resp || cupsLastError() != IPP_STATUS_OK) { logwarn("Error subscribing to CUPS notifications: %s\n", cupsLastErrorString ()); return (0); } attr = ippFindAttribute(resp, "notify-subscription-id", IPP_TAG_INTEGER); if (attr) { id = ippGetInteger(attr, 0); } else { logwarn("ipp-create-printer-subscription response doesn't contain" "subscription id.\n"); } ippDelete(resp); return (id); } /* Renew the D-Bus notification subscription, telling to CUPS that we are still there and it should not let the notifier time out. */ gboolean renew_subscription (int id) { ipp_t *req; ipp_t *resp; http_t *http = NULL; http = http_connect_system(); if (http == NULL) { logwarn("Cannot connect to system's CUPS to renew subscriptions!\n"); return FALSE; } req = ippNewRequest(IPP_OP_RENEW_SUBSCRIPTION); ippAddInteger(req, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "notify-subscription-id", id); ippAddString(req, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, "/"); ippAddString(req, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI, "notify-recipient-uri", NULL, "dbus://"); ippAddInteger(req, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER, "notify-lease-duration", NOTIFY_LEASE_DURATION); resp = cupsDoRequest(http, req, "/"); if (!resp || cupsLastError() != IPP_STATUS_OK) { logwarn("Error renewing CUPS subscription %d: %s\n", id, cupsLastErrorString()); http_close_system(); return FALSE; } ippDelete(resp); http_close_system(); return TRUE; } /* Function which is called as a timeout event handler to let the renewal of the D-Bus subscription be done to the right time. */ gboolean renew_subscription_timeout (gpointer userdata) { int *subscription_id = userdata; logdebug("renew_subscription_timeout() in THREAD %ld\n", pthread_self()); if (*subscription_id <= 0 || !renew_subscription(*subscription_id)) *subscription_id = create_subscription(); return TRUE; } /* Cancel the D-Bus notifier subscription, so that CUPS can terminate its notifier when we shut down. */ void cancel_subscription (int id) { ipp_t *req; ipp_t *resp; http_t *http = NULL; if (id <= 0) return; http = http_connect_system(); if (http == NULL) { logwarn("Cannot connect to system's CUPS to cancel subscriptions.\n"); return; } req = ippNewRequest(IPP_OP_CANCEL_SUBSCRIPTION); ippAddString(req, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, "/"); ippAddInteger(req, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "notify-subscription-id", id); resp = cupsDoRequest(http, req, "/"); if (!resp || cupsLastError() != IPP_STATUS_OK) { logwarn("Error canceling subscription to CUPS notifications: %s\n", cupsLastErrorString()); http_close_system(); return; } ippDelete(resp); http_close_system(); } gboolean dialog_contains_printer(BackendObj *b, const char *dialog_name, const char *printer_name) { Dialog *d = g_hash_table_lookup(b->dialogs, dialog_name); if (d == NULL || d->printers == NULL) { char *msg = malloc(sizeof(char) * (strlen(dialog_name) + 50)); sprintf(msg, "Can't retrieve printers for dialog %s.\n", dialog_name); logerror(msg); free(msg); return FALSE; } if (g_hash_table_contains(d->printers, printer_name)) return TRUE; return FALSE; } PrinterCUPS *add_printer_to_dialog(BackendObj *b, const char *dialog_name, const cups_dest_t *dest) { char *printer_name = get_printer_name_for_cups_dest(dest); Dialog *d = (Dialog *)g_hash_table_lookup(b->dialogs, dialog_name); if (d == NULL) { char *msg = malloc(sizeof(char) * (strlen(dialog_name) + 50)); sprintf(msg, "Invalid dialog name %s.\n", dialog_name); logerror(msg); free(msg); return NULL; } PrinterCUPS *p = get_new_PrinterCUPS(dest); g_hash_table_insert(d->printers, printer_name, p); return p; } void remove_printer_from_dialog(BackendObj *b, const char *dialog_name, const char *printer_name) { Dialog *d = (Dialog *)g_hash_table_lookup(b->dialogs, dialog_name); if (d == NULL) { char *msg = malloc(sizeof(char) * (strlen(printer_name) + 50)); sprintf(msg, "Unable to remove printer %s.\n", printer_name); logwarn(msg); free(msg); return; } g_hash_table_remove(d->printers, printer_name); } void send_printer_added_signal(BackendObj *b, const char *dialog_name, cups_dest_t *dest) { if (dest == NULL) { logerror("Failed to send printer added signal.\n"); return; } char *printer_name = get_printer_name_for_cups_dest(dest); GVariant *gv = g_variant_new(CPDB_PRINTER_ADDED_ARGS, printer_name, //id printer_name, //name cups_retrieve_string(dest, "printer-info"), //info cups_retrieve_string(dest, "printer-location"), //location cups_retrieve_string(dest, "printer-make-and-model"), cups_is_accepting_jobs(dest), cups_printer_state(dest), "CUPS"); GError *error = NULL; g_dbus_connection_emit_signal(b->dbus_connection, dialog_name, b->obj_path, "org.openprinting.PrintBackend", CPDB_SIGNAL_PRINTER_ADDED, gv, &error); g_assert_no_error(error); } void send_printer_removed_signal(BackendObj *b, const char *dialog_name, const char *printer_name) { GError *error = NULL; g_dbus_connection_emit_signal(b->dbus_connection, dialog_name, b->obj_path, "org.openprinting.PrintBackend", CPDB_SIGNAL_PRINTER_REMOVED, g_variant_new("(ss)", printer_name, "CUPS"), &error); g_assert_no_error(error); } void send_printer_state_changed_signal(BackendObj *b, const char *dialog_name, const char *printer_name, const char *printer_state, gboolean printer_is_accepting_jobs) { GError *error = NULL; g_dbus_connection_emit_signal(b->dbus_connection, dialog_name, b->obj_path, "org.openprinting.PrintBackend", CPDB_SIGNAL_PRINTER_STATE_CHANGED, g_variant_new("(ssbs)", printer_name, printer_state, printer_is_accepting_jobs, "CUPS"), &error); g_assert_no_error(error); } void notify_removed_printers(BackendObj *b, const char *dialog_name, GHashTable *new_table) { Dialog *d = (Dialog *)g_hash_table_lookup(b->dialogs, dialog_name); if (!d) return; GHashTable *prev = d->printers; GList *prevlist = g_hash_table_get_keys(prev); logdebug("Notifying removed printers.\n"); gpointer printer_name = NULL; while (prevlist) { printer_name = (char *)(prevlist->data); if (!g_hash_table_contains(new_table, (gchar *)printer_name)) { g_message("Printer %s removed\n", (char *)printer_name); send_printer_removed_signal(b, dialog_name, (char *)printer_name); remove_printer_from_dialog(b, dialog_name, (char *)printer_name); } prevlist = prevlist->next; } } void notify_added_printers(BackendObj *b, const char *dialog_name, GHashTable *new_table) { GHashTableIter iter; Dialog *d = (Dialog *)g_hash_table_lookup(b->dialogs, dialog_name); if (!d) return; GHashTable *prev = d->printers; logdebug("Notifying added printers.\n"); gpointer printer_name; gpointer value; cups_dest_t *dest = NULL; g_hash_table_iter_init(&iter, new_table); while (g_hash_table_iter_next(&iter, &printer_name, &value)) { if (!g_hash_table_contains(prev, (gchar *)printer_name)) { g_message("Printer %s added\n", (char *)printer_name); dest = (cups_dest_t *)value; send_printer_added_signal(b, dialog_name, dest); add_printer_to_dialog(b, dialog_name, dest); } } } gboolean get_hide_remote(BackendObj *b, const char *dialog_name) { Dialog *d = (Dialog *)g_hash_table_lookup(b->dialogs, dialog_name); return d->hide_remote; } gboolean get_hide_temp(BackendObj *b, const char *dialog_name) { Dialog *d = (Dialog *)g_hash_table_lookup(b->dialogs, dialog_name); return d->hide_temp; } void refresh_printer_list(BackendObj *b, const char *dialog_name) { GHashTable *new_printers; new_printers = cups_get_printers(get_hide_temp(b, dialog_name), get_hide_remote(b, dialog_name)); notify_removed_printers(b, dialog_name, new_printers); notify_added_printers(b, dialog_name, new_printers); } GHashTable *get_dialog_printers(BackendObj *b, const char *dialog_name) { Dialog *d = (Dialog *)g_hash_table_lookup(b->dialogs, dialog_name); if (d == NULL) { logerror("Invalid dialog name.\n"); return NULL; } return d->printers; } PrinterCUPS *get_printer_by_name(BackendObj *b, const char *dialog_name, const char *printer_name) { GHashTable *printers = get_dialog_printers(b, dialog_name); g_assert_nonnull(printers); PrinterCUPS *p = (g_hash_table_lookup(printers, printer_name)); if (p == NULL) { logerror("Printer '%s' does not exist for the dialog %s.\n", printer_name, dialog_name); return NULL; } return p; } cups_dest_t *get_dest_by_name(BackendObj *b, const char *dialog_name, const char *printer_name) { GHashTable *printers = get_dialog_printers(b, dialog_name); g_assert_nonnull(printers); PrinterCUPS *p = (g_hash_table_lookup(printers, printer_name)); if (p == NULL) { logerror("Printer '%s' does not exist for the dialog %s.\n", printer_name, dialog_name); return NULL; } return p->dest; } /***************************PrinterObj********************************/ PrinterCUPS *get_new_PrinterCUPS(const cups_dest_t *dest) { PrinterCUPS *p = (PrinterCUPS *)(malloc(sizeof(PrinterCUPS))); /** Make a copy of dest, because there are no guarantees * whether dest will always exist or if it will be freed**/ cups_dest_t *dest_copy = NULL; cupsCopyDest((cups_dest_t *)dest, 0, &dest_copy); if (dest_copy == NULL) { logerror("Error creating PrinterCUPS"); return NULL; } p->dest = dest_copy; p->name = get_printer_name_for_cups_dest(dest_copy); p->http = NULL; p->dinfo = NULL; p->stream_socket_path = NULL; return p; } void free_PrinterCUPS(PrinterCUPS *p) { logdebug("Freeing printerCUPS \n"); cupsFreeDests(1, p->dest); g_free(p->name); if (p->dinfo) { cupsFreeDestInfo(p->dinfo); } } gboolean ensure_printer_connection(PrinterCUPS *p) { if (p->http) return TRUE; int temp = FALSE; if (cups_is_temporary(p->dest)) temp = TRUE; p->http = cupsConnectDest(p->dest, CUPS_DEST_FLAGS_NONE, 300, NULL, NULL, 0, NULL, NULL); if (p->http == NULL) return FALSE; // update dest after temporary CUPS queue has been created if (temp) { cups_dest_t *new_dest = cupsGetNamedDest(p->http, p->name, NULL); cupsFreeDests(1, p->dest); p->dest = new_dest; } p->dinfo = cupsCopyDestInfo(p->http, p->dest); if (p->dinfo == NULL) return FALSE; return TRUE; } int get_supported(PrinterCUPS *p, char ***supported_values, const char *option_name) { char **values; ensure_printer_connection(p); ipp_attribute_t *attrs = cupsFindDestSupported(p->http, p->dest, p->dinfo, option_name); int i, count = ippGetCount(attrs); if (!count) { *supported_values = NULL; return 0; } values = malloc(sizeof(char *) * count); for (i = 0; i < count; i++) { values[i] = extract_ipp_attribute(attrs, i, option_name); } *supported_values = values; return count; } char *get_orientation_default(PrinterCUPS *p) { const char *def_value = cupsGetOption(CUPS_ORIENTATION, p->dest->num_options, p->dest->options); if (def_value) { switch (def_value[0]) { case '0': return g_strdup("automatic-rotation"); default: return g_strdup(ippEnumString(CUPS_ORIENTATION, atoi(def_value))); } } ensure_printer_connection(p); ipp_attribute_t *attr = NULL; attr = cupsFindDestDefault(p->http, p->dest, p->dinfo, CUPS_ORIENTATION); if (!attr) return g_strdup("NA"); const char *str = ippEnumString(CUPS_ORIENTATION, ippGetInteger(attr, 0)); if (strcmp("0", str) == 0) str = "automatic-rotation"; return g_strdup(str); } int get_job_creation_attributes(PrinterCUPS *p, char ***values) { return get_supported(p, values, "job-creation-attributes"); } char *get_default(PrinterCUPS *p, char *option_name) { /** first take care of special cases**/ if (strcmp(option_name, CUPS_ORIENTATION) == 0) return get_orientation_default(p); /** Generic cases next **/ ensure_printer_connection(p); ipp_attribute_t *def_attr = cupsFindDestDefault(p->http, p->dest, p->dinfo, option_name); const char *def_value = cupsGetOption(option_name, p->dest->num_options, p->dest->options); /** First check the option is already there in p->dest->options **/ if (def_value) { if (def_attr && (ippGetValueTag(def_attr) == IPP_TAG_ENUM)) return g_strdup(ippEnumString(option_name, atoi(def_value))); return g_strdup(def_value); } if (def_attr) { return extract_ipp_attribute(def_attr, 0, option_name); } return g_strdup("NA"); } /**************Option************************************/ Option *get_NA_option() { Option *o = (Option *)malloc(sizeof(Option)); o->option_name = "NA"; o->default_value = "NA"; o->num_supported = 0; o->supported_values = cpdbNewCStringArray(1); o->supported_values[0] = "bub"; return o; } void print_option(const Option *opt) { g_message("%s", opt->option_name); int i; for (i = 0; i < opt->num_supported; i++) { logdebug(" %s\n", opt->supported_values[i]); } logdebug("****DEFAULT: %s\n", opt->default_value); } void free_options(int count, Option *opts) { int i, j; /**Looping variables */ for (i = 0; i < count; i++) { free(opts[i].option_name); for (j = 0; j < opts[i].num_supported; j++) { free(opts[i].supported_values[j]); } free(opts[i].supported_values); free(opts[i].default_value); } free(opts); } void unpack_option_array(GVariant *var, int num_options, Option **options) { Option *opt = (Option *)(malloc(sizeof(Option) * num_options)); int i, j; char *str; GVariantIter *iter; GVariantIter *array_iter; char *name, *default_val; int num_sup; g_variant_get(var, "a(ssia(s))", &iter); for (i = 0; i < num_options; i++) { //logdebug("i = %d\n", i); g_variant_iter_loop(iter, "(ssia(s))", &name, &default_val, &num_sup, &array_iter); opt[i].option_name = g_strdup(name); opt[i].default_value = g_strdup(default_val); opt[i].num_supported = num_sup; opt[i].supported_values = cpdbNewCStringArray(num_sup); for (j = 0; j < num_sup; j++) { g_variant_iter_loop(array_iter, "(s)", &str); opt[i].supported_values[j] = g_strdup(str); //mem } print_option(&opt[i]); } *options = opt; } GVariant *pack_option(const Option *opt) { char *group_name = cpdbGetGroup(opt->option_name); GVariant **t = g_new(GVariant *, 5); t[0] = g_variant_new_string(opt->option_name); t[1] = g_variant_new_string(group_name); t[2] = g_variant_new_string(opt->default_value); t[3] = g_variant_new_int32(opt->num_supported); t[4] = cpdbPackStringArray(opt->num_supported, opt->supported_values); GVariant *tuple_variant = g_variant_new_tuple(t, 5); g_free(t); free(group_name); return tuple_variant; } GVariant *pack_media(const Media *media) { GVariant **t = g_new(GVariant *, 5); t[0] = g_variant_new_string(media->name); t[1] = g_variant_new_int32(media->width); t[2] = g_variant_new_int32(media->length); t[3] = g_variant_new_int32(media->num_margins); t[4] = cpdbPackMediaArray(media->num_margins, media->margins); GVariant *tuple_variant = g_variant_new_tuple(t, 5); g_free(t); return tuple_variant; } int get_all_options(PrinterCUPS *p, Option **options) { ensure_printer_connection(p); char **option_names; int num_options = get_job_creation_attributes(p, &option_names); /** number of options to be returned**/ /** Addition options not present in "job-creation-attributes" **/ char *additional_options[] = {"media-source", "media-type"}; int sz = sizeof(additional_options) / sizeof(char *); /** Add additional attributes to current option_names list **/ option_names = realloc(option_names, sizeof(char *) * (num_options+sz)); for (int i=0; ihttp, p->dest, p->dinfo, option_names[i]); if (vals) opts[optsIndex].num_supported = ippGetCount(vals); else opts[optsIndex].num_supported = 0; /** Retreive all the supported values for that option **/ opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); for (j = 0; j < opts[optsIndex].num_supported; j++) { opts[optsIndex].supported_values[j] = extract_ipp_attribute(vals, j, option_names[i]); if (opts[optsIndex].supported_values[j] == NULL) { opts[optsIndex].supported_values[j] = g_strdup("NA"); } } /** Retrieve the default value for that option **/ opts[optsIndex].default_value = get_default(p, option_names[i]); if (opts[optsIndex].default_value == NULL) { opts[optsIndex].default_value = g_strdup("NA"); } optsIndex++; } /* Add the booklet option */ opts[optsIndex].option_name = g_strdup("booklet"); opts[optsIndex].num_supported = 3; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("off"); opts[optsIndex].supported_values[1] = g_strdup("on"); opts[optsIndex].supported_values[2] = g_strdup("shuffle-only"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the ipp-attribute-fidelity option */ opts[optsIndex].option_name = g_strdup("ipp-attribute-fidelity"); opts[optsIndex].num_supported = 2; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("off"); opts[optsIndex].supported_values[1] = g_strdup("on"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the job-sheets option */ opts[optsIndex].option_name = g_strdup("job-sheets"); opts[optsIndex].num_supported = 8; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("none"); opts[optsIndex].supported_values[1] = g_strdup("classified"); opts[optsIndex].supported_values[2] = g_strdup("confidential"); opts[optsIndex].supported_values[3] = g_strdup("form"); opts[optsIndex].supported_values[4] = g_strdup("secret"); opts[optsIndex].supported_values[5] = g_strdup("standard"); opts[optsIndex].supported_values[6] = g_strdup("topsecret"); opts[optsIndex].supported_values[7] = g_strdup("unclassified"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup("none,none"); } optsIndex++; /* Add the mirror option */ opts[optsIndex].option_name = g_strdup("mirror"); opts[optsIndex].num_supported = 2; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("off"); opts[optsIndex].supported_values[1] = g_strdup("on"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the multiple-document-handling option */ opts[optsIndex].option_name = g_strdup("multiple-document-handling"); opts[optsIndex].num_supported = 2; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("separate-documents-uncollated-copies"); opts[optsIndex].supported_values[1] = g_strdup("separate-documents-collated-copies"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the number-up option */ opts[optsIndex].option_name = g_strdup("number-up"); opts[optsIndex].num_supported = 6; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("1"); opts[optsIndex].supported_values[1] = g_strdup("2"); opts[optsIndex].supported_values[2] = g_strdup("4"); opts[optsIndex].supported_values[3] = g_strdup("6"); opts[optsIndex].supported_values[4] = g_strdup("9"); opts[optsIndex].supported_values[5] = g_strdup("16"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the number-up-layout option */ opts[optsIndex].option_name = g_strdup("number-up-layout"); opts[optsIndex].num_supported = 8; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("lrtb"); opts[optsIndex].supported_values[1] = g_strdup("lrbt"); opts[optsIndex].supported_values[2] = g_strdup("rltb"); opts[optsIndex].supported_values[3] = g_strdup("rlbt"); opts[optsIndex].supported_values[4] = g_strdup("tblr"); opts[optsIndex].supported_values[5] = g_strdup("tbrl"); opts[optsIndex].supported_values[6] = g_strdup("btlr"); opts[optsIndex].supported_values[7] = g_strdup("btrl"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the orientation-requested option */ opts[optsIndex].option_name = g_strdup("orientation-requested"); opts[optsIndex].num_supported = 4; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("3"); opts[optsIndex].supported_values[1] = g_strdup("4"); opts[optsIndex].supported_values[2] = g_strdup("5"); opts[optsIndex].supported_values[3] = g_strdup("6"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } else { if (strcmp(opts[optsIndex].default_value, "potrait") == 0) opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); else if (strcmp(opts[optsIndex].default_value, "landscape") == 0) opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[1]); else if (strcmp(opts[optsIndex].default_value, "reverse-landscape") == 0) opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[2]); else if (strcmp(opts[optsIndex].default_value, "reverse-potrait") == 0) opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[3]); else opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the page-border option */ opts[optsIndex].option_name = g_strdup("page-border"); opts[optsIndex].num_supported = 5; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("none"); opts[optsIndex].supported_values[1] = g_strdup("single"); opts[optsIndex].supported_values[2] = g_strdup("single-thick"); opts[optsIndex].supported_values[3] = g_strdup("double"); opts[optsIndex].supported_values[4] = g_strdup("double-thick"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the page-delivery option */ opts[optsIndex].option_name = g_strdup("page-delivery"); opts[optsIndex].num_supported = 2; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("same-order"); opts[optsIndex].supported_values[1] = g_strdup("reverse-order"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the page-set option */ opts[optsIndex].option_name = g_strdup("page-set"); opts[optsIndex].num_supported = 3; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("all"); opts[optsIndex].supported_values[1] = g_strdup("even"); opts[optsIndex].supported_values[2] = g_strdup("odd"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the position option */ opts[optsIndex].option_name = g_strdup("position"); opts[optsIndex].num_supported = 9; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("center"); opts[optsIndex].supported_values[1] = g_strdup("top"); opts[optsIndex].supported_values[2] = g_strdup("bottom"); opts[optsIndex].supported_values[3] = g_strdup("left"); opts[optsIndex].supported_values[4] = g_strdup("right"); opts[optsIndex].supported_values[5] = g_strdup("top-left"); opts[optsIndex].supported_values[6] = g_strdup("top-right"); opts[optsIndex].supported_values[7] = g_strdup("bottom-left"); opts[optsIndex].supported_values[8] = g_strdup("bottom-right"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the print-scaling option */ opts[optsIndex].option_name = g_strdup("print-scaling"); opts[optsIndex].num_supported = 5; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); opts[optsIndex].supported_values[0] = g_strdup("auto"); opts[optsIndex].supported_values[1] = g_strdup("auto-fit"); opts[optsIndex].supported_values[2] = g_strdup("fill"); opts[optsIndex].supported_values[3] = g_strdup("fit"); opts[optsIndex].supported_values[4] = g_strdup("none"); opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(opts[optsIndex].supported_values[0]); } optsIndex++; /* Add the billing-info option */ opts[optsIndex].option_name = g_strdup("billing-info"); opts[optsIndex].num_supported = 0; opts[optsIndex].supported_values = NULL; opts[optsIndex].default_value = get_default(p, opts[optsIndex].option_name); if (strcmp(opts[optsIndex].default_value, "NA") == 0) { opts[optsIndex].default_value = g_strdup(""); } optsIndex++; /* Correct the print-quality option */ for (i = 0; i < optsIndex; i++) { if (strcmp(opts[i].option_name, "print-quality") == 0) { for (j = 0; j < opts[i].num_supported; j++) { if (strcasecmp(opts[i].supported_values[j], "draft") == 0) { free(opts[i].supported_values[j]); opts[i].supported_values[j] = g_strdup("3"); continue; } if (strcasecmp(opts[i].supported_values[j], "normal") == 0) { free(opts[i].supported_values[j]); opts[i].supported_values[j] = g_strdup("4"); continue; } if (strcasecmp(opts[i].supported_values[j], "high") == 0) { free(opts[i].supported_values[j]); opts[i].supported_values[j] = g_strdup("5"); continue; } } if (strcasecmp(opts[i].default_value, "draft") == 0) { free(opts[i].default_value); opts[i].default_value = g_strdup("3"); continue; } if (strcasecmp(opts[i].default_value, "normal") == 0) { free(opts[i].default_value); opts[i].default_value = g_strdup("4"); continue; } if (strcasecmp(opts[i].default_value, "high") == 0) { free(opts[i].default_value); opts[i].default_value = g_strdup("5"); continue; } break; } } *options = (Option *) realloc(opts, sizeof(Option) * optsIndex); return optsIndex; } int get_all_media(PrinterCUPS *p, Media **medias) { ensure_printer_connection(p); ipp_t *request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES); const char *uri = cupsGetOption("printer-uri-supported", p->dest->num_options, p->dest->options); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); const char *const requested_attributes[] = {"media-col-database"}; ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", 1, NULL, requested_attributes); ipp_t *response = cupsDoRequest(p->http, request, "/"); if (cupsLastError() >= IPP_STATUS_ERROR_BAD_REQUEST) { /* request failed */ logerror("Request failed: %s\n", cupsLastErrorString()); return 0; } int media_num = 0; /** Number of unqiue media sizes **/ Media *meds = NULL; /** Array of unique media sizes **/ ipp_attribute_t *mdb; // media database if ((mdb = ippFindAttribute(response, "media-col-database", IPP_TAG_BEGIN_COLLECTION)) != NULL) { int i, j; gpointer key, value; /** Looping variables **/ const char *name; /** PWG name for a media **/ int width, length; /** Width and length of a media **/ pwg_media_t *pwg_media; ipp_t *tuple; /** Single media entry in media-col-database **/ ipp_t *media_size; /** media-size collection in a media tuple **/ ipp_attribute_t *attr; /** Temporary variable for ipp attributes in a single tuple **/ typedef struct Margin { int left; int right; int top; int bottom; } Margin; Margin *margin; /** Single margin struct for some media size**/ GList *margins, *listIter; /** List of all different margins for some media size **/ GHashTable *table; /** [media-size]-->[margins] **/ GHashTableIter iter; /** For iterating over the table **/ table = g_hash_table_new(g_str_hash, g_str_equal); int count = ippGetCount(mdb); for (int i = 0; i < count; i++) { tuple = ippGetCollection(mdb, i); attr = ippFindAttribute(tuple, "media-size", IPP_TAG_BEGIN_COLLECTION); media_size = ippGetCollection(attr, 0); attr = ippFindAttribute(media_size, "x-dimension", IPP_TAG_INTEGER); width = ippGetInteger(attr, 0); attr = ippFindAttribute(media_size, "y-dimension", IPP_TAG_INTEGER); length = ippGetInteger(attr, 0); if (width <= 0 || length <= 0) continue; pwg_media = pwgMediaForSize(width, length); name = pwg_media->pwg; margin = g_new0(Margin, 1); attr = ippFindAttribute(tuple, "media-left-margin", IPP_TAG_INTEGER); margin->left = ippGetInteger(attr, 0); attr = ippFindAttribute(tuple, "media-right-margin", IPP_TAG_INTEGER); margin->right = ippGetInteger(attr, 0); attr = ippFindAttribute(tuple, "media-top-margin", IPP_TAG_INTEGER); margin->top = ippGetInteger(attr, 0); attr = ippFindAttribute(tuple, "media-bottom-margin", IPP_TAG_INTEGER); margin->bottom = ippGetInteger(attr, 0); margins = g_hash_table_lookup(table, name); margins = g_list_prepend(margins, margin); g_hash_table_replace(table, (gpointer) name, margins); } media_num = g_hash_table_size(table); meds = g_new0 (Media, media_num); i = 0; g_hash_table_iter_init(&iter, table); while (g_hash_table_iter_next(&iter, &key, &value)) { name = (char *) key; pwg_media = pwgMediaForPWG(name); margins = (GList *) value; margins = g_list_reverse(margins); meds[i].name = g_strdup(name); meds[i].width = pwg_media->width; meds[i].length = pwg_media->length; meds[i].num_margins = g_list_length(margins); meds[i].margins = malloc(sizeof(int) * meds[i].num_margins * 4); j = 0; listIter = margins; while (listIter != NULL) { margin = (Margin *) listIter->data; meds[i].margins[j][0] = margin->left; meds[i].margins[j][1] = margin->right; meds[i].margins[j][2] = margin->top; meds[i].margins[j][3] = margin->bottom; free(margin); listIter = listIter->next; j++; } g_list_free(margins); i++; } g_hash_table_destroy(table); } ippDelete(response); *medias = meds; return media_num; } int add_media_to_options(PrinterCUPS *p, Media *medias, int media_count, Option **options, int count) { int i, j; /** Looping variables **/ int num_media; /** Variable for number of "media" supported using CUPS call **/ char *media_name; /** Variable for media name **/ int width, length; /** Variable for media width and media length **/ int optsIndex = count; /** Index for fillings options **/ pwg_media_t *pwg_media; ipp_t *media_col, *media_size; /** media_col and media_size collections in IPP request **/ ipp_attribute_t *vals, *default_val, *attr; count += 5; /** "media", "media-{top, bottom, left, right}-margins" **/ Option *opts = *options; opts = realloc(opts, sizeof(Option) * count); /* Add the media option */ opts[optsIndex].option_name = g_strdup("media"); opts[optsIndex].num_supported = media_count; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported + 2); /** 2 extra for custom_min and custom_max sizes **/ for (i = 0; i < opts[optsIndex].num_supported; i++) { opts[optsIndex].supported_values[i] = g_strdup(medias[i].name); } opts[optsIndex].default_value = get_default(p, "media"); if (opts[optsIndex].default_value == NULL) { opts[optsIndex].default_value = g_strdup("NA"); } /** Add custom_min and custom_max media if they exist **/ vals = cupsFindDestSupported(p->http, p->dest, p->dinfo, "media"); if (vals) num_media = ippGetCount(vals); else num_media = 0; for (j = 0; j < num_media && i < (media_count + 2); j++) { media_name = extract_ipp_attribute(vals, i, "media"); if (media_name == NULL) continue; if (strncmp(media_name, "custom_min", 10) == 0 || strncmp(media_name, "custom_max", 10) == 0) { opts[optsIndex].supported_values[i] = g_strdup(media_name); i++; } free(media_name); } opts[optsIndex].num_supported = media_count = i; optsIndex++; /* Add the media-{top,left,right,bottom}-margin option */ char def[16]; char *attrs[] = {"media-left-margin", "media-bottom-margin", "media-top-margin", "media-right-margin"}; default_val = cupsFindDestDefault(p->http, p->dest, p->dinfo, "media-col"); for (i = 0; i < 4; i++) // for each attr in attrs { vals = cupsFindDestSupported(p->http, p->dest, p->dinfo, attrs[i]); opts[optsIndex].option_name = g_strdup(attrs[i]); if (vals) opts[optsIndex].num_supported = ippGetCount(vals); else opts[optsIndex].num_supported = 0; opts[optsIndex].supported_values = cpdbNewCStringArray(opts[optsIndex].num_supported); for (j = 0; j < opts[optsIndex].num_supported; j++) { opts[optsIndex].supported_values[j] = extract_ipp_attribute(vals, j, attrs[i]); if (opts[optsIndex].supported_values[j] == NULL) { opts[optsIndex].supported_values[j] = g_strdup("NA"); } } media_col = ippGetCollection(default_val, 0); attr = ippFindAttribute(media_col, attrs[i], IPP_TAG_INTEGER); snprintf(def, 16, "%d", ippGetInteger(attr, 0)); opts[optsIndex].default_value = g_strdup(def); if (opts[optsIndex].default_value == NULL) { opts[optsIndex].default_value = g_strdup("NA"); } optsIndex++; } *options = opts; return count; } const char *get_printer_state(PrinterCUPS *p) { const char *str; ensure_printer_connection(p); ipp_t *request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES); const char *uri = cupsGetOption("printer-uri-supported", p->dest->num_options, p->dest->options); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); const char *const requested_attributes[] = {"printer-state"}; ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", 1, NULL, requested_attributes); ipp_t *response = cupsDoRequest(p->http, request, "/"); if (cupsLastError() >= IPP_STATUS_ERROR_BAD_REQUEST) { /* request failed */ logerror("Request failed: %s\n", cupsLastErrorString()); return "NA"; } ipp_attribute_t *attr; if ((attr = ippFindAttribute(response, "printer-state", IPP_TAG_ENUM)) != NULL) { logdebug("printer-state=%d\n", ippGetInteger(attr, 0)); str = map->state[ippGetInteger(attr, 0)]; } return str; } void print_socket(PrinterCUPS *p, int num_settings, GVariant *settings, char *job_id_str, char *socket_path, const char *title) { ensure_printer_connection(p); int num_options = 0; cups_option_t *options; GVariantIter *iter; g_variant_get(settings, "a(ss)", &iter); int i = 0; char *option_name, *option_value; for (i = 0; i < num_settings; i++) { g_variant_iter_loop(iter, "(ss)", &option_name, &option_value); logdebug(" %s : %s\n", option_name, option_value); /** * to do: * instead of directly adding the option,convert it from the frontend's lingo * to the specific lingo of the backend * * use PWG names instead */ num_options = cupsAddOption(option_name, option_value, num_options, &options); } int job_id = 0; cupsCreateDestJob(p->http, p->dest, p->dinfo, &job_id, title, num_options, options); cupsStartDestDocument(p->http, p->dest, p->dinfo, job_id, title, CUPS_FORMAT_AUTO, num_options, options, 1); int socket_fd = socket(AF_UNIX, SOCK_STREAM, 0); if (socket_fd == -1) { perror("Error creating socket"); return; } char mkdir_cmd[256]; snprintf(mkdir_cmd, 256, "mkdir -p %s/cpdb/sockets", getenv("HOME")); if (system(mkdir_cmd)!=0){ perror("Unable to create the sockets directory"); return; } int socket_option = 1; setsockopt(socket_fd, SOL_SOCKET, SO_REUSEADDR, &socket_option, sizeof(socket_option)); snprintf(job_id_str, 32, "%d", job_id); snprintf(socket_path, 256, "%s/cpdb/sockets/cups-%s.sock", getenv("HOME"),job_id_str); p->stream_socket_path = socket_path; struct sockaddr_un server_addr; memset(&server_addr, 0, sizeof(server_addr)); server_addr.sun_family = AF_UNIX; strncpy(server_addr.sun_path, socket_path, sizeof(server_addr.sun_path) - 1); unlink(socket_path); if (bind(socket_fd, (struct sockaddr *)&server_addr, sizeof(server_addr)) == -1) { perror("Error connecting to CPDB CUPS backend socket"); close(socket_fd); return; } // Listen for incoming connections, we only need to support one // single connection (no queue), as the socket is dedicated for a single // job. if (listen(socket_fd, 1) == -1) { perror("Error listening to CPDB CUPS backend socket"); close(socket_fd); } // Create a struct to pass data to the thread PrintDataThreadData *thread_data = g_malloc(sizeof(PrintDataThreadData)); thread_data->printer = p; thread_data->num_options = num_options; thread_data->options = options; thread_data->socket_fd = socket_fd; // Create a thread for handling data transfer to CUPS pthread_t thread; if (pthread_create(&thread, NULL, print_data_thread, thread_data) != 0) { perror("Error creating thread"); close(socket_fd); } else { // Detach the thread to allow it to run independently pthread_detach(thread); } } void *print_data_thread(void *data) { PrintDataThreadData *thread_data = (PrintDataThreadData *)data; // Allocate dynamic memory for the buffer within the thread char *buffer = g_malloc(1024); // Accept incoming connections int client_fd = accept(thread_data->socket_fd, NULL, NULL); if (client_fd == -1) { perror("Error accepting connection"); close(thread_data->socket_fd); } // Placeholder logic for reading data from the socket ssize_t bytesRead; while ((bytesRead = read(client_fd, buffer, 1024)) > 0) { // Send data to CUPS using cupsWriteRequestData http_status_t http_status = cupsWriteRequestData(thread_data->printer->http, buffer, bytesRead); if (http_status != HTTP_STATUS_CONTINUE) { logerror("Error writing print data to server.\n"); break; } } // Cleanup and free resources close(thread_data->socket_fd); if (cupsFinishDestDocument(thread_data->printer->http, thread_data->printer->dest, thread_data->printer->dinfo) == IPP_STATUS_OK) logdebug("Document send succeeded.\n"); else logerror("Document send failed: %s\n", cupsLastErrorString()); cupsFreeOptions(thread_data->num_options, thread_data->options); g_free(thread_data); g_free(buffer); return NULL; } void printAllJobs(PrinterCUPS *p) { ensure_printer_connection(p); cups_job_t *jobs; int num_jobs = cupsGetJobs2(p->http, &jobs, p->name, 1, CUPS_WHICHJOBS_ALL); for (int i = 0; i < num_jobs; i++) { print_job(&jobs[i]); } } static void list_group(ppd_file_t *ppd, /* I - PPD file */ ppd_group_t *group) /* I - Group to show */ { logdebug("List group %s\n", group->name); /** Now iterate through the options in the particular group*/ logdebug("It has %d options.\n", group->num_options); logdebug("Listing all of them ..\n"); int i; for (i = 0; i < group->num_options; i++) { logdebug(" Option %d : %s\n", i, group->options[i].keyword); } } /**********Dialog related funtions ****************/ Dialog *get_new_Dialog() { Dialog *d = g_new(Dialog, 1); d->cancel = 0; d->hide_remote = FALSE; d->hide_temp = FALSE; d->keep_alive = FALSE; d->printers = g_hash_table_new_full(g_str_hash, g_str_equal, (GDestroyNotify)free_string, (GDestroyNotify)free_PrinterCUPS); return d; } void free_Dialog(Dialog *d) { logdebug("freeing dialog..\n"); g_hash_table_destroy(d->printers); free(d); } /*********Mappings********/ Mappings *get_new_Mappings() { Mappings *m = (Mappings *)(malloc(sizeof(Mappings))); m->state[3] = CPDB_STATE_IDLE; m->state[4] = CPDB_STATE_PRINTING; m->state[5] = CPDB_STATE_STOPPED; m->orientation[atoi(CUPS_ORIENTATION_LANDSCAPE)] = CPDB_ORIENTATION_LANDSCAPE; m->orientation[atoi(CUPS_ORIENTATION_PORTRAIT)] = CPDB_ORIENTATION_PORTRAIT; return m; } /*****************CUPS and IPP helpers*********************/ const char *cups_printer_state(cups_dest_t *dest) { //cups_dest_t *dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, printer_name, NULL); g_assert_nonnull(dest); const char *state = cupsGetOption("printer-state", dest->num_options, dest->options); if (state == NULL) return "NA"; return map->state[state[0] - '0']; } gboolean cups_is_accepting_jobs(cups_dest_t *dest) { g_assert_nonnull(dest); const char *val = cupsGetOption("printer-is-accepting-jobs", dest->num_options, dest->options); return cpdbGetBoolean(val); } void cups_get_Resolution(cups_dest_t *dest, int *xres, int *yres) { http_t *http = cupsConnectDest(dest, CUPS_DEST_FLAGS_NONE, 500, NULL, NULL, 0, NULL, NULL); g_assert_nonnull(http); cups_dinfo_t *dinfo = cupsCopyDestInfo(http, dest); g_assert_nonnull(dinfo); ipp_attribute_t *attr = cupsFindDestDefault(http, dest, dinfo, "printer-resolution"); ipp_res_t *units; *xres = ippGetResolution(attr, 0, yres, units); } int add_printer_to_ht(void *user_data, unsigned flags, cups_dest_t *dest) { GHashTable *h = (GHashTable *)user_data; char *printername = get_printer_name_for_cups_dest(dest); cups_dest_t *dest_copy = NULL; cupsCopyDest(dest, 0, &dest_copy); g_hash_table_insert(h, printername, dest_copy); return 1; } int add_printer_to_ht_no_temp(void *user_data, unsigned flags, cups_dest_t *dest) { if (cups_is_temporary(dest)) return 1; GHashTable *h = (GHashTable *)user_data; char *printername = get_printer_name_for_cups_dest(dest); cups_dest_t *dest_copy = NULL; cupsCopyDest(dest, 0, &dest_copy); g_hash_table_insert(h, printername, dest_copy); return 1; } int add_printer_to_ht_no_remote(void *user_data, unsigned flags, cups_dest_t *dest) { if (cups_is_remote(dest)) return 1; GHashTable *h = (GHashTable *)user_data; char *printername = get_printer_name_for_cups_dest(dest); cups_dest_t *dest_copy = NULL; cupsCopyDest(dest, 0, &dest_copy); g_hash_table_insert(h, printername, dest_copy); return 1; } GHashTable *cups_get_printers(gboolean notemp, gboolean noremote) { cups_dest_cb_t cb = add_printer_to_ht; unsigned type = 0, mask = 0; if (noremote) { cb = add_printer_to_ht_no_remote; } if (notemp) { cb = add_printer_to_ht_no_temp; } GHashTable *printers_ht = g_hash_table_new(g_str_hash, g_str_equal); cupsEnumDests(CUPS_DEST_FLAGS_NONE, 3000, //timeout NULL, //cancel type, //TYPE mask, //MASK cb, //function printers_ht); //user_data return printers_ht; } GHashTable *cups_get_all_printers() { logdebug("all printers\n"); // to do : fix GHashTable *printers_ht = g_hash_table_new(g_str_hash, g_str_equal); cupsEnumDests(CUPS_DEST_FLAGS_NONE, 3000, //timeout NULL, //cancel 0, //TYPE 0, //MASK add_printer_to_ht, //function printers_ht); //user_data return printers_ht; } GHashTable *cups_get_local_printers() { logdebug("local printers\n"); //to do: fix GHashTable *printers_ht = g_hash_table_new(g_str_hash, g_str_equal); cupsEnumDests(CUPS_DEST_FLAGS_NONE, 1200, //timeout NULL, //cancel CUPS_PRINTER_LOCAL, //TYPE CUPS_PRINTER_REMOTE, //MASK add_printer_to_ht, //function printers_ht); //user_data return printers_ht; } char *cups_retrieve_string(cups_dest_t *dest, const char *option_name) { /** this funtion is kind of a wrapper , to ensure that the return value is never NULL , as that can cause the backend to segFault **/ g_assert_nonnull(dest); g_assert_nonnull(option_name); char *ans = NULL; ans = g_strdup(cupsGetOption(option_name, dest->num_options, dest->options)); if (ans) return ans; return g_strdup("NA"); } gboolean cups_is_temporary(cups_dest_t *dest) { g_assert_nonnull(dest); if (cupsGetOption("printer-uri-supported", dest->num_options, dest->options)) return FALSE; return TRUE; } char *extractHostFromURI(const char *uri) { const char *host_start, *host_end; char *host = NULL; // Find the start of the host part host_start = strstr(uri, "://"); if (host_start != NULL) { host_start += 3; // Move past "://" } else { return NULL; } // Find the end of the host part const char *slash_pos = strchr(host_start, '/'); const char *colon_pos = strchr(host_start, ':'); if (slash_pos == NULL && colon_pos == NULL) { host_end = host_start + strlen(host_start); // If no "/" or ":", host extends to end of string } else if (slash_pos == NULL) { host_end = colon_pos; } else if (colon_pos == NULL) { host_end = slash_pos; } else { host_end = (slash_pos < colon_pos) ? slash_pos : colon_pos; } // Allocate memory for the host part host = (char *)malloc(host_end - host_start + 1); if (host != NULL) { // Copy the host part strncpy(host, host_start, host_end - host_start); host[host_end - host_start] = '\0'; // Null-terminate the string } fprintf(stderr, "XXX12: URI: %s Host: %s\n", uri, host); return host; } gboolean checkRemote(const char *uri) { //GET LOCALHOST ADDRESSES char hostname[1024]; // Get the hostname of the local machine if (gethostname(hostname, sizeof(hostname)) == -1) { perror("gethostname"); return 1; } strcat(hostname, ".local"); // Get the network IP addresses associated with the hostname struct addrinfo hints, *res, *p; int status; int num_addresses = 0; AddressList addresses[MAX_ADDRESSES]; // Get the IPv4 addresses associated with the hostname { memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; // IPv4 hints.ai_socktype = SOCK_STREAM; if ((status = getaddrinfo(hostname, NULL, &hints, &res)) != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(status)); return 1; } // Iterate over the linked list of addrinfo structures for (p = res; p != NULL && num_addresses < MAX_ADDRESSES; p = p->ai_next) { inet_ntop(p->ai_family, &((struct sockaddr_in *)p->ai_addr)->sin_addr, addresses[num_addresses].ipstr, sizeof(addresses[num_addresses].ipstr)); addresses[num_addresses].family = p->ai_family; num_addresses++; } freeaddrinfo(res); // Free the linked list } // Get the IPv6 addresses associated with the hostname { memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET6; // IPv6 hints.ai_socktype = SOCK_STREAM; if ((status = getaddrinfo(hostname, NULL, &hints, &res)) != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(status)); return 1; } // Iterate over the linked list of addrinfo structures for (p = res; p != NULL && num_addresses < MAX_ADDRESSES; p = p->ai_next) { inet_ntop(p->ai_family, &((struct sockaddr_in6 *)p->ai_addr)->sin6_addr, addresses[num_addresses].ipstr, sizeof(addresses[num_addresses].ipstr)); addresses[num_addresses].family = p->ai_family; num_addresses++; } freeaddrinfo(res); // Free the linked list } // COMPARE LOCAL IP ADDRESSES WITH THAT OF THE URI struct addrinfo *uri_res; hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; const char* new_uri = extractHostFromURI(uri); if ((status = getaddrinfo(new_uri, NULL, &hints, &uri_res)) != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(status)); return 1; } for (p = uri_res; p != NULL; p = p->ai_next) { void *addr; char ipstr[INET6_ADDRSTRLEN]; // Get the pointer to the address itself, // different fields in IPv4 and IPv6: if (p->ai_family == AF_INET) { // IPv4 struct sockaddr_in *ipv4 = (struct sockaddr_in *)p->ai_addr; addr = &(ipv4->sin_addr); } else { // IPv6 struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)p->ai_addr; addr = &(ipv6->sin6_addr); } // Convert the IP to a string inet_ntop(p->ai_family, addr, ipstr, sizeof(ipstr)); // Check if this IP address matches any of the addresses associated with the local hostname for (int i = 0; i < num_addresses; i++) { if (p->ai_family == addresses[i].family && strcmp(ipstr, addresses[i].ipstr) == 0) { return FALSE; } } } freeaddrinfo(uri_res); // Free the linked list return TRUE; } gboolean cups_is_remote(cups_dest_t *dest) { g_assert_nonnull(dest); const char *device_uri = cupsGetOption("device-uri", dest->num_options, dest->options); const char *uri = cfResolveURI(device_uri); fprintf(stderr, "XXX10: deviceURI: %s \n", device_uri); fprintf(stderr, "XXX11: cfURI: %s \n", uri); // Check for "localhost" if (strstr(uri, "localhost") != NULL) { return FALSE; } // Check for "::1" if (strstr(uri, "::1") != NULL) { return FALSE; } // Check for IPv4 IP addresses starting with "127" if (strncmp(uri, "127.", 4) == 0) { return FALSE; } // Check if the URI starts with "usb://" or "parallel://" if (strncmp(uri, "usb://", 6) == 0 || strncmp(uri, "parallel://", 11) == 0) { return FALSE; } return checkRemote(uri); } char *extract_ipp_attribute(ipp_attribute_t *attr, int index, const char *option_name) { /** first deal with the totally unique cases **/ if (strcmp(option_name, CUPS_ORIENTATION) == 0) return extract_orientation_from_ipp(attr, index); /** Then deal with the generic cases **/ char *str; const char *attrstr; switch (ippGetValueTag(attr)) { case IPP_TAG_INTEGER: str = (char *)(malloc(sizeof(char) * 50)); snprintf(str, sizeof(str), "%d", ippGetInteger(attr, index)); break; case IPP_TAG_ENUM: attrstr = ippEnumString(option_name, ippGetInteger(attr, index)); str = strdup(attrstr); break; case IPP_TAG_RANGE: str = (char *)(malloc(sizeof(char) * 100)); int upper, lower = ippGetRange(attr, index, &upper); snprintf(str, sizeof(str), "%d-%d", lower, upper); break; case IPP_TAG_RESOLUTION: return extract_res_from_ipp(attr, index); default: return extract_string_from_ipp(attr, index); } return str; } char *extract_res_from_ipp(ipp_attribute_t *attr, int index) { int xres, yres; ipp_res_t units; xres = ippGetResolution(attr, index, &yres, &units); char *unit = units == IPP_RES_PER_INCH ? "dpi" : "dpcm"; char buf[100]; if (xres == yres) snprintf(buf, sizeof(buf), "%d%s", xres, unit); else snprintf(buf, sizeof(buf), "%dx%d%s", xres, yres, unit); return g_strdup(buf); } char *extract_string_from_ipp(ipp_attribute_t *attr, int index) { return g_strdup(ippGetString(attr, index, NULL)); } char *extract_orientation_from_ipp(ipp_attribute_t *attr, int index) { char *str = g_strdup(ippEnumString(CUPS_ORIENTATION, ippGetInteger(attr, index))); if (strcmp("0", str) == 0) str = g_strdup("automatic-rotation"); return str; } void print_job(cups_job_t *j) { logdebug("title : %s\n", j->title); logdebug("dest : %s\n", j->dest); logdebug("job-id : %d\n", j->id); logdebug("user : %s\n", j->user); char *state = translate_job_state(j->state); logdebug("state : %s\n", state); } char *get_option_translation(PrinterCUPS *p, const char *option_name, const char *locale) { char *copy; const char *uri, *translation; static const char *const req_attrs[] = {"printer-strings-uri"}; ipp_attribute_t *attr; ipp_t *request, *response; cups_array_t *opts_catalog, *printer_opts_catalog; ensure_printer_connection(p); request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES); uri = cupsGetOption("printer-uri-supported", p->dest->num_options, p->dest->options); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", 1, NULL, req_attrs); response = cupsDoRequest(p->http, request, "/"); if (cupsLastError() >= IPP_STATUS_ERROR_BAD_REQUEST) { /* request failed */ logerror("Request failed: %s\n", cupsLastErrorString()); return g_strdup(option_name); } opts_catalog = cfCatalogOptionArrayNew(); cfCatalogLoad(NULL, locale, opts_catalog); if ((attr = ippFindAttribute(response, "printer-strings-uri", IPP_TAG_URI)) != NULL) { printer_opts_catalog = cfCatalogOptionArrayNew(); cfCatalogLoad(ippGetString(attr, 0, NULL), NULL, printer_opts_catalog); } translation = cfCatalogLookUpOption((char *)option_name, opts_catalog, printer_opts_catalog); copy = g_strdup(translation); cupsArrayDelete(opts_catalog); cupsArrayDelete(printer_opts_catalog); return copy; } char *get_choice_translation(PrinterCUPS *p, const char *option_name, const char *choice_name, const char *locale) { char *copy; const char *uri, *translation; static const char *const req_attrs[] = {"printer-strings-uri"}; ipp_attribute_t *attr; ipp_t *request, *response; cups_array_t *opts_catalog, *printer_opts_catalog; ensure_printer_connection(p); request = ippNewRequest(IPP_OP_GET_PRINTER_ATTRIBUTES); uri = cupsGetOption("printer-uri-supported", p->dest->num_options, p->dest->options); ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri); ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", 1, NULL, req_attrs); response = cupsDoRequest(p->http, request, "/"); if (cupsLastError() >= IPP_STATUS_ERROR_BAD_REQUEST) { /* request failed */ logerror("Request failed: %s\n", cupsLastErrorString()); return g_strdup(choice_name); } opts_catalog = cfCatalogOptionArrayNew(); cfCatalogLoad(NULL, locale, opts_catalog); if ((attr = ippFindAttribute(response, "printer-strings-uri", IPP_TAG_URI)) != NULL) { printer_opts_catalog = cfCatalogOptionArrayNew(); cfCatalogLoad(ippGetString(attr, 0, NULL), NULL, printer_opts_catalog); } translation = cfCatalogLookUpChoice((char *)choice_name, (char *)option_name, opts_catalog, printer_opts_catalog); copy = g_strdup(translation); cupsArrayDelete(opts_catalog); cupsArrayDelete(printer_opts_catalog); return copy; } GVariant *get_printer_translations(PrinterCUPS *p, const char *locale) { int num_opts; Option *opts; GVariant *translations; GVariantBuilder *builder; char *group; char *name_tr, *group_tr, *choice_tr; char *name_key, *group_key, *choice_key; num_opts = get_all_options(p, &opts); builder = g_variant_builder_new(G_VARIANT_TYPE(CPDB_TL_DICT_ARGS)); for (int i = 0; i < num_opts; i++) { /* add translation for option name */ name_tr = get_option_translation(p, opts[i].option_name, locale); name_key = cpdbConcatSep(CPDB_OPT_PREFIX, opts[i].option_name); if (name_tr) { logdebug("Translation '%s' : '%s'\n", name_key, name_tr); g_variant_builder_add(builder, CPDB_TL_ARGS, name_key, name_tr); } g_free(name_tr); /* add translation for option group */ group = cpdbGetGroup(opts[i].option_name); group_key = cpdbConcatSep(CPDB_GRP_PREFIX, group); group_tr = cpdbGetGroupTranslation2(group, locale); if (group_tr) { logdebug("Translation '%s' : '%s'\n", group_key, group_tr); g_variant_builder_add(builder, CPDB_TL_ARGS, group_key, group_tr); } g_free(group); g_free(group_key); g_free(group_tr); /* add translation for option choices */ for (int j = 0; j < opts[i].num_supported; j++) { choice_tr = get_choice_translation(p, opts[i].option_name, opts[i].supported_values[j], locale); choice_key = cpdbConcatSep(name_key, opts[i].supported_values[j]); if (choice_tr) { logdebug("Translation '%s' : '%s'\n", choice_key, choice_tr); g_variant_builder_add(builder, CPDB_TL_ARGS, choice_key, choice_tr); } g_free(choice_key); g_free(choice_tr); } g_free(name_key); } translations = g_variant_builder_end(builder); free_options(num_opts, opts); return translations; } char *translate_job_state(ipp_jstate_t state) { switch (state) { case IPP_JSTATE_ABORTED: return CPDB_JOB_STATE_ABORTED; case IPP_JSTATE_CANCELED: return CPDB_JOB_STATE_CANCELLED; case IPP_JSTATE_HELD: return CPDB_JOB_STATE_HELD; case IPP_JSTATE_PENDING: return CPDB_JOB_STATE_PENDING; case IPP_JSTATE_PROCESSING: return CPDB_JOB_STATE_PRINTING; case IPP_JSTATE_STOPPED: return CPDB_JOB_STATE_STOPPED; case IPP_JSTATE_COMPLETED: return CPDB_JOB_STATE_COMPLETED; default: return "NA"; } } GVariant *pack_cups_job(cups_job_t job) { logdebug("%s\n", job.dest); GVariant **t = g_new0(GVariant *, 7); char jobid[20]; snprintf(jobid, sizeof(jobid), "%d", job.id); t[0] = g_variant_new_string(jobid); t[1] = g_variant_new_string(job.title); t[2] = g_variant_new_string(job.dest); t[3] = g_variant_new_string(job.user); t[4] = g_variant_new_string(translate_job_state(job.state)); t[5] = g_variant_new_string(httpGetDateString(job.creation_time)); t[6] = g_variant_new_int32(job.size); GVariant *tuple_variant = g_variant_new_tuple(t, 7); g_free(t); return tuple_variant; } void free_string(char *str) { if (str) { free(str); } } cpdb-backend-cups-2.0b7/src/run-tests.sh0000775000175000017500000003560114755604632013647 #!/bin/sh # # Perform testing of automatic print queue generation and removal by # cups-browsed # # Copyright © 2020-2023 by OpenPrinting # Copyright © 2007-2021 by Apple Inc. # Copyright © 1997-2007 by Easy Software Products, all rights reserved. # # Licensed under Apache License v2.0. See the file "LICENSE" for more # information. # # # We use "dbus-run-session" to have our own, private D-Bus session bus, # to avoid any interaction with the host system. # if ! test "${1}" = "d"; then exec dbus-run-session -- ${0} d fi # # Clean up after the tests, and preserve logs for failed "make check" # Shut down daemons, remove test bed if we have created one # clean_up() { # # Shut down all the daemons # kill_sent=0 if (test "x$BACKEND_PID" != "x"); then kill -TERM $BACKEND_PID 2>/dev/null kill_sent=1 fi if (test "x$FRONTEND_PID" != "x"); then kill -TERM $FRONTEND_PID 2>/dev/null kill_sent=1 fi if (test "x$cupsd" != "x"); then kill -TERM $cupsd 2>/dev/null kill_sent=1 fi if test $kill_sent = 1; then sleep 5 fi # # Hard-kill any remaining daemon # if (test "x$BACKEND_PID" != "x"); then kill -KILL $BACKEND_PID 2>/dev/null fi if (test "x$FRONTEND_PID" != "x"); then kill -KILL $FRONTEND_PID 2>/dev/null fi if (test "x$cupsd" != "x"); then kill -KILL $cupsd 2>/dev/null fi # # Preserve logs in case of failure # if test "x$RES" != "x0"; then if test -n "$BASE"; then echo "============================" echo "CPDB FRONTEND LOG" echo "============================" echo "" cat $BASE/log/frontend_log echo "" echo "" echo "============================" echo "CPDB BACKEND LOG" echo "============================" echo "" cat $BASE/log/backend_log echo "" echo "" echo "============================" echo "CUPS ERROR_LOG" echo "============================" echo "" cat $BASE/log/error_log echo "" echo "" echo "============================" echo "CUPS ACCESS_LOG" echo "============================" echo "" cat $BASE/log/access_log echo "" echo "" echo "============================" echo "CUPSD DEBUG LOG" echo "============================" echo "" cat $BASE/log/cupsd_debug_log echo "" echo "" fi fi # # Remove test bed directories # #return if test -n "$BASE"; then rm -rf $BASE fi } # # Call clean_up() whenever this script gets interrupted, both by signals # end by errors... # RES=1 trap clean_up 0 EXIT INT QUIT ABRT PIPE TERM # # Force the permissions of the files we create... # umask 022 # # Solaris has a non-POSIX grep in /bin... # if test -x /usr/xpg4/bin/grep; then GREP=/usr/xpg4/bin/grep else GREP=grep fi # # Figure out the proper echo options... # if (echo "testing\c"; echo 1,2,3) | $GREP c >/dev/null; then ac_n=-n ac_c= else ac_n= ac_c='\c' fi # # CUPS resource directories of the system # # For "make check" testing we copy/link our testbed CUPS # components from there # sys_datadir=`cups-config --datadir` sys_serverbin=`cups-config --serverbin` sys_serverroot=`cups-config --serverroot` # # Information for the server/tests... # echo "Running 'make check' ..." echo "" echo "Running own CUPS instance on alternative port" echo "Using CPDB CUPS backend from source tree" port="${CUPS_TESTPORT:=8631}" CUPS_TESTROOT=.; export CUPS_TESTROOT BASE="${CUPS_TESTBASE:=}" if test -z "$BASE"; then if test -d /private/tmp; then BASE=/private/tmp/cpdb-backend-cups-$user else BASE=/tmp/cpdb-backend-cups-$USER fi fi export BASE # # Make sure that the LPDEST and PRINTER environment variables are # not included in the environment that is passed to the tests. These # will usually cause tests to fail erroneously... # unset LPDEST unset PRINTER # # Start by creating temporary directories for the tests... # echo "Creating directories for test..." rm -rf $BASE mkdir $BASE mkdir $BASE/bin mkdir $BASE/bin/backend mkdir $BASE/bin/driver mkdir $BASE/bin/filter mkdir $BASE/cache mkdir $BASE/certs mkdir $BASE/share mkdir $BASE/share/banners mkdir $BASE/share/drv mkdir $BASE/share/locale for file in $sys_datadir/locale/*/cups_*.po; do loc=`basename $file .po | cut -c 6-` mkdir $BASE/share/locale/$loc ln -s $file $BASE/share/locale/$loc done mkdir $BASE/share/data mkdir $BASE/share/mime mkdir $BASE/share/model mkdir $BASE/share/ppdc mkdir $BASE/interfaces mkdir $BASE/log mkdir $BASE/ppd mkdir $BASE/spool mkdir $BASE/spool/temp mkdir $BASE/ssl # # We copy the cupsd executable to break it off from the Debian/Ubuntu # package's AppArmor capsule, so that it can work with our test bed # directories # cp /usr/sbin/cupsd $BASE/bin/ ln -s $sys_serverbin/backend/dnssd $BASE/bin/backend ln -s $sys_serverbin/backend/http $BASE/bin/backend ln -s $sys_serverbin/backend/ipp $BASE/bin/backend ln -s ipp $BASE/bin/backend/ipps ln -s $sys_serverbin/backend/lpd $BASE/bin/backend ln -s $sys_serverbin/backend/mdns $BASE/bin/backend ln -s $sys_serverbin/backend/snmp $BASE/bin/backend ln -s $sys_serverbin/backend/socket $BASE/bin/backend ln -s $sys_serverbin/backend/usb $BASE/bin/backend ln -s $sys_serverbin/cgi-bin $BASE/bin ln -s $sys_serverbin/monitor $BASE/bin ln -s $sys_serverbin/notifier $BASE/bin ln -s $sys_serverbin/daemon $BASE/bin ln -s $sys_serverbin/filter/commandtops $BASE/bin/filter ln -s $sys_serverbin/filter/gziptoany $BASE/bin/filter ln -s $sys_serverbin/filter/pstops $BASE/bin/filter ln -s $sys_serverbin/filter/rastertoepson $BASE/bin/filter ln -s $sys_serverbin/filter/rastertohp $BASE/bin/filter ln -s $sys_serverbin/filter/rastertolabel $BASE/bin/filter ln -s $sys_serverbin/filter/rastertopwg $BASE/bin/filter cat >$BASE/share/banners/standard <$BASE/share/banners/classified <$BASE/cupsd.conf < Order Allow,Deny WebInterface yes EOF cat >$BASE/cups-files.conf <>$BASE/printers.conf < Accepting Yes DeviceURI file:/dev/null Info Test PS printer $i JobSheets none none Location CUPS test suite State Idle StateMessage Printer $1 is idle. EOF cp testpdf.ppd $BASE/ppd/printer-$i.ppd i=`expr $i + 1` done if test -f $BASE/printers.conf; then cp $BASE/printers.conf $BASE/printers.conf.orig else touch $BASE/printers.conf.orig fi # # Create a helper script to run programs with... # echo "Setting up environment variables for test..." if test "x$ASAN_OPTIONS" = x; then # AddressSanitizer on Linux reports memory leaks from the main function # which is basically useless - in general, programs do not need to free # every object before exit since the OS will recover the process's # memory. ASAN_OPTIONS="detect_leaks=false" export ASAN_OPTIONS fi # These get exported because they don't have side-effects... CUPS_DISABLE_APPLE_DEFAULT=yes; export CUPS_DISABLE_APPLE_DEFAULT CUPS_SERVER=localhost:$port; export CUPS_SERVER CUPS_SERVERROOT=$BASE; export CUPS_SERVERROOT CUPS_STATEDIR=$BASE; export CUPS_STATEDIR CUPS_DATADIR=$BASE/share; export CUPS_DATADIR IPP_PORT=$port; export IPP_PORT LOCALEDIR=$BASE/share/locale; export LOCALEDIR echo "Creating wrapper script..." runcups="$BASE/runcups"; export runcups echo "#!/bin/sh" >$runcups echo "# Helper script for running CUPS test instance." >>$runcups echo "" >>$runcups echo "# Set required environment variables..." >>$runcups echo "CUPS_DATADIR=\"$CUPS_DATADIR\"; export CUPS_DATADIR" >>$runcups echo "CUPS_SERVER=\"$CUPS_SERVER\"; export CUPS_SERVER" >>$runcups echo "CUPS_SERVERROOT=\"$CUPS_SERVERROOT\"; export CUPS_SERVERROOT" >>$runcups echo "CUPS_STATEDIR=\"$CUPS_STATEDIR\"; export CUPS_STATEDIR" >>$runcups echo "DYLD_INSERT_LIBRARIES=\"$DYLD_INSERT_LIBRARIES\"; export DYLD_INSERT_LIBRARIES" >>$runcups echo "DYLD_LIBRARY_PATH=\"$DYLD_LIBRARY_PATH\"; export DYLD_LIBRARY_PATH" >>$runcups # IPP_PORT=$port; export IPP_PORT echo "LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH\"; export LD_LIBRARY_PATH" >>$runcups echo "LD_PRELOAD=\"$LD_PRELOAD\"; export LD_PRELOAD" >>$runcups echo "LOCALEDIR=\"$LOCALEDIR\"; export LOCALEDIR" >>$runcups if test "x$CUPS_DEBUG_LEVEL" != x; then echo "CUPS_DEBUG_FILTER='$CUPS_DEBUG_FILTER'; export CUPS_DEBUG_FILTER" >>$runcups echo "CUPS_DEBUG_LEVEL=$CUPS_DEBUG_LEVEL; export CUPS_DEBUG_LEVEL" >>$runcups echo "CUPS_DEBUG_LOG='$CUPS_DEBUG_LOG'; export CUPS_DEBUG_LOG" >>$runcups fi echo "" >>$runcups echo "# Run command..." >>$runcups echo "exec \"\$@\"" >>$runcups chmod +x $runcups # # Set a new home directory to avoid getting user options mixed in and for CPDB # not complain about missing directory for saving configuration... # HOME=$BASE export HOME XDG_CONFIG_HOME=${BASE}/.config export XDG_CONFIG_HOME mkdir ${BASE}/.config # # Force POSIX locale for tests... # LANG=C export LANG LC_MESSAGES=C export LC_MESSAGES # # Start the CUPS server; run as foreground daemon in the background... # echo "Starting cupsd:" echo " $runcups $BASE/bin/cupsd -c $BASE/cupsd.conf -f >$BASE/log/cupsd_debug_log 2>&1 &" echo "" $runcups $BASE/bin/cupsd -c $BASE/cupsd.conf -f >$BASE/log/cupsd_debug_log 2>&1 & cupsd=$! if (test "x$cupsd" != "x"); then echo "cupsd is PID $cupsd." echo "" fi sleep 2 # # Fire up the CPDB CUPS backend # BACKEND=./cups # Directory for job transfer sockets mkdir $BASE/cpdb mkdir $BASE/cpdb/sockets # Create the log file BACKEND_LOG=$BASE/log/backend_log rm -f $BACKEND_LOG touch $BACKEND_LOG # Debug logging for CPDB export CPDB_DEBUG_LEVEL=debug echo "Starting CPDB CUPS backend:" echo " $runcups $BACKEND >$BACKEND_LOG 2>&1 &" echo "" $runcups $BACKEND >$BACKEND_LOG 2>&1 & BACKEND_PID=$! if (test "x$BACKEND_PID" != "x"); then echo "CPDB CUPS backend is PID $BACKEND_PID." echo "" fi # # Run the test frontend and feed in commands. # FRONTEND=cpdb-text-frontend QUEUE=printer-1 FILE_TO_PRINT=/usr/share/cups/data/default-testpage.pdf # Set default page size to Envelope #10 $runcups lpadmin -p $QUEUE -o PageSize=Env10 # Disable queue to hold output file in spool directory $runcups cupsdisable $QUEUE # Create the log file FRONTEND_LOG=$BASE/log/frontend_log rm -f $FRONTEND_LOG touch $FRONTEND_LOG echo "Starting CPDB CUPS frontend:" echo " $FRONTEND > $FRONTEND_LOG 2>&1 &" echo "" ( \ sleep 5; \ echo get-all-options $QUEUE CUPS; \ sleep 2; \ echo print-file $FILE_TO_PRINT $QUEUE CUPS; \ sleep 3; \ echo stop \ ) | $FRONTEND > $FRONTEND_LOG 2>&1 & FRONTEND_PID=$! if (test "x$FRONTEND_PID" != "x"); then echo "CPDB frontend is PID $FRONTEND_PID." echo "" fi # # Give the frontend a maximum of 15 seconds to run and then kill it, to avoid # the script getting stuck if stopping the frontend fails. # i=0 while kill -0 $FRONTEND_PID >/dev/null 2>&1; do i=$((i+1)) if test $i -ge 15; then kill -KILL $FRONTEND_PID >/dev/null 2>&1 || true FRONTEND_PID= echo "FAIL: Frontend keeps running!" exit 1 fi sleep 1 done FRONTEND_PID= # # Stop the backend # if kill -0 $BACKEND_PID >/dev/null 2>&1; then kill -TERM $BACKEND_PID # Give the backend a maximum of 3 seconds to shut down and then kill it, # to avoid the script getting stuck if shutdown fails. i=0 while kill -0 $BACKEND_PID >/dev/null 2>&1; do i=$((i+1)) if test $i -ge 3; then kill -KILL $BACKEND_PID >/dev/null 2>&1 || true BACKEND_PID= echo "FAIL: Backend did not shut down!" exit 1 fi sleep 1 done fi BACKEND_PID= # # Check log for test results # # Does the printer appear in the initial list of available printers? echo "Initial listing of the printer:" if ! grep '^Printer '$QUEUE'$' $FRONTEND_LOG; then echo "FAIL: CUPS queue $QUEUE not listed!" exit 1 fi echo # Does the attribute "printer-resolution" appear in the list of options? echo "Attribute listing of \"printer-resolution\":" if ! grep 'printer-resolution' $FRONTEND_LOG; then echo "FAIL: Attribute \"printer-resolution\" not listed!" exit 1 fi echo # Does the attribute "print-color-mode" appear in the list of options? echo "Attribute listing of \"print-color-mode\":" if ! grep 'print-color-mode' $FRONTEND_LOG; then echo "FAIL: Attribute \"print-color-mode\" not listed!" exit 1 fi echo # Does the setting "na_number-10_4.125x9.5in" appear as a default setting? echo "\"na_number-10_4.125x9.5in\" as a default setting:" if ! grep 'DEFAULT: *na_number-10_4.125x9.5in' $FRONTEND_LOG; then echo "FAIL: Setting \"na_number-10_4.125x9.5in\" not listed as default!" exit 1 fi echo # Did the successful submission of a print job get confirmed? echo "Confirmation message for job submission:" if ! grep -i 'Document send succeeded' $BACKEND_LOG; then echo "FAIL: No confirmation of job submission!" exit 1 fi echo # # Tests successfully completed # echo "SUCCESS: All tests were successful." echo "" RES=0 exit $RES cpdb-backend-cups-2.0b7/src/test.convs0000664000175000017500000000014314755604632013366 # pdftopdf filter of cups-filters 1.x or 2.x application/pdf application/vnd.cups-pdf 100 pdftopdf cpdb-backend-cups-2.0b7/src/backend_helper.h0000664000175000017500000002342714755604632014446 #ifndef _BACKEND_HELPER_H #define _BACKEND_HELPER_H #include #include #include #include #include #include #include #include /* For cups-notifier */ #define NOTIFY_LEASE_DURATION (24 * 60 * 60) #define CUPS_DBUS_PATH "/org/cups/cupsd/Notifier" /* New Debug macros */ #define BACKEND_NAME "CUPS" #define logdebug(...) cpdbBDebugPrintf(CPDB_DEBUG_LEVEL_DEBUG, BACKEND_NAME, __VA_ARGS__) #define loginfo(...) cpdbBDebugPrintf(CPDB_DEBUG_LEVEL_INFO, BACKEND_NAME, __VA_ARGS__) #define logwarn(...) cpdbBDebugPrintf(CPDB_DEBUG_LEVEL_WARN, BACKEND_NAME, __VA_ARGS__) #define logerror(...) cpdbBDebugPrintf(CPDB_DEBUG_LEVEL_ERROR, BACKEND_NAME, __VA_ARGS__) /* Old debug macros */ #define INFO 3 #define WARN 2 #define ERR 1 #define MSG_LOG_LEVEL INFO /** * Represents a CUPS Printer */ typedef struct _PrinterCUPS { char *name; cups_dest_t *dest; http_t *http; cups_dinfo_t *dinfo; char *stream_socket_path; } PrinterCUPS; /** * Represents a frontend instance that the backend is associated with */ typedef struct _Dialog { int cancel; gboolean hide_remote; gboolean hide_temp; GHashTable *printers; gboolean keep_alive; } Dialog; typedef struct _Mappings { GHashTable *media; GHashTable *color; GHashTable *print_quality; const char *orientation[10]; const char *state[6]; } Mappings; /** * Represents the CUPS Backend */ typedef struct _BackendObj { GDBusConnection *dbus_connection; PrintBackend *skeleton; char *obj_path; /** the hash table to map from dialog name(char*) to the Dialog struct(Dialog*) **/ GHashTable *dialogs; int num_frontends; char *default_printer; } BackendObj; /** * Represents a single 'option' for a printer */ typedef struct _Option { char *option_name; int num_supported; char **supported_values; char *default_value; } Option; /** * Represents a single 'media' size for a printer and supported margins */ typedef struct _Media { char *name; int width; int length; int num_margins; int (*margins)[4]; /** int margins[num_margins][4]; left(0), right(1), top(2), bottom(3) **/ } Media; typedef struct _PrintDataThreadData { PrinterCUPS *printer; int num_options; cups_option_t *options; int socket_fd; struct sockaddr_un server_addr; } PrintDataThreadData; typedef struct _AddressList { char ipstr[INET6_ADDRSTRLEN]; int family; } AddressList; /********Backend related functions*******************/ /** Get a printer name for a CUPS destination. * This takes into account the destinations instance name, if any. */ char *get_printer_name_for_cups_dest(const cups_dest_t *dest); /** Get a new BackendObj **/ BackendObj *get_new_BackendObj(); /** Get the printer-id of the default printer of the CUPS Backend**/ char *get_default_printer(BackendObj *b); /** Connect the BackendObj to the dbus **/ void connect_to_dbus(BackendObj *, char *obj_path); /** Add the dialog to the list of dialogs of the particular backend**/ void add_frontend(BackendObj *, const char *dialog_name); /** Remove the dialog from the list of frontends that this backend is * associated with. */ void remove_frontend(BackendObj *, const char *dialog_name); /** Checks if the backend isn't associated with any frontend **/ gboolean no_frontends(BackendObj *); /** * Find the dialog with the specified name */ Dialog* find_dialog(BackendObj * , const char* dialog_name); /** Get the variable which controls the cancellation of the enumeration thread for * that particular dialog */ int *get_dialog_cancel(BackendObj *, const char *dialog_name); void set_dialog_cancel(BackendObj *, const char *dialog_name); //make cancel = 0 void reset_dialog_cancel(BackendObj *, const char *dialog_name); //make cancel = 1 /** Returns whether remote CUPS printers are hidden for this dialog **/ gboolean get_hide_remote(BackendObj *b, const char *dialog_name); /** Hides remote CUPS printers for the dialog **/ void set_hide_remote_printers(BackendObj *, const char *dialog_name); /** Unhides remote CUPS Printers for the dialog **/ void unset_hide_remote_printers(BackendObj *, const char *dialog_name); /** Returns whether temporary CUPS Queues(discovered, but not set up) are hidden for this dialog **/ gboolean get_hide_temp(BackendObj *b, const char *dialog_name); /** Hides temporary CUPS queues for the dialog **/ void set_hide_temp_printers(BackendObj *, const char *dialog_name); /** Unhides temporary CUPS queues for the dialog **/ void unset_hide_temp_printers(BackendObj *, const char *dialog_name); /** Utility functions for subscribing to CUPS for notifications*/ int create_subscription (); gboolean renew_subscription (int id); gboolean renew_subscription_timeout(gpointer userdata); void cancel_subscription (int id); /** * Returns * TRUE if the printer with specified name is found for the dialog * FALSE otherwise */ gboolean dialog_contains_printer(BackendObj *, const char *dialog_name, const char *printer_name); /** * Adds the corresponding CUPS printer to the dialog's printer list * * Returns * the PrinterCUPS* struct added to the dialog * NULL if the operation was unsuccesful */ PrinterCUPS *add_printer_to_dialog(BackendObj *, const char *dialog_name, const cups_dest_t *dest); /** * Removes the printer with the specified name from the dialog's list of printers */ void remove_printer_from_dialog(BackendObj *, const char *dialog_name, const char *printer_name); void send_printer_state_changed_signal(BackendObj *b, const char *dialog_name, const char *printer_name, const char *printer_state, gboolean printer_is_accepting_jobs); void send_printer_added_signal(BackendObj *b, const char *dialog_name, cups_dest_t *dest); void send_printer_removed_signal(BackendObj *b, const char *dialog_name, const char *printer_name); void notify_removed_printers(BackendObj *b, const char *dialog_name, GHashTable *new_table); void notify_added_printers(BackendObj *b, const char *dialog_name, GHashTable *new_table); void replace_printers(BackendObj *b, const char *dialog_name, GHashTable *new_table); void refresh_printer_list(BackendObj *b, const char *dialog_name); GHashTable *get_dialog_printers(BackendObj *b, const char *dialog_name); cups_dest_t *get_dest_by_name(BackendObj *b, const char *dialog_name, const char *printer_name); PrinterCUPS *get_printer_by_name(BackendObj *b, const char *dialog_name, const char *printer_name); /*********Printer related functions******************/ /** Get a new PrinterCUPS struct associated with the cups destination**/ PrinterCUPS *get_new_PrinterCUPS(const cups_dest_t *dest); /** Free up the memory used by the struct **/ void free_PrinterCUPS(PrinterCUPS *); /** Ensure that we have a connection the server**/ gboolean ensure_printer_connection(PrinterCUPS *p); /** * Get state of the printer * state is one of the following {"idle" , "processing" , "stopped"} */ const char *get_printer_state(PrinterCUPS *p); char *get_orientation_default(PrinterCUPS *p); char *get_default(PrinterCUPS *p, char *option_name); int get_supported(PrinterCUPS *p, char ***supported_values, const char *option_name); int get_job_creation_attributes(PrinterCUPS *p, char ***values); int get_all_options(PrinterCUPS *p, Option **options); int get_all_media(PrinterCUPS *p, Media **medias); int add_media_to_options(PrinterCUPS *p, Media *medias, int media_count, Option **options, int count); static void *print_data_thread(void *data); void print_socket(PrinterCUPS *p, int num_settings, GVariant *settings, char *job_id_str, char *socket_path, const char *title); gboolean checkRemote(const char *uri); char *extractHostFromURI(const char *uri); /** * Get translation of choice name for a given locale */ char *get_option_translation(PrinterCUPS *p, const char *option_name, const char *locale); /** * Get translation of option name for a given locale */ char *get_choice_translation(PrinterCUPS *p, const char *option_name, const char *choice_name, const char *locale); /** * Get translations for all printer strings */ GVariant *get_printer_translations(PrinterCUPS *p, const char *locale); void tryPPD(PrinterCUPS *p); /**********Dialog related funtions ****************/ Dialog *get_new_Dialog(); void free_Dialog(Dialog *); /*********Option related functions*****************/ void print_option(const Option *opt); void free_options(int count, Option *opts); void unpack_option_array(GVariant *var, int num_options, Option **options); GVariant *pack_option(const Option *opt); GVariant *pack_media(const Media *media); /**********Mapping related functions*****************/ Mappings *get_new_Mappings(); /*************CUPS/IPP RELATED FUNCTIONS******************/ const char *cups_printer_state(cups_dest_t *dest); gboolean cups_is_accepting_jobs(cups_dest_t *dest); void cups_get_Resolution(cups_dest_t *dest, int *xres, int *yres); GHashTable *cups_get_all_printers(); GHashTable *cups_get_local_printers(); char *cups_retrieve_string(cups_dest_t *dest, const char *option_name); gboolean cups_is_temporary(cups_dest_t *dest); gboolean cups_is_remote(cups_dest_t *dest); GHashTable *cups_get_printers(gboolean notemp, gboolean noremote); char *extract_ipp_attribute(ipp_attribute_t *, int index, const char *option_name); char *extract_res_from_ipp(ipp_attribute_t *, int index); char *extract_string_from_ipp(ipp_attribute_t *attr, int index); char *extract_orientation_from_ipp(ipp_attribute_t *attr, int index); void print_job(cups_job_t *j); GVariant *pack_cups_job(cups_job_t job); char *translate_job_state(ipp_jstate_t); /***************Misc.** **********************/ /**error logging */ void MSG_LOG(const char *msg, int msg_level); void free_string(char *); void free_string_array(int count, char **arr); #endif cpdb-backend-cups-2.0b7/configure0000775000175000017500000057534314755604641012500 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.72 for cpdb-backend-cups 2.0b7. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case e in #( e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else case e in #( e) exitcode=1; echo positional parameters were not saved. ;; esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else case e in #( e) as_have_required=no ;; esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi ;; esac fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: https://github.com/OpenPrinting/cpdb-backend-cups/issues/ $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi ;; esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' t clear :clear s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='cpdb-backend-cups' PACKAGE_TARNAME='cpdb-backend-cups' PACKAGE_VERSION='2.0b7' PACKAGE_STRING='cpdb-backend-cups 2.0b7' PACKAGE_BUGREPORT='https://github.com/OpenPrinting/cpdb-backend-cups/issues/' PACKAGE_URL='https://github.com/OpenPrinting/cpdb-backend-cups' ac_unique_file="src/print_backend_cups.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS CPDB_BACKEND_DIR DBUS_SERVICES_DIR LIBOBJS host_os host_vendor host_cpu host build_os build_vendor build_cpu build GLIB_LIBS GLIB_CFLAGS GIOUNIX_LIBS GIOUNIX_CFLAGS GIO_LIBS GIO_CFLAGS LIBCUPSFILTERS_LIBS LIBCUPSFILTERS_CFLAGS CPDB_LIBS CPDB_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR CPDB_CFLAGS CPDB_LIBS LIBCUPSFILTERS_CFLAGS LIBCUPSFILTERS_LIBS GIO_CFLAGS GIO_LIBS GIOUNIX_CFLAGS GIOUNIX_LIBS GLIB_CFLAGS GLIB_LIBS DBUS_SERVICES_DIR CPDB_BACKEND_DIR' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: '$ac_option' Try '$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF 'configure' configures cpdb-backend-cups 2.0b7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, 'make install' will install all the files in '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify an installation prefix other than '$ac_default_prefix' using '--prefix', for instance '--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/cpdb-backend-cups] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of cpdb-backend-cups 2.0b7:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path CPDB_CFLAGS C compiler flags for CPDB, overriding pkg-config CPDB_LIBS linker flags for CPDB, overriding pkg-config LIBCUPSFILTERS_CFLAGS C compiler flags for LIBCUPSFILTERS, overriding pkg-config LIBCUPSFILTERS_LIBS linker flags for LIBCUPSFILTERS, overriding pkg-config GIO_CFLAGS C compiler flags for GIO, overriding pkg-config GIO_LIBS linker flags for GIO, overriding pkg-config GIOUNIX_CFLAGS C compiler flags for GIOUNIX, overriding pkg-config GIOUNIX_LIBS linker flags for GIOUNIX, overriding pkg-config GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config DBUS_SERVICES_DIR value of session_bus_services_dir for dbus-1, overriding pkg-config CPDB_BACKEND_DIR value of cpdb_backend_exec_dir for cpdb, overriding pkg-config Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . cpdb-backend-cups home page: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF cpdb-backend-cups configure 2.0b7 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) eval "$3=yes" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that # executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status ;; esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by cpdb-backend-cups $as_me 2.0b7, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See 'config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); static char *e (char **p, int i) { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* C89 style stringification. */ #define noexpand_stringify(a) #a const char *stringified = noexpand_stringify(arbitrary+token=sequence); /* C89 style token pasting. Exercises some of the corner cases that e.g. old MSVC gets wrong, but not very hard. */ #define noexpand_concat(a,b) a##b #define expand_concat(a,b) noexpand_concat(a,b) extern int vA; extern int vbee; #define aye A #define bee B int *pvA = &expand_concat(v,aye); int *pvbee = &noexpand_concat(v,bee); /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated as an "x". The following induces an error, until -std is added to get proper ANSI mode. Curiously \x00 != x always comes out true, for an array size at least. It is necessary to write \x00 == 0 to get something that is true only with -std. */ int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) '\''x'\'' int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' /* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif // See if C++-style comments work. #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Work around memory leak warnings. free (ia); // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' /* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" # Auxiliary files required by this configure script. ac_aux_files="config.guess config.sub compile missing install-sh" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}/build-aux" # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; esac fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. case $as_dir in #(( ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir ;; esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was 's,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ *'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS ;; esac fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use plain mkdir -p, # in the hope it doesn't have the bugs of ancient mkdir. MKDIR_P='mkdir -p' fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else case e in #( e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make ;; esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else case e in #( e) if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='cpdb-backend-cups' VERSION='2.0b7' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi : ${CFLAGS=""} # Check for a C compiler ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else case e in #( e) ac_file='' ;; esac fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See 'config.log' for more details" "$LINENO" 5; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will # work properly (i.e., refer to 'conftest.exe'), while it won't with # 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); if (!f) return 1; return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use '--host'. See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext \ conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else case e in #( e) ac_compiler_gnu=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else case e in #( e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 ;; esac fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Checks for backend library if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cpdb >= 2" >&5 printf %s "checking for cpdb >= 2... " >&6; } if test -n "$CPDB_CFLAGS"; then pkg_cv_CPDB_CFLAGS="$CPDB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cpdb >= 2\""; } >&5 ($PKG_CONFIG --exists --print-errors "cpdb >= 2") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CPDB_CFLAGS=`$PKG_CONFIG --cflags "cpdb >= 2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CPDB_LIBS"; then pkg_cv_CPDB_LIBS="$CPDB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cpdb >= 2\""; } >&5 ($PKG_CONFIG --exists --print-errors "cpdb >= 2") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CPDB_LIBS=`$PKG_CONFIG --libs "cpdb >= 2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CPDB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cpdb >= 2" 2>&1` else CPDB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cpdb >= 2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CPDB_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (cpdb >= 2) were not met: $CPDB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables CPDB_CFLAGS and CPDB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables CPDB_CFLAGS and CPDB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else CPDB_CFLAGS=$pkg_cv_CPDB_CFLAGS CPDB_LIBS=$pkg_cv_CPDB_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcupsfilters >= 2" >&5 printf %s "checking for libcupsfilters >= 2... " >&6; } if test -n "$LIBCUPSFILTERS_CFLAGS"; then pkg_cv_LIBCUPSFILTERS_CFLAGS="$LIBCUPSFILTERS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcupsfilters >= 2\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcupsfilters >= 2") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBCUPSFILTERS_CFLAGS=`$PKG_CONFIG --cflags "libcupsfilters >= 2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBCUPSFILTERS_LIBS"; then pkg_cv_LIBCUPSFILTERS_LIBS="$LIBCUPSFILTERS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcupsfilters >= 2\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcupsfilters >= 2") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBCUPSFILTERS_LIBS=`$PKG_CONFIG --libs "libcupsfilters >= 2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBCUPSFILTERS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcupsfilters >= 2" 2>&1` else LIBCUPSFILTERS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcupsfilters >= 2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBCUPSFILTERS_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libcupsfilters >= 2) were not met: $LIBCUPSFILTERS_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBCUPSFILTERS_CFLAGS and LIBCUPSFILTERS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBCUPSFILTERS_CFLAGS and LIBCUPSFILTERS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else LIBCUPSFILTERS_CFLAGS=$pkg_cv_LIBCUPSFILTERS_CFLAGS LIBCUPSFILTERS_LIBS=$pkg_cv_LIBCUPSFILTERS_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gio-2.0" >&5 printf %s "checking for gio-2.0... " >&6; } if test -n "$GIO_CFLAGS"; then pkg_cv_GIO_CFLAGS="$GIO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GIO_LIBS"; then pkg_cv_GIO_LIBS="$GIO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0" 2>&1` else GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GIO_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gio-2.0) were not met: $GIO_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GIO_CFLAGS and GIO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GIO_CFLAGS and GIO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else GIO_CFLAGS=$pkg_cv_GIO_CFLAGS GIO_LIBS=$pkg_cv_GIO_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gio-unix-2.0" >&5 printf %s "checking for gio-unix-2.0... " >&6; } if test -n "$GIOUNIX_CFLAGS"; then pkg_cv_GIOUNIX_CFLAGS="$GIOUNIX_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-unix-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GIOUNIX_CFLAGS=`$PKG_CONFIG --cflags "gio-unix-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GIOUNIX_LIBS"; then pkg_cv_GIOUNIX_LIBS="$GIOUNIX_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-unix-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GIOUNIX_LIBS=`$PKG_CONFIG --libs "gio-unix-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-unix-2.0" 2>&1` else GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-unix-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GIOUNIX_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gio-unix-2.0) were not met: $GIOUNIX_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GIOUNIX_CFLAGS and GIOUNIX_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GIOUNIX_CFLAGS and GIOUNIX_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else GIOUNIX_CFLAGS=$pkg_cv_GIOUNIX_CFLAGS GIOUNIX_LIBS=$pkg_cv_GIOUNIX_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glib-2.0" >&5 printf %s "checking for glib-2.0... " >&6; } if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0" 2>&1` else GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glib-2.0) were not met: $GLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi # Checks for header files. ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes then : printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes then : printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "cups/cups.h" "ac_cv_header_cups_cups_h" "$ac_includes_default" if test "x$ac_cv_header_cups_cups_h" = xyes then : printf "%s\n" "#define HAVE_CUPS_CUPS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "cupsfilters/catalog.h" "ac_cv_header_cupsfilters_catalog_h" "$ac_includes_default" if test "x$ac_cv_header_cupsfilters_catalog_h" = xyes then : printf "%s\n" "#define HAVE_CUPSFILTERS_CATALOG_H 1" >>confdefs.h fi # Checks for typedefs, structures, and compiler characteristics. ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes then : else case e in #( e) printf "%s\n" "#define size_t unsigned int" >>confdefs.h ;; esac fi # Checks for library functions # Make sure we can run config.sub. $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 printf %s "checking for GNU libc compatible malloc... " >&6; } if test ${ac_cv_func_malloc_0_nonnull+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ | hpux* | solaris* | cygwin* | mingw* | windows* | msys* ) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_malloc_0_nonnull=no ;; esac else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { void *p = malloc (0); int result = !p; free (p); return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_malloc_0_nonnull=yes else case e in #( e) ac_cv_func_malloc_0_nonnull=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes then : printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h else case e in #( e) printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h ;; esac fi # The Dbus service directory { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dbus service file path" >&5 printf %s "checking dbus service file path... " >&6; } if test -n "$DBUS_SERVICES_DIR"; then pkg_cv_DBUS_SERVICES_DIR="$DBUS_SERVICES_DIR" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5 ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DBUS_SERVICES_DIR=`$PKG_CONFIG --variable="session_bus_services_dir" "dbus-1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi DBUS_SERVICES_DIR=$pkg_cv_DBUS_SERVICES_DIR if test "x$DBUS_SERVICES_DIR" = x"" then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot locate session_bus_services_dir See 'config.log' for more details" "$LINENO" 5; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DBUS_SERVICES_DIR" >&5 printf "%s\n" "$DBUS_SERVICES_DIR" >&6; } ;; esac fi # The directory for the backend executables { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CPDB backend executables path" >&5 printf %s "checking CPDB backend executables path... " >&6; } if test -n "$CPDB_BACKEND_DIR"; then pkg_cv_CPDB_BACKEND_DIR="$CPDB_BACKEND_DIR" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cpdb\""; } >&5 ($PKG_CONFIG --exists --print-errors "cpdb") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CPDB_BACKEND_DIR=`$PKG_CONFIG --variable="cpdb_backend_exec_dir" "cpdb" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi CPDB_BACKEND_DIR=$pkg_cv_CPDB_BACKEND_DIR if test "x$CPDB_BACKEND_DIR" = x"" then : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot locate cpdb_backend_exec_dir See 'config.log' for more details" "$LINENO" 5; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPDB_BACKEND_DIR" >&5 printf "%s\n" "$CPDB_BACKEND_DIR" >&6; } ;; esac fi ac_config_files="$ac_config_files Makefile src/Makefile data/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # 'ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[][ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by cpdb-backend-cups $as_me 2.0b7, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ '$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to . cpdb-backend-cups home page: ." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ cpdb-backend-cups config.status 2.0b7 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: '$1' Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See 'config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi cpdb-backend-cups-2.0b7/configure.ac0000664000175000017500000000304714755604632013042 # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([cpdb-backend-cups], [2.0b7], [https://github.com/OpenPrinting/cpdb-backend-cups/issues/], [cpdb-backend-cups], [https://github.com/OpenPrinting/cpdb-backend-cups]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/print_backend_cups.c]) AM_INIT_AUTOMAKE([-Wall dist-xz dist-bzip2 foreign]) : ${CFLAGS=""} # Check for a C compiler AC_PROG_CC # Checks for backend library PKG_CHECK_MODULES([CPDB],[cpdb >= 2]) PKG_CHECK_MODULES([LIBCUPSFILTERS], [libcupsfilters >= 2]) PKG_CHECK_MODULES([GIO],[gio-2.0]) PKG_CHECK_MODULES([GIOUNIX],[gio-unix-2.0]) PKG_CHECK_MODULES([GLIB],[glib-2.0]) # Checks for header files. AC_CHECK_HEADERS([stdlib.h string.h cups/cups.h cupsfilters/catalog.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T # Checks for library functions AC_FUNC_MALLOC # The Dbus service directory AC_MSG_CHECKING([dbus service file path]) PKG_CHECK_VAR([DBUS_SERVICES_DIR], [dbus-1], [session_bus_services_dir], AC_MSG_RESULT($DBUS_SERVICES_DIR), AC_MSG_FAILURE([cannot locate session_bus_services_dir]) ) # The directory for the backend executables AC_MSG_CHECKING([CPDB backend executables path]) PKG_CHECK_VAR([CPDB_BACKEND_DIR], [cpdb], [cpdb_backend_exec_dir], AC_MSG_RESULT($CPDB_BACKEND_DIR), AC_MSG_FAILURE([cannot locate cpdb_backend_exec_dir]) ) AC_CONFIG_FILES([Makefile src/Makefile data/Makefile]) AC_OUTPUT cpdb-backend-cups-2.0b7/autogen.sh0000775000175000017500000000012614755604632012550 #! /bin/sh mkdir -p build-aux \ && aclocal \ && automake --add-missing \ && autoconf cpdb-backend-cups-2.0b7/build-aux/0000775000175000017500000000000014755604654012526 5cpdb-backend-cups-2.0b7/build-aux/test-driver0000755000175000017500000001141714556763366014653 #! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2018-03-07.03; # UTC # Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <"$log_file" "$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: cpdb-backend-cups-2.0b7/build-aux/config.guess0000755000175000017500000014051214175772605014765 #! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2022 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2022-01-09' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi # Just in case it came from the environment. GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break fi done if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac } # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu #else #include /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl #endif #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl; then LIBC=musl fi # If the system lacks a compiler, then just pick glibc. # We could probably try harder. if [ "$LIBC" = unknown ]; then LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case $UNAME_VERSION in Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. GUESS=$machine-${os}${release}${abi-} ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE ;; *:SecBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE ;; *:MidnightBSD:*:*) GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE ;; *:ekkoBSD:*:*) GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE ;; *:SolidBSD:*:*) GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE ;; *:OS108:*:*) GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE ;; macppc:MirBSD:*:*) GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE ;; *:MirBSD:*:*) GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE ;; *:Sortix:*:*) GUESS=$UNAME_MACHINE-unknown-sortix ;; *:Twizzler:*:*) GUESS=$UNAME_MACHINE-unknown-twizzler ;; *:Redox:*:*) GUESS=$UNAME_MACHINE-unknown-redox ;; mips:OSF1:*.*) GUESS=mips-dec-osf1 ;; alpha:OSF1:*:*) # Reset EXIT trap before exiting to avoid spurious non-zero exit code. trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` GUESS=$UNAME_MACHINE-dec-osf$OSF_REL ;; Amiga*:UNIX_System_V:4.0:*) GUESS=m68k-unknown-sysv4 ;; *:[Aa]miga[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-amigaos ;; *:[Mm]orph[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-morphos ;; *:OS/390:*:*) GUESS=i370-ibm-openedition ;; *:z/VM:*:*) GUESS=s390-ibm-zvmoe ;; *:OS400:*:*) GUESS=powerpc-ibm-os400 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) GUESS=arm-acorn-riscix$UNAME_RELEASE ;; arm*:riscos:*:*|arm*:RISCOS:*:*) GUESS=arm-unknown-riscos ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) GUESS=hppa1.1-hitachi-hiuxmpp ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. case `(/bin/universe) 2>/dev/null` in att) GUESS=pyramid-pyramid-sysv3 ;; *) GUESS=pyramid-pyramid-bsd ;; esac ;; NILE*:*:*:dcosx) GUESS=pyramid-pyramid-svr4 ;; DRS?6000:unix:4.0:6*) GUESS=sparc-icl-nx6 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) GUESS=sparc-icl-nx7 ;; esac ;; s390x:SunOS:*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL ;; sun4H:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-hal-solaris2$SUN_REL ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris2$SUN_REL ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) GUESS=i386-pc-auroraux$UNAME_RELEASE ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$SUN_ARCH-pc-solaris2$SUN_REL ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris3$SUN_REL ;; sun4*:SunOS:*:*) case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; sun3*:SunOS:*:*) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case `/bin/arch` in sun3) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac ;; aushp:SunOS:*:*) GUESS=sparc-auspex-sunos$UNAME_RELEASE ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) GUESS=m68k-milan-mint$UNAME_RELEASE ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) GUESS=m68k-hades-mint$UNAME_RELEASE ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) GUESS=m68k-unknown-mint$UNAME_RELEASE ;; m68k:machten:*:*) GUESS=m68k-apple-machten$UNAME_RELEASE ;; powerpc:machten:*:*) GUESS=powerpc-apple-machten$UNAME_RELEASE ;; RISC*:Mach:*:*) GUESS=mips-dec-mach_bsd4.3 ;; RISC*:ULTRIX:*:*) GUESS=mips-dec-ultrix$UNAME_RELEASE ;; VAX*:ULTRIX*:*:*) GUESS=vax-dec-ultrix$UNAME_RELEASE ;; 2020:CLIX:*:* | 2430:CLIX:*:*) GUESS=clipper-intergraph-clix$UNAME_RELEASE ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } GUESS=mips-mips-riscos$UNAME_RELEASE ;; Motorola:PowerMAX_OS:*:*) GUESS=powerpc-motorola-powermax ;; Motorola:*:4.3:PL8-*) GUESS=powerpc-harris-powermax ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) GUESS=powerpc-harris-powermax ;; Night_Hawk:Power_UNIX:*:*) GUESS=powerpc-harris-powerunix ;; m88k:CX/UX:7*:*) GUESS=m88k-harris-cxux7 ;; m88k:*:4*:R4*) GUESS=m88k-motorola-sysv4 ;; m88k:*:3*:R3*) GUESS=m88k-motorola-sysv3 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then GUESS=m88k-dg-dgux$UNAME_RELEASE else GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else GUESS=i586-dg-dgux$UNAME_RELEASE fi ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) GUESS=m88k-dolphin-sysv3 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 GUESS=m88k-motorola-sysv3 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) GUESS=m88k-tektronix-sysv3 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) GUESS=m68k-tektronix-bsd ;; *:IRIX*:*:*) IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` GUESS=mips-sgi-irix$IRIX_REL ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) GUESS=i386-ibm-aix ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then GUESS=$SYSTEM_NAME else GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then GUESS=rs6000-ibm-aix3.2.4 else GUESS=rs6000-ibm-aix3.2 fi ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$IBM_ARCH-ibm-aix$IBM_REV ;; *:AIX:*:*) GUESS=rs6000-ibm-aix ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) GUESS=romp-ibm-bsd4.4 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) GUESS=rs6000-bull-bosx ;; DPX/2?00:B.O.S.:*:*) GUESS=m68k-bull-sysv3 ;; 9000/[34]??:4.3bsd:1.*:*) GUESS=m68k-hp-bsd ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) GUESS=m68k-hp-bsd4.4 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if test "$HP_ARCH" = hppa2.0w then set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi GUESS=$HP_ARCH-hp-hpux$HPUX_REV ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` GUESS=ia64-hp-hpux$HPUX_REV ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } GUESS=unknown-hitachi-hiuxwe2 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) GUESS=hppa1.1-hp-bsd ;; 9000/8??:4.3bsd:*:*) GUESS=hppa1.0-hp-bsd ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) GUESS=hppa1.0-hp-mpeix ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) GUESS=hppa1.1-hp-osf ;; hp8??:OSF1:*:*) GUESS=hppa1.0-hp-osf ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then GUESS=$UNAME_MACHINE-unknown-osf1mk else GUESS=$UNAME_MACHINE-unknown-osf1 fi ;; parisc*:Lites*:*:*) GUESS=hppa1.1-hp-lites ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) GUESS=c1-convex-bsd ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) GUESS=c34-convex-bsd ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) GUESS=c38-convex-bsd ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) GUESS=c4-convex-bsd ;; CRAY*Y-MP:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=ymp-cray-unicos$CRAY_REL ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=t90-cray-unicos$CRAY_REL ;; CRAY*T3E:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=alphaev5-cray-unicosmk$CRAY_REL ;; CRAY*SV1:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=sv1-cray-unicos$CRAY_REL ;; *:UNICOS/mp:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=craynv-cray-unicosmp$CRAY_REL ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE ;; sparc*:BSD/OS:*:*) GUESS=sparc-unknown-bsdi$UNAME_RELEASE ;; *:BSD/OS:*:*) GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL ;; i*:CYGWIN*:*) GUESS=$UNAME_MACHINE-pc-cygwin ;; *:MINGW64*:*) GUESS=$UNAME_MACHINE-pc-mingw64 ;; *:MINGW*:*) GUESS=$UNAME_MACHINE-pc-mingw32 ;; *:MSYS*:*) GUESS=$UNAME_MACHINE-pc-msys ;; i*:PW*:*) GUESS=$UNAME_MACHINE-pc-pw32 ;; *:SerenityOS:*:*) GUESS=$UNAME_MACHINE-pc-serenity ;; *:Interix*:*) case $UNAME_MACHINE in x86) GUESS=i586-pc-interix$UNAME_RELEASE ;; authenticamd | genuineintel | EM64T) GUESS=x86_64-unknown-interix$UNAME_RELEASE ;; IA64) GUESS=ia64-unknown-interix$UNAME_RELEASE ;; esac ;; i*:UWIN*:*) GUESS=$UNAME_MACHINE-pc-uwin ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) GUESS=x86_64-pc-cygwin ;; prep*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=powerpcle-unknown-solaris2$SUN_REL ;; *:GNU:*:*) # the GNU system GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL ;; *:GNU/*:*:*) # other systems with GNU libc and userland GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi ;; avr32*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; cris:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; crisv32:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; e2k:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; frv:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; hexagon:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:Linux:*:*) GUESS=$UNAME_MACHINE-pc-linux-$LIBC ;; ia64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m68*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel #undef mips64 #undef mips64el #if ${IS_GLIBC} && defined(_ABI64) LIBCABI=gnuabi64 #else #if ${IS_GLIBC} && defined(_ABIN32) LIBCABI=gnuabin32 #else LIBCABI=${LIBC} #endif #endif #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa64r6 #else #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa32r6 #else #if defined(__mips64) CPU=mips64 #else CPU=mips #endif #endif #endif #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #endif #endif EOF cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; openrisc*:Linux:*:*) GUESS=or1k-unknown-linux-$LIBC ;; or32:Linux:*:* | or1k*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; padre:Linux:*:*) GUESS=sparc-unknown-linux-$LIBC ;; parisc64:Linux:*:* | hppa64:Linux:*:*) GUESS=hppa64-unknown-linux-$LIBC ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; *) GUESS=hppa-unknown-linux-$LIBC ;; esac ;; ppc64:Linux:*:*) GUESS=powerpc64-unknown-linux-$LIBC ;; ppc:Linux:*:*) GUESS=powerpc-unknown-linux-$LIBC ;; ppc64le:Linux:*:*) GUESS=powerpc64le-unknown-linux-$LIBC ;; ppcle:Linux:*:*) GUESS=powerpcle-unknown-linux-$LIBC ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; s390:Linux:*:* | s390x:Linux:*:*) GUESS=$UNAME_MACHINE-ibm-linux-$LIBC ;; sh64*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sh*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sparc:Linux:*:* | sparc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; tile*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; vax:Linux:*:*) GUESS=$UNAME_MACHINE-dec-linux-$LIBC ;; x86_64:Linux:*:*) set_cc_for_build LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null then LIBCABI=${LIBC}x32 fi fi GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. GUESS=i386-sequent-sysv4 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; i*86:XTS-300:*:STOP) GUESS=$UNAME_MACHINE-unknown-stop ;; i*86:atheos:*:*) GUESS=$UNAME_MACHINE-unknown-atheos ;; i*86:syllable:*:*) GUESS=$UNAME_MACHINE-pc-syllable ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) GUESS=i386-unknown-lynxos$UNAME_RELEASE ;; i*86:*DOS:*:*) GUESS=$UNAME_MACHINE-pc-msdosdjgpp ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv32 fi ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. GUESS=i586-pc-msdosdjgpp ;; Intel:Mach:3*:*) GUESS=i386-pc-mach3 ;; paragon:*:*:*) GUESS=i860-intel-osf1 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi ;; mini*:CTIX:SYS*5:*) # "miniframe" GUESS=m68010-convergent-sysv ;; mc68k:UNIX:SYSTEM5:3.51m) GUESS=m68k-convergent-sysv ;; M680?0:D-NIX:5.3:*) GUESS=m68k-diab-dnix ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) GUESS=m68k-unknown-lynxos$UNAME_RELEASE ;; mc68030:UNIX_System_V:4.*:*) GUESS=m68k-atari-sysv4 ;; TSUNAMI:LynxOS:2.*:*) GUESS=sparc-unknown-lynxos$UNAME_RELEASE ;; rs6000:LynxOS:2.*:*) GUESS=rs6000-unknown-lynxos$UNAME_RELEASE ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) GUESS=powerpc-unknown-lynxos$UNAME_RELEASE ;; SM[BE]S:UNIX_SV:*:*) GUESS=mips-dde-sysv$UNAME_RELEASE ;; RM*:ReliantUNIX-*:*:*) GUESS=mips-sni-sysv4 ;; RM*:SINIX-*:*:*) GUESS=mips-sni-sysv4 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` GUESS=$UNAME_MACHINE-sni-sysv4 else GUESS=ns32k-sni-sysv fi ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm GUESS=hppa1.1-stratus-sysv4 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. GUESS=i860-stratus-sysv4 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. GUESS=$UNAME_MACHINE-stratus-vos ;; *:VOS:*:*) # From Paul.Green@stratus.com. GUESS=hppa1.1-stratus-vos ;; mc68*:A/UX:*:*) GUESS=m68k-apple-aux$UNAME_RELEASE ;; news*:NEWS-OS:6*:*) GUESS=mips-sony-newsos6 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then GUESS=mips-nec-sysv$UNAME_RELEASE else GUESS=mips-unknown-sysv$UNAME_RELEASE fi ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. GUESS=powerpc-be-beos ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. GUESS=powerpc-apple-beos ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. GUESS=i586-pc-beos ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; x86_64:Haiku:*:*) GUESS=x86_64-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE ;; SX-5:SUPER-UX:*:*) GUESS=sx5-nec-superux$UNAME_RELEASE ;; SX-6:SUPER-UX:*:*) GUESS=sx6-nec-superux$UNAME_RELEASE ;; SX-7:SUPER-UX:*:*) GUESS=sx7-nec-superux$UNAME_RELEASE ;; SX-8:SUPER-UX:*:*) GUESS=sx8-nec-superux$UNAME_RELEASE ;; SX-8R:SUPER-UX:*:*) GUESS=sx8r-nec-superux$UNAME_RELEASE ;; SX-ACE:SUPER-UX:*:*) GUESS=sxace-nec-superux$UNAME_RELEASE ;; Power*:Rhapsody:*:*) GUESS=powerpc-apple-rhapsody$UNAME_RELEASE ;; *:Rhapsody:*:*) GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE ;; arm64:Darwin:*:*) GUESS=aarch64-apple-darwin$UNAME_RELEASE ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac if command -v xcode-select > /dev/null 2> /dev/null && \ ! xcode-select --print-path > /dev/null 2> /dev/null ; then # Avoid executing cc if there is no toolchain installed as # cc will be a stub that puts up a graphical alert # prompting the user to install developer tools. CC_FOR_BUILD=no_compiler_found else set_cc_for_build fi if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE ;; *:QNX:*:4*) GUESS=i386-pc-qnx ;; NEO-*:NONSTOP_KERNEL:*:*) GUESS=neo-tandem-nsk$UNAME_RELEASE ;; NSE-*:NONSTOP_KERNEL:*:*) GUESS=nse-tandem-nsk$UNAME_RELEASE ;; NSR-*:NONSTOP_KERNEL:*:*) GUESS=nsr-tandem-nsk$UNAME_RELEASE ;; NSV-*:NONSTOP_KERNEL:*:*) GUESS=nsv-tandem-nsk$UNAME_RELEASE ;; NSX-*:NONSTOP_KERNEL:*:*) GUESS=nsx-tandem-nsk$UNAME_RELEASE ;; *:NonStop-UX:*:*) GUESS=mips-compaq-nonstopux ;; BS2000:POSIX*:*:*) GUESS=bs2000-siemens-sysv ;; DS/*:UNIX_System_V:*:*) GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "${cputype-}" = 386; then UNAME_MACHINE=i386 elif test "x${cputype-}" != x; then UNAME_MACHINE=$cputype fi GUESS=$UNAME_MACHINE-unknown-plan9 ;; *:TOPS-10:*:*) GUESS=pdp10-unknown-tops10 ;; *:TENEX:*:*) GUESS=pdp10-unknown-tenex ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) GUESS=pdp10-dec-tops20 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) GUESS=pdp10-xkl-tops20 ;; *:TOPS-20:*:*) GUESS=pdp10-unknown-tops20 ;; *:ITS:*:*) GUESS=pdp10-unknown-its ;; SEI:*:*:SEIUX) GUESS=mips-sei-seiux$UNAME_RELEASE ;; *:DragonFly:*:*) DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case $UNAME_MACHINE in A*) GUESS=alpha-dec-vms ;; I*) GUESS=ia64-dec-vms ;; V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) GUESS=i386-pc-xenix ;; i*86:skyos:*:*) SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL ;; i*86:rdos:*:*) GUESS=$UNAME_MACHINE-pc-rdos ;; i*86:Fiwix:*:*) GUESS=$UNAME_MACHINE-pc-fiwix ;; *:AROS:*:*) GUESS=$UNAME_MACHINE-unknown-aros ;; x86_64:VMkernel:*:*) GUESS=$UNAME_MACHINE-unknown-esx ;; amd64:Isilon\ OneFS:*:*) GUESS=x86_64-unknown-onefs ;; *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; esac # Do we have a guess based on uname results? if test "x$GUESS" != x; then echo "$GUESS" exit fi # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" < #include #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #include #if defined(_SIZE_T_) || defined(SIGLOST) #include #endif #endif #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) #include #if defined (BSD) #if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); #else #if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); #else printf ("vax-dec-bsd\n"); exit (0); #endif #endif #else printf ("vax-dec-bsd\n"); exit (0); #endif #else #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname un; uname (&un); printf ("vax-dec-ultrix%s\n", un.release); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname *un; uname (&un); printf ("mips-dec-ultrix%s\n", un.release); exit (0); #else printf ("mips-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <&2 </dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF fi exit 1 # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: cpdb-backend-cups-2.0b7/build-aux/missing0000755000175000017500000001533614556763366014060 #! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: cpdb-backend-cups-2.0b7/build-aux/config.sub0000755000175000017500000010511614175772605014431 #! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2022 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2022-01-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 basic_os=$field2 ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | convergent* | ncr* | news | 32* | 3600* | 3100* \ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | ultra | tti* | harris | dolphin | highlevel | gould \ | cbm | ns | masscomp | apple | axis | knuth | cray \ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 basic_os= ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; convex-c1) basic_machine=c1-convex basic_os=bsd ;; convex-c2) basic_machine=c2-convex basic_os=bsd ;; convex-c32) basic_machine=c32-convex basic_os=bsd ;; convex-c34) basic_machine=c34-convex basic_os=bsd ;; convex-c38) basic_machine=c38-convex basic_os=bsd ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next case $basic_os in openstep*) ;; nextstep*) ;; ns2*) basic_os=nextstep2 ;; *) basic_os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x$basic_os != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. case $basic_os in gnu/linux*) kernel=linux os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=os2 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read kernel os <&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ | linux-musl* | linux-relibc* | linux-uclibc* ) ;; uclinux-uclibc* ) ;; -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 exit 1 ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; vxworks-simlinux | vxworks-simwindows | vxworks-spe) ;; nto-qnx*) ;; os2-emx) ;; *-eabi* | *-gnueabi*) ;; -*) # Blank kernel with real OS is always fine. ;; *-*) echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$os in *-riscix*) vendor=acorn ;; *-sunos*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: cpdb-backend-cups-2.0b7/build-aux/install-sh0000755000175000017500000003577614556763366014477 #!/bin/sh # install - install a program, script, or datafile scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 # Create dirs (including intermediate dirs) using mode 755. # This is like GNU 'install' as of coreutils 8.32 (2020). mkdir_umask=22 backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -p pass -p to $cpprog. -s $stripprog installed files. -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG By default, rm is invoked with -f; when overridden with RMPROG, it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. Email bug reports to bug-automake@gnu.org. Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -p) cpprog="$cpprog -p";; -s) stripcmd=$stripprog;; -S) backupsuffix="$2" shift;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? # Don't chown directories that already exist. if test $dstdir_status = 0; then chowncmd="" fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false # The $RANDOM variable is not portable (e.g., dash). Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap ' ret=$? rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null exit $ret ' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && { test -z "$stripcmd" || { # Create $dsttmp read-write so that cp doesn't create it read-only, # which would cause strip to fail. if test -z "$doit"; then : >"$dsttmp" # No need to fork-exec 'touch'. else $doit touch "$dsttmp" fi } } && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # If $backupsuffix is set, and the file being installed # already exists, attempt a backup. Don't worry if it fails, # e.g., if mv doesn't support -f. if test -n "$backupsuffix" && test -f "$dst"; then $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null fi # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: cpdb-backend-cups-2.0b7/build-aux/depcomp0000755000175000017500000005602014556763366014031 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: cpdb-backend-cups-2.0b7/build-aux/compile0000755000175000017500000001635014556763366014034 #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: cpdb-backend-cups-2.0b7/aclocal.m40000664000175000017500000015341214755604641012416 # generated automatically by aclocal 1.16.5 -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, [m4_warning([this file was generated for autoconf 2.72. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- # serial 12 (pkg-config-0.29.2) dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurrence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------ dnl dnl Prepare a "--with-" configure option using the lowercase dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and dnl PKG_CHECK_MODULES in a single macro. AC_DEFUN([PKG_WITH_MODULES], [ m4_pushdef([with_arg], m4_tolower([$1])) m4_pushdef([description], [m4_default([$5], [build with ]with_arg[ support])]) m4_pushdef([def_arg], [m4_default([$6], [auto])]) m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) m4_case(def_arg, [yes],[m4_pushdef([with_without], [--without-]with_arg)], [m4_pushdef([with_without],[--with-]with_arg)]) AC_ARG_WITH(with_arg, AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, [AS_TR_SH([with_]with_arg)=def_arg]) AS_CASE([$AS_TR_SH([with_]with_arg)], [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], [auto],[PKG_CHECK_MODULES([$1],[$2], [m4_n([def_action_if_found]) $3], [m4_n([def_action_if_not_found]) $4])]) m4_popdef([with_arg]) m4_popdef([description]) m4_popdef([def_arg]) ])dnl PKG_WITH_MODULES dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ----------------------------------------------- dnl dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES dnl check._[VARIABLE-PREFIX] is exported as make variable. AC_DEFUN([PKG_HAVE_WITH_MODULES], [ PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) AM_CONDITIONAL([HAVE_][$1], [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) ])dnl PKG_HAVE_WITH_MODULES dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------------------ dnl dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make dnl and preprocessor variable. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], [ PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES # Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl m4_ifdef([_$0_ALREADY_INIT], [m4_fatal([$0 expanded multiple times ]m4_defn([_$0_ALREADY_INIT]))], [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi AC_SUBST([CTAGS]) if test -z "$ETAGS"; then ETAGS=etags fi AC_SUBST([ETAGS]) if test -z "$CSCOPE"; then CSCOPE=cscope fi AC_SUBST([CSCOPE]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR cpdb-backend-cups-2.0b7/COPYING0000664000175000017500000000267414755604632011614 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: cpdb-backend-cups Upstream-Contact: OpenPrinting Source: https://github.com/OpenPrinting/cpdb-backend-cups/releases Files: * Copyright: 2017, Nilanjana Lodh 2017-2022, Till Kamppeter 2020, Priydarshi Singh 2022, Gaurav Guleria License: MIT License: MIT The MIT License . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. cpdb-backend-cups-2.0b7/Makefile.in0000664000175000017500000006122414755604641012622 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/build-aux/compile \ $(top_srcdir)/build-aux/config.guess \ $(top_srcdir)/build-aux/config.sub \ $(top_srcdir)/build-aux/install-sh \ $(top_srcdir)/build-aux/missing COPYING README.md \ build-aux/compile build-aux/config.guess build-aux/config.sub \ build-aux/install-sh build-aux/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz GZIP_ENV = --best DIST_TARGETS = dist-xz dist-bzip2 dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPDB_BACKEND_DIR = @CPDB_BACKEND_DIR@ CPDB_CFLAGS = @CPDB_CFLAGS@ CPDB_LIBS = @CPDB_LIBS@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SERVICES_DIR = @DBUS_SERVICES_DIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ GIOUNIX_CFLAGS = @GIOUNIX_CFLAGS@ GIOUNIX_LIBS = @GIOUNIX_LIBS@ GIO_CFLAGS = @GIO_CFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBCUPSFILTERS_CFLAGS = @LIBCUPSFILTERS_CFLAGS@ LIBCUPSFILTERS_LIBS = @LIBCUPSFILTERS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src data EXTRA_DIST = \ README.md \ autogen.sh \ LICENSE.md \ COPYING \ CHANGES.md all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ dist-zstd distcheck distclean distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: cpdb-backend-cups-2.0b7/README.md0000664000175000017500000000427014755604632012032 # CUPS Common Print Dialog Backend This repository hosts the code for the CUPS **C**ommon **P**rint **D**ialog **B**ackend. This backend manages and provides information about CUPS and IPP printing destinations to the printing dialog. ## Background The [Common Print Dialog Backends](https://openprinting.github.io/achievements/#common-print-dialog-backends) project aims to move the responsability on the part of the print dialog which communicates with the print system away from the GUI toolkit/app developers to the print system's developers and also to bring all print technologies available to the user (CUPS, cloud printing services, ...) into all application's print dialogs. ## Dependencies - [cpdb-libs](https://github.com/OpenPrinting/cpdb-libs): Version >= 2.0.0 (or GIT Master) - [CUPS](https://github.com/OpenPrinting/cups): Version >= 2.2 `sudo apt install cups libcups2-dev` - GLIB 2.0: `sudo apt install libglib2.0-dev` ## Build and installation ``` $ ./autogen.sh $ ./configure $ make $ sudo make install ``` If you are updating from an older version, please kill the old version of the backend: ``` $ sudo killall cups ``` This way the next time when a print dialog is opened the new version of the backend is started. ## Following the development and updating The current source code you find on the [OpenPrinting GitHub](https://github.com/OpenPrinting/cpdb-backend-cups). ## Running The backend is auto-activated when a frontend (like a CPDB-supporting print dialog or the example frontend `demo/print_frontend` of cpdb-libs) is started, so there is no need to run it explicitly. However, if you wish to see the debug statements in the backend code, you can run `/usr/local/lib/print-backends/cups` NOTE: The communication protocol between frontends and backends has changed (Job data streaming via domain socket, printer list filteringvia D-Bus methods). Therefore use this backend only with frontends based on cpdb-libs of at least version 2.0b6. ## More Info - [Nilanjana Lodh's Google Summer of Code 2017 Final Report](https://nilanjanalodh.github.io/common-print-dialog-gsoc17/) - [Gaurav Guleria's Google Summer of Code 2022 Final Report](https://github.com/TinyTrebuchet/gsoc22/) cpdb-backend-cups-2.0b7/Makefile.am0000664000175000017500000000017614755604632012610 AUTOMAKE_OPTIONS = foreign SUBDIRS = src data EXTRA_DIST = \ README.md \ autogen.sh \ LICENSE.md \ COPYING \ CHANGES.md cpdb-backend-cups-2.0b7/CHANGES.md0000664000175000017500000001607714755604632012155 # CHANGES - Common Print Dialog Backends - CUPS Backend - v2.0b7 - 2025-02-20 ## CHANGES IN V2.0b7 (20th February 2025) - Add support for CUPS printer instances Don't just always use the `cups_dest_t`'s `name` for the printer name, but also take it's `instance` member into account and if present, append that for the name used for the CPDB printer name, separated by a slash character (Pull request #34). - Always query current CUPS default printer When asked for the default printer, always query and return the current CUPS default printer instead of whatever was the default last time this was done, to take into account that the CUPS default printer can change while the backend is running (Pull request #33). - Pass correct parameters to `cupsStartDestDocument()` Now job title and job attributes (options) are correctly passed on (Pull request #36). - Use NULL Instead of "NA" if there's no default printer NULL makes clear that there's no default printer, while "NA" could even be the name of an actual printer, so use the former instead of the latter if no default printer could be determined (Pull request #35). - Use `g_strdup` instead of `cpdbGetStringCopy` GLib's `g_strdup` already provides the same functionality as `cpdbGetStringCopy` from cpdb-libs, so use the former instead of relying on a custom CPDB implementation (Pull request #32). ## CHANGES IN V2.0b6 (18th June 2024) - Stream print data through a Unix domain socket To ease making a Snap from the CPDB backend for CUPS we now transfer the print job data from the dialog to the backend via a Unix domain socket and not by dropping the data into a file (PR #28). - Let the frontend not be a D-Bus service, only the backends To control hiding temporary or remote printers in the backend's printer list we have added methods to the D-Bus service provided by the backends now. Before, the frontends were also D-Bus services just to send signals to the backends for controling the filtering (PR #29). - Unified logging. Always use log...() functions (PR #29). - Updated names of some CUPS constants to CUPS 2.5.x and newer (PR #28). - Removed the backend functions for get-all-jobs(), get_active_jobs_count(), and cancel_job() (PR #28). - Removed tryPPD(), a useless, PPD-related function This function logs the options in the PPD of the CUPS queue but does nothing else. PPDs will also go away in CUPS 3.x, so we want the CUPS backend not depend on PPDs or PPD-supporting functions/libraries (PR #29). - send_printer_state_changed_signal(): Send correct signal Send CPDB_SIGNAL_PRINTER_STATE_CHANGED, not CPDB_SIGNAL_PRINTER_REMOVED (#29). - Let "dialog_name" always be "const char *", to eliminate warnings (PR #29). - Added NULL checks for the functions dealing with dialogs - Build test: Give more time (3 instead of 1 sec) for the print job submission before closing the backend, to get note of the confirmation of successful submission (PR #28). - Build test: Let CPDB frontend and backend log in debug mode (PR #28). - Build test: Create the directory for the socket files (PR #28). - Updated build test for removal of backend info file ## CHANGES IN V2.0b5 (2nd August 2023) - Remove CPDB backend info file The frontend libraries now use only the D-Bus to find available backends. This makes sure that everything works also if the frontend and/or any of the backends are installed via sanboxed packaging (like Snap for example) where the components cannot read each other's file systems (PR #26). - `get_all_media()`: Do not crash on custom page size range entries The media-col-database IPP attribute contains one entry for each valid combination of page size dimensions, margins, and in some cases also media source and media type. Entries for custom page sizes contain ranges instead of single values. `get_all_media()` crashed on these. Now we let the function simply skip them. - Build system: Removed unnecessary lines in `tools/Makefile.am` Removed the `TESTdir` and `TEST_SCRIPTS` entries in `tools/Makefile.am`. They are not needed and let `make install` try to install `run-tests.sh` in the source directory, where it already is, causing an error. ## CHANGES IN V2.0b4 (21th March 2023) - Added test script for `make test`/`make check` The script `src/run-tests.sh` starts a private session D-Bus via `dbus-run-session` and therein an own copy of CUPS. It uses the CPDB CUPS backend with this CUPS and tests it using the `cpdb-text-frontend` of cpdb-libs, performing several test tasks on the backend. ## CHANGES IN V2.0b3 (20th February 2023) - Add handler for `GetAllTranslations` method and Bug fixes (PR #22) * Fixed bug when backend finds zero printers * Add handler for `GetAllTranslations` method * `get_printer_translations()` fetches translations for all printer strings. * Removed `get_human_readable_option_name()` and `get_human_readable_choice_name()` functions. ## CHANGES IN V2.0b2 (13th February 2023) - Return printer list upon activation and subscribe to cups for updates (PR #20) * Return printer list synchronously upon activation * Subscribe to CUPS notifications for printer updates * Automatically update frontends about new printers found, old printers lost, or printer state changed - Added the support of cpdb-libs for translations * Using general message string catalogs from CUPS and also message string catalogs from individual print queues/IPP printers. * Message catalog management done by libcupsfilters 2.x, via the `cfCatalog...()` API functions (`catalog.h`). - Option group support - Added `billing-info` option (PR #19) - Log messages handled by frontend - Use pkg-config variables instead of hardcoded paths (PR #17) - Build system: Let "make dist" also create .tar.bz2 and .tar.xz ## CHANGES IN V2.0b1 (12th December 2022) - Added function to query for human readable names of options/choices With the added functionality of cpdb-libs to poll human-readable names for options/attributes and their choices this commit adds a simple function to provide human-readable strings for the user-settable printer IPP attributes of CUPS queues. - Added support for common CUPS/cups-filters options Options like number-up, page-set, output-order, ... Available for all CUPS queues, not specific to particular printer. - Added get_media_size() function - Support for media sizes to have multiple margin variants (like standard and borderless) - Do not send media-col attribute to frontend as user-settable option - Adapted to renamed API functions and data types of cpdb-libs 2.x - Updated signal names to match those emitted from CPDB frontend - Made "make dist" generate a complete source tarball - Fixed some potential crasher bugs following warnings about incompatible pointer types. - Updated README.md + On update the old version of the backend needs to get killed + Common Print Dialog -> Common Print Dialog Backends + Requires cpdb-libs 2.0.0 or newer + Updated instructions for running the backend. + Added link to Gaurav Guleria's GSoC work, minor fixes + Use third person. cpdb-backend-cups-2.0b7/LICENSE.md0000664000175000017500000000223414755604632012155 MIT License Copyright (c) 2017 Nilanjana Lodh Copyright (c) 2017-2022 Till Kamppeter Copyright (c) 2020 Priydarshi Singh Copyright (c) 2022 Gaurav Guleria Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.