]> git.ipfire.org Git - thirdparty/cups.git/blame - cups-config.in
Load cups into easysw/current.
[thirdparty/cups.git] / cups-config.in
CommitLineData
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
26VERSION="@CUPS_VERSION@"
27APIVERSION="1.2"
28
29prefix=@prefix@
30exec_prefix=@exec_prefix@
31bindir=@bindir@
32includedir=@includedir@
33libdir=@libdir@
34datadir=@datadir@
35sysconfdir=@sysconfdir@
36cups_datadir=@CUPS_DATADIR@
37cups_serverbin=@CUPS_SERVERBIN@
38cups_serverroot=@CUPS_SERVERROOT@
39
40# flags for C++ compiler:
41CFLAGS=""
42LDFLAGS="@EXPORT_LDFLAGS@"
43LIBS="@EXPORT_SSLLIBS@ @LIBS@"
44IMGLIBS="@EXPORT_LIBTIFF@ @EXPORT_LIBJPEG@ @EXPORT_LIBPNG@ @EXPORT_LIBZ@"
45
46if test $includedir != /usr/include; then
47 CFLAGS="$CFLAGS -I$includedir"
48fi
49
50if test $libdir != /usr/lib -a $libdir != /usr/lib32; then
51 LDFLAGS="$LDFLAGS -L$libdir"
52fi
53
54usage ()
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
69if test $# -eq 0; then
70 usage 1
71fi
72
73# Parse command line options
74static=no
75image=no
76
77while 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
130done
131
132#
133# End of "$Id: cups-config.in 4802 2005-10-19 13:48:06Z mike $".
134#