ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/configure.ac
Revision: 1.144
Committed: Tue Jun 19 18:17:56 2012 UTC (11 years, 11 months ago) by root
Branch: MAIN
Changes since 1.143: +17 -0 lines
Log Message:
*** empty log message ***

File Contents

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