]> Dogcows Code - chaz/openbox/blob - configure.in
fixed typo
[chaz/openbox] / configure.in
1 dnl configure.in for Openbox
2 dnl Initialize autoconf and automake
3 AC_INIT(src/blackbox.cc)
4 AM_INIT_AUTOMAKE(openbox,2.2.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_CHECK_PROGS(regex_cmd, sed)
19 if test x$regex_cmd = "x"; then
20 AC_MSG_ERROR([error. sed is required to build the default menu file.])
21 fi
22
23 dnl Check for system header files
24 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)
25 AC_HEADER_TIME
26
27 dnl Check for existance of basename(), setlocale() and strftime()
28 AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename,
29 AC_DEFINE(HAVE_BASENAME) LIBS="$LIBS -lgen"))
30 AC_CHECK_FUNCS(getpid setlocale sigaction strftime strcasestr snprintf vsnprintf catopen catgets catclose)
31 AC_CHECK_LIB(nsl, t_open, LIBS="$LIBS -lnsl")
32 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
33
34 dnl Check for X headers and libraries
35 AC_PATH_X
36 AC_PATH_XTRA
37
38 test "$no_x" = "yes" && AC_MSG_ERROR([Openbox requires the X Window System libraries and headers.])
39
40 test x$x_includes = "x" && x_includes="/usr/include"
41 test x$x_libraries = "x" && x_libraries="/usr/lib"
42
43 CFLAGS="$CFLAGS $X_CFLAGS"
44 CXXFLAGS="$CXXFLAGS $X_CFLAGS"
45 LIBS="$LIBS $X_LIBS"
46 LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS"
47
48 AC_MSG_CHECKING(for GCC)
49 if test "$GCC" = "yes"; then
50 AC_MSG_RESULT([yes])
51 CXXFLAGS="${CXXFLAGS} -Wall -W"
52 else
53 AC_MSG_RESULT([no, trying other compilers])
54 AC_MSG_CHECKING(for MIPSpro)
55 mips_pro_ver=`$CC -version 2>&1 | grep -i mipspro | cut -f4 -d ' '`
56 if test "x$mips_pro_ver" = "x"; then
57 AC_MSG_RESULT([no])
58 else
59 AC_MSG_RESULT([yes, version $mips_pro_ver.])
60 AC_MSG_CHECKING(for -LANG:std in CXXFLAGS)
61 lang_std_not_set=`echo $CXXFLAGS | grep "\-LANG:std"`
62 if test "x$lang_std_not_set" = "x"; then
63 AC_MSG_RESULT([not set, setting.])
64 CXXFLAGS="${CXXFLAGS} -LANG:std"
65 else
66 AC_MSG_RESULT([already set.])
67 fi
68 fi
69 fi
70
71 dnl Check for required functions in -lX11
72 AC_CHECK_LIB(X11, XOpenDisplay,
73 LIBS="$LIBS -lX11",
74 AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.])
75 )
76
77 LIBS="$LIBS $X_EXTRA_LIBS"
78
79 dnl Check for XShape extension support and proper library files.
80 SHAPE=""
81 AC_MSG_CHECKING([whether to build support for the XShape extension])
82 AC_ARG_ENABLE(
83 shape, [ --enable-shape enable support of the XShape extension [default=yes]])
84
85 : ${enableval="yes"}
86 if test "$enableval" = "yes"; then
87 AC_MSG_RESULT([yes])
88 AC_CHECK_LIB(Xext, XShapeCombineShape,
89 AC_MSG_CHECKING([for X11/extensions/shape.h])
90 AC_TRY_LINK(
91 #include <X11/Xlib.h>
92 #include <X11/Xutil.h>
93 #include <X11/extensions/shape.h>
94 , long foo = ShapeSet,
95 AC_MSG_RESULT([yes])
96 SHAPE="yes",
97 AC_MSG_RESULT([no])
98 )
99 )
100 else
101 AC_MSG_RESULT([no])
102 fi
103 if test "$SHAPE" = "yes"; then
104 LIBS="$LIBS -lXext"
105 AC_DEFINE(SHAPE,1,Enable support of the XShape extension)
106 fi
107
108 dnl Check for Xinerama extension support and proper library files.
109 XINERAMA=""
110 AC_MSG_CHECKING([whether to build support for the Xinerama extension])
111 AC_ARG_ENABLE(
112 xinerama, [ --enable-xinerama enable support of the Xinerama extension [default=no]],
113 if test "$enableval" = "yes"; then
114 AC_MSG_RESULT([yes])
115
116 AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
117 AC_MSG_CHECKING([for X11/extensions/Xinerama.h])
118 AC_TRY_LINK(
119 #include <X11/Xlib.h>
120 #include <X11/extensions/Xinerama.h>
121 , XineramaScreenInfo foo,
122 AC_MSG_RESULT([yes])
123 XINERAMA="yes"
124 LIBS="$LIBS -lXinerama",
125 AC_MSG_RESULT([no])
126 )
127 )
128
129 else
130 AC_MSG_RESULT([no])
131 fi,
132 AC_MSG_RESULT([no])
133 )
134 if test "$XINERAMA" = "yes"; then
135 AC_DEFINE(XINERAMA,1,Enable support of the Xinerama extension)
136 fi
137
138 dnl Check for Xft extension support and proper library files.
139 XFT=""
140 XFT_UTF8=""
141 AC_MSG_CHECKING([whether to build support for the Xft extension])
142 AC_ARG_ENABLE(
143 xft, [ --enable-xft enable support of the Xft extension [default=yes]])
144 : ${enableval="yes"}
145 if test "$enableval" = "yes"; then
146 AC_MSG_RESULT([yes])
147
148 AC_CHECK_LIB(Xft, XftFontOpenXlfd,
149 AC_MSG_CHECKING([for X11/Xft/Xft.h])
150 AC_TRY_LINK(
151 #include <X11/Xlib.h>
152 #include <X11/Xft/Xft.h>
153 , XftFont foo,
154 AC_MSG_RESULT([yes])
155 XFT="yes"
156 LIBS="$LIBS -lXft"
157
158 dnl Check for utf8 support in the Xft library
159 AC_CHECK_LIB(Xft, XftDrawStringUtf8,
160 XFT_UTF8="yes",
161 ),
162
163 AC_MSG_RESULT([no])
164 )
165 )
166
167 else
168 AC_MSG_RESULT([no])
169 fi
170 if test "$XFT" = "yes"; then
171 AC_DEFINE(XFT,1,[Enable support of the Xft extension])
172 if test "$XFT_UTF8" = "yes"; then
173 AC_DEFINE(XFT_UTF8,1,[Support for Utf8 text in the Xft extension])
174 fi
175 fi
176
177 dnl Check for ordered 8bpp dithering
178 ORDEREDPSEUDO=""
179 AC_MSG_CHECKING([whether to include Pseudocolor ordered dithering code])
180 AC_ARG_ENABLE(ordered-pseudo,
181 [ --enable-ordered-pseudo include code for ordered pseudocolor (8bpp)
182 dithering [default=no]],
183 if test "$enableval" = "yes"; then
184 AC_MSG_RESULT([yes])
185 ORDEREDPSEUDO="yes"
186 else
187 AC_MSG_RESULT([no])
188 fi,
189 AC_MSG_RESULT([no])
190 )
191 if test "$ORDEREDPSEUDO" = "yes"; then
192 AC_DEFINE(ORDEREDPSEUDO,1,Enable pseudocolor ordered dithering)
193 fi
194
195 dnl Check whether to include debugging code
196 DEBUG=""
197 AC_MSG_CHECKING([whether to include verbose debugging code])
198 AC_ARG_ENABLE(debug,
199 [ --enable-debug include verbose debugging code [default=no]],
200 if test "$enableval" = "yes"; then
201 AC_MSG_RESULT([yes])
202 if test "$GCC" = "yes"; then
203 DEBUG="-DDEBUG -fno-inline -g"
204 else
205 DEBUG="-DDEBUG"
206 fi
207 else
208 AC_MSG_RESULT([no])
209 DEBUG="-DNDEBUG"
210 fi,
211 AC_MSG_RESULT([no])
212 DEBUG="-DNDEBUG"
213 )
214 AC_SUBST(DEBUG)
215
216 dnl Check whether to include natural language support (i18n)
217 NLS=""
218 AC_MSG_CHECKING([whether to include NLS support])
219 AC_ARG_ENABLE(nls,
220 [ --enable-nls include natural language support [default=yes]],
221 if test "$enableval" = "yes"; then
222 AC_MSG_RESULT([yes])
223 NLS="yes"
224 else
225 AC_MSG_RESULT([no])
226 fi,
227 AC_MSG_RESULT([yes])
228 NLS="yes"
229 )
230
231 AC_CHECK_LIB(xpg4, setlocale, LIBS="$LIBS -lxpg4")
232
233 AC_CHECK_PROGS(gencat_cmd, gencat)
234 if test x$gencat_cmd = "x"; then
235 NLS=""
236 fi
237
238 if test "$NLS" = "yes"; then
239 AC_DEFINE(NLS,1,Include natural language support)
240 AC_SUBST(NLS)
241 fi
242
243 dnl Check for new timed pixmap cache
244 TIMEDCACHE=""
245 AC_MSG_CHECKING([whether to use the timed pixmap cache])
246 AC_ARG_ENABLE(
247 timed-cache,
248 [ --enable-timed-cache use timed pixmap cache [default=yes]],
249 if test "$enableval" = "yes"; then
250 AC_MSG_RESULT([yes])
251 TIMEDCACHE="yes"
252 else
253 AC_MSG_RESULT([no])
254 fi,
255 AC_MSG_RESULT([yes])
256 TIMEDCACHE="yes"
257 )
258 if test "$TIMEDCACHE" = "yes"; then
259 AC_DEFINE(TIMEDCACHE,1,Use timed pixmap cache)
260 fi
261
262 dnl Check for bitmapped buttons
263 BITMAPBUTTONS=""
264 AC_MSG_CHECKING([whether to include bitmappable buttons])
265 AC_ARG_ENABLE(
266 bitmap-buttons,
267 [ --enable-bitmap-buttons include bitmappable buttons [default=yes]],
268 if test x$enableval = "xyes"; then
269 AC_MSG_RESULT([yes])
270 BITMAPBUTTONS="yes"
271 else
272 AC_MSG_RESULT([no])
273 fi,
274 AC_MSG_RESULT([yes])
275 BITMAPBUTTONS="yes"
276 )
277 if test x$BITMAPBUTTONS = "xyes"; then
278 AC_DEFINE(BITMAPBUTTONS,1,Include bitmappable buttons)
279 fi
280
281 dnl Determine the return type of signal handlers
282 AC_TYPE_SIGNAL
283
284 dnl Determine if maintainer portions of the Makefiles should be included.
285 AM_MAINTAINER_MODE
286
287 dnl Print results
288 AC_MSG_RESULT([])
289 AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully.])
290 AC_MSG_RESULT([])
291 AC_MSG_RESULT([Using '$prefix' for installation.])
292 AC_MSG_RESULT([Using '$CXX' for C++ compiler.])
293 AC_MSG_RESULT([Building with '$CXXFLAGS' for C++ compiler flags.])
294 AC_MSG_RESULT([Building with '$LIBS' for linker flags.])
295 AC_MSG_RESULT([])
296
297 dnl Output files
298 AM_CONFIG_HEADER(config.h)
299 AC_OUTPUT(Makefile
300 src/Makefile
301 util/Makefile
302 util/epist/Makefile
303 data/Makefile
304 data/styles/Makefile
305 doc/Makefile
306 nls/Makefile
307 nls/C/Makefile
308 nls/da_DK/Makefile
309 nls/de_DE/Makefile
310 nls/es_AR/Makefile
311 nls/es_ES/Makefile
312 nls/et_EE/Makefile
313 nls/fr_FR/Makefile
314 nls/hu_HU/Makefile
315 nls/it_IT/Makefile
316 nls/ja_JP/Makefile
317 nls/ko_KR/Makefile
318 nls/lv_LV/Makefile
319 nls/no_NO/Makefile
320 nls/pl_PL/Makefile
321 nls/nl_NL/Makefile
322 nls/pt_BR/Makefile
323 nls/ro_RO/Makefile
324 nls/ru_RU/Makefile
325 nls/sk_SK/Makefile
326 nls/sl_SI/Makefile
327 nls/sv_SE/Makefile
328 nls/tr_TR/Makefile
329 nls/uk_UA/Makefile
330 nls/zh_CN/Makefile
331 nls/zh_TW/Makefile
332 version.h)
This page took 0.045608 seconds and 4 git commands to generate.