]> git.ipfire.org Git - thirdparty/cups.git/blame - cups-config.in
Fax queues did not work when shared via Bonjour (<rdar://problem/14498310>)
[thirdparty/cups.git] / cups-config.in
CommitLineData
ef416fc2 1#! /bin/sh
2#
f2d18633 3# "$Id$"
a4845881 4#
ef416fc2 5# CUPS configuration utility.
6#
a4845881 7# Copyright 2007-2011 by Apple Inc.
bd7854cb 8# Copyright 2001-2006 by Easy Software Products, all rights reserved.
ef416fc2 9#
10# These coded instructions, statements, and computer programs are the
bc44d920 11# property of Apple Inc. and are protected by Federal copyright
12# law. Distribution and use rights are outlined in the file "LICENSE.txt"
13# which should have been included with this file. If this file is
14# file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 15#
16
17VERSION="@CUPS_VERSION@"
a4845881 18APIVERSION="1.6"
e4572d57 19BUILD="@CUPS_BUILD@"
ef416fc2 20
21prefix=@prefix@
22exec_prefix=@exec_prefix@
23bindir=@bindir@
24includedir=@includedir@
25libdir=@libdir@
f301802f 26imagelibdir=@libdir@
d09495fa 27datarootdir=@datadir@
ef416fc2 28datadir=@datadir@
29sysconfdir=@sysconfdir@
30cups_datadir=@CUPS_DATADIR@
31cups_serverbin=@CUPS_SERVERBIN@
32cups_serverroot=@CUPS_SERVERROOT@
bd7854cb 33INSTALLSTATIC=@INSTALLSTATIC@
ef416fc2 34
35# flags for C++ compiler:
36CFLAGS=""
37LDFLAGS="@EXPORT_LDFLAGS@"
a4845881 38LIBS="@LIBGSSAPI@ @EXPORT_SSLLIBS@ @LIBZ@ @LIBS@"
ef416fc2 39
f301802f 40# Check for local invocation...
41selfdir=`dirname $0`
42
43if test -f "$selfdir/cups/cups.h"; then
44 CFLAGS="-I$selfdir"
45 LDFLAGS="-L$selfdir/cups -L$selfdir/filter $LDFLAGS"
46 libdir="$selfdir/cups"
47 imagelibdir="$selfdir/filter"
f301802f 48else
49 if test $includedir != /usr/include; then
50 CFLAGS="$CFLAGS -I$includedir"
51 fi
ef416fc2 52
f301802f 53 if test $libdir != /usr/lib -a $libdir != /usr/lib32 -a $libdir != /usr/lib64; then
54 LDFLAGS="$LDFLAGS -L$libdir"
55 fi
ef416fc2 56fi
57
f301802f 58
ef416fc2 59usage ()
60{
61 echo "Usage: cups-config --api-version"
e4572d57 62 echo " cups-config --build"
ef416fc2 63 echo " cups-config --cflags"
64 echo " cups-config --datadir"
65 echo " cups-config --help"
66 echo " cups-config --ldflags"
a4845881 67 echo " cups-config [--image] [--static] --libs"
ef416fc2 68 echo " cups-config --serverbin"
69 echo " cups-config --serverroot"
70 echo " cups-config --version"
71
72 exit $1
73}
74
75if test $# -eq 0; then
76 usage 1
77fi
78
79# Parse command line options
80static=no
81image=no
82
83while test $# -gt 0; do
84 case $1 in
85 --api-version)
86 echo $APIVERSION
87 ;;
e4572d57
MS
88 --build)
89 echo $BUILD
90 ;;
ef416fc2 91 --cflags)
92 echo $CFLAGS
93 ;;
94 --datadir)
95 echo $cups_datadir
96 ;;
97 --help)
98 usage 0
99 ;;
100 --image)
101 image=yes
102 ;;
103 --ldflags)
104 echo $LDFLAGS
105 ;;
106 --libs)
107 if test $static = no; then
c7017ecc 108 libs="@EXTLINKCUPS@ $LIBS";
50fe7201 109 if test $image = yes; then
c7017ecc 110 libs="@EXTLINKCUPSIMAGE@ $libs"
50fe7201 111 fi
ef416fc2 112 else
50fe7201
MS
113 libs="$libdir/libcups.a $LIBS";
114 if test $image = yes; then
a4845881 115 libs="$libdir/libcupsimage.a $libs"
ef416fc2 116 fi
117 fi
50fe7201 118 echo $libs
ef416fc2 119 ;;
120 --serverbin)
121 echo $cups_serverbin
122 ;;
123 --serverroot)
124 echo $cups_serverroot
125 ;;
126 --static)
bd7854cb 127 if test -z "$INSTALLSTATIC"; then
128 echo "WARNING: Static libraries not installed!" >&2
129 else
130 static=yes
131 fi
ef416fc2 132 ;;
133 --version)
134 echo $VERSION
135 ;;
136 *)
137 usage 1
138 ;;
139 esac
140
141 shift
142done
143
144#
f2d18633 145# End of "$Id$".
ef416fc2 146#