summaryrefslogtreecommitdiffstats
path: root/source/configure.in
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-06-14 10:31:11 +0200
committerVolker Lendecke <vl@samba.org>2008-11-14 19:55:46 +0100
commit27b0b8f99c6d5b43d9b9079aa74789e27d0a8d84 (patch)
tree3e176bbaa9380c3b1133b2dadb3f181ea1c2f4b5 /source/configure.in
parent3d2570150201e357f31e3d651bc05b7234c84796 (diff)
downloadsamba-27b0b8f99c6d5b43d9b9079aa74789e27d0a8d84.tar.gz
samba-27b0b8f99c6d5b43d9b9079aa74789e27d0a8d84.tar.xz
samba-27b0b8f99c6d5b43d9b9079aa74789e27d0a8d84.zip
Correctly check for presence of cups-devel
On SuSE at least cups-config belongs to cups-libs which does not contain the headers which are in cups-devel. (cherry picked from commit 2408d2493f7c6e0beee58febd547516bbeb0929d)
Diffstat (limited to 'source/configure.in')
-rw-r--r--source/configure.in16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/configure.in b/source/configure.in
index 5a3abd0b859..463e7a356da 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -756,10 +756,24 @@ if test x$enable_cups != xno; then
AC_PATH_PROG(CUPS_CONFIG, cups-config)
if test "x$CUPS_CONFIG" != x; then
- AC_DEFINE(HAVE_CUPS,1,[Whether we have CUPS])
+
+ ac_save_CFLAGS=$CFLAGS
+ ac_save_LDFLAGS=$LDFLAGS
+ ac_save_PRINT_LIBS=$PRINT_LIBS
CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`"
LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
PRINT_LIBS="$PRINT_LIBS `$CUPS_CONFIG --libs`"
+ AC_CHECK_HEADERS(cups/cups.h cups/language.h)
+ if test x"$ac_cv_header_cups_cups_h" = xyes -a \
+ x"$ac_cv_header_cups_language_h" = xyes; then
+ AC_DEFINE(HAVE_CUPS,1,[Whether we have CUPS])
+ else
+ AC_MSG_WARN([cups-config around but cups-devel not installed])
+ CFLAGS=$ac_save_CFLAGS
+ LDFLAGS=$ac_save_LDFLAGS
+ PRINT_LIBS=$ac_save_PRINT_LIBS
+ fi
+
elif test x"$enable_cups" = x"yes"; then
AC_MSG_ERROR(Cups support required but cups-config not located. Make sure cups-devel related files are installed.)
fi