ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/configure.ac
Revision: 1.154
Committed: Tue Jun 16 12:00:07 2015 UTC (9 years ago) by sf-exg
Branch: MAIN
CVS Tags: rxvt-unicode-rel-9_22
Changes since 1.153: +10 -1 lines
Log Message:
Bail out if --disable-resources is given and either frills or perl is enabled.

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