| 1 |
AC_INIT(system-config-printer, 1.5.18) |
| 2 |
AC_CONFIG_SRCDIR(system-config-printer.py) |
| 3 |
AM_INIT_AUTOMAKE([dist-xz dist-bzip2 subdir-objects 1.6]) |
| •4 |
AC_CONFIG_MACRO_DIR([m4]) |
| 5 |
AM_GNU_GETTEXT_VERSION(0.20) |
| 6 |
AM_GNU_GETTEXT([external]) |
| 7 |
AM_PATH_PYTHON([3]) |
| 8 |
PACKAGE="AC_PACKAGE_NAME" |
| 9 |
VERSION="AC_PACKAGE_VERSION" |
| 10 |
GETTEXT_PACKAGE="AC_PACKAGE_NAME" |
| 11 |
CATOBJEXT=".gmo" |
| 12 |
DATADIRNAME=share |
| 13 |
AC_SUBST(PACKAGE) |
| 14 |
AC_SUBST(VERSION) |
| 15 |
AC_SUBST(GETTEXT_PACKAGE) |
| 16 |
AC_SUBST(CATOBJEXT) |
| 17 |
AC_SUBST(DATADIRNAME) |
| 18 |
|
| 19 |
# Let distributor specify if they want to use a vendor with desktop-file-install |
| 20 |
AC_ARG_WITH(desktop-vendor, |
| 21 |
[AC_HELP_STRING([--with-desktop-vendor], |
| 22 |
[Specify the vendor for use in calls to desktop-file-install @<:@default=@:>@])],, |
| 23 |
[with_desktop_vendor=""]) |
| 24 |
|
| 25 |
VENDOR=$with_desktop_vendor |
| 26 |
if test "x$VENDOR" = "x"; then |
| 27 |
DESKTOPVENDOR= |
| 28 |
DESKTOPPREFIX= |
| 29 |
else |
| 30 |
DESKTOPVENDOR="--vendor $VENDOR" |
| 31 |
DESKTOPPREFIX="$VENDOR-" |
| 32 |
fi |
| 33 |
AC_SUBST(DESKTOPVENDOR) |
| 34 |
AC_SUBST(DESKTOPPREFIX) |
| 35 |
|
| 36 |
PKG_PROG_PKG_CONFIG |
| 37 |
|
| 38 |
dnl Allow manual definition for CUPS SERVERBIN, if not defined, use value from pkg-config... |
| 39 |
AC_MSG_CHECKING([for CUPS SERVERBIN dir]) |
| 40 |
AC_ARG_WITH([cups_serverbin_dir], |
| 41 |
AS_HELP_STRING([--with-cups-serverbin-dir], [set CUPS SERVERBIN dir, default=value from pkg-config]), [ |
| 42 |
cupsserverbindir="$withval" |
| 43 |
AC_MSG_RESULT([$withval]) |
| 44 |
], [ |
| 45 |
AS_IF([test "x$PKG_CONFIG" != x], [ |
| 46 |
AS_IF([$PKG_CONFIG --exists cups], [ |
| 47 |
cupsserverbindir=$($PKG_CONFIG --variable=cups_serverbin cups) |
| 48 |
AC_MSG_RESULT([$cupsserverbindir]) |
| 49 |
], [ |
| 50 |
AC_MSG_ERROR([No CUPS pkgconfig file present and no CUPS SERVERBIN dir defined in configure options.]) |
| 51 |
]) |
| 52 |
], [ |
| 53 |
AC_MSG_ERROR([No pkg-config present and no CUPS SERVERBIN dir defined in configure options.]) |
| 54 |
]) |
| 55 |
]) |
| 56 |
|
| 57 |
AS_IF([test "x$cupsserverbindir" = x], [ |
| 58 |
AC_MSG_ERROR([No CUPS SERVERBIN dir defined in CUPS pkgconfig file or configure options.]) |
| 59 |
]) |
| 60 |
|
| 61 |
AC_SUBST(cupsserverbindir) |
| 62 |
|
| 63 |
PKG_CHECK_MODULES(GLIB, glib-2.0, has_glib=yes, has_glib=no) |
| 64 |
|
| 65 |
AC_ARG_WITH(udev-rules, |
| 66 |
[AC_HELP_STRING([--with-udev-rules], |
| 67 |
[Enable automatic USB print queue configuration @<:@default=no@:>@])], |
| 68 |
[], |
| 69 |
[with_udev_rules=no]) |
| 70 |
AM_CONDITIONAL([UDEV_RULES], [test x$with_udev_rules != xno]) |
| 71 |
|
| 72 |
AC_ARG_WITH([udevdir], |
| 73 |
AS_HELP_STRING([--with-udevdir=DIR], [Directory for udev helper programs]), |
| 74 |
[], [with_udevdir=$($PKG_CONFIG --variable=udevdir udev)]) |
| 75 |
if test "x$with_udevdir" != xno; then |
| 76 |
AC_SUBST([udevdir], [$with_udevdir]) |
| 77 |
AC_SUBST([udevrulesdir], [$with_udevdir/rules.d]) |
| 78 |
fi |
| 79 |
|
| 80 |
if test "x$with_udev_rules" != xno -a "x$with_udevdir" != xno; then |
| 81 |
PKG_CHECK_MODULES(libudev, [libudev >= 172], has_libudev=yes, has_libudev=no) |
| 82 |
PKG_CHECK_MODULES(libusb, libusb-1.0, has_libusb=yes, has_libusb=no) |
| 83 |
if test x$has_glib == xno -o \ |
| 84 |
x$has_udev == xno -o \ |
| 85 |
x$has_libudev == xno -o \ |
| 86 |
x$has_libusb == xno ; then |
| 87 |
AC_MSG_ERROR([Missing packages]) |
| 88 |
fi |
| 89 |
|
| 90 |
AM_PROG_CC_C_O |
| 91 |
fi |
| 92 |
|
| 93 |
AC_ARG_WITH([systemdsystemunitdir], |
| 94 |
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), |
| 95 |
[], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) |
| 96 |
if test "x$with_systemdsystemunitdir" != xno; then |
| 97 |
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) |
| 98 |
fi |
| 99 |
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) |
| 100 |
|
| 101 |
AC_ARG_WITH(xmlto, |
| 102 |
[AC_HELP_STRING([--with-xmlto], |
| 103 |
[Enable xmlto manual generation @<:@default=yes@:>@])]) |
| 104 |
AM_CONDITIONAL([XMLTO], [test x$with_xmlto != xno]) |
| 105 |
|
| 106 |
AC_CONFIG_FILES([ |
| 107 |
Makefile |
| 108 |
po/Makefile.in |
| 109 |
system-config-printer |
| 110 |
system-config-printer-applet |
| 111 |
install-printerdriver |
| 112 |
dbus/scp-dbus-service |
| 113 |
udev/[email protected] |
| 114 |
]) |
| 115 |
AC_OUTPUT |