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
23dnl $Id: configure.ac 8022 2007-06-05 22:23:38Z giles $
24
25dnl Process this file with autoconf to produce a configure script.
26
27dnl MAKING RELEASES (a step-by-step guide!)
28dnl ===============
29dnl
30dnl Since the last release:
31dnl 1. if only source code (not the interface) has changed, set
32dnl      IJS_MICRO_VERSION += 1;
33dnl      IJS_INTERFACE_AGE += 1;
34dnl 2. if any functions have been added, removed, or changed, set
35dnl      IJS_INTERFACE_AGE = 0;
36dnl      IJS_CURRENT_INTERFACE += 1;
37dnl 3. if interfaces have been added, set
38dnl      IJS_BINARY_AGE += 1;
39dnl 4. if interfaces have been removed, set
40dnl      IJS_BINARY_AGE = 0;
41dnl
42dnl For more detailed information, see the libtool info documentation.
43dnl
44pushdef([IJS_NAME],              [ijs])
45pushdef([IJS_MAJOR_VERSION],     [0])
46pushdef([IJS_MINOR_VERSION],     [35])
47pushdef([IJS_EXTRA_VERSION],     [])
48pushdef([IJS_CURRENT_INTERFACE], [1])
49pushdef([IJS_INTERFACE_AGE],     [1])
50pushdef([IJS_BINARY_AGE],        [0])
51pushdef([IJS_VERSION], IJS_MAJOR_VERSION.IJS_MINOR_VERSION[]IJS_EXTRA_VERSION)
52
53AC_INIT(IJS_NAME, IJS_VERSION, [inkjet-list@linuxprinting.org])
54AC_PREREQ(2.53)
55AC_CONFIG_SRCDIR(ijs.c)
56AC_REVISION($Revision: 5783 $)
57
58dnl In the following script, there are a the following variants
59dnl of ijs cflags and libs variables
60dnl
61dnl IJS_CFLAGS:  cflags for compiling libraries and example progs
62dnl IJS_LIBS:    libraries for linking programs. ONLY to be used
63dnl                    to generate ${ijs_libs}
64dnl IJS_DEPLIBS: libraries for linking libraries against
65dnl ijs_cflags:  cflags to store in ijs-config
66dnl ijs_libs:    libs to store in ijs-config
67dnl LIBIJS_LIBS  libs to link programs IN THIS PACKAGE ONLY against
68
69dnl initial default values
70IJS_LIBS="-lijs"
71
72[IJS_MAJOR_VERSION]=IJS_MAJOR_VERSION
73[IJS_MINOR_VERSION]=IJS_MINOR_VERSION
74[IJS_EXTRA_VERSION]=IJS_EXTRA_VERSION
75
76[IJS_CURRENT_INTERFACE]=IJS_CURRENT_INTERFACE
77[IJS_INTERFACE_AGE]=IJS_INTERFACE_AGE
78[IJS_BINARY_AGE]=IJS_BINARY_AGE
79[IJS_VERSION]=IJS_VERSION
80popdef([IJS_MAJOR_VERSION])
81popdef([IJS_MINOR_VERSION])
82popdef([IJS_EXTRA_VERSION])
83popdef([IJS_CURRENT_INTERFACE])
84popdef([IJS_INTERFACE_AGE])
85popdef([IJS_BINARY_AGE])
86
87dnl Initialize automake stuff.
88AM_INIT_AUTOMAKE(IJS_NAME, IJS_VERSION)
89popdef([IJS_NAME])
90popdef([IJS_VERSION])
91
92AC_SUBST(IJS_MAJOR_VERSION)
93AC_SUBST(IJS_MINOR_VERSION)
94AC_SUBST(IJS_CURRENT_INTERFACE)
95AC_SUBST(IJS_INTERFACE_AGE)
96AC_SUBST(IJS_BINARY_AGE)
97AC_SUBST(IJS_VERSION)
98
99dnl libtool versioning
100LT_RELEASE=$IJS_MAJOR_VERSION.$IJS_MINOR_VERSION
101LT_CURRENT=$IJS_CURRENT_INTERFACE
102LT_REVISION=$IJS_INTERFACE_AGE
103LT_AGE=$IJS_BINARY_AGE
104AC_SUBST(LT_RELEASE)
105AC_SUBST(LT_CURRENT)
106AC_SUBST(LT_REVISION)
107AC_SUBST(LT_AGE)
108
109dnl Specify a configuration file.
110dnl AM_CONFIG_HEADER(config.h)
111
112dnl Set up libtool scripts.
113dnl Disable shared library building to speed up the build
114AC_DISABLE_SHARED
115AM_PROG_LIBTOOL
116AC_SUBST(LIBTOOL_DEPS)
117
118dnl Checks for programs
119
120AC_PROG_CC
121AM_PROG_CC_STDC
122AM_PROG_LIBTOOL
123AC_SUBST(LIBTOOL_DEPS)
124AC_ISC_POSIX
125AC_PROG_INSTALL
126
127AC_PATH_PROG(DB2PS, db2ps)
128if test x${DB2PS} = x ; then
129  AC_MSG_WARN([PostScript documentation cannot be generated!])
130fi
131AC_SUBST(DB2PS)
132AC_PATH_PROG(PS2PDF, ps2pdf)
133if test x${PS2PDF} = x ; then
134  AC_MSG_WARN([PDF documentation cannot be generated!])
135fi
136AC_SUBST(PS2PDF)
137
138
139dnl conditional building
140
141case ${host_os} in
142  cygwin | mingw32 | pw32 | interix3 | interix | uwin) libijs_sysdeps="windows";;
143  *) libijs_sysdeps="unix";;
144esac
145AM_CONDITIONAL(SYSDEPS_WINDOWS, test x$libijs_sysdeps = xwindows)
146
147
148dnl config.status substitutions
149AC_SUBST(IJS_CFLAGS)
150AC_SUBST(IJS_LIBS)
151AC_SUBST(IJS_DEPLIBS)
152AC_SUBST(IJS_VERSION)
153AC_SUBST(ijs_cflags)
154ijs_libs="${IJS_LIBS} ${IJS_DEPLIBS}"
155AC_SUBST(ijs_libs)
156AC_SUBST(INCLUDES)
157LIBIJS_LIBS="${LIBIJS_LIBS} ${IJS_DEPLIBS}"
158AC_SUBST(LIBIJS_LIBS)
159
160
161dnl output files and headers
162AC_CONFIG_FILES([Makefile])
163AC_CONFIG_FILES([ijs-config], [chmod +x ijs-config])
164AC_CONFIG_FILES([ijs.pc])
165AC_OUTPUT
166