]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | #! /bin/sh |
2 | # | |
3 | # "$Id: cups-config.in 4802 2005-10-19 13:48:06Z mike $" | |
4 | # | |
5 | # CUPS configuration utility. | |
6 | # | |
7 | # Copyright 2001-2005 by Easy Software Products, all rights reserved. | |
8 | # | |
9 | # These coded instructions, statements, and computer programs are the | |
10 | # property of Easy Software Products and are protected by Federal | |
11 | # copyright law. Distribution and use rights are outlined in the file | |
12 | # "LICENSE.txt" which should have been included with this file. If this | |
13 | # file is missing or damaged please contact Easy Software Products | |
14 | # at: | |
15 | # | |
16 | # Attn: CUPS Licensing Information | |
17 | # Easy Software Products | |
18 | # 44141 Airport View Drive, Suite 204 | |
19 | # Hollywood, Maryland 20636 USA | |
20 | # | |
21 | # Voice: (301) 373-9600 | |
22 | # EMail: cups-info@cups.org | |
23 | # WWW: http://www.cups.org | |
24 | # | |
25 | ||
26 | VERSION="@CUPS_VERSION@" | |
27 | APIVERSION="1.2" | |
28 | ||
29 | prefix=@prefix@ | |
30 | exec_prefix=@exec_prefix@ | |
31 | bindir=@bindir@ | |
32 | includedir=@includedir@ | |
33 | libdir=@libdir@ | |
34 | datadir=@datadir@ | |
35 | sysconfdir=@sysconfdir@ | |
36 | cups_datadir=@CUPS_DATADIR@ | |
37 | cups_serverbin=@CUPS_SERVERBIN@ | |
38 | cups_serverroot=@CUPS_SERVERROOT@ | |
39 | ||
40 | # flags for C++ compiler: | |
41 | CFLAGS="" | |
42 | LDFLAGS="@EXPORT_LDFLAGS@" | |
43 | LIBS="@EXPORT_SSLLIBS@ @LIBS@" | |
44 | IMGLIBS="@EXPORT_LIBTIFF@ @EXPORT_LIBJPEG@ @EXPORT_LIBPNG@ @EXPORT_LIBZ@" | |
45 | ||
46 | if test $includedir != /usr/include; then | |
47 | CFLAGS="$CFLAGS -I$includedir" | |
48 | fi | |
49 | ||
50 | if test $libdir != /usr/lib -a $libdir != /usr/lib32; then | |
51 | LDFLAGS="$LDFLAGS -L$libdir" | |
52 | fi | |
53 | ||
54 | usage () | |
55 | { | |
56 | echo "Usage: cups-config --api-version" | |
57 | echo " cups-config --cflags" | |
58 | echo " cups-config --datadir" | |
59 | echo " cups-config --help" | |
60 | echo " cups-config --ldflags" | |
61 | echo " cups-config [--image] [--static] --libs" | |
62 | echo " cups-config --serverbin" | |
63 | echo " cups-config --serverroot" | |
64 | echo " cups-config --version" | |
65 | ||
66 | exit $1 | |
67 | } | |
68 | ||
69 | if test $# -eq 0; then | |
70 | usage 1 | |
71 | fi | |
72 | ||
73 | # Parse command line options | |
74 | static=no | |
75 | image=no | |
76 | ||
77 | while test $# -gt 0; do | |
78 | case $1 in | |
79 | --api-version) | |
80 | echo $APIVERSION | |
81 | ;; | |
82 | --cflags) | |
83 | echo $CFLAGS | |
84 | ;; | |
85 | --datadir) | |
86 | echo $cups_datadir | |
87 | ;; | |
88 | --help) | |
89 | usage 0 | |
90 | ;; | |
91 | --image) | |
92 | image=yes | |
93 | ;; | |
94 | --ldflags) | |
95 | echo $LDFLAGS | |
96 | ;; | |
97 | --libs) | |
98 | if test $static = no; then | |
99 | if test $image = no; then | |
100 | echo -lcups $LIBS | |
101 | else | |
102 | echo -lcupsimage $IMGLIBS -lcups $LIBS | |
103 | fi | |
104 | else | |
105 | if test $image = no; then | |
106 | echo $libdir/libcups.a $LIBS | |
107 | else | |
108 | echo $libdir/libcupsimage.a $IMGLIBS $libdir/libcups.a $LIBS | |
109 | fi | |
110 | fi | |
111 | ;; | |
112 | --serverbin) | |
113 | echo $cups_serverbin | |
114 | ;; | |
115 | --serverroot) | |
116 | echo $cups_serverroot | |
117 | ;; | |
118 | --static) | |
119 | static=yes | |
120 | ;; | |
121 | --version) | |
122 | echo $VERSION | |
123 | ;; | |
124 | *) | |
125 | usage 1 | |
126 | ;; | |
127 | esac | |
128 | ||
129 | shift | |
130 | done | |
131 | ||
132 | # | |
133 | # End of "$Id: cups-config.in 4802 2005-10-19 13:48:06Z mike $". | |
134 | # |