-
Notifications
You must be signed in to change notification settings - Fork 3
/
cups-config.in
92 lines (83 loc) · 1.55 KB
/
cups-config.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/sh
#/*
# * Alternate configuration file for CUPS.
# * This allows a printer driver to be installed in
# * directory specified by the Printer Application.
# */
VERSION="@CUPS_VERSION@"
APIVERSION="@CUPS_API_VERSION@"
BUILD="@CUPS_BUILD@"
serverbin="@serverbin@"
datadir="@datadir@"
CFLAGS="@CUPS_CFLAGS@"
LDFLAGS="@CUPS_LDFLAGS@"
STATIC_LIBS="@CUPS_STATIC@"
LIBS="@CUPS_LIBS@"
CUPS_SERVERROOT="@CUPS_SERVERROOT@"
datarootdir="@datarootdir@"
usage ()
{
echo "Usage: cups-config --api-version"
echo " cups-config --build"
echo " cups-config --cflags"
echo " cups-config --datadir"
echo " cups-config --help"
echo " cups-config --ldflags"
echo " cups-config [--image] [--static] --libs"
echo " cups-config --serverbin"
echo " cups-config --serverroot"
echo " cups-config --version"
exit $1
}
if test $# -eq 0; then
usage 1
fi
static=no
while test $# -gt 0; do
case $1 in
--api-version)
echo $APIVERSION
;;
--build)
echo $BUILD
;;
--cflags)
echo $CFLAGS
;;
--datadir)
echo $datadir
;;
--help)
usage 0
;;
--image)
# Do nothing
;;
--ldflags)
echo $LDFLAGS
;;
--libs)
if test $static = no; then
echo $LIBS
else
echo $STATIC_LIBS
fi
;;
--serverbin)
echo $serverbin
;;
--serverroot)
echo $CUPS_SERVERROOT
;;
--static)
static=yes
;;
--version)
echo $VERSION
;;
*)
usage 1
;;
esac
shift
done