]> Dogcows Code - chaz/openbox/blob - configure.in
gcc 3 compatibility, converted strstreams to stringstreams
[chaz/openbox] / configure.in
1 dnl configure.in for Openbox
2 dnl Initialize autoconf and automake
3 AC_INIT(src/openbox.cc)
4 AM_INIT_AUTOMAKE(openbox,1.1.0,no-define)
5
6 dnl Determine default prefix
7 test x$prefix = "xNONE" && prefix="$ac_default_prefix"
8
9 dnl Check for various flavors of UNIX(r)
10 dnl AC_AIX
11 dnl AC_ISC_POSIX
12
13 dnl Locate required external software
14 AC_PROG_CC
15 AC_PROG_CXX
16 AC_PROG_INSTALL
17
18 AC_LANG_CPLUSPLUS
19
20 AC_CHECK_PROGS(regex_cmd, sed)
21 if test x$regex_cmd = "x"; then
22 AC_MSG_ERROR([error. sed is required to build the default menu file.])
23 fi
24
25 dnl Check for system header files
26 AC_CHECK_HEADERS(ctype.h dirent.h fcntl.h libgen.h locale.h nl_types.h process.h signal.h stdarg.h stdio.h string.h stdlib.h time.h unistd.h sys/param.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h sstream)
27 AC_HEADER_TIME
28
29 dnl Check for existance of basename(), setlocale() and strftime()
30 AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename,
31 AC_DEFINE(HAVE_BASENAME) LIBS="$LIBS -lgen"))
32 AC_CHECK_FUNCS(getpid setlocale sigaction strftime strcasestr snprintf vsnprintf catopen catgets catclose)
33 AC_CHECK_LIB(nsl, t_open, LIBS="$LIBS -lnsl")
34 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
35
36 dnl Check for X headers and libraries
37 AC_PATH_X
38 AC_PATH_XTRA
39
40 test x$no_x = "xyes" && AC_MSG_ERROR([Openbox requires the X Window System libraries and headers.])
41
42 test x$x_includes = "x" && x_includes="/usr/include"
43 test x$x_libraries = "x" && x_libraries="/usr/lib"
44
45 CFLAGS="$CFLAGS $X_CFLAGS"
46 CXXFLAGS="$CXXFLAGS $X_CFLAGS"
47 LIBS="$LIBS $X_LIBS"
48 LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS"
49
50 dnl Check for required functions in -lX11
51 AC_CHECK_LIB(X11, XOpenDisplay,
52 LIBS="$LIBS -lX11",
53 AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.])
54 )
55
56 LIBS="$LIBS $X_EXTRA_LIBS"
57
58 Xext_lib=""
59
60 dnl Check for XShape extension support and proper library files.
61 SHAPE=""
62 AC_MSG_CHECKING([whether to build support for the XShape extension])
63 AC_ARG_ENABLE(
64 shape, [ --enable-shape enable support of the XShape extension [default=yes]])
65
66 : ${enableval="yes"}
67 if test x$enableval = "xyes"; then
68 AC_MSG_RESULT([yes])
69 AC_CHECK_LIB(Xext, XShapeCombineShape,
70 AC_MSG_CHECKING([for X11/extensions/shape.h])
71 AC_TRY_LINK(
72 #include <X11/Xlib.h>
73 #include <X11/Xutil.h>
74 #include <X11/extensions/shape.h>
75 , long foo = ShapeSet,
76 AC_MSG_RESULT([yes])
77 SHAPE="-DSHAPE"; Xext_lib="-lXext",
78 AC_MSG_RESULT([no])
79 )
80 )
81 else
82 AC_MSG_RESULT([no])
83 fi
84 AC_SUBST(SHAPE)
85
86 LIBS="$LIBS $Xext_lib"
87
88 dnl Check for the Slit
89 SLIT=""
90 AC_MSG_CHECKING([whether to include the Slit])
91 AC_ARG_ENABLE(
92 slit, [ --enable-slit include code for the Slit [default=yes]],
93 if test x$enableval = "xyes"; then
94 AC_MSG_RESULT([yes])
95 SLIT="-DSLIT"
96 else
97 AC_MSG_RESULT([no])
98 fi,
99 AC_MSG_RESULT([yes])
100 SLIT="-DSLIT"
101 )
102 AC_SUBST(SLIT)
103
104 dnl Check for the new WM Spec
105 NEWWMSPEC=""
106 AC_MSG_CHECKING([whether to include the new WM Spec (DOES NOTHING)])
107 AC_ARG_ENABLE(
108 newspec,
109 [ --enable-newspec include code for the new WM Spec (DOES NOTHING)
110 [default=no]],
111 if test x$enableval = "xyes"; then
112 AC_MSG_RESULT([yes])
113 NEWWMSPEC="-DNEWWMSPEC"
114 else
115 AC_MSG_RESULT([no])
116 fi,
117 AC_MSG_RESULT([no])
118 )
119 AC_SUBST(NEWWMSPEC)
120
121
122 dnl Check for Interlacing
123 INTERLACE=""
124 AC_MSG_CHECKING([whether to include interlacing image code])
125 AC_ARG_ENABLE(
126 interlace, [ --enable-interlace include code for image interlacing [default=yes]],
127 if test x$enableval = "xyes"; then
128 AC_MSG_RESULT([yes])
129 INTERLACE="-DINTERLACE"
130 else
131 AC_MSG_RESULT([no])
132 fi,
133 AC_MSG_RESULT([yes])
134 INTERLACE="-DINTERLACE"
135 )
136 AC_SUBST(INTERLACE)
137
138 dnl Check for ordered 8bpp dithering
139 ORDEREDPSEUDO=""
140 AC_MSG_CHECKING([whether to include Pseudocolor ordered dithering code])
141 AC_ARG_ENABLE(ordered-pseudo,
142 [ --enable-ordered-pseudo include code for ordered pseudocolor (8bpp)
143 dithering [default=no]],
144 if test x$enableval = "xyes"; then
145 AC_MSG_RESULT([yes])
146 ORDEREDPSEUDO="-DORDEREDPSEUDO"
147 else
148 AC_MSG_RESULT([no])
149 fi,
150 AC_MSG_RESULT([no])
151 )
152 AC_SUBST(ORDEREDPSEUDO)
153
154 dnl Check for event clobbering
155 CLOBBER=""
156 AC_MSG_CHECKING([whether to intercept mouse events to clients])
157 AC_ARG_ENABLE(clobber,
158 [ --enable-clobber intercept mouse events to clients when num lock
159 or scroll lock are on [default=yes]],
160 if test x$enableval = "xno"; then
161 AC_MSG_RESULT([no])
162 CLOBBER="-DNOCLOBBER"
163 else
164 AC_MSG_RESULT([yes])
165 fi,
166 AC_MSG_RESULT([no])
167 )
168 AC_SUBST(CLOBBER)
169
170 dnl Check whether to include debugging code
171 DEBUG=""
172 AC_MSG_CHECKING([whether to include verbose debugging code])
173 AC_ARG_ENABLE(debug,
174 [ --enable-debug include verbose debugging code [default=no]],
175 if test x$enableval = "xyes"; then
176 AC_MSG_RESULT([yes])
177 DEBUG="-DDEBUG"
178 else
179 AC_MSG_RESULT([no])
180 fi,
181 AC_MSG_RESULT([no])
182 )
183 AC_SUBST(DEBUG)
184
185 dnl Check whether to include natural language support (i18n)
186 NLS=""
187 AC_MSG_CHECKING([whether to include NLS support])
188 AC_ARG_ENABLE(nls,
189 [ --enable-nls include natural language support [default=yes]],
190 if test x$enableval = "xyes"; then
191 AC_MSG_RESULT([yes])
192 NLS="-DNLS"
193 else
194 AC_MSG_RESULT([no])
195 fi,
196 AC_MSG_RESULT([yes])
197 NLS="-DNLS"
198 )
199 AC_SUBST(NLS)
200
201 AC_CHECK_LIB(xpg4, setlocale, LIBS="$LIBS -lxpg4")
202
203 AC_CHECK_PROGS(gencat_cmd, gencat)
204 if test x$gencat_cmd = "x"; then
205 NLS=""
206 fi
207
208
209 dnl Check for new timed pixmap cache
210 TIMEDCACHE=""
211 AC_MSG_CHECKING([whether to use the new timed pixmap cache])
212 AC_ARG_ENABLE(
213 timed-cache,
214 [ --enable-timed-cache use new timed pixmap cache [default=yes]],
215 if test x$enableval = "xyes"; then
216 AC_MSG_RESULT([yes])
217 TIMEDCACHE="-DTIMEDCACHE"
218 else
219 AC_MSG_RESULT([no])
220 fi,
221 AC_MSG_RESULT([yes])
222 TIMEDCACHE="-DTIMEDCACHE"
223 )
224 AC_SUBST(TIMEDCACHE)
225
226 dnl Determine the return type of signal handlers
227 AC_TYPE_SIGNAL
228
229 dnl Determine if maintainer portions of the Makefiles should be included.
230 AM_MAINTAINER_MODE
231
232 dnl Print results
233 AC_MSG_RESULT([])
234 AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully.])
235 AC_MSG_RESULT([])
236 AC_MSG_RESULT([Using '$prefix' for installation.])
237 AC_MSG_RESULT([Using '$CXX' for C++ compiler.])
238 AC_MSG_RESULT([Building with '$CXXFLAGS' for C++ compiler flags.])
239 AC_MSG_RESULT([Building with '$LIBS' for linker flags.])
240 AC_MSG_RESULT([])
241
242 dnl Output files
243 AM_CONFIG_HEADER(config.h)
244 AC_OUTPUT(Makefile
245 src/Makefile
246 util/Makefile
247 data/Makefile
248 data/styles/Makefile
249 doc/Makefile
250 dnl doc/ja_JP/Makefile
251 dnl doc/nl_NL/Makefile
252 dnl doc/sl_SI/Makefile
253 nls/Makefile
254 nls/C/Makefile
255 nls/da_DK/Makefile
256 nls/de_DE/Makefile
257 nls/es_ES/Makefile
258 nls/et_EE/Makefile
259 nls/fr_FR/Makefile
260 nls/it_IT/Makefile
261 nls/ja_JP/Makefile
262 nls/nl_NL/Makefile
263 nls/pt_BR/Makefile
264 nls/ru_RU/Makefile
265 nls/sl_SI/Makefile
266 nls/sv_SE/Makefile
267 nls/tr_TR/Makefile
268 nls/zh_CN/Makefile
269 version.h)
This page took 0.048557 seconds and 5 git commands to generate.