1dnl Copyright (C) 2001-2004 Artifex Software, Inc.
2dnl
3dnl Permission is hereby granted, free of charge, to any person
4dnl obtaining a copy of this software and associated documentation
5dnl files (the "Software"), to deal in the Software without
6dnl restriction, including without limitation the rights to use, copy,
7dnl modify, merge, publish, distribute, sublicense, and/or sell copies
8dnl of the Software, and to permit persons to whom the Software is
9dnl furnished to do so, subject to the following conditions:
10dnl
11dnl The above copyright notice and this permission notice shall be
12dnl included in all copies or substantial portions of the Software.
13dnl
14dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15dnl EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17dnl NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18dnl BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19dnl ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20dnl CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21dnl SOFTWARE.
22
23
24dnl Process this file with autoconf to produce a configure script.
25
26dnl MAKING RELEASES (a step-by-step guide!)
27dnl ===============
28dnl
29dnl Since the last release:
30dnl 1. if only source code (not the interface) has changed, set
31dnl      IJS_MICRO_VERSION += 1;
32dnl      IJS_INTERFACE_AGE += 1;
33dnl 2. if any functions have been added, removed, or changed, set
34dnl      IJS_INTERFACE_AGE = 0;
35dnl      IJS_CURRENT_INTERFACE += 1;
36dnl 3. if interfaces have been added, set
37dnl      IJS_BINARY_AGE += 1;
38dnl 4. if interfaces have been removed, set
39dnl      IJS_BINARY_AGE = 0;
40dnl
41dnl For more detailed information, see the libtool info documentation.
42dnl
43pushdef([IJS_NAME],              [ijs])
44pushdef([IJS_MAJOR_VERSION],     [0])
45pushdef([IJS_MINOR_VERSION],     [35])
46pushdef([IJS_EXTRA_VERSION],     [])
47pushdef([IJS_CURRENT_INTERFACE], [1])
48pushdef([IJS_INTERFACE_AGE],     [1])
49pushdef([IJS_BINARY_AGE],        [0])
50pushdef([IJS_VERSION], IJS_MAJOR_VERSION.IJS_MINOR_VERSION[]IJS_EXTRA_VERSION)
51
52AC_INIT(IJS_NAME, IJS_VERSION, [inkjet-list@linuxprinting.org])
53AC_PREREQ(2.53)
54AC_CONFIG_SRCDIR(ijs.c)
55AC_REVISION($Revision: 5783 $)
56
57dnl In the following script, there are a the following variants
58dnl of ijs cflags and libs variables
59dnl
60dnl IJS_CFLAGS:  cflags for compiling libraries and example progs
61dnl IJS_LIBS:    libraries for linking programs. ONLY to be used
62dnl                    to generate ${ijs_libs}
63dnl IJS_DEPLIBS: libraries for linking libraries against
64dnl ijs_cflags:  cflags to store in ijs-config
65dnl ijs_libs:    libs to store in ijs-config
66dnl LIBIJS_LIBS  libs to link programs IN THIS PACKAGE ONLY against
67
68dnl initial default values
69IJS_LIBS="-lijs"
70
71[IJS_MAJOR_VERSION]=IJS_MAJOR_VERSION
72[IJS_MINOR_VERSION]=IJS_MINOR_VERSION
73[IJS_EXTRA_VERSION]=IJS_EXTRA_VERSION
74
75[IJS_CURRENT_INTERFACE]=IJS_CURRENT_INTERFACE
76[IJS_INTERFACE_AGE]=IJS_INTERFACE_AGE
77[IJS_BINARY_AGE]=IJS_BINARY_AGE
78[IJS_VERSION]=IJS_VERSION
79popdef([IJS_MAJOR_VERSION])
80popdef([IJS_MINOR_VERSION])
81popdef([IJS_EXTRA_VERSION])
82popdef([IJS_CURRENT_INTERFACE])
83popdef([IJS_INTERFACE_AGE])
84popdef([IJS_BINARY_AGE])
85
86dnl Initialize automake stuff.
87AM_INIT_AUTOMAKE(IJS_NAME, IJS_VERSION)
88popdef([IJS_NAME])
89popdef([IJS_VERSION])
90
91AC_SUBST(IJS_MAJOR_VERSION)
92AC_SUBST(IJS_MINOR_VERSION)
93AC_SUBST(IJS_CURRENT_INTERFACE)
94AC_SUBST(IJS_INTERFACE_AGE)
95AC_SUBST(IJS_BINARY_AGE)
96AC_SUBST(IJS_VERSION)
97
98dnl libtool versioning
99LT_RELEASE=$IJS_MAJOR_VERSION.$IJS_MINOR_VERSION
100LT_CURRENT=$IJS_CURRENT_INTERFACE
101LT_REVISION=$IJS_INTERFACE_AGE
102LT_AGE=$IJS_BINARY_AGE
103AC_SUBST(LT_RELEASE)
104AC_SUBST(LT_CURRENT)
105AC_SUBST(LT_REVISION)
106AC_SUBST(LT_AGE)
107
108dnl Specify a configuration file.
109dnl AM_CONFIG_HEADER(config.h)
110
111dnl Set up libtool scripts.
112dnl Disable shared library building to speed up the build
113AC_DISABLE_SHARED
114AM_PROG_LIBTOOL
115AC_SUBST(LIBTOOL_DEPS)
116
117dnl Checks for programs
118
119AC_PROG_CC
120AM_PROG_CC_STDC
121AM_PROG_LIBTOOL
122AC_SUBST(LIBTOOL_DEPS)
123AC_ISC_POSIX
124AC_PROG_INSTALL
125
126AC_PATH_PROG(DB2PS, db2ps)
127if test x${DB2PS} = x ; then
128  AC_MSG_WARN([PostScript documentation cannot be generated!])
129fi
130AC_SUBST(DB2PS)
131AC_PATH_PROG(PS2PDF, ps2pdf)
132if test x${PS2PDF} = x ; then
133  AC_MSG_WARN([PDF documentation cannot be generated!])
134fi
135AC_SUBST(PS2PDF)
136
137
138dnl conditional building
139
140case ${host_os} in
141  cygwin | mingw32 | pw32 | interix3 | interix | uwin) libijs_sysdeps="windows";;
142  *) libijs_sysdeps="unix";;
143esac
144AM_CONDITIONAL(SYSDEPS_WINDOWS, test x$libijs_sysdeps = xwindows)
145
146
147dnl config.status substitutions
148AC_SUBST(IJS_CFLAGS)
149AC_SUBST(IJS_LIBS)
150AC_SUBST(IJS_DEPLIBS)
151AC_SUBST(IJS_VERSION)
152AC_SUBST(ijs_cflags)
153ijs_libs="${IJS_LIBS} ${IJS_DEPLIBS}"
154AC_SUBST(ijs_libs)
155AC_SUBST(INCLUDES)
156LIBIJS_LIBS="${LIBIJS_LIBS} ${IJS_DEPLIBS}"
157AC_SUBST(LIBIJS_LIBS)
158
159
160dnl output files and headers
161AC_CONFIG_FILES([Makefile])
162AC_CONFIG_FILES([ijs-config], [chmod +x ijs-config])
163AC_CONFIG_FILES([ijs.pc])
164AC_OUTPUT
165