ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/rxvt-unicode/configure.ac
Revision: 1.159
Committed: Mon Nov 22 15:41:18 2021 UTC (2 years, 7 months ago) by sf-exg
Branch: MAIN
CVS Tags: rxvt-unicode-rel-9_29
Changes since 1.158: +9 -1 lines
Log Message:
Disable -Wparentheses warnings

File Contents

# User Rev Content
1 ayin 1.1 dnl#
2     dnl# Process this file with autoconf to produce a configure script.
3     dnl#
4    
5     AC_INIT
6 root 1.155 AC_PREREQ(2.71)
7 ayin 1.1 AC_CONFIG_SRCDIR([src/feature.h])
8 sf-exg 1.156 AC_CONFIG_HEADERS(config.h:config.h.in)
9 ayin 1.1
10     dnl RXVT version
11 sf-exg 1.135 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 ayin 1.40 AC_SUBST(VERSION)dnl
14     AC_SUBST(DATE)dnl
15 root 1.83
16 ayin 1.1 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 sf-exg 1.156 AC_USE_SYSTEM_EXTENSIONS
28 root 1.16 AC_LANG(C++)
29 root 1.9
30 root 1.155 if test "$ac_prog_cxx_stdcxx" != cxx11; then
31     AC_MSG_ERROR([the compiler does not support C++11])
32     fi
33    
34 sf-exg 1.136 LINKER="$CXX"
35 sf-exg 1.109 dnl check whether we can link with gcc -lsupc++
36 root 1.9 if test x$GCC = xyes && test x$GXX = xyes; then
37 root 1.16 dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it
38     AC_MSG_CHECKING([for working libsupc++])
39     save_CXX="$CXX"
40     save_LIBS="$LIBS"
41     CXX="$CC"
42     LIBS="$LIBS -lsupc++"
43     AC_LINK_IFELSE(
44 root 1.35 [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])],
45 sf-exg 1.136 [AC_MSG_RESULT(ok)
46     LINKER="$CC"],
47 root 1.16 [
48 root 1.17 AC_MSG_RESULT([no, making everything bigger and slower])
49 root 1.16 LIBS="$save_LIBS"
50     ]
51     )
52 root 1.17 CXX="$save_CXX"
53 root 1.9 fi
54     AC_SUBST(LINKER,[$LINKER])
55    
56 ayin 1.1 dnl# --------------------------------------------------------------------------
57 ayin 1.12 dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure'
58 ayin 1.1 dnl#
59     if test -z "$orig_CXXFLAGS"; then
60     if test x$GCC = xyes && test "x$GXX" = xyes; then
61 root 1.85 CXXFLAGS="-g -O3 -fno-rtti -fvisibility-inlines-hidden -fno-threadsafe-statics -fno-enforce-eh-specs"
62 root 1.35 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"])
63 ayin 1.1 else
64     CXXFLAGS="-O"
65     fi
66     CFLAGS="$CXXFLAGS"
67     fi
68    
69     dnl# FreeBSD needs to link libxpg4
70 sf-exg 1.111 AC_SEARCH_LIBS(setlocale, xpg4)
71 ayin 1.1
72     dnl# solaris needs to link libnsl and socket
73 sf-exg 1.111 AC_SEARCH_LIBS(gethostbyname, nsl)
74     AC_SEARCH_LIBS(socket, socket)
75 ayin 1.1
76     support_frills=yes
77     support_inheritpixmap=yes
78     support_fading=yes
79     support_keepscrolling=yes
80     support_selectionscrolling=yes
81     support_mousewheel=yes
82     support_mouseslipwheel=yes
83     support_text_blink=yes
84     support_pointer_blank=yes
85     support_scroll_rxvt=yes
86     support_scroll_next=yes
87     support_scroll_xterm=yes
88     support_xim=yes
89 sf-exg 1.125 support_pixbuf=yes
90 mikachu 1.130 support_startup_notification=yes
91 ayin 1.1 support_xft=yes
92     support_unicode3=no
93     support_combining=yes
94     support_8bitctrls=no
95     support_iso14755=yes
96     support_styles=yes
97     support_perl=yes
98     codesets=all
99    
100     dnl# --------------------------------------------------------------------------
101     dnl# CHECKING COMMAND LINE OPTIONS
102     dnl# --------------------------------------------------------------------------
103    
104     AC_ARG_ENABLE(everything,
105     [ --enable-everything enable standard non-multichoice features
106 root 1.104 NOTE: this option is order dependent],
107 ayin 1.1 [
108     if test x$enableval = xno; then
109     support_frills=no
110     support_inheritpixmap=no
111     support_fading=no
112     support_keepscrolling=no
113     support_selectionscrolling=no
114     support_mousewheel=no
115     support_mouseslipwheel=no
116     support_text_blink=no
117     support_pointer_blank=no
118     support_scroll_rxvt=no
119     support_scroll_next=no
120     support_scroll_xterm=no
121     support_xim=no
122 sf-exg 1.125 support_pixbuf=no
123 mikachu 1.130 support_startup_notification=no
124 ayin 1.1 support_xft=no
125     support_unicode3=no
126     support_combining=no
127     support_8bitctrls=no
128     support_iso14755=no
129     support_styles=no
130     support_perl=no
131     codesets=
132     fi
133     if test x$enableval = xyes; then
134     support_frills=yes
135     support_inheritpixmap=yes
136     support_fading=yes
137     support_keepscrolling=yes
138     support_selectionscrolling=yes
139     support_mousewheel=yes
140     support_mouseslipwheel=yes
141     support_text_blink=yes
142     support_pointer_blank=yes
143     support_scroll_rxvt=yes
144     support_scroll_next=yes
145     support_scroll_xterm=yes
146     support_xim=yes
147 sf-exg 1.125 support_pixbuf=yes
148 mikachu 1.130 support_startup_notification=yes
149 ayin 1.1 support_xft=yes
150     support_unicode3=yes
151     support_combining=yes
152     #support_8bitctrls=yes
153     support_iso14755=yes
154     support_styles=yes
155     support_perl=yes
156     codesets=all
157     fi
158     ])
159    
160 sf-exg 1.133 support_assertions=no
161 root 1.106 AC_ARG_ENABLE(assert,
162     [ --enable-assert enable assertions],
163     [if test x$enableval = xyes; then
164 sf-exg 1.133 support_assertions=yes
165 root 1.106 fi])
166 sf-exg 1.133 if test x$support_assertions = xno; then
167 root 1.106 AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging))
168     fi
169    
170 sf-exg 1.133 support_warnings=no
171 ayin 1.78 AC_ARG_ENABLE(warnings,
172     [ --enable-warnings turn on g++ warnings],
173     [if test x$enableval = xyes; then
174 sf-exg 1.133 support_warnings=yes
175 ayin 1.78 fi])
176     if test x$GXX = xyes; then
177 sf-exg 1.133 if test $support_warnings = yes; then
178 ayin 1.78 save_CXXFLAGS="$CXXFLAGS"
179 sf-exg 1.159 for warning in \
180     -Wall \
181     -Wno-parentheses \
182     -Wno-reorder \
183     -Wno-sign-compare \
184     -Wno-unused-value \
185     ; do
186     CXXFLAGS="$CXXFLAGS $warning"
187     done
188 ayin 1.78 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"])
189     else
190     CXXFLAGS="$CXXFLAGS -w"
191     fi
192     fi
193    
194 sf-exg 1.110 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 ayin 1.1 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 sf-exg 1.115 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 mikachu 1.130 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 ayin 1.1 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 ayin 1.79 [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)],
278 ayin 1.1 [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 sf-exg 1.154 support_resources=yes
299 ayin 1.1 AC_ARG_ENABLE(resources,
300     [ --disable-resources disable all resource checking],
301     [if test x$enableval = xno; then
302 sf-exg 1.154 support_resources=no
303 ayin 1.1 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 ayin 1.77 [ --enable-fallback@<:@=CLASS@:>@ fall back on CLASS resources in addition to URxvt ones (default: Rxvt)],
314 ayin 1.1 [
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 ayin 1.77 [ --enable-slipwheeling enable slip wheel scrolling (requires --enable-mousewheel)],
382 ayin 1.1 [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 sf-exg 1.108 [ --enable-pointer-blank enable pointer blanking when typing or inactive],
400 ayin 1.1 [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 sf-exg 1.154 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 ayin 1.1 dnl# --------------------------------------------------------------------------
425    
426 root 1.84 LIBEV_M4_AVOID_LIBRT=1
427 root 1.82 m4_include([libev/libev.m4])
428    
429     dnl# --------------------------------------------------------------------------
430    
431 ayin 1.76 AC_PATH_PROG(TIC, tic, :)
432 ayin 1.1
433     AC_PATH_XTRA
434    
435 sf-exg 1.151 AC_PATH_TOOL(PKG_CONFIG, pkg-config, no)
436    
437 sf-exg 1.157 RXVT_CHECK_MODULES([PTYTTY], [libptytty], [:], [
438     AC_MSG_ERROR([unable to find libptytty])
439     ])
440    
441     AC_SUBST(PTYTTY_CFLAGS)
442     AC_SUBST(PTYTTY_LIBS)
443    
444 sf-exg 1.146 image_lib=none
445    
446     PIXBUF_CFLAGS=
447     PIXBUF_LIBS=
448    
449     if test x$support_pixbuf = xyes; then
450 sf-exg 1.152 RXVT_CHECK_MODULES([PIXBUF], [gdk-pixbuf-2.0], [
451 sf-exg 1.146 image_lib=gdk-pixbuf
452     AC_DEFINE(HAVE_PIXBUF, 1, Define if you want to use gdk-pixbuf for image processing)
453 sf-exg 1.152 ], [:])
454 sf-exg 1.146 fi
455    
456     AC_SUBST(PIXBUF_CFLAGS)
457     AC_SUBST(PIXBUF_LIBS)
458    
459 mikachu 1.130 STARTUP_NOTIFICATION_CFLAGS=
460     STARTUP_NOTIFICATION_LIBS=
461    
462     if test x$support_startup_notification = xyes; then
463 sf-exg 1.152 RXVT_CHECK_MODULES([STARTUP_NOTIFICATION], [libstartup-notification-1.0], [
464 mikachu 1.130 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, Define if freedesktop startup notifications should be supported)
465 sf-exg 1.152 ], [:])
466 mikachu 1.130 fi
467    
468     AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
469     AC_SUBST(STARTUP_NOTIFICATION_LIBS)
470    
471 sf-exg 1.153 if test x$support_frills = xyes; then
472     RXVT_CHECK_MODULES([XMU], [xmu], [
473     X_LIBS="$XMU_LIBS $X_LIBS"
474     CPPFLAGS="$CPPFLAGS $XMU_CFLAGS"
475     AC_DEFINE(HAVE_XMU, 1, Define to enable Xmu support)
476     ], [:])
477     fi
478    
479 ayin 1.1 dnl# --------------------------------------------------------------------------
480     dnl# CHECKING FOR HEADER FILES
481     dnl# --------------------------------------------------------------------------
482     AC_CHECK_HEADERS( \
483 sf-exg 1.124 sys/byteorder.h \
484 ayin 1.1 sys/ioctl.h \
485     sys/sockio.h \
486     sys/strredir.h \
487 ayin 1.14 stdint.h \
488     wchar.h \
489 ayin 1.1 )
490    
491 sf-exg 1.107 AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_cv_xlib_illegal_access,
492 root 1.35 [AC_COMPILE_IFELSE(
493     [AC_LANG_PROGRAM([
494     #define XLIB_ILLEGAL_ACCESS
495     #include <X11/Xlib.h>
496     ],[
497     Display *dpy;
498     dpy->xdefaults = (char *)0;
499     ])],
500 sf-exg 1.107 [rxvt_cv_xlib_illegal_access=yes],[rxvt_cv_xlib_illegal_access=no]
501 root 1.35 )])
502 sf-exg 1.107 if test x$rxvt_cv_xlib_illegal_access = xyes; then
503 root 1.35 AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it)
504     fi
505 ayin 1.1
506     dnl# --------------------------------------------------------------------------
507     dnl# CHECKING FOR MISSING TYPEDEFS
508     dnl# --------------------------------------------------------------------------
509     dnl# Missing typedefs and replacements
510     AC_TYPE_MODE_T
511     AC_TYPE_PID_T
512     AC_TYPE_UID_T
513 ayin 1.97 AC_TYPE_INT16_T
514     AC_TYPE_UINT16_T
515     AC_TYPE_INT32_T
516     AC_TYPE_UINT32_T
517 ayin 1.1
518     dnl# --------------------------------------------------------------------------
519     dnl# CHECKING FOR LIBRARY FUNCTIONS
520     dnl# --------------------------------------------------------------------------
521 ayin 1.80 AC_CHECK_FUNCS(unsetenv)
522 ayin 1.1
523     dnl# --------------------------------------------------------------------------
524    
525     dnl# --------------------------------------------------------------------------
526     dnl# --------------------------------------------------------------------------
527    
528     dnl# this is a really hack test for some basic Xlocale stuff
529 ayin 1.79 save_LIBS=$LIBS
530 sf-exg 1.150 save_CXXFLAGS=$CXXFLAGS
531     CXXFLAGS="$CXXFLAGS $X_CFLAGS"
532 ayin 1.1 LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11"
533 ayin 1.54 if test x$support_xim = xyes; then
534 ayin 1.74 AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale,
535 sf-exg 1.129 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
536     #include <X11/Xlib.h>
537 ayin 1.74 #include <stdlib.h>
538 sf-exg 1.128 int main() {
539 sf-exg 1.129 char *p;
540     if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
541     exit (XSupportsLocale() ? 0 : 1);
542     else
543     exit (1);
544     }
545     ]])],[rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[:])])
546 ayin 1.54 if test x$rxvt_cv_func_xlocale = xyes; then
547     AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input)
548 sf-exg 1.107 AC_CACHE_CHECK(for broken XIM callback, rxvt_cv_broken_ximcb,
549 sf-exg 1.127 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
550 ayin 1.74 #include <X11/Xlib.h>
551    
552     void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3);
553    
554     void f() {
555     XIMCallback cb;
556     cb.callback = im_destroy_cb;
557     }
558 sf-exg 1.127 ]])],rxvt_cv_broken_ximcb=yes,rxvt_cv_broken_ximcb=no)])
559 ayin 1.74
560 sf-exg 1.107 if test x$rxvt_cv_broken_ximcb = xyes; then
561 ayin 1.74 AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.)
562     fi
563 ayin 1.54 fi
564     fi
565 ayin 1.1
566     AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale,
567     [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1
568     #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])])
569     if test x$rxvt_cv_func_xsetlocale = xyes; then
570     AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works)
571     fi
572 ayin 1.79 LIBS=$save_LIBS
573 sf-exg 1.150 CXXFLAGS=$save_CXXFLAGS
574 ayin 1.1
575     AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo,
576     [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo(CODESET);]])],[rxvt_cv_func_nl_langinfo=yes],[rxvt_cv_func_nl_langinfo=no])])
577     if test x$rxvt_cv_func_nl_langinfo = xyes; then
578     AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works)
579     fi
580    
581     dnl# --------------------------------------------------------------------------
582     dnl# now add and remove other stuff
583     dnl# --------------------------------------------------------------------------
584 sf-exg 1.143 support_image=no
585     if test x$support_inheritpixmap = xyes || test x$support_pixbuf = xyes; then
586     support_image=yes
587     fi
588     if test x$support_xft = xyes || test x$support_image = xyes; then
589 sf-exg 1.121 rxvt_have_xrender=no
590 sf-exg 1.152 RXVT_CHECK_MODULES([XRENDER], [xrender], [
591     X_LIBS="$XRENDER_LIBS $X_LIBS"
592     CPPFLAGS="$CPPFLAGS $XRENDER_CFLAGS"
593 sf-exg 1.121 rxvt_have_xrender=yes
594    
595     save_LIBS="$LIBS"
596     LIBS="$LIBS $X_LIBS"
597     AC_CHECK_HEADER(X11/extensions/Xrender.h,,[rxvt_have_xrender=no])
598     AC_CHECK_FUNC(XRenderFindStandardFormat,,[rxvt_have_xrender=no])
599     LIBS="$save_LIBS"
600 sf-exg 1.152 ], [:])
601 sf-exg 1.121 fi
602    
603     if test x$support_xft = xyes && test x$rxvt_have_xrender = xyes; then
604 sf-exg 1.152 RXVT_CHECK_MODULES([XFT], [fontconfig xft], [
605     X_LIBS="$XFT_LIBS $X_LIBS"
606     CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
607     ], [
608 ayin 1.22 AC_PATH_PROG(XFT_CONFIG, xft-config, no)
609 ayin 1.18 if test $XFT_CONFIG != no; then
610 root 1.83 X_LIBS="`$XFT_CONFIG --libs` $X_LIBS"
611 ayin 1.18 CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`"
612     fi
613 sf-exg 1.152 ])
614 sf-exg 1.121
615 root 1.83 save_LIBS="$LIBS"
616     LIBS="$LIBS $X_LIBS"
617 sf-exg 1.148 AC_CHECK_HEADERS(X11/Xft/Xft.h fontconfig/fontconfig.h,,[support_xft=no])
618     AC_CHECK_FUNCS(XftDrawString32 FcPatternGet,,[support_xft=no])
619 root 1.83 LIBS="$save_LIBS"
620 ayin 1.1
621     if test x$support_xft = xyes; then
622     AC_DEFINE(XFT, 1, Define to enable xft support)
623     fi
624     fi
625 sf-exg 1.143
626     if test x$support_image = xyes && test x$rxvt_have_xrender = xyes; then
627 sf-exg 1.149 AC_MSG_CHECKING(for Render >= 0.11)
628     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
629     #include <X11/extensions/Xrender.h>
630     #if RENDER_MAJOR == 0 && RENDER_MINOR <= 10
631     error
632     #endif
633     ]])],[],[support_image=no])
634     if test x$support_image = xyes; then
635     AC_MSG_RESULT(ok)
636     LIBS="$LIBS -lm"
637     AC_DEFINE(XRENDER, 1, Define to enable xrender support)
638    
639     if test x$support_inheritpixmap = xyes; then
640     AC_DEFINE(ENABLE_TRANSPARENCY, 1, Define if you want your background to use the parent window background)
641     fi
642     else
643     AC_MSG_RESULT(no)
644 sf-exg 1.143 fi
645     fi
646    
647 ayin 1.1 if test x$support_styles = xyes; then
648     AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support)
649     fi
650     if test x$support_iso14755 = xyes; then
651     AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support)
652     fi
653     if test x$support_8bitctrls = xyes; then
654     AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences)
655     fi
656     if test x$support_fading = xyes; then
657     AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost)
658     fi
659     if test x$support_keepscrolling = xno; then
660     AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed)
661     fi
662     if test x$support_selectionscrolling = xyes; then
663     AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen)
664     fi
665 ayin 1.73 if test x$support_frills = xyes; then
666     AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features)
667     fi
668 ayin 1.1 if test x$support_mousewheel = xyes; then
669     AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll)
670     fi
671     if test x$support_mouseslipwheel = xyes; then
672     AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling)
673     fi
674 sasha 1.39
675 ayin 1.105 scrolltypes=plain
676     AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars)
677    
678 ayin 1.1 if test x$support_scroll_rxvt = xyes; then
679     AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars)
680 ayin 1.105 scrolltypes="$scrolltypes rxvt"
681 ayin 1.1 fi
682     if test x$support_scroll_next = xyes; then
683     AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars)
684     scrolltypes="$scrolltypes next"
685     fi
686     if test x$support_scroll_xterm = xyes; then
687     AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars)
688     scrolltypes="$scrolltypes xterm"
689     fi
690     if test x$support_pointer_blank = xyes; then
691 sf-exg 1.117 AC_DEFINE(POINTER_BLANK, 1, Define if you want to hide the pointer while typing)
692 ayin 1.1 fi
693     if test x$support_text_blink = xyes; then
694     AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support)
695     fi
696     if test x$support_unicode3 = xyes; then
697     AC_DEFINE(UNICODE_3, 1, Define if you want to represent unicode characters outside plane 0)
698     fi
699     if test x$support_combining = xyes; then
700     AC_DEFINE(ENABLE_COMBINING, 1, Define if you want to automatically compose combining characters)
701     fi
702     if test x$codesets = xall; then
703     codesets=jp,jp-ext,kr,zh,zh-ext
704     fi
705     AC_DEFINE(ENCODING_EU, 1, Define if you want european extended codesets)
706     AC_DEFINE(ENCODING_VN, 1, Define if you want vietnamese codesets)
707     for codeset in `echo $codesets | tr "[a-z,\\-]" "[A-Z _]"`; do
708     case "$codeset" in
709     JP ) AC_DEFINE(ENCODING_JP, 1, Define if you want japanese codesets) ;;
710     JP_EXT ) AC_DEFINE(ENCODING_JP_EXT, 1, Define if you want extended japanese codesets) ;;
711     KR ) AC_DEFINE(ENCODING_KR, 1, Define if you want korean codesets) ;;
712     ZH ) AC_DEFINE(ENCODING_ZH, 1, Define if you want chinese codesets) ;;
713     ZH_EXT ) AC_DEFINE(ENCODING_ZH_EXT, 1, Define if you want extended chinese codesets) ;;
714     esac
715     done
716    
717     IF_PERL=\#
718     if test x$support_perl = xyes; then
719 root 1.142 AC_PATH_PROG(PERL, perl5, perl)
720 ayin 1.1
721     AC_MSG_CHECKING(for $PERL suitability)
722     if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then
723    
724     save_CXXFLAGS="$CXXFLAGS"
725     save_LIBS="$LIBS"
726     CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`"
727     LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`"
728 root 1.100 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
729 ayin 1.1 #include <EXTERN.h>
730     #include <perl.h>
731     #include <XSUB.h>
732 root 1.100 ]], [[
733 ayin 1.1 PerlInterpreter *perl = perl_alloc ();
734 root 1.100 ]])],[rxvt_perl_link=yes],[rxvt_perl_link=no])
735 ayin 1.1 CXXFLAGS="$save_CXXFLAGS"
736     LIBS="$save_LIBS"
737    
738     if test x$rxvt_perl_link = xyes; then
739     AC_MSG_RESULT(ok)
740     AC_DEFINE(ENABLE_PERL, 1, Define if you can embed a perl interpreter)
741     IF_PERL=
742     PERL_O=rxvtperl.o
743     PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`"
744     PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`"
745     PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`"
746     else
747 root 1.63 AC_MSG_ERROR([no, unable to link])
748 ayin 1.1 fi
749     else
750 root 1.63 AC_MSG_ERROR([no working perl found, or perl not version >= 5.8])
751 ayin 1.1 fi
752     fi
753     AC_SUBST(PERLLIB)
754     AC_SUBST(PERLFLAGS)
755     AC_SUBST(PERLPRIVLIBEXP)
756     AC_SUBST(PERL)
757     AC_SUBST(IF_PERL)
758     AC_SUBST(PERL_O)
759    
760    
761     AC_CONFIG_FILES([Makefile \
762     doc/Makefile \
763     src/Makefile \
764     ])
765     AC_OUTPUT
766    
767     echo "Configuration:
768    
769     Rxvt version: $VERSION : $DATE
770     Source code location: $srcdir
771     Install path: ${prefix}/bin
772     Compiler: $CXX
773 root 1.36 Compiler flags: $CXXFLAGS
774 ayin 1.1 Linker: $LINKER"
775    
776     if test x$term != x; then
777     echo " set TERM to: $term"
778     fi
779     if test x$terminfo != x; then
780     echo " set TERMINFO to: $terminfo"
781     fi
782     echo " default resource name: $RESNAME"
783     echo " resource class: $RESCLASS"
784     if test x$RESFALLBACK != x; then
785     echo " resource class fallback: $RESFALLBACK"
786     fi
787     echo
788 root 1.20 echo " embedded perl: $support_perl"
789 sf-exg 1.119 echo " image library: $image_lib"
790 root 1.20 echo
791 ayin 1.1 if test x$support_xim = xyes -a x$rxvt_cv_func_xlocale = xno; then
792     echo ".----------------------------------------------------------------."
793     echo ". WARNING: --enable-xim was specified however the locale support ."
794     echo ". functions could not be found. ."
795     echo ". XIM is now being DISABLED! ."
796     echo ".----------------------------------------------------------------."
797     fi
798    
799 root 1.32 echo "*** Optionally check src/feature.h for further, rarely used options ***"
800 ayin 1.1 echo
801