|
33 | 33 | AC_SUBST(DESKTOPVENDOR) |
34 | 34 | AC_SUBST(DESKTOPPREFIX) |
35 | 35 |
|
36 | | -cupsserverbindir="`cups-config --serverbin`" |
| 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 | + |
37 | 61 | AC_SUBST(cupsserverbindir) |
38 | 62 |
|
39 | 63 | PKG_CHECK_MODULES(GLIB, glib-2.0, has_glib=yes, has_glib=no) |
@@ -66,7 +90,6 @@ if test "x$with_udev_rules" != xno -a "x$with_udevdir" != xno; then |
66 | 90 | AM_PROG_CC_C_O |
67 | 91 | fi |
68 | 92 |
|
69 | | -PKG_PROG_PKG_CONFIG |
70 | 93 | AC_ARG_WITH([systemdsystemunitdir], |
71 | 94 | AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), |
72 | 95 | [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) |
|
0 commit comments