Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,23 @@
*/*~
*.o
*.pdf
cups
.vscode/
.gdb_history
gmon.out
Makefile.in
.gitignore
aclocal.m4
Makefile
*/Makefile
depcomp
install-sh
missing
aclocal.*
compile
autom4*
autom4te.cache/
build-aux/
configure
config.guess
config.sub
config.log
config.status
configure
data/org.openprinting.Backend.CUPS.service
Makefile
Makefile.in
src/.deps
src/cups
data/org.openprinting.Backend.CUPS.service
tmp/
*/Makefile
3 changes: 2 additions & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#! /bin/sh

aclocal \
mkdir -p build-aux \
&& aclocal \
&& automake --add-missing \
&& autoconf
32 changes: 23 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@

AC_PREREQ([2.69])
AC_INIT([cpdb-backend-cups], [2.0b1], [https://github.com/OpenPrinting/cpdb-backend-cups/issues/], [cpdb-backend-cups], [https://github.com/OpenPrinting/cpdb-backend-cups])
AM_INIT_AUTOMAKE([-Wall foreign])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([src/print_backend_cups.c])
AM_INIT_AUTOMAKE([-Wall foreign])

: ${CFLAGS=""}
# Check for a C compiler
AC_PROG_CC


# Checks for backend library
# Checks for backend library
PKG_CHECK_MODULES([CPDB],[cpdb >= 2])
PKG_CHECK_MODULES([GIO],[gio-2.0])
PKG_CHECK_MODULES([GIOUNIX],[gio-unix-2.0])
Expand All @@ -27,15 +28,28 @@ AC_TYPE_SIZE_T
AC_FUNC_MALLOC

# The Dbus service directory
DBUS_SERVICES_DIR="/usr/share/dbus-1/services"
AC_SUBST(DBUS_SERVICES_DIR)
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 info directory which will be read by the frontend
INFO_DIR="/usr/share/print-backends"
AC_SUBST(INFO_DIR)
AC_MSG_CHECKING([CPDB backend info path])
PKG_CHECK_VAR([INFO_DIR], [cpdb], [cpdb_backend_info_dir],
AC_MSG_RESULT($INFO_DIR),
AC_MSG_FAILURE([cannot locate cpdb_backend_info_dir])
)

# The directory for the backend executables
CPDB_BACKEND_DIR="$libdir/print-backends"
AC_SUBST(CPDB_BACKEND_DIR)
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([Makefile src/Makefile data/Makefile])
AC_OUTPUT