root/trunk/m4/cups.m4

Revision 211, 0.8 kB (checked in by jordi, 2 years ago)

Added a M4 macro to check for the presence of CUPS.

Line 
1 #
2 # EPDFVIEW_PATH_CUPS(PREFIX, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3 #
4 # Check to see whether the CUPS header and libraries exists.
5 #
6 AC_DEFUN([EPDFVIEW_PATH_CUPS],
7 [AC_ARG_WITH([cups],
8     AS_HELP_STRING([--with-cups], [use the CUPS for printing (default)]),
9     [ac_cv_use_cups=$withval], [ac_cv_use_cups=yes])
10 AC_PATH_PROG([CUPS_CONFIG], [cups-config], no, [$PATH])
11 AC_MSG_CHECKING([for CUPS])
12 if test "x$ac_cv_use_cups" = "xno"; then
13     AC_MSG_RESULT([disabled])
14     ac_cv_have_cups=no
15 elif test "x$CUPS_CONFIG" = "xno"; then
16     AC_MSG_RESULT([cups-config not found.])
17     ac_cv_have_cups=no
18 else
19     AC_MSG_RESULT([yes])
20     $1[]_CFLAGS=`$CUPS_CONFIG --cflags`
21     $1[]_LIBS=`$CUPS_CONFIG --libs`
22     ac_cv_have_cups=yes
23 fi
24
25 if test "x$ac_cv_have_cups" = "xyes"; then
26     ifelse([$2], , :, [$2])
27 else
28     ifelse([$3], , :, [$3])
29 fi
30 ]) # EPDFVIEW_CUPS_PATH
31
Note: See TracBrowser for help on using the browser.