]> git.ipfire.org Git - thirdparty/cups.git/blame - cups-config.in
Update ipp documentation to reflect the behavior of configuring WiFi on IPP USB printers.
[thirdparty/cups.git] / cups-config.in
CommitLineData
24343173 1#!/bin/sh
ef416fc2 2#
503b54c9 3# CUPS configuration utility.
a4845881 4#
49b3fb63 5# Copyright © 2007-2019 by Apple Inc.
53f8d64f 6# Copyright © 2001-2006 by Easy Software Products, all rights reserved.
ef416fc2 7#
53f8d64f
MS
8# Licensed under Apache License v2.0. See the file "LICENSE" for more
9# information.
ef416fc2 10#
11
12VERSION="@CUPS_VERSION@"
53f8d64f 13APIVERSION="2.3"
e4572d57 14BUILD="@CUPS_BUILD@"
ef416fc2 15
16prefix=@prefix@
17exec_prefix=@exec_prefix@
18bindir=@bindir@
19includedir=@includedir@
20libdir=@libdir@
d09495fa 21datarootdir=@datadir@
ef416fc2 22datadir=@datadir@
23sysconfdir=@sysconfdir@
24cups_datadir=@CUPS_DATADIR@
25cups_serverbin=@CUPS_SERVERBIN@
26cups_serverroot=@CUPS_SERVERROOT@
bd7854cb 27INSTALLSTATIC=@INSTALLSTATIC@
ef416fc2 28
3e391a8e 29# flags for compiler and linker...
ef416fc2 30CFLAGS=""
31LDFLAGS="@EXPORT_LDFLAGS@"
3e391a8e 32LIBS="@LIBGSSAPI@ @DNSSDLIBS@ @EXPORT_SSLLIBS@ @LIBZ@ @LIBS@"
ef416fc2 33
f301802f 34# Check for local invocation...
35selfdir=`dirname $0`
36
37if test -f "$selfdir/cups/cups.h"; then
38 CFLAGS="-I$selfdir"
49b3fb63 39 LDFLAGS="-L$selfdir/cups $LDFLAGS"
f301802f 40 libdir="$selfdir/cups"
f301802f 41else
42 if test $includedir != /usr/include; then
43 CFLAGS="$CFLAGS -I$includedir"
44 fi
ef416fc2 45
f301802f 46 if test $libdir != /usr/lib -a $libdir != /usr/lib32 -a $libdir != /usr/lib64; then
47 LDFLAGS="$LDFLAGS -L$libdir"
48 fi
ef416fc2 49fi
50
f301802f 51
ef416fc2 52usage ()
53{
54 echo "Usage: cups-config --api-version"
e4572d57 55 echo " cups-config --build"
ef416fc2 56 echo " cups-config --cflags"
57 echo " cups-config --datadir"
58 echo " cups-config --help"
59 echo " cups-config --ldflags"
a4845881 60 echo " cups-config [--image] [--static] --libs"
ef416fc2 61 echo " cups-config --serverbin"
62 echo " cups-config --serverroot"
63 echo " cups-config --version"
64
65 exit $1
66}
67
68if test $# -eq 0; then
69 usage 1
70fi
71
72# Parse command line options
73static=no
ef416fc2 74
75while test $# -gt 0; do
76 case $1 in
77 --api-version)
78 echo $APIVERSION
79 ;;
e4572d57
MS
80 --build)
81 echo $BUILD
82 ;;
ef416fc2 83 --cflags)
84 echo $CFLAGS
85 ;;
86 --datadir)
87 echo $cups_datadir
88 ;;
89 --help)
90 usage 0
91 ;;
92 --image)
49b3fb63 93 # Do nothing
ef416fc2 94 ;;
95 --ldflags)
96 echo $LDFLAGS
97 ;;
98 --libs)
99 if test $static = no; then
3e391a8e 100 libs="@EXTLINKCUPS@";
ef416fc2 101 else
50fe7201 102 libs="$libdir/libcups.a $LIBS";
ef416fc2 103 fi
50fe7201 104 echo $libs
ef416fc2 105 ;;
106 --serverbin)
107 echo $cups_serverbin
108 ;;
109 --serverroot)
110 echo $cups_serverroot
111 ;;
112 --static)
bd7854cb 113 if test -z "$INSTALLSTATIC"; then
3e391a8e 114 echo "WARNING: Static libraries not installed." >&2
bd7854cb 115 else
116 static=yes
117 fi
ef416fc2 118 ;;
119 --version)
120 echo $VERSION
121 ;;
122 *)
123 usage 1
124 ;;
125 esac
126
127 shift
128done