author | dchuyko |
Tue, 19 Jun 2018 18:18:46 +0300 | |
changeset 50642 | fff48b02d4a6 |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1 |
# |
34865
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
2 |
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
4 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
10 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
15 |
# accompanied this code). |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
16 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
20 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
23 |
# questions. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
24 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
25 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
26 |
################################################################################ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
27 |
# Setup cups (Common Unix Printing System) |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
28 |
################################################################################ |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
29 |
AC_DEFUN_ONCE([LIB_SETUP_CUPS], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
30 |
[ |
20363 | 31 |
AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups], |
32 |
[specify prefix directory for the cups package |
|
33 |
(expecting the headers under PATH/include)])]) |
|
34 |
AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include], |
|
35 |
[specify directory for the cups include files])]) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
36 |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
37 |
if test "x$NEEDS_LIB_CUPS" = xfalse; then |
33393
0f584e7d6ab6
8140762: Specifying --without-LIB if not needed should not result in warning
ihse
parents:
32921
diff
changeset
|
38 |
if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \ |
0f584e7d6ab6
8140762: Specifying --without-LIB if not needed should not result in warning
ihse
parents:
32921
diff
changeset
|
39 |
(test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then |
0f584e7d6ab6
8140762: Specifying --without-LIB if not needed should not result in warning
ihse
parents:
32921
diff
changeset
|
40 |
AC_MSG_WARN([[cups not used, so --with-cups[-*] is ignored]]) |
20363 | 41 |
fi |
42 |
CUPS_CFLAGS= |
|
43 |
else |
|
44 |
CUPS_FOUND=no |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
45 |
|
20363 | 46 |
if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then |
47 |
AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.]) |
|
48 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
49 |
|
20363 | 50 |
if test "x${with_cups}" != x; then |
34865
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
51 |
AC_MSG_CHECKING([for cups headers]) |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
52 |
if test -s "${with_cups}/include/cups/cups.h"; then |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
53 |
CUPS_CFLAGS="-I${with_cups}/include" |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
54 |
CUPS_FOUND=yes |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
55 |
AC_MSG_RESULT([$CUPS_FOUND]) |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
56 |
else |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
57 |
AC_MSG_ERROR([Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option.]) |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
58 |
fi |
20363 | 59 |
fi |
60 |
if test "x${with_cups_include}" != x; then |
|
34865
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
61 |
AC_MSG_CHECKING([for cups headers]) |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
62 |
if test -s "${with_cups_include}/cups/cups.h"; then |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
63 |
CUPS_CFLAGS="-I${with_cups_include}" |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
64 |
CUPS_FOUND=yes |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
65 |
AC_MSG_RESULT([$CUPS_FOUND]) |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
66 |
else |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
67 |
AC_MSG_ERROR([Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option.]) |
48ace55e16c5
8146639: Fix detection of Cups headers during configuration
simonis
parents:
33393
diff
changeset
|
68 |
fi |
20363 | 69 |
fi |
70 |
if test "x$CUPS_FOUND" = xno; then |
|
71 |
# Are the cups headers installed in the default /usr/include location? |
|
32921
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
72 |
AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], [ |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
73 |
CUPS_FOUND=yes |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
74 |
CUPS_CFLAGS= |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
75 |
DEFAULT_CUPS=yes |
8e0250dfa145
8138761: Improved handling of libffi, and cleanup of libraries.m4
ihse
parents:
31327
diff
changeset
|
76 |
]) |
20363 | 77 |
fi |
78 |
if test "x$CUPS_FOUND" = xno; then |
|
79 |
HELP_MSG_MISSING_DEPENDENCY([cups]) |
|
80 |
AC_MSG_ERROR([Could not find cups! $HELP_MSG ]) |
|
81 |
fi |
|
82 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
83 |
|
20363 | 84 |
AC_SUBST(CUPS_CFLAGS) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
85 |
]) |