jdk

Форк
0
/
lib-cups.m4 
93 строки · 3.6 Кб
1
#
2
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
#
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation.  Oracle designates this
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
10
#
11
# This code is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
# version 2 for more details (a copy is included in the LICENSE file that
15
# accompanied this code).
16
#
17
# You should have received a copy of the GNU General Public License version
18
# 2 along with this work; if not, write to the Free Software Foundation,
19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
#
21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
# or visit www.oracle.com if you need additional information or have any
23
# questions.
24
#
25

26
################################################################################
27
# Setup cups (Common Unix Printing System)
28
################################################################################
29
AC_DEFUN_ONCE([LIB_SETUP_CUPS],
30
[
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])])
36

37
  if test "x$NEEDS_LIB_CUPS" = xfalse; then
38
    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
39
        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
40
      AC_MSG_WARN([[cups not used, so --with-cups[-*] is ignored]])
41
    fi
42
    CUPS_CFLAGS=
43
  else
44
    CUPS_FOUND=no
45

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
49

50
    if test "x${with_cups}" != x; then
51
      AC_MSG_CHECKING([for cups headers])
52
      if test -s "${with_cups}/include/cups/cups.h"; then
53
        CUPS_CFLAGS="-I${with_cups}/include"
54
        CUPS_FOUND=yes
55
        AC_MSG_RESULT([$CUPS_FOUND])
56
      else
57
        AC_MSG_ERROR([Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option.])
58
      fi
59
    fi
60
    if test "x${with_cups_include}" != x; then
61
      AC_MSG_CHECKING([for cups headers])
62
      if test -s "${with_cups_include}/cups/cups.h"; then
63
        CUPS_CFLAGS="-I${with_cups_include}"
64
        CUPS_FOUND=yes
65
        AC_MSG_RESULT([$CUPS_FOUND])
66
      else
67
        AC_MSG_ERROR([Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option.])
68
      fi
69
    fi
70
    if test "x$CUPS_FOUND" = xno; then
71
      # Are the cups headers installed in the default AIX or /usr/include location?
72
      if test "x$OPENJDK_TARGET_OS" = "xaix"; then
73
        AC_CHECK_HEADERS([/opt/freeware/include/cups/cups.h /opt/freeware/include/cups/ppd.h], [
74
            CUPS_FOUND=yes
75
            CUPS_CFLAGS="-I/opt/freeware/include"
76
            DEFAULT_CUPS=yes
77
        ])
78
      else
79
        AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], [
80
            CUPS_FOUND=yes
81
            CUPS_CFLAGS=
82
            DEFAULT_CUPS=yes
83
        ])
84
      fi
85
    fi
86
    if test "x$CUPS_FOUND" = xno; then
87
      HELP_MSG_MISSING_DEPENDENCY([cups])
88
      AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
89
    fi
90
  fi
91

92
  AC_SUBST(CUPS_CFLAGS)
93
])
94

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.