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