ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/configure.ac
Revision: 1.163
Committed: Sun May 28 10:25:52 2023 UTC (11 months ago) by sf-exg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.162: +77 -39 lines
Log Message:
Use AS_HELP_STRING to format configure help strings

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