ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/rxvt-unicode/configure.ac
Revision: 1.155
Committed: Thu May 13 19:24:28 2021 UTC (3 years, 2 months ago) by root
Branch: MAIN
Changes since 1.154: +5 -1 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.71)
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 if test "$ac_prog_cxx_stdcxx" != cxx11; then
37 AC_MSG_ERROR([the compiler does not support C++11])
38 fi
39
40 LINKER="$CXX"
41 dnl check whether we can link with gcc -lsupc++
42 if test x$GCC = xyes && test x$GXX = xyes; then
43 dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it
44 AC_MSG_CHECKING([for working libsupc++])
45 save_CXX="$CXX"
46 save_LIBS="$LIBS"
47 CXX="$CC"
48 LIBS="$LIBS -lsupc++"
49 AC_LINK_IFELSE(
50 [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])],
51 [AC_MSG_RESULT(ok)
52 LINKER="$CC"],
53 [
54 AC_MSG_RESULT([no, making everything bigger and slower])
55 LIBS="$save_LIBS"
56 ]
57 )
58 CXX="$save_CXX"
59 fi
60 AC_SUBST(LINKER,[$LINKER])
61
62 dnl# --------------------------------------------------------------------------
63 dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure'
64 dnl#
65 if test -z "$orig_CXXFLAGS"; then
66 if test x$GCC = xyes && test "x$GXX" = xyes; then
67 CXXFLAGS="-g -O3 -fno-rtti -fvisibility-inlines-hidden -fno-threadsafe-statics -fno-enforce-eh-specs"
68 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"])
69 else
70 CXXFLAGS="-O"
71 fi
72 CFLAGS="$CXXFLAGS"
73 fi
74
75 dnl# FreeBSD needs to link libxpg4
76 AC_SEARCH_LIBS(setlocale, xpg4)
77
78 dnl# solaris needs to link libnsl and socket
79 AC_SEARCH_LIBS(gethostbyname, nsl)
80 AC_SEARCH_LIBS(socket, socket)
81
82 support_frills=yes
83 support_inheritpixmap=yes
84 support_fading=yes
85 support_keepscrolling=yes
86 support_selectionscrolling=yes
87 support_mousewheel=yes
88 support_mouseslipwheel=yes
89 support_text_blink=yes
90 support_pointer_blank=yes
91 support_scroll_rxvt=yes
92 support_scroll_next=yes
93 support_scroll_xterm=yes
94 support_xim=yes
95 support_pixbuf=yes
96 support_startup_notification=yes
97 support_xft=yes
98 support_unicode3=no
99 support_combining=yes
100 support_8bitctrls=no
101 support_iso14755=yes
102 support_styles=yes
103 support_perl=yes
104 codesets=all
105
106 dnl# --------------------------------------------------------------------------
107 dnl# CHECKING COMMAND LINE OPTIONS
108 dnl# --------------------------------------------------------------------------
109
110 AC_ARG_ENABLE(everything,
111 [ --enable-everything enable standard non-multichoice features
112 NOTE: this option is order dependent],
113 [
114 if test x$enableval = xno; then
115 support_frills=no
116 support_inheritpixmap=no
117 support_fading=no
118 support_keepscrolling=no
119 support_selectionscrolling=no
120 support_lastlog=no
121 support_mousewheel=no
122 support_mouseslipwheel=no
123 support_text_blink=no
124 support_pointer_blank=no
125 support_scroll_rxvt=no
126 support_scroll_next=no
127 support_scroll_xterm=no
128 support_utmp=no
129 support_wtmp=no
130 support_xim=no
131 support_pixbuf=no
132 support_startup_notification=no
133 support_xft=no
134 support_unicode3=no
135 support_combining=no
136 support_8bitctrls=no
137 support_iso14755=no
138 support_styles=no
139 support_perl=no
140 codesets=
141 fi
142 if test x$enableval = xyes; then
143 support_frills=yes
144 support_inheritpixmap=yes
145 support_fading=yes
146 support_keepscrolling=yes
147 support_selectionscrolling=yes
148 support_lastlog=yes
149 support_mousewheel=yes
150 support_mouseslipwheel=yes
151 support_text_blink=yes
152 support_pointer_blank=yes
153 support_scroll_rxvt=yes
154 support_scroll_next=yes
155 support_scroll_xterm=yes
156 support_utmp=yes
157 support_wtmp=yes
158 support_xim=yes
159 support_pixbuf=yes
160 support_startup_notification=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 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 support_resources=yes
303 AC_ARG_ENABLE(resources,
304 [ --disable-resources disable all resource checking],
305 [if test x$enableval = xno; then
306 support_resources=no
307 fi])
308
309 AC_ARG_ENABLE(8bitctrls,
310 [ --enable-8bitctrls enable 8 bit control sequences (not recommended)],
311 [if test x$enableval = xyes -o x$enableval = xno; then
312 support_8bitctrls=$enableval
313 fi])
314
315 RESFALLBACK=Rxvt
316 AC_ARG_ENABLE(fallback,
317 [ --enable-fallback@<:@=CLASS@:>@ fall back on CLASS resources in addition to URxvt ones (default: Rxvt)],
318 [
319 test x$enableval = xyes && enableval=Rxvt
320 test x$enableval = xno && enableval=
321 RESFALLBACK="$enableval"
322 ])
323
324 if test x$RESFALLBACK != x; then
325 AC_DEFINE_UNQUOTED(RESFALLBACK, "$RESFALLBACK", [Fallback resource class])
326 fi
327
328 RESNAME=urxvt
329 AC_ARG_WITH(res-name,
330 [ --with-res-name=NAME use this as default resource name (default: urxvt)],
331 [RESNAME="$withval"])
332 AC_DEFINE_UNQUOTED(RESNAME,"$RESNAME", [Default resource name])
333
334 RESCLASS=URxvt
335 AC_ARG_WITH(res-class,
336 [ --with-res-class=CLASS use this as the resource class (default: URxvt)],
337 [RESCLASS="$withval"])
338 AC_DEFINE_UNQUOTED(RESCLASS,"$RESCLASS", [Resource class])
339
340 RXVTNAME=urxvt
341 AC_ARG_WITH(name,
342 [ --with-name=NAME set the basename for the installed binaries (default: urxvt)],
343 [RXVTNAME="$withval"])
344 AC_DEFINE_UNQUOTED(RXVTNAME,"$RXVTNAME", [Binary base name])
345
346 AC_SUBST(RXVTNAME)
347
348 AC_ARG_ENABLE(swapscreen,
349 [ --disable-swapscreen disable swap screen support],
350 [if test x$enableval = xno; then
351 AC_DEFINE(NO_SECONDARY_SCREEN, 1, Disable the secondary screen. Many programs use the secondary screen as their workplace)
352 fi])
353
354 AC_ARG_ENABLE(iso14755,
355 [ --enable-iso14755 enable support for extended ISO 14755 modes],
356 [if test x$enableval = xyes -o x$enableval = xno; then
357 support_iso14755=$enableval
358 fi])
359
360 AC_ARG_ENABLE(frills,
361 [ --enable-frills enable support for rarely used features],
362 [if test x$enableval = xyes -o x$enableval = xno; then
363 support_frills=$enableval
364 fi])
365
366 AC_ARG_ENABLE(keepscrolling,
367 [ --enable-keepscrolling enable continual scrolling on scrollbar arrow press],
368 [if test x$enableval = xyes -o x$enableval = xno; then
369 support_keepscrolling=$enableval
370 fi])
371
372 AC_ARG_ENABLE(selectionscrolling,
373 [ --enable-selectionscrolling enable scrolling during selections],
374 [if test x$enableval = xyes -o x$enableval = xno; then
375 support_selectionscrolling=$enableval
376 fi])
377
378 AC_ARG_ENABLE(mousewheel,
379 [ --enable-mousewheel enable scrolling via mouse wheel or buttons 4 & 5],
380 [if test x$enableval = xyes -o x$enableval = xno; then
381 support_mousewheel=$enableval
382 fi])
383
384 AC_ARG_ENABLE(slipwheeling,
385 [ --enable-slipwheeling enable slip wheel scrolling (requires --enable-mousewheel)],
386 [if test x$enableval = xyes -o x$enableval = xno; then
387 support_mouseslipwheel=$enableval
388 fi])
389
390 AC_ARG_ENABLE(smart-resize,
391 [ --enable-smart-resize enable smart growth/shrink behaviour],
392 [if test x$enableval = xyes; then
393 AC_DEFINE(SMART_RESIZE, 1, Define to use "smart" resize behavior)
394 fi])
395
396 AC_ARG_ENABLE(text-blink,
397 [ --enable-text-blink enable blinking text],
398 [if test x$enableval = xyes -o x$enableval = xno; then
399 support_text_blink=$enableval
400 fi])
401
402 AC_ARG_ENABLE(pointer-blank,
403 [ --enable-pointer-blank enable pointer blanking when typing or inactive],
404 [if test x$enableval = xyes -o x$enableval = xno; then
405 support_pointer_blank=$enableval
406 fi])
407
408 AC_ARG_WITH(term,
409 [ --with-term=NAME set the terminal to NAME (default: rxvt)],
410 [if test x$withval != x; then
411 AC_DEFINE_UNQUOTED(TERMENV, "$withval",Set TERM to the value given by configure) term="$withval"
412 fi])
413
414 AC_ARG_WITH(terminfo,
415 [ --with-terminfo=PATH set the path to the terminfo tree to PATH],
416 [if test x$withval != x; then
417 AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval"
418 fi])
419
420 if test x$support_resources = xno; then
421 if test x$support_frills = xyes || test x$support_perl = xyes; then
422 AC_MSG_ERROR([--disable-resources requires --disable-frills --disable-perl])
423 fi
424
425 AC_DEFINE(NO_RESOURCES, 1, Define if you don't want any resources read)
426 fi
427
428 dnl# --------------------------------------------------------------------------
429
430 LIBEV_M4_AVOID_LIBRT=1
431 m4_include([libev/libev.m4])
432
433 dnl# --------------------------------------------------------------------------
434
435 AC_PATH_PROG(TIC, tic, :)
436
437 AC_PATH_XTRA
438
439 AC_PATH_TOOL(PKG_CONFIG, pkg-config, no)
440
441 image_lib=none
442
443 PIXBUF_CFLAGS=
444 PIXBUF_LIBS=
445
446 if test x$support_pixbuf = xyes; then
447 RXVT_CHECK_MODULES([PIXBUF], [gdk-pixbuf-2.0], [
448 image_lib=gdk-pixbuf
449 AC_DEFINE(HAVE_PIXBUF, 1, Define if you want to use gdk-pixbuf for image processing)
450 ], [:])
451 fi
452
453 AC_SUBST(PIXBUF_CFLAGS)
454 AC_SUBST(PIXBUF_LIBS)
455
456 STARTUP_NOTIFICATION_CFLAGS=
457 STARTUP_NOTIFICATION_LIBS=
458
459 if test x$support_startup_notification = xyes; then
460 RXVT_CHECK_MODULES([STARTUP_NOTIFICATION], [libstartup-notification-1.0], [
461 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, Define if freedesktop startup notifications should be supported)
462 ], [:])
463 fi
464
465 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
466 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
467
468 if test x$support_frills = xyes; then
469 RXVT_CHECK_MODULES([XMU], [xmu], [
470 X_LIBS="$XMU_LIBS $X_LIBS"
471 CPPFLAGS="$CPPFLAGS $XMU_CFLAGS"
472 AC_DEFINE(HAVE_XMU, 1, Define to enable Xmu support)
473 ], [:])
474 fi
475
476 dnl# --------------------------------------------------------------------------
477 dnl# CHECKING FOR HEADER FILES
478 dnl# --------------------------------------------------------------------------
479 AC_CHECK_HEADERS( \
480 sys/byteorder.h \
481 sys/ioctl.h \
482 sys/sockio.h \
483 sys/strredir.h \
484 stdint.h \
485 wchar.h \
486 )
487
488 AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_cv_xlib_illegal_access,
489 [AC_COMPILE_IFELSE(
490 [AC_LANG_PROGRAM([
491 #define XLIB_ILLEGAL_ACCESS
492 #include <X11/Xlib.h>
493 ],[
494 Display *dpy;
495 dpy->xdefaults = (char *)0;
496 ])],
497 [rxvt_cv_xlib_illegal_access=yes],[rxvt_cv_xlib_illegal_access=no]
498 )])
499 if test x$rxvt_cv_xlib_illegal_access = xyes; then
500 AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it)
501 fi
502
503 dnl# --------------------------------------------------------------------------
504 dnl# CHECKING FOR MISSING TYPEDEFS
505 dnl# --------------------------------------------------------------------------
506 dnl# Missing typedefs and replacements
507 AC_TYPE_MODE_T
508 AC_TYPE_PID_T
509 AC_TYPE_UID_T
510 AC_TYPE_INT16_T
511 AC_TYPE_UINT16_T
512 AC_TYPE_INT32_T
513 AC_TYPE_UINT32_T
514
515 dnl# --------------------------------------------------------------------------
516 dnl# CHECKING FOR LIBRARY FUNCTIONS
517 dnl# --------------------------------------------------------------------------
518 AC_CHECK_FUNCS(unsetenv)
519
520 UTMP_CHECK
521
522 dnl# --------------------------------------------------------------------------
523
524 dnl# --------------------------------------------------------------------------
525 dnl# --------------------------------------------------------------------------
526
527 dnl# this is a really hack test for some basic Xlocale stuff
528 save_LIBS=$LIBS
529 save_CXXFLAGS=$CXXFLAGS
530 CXXFLAGS="$CXXFLAGS $X_CFLAGS"
531 LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11"
532 if test x$support_xim = xyes; then
533 AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale,
534 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
535 #include <X11/Xlib.h>
536 #include <stdlib.h>
537 int main() {
538 char *p;
539 if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
540 exit (XSupportsLocale() ? 0 : 1);
541 else
542 exit (1);
543 }
544 ]])],[rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[:])])
545 if test x$rxvt_cv_func_xlocale = xyes; then
546 AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input)
547 AC_CACHE_CHECK(for broken XIM callback, rxvt_cv_broken_ximcb,
548 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
549 #include <X11/Xlib.h>
550
551 void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3);
552
553 void f() {
554 XIMCallback cb;
555 cb.callback = im_destroy_cb;
556 }
557 ]])],rxvt_cv_broken_ximcb=yes,rxvt_cv_broken_ximcb=no)])
558
559 if test x$rxvt_cv_broken_ximcb = xyes; then
560 AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.)
561 fi
562 fi
563 fi
564
565 AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale,
566 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1
567 #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])])
568 if test x$rxvt_cv_func_xsetlocale = xyes; then
569 AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works)
570 fi
571 LIBS=$save_LIBS
572 CXXFLAGS=$save_CXXFLAGS
573
574 AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo,
575 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo(CODESET);]])],[rxvt_cv_func_nl_langinfo=yes],[rxvt_cv_func_nl_langinfo=no])])
576 if test x$rxvt_cv_func_nl_langinfo = xyes; then
577 AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works)
578 fi
579
580 SCM_RIGHTS_CHECK
581
582 PTY_CHECK
583
584 TTY_GROUP_CHECK
585
586 dnl# --------------------------------------------------------------------------
587 dnl# now add and remove other stuff
588 dnl# --------------------------------------------------------------------------
589 support_image=no
590 if test x$support_inheritpixmap = xyes || test x$support_pixbuf = xyes; then
591 support_image=yes
592 fi
593 if test x$support_xft = xyes || test x$support_image = xyes; then
594 rxvt_have_xrender=no
595 RXVT_CHECK_MODULES([XRENDER], [xrender], [
596 X_LIBS="$XRENDER_LIBS $X_LIBS"
597 CPPFLAGS="$CPPFLAGS $XRENDER_CFLAGS"
598 rxvt_have_xrender=yes
599
600 save_LIBS="$LIBS"
601 LIBS="$LIBS $X_LIBS"
602 AC_CHECK_HEADER(X11/extensions/Xrender.h,,[rxvt_have_xrender=no])
603 AC_CHECK_FUNC(XRenderFindStandardFormat,,[rxvt_have_xrender=no])
604 LIBS="$save_LIBS"
605 ], [:])
606 fi
607
608 if test x$support_xft = xyes && test x$rxvt_have_xrender = xyes; then
609 RXVT_CHECK_MODULES([XFT], [fontconfig xft], [
610 X_LIBS="$XFT_LIBS $X_LIBS"
611 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
612 ], [
613 AC_PATH_PROG(XFT_CONFIG, xft-config, no)
614 if test $XFT_CONFIG != no; then
615 X_LIBS="`$XFT_CONFIG --libs` $X_LIBS"
616 CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`"
617 fi
618 ])
619
620 save_LIBS="$LIBS"
621 LIBS="$LIBS $X_LIBS"
622 AC_CHECK_HEADERS(X11/Xft/Xft.h fontconfig/fontconfig.h,,[support_xft=no])
623 AC_CHECK_FUNCS(XftDrawString32 FcPatternGet,,[support_xft=no])
624 LIBS="$save_LIBS"
625
626 if test x$support_xft = xyes; then
627 AC_DEFINE(XFT, 1, Define to enable xft support)
628 fi
629 fi
630
631 if test x$support_image = xyes && test x$rxvt_have_xrender = xyes; then
632 AC_MSG_CHECKING(for Render >= 0.11)
633 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
634 #include <X11/extensions/Xrender.h>
635 #if RENDER_MAJOR == 0 && RENDER_MINOR <= 10
636 error
637 #endif
638 ]])],[],[support_image=no])
639 if test x$support_image = xyes; then
640 AC_MSG_RESULT(ok)
641 LIBS="$LIBS -lm"
642 AC_DEFINE(XRENDER, 1, Define to enable xrender support)
643
644 if test x$support_inheritpixmap = xyes; then
645 AC_DEFINE(ENABLE_TRANSPARENCY, 1, Define if you want your background to use the parent window background)
646 fi
647 else
648 AC_MSG_RESULT(no)
649 fi
650 fi
651
652 if test x$support_styles = xyes; then
653 AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support)
654 fi
655 if test x$support_iso14755 = xyes; then
656 AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support)
657 fi
658 if test x$support_8bitctrls = xyes; then
659 AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences)
660 fi
661 if test x$support_fading = xyes; then
662 AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost)
663 fi
664 if test x$support_keepscrolling = xno; then
665 AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed)
666 fi
667 if test x$support_selectionscrolling = xyes; then
668 AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen)
669 fi
670 if test x$support_frills = xyes; then
671 AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features)
672 fi
673 if test x$support_mousewheel = xyes; then
674 AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll)
675 fi
676 if test x$support_mouseslipwheel = xyes; then
677 AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling)
678 fi
679
680 scrolltypes=plain
681 AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars)
682
683 if test x$support_scroll_rxvt = xyes; then
684 AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars)
685 scrolltypes="$scrolltypes rxvt"
686 fi
687 if test x$support_scroll_next = xyes; then
688 AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars)
689 scrolltypes="$scrolltypes next"
690 fi
691 if test x$support_scroll_xterm = xyes; then
692 AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars)
693 scrolltypes="$scrolltypes xterm"
694 fi
695 if test x$support_pointer_blank = xyes; then
696 AC_DEFINE(POINTER_BLANK, 1, Define if you want to hide the pointer while typing)
697 fi
698 if test x$support_text_blink = xyes; then
699 AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support)
700 fi
701 if test x$support_unicode3 = xyes; then
702 AC_DEFINE(UNICODE_3, 1, Define if you want to represent unicode characters outside plane 0)
703 fi
704 if test x$support_combining = xyes; then
705 AC_DEFINE(ENABLE_COMBINING, 1, Define if you want to automatically compose combining characters)
706 fi
707 if test x$codesets = xall; then
708 codesets=jp,jp-ext,kr,zh,zh-ext
709 fi
710 AC_DEFINE(ENCODING_EU, 1, Define if you want european extended codesets)
711 AC_DEFINE(ENCODING_VN, 1, Define if you want vietnamese codesets)
712 for codeset in `echo $codesets | tr "[a-z,\\-]" "[A-Z _]"`; do
713 case "$codeset" in
714 JP ) AC_DEFINE(ENCODING_JP, 1, Define if you want japanese codesets) ;;
715 JP_EXT ) AC_DEFINE(ENCODING_JP_EXT, 1, Define if you want extended japanese codesets) ;;
716 KR ) AC_DEFINE(ENCODING_KR, 1, Define if you want korean codesets) ;;
717 ZH ) AC_DEFINE(ENCODING_ZH, 1, Define if you want chinese codesets) ;;
718 ZH_EXT ) AC_DEFINE(ENCODING_ZH_EXT, 1, Define if you want extended chinese codesets) ;;
719 esac
720 done
721
722 IF_PERL=\#
723 if test x$support_perl = xyes; then
724 AC_PATH_PROG(PERL, perl5, perl)
725
726 AC_MSG_CHECKING(for $PERL suitability)
727 if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then
728
729 save_CXXFLAGS="$CXXFLAGS"
730 save_LIBS="$LIBS"
731 CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`"
732 LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`"
733 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
734 #include <EXTERN.h>
735 #include <perl.h>
736 #include <XSUB.h>
737 ]], [[
738 PerlInterpreter *perl = perl_alloc ();
739 ]])],[rxvt_perl_link=yes],[rxvt_perl_link=no])
740 CXXFLAGS="$save_CXXFLAGS"
741 LIBS="$save_LIBS"
742
743 if test x$rxvt_perl_link = xyes; then
744 AC_MSG_RESULT(ok)
745 AC_DEFINE(ENABLE_PERL, 1, Define if you can embed a perl interpreter)
746 IF_PERL=
747 PERL_O=rxvtperl.o
748 PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`"
749 PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`"
750 PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`"
751 else
752 AC_MSG_ERROR([no, unable to link])
753 fi
754 else
755 AC_MSG_ERROR([no working perl found, or perl not version >= 5.8])
756 fi
757 fi
758 AC_SUBST(PERLLIB)
759 AC_SUBST(PERLFLAGS)
760 AC_SUBST(PERLPRIVLIBEXP)
761 AC_SUBST(PERL)
762 AC_SUBST(IF_PERL)
763 AC_SUBST(PERL_O)
764
765
766 AC_CONFIG_FILES([Makefile \
767 doc/Makefile \
768 src/Makefile \
769 ])
770 AC_OUTPUT
771
772 echo "Configuration:
773
774 Rxvt version: $VERSION : $DATE
775 Source code location: $srcdir
776 Install path: ${prefix}/bin
777 Compiler: $CXX
778 Compiler flags: $CXXFLAGS
779 Linker: $LINKER"
780
781 if test x$term != x; then
782 echo " set TERM to: $term"
783 fi
784 if test x$terminfo != x; then
785 echo " set TERMINFO to: $terminfo"
786 fi
787 echo " default resource name: $RESNAME"
788 echo " resource class: $RESCLASS"
789 if test x$RESFALLBACK != x; then
790 echo " resource class fallback: $RESFALLBACK"
791 fi
792 echo
793 echo " embedded perl: $support_perl"
794 echo " image library: $image_lib"
795 echo
796 if test x$support_xim = xyes -a x$rxvt_cv_func_xlocale = xno; then
797 echo ".----------------------------------------------------------------."
798 echo ". WARNING: --enable-xim was specified however the locale support ."
799 echo ". functions could not be found. ."
800 echo ". XIM is now being DISABLED! ."
801 echo ".----------------------------------------------------------------."
802 fi
803
804 echo "*** Optionally check src/feature.h for further, rarely used options ***"
805 echo
806