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