# HG changeset patch # User simonis # Date 1452246056 -3600 # Fri Jan 08 10:40:56 2016 +0100 # Node ID 8779dcddbaa0b6d7d05489308660dd91559fb6fd # Parent 918e76f6ed2ae5bca575e958135b0ed149191568 8146639: Fix detection of Cups headers during configuration Reviewed-by: erikj diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -4801,7 +4801,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1450277321 +DATE_WHEN_GENERATED=1452193303 ############################################################################### # @@ -51742,12 +51742,28 @@ fi if test "x${with_cups}" != x; then - CUPS_CFLAGS="-I${with_cups}/include" - CUPS_FOUND=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5 +$as_echo_n "checking for cups headers... " >&6; } + if test -s "${with_cups}/include/cups/cups.h"; then + CUPS_CFLAGS="-I${with_cups}/include" + CUPS_FOUND=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5 +$as_echo "$CUPS_FOUND" >&6; } + else + as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5 + fi fi if test "x${with_cups_include}" != x; then - CUPS_CFLAGS="-I${with_cups_include}" - CUPS_FOUND=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5 +$as_echo_n "checking for cups headers... " >&6; } + if test -s "${with_cups}/cups/cups.h"; then + CUPS_CFLAGS="-I${with_cups_include}" + CUPS_FOUND=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5 +$as_echo "$CUPS_FOUND" >&6; } + else + as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5 + fi fi if test "x$CUPS_FOUND" = xno; then # Are the cups headers installed in the default /usr/include location? diff --git a/common/autoconf/lib-cups.m4 b/common/autoconf/lib-cups.m4 --- a/common/autoconf/lib-cups.m4 +++ b/common/autoconf/lib-cups.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -48,12 +48,24 @@ fi if test "x${with_cups}" != x; then - CUPS_CFLAGS="-I${with_cups}/include" - CUPS_FOUND=yes + AC_MSG_CHECKING([for cups headers]) + if test -s "${with_cups}/include/cups/cups.h"; then + CUPS_CFLAGS="-I${with_cups}/include" + CUPS_FOUND=yes + AC_MSG_RESULT([$CUPS_FOUND]) + else + AC_MSG_ERROR([Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option.]) + fi fi if test "x${with_cups_include}" != x; then - CUPS_CFLAGS="-I${with_cups_include}" - CUPS_FOUND=yes + AC_MSG_CHECKING([for cups headers]) + if test -s "${with_cups_include}/cups/cups.h"; then + CUPS_CFLAGS="-I${with_cups_include}" + CUPS_FOUND=yes + AC_MSG_RESULT([$CUPS_FOUND]) + else + AC_MSG_ERROR([Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option.]) + fi fi if test "x$CUPS_FOUND" = xno; then # Are the cups headers installed in the default /usr/include location?