]> git.ipfire.org Git - thirdparty/cups.git/blob - cups-config.in
Load cups into easysw/current.
[thirdparty/cups.git] / cups-config.in
1 #! /bin/sh
2 #
3 # "$Id: cups-config.in 5134 2006-02-19 15:16:08Z mike $"
4 #
5 # CUPS configuration utility.
6 #
7 # Copyright 2001-2006 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 INSTALLSTATIC=@INSTALLSTATIC@
40
41 # flags for C++ compiler:
42 CFLAGS=""
43 LDFLAGS="@EXPORT_LDFLAGS@"
44 LIBS="@EXPORT_SSLLIBS@ @LIBS@"
45 IMGLIBS="@EXPORT_LIBTIFF@ @EXPORT_LIBJPEG@ @EXPORT_LIBPNG@ @EXPORT_LIBZ@"
46
47 if test $includedir != /usr/include; then
48 CFLAGS="$CFLAGS -I$includedir"
49 fi
50
51 if test $libdir != /usr/lib -a $libdir != /usr/lib32; then
52 LDFLAGS="$LDFLAGS -L$libdir"
53 fi
54
55 usage ()
56 {
57 echo "Usage: cups-config --api-version"
58 echo " cups-config --cflags"
59 echo " cups-config --datadir"
60 echo " cups-config --help"
61 echo " cups-config --ldflags"
62 echo " cups-config [--image] [--static] --libs"
63 echo " cups-config --serverbin"
64 echo " cups-config --serverroot"
65 echo " cups-config --version"
66
67 exit $1
68 }
69
70 if test $# -eq 0; then
71 usage 1
72 fi
73
74 # Parse command line options
75 static=no
76 image=no
77
78 while test $# -gt 0; do
79 case $1 in
80 --api-version)
81 echo $APIVERSION
82 ;;
83 --cflags)
84 echo $CFLAGS
85 ;;
86 --datadir)
87 echo $cups_datadir
88 ;;
89 --help)
90 usage 0
91 ;;
92 --image)
93 image=yes
94 ;;
95 --ldflags)
96 echo $LDFLAGS
97 ;;
98 --libs)
99 if test $static = no; then
100 if test $image = no; then
101 echo -lcups $LIBS
102 else
103 echo -lcupsimage $IMGLIBS -lcups $LIBS
104 fi
105 else
106 if test $image = no; then
107 echo $libdir/libcups.a $LIBS
108 else
109 echo $libdir/libcupsimage.a $IMGLIBS $libdir/libcups.a $LIBS
110 fi
111 fi
112 ;;
113 --serverbin)
114 echo $cups_serverbin
115 ;;
116 --serverroot)
117 echo $cups_serverroot
118 ;;
119 --static)
120 if test -z "$INSTALLSTATIC"; then
121 echo "WARNING: Static libraries not installed!" >&2
122 else
123 static=yes
124 fi
125 ;;
126 --version)
127 echo $VERSION
128 ;;
129 *)
130 usage 1
131 ;;
132 esac
133
134 shift
135 done
136
137 #
138 # End of "$Id: cups-config.in 5134 2006-02-19 15:16:08Z mike $".
139 #