1 |
dnl# |
2 |
dnl# Process this file with autoconf to produce a configure script. |
3 |
dnl# |
4 |
|
5 |
AC_INIT |
6 |
AC_PREREQ(2.50) |
7 |
AC_CONFIG_SRCDIR([src/feature.h]) |
8 |
AC_CONFIG_HEADER(config.h:config.h.in) |
9 |
|
10 |
AC_CANONICAL_HOST |
11 |
|
12 |
dnl RXVT version |
13 |
changequote(, )dnl |
14 |
VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
15 |
DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
16 |
changequote([, ])dnl |
17 |
AC_SUBST(VERSION)dnl |
18 |
AC_SUBST(DATE)dnl |
19 |
|
20 |
echo "" |
21 |
echo "configuring for rxvt $VERSION" |
22 |
echo "" |
23 |
|
24 |
orig_CXXFLAGS="$CXXFLAGS" |
25 |
|
26 |
dnl# Checks for programs. |
27 |
AC_PROG_CC |
28 |
AC_PROG_CXX |
29 |
AC_PROG_CPP |
30 |
AC_PROG_INSTALL |
31 |
|
32 |
AC_AIX |
33 |
AC_GNU_SOURCE |
34 |
AC_ISC_POSIX |
35 |
AC_LANG(C++) |
36 |
|
37 |
dnl check whether we can link with gcc -lsupc++ |
38 |
if test x$GCC = xyes && test x$GXX = xyes; then |
39 |
dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it |
40 |
AC_MSG_CHECKING([for working libsupc++]) |
41 |
save_CXX="$CXX" |
42 |
save_LIBS="$LIBS" |
43 |
CXX="$CC" |
44 |
LIBS="$LIBS -lsupc++" |
45 |
LINKER="$CC" |
46 |
AC_LINK_IFELSE( |
47 |
[AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])], |
48 |
[AC_MSG_RESULT(ok)], |
49 |
[ |
50 |
AC_MSG_RESULT([no, making everything bigger and slower]) |
51 |
LIBS="$save_LIBS" |
52 |
LINKER="$save_CXX" |
53 |
] |
54 |
) |
55 |
CXX="$save_CXX" |
56 |
fi |
57 |
AC_SUBST(LINKER,[$LINKER]) |
58 |
|
59 |
dnl# -------------------------------------------------------------------------- |
60 |
dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
61 |
dnl# |
62 |
if test -z "$orig_CXXFLAGS"; then |
63 |
if test x$GCC = xyes && test "x$GXX" = xyes; then |
64 |
CXXFLAGS="-g -O3 -fno-rtti -fvisibility-inlines-hidden -fno-threadsafe-statics -fno-enforce-eh-specs" |
65 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
66 |
else |
67 |
CXXFLAGS="-O" |
68 |
fi |
69 |
CFLAGS="$CXXFLAGS" |
70 |
fi |
71 |
|
72 |
case $host in |
73 |
*-*-solaris* ) |
74 |
AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) |
75 |
;; |
76 |
esac |
77 |
|
78 |
dnl# FreeBSD needs to link libxpg4 |
79 |
AC_SEARCH_LIBS(setlocale, xpg4) |
80 |
|
81 |
dnl# solaris needs to link libnsl and socket |
82 |
AC_SEARCH_LIBS(gethostbyname, nsl) |
83 |
AC_SEARCH_LIBS(socket, socket) |
84 |
|
85 |
support_frills=yes |
86 |
support_inheritpixmap=yes |
87 |
support_fading=yes |
88 |
support_keepscrolling=yes |
89 |
support_selectionscrolling=yes |
90 |
support_mousewheel=yes |
91 |
support_mouseslipwheel=yes |
92 |
support_text_blink=yes |
93 |
support_pointer_blank=yes |
94 |
support_scroll_rxvt=yes |
95 |
support_scroll_next=yes |
96 |
support_scroll_xterm=yes |
97 |
support_xim=yes |
98 |
support_afterimage=yes |
99 |
support_xft=yes |
100 |
support_unicode3=no |
101 |
support_combining=yes |
102 |
support_8bitctrls=no |
103 |
support_iso14755=yes |
104 |
support_styles=yes |
105 |
support_perl=yes |
106 |
codesets=all |
107 |
|
108 |
dnl# -------------------------------------------------------------------------- |
109 |
dnl# CHECKING COMMAND LINE OPTIONS |
110 |
dnl# -------------------------------------------------------------------------- |
111 |
|
112 |
AC_ARG_ENABLE(everything, |
113 |
[ --enable-everything enable standard non-multichoice features |
114 |
NOTE: this option is order dependent], |
115 |
[ |
116 |
if test x$enableval = xno; then |
117 |
support_frills=no |
118 |
support_inheritpixmap=no |
119 |
support_fading=no |
120 |
support_keepscrolling=no |
121 |
support_selectionscrolling=no |
122 |
support_lastlog=no |
123 |
support_mousewheel=no |
124 |
support_mouseslipwheel=no |
125 |
support_text_blink=no |
126 |
support_pointer_blank=no |
127 |
support_scroll_rxvt=no |
128 |
support_scroll_next=no |
129 |
support_scroll_xterm=no |
130 |
support_utmp=no |
131 |
support_wtmp=no |
132 |
support_xim=no |
133 |
support_afterimage=no |
134 |
support_xft=no |
135 |
support_unicode3=no |
136 |
support_combining=no |
137 |
support_8bitctrls=no |
138 |
support_iso14755=no |
139 |
support_styles=no |
140 |
support_perl=no |
141 |
codesets= |
142 |
fi |
143 |
if test x$enableval = xyes; then |
144 |
support_frills=yes |
145 |
support_inheritpixmap=yes |
146 |
support_fading=yes |
147 |
support_keepscrolling=yes |
148 |
support_selectionscrolling=yes |
149 |
support_lastlog=yes |
150 |
support_mousewheel=yes |
151 |
support_mouseslipwheel=yes |
152 |
support_text_blink=yes |
153 |
support_pointer_blank=yes |
154 |
support_scroll_rxvt=yes |
155 |
support_scroll_next=yes |
156 |
support_scroll_xterm=yes |
157 |
support_utmp=yes |
158 |
support_wtmp=yes |
159 |
support_xim=yes |
160 |
support_afterimage=yes |
161 |
support_xft=yes |
162 |
support_unicode3=yes |
163 |
support_combining=yes |
164 |
#support_8bitctrls=yes |
165 |
support_iso14755=yes |
166 |
support_styles=yes |
167 |
support_perl=yes |
168 |
codesets=all |
169 |
fi |
170 |
]) |
171 |
|
172 |
ASSERTIONS=no |
173 |
AC_ARG_ENABLE(assert, |
174 |
[ --enable-assert enable assertions], |
175 |
[if test x$enableval = xyes; then |
176 |
ASSERTIONS=yes |
177 |
fi]) |
178 |
if test x$ASSERTIONS = xno; then |
179 |
AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging)) |
180 |
fi |
181 |
|
182 |
WARNINGS=no |
183 |
AC_ARG_ENABLE(warnings, |
184 |
[ --enable-warnings turn on g++ warnings], |
185 |
[if test x$enableval = xyes; then |
186 |
WARNINGS=yes |
187 |
fi]) |
188 |
if test x$GXX = xyes; then |
189 |
if test $WARNINGS = yes; then |
190 |
save_CXXFLAGS="$CXXFLAGS" |
191 |
CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" |
192 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
193 |
else |
194 |
CXXFLAGS="$CXXFLAGS -w" |
195 |
fi |
196 |
fi |
197 |
|
198 |
support_256_color=no |
199 |
AC_ARG_ENABLE(256-color, |
200 |
[ --enable-256-color enable 256-color support], |
201 |
[if test x$enableval = xyes; then |
202 |
support_256_color=yes |
203 |
fi]) |
204 |
if test x$support_256_color = xyes; then |
205 |
AC_DEFINE(USE_256_COLORS, 1, Define if you want 256-color support) |
206 |
fi |
207 |
|
208 |
AC_ARG_ENABLE(unicode3, |
209 |
[ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
210 |
[if test x$enableval = xyes -o x$enableval = xno; then |
211 |
support_unicode3=$enableval |
212 |
fi]) |
213 |
|
214 |
AC_ARG_ENABLE(combining, |
215 |
[ --enable-combining enable composition of base and combining characters], |
216 |
[if test x$enableval = xyes -o x$enableval = xno; then |
217 |
support_combining=$enableval |
218 |
fi]) |
219 |
|
220 |
AC_ARG_ENABLE(xft, |
221 |
[ --enable-xft enable xft support on systems that have it], |
222 |
[if test x$enableval = xyes -o x$enableval = xno; then |
223 |
support_xft=$enableval |
224 |
fi]) |
225 |
|
226 |
AC_ARG_ENABLE(font-styles, |
227 |
[ --enable-font-styles enable bold and italic support], |
228 |
[if test x$enableval = xyes -o x$enableval = xno; then |
229 |
support_styles=$enableval |
230 |
fi]) |
231 |
|
232 |
AC_ARG_ENABLE(afterimage, |
233 |
[ --enable-afterimage enable integration with libAfterImage for background images], |
234 |
[if test x$enableval = xyes -o x$enableval = xno; then |
235 |
support_afterimage=$enableval |
236 |
fi]) |
237 |
|
238 |
AC_ARG_WITH(afterimage_config, |
239 |
[ --with-afterimage-config=DIR use libAfterImage config script in DIR], |
240 |
[if test "x$withval" != x; then |
241 |
afterimage_config=$withval/afterimage-config |
242 |
fi]) |
243 |
|
244 |
AC_ARG_ENABLE(pixbuf, |
245 |
[ --enable-pixbuf enable integration with gdk-pixbuf for background images], |
246 |
[if test x$enableval = xyes -o x$enableval = xno; then |
247 |
support_pixbuf=$enableval |
248 |
fi]) |
249 |
|
250 |
AC_ARG_ENABLE(transparency, |
251 |
[ --enable-transparency enable transparent backgrounds], |
252 |
[if test x$enableval = xyes -o x$enableval = xno; then |
253 |
support_inheritpixmap=$enableval |
254 |
fi]) |
255 |
|
256 |
AC_ARG_ENABLE(fading, |
257 |
[ --enable-fading enable colors fading when off focus], |
258 |
[if test x$enableval = xyes -o x$enableval = xno; then |
259 |
support_fading=$enableval |
260 |
fi]) |
261 |
|
262 |
AC_ARG_ENABLE(rxvt-scroll, |
263 |
[ --enable-rxvt-scroll enable rxvt style scrollbar], |
264 |
[if test x$enableval = xyes -o x$enableval = xno; then |
265 |
support_scroll_rxvt=$enableval |
266 |
fi]) |
267 |
|
268 |
AC_ARG_ENABLE(next-scroll, |
269 |
[ --enable-next-scroll enable NeXT style scrollbar], |
270 |
[if test x$enableval = xyes -o x$enableval = xno; then |
271 |
support_scroll_next=$enableval |
272 |
fi]) |
273 |
|
274 |
AC_ARG_ENABLE(xterm-scroll, |
275 |
[ --enable-xterm-scroll enable Xterm style scrollbar], |
276 |
[if test x$enableval = xyes -o x$enableval = xno; then |
277 |
support_scroll_xterm=$enableval |
278 |
fi]) |
279 |
|
280 |
AC_ARG_ENABLE(perl, |
281 |
[ --enable-perl enable embedded perl interpreter], |
282 |
[if test x$enableval = xyes -o x$enableval = xno; then |
283 |
support_perl=$enableval |
284 |
fi]) |
285 |
|
286 |
AC_ARG_WITH(codesets, |
287 |
[ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
288 |
[codesets="$withval"]) |
289 |
|
290 |
AC_ARG_ENABLE(xim, |
291 |
[ --enable-xim XIM (X Input Method) protocol support], |
292 |
[if test x$enableval = xyes -o x$enableval = xno; then |
293 |
support_xim=$enableval |
294 |
fi]) |
295 |
|
296 |
AC_ARG_ENABLE(backspace-key, |
297 |
[ --disable-backspace-key disable handling of the backspace key], |
298 |
[if test x$enableval = xno; then |
299 |
AC_DEFINE(NO_BACKSPACE_KEY, 1, Define if you don't want support for the backspace key) |
300 |
fi]) |
301 |
|
302 |
AC_ARG_ENABLE(delete-key, |
303 |
[ --disable-delete-key disable handling of the delete key], |
304 |
[if test x$enableval = xno; then |
305 |
AC_DEFINE(NO_DELETE_KEY, 1, Define if you don't want support for the (non-keypad) delete key) |
306 |
fi]) |
307 |
|
308 |
AC_ARG_ENABLE(resources, |
309 |
[ --disable-resources disable all resource checking], |
310 |
[if test x$enableval = xno; then |
311 |
AC_DEFINE(NO_RESOURCES, 1, Define if you don't want any resources read) |
312 |
fi]) |
313 |
|
314 |
AC_ARG_ENABLE(8bitctrls, |
315 |
[ --enable-8bitctrls enable 8 bit control sequences (not recommended)], |
316 |
[if test x$enableval = xyes -o x$enableval = xno; then |
317 |
support_8bitctrls=$enableval |
318 |
fi]) |
319 |
|
320 |
RESFALLBACK=Rxvt |
321 |
AC_ARG_ENABLE(fallback, |
322 |
[ --enable-fallback@<:@=CLASS@:>@ fall back on CLASS resources in addition to URxvt ones (default: Rxvt)], |
323 |
[ |
324 |
test x$enableval = xyes && enableval=Rxvt |
325 |
test x$enableval = xno && enableval= |
326 |
RESFALLBACK="$enableval" |
327 |
]) |
328 |
|
329 |
if test x$RESFALLBACK != x; then |
330 |
AC_DEFINE_UNQUOTED(RESFALLBACK, "$RESFALLBACK", [Fallback resource class]) |
331 |
fi |
332 |
|
333 |
RESNAME=urxvt |
334 |
AC_ARG_WITH(res-name, |
335 |
[ --with-res-name=NAME use this as default resource name (default: urxvt)], |
336 |
[RESNAME="$withval"]) |
337 |
AC_DEFINE_UNQUOTED(RESNAME,"$RESNAME", [Default resource name]) |
338 |
|
339 |
RESCLASS=URxvt |
340 |
AC_ARG_WITH(res-class, |
341 |
[ --with-res-class=CLASS use this as the resource class (default: URxvt)], |
342 |
[RESCLASS="$withval"]) |
343 |
AC_DEFINE_UNQUOTED(RESCLASS,"$RESCLASS", [Resource class]) |
344 |
|
345 |
RXVTNAME=urxvt |
346 |
AC_ARG_WITH(name, |
347 |
[ --with-name=NAME set the basename for the installed binaries (default: urxvt)], |
348 |
[RXVTNAME="$withval"]) |
349 |
AC_DEFINE_UNQUOTED(RXVTNAME,"$RXVTNAME", [Binary base name]) |
350 |
|
351 |
AC_SUBST(RXVTNAME) |
352 |
|
353 |
AC_ARG_ENABLE(swapscreen, |
354 |
[ --disable-swapscreen disable swap screen support], |
355 |
[if test x$enableval = xno; then |
356 |
AC_DEFINE(NO_SECONDARY_SCREEN, 1, Disable the secondary screen. Many programs use the secondary screen as their workplace) |
357 |
fi]) |
358 |
|
359 |
AC_ARG_ENABLE(iso14755, |
360 |
[ --enable-iso14755 enable support for extended ISO 14755 modes], |
361 |
[if test x$enableval = xyes -o x$enableval = xno; then |
362 |
support_iso14755=$enableval |
363 |
fi]) |
364 |
|
365 |
AC_ARG_ENABLE(frills, |
366 |
[ --enable-frills enable support for rarely used features], |
367 |
[if test x$enableval = xyes -o x$enableval = xno; then |
368 |
support_frills=$enableval |
369 |
fi]) |
370 |
|
371 |
AC_ARG_ENABLE(keepscrolling, |
372 |
[ --enable-keepscrolling enable continual scrolling on scrollbar arrow press], |
373 |
[if test x$enableval = xyes -o x$enableval = xno; then |
374 |
support_keepscrolling=$enableval |
375 |
fi]) |
376 |
|
377 |
AC_ARG_ENABLE(selectionscrolling, |
378 |
[ --enable-selectionscrolling enable scrolling during selections], |
379 |
[if test x$enableval = xyes -o x$enableval = xno; then |
380 |
support_selectionscrolling=$enableval |
381 |
fi]) |
382 |
|
383 |
AC_ARG_ENABLE(mousewheel, |
384 |
[ --enable-mousewheel enable scrolling via mouse wheel or buttons 4 & 5], |
385 |
[if test x$enableval = xyes -o x$enableval = xno; then |
386 |
support_mousewheel=$enableval |
387 |
fi]) |
388 |
|
389 |
AC_ARG_ENABLE(slipwheeling, |
390 |
[ --enable-slipwheeling enable slip wheel scrolling (requires --enable-mousewheel)], |
391 |
[if test x$enableval = xyes -o x$enableval = xno; then |
392 |
support_mouseslipwheel=$enableval |
393 |
fi]) |
394 |
|
395 |
AC_ARG_ENABLE(smart-resize, |
396 |
[ --enable-smart-resize enable smart growth/shrink behaviour], |
397 |
[if test x$enableval = xyes; then |
398 |
AC_DEFINE(SMART_RESIZE, 1, Define to use "smart" resize behavior) |
399 |
fi]) |
400 |
|
401 |
AC_ARG_ENABLE(text-blink, |
402 |
[ --enable-text-blink enable blinking text], |
403 |
[if test x$enableval = xyes -o x$enableval = xno; then |
404 |
support_text_blink=$enableval |
405 |
fi]) |
406 |
|
407 |
AC_ARG_ENABLE(pointer-blank, |
408 |
[ --enable-pointer-blank enable pointer blanking when typing or inactive], |
409 |
[if test x$enableval = xyes -o x$enableval = xno; then |
410 |
support_pointer_blank=$enableval |
411 |
fi]) |
412 |
|
413 |
AC_ARG_WITH(term, |
414 |
[ --with-term=NAME set the terminal to NAME (default: rxvt)], |
415 |
[if test x$withval != x; then |
416 |
AC_DEFINE_UNQUOTED(TERMENV, "$withval",Set TERM to the value given by configure) term="$withval" |
417 |
fi]) |
418 |
|
419 |
AC_ARG_WITH(terminfo, |
420 |
[ --with-terminfo=PATH set the path to the terminfo tree to PATH], |
421 |
[if test x$withval != x; then |
422 |
AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
423 |
fi]) |
424 |
|
425 |
dnl# -------------------------------------------------------------------------- |
426 |
|
427 |
LIBEV_M4_AVOID_LIBRT=1 |
428 |
m4_include([libev/libev.m4]) |
429 |
|
430 |
dnl# -------------------------------------------------------------------------- |
431 |
|
432 |
AC_PATH_PROG(TIC, tic, :) |
433 |
|
434 |
AC_PATH_XTRA |
435 |
|
436 |
PIXBUF_CFLAGS= |
437 |
PIXBUF_LIBS= |
438 |
|
439 |
if test x$support_pixbuf = xyes; then |
440 |
support_pixbuf=no |
441 |
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
442 |
AC_MSG_CHECKING(for gdk-pixbuf) |
443 |
if test $PKG_CONFIG != no && $PKG_CONFIG --exists gdk-pixbuf-xlib-2.0; then |
444 |
PIXBUF_CFLAGS="`$PKG_CONFIG gdk-pixbuf-xlib-2.0 --cflags`" |
445 |
PIXBUF_LIBS="`$PKG_CONFIG gdk-pixbuf-xlib-2.0 --libs`" |
446 |
support_pixbuf=yes |
447 |
fi |
448 |
|
449 |
if test x$support_pixbuf = xyes; then |
450 |
AC_MSG_RESULT(ok) |
451 |
support_afterimage=no |
452 |
AC_DEFINE(HAVE_PIXBUF, 1, Define if you want to use gdk-pixbuf for image processing) |
453 |
AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps.) |
454 |
else |
455 |
AC_MSG_RESULT(no) |
456 |
fi |
457 |
fi |
458 |
|
459 |
AC_SUBST(PIXBUF_CFLAGS) |
460 |
AC_SUBST(PIXBUF_LIBS) |
461 |
|
462 |
AFTERIMAGE_CFLAGS= |
463 |
AFTERIMAGE_LIBS= |
464 |
AFTERIMAGE_VERSION= |
465 |
|
466 |
if test x$support_afterimage = xyes; then |
467 |
support_afterimage=no |
468 |
|
469 |
if test "x$afterimage_config" = "x" ; then |
470 |
AC_PATH_PROG(afterimage_config, afterimage-config, no) |
471 |
fi |
472 |
if test "x$afterimage_config" != "xno" ; then |
473 |
AC_MSG_CHECKING(for libAfterImage version >= 1.15) |
474 |
xAFTERIMAGE_VERSION=`$afterimage_config --version` |
475 |
if test -n "$xAFTERIMAGE_VERSION" ; then |
476 |
xAFTERIMAGE_CFLAGS=`$afterimage_config --cflags` |
477 |
xAFTERIMAGE_LIBS=`$afterimage_config --libs` |
478 |
if test "x$xAFTERIMAGE_LIBS" != "x"; then |
479 |
libai_ver_major=`echo $xAFTERIMAGE_VERSION | cut -f 1 -d .` |
480 |
libai_ver_minor=`echo $xAFTERIMAGE_VERSION | cut -f 2 -d .` |
481 |
if test $libai_ver_major -gt 1 -o \( $libai_ver_major -eq 1 -a $libai_ver_minor -ge 15 \); then |
482 |
support_afterimage=yes |
483 |
AFTERIMAGE_CFLAGS="$xAFTERIMAGE_CFLAGS" |
484 |
AFTERIMAGE_LIBS="$xAFTERIMAGE_LIBS" |
485 |
AFTERIMAGE_VERSION="$xAFTERIMAGE_VERSION" |
486 |
fi |
487 |
fi |
488 |
fi |
489 |
if test "x$support_afterimage" = "xyes"; then |
490 |
AC_MSG_RESULT($AFTERIMAGE_LIBS) |
491 |
AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing) |
492 |
AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps.) |
493 |
else |
494 |
AC_MSG_RESULT(no) |
495 |
fi |
496 |
fi |
497 |
fi |
498 |
|
499 |
AC_SUBST(AFTERIMAGE_CFLAGS) |
500 |
AC_SUBST(AFTERIMAGE_LIBS) |
501 |
|
502 |
dnl# -------------------------------------------------------------------------- |
503 |
dnl# CHECKING FOR HEADER FILES |
504 |
dnl# -------------------------------------------------------------------------- |
505 |
AC_CHECK_HEADERS( \ |
506 |
sys/byteorder.h \ |
507 |
sys/ioctl.h \ |
508 |
sys/sockio.h \ |
509 |
sys/strredir.h \ |
510 |
stdint.h \ |
511 |
wchar.h \ |
512 |
cwchar \ |
513 |
) |
514 |
|
515 |
AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
516 |
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
517 |
if test x$rxvt_cv_xpointer = xyes; then |
518 |
AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
519 |
fi |
520 |
|
521 |
AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_cv_xlib_illegal_access, |
522 |
[AC_COMPILE_IFELSE( |
523 |
[AC_LANG_PROGRAM([ |
524 |
#define XLIB_ILLEGAL_ACCESS |
525 |
#include <X11/Xlib.h> |
526 |
],[ |
527 |
Display *dpy; |
528 |
dpy->xdefaults = (char *)0; |
529 |
])], |
530 |
[rxvt_cv_xlib_illegal_access=yes],[rxvt_cv_xlib_illegal_access=no] |
531 |
)]) |
532 |
if test x$rxvt_cv_xlib_illegal_access = xyes; then |
533 |
AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
534 |
fi |
535 |
|
536 |
dnl# -------------------------------------------------------------------------- |
537 |
dnl# CHECKING FOR MISSING TYPEDEFS |
538 |
dnl# -------------------------------------------------------------------------- |
539 |
dnl# Missing typedefs and replacements |
540 |
AC_TYPE_MODE_T |
541 |
AC_TYPE_PID_T |
542 |
AC_TYPE_UID_T |
543 |
AC_TYPE_INT16_T |
544 |
AC_TYPE_UINT16_T |
545 |
AC_TYPE_INT32_T |
546 |
AC_TYPE_UINT32_T |
547 |
|
548 |
dnl# -------------------------------------------------------------------------- |
549 |
dnl# CHECKING FOR LIBRARY FUNCTIONS |
550 |
dnl# -------------------------------------------------------------------------- |
551 |
AC_CHECK_FUNCS(unsetenv) |
552 |
|
553 |
UTMP_CHECK |
554 |
|
555 |
dnl# -------------------------------------------------------------------------- |
556 |
|
557 |
dnl# -------------------------------------------------------------------------- |
558 |
dnl# -------------------------------------------------------------------------- |
559 |
|
560 |
dnl# this is a really hack test for some basic Xlocale stuff |
561 |
save_LIBS=$LIBS |
562 |
save_CFLAGS=$CFLAGS |
563 |
CFLAGS="$CFLAGS $X_CFLAGS" |
564 |
LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
565 |
if test x$support_xim = xyes; then |
566 |
AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
567 |
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
568 |
#include <stdlib.h> |
569 |
main() { |
570 |
char *p; |
571 |
if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
572 |
exit (XSupportsLocale() ? 0 : 1); |
573 |
else |
574 |
exit (1);}]])],[dnl |
575 |
rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
576 |
:])]) |
577 |
if test x$rxvt_cv_func_xlocale = xyes; then |
578 |
AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
579 |
AC_CACHE_CHECK(for broken XIM callback, rxvt_cv_broken_ximcb, |
580 |
[AC_COMPILE_IFELSE([ |
581 |
#include <X11/Xlib.h> |
582 |
|
583 |
void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); |
584 |
|
585 |
void f() { |
586 |
XIMCallback cb; |
587 |
cb.callback = im_destroy_cb; |
588 |
} |
589 |
],rxvt_cv_broken_ximcb=yes,rxvt_cv_broken_ximcb=no)]) |
590 |
|
591 |
if test x$rxvt_cv_broken_ximcb = xyes; then |
592 |
AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
593 |
fi |
594 |
fi |
595 |
fi |
596 |
|
597 |
AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
598 |
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
599 |
#include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
600 |
if test x$rxvt_cv_func_xsetlocale = xyes; then |
601 |
AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
602 |
fi |
603 |
LIBS=$save_LIBS |
604 |
CFLAGS=$save_CFLAGS |
605 |
|
606 |
AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
607 |
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])]) |
608 |
if test x$rxvt_cv_func_setlocale = xyes; then |
609 |
AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
610 |
fi |
611 |
|
612 |
AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo, |
613 |
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo(CODESET);]])],[rxvt_cv_func_nl_langinfo=yes],[rxvt_cv_func_nl_langinfo=no])]) |
614 |
if test x$rxvt_cv_func_nl_langinfo = xyes; then |
615 |
AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) |
616 |
fi |
617 |
|
618 |
SCM_RIGHTS_CHECK |
619 |
|
620 |
PTY_CHECK |
621 |
|
622 |
TTY_GROUP_CHECK |
623 |
|
624 |
dnl# -------------------------------------------------------------------------- |
625 |
dnl# now add and remove other stuff |
626 |
dnl# -------------------------------------------------------------------------- |
627 |
if test x$support_xft = xyes; then |
628 |
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
629 |
if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
630 |
X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
631 |
CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
632 |
else |
633 |
AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
634 |
if test $XFT_CONFIG != no; then |
635 |
X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
636 |
CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
637 |
fi |
638 |
fi |
639 |
|
640 |
save_LIBS="$LIBS" |
641 |
LIBS="$LIBS $X_LIBS" |
642 |
AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
643 |
AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) |
644 |
LIBS="$save_LIBS" |
645 |
|
646 |
if test x$support_xft = xyes; then |
647 |
AC_DEFINE(XFT, 1, Define to enable xft support) |
648 |
fi |
649 |
fi |
650 |
if test x$support_styles = xyes; then |
651 |
AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support) |
652 |
fi |
653 |
if test x$support_iso14755 = xyes; then |
654 |
AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support) |
655 |
fi |
656 |
if test x$support_8bitctrls = xyes; then |
657 |
AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences) |
658 |
fi |
659 |
if test x$support_fading = xyes; then |
660 |
AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost) |
661 |
fi |
662 |
if test x$support_inheritpixmap = xyes; then |
663 |
AC_DEFINE(ENABLE_TRANSPARENCY, 1, Define if you want your background to use the parent window background) |
664 |
fi |
665 |
if test x$support_keepscrolling = xno; then |
666 |
AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed) |
667 |
fi |
668 |
if test x$support_selectionscrolling = xyes; then |
669 |
AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen) |
670 |
fi |
671 |
if test x$support_frills = xyes; then |
672 |
AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) |
673 |
fi |
674 |
if test x$support_mousewheel = xyes; then |
675 |
AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
676 |
fi |
677 |
if test x$support_mouseslipwheel = xyes; then |
678 |
AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
679 |
fi |
680 |
|
681 |
scrolltypes=plain |
682 |
AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) |
683 |
|
684 |
if test x$support_scroll_rxvt = xyes; then |
685 |
AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) |
686 |
scrolltypes="$scrolltypes rxvt" |
687 |
fi |
688 |
if test x$support_scroll_next = xyes; then |
689 |
AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) |
690 |
scrolltypes="$scrolltypes next" |
691 |
fi |
692 |
if test x$support_scroll_xterm = xyes; then |
693 |
AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) |
694 |
scrolltypes="$scrolltypes xterm" |
695 |
fi |
696 |
if test x$support_pointer_blank = xyes; then |
697 |
AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) |
698 |
fi |
699 |
if test x$support_text_blink = xyes; then |
700 |
AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support) |
701 |
fi |
702 |
if test x$support_unicode3 = xyes; then |
703 |
AC_DEFINE(UNICODE_3, 1, Define if you want to represent unicode characters outside plane 0) |
704 |
fi |
705 |
if test x$support_combining = xyes; then |
706 |
AC_DEFINE(ENABLE_COMBINING, 1, Define if you want to automatically compose combining characters) |
707 |
fi |
708 |
if test x$codesets = xall; then |
709 |
codesets=jp,jp-ext,kr,zh,zh-ext |
710 |
fi |
711 |
AC_DEFINE(ENCODING_EU, 1, Define if you want european extended codesets) |
712 |
AC_DEFINE(ENCODING_VN, 1, Define if you want vietnamese codesets) |
713 |
for codeset in `echo $codesets | tr "[a-z,\\-]" "[A-Z _]"`; do |
714 |
case "$codeset" in |
715 |
JP ) AC_DEFINE(ENCODING_JP, 1, Define if you want japanese codesets) ;; |
716 |
JP_EXT ) AC_DEFINE(ENCODING_JP_EXT, 1, Define if you want extended japanese codesets) ;; |
717 |
KR ) AC_DEFINE(ENCODING_KR, 1, Define if you want korean codesets) ;; |
718 |
ZH ) AC_DEFINE(ENCODING_ZH, 1, Define if you want chinese codesets) ;; |
719 |
ZH_EXT ) AC_DEFINE(ENCODING_ZH_EXT, 1, Define if you want extended chinese codesets) ;; |
720 |
esac |
721 |
done |
722 |
|
723 |
IF_PERL=\# |
724 |
if test x$support_perl = xyes; then |
725 |
AC_PATH_PROG(PERL, perl5) |
726 |
AC_PATH_PROG(PERL, perl) |
727 |
|
728 |
AC_MSG_CHECKING(for $PERL suitability) |
729 |
if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then |
730 |
|
731 |
save_CXXFLAGS="$CXXFLAGS" |
732 |
save_LIBS="$LIBS" |
733 |
CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
734 |
LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
735 |
AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
736 |
#include <EXTERN.h> |
737 |
#include <perl.h> |
738 |
#include <XSUB.h> |
739 |
]], [[ |
740 |
PerlInterpreter *perl = perl_alloc (); |
741 |
]])],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
742 |
CXXFLAGS="$save_CXXFLAGS" |
743 |
LIBS="$save_LIBS" |
744 |
|
745 |
if test x$rxvt_perl_link = xyes; then |
746 |
AC_MSG_RESULT(ok) |
747 |
AC_DEFINE(ENABLE_PERL, 1, Define if you can embed a perl interpreter) |
748 |
IF_PERL= |
749 |
PERL_O=rxvtperl.o |
750 |
PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" |
751 |
PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" |
752 |
PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" |
753 |
else |
754 |
AC_MSG_ERROR([no, unable to link]) |
755 |
fi |
756 |
else |
757 |
AC_MSG_ERROR([no working perl found, or perl not version >= 5.8]) |
758 |
fi |
759 |
fi |
760 |
AC_SUBST(PERLLIB) |
761 |
AC_SUBST(PERLFLAGS) |
762 |
AC_SUBST(PERLPRIVLIBEXP) |
763 |
AC_SUBST(PERL) |
764 |
AC_SUBST(IF_PERL) |
765 |
AC_SUBST(PERL_O) |
766 |
|
767 |
|
768 |
AC_CONFIG_FILES([Makefile \ |
769 |
doc/Makefile \ |
770 |
src/Makefile \ |
771 |
]) |
772 |
AC_OUTPUT |
773 |
|
774 |
echo "Configuration: |
775 |
|
776 |
Rxvt version: $VERSION : $DATE |
777 |
Source code location: $srcdir |
778 |
Install path: ${prefix}/bin |
779 |
Compiler: $CXX |
780 |
Compiler flags: $CXXFLAGS |
781 |
Linker: $LINKER" |
782 |
|
783 |
if test x$term != x; then |
784 |
echo " set TERM to: $term" |
785 |
fi |
786 |
if test x$terminfo != x; then |
787 |
echo " set TERMINFO to: $terminfo" |
788 |
fi |
789 |
echo " default resource name: $RESNAME" |
790 |
echo " resource class: $RESCLASS" |
791 |
if test x$RESFALLBACK != x; then |
792 |
echo " resource class fallback: $RESFALLBACK" |
793 |
fi |
794 |
echo |
795 |
echo " embedded perl: $support_perl" |
796 |
echo " libafterimage: $support_afterimage" |
797 |
echo |
798 |
if test x$support_xim = xyes -a x$rxvt_cv_func_xlocale = xno; then |
799 |
echo ".----------------------------------------------------------------." |
800 |
echo ". WARNING: --enable-xim was specified however the locale support ." |
801 |
echo ". functions could not be found. ." |
802 |
echo ". XIM is now being DISABLED! ." |
803 |
echo ".----------------------------------------------------------------." |
804 |
fi |
805 |
|
806 |
echo "*** Optionally check src/feature.h for further, rarely used options ***" |
807 |
echo |
808 |
|