ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/configure.ac
(Generate patch)

Comparing rxvt-unicode/configure.ac (file contents):
Revision 1.105 by ayin, Sun Jan 27 22:48:31 2008 UTC vs.
Revision 1.155 by root, Thu May 13 19:24:28 2021 UTC

1dnl# 1dnl#
2dnl# Process this file with autoconf to produce a configure script. 2dnl# Process this file with autoconf to produce a configure script.
3dnl# 3dnl#
4 4
5AC_INIT 5AC_INIT
6AC_PREREQ(2.50) 6AC_PREREQ(2.71)
7AC_CONFIG_SRCDIR([src/feature.h]) 7AC_CONFIG_SRCDIR([src/feature.h])
8AC_CONFIG_HEADER(config.h:config.h.in) 8AC_CONFIG_HEADER(config.h:config.h.in)
9 9
10AC_CANONICAL_HOST 10AC_CANONICAL_HOST
11 11
12dnl RXVT version 12dnl RXVT version
13changequote(, )dnl 13changequote(, )dnl
14VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` 14VERSION=`sed -n -e 's/^.* VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
15DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` 15DATE=`sed -n -e 's/^.* DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
16changequote([, ])dnl 16changequote([, ])dnl
17AC_SUBST(VERSION)dnl 17AC_SUBST(VERSION)dnl
18AC_SUBST(DATE)dnl 18AC_SUBST(DATE)dnl
19 19
20echo "" 20echo ""
24orig_CXXFLAGS="$CXXFLAGS" 24orig_CXXFLAGS="$CXXFLAGS"
25 25
26dnl# Checks for programs. 26dnl# Checks for programs.
27AC_PROG_CC 27AC_PROG_CC
28AC_PROG_CXX 28AC_PROG_CXX
29AC_PROG_CPP
30AC_PROG_INSTALL 29AC_PROG_INSTALL
31 30
32AC_AIX 31AC_AIX
33AC_GNU_SOURCE 32AC_GNU_SOURCE
34AC_ISC_POSIX 33AC_ISC_POSIX
35AC_LANG(C++) 34AC_LANG(C++)
36 35
36if test "$ac_prog_cxx_stdcxx" != cxx11; then
37 AC_MSG_ERROR([the compiler does not support C++11])
38fi
39
40LINKER="$CXX"
37dnl check wether we can link with gcc -lsupc++ 41dnl check whether we can link with gcc -lsupc++
38if test x$GCC = xyes && test x$GXX = xyes; then 42if test x$GCC = xyes && test x$GXX = xyes; then
39 dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it 43 dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it
40 AC_MSG_CHECKING([for working libsupc++]) 44 AC_MSG_CHECKING([for working libsupc++])
41 save_CXX="$CXX" 45 save_CXX="$CXX"
42 save_LIBS="$LIBS" 46 save_LIBS="$LIBS"
43 CXX="$CC" 47 CXX="$CC"
44 LIBS="$LIBS -lsupc++" 48 LIBS="$LIBS -lsupc++"
45 LINKER="$CC"
46 AC_LINK_IFELSE( 49 AC_LINK_IFELSE(
47 [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])], 50 [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])],
48 [AC_MSG_RESULT(ok)], 51 [AC_MSG_RESULT(ok)
52 LINKER="$CC"],
49 [ 53 [
50 AC_MSG_RESULT([no, making everything bigger and slower]) 54 AC_MSG_RESULT([no, making everything bigger and slower])
51 LIBS="$save_LIBS" 55 LIBS="$save_LIBS"
52 LINKER="$save_CXX"
53 ] 56 ]
54 ) 57 )
55 CXX="$save_CXX" 58 CXX="$save_CXX"
56fi 59fi
57AC_SUBST(LINKER,[$LINKER]) 60AC_SUBST(LINKER,[$LINKER])
67 CXXFLAGS="-O" 70 CXXFLAGS="-O"
68 fi 71 fi
69 CFLAGS="$CXXFLAGS" 72 CFLAGS="$CXXFLAGS"
70fi 73fi
71 74
72case $host in
73 *-*-solaris* )
74 AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris)
75 ;;
76esac
77
78dnl# FreeBSD needs to link libxpg4 75dnl# FreeBSD needs to link libxpg4
79AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) 76AC_SEARCH_LIBS(setlocale, xpg4)
80 77
81dnl# solaris needs to link libnsl and socket 78dnl# solaris needs to link libnsl and socket
82AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) 79AC_SEARCH_LIBS(gethostbyname, nsl)
83AC_CHECK_FUNC(socket, [], [AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])]) 80AC_SEARCH_LIBS(socket, socket)
84 81
85support_frills=yes 82support_frills=yes
86support_inheritpixmap=yes 83support_inheritpixmap=yes
87support_fading=yes 84support_fading=yes
88support_keepscrolling=yes 85support_keepscrolling=yes
93support_pointer_blank=yes 90support_pointer_blank=yes
94support_scroll_rxvt=yes 91support_scroll_rxvt=yes
95support_scroll_next=yes 92support_scroll_next=yes
96support_scroll_xterm=yes 93support_scroll_xterm=yes
97support_xim=yes 94support_xim=yes
98support_afterimage=yes 95support_pixbuf=yes
99support_afterstep=yes 96support_startup_notification=yes
100support_xft=yes 97support_xft=yes
101support_unicode3=no 98support_unicode3=no
102support_combining=yes 99support_combining=yes
103support_8bitctrls=no 100support_8bitctrls=no
104support_iso14755=yes 101support_iso14755=yes
129 support_scroll_next=no 126 support_scroll_next=no
130 support_scroll_xterm=no 127 support_scroll_xterm=no
131 support_utmp=no 128 support_utmp=no
132 support_wtmp=no 129 support_wtmp=no
133 support_xim=no 130 support_xim=no
134 support_afterimage=no 131 support_pixbuf=no
135 support_afterstep=no 132 support_startup_notification=no
136 support_xft=no 133 support_xft=no
137 support_unicode3=no 134 support_unicode3=no
138 support_combining=no 135 support_combining=no
139 support_8bitctrls=no 136 support_8bitctrls=no
140 support_iso14755=no 137 support_iso14755=no
157 support_scroll_next=yes 154 support_scroll_next=yes
158 support_scroll_xterm=yes 155 support_scroll_xterm=yes
159 support_utmp=yes 156 support_utmp=yes
160 support_wtmp=yes 157 support_wtmp=yes
161 support_xim=yes 158 support_xim=yes
162 support_afterimage=yes
163 support_afterstep=yes 159 support_pixbuf=yes
160 support_startup_notification=yes
164 support_xft=yes 161 support_xft=yes
165 support_unicode3=yes 162 support_unicode3=yes
166 support_combining=yes 163 support_combining=yes
167 #support_8bitctrls=yes 164 #support_8bitctrls=yes
168 support_iso14755=yes 165 support_iso14755=yes
170 support_perl=yes 167 support_perl=yes
171 codesets=all 168 codesets=all
172 fi 169 fi
173 ]) 170 ])
174 171
175WARNINGS=no 172support_assertions=no
173AC_ARG_ENABLE(assert,
174 [ --enable-assert enable assertions],
175 [if test x$enableval = xyes; then
176 support_assertions=yes
177 fi])
178if test x$support_assertions = xno; then
179 AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging))
180fi
181
182support_warnings=no
176AC_ARG_ENABLE(warnings, 183AC_ARG_ENABLE(warnings,
177 [ --enable-warnings turn on g++ warnings], 184 [ --enable-warnings turn on g++ warnings],
178 [if test x$enableval = xyes; then 185 [if test x$enableval = xyes; then
179 WARNINGS=yes 186 support_warnings=yes
180 fi]) 187 fi])
181if test x$GXX = xyes; then 188if test x$GXX = xyes; then
182 if test $WARNINGS = yes; then 189 if test $support_warnings = yes; then
183 save_CXXFLAGS="$CXXFLAGS" 190 save_CXXFLAGS="$CXXFLAGS"
184 CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" 191 CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-unused-value"
185 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) 192 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"])
186 else 193 else
187 CXXFLAGS="$CXXFLAGS -w" 194 CXXFLAGS="$CXXFLAGS -w"
188 fi 195 fi
189fi 196fi
190 197
198support_256_color=no
199AC_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])
204if test x$support_256_color = xyes; then
205 AC_DEFINE(USE_256_COLORS, 1, Define if you want 256-color support)
206fi
207
191AC_ARG_ENABLE(unicode3, 208AC_ARG_ENABLE(unicode3,
192 [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], 209 [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters],
193 [if test x$enableval = xyes -o x$enableval = xno; then 210 [if test x$enableval = xyes -o x$enableval = xno; then
194 support_unicode3=$enableval 211 support_unicode3=$enableval
195 fi]) 212 fi])
210 [ --enable-font-styles enable bold and italic support], 227 [ --enable-font-styles enable bold and italic support],
211 [if test x$enableval = xyes -o x$enableval = xno; then 228 [if test x$enableval = xyes -o x$enableval = xno; then
212 support_styles=$enableval 229 support_styles=$enableval
213 fi]) 230 fi])
214 231
215AC_ARG_ENABLE(afterimage, 232AC_ARG_ENABLE(pixbuf,
216 [ --enable-afterimage enable integration with libAfterImage for background images], 233 [ --enable-pixbuf enable integration with gdk-pixbuf for background images],
217 [if test x$enableval = xyes -o x$enableval = xno; then
218 support_afterimage=$enableval
219 fi])
220
221AC_ARG_WITH(afterimage_config,
222 [ --with-afterimage-config=DIR use libAfterImage config script in DIR],
223 [if test "x$withval" != x; then
224 afterimage_config=$withval/afterimage-config
225 fi])
226
227dnl AC_ARG_ENABLE(afterstep,
228dnl [ --enable-afterstep enable integration with AfterStep window manager],
229dnl [if test x$enableval = xyes -o x$enableval = xno; then 234 [if test x$enableval = xyes -o x$enableval = xno; then
230dnl support_afterstep=$enableval 235 support_pixbuf=$enableval
231dnl fi]) 236 fi])
237
238AC_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])
232 243
233AC_ARG_ENABLE(transparency, 244AC_ARG_ENABLE(transparency,
234 [ --enable-transparency enable transparent backgrounds], 245 [ --enable-transparency enable transparent backgrounds],
235 [if test x$enableval = xyes -o x$enableval = xno; then 246 [if test x$enableval = xyes -o x$enableval = xno; then
236 support_inheritpixmap=$enableval 247 support_inheritpixmap=$enableval
286 [ --disable-delete-key disable handling of the delete key], 297 [ --disable-delete-key disable handling of the delete key],
287 [if test x$enableval = xno; then 298 [if test x$enableval = xno; then
288 AC_DEFINE(NO_DELETE_KEY, 1, Define if you don't want support for the (non-keypad) delete key) 299 AC_DEFINE(NO_DELETE_KEY, 1, Define if you don't want support for the (non-keypad) delete key)
289 fi]) 300 fi])
290 301
302support_resources=yes
291AC_ARG_ENABLE(resources, 303AC_ARG_ENABLE(resources,
292 [ --disable-resources disable all resource checking], 304 [ --disable-resources disable all resource checking],
293 [if test x$enableval = xno; then 305 [if test x$enableval = xno; then
294 AC_DEFINE(NO_RESOURCES, 1, Define if you don't want any resources read) 306 support_resources=no
295 fi]) 307 fi])
296 308
297AC_ARG_ENABLE(8bitctrls, 309AC_ARG_ENABLE(8bitctrls,
298 [ --enable-8bitctrls enable 8 bit control sequences (not recommended)], 310 [ --enable-8bitctrls enable 8 bit control sequences (not recommended)],
299 [if test x$enableval = xyes -o x$enableval = xno; then 311 [if test x$enableval = xyes -o x$enableval = xno; then
329AC_ARG_WITH(name, 341AC_ARG_WITH(name,
330 [ --with-name=NAME set the basename for the installed binaries (default: urxvt)], 342 [ --with-name=NAME set the basename for the installed binaries (default: urxvt)],
331 [RXVTNAME="$withval"]) 343 [RXVTNAME="$withval"])
332AC_DEFINE_UNQUOTED(RXVTNAME,"$RXVTNAME", [Binary base name]) 344AC_DEFINE_UNQUOTED(RXVTNAME,"$RXVTNAME", [Binary base name])
333 345
334RXVTNAME=`echo "$RXVTNAME"|sed "$program_transform_name"`
335AC_SUBST(RXVTNAME) 346AC_SUBST(RXVTNAME)
336 347
337AC_ARG_ENABLE(swapscreen, 348AC_ARG_ENABLE(swapscreen,
338 [ --disable-swapscreen disable swap screen support], 349 [ --disable-swapscreen disable swap screen support],
339 [if test x$enableval = xno; then 350 [if test x$enableval = xno; then
387 [if test x$enableval = xyes -o x$enableval = xno; then 398 [if test x$enableval = xyes -o x$enableval = xno; then
388 support_text_blink=$enableval 399 support_text_blink=$enableval
389 fi]) 400 fi])
390 401
391AC_ARG_ENABLE(pointer-blank, 402AC_ARG_ENABLE(pointer-blank,
392 [ --enable-pointer-blank enable pointer blank when typing or inactive pointer], 403 [ --enable-pointer-blank enable pointer blanking when typing or inactive],
393 [if test x$enableval = xyes -o x$enableval = xno; then 404 [if test x$enableval = xyes -o x$enableval = xno; then
394 support_pointer_blank=$enableval 405 support_pointer_blank=$enableval
395 fi]) 406 fi])
396 407
397AC_ARG_WITH(term, 408AC_ARG_WITH(term,
404 [ --with-terminfo=PATH set the path to the terminfo tree to PATH], 415 [ --with-terminfo=PATH set the path to the terminfo tree to PATH],
405 [if test x$withval != x; then 416 [if test x$withval != x; then
406 AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" 417 AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval"
407 fi]) 418 fi])
408 419
420if 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)
426fi
427
409dnl# -------------------------------------------------------------------------- 428dnl# --------------------------------------------------------------------------
410 429
411LIBEV_M4_AVOID_LIBRT=1 430LIBEV_M4_AVOID_LIBRT=1
412m4_include([libev/libev.m4]) 431m4_include([libev/libev.m4])
413 432
415 434
416AC_PATH_PROG(TIC, tic, :) 435AC_PATH_PROG(TIC, tic, :)
417 436
418AC_PATH_XTRA 437AC_PATH_XTRA
419 438
420AFTERIMAGE_CFLAGS= 439AC_PATH_TOOL(PKG_CONFIG, pkg-config, no)
421AFTERIMAGE_LIBS=
422AFTERIMAGE_VERSION=
423 440
441image_lib=none
442
443PIXBUF_CFLAGS=
444PIXBUF_LIBS=
445
446if 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 ], [:])
451fi
452
453AC_SUBST(PIXBUF_CFLAGS)
454AC_SUBST(PIXBUF_LIBS)
455
456STARTUP_NOTIFICATION_CFLAGS=
457STARTUP_NOTIFICATION_LIBS=
458
459if 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 ], [:])
463fi
464
465AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
466AC_SUBST(STARTUP_NOTIFICATION_LIBS)
467
424if test x$support_afterimage = xyes; then 468if test x$support_frills = xyes; then
425 support_afterimage=no 469 RXVT_CHECK_MODULES([XMU], [xmu], [
426 470 X_LIBS="$XMU_LIBS $X_LIBS"
427 if test "x$afterimage_config" = "x" ; then 471 CPPFLAGS="$CPPFLAGS $XMU_CFLAGS"
428 AC_PATH_PROG(afterimage_config, afterimage-config, no) 472 AC_DEFINE(HAVE_XMU, 1, Define to enable Xmu support)
429 fi 473 ], [:])
430 if test "x$afterimage_config" != "xno" ; then
431 AC_MSG_CHECKING(for libAfterImage version >= 1.15)
432 xAFTERIMAGE_VERSION=`$afterimage_config --version`
433 if test -n "$xAFTERIMAGE_VERSION" ; then
434 xAFTERIMAGE_CFLAGS=`$afterimage_config --cflags`
435 xAFTERIMAGE_LIBS=`$afterimage_config --libs`
436 if test "x$xAFTERIMAGE_LIBS" != "x"; then
437 libai_ver_major=`echo $xAFTERIMAGE_VERSION | cut -f 1 -d .`
438 libai_ver_minor=`echo $xAFTERIMAGE_VERSION | cut -f 2 -d .`
439 if test $libai_ver_major -gt 1 -o \( $libai_ver_major -eq 1 -a $libai_ver_minor -ge 15 \); then
440 support_afterimage=yes
441 AFTERIMAGE_CFLAGS="$xAFTERIMAGE_CFLAGS"
442 AFTERIMAGE_LIBS="$xAFTERIMAGE_LIBS"
443 AFTERIMAGE_VERSION="$xAFTERIMAGE_VERSION"
444 fi
445 fi
446 fi
447 if test "x$support_afterimage" = "xyes"; then
448 AC_MSG_RESULT($AFTERIMAGE_LIBS)
449 else
450 AC_MSG_RESULT(no)
451 fi
452 fi
453fi 474fi
454 475
455dnl# -------------------------------------------------------------------------- 476dnl# --------------------------------------------------------------------------
456dnl# CHECKING FOR HEADER FILES 477dnl# CHECKING FOR HEADER FILES
457dnl# -------------------------------------------------------------------------- 478dnl# --------------------------------------------------------------------------
460 sys/ioctl.h \ 481 sys/ioctl.h \
461 sys/sockio.h \ 482 sys/sockio.h \
462 sys/strredir.h \ 483 sys/strredir.h \
463 stdint.h \ 484 stdint.h \
464 wchar.h \ 485 wchar.h \
465 cwchar \
466) 486)
467 487
468AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer,
469[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])])
470if test x$rxvt_cv_xpointer = xyes; then
471 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef)
472fi
473
474AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_xlib_illegal_access, 488AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_cv_xlib_illegal_access,
475[AC_COMPILE_IFELSE( 489[AC_COMPILE_IFELSE(
476 [AC_LANG_PROGRAM([ 490 [AC_LANG_PROGRAM([
477#define XLIB_ILLEGAL_ACCESS 491#define XLIB_ILLEGAL_ACCESS
478#include <X11/Xlib.h> 492#include <X11/Xlib.h>
479 ],[ 493 ],[
480 Display *dpy; 494 Display *dpy;
481 dpy->xdefaults = (char *)0; 495 dpy->xdefaults = (char *)0;
482 ])], 496 ])],
483 [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] 497 [rxvt_cv_xlib_illegal_access=yes],[rxvt_cv_xlib_illegal_access=no]
484)]) 498)])
485if test x$rxvt_xlib_illegal_access = xyes; then 499if test x$rxvt_cv_xlib_illegal_access = xyes; then
486 AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) 500 AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it)
487fi 501fi
488 502
489dnl# -------------------------------------------------------------------------- 503dnl# --------------------------------------------------------------------------
490dnl# CHECKING FOR MISSING TYPEDEFS 504dnl# CHECKING FOR MISSING TYPEDEFS
510dnl# -------------------------------------------------------------------------- 524dnl# --------------------------------------------------------------------------
511dnl# -------------------------------------------------------------------------- 525dnl# --------------------------------------------------------------------------
512 526
513dnl# this is a really hack test for some basic Xlocale stuff 527dnl# this is a really hack test for some basic Xlocale stuff
514save_LIBS=$LIBS 528save_LIBS=$LIBS
515save_CFLAGS=$CFLAGS 529save_CXXFLAGS=$CXXFLAGS
516CFLAGS="$CFLAGS $X_CFLAGS" 530CXXFLAGS="$CXXFLAGS $X_CFLAGS"
517LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" 531LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11"
518if test x$support_xim = xyes; then 532if test x$support_xim = xyes; then
519 AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, 533 AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale,
520 [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> 534 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
535 #include <X11/Xlib.h>
521 #include <stdlib.h> 536 #include <stdlib.h>
522 main() { 537 int main() {
523 char *p; 538 char *p;
524 if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) 539 if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
525 exit (XSupportsLocale() ? 0 : 1); 540 exit (XSupportsLocale() ? 0 : 1);
526 else 541 else
527 exit (1);}]])],[dnl 542 exit (1);
543 }
528 rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl 544 ]])],[rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[:])])
529 :])])
530 if test x$rxvt_cv_func_xlocale = xyes; then 545 if test x$rxvt_cv_func_xlocale = xyes; then
531 AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) 546 AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input)
532 AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, 547 AC_CACHE_CHECK(for broken XIM callback, rxvt_cv_broken_ximcb,
533 [AC_COMPILE_IFELSE([ 548 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
534 #include <X11/Xlib.h> 549 #include <X11/Xlib.h>
535 550
536 void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); 551 void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3);
537 552
538 void f() { 553 void f() {
539 XIMCallback cb; 554 XIMCallback cb;
540 cb.callback = im_destroy_cb; 555 cb.callback = im_destroy_cb;
541 } 556 }
542 ],rxvt_broken_ximcb=yes,rxvt_broken_ximcb=no)]) 557 ]])],rxvt_cv_broken_ximcb=yes,rxvt_cv_broken_ximcb=no)])
543 558
544 if test x$rxvt_broken_ximcb = xyes; then 559 if test x$rxvt_cv_broken_ximcb = xyes; then
545 AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) 560 AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.)
546 fi 561 fi
547 fi 562 fi
548fi 563fi
549 564
552#include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) 567#include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])])
553if test x$rxvt_cv_func_xsetlocale = xyes; then 568if test x$rxvt_cv_func_xsetlocale = xyes; then
554 AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) 569 AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works)
555fi 570fi
556LIBS=$save_LIBS 571LIBS=$save_LIBS
557CFLAGS=$save_CFLAGS 572CXXFLAGS=$save_CXXFLAGS
558
559AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale,
560[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])])
561if test x$rxvt_cv_func_setlocale = xyes; then
562 AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works)
563fi
564 573
565AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo, 574AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo,
566[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo(CODESET);]])],[rxvt_cv_func_nl_langinfo=yes],[rxvt_cv_func_nl_langinfo=no])]) 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])])
567if test x$rxvt_cv_func_nl_langinfo = xyes; then 576if test x$rxvt_cv_func_nl_langinfo = xyes; then
568 AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) 577 AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works)
575TTY_GROUP_CHECK 584TTY_GROUP_CHECK
576 585
577dnl# -------------------------------------------------------------------------- 586dnl# --------------------------------------------------------------------------
578dnl# now add and remove other stuff 587dnl# now add and remove other stuff
579dnl# -------------------------------------------------------------------------- 588dnl# --------------------------------------------------------------------------
580if test x$support_xft = xyes; then 589support_image=no
581 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 590if test x$support_inheritpixmap = xyes || test x$support_pixbuf = xyes; then
582 if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then 591 support_image=yes
583 X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" 592fi
584 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" 593if test x$support_xft = xyes || test x$support_image = xyes; then
585 else 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 ], [:])
606fi
607
608if 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 ], [
586 AC_PATH_PROG(XFT_CONFIG, xft-config, no) 613 AC_PATH_PROG(XFT_CONFIG, xft-config, no)
587 if test $XFT_CONFIG != no; then 614 if test $XFT_CONFIG != no; then
588 X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" 615 X_LIBS="`$XFT_CONFIG --libs` $X_LIBS"
589 CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" 616 CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`"
590 fi 617 fi
591 fi 618 ])
592 619
593 save_LIBS="$LIBS" 620 save_LIBS="$LIBS"
594 LIBS="$LIBS $X_LIBS" 621 LIBS="$LIBS $X_LIBS"
595 AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) 622 AC_CHECK_HEADERS(X11/Xft/Xft.h fontconfig/fontconfig.h,,[support_xft=no])
596 AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) 623 AC_CHECK_FUNCS(XftDrawString32 FcPatternGet,,[support_xft=no])
597 LIBS="$save_LIBS" 624 LIBS="$save_LIBS"
598 625
599 if test x$support_xft = xyes; then 626 if test x$support_xft = xyes; then
600 AC_DEFINE(XFT, 1, Define to enable xft support) 627 AC_DEFINE(XFT, 1, Define to enable xft support)
601 fi 628 fi
602fi 629fi
630
631if 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
636error
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
650fi
651
603if test x$support_styles = xyes; then 652if test x$support_styles = xyes; then
604 AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support) 653 AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support)
605fi 654fi
606if test x$support_iso14755 = xyes; then 655if test x$support_iso14755 = xyes; then
607 AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support) 656 AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support)
610 AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences) 659 AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences)
611fi 660fi
612if test x$support_fading = xyes; then 661if test x$support_fading = xyes; then
613 AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost) 662 AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost)
614fi 663fi
615if test x$support_inheritpixmap = xyes; then
616 AC_DEFINE(ENABLE_TRANSPARENCY, 1, Define if you want your background to use the parent window background)
617fi
618if test x$support_keepscrolling = xno; then 664if test x$support_keepscrolling = xno; then
619 AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed) 665 AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed)
620fi 666fi
621if test x$support_selectionscrolling = xyes; then 667if test x$support_selectionscrolling = xyes; then
622 AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen) 668 AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen)
628 AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) 674 AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll)
629fi 675fi
630if test x$support_mouseslipwheel = xyes; then 676if test x$support_mouseslipwheel = xyes; then
631 AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) 677 AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling)
632fi 678fi
633if test x$support_afterimage = xyes; then
634 AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing)
635 AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps. Needs libAfterImage)
636fi
637
638dnl if test x$support_afterstep = xyes; then
639dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager)
640dnl fi
641 679
642scrolltypes=plain 680scrolltypes=plain
643AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) 681AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars)
644 682
645if test x$support_scroll_rxvt = xyes; then 683if test x$support_scroll_rxvt = xyes; then
653if test x$support_scroll_xterm = xyes; then 691if test x$support_scroll_xterm = xyes; then
654 AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) 692 AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars)
655 scrolltypes="$scrolltypes xterm" 693 scrolltypes="$scrolltypes xterm"
656fi 694fi
657if test x$support_pointer_blank = xyes; then 695if test x$support_pointer_blank = xyes; then
658 AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) 696 AC_DEFINE(POINTER_BLANK, 1, Define if you want to hide the pointer while typing)
659fi 697fi
660if test x$support_text_blink = xyes; then 698if test x$support_text_blink = xyes; then
661 AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support) 699 AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support)
662fi 700fi
663if test x$support_unicode3 = xyes; then 701if test x$support_unicode3 = xyes; then
681 esac 719 esac
682done 720done
683 721
684IF_PERL=\# 722IF_PERL=\#
685if test x$support_perl = xyes; then 723if test x$support_perl = xyes; then
686 AC_PATH_PROG(PERL, perl5) 724 AC_PATH_PROG(PERL, perl5, perl)
687 AC_PATH_PROG(PERL, perl)
688 725
689 AC_MSG_CHECKING(for $PERL suitability) 726 AC_MSG_CHECKING(for $PERL suitability)
690 if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then 727 if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then
691 728
692 save_CXXFLAGS="$CXXFLAGS" 729 save_CXXFLAGS="$CXXFLAGS"
723AC_SUBST(PERLPRIVLIBEXP) 760AC_SUBST(PERLPRIVLIBEXP)
724AC_SUBST(PERL) 761AC_SUBST(PERL)
725AC_SUBST(IF_PERL) 762AC_SUBST(IF_PERL)
726AC_SUBST(PERL_O) 763AC_SUBST(PERL_O)
727 764
728AC_SUBST(CFLAGS)
729AC_SUBST(CPPFLAGS)
730AC_SUBST(LDFLAGS)
731AC_SUBST(X_CFLAGS)
732
733dnl# Attack the libs
734AC_SUBST(LIBS)
735AC_SUBST(X_LIBS)
736AC_SUBST(X_EXTRA_LIBS)
737
738AC_SUBST(AFTERIMAGE_CFLAGS)
739AC_SUBST(AFTERIMAGE_LIBS)
740
741AC_ARG_PROGRAM
742 765
743AC_CONFIG_FILES([Makefile \ 766AC_CONFIG_FILES([Makefile \
744doc/Makefile \ 767doc/Makefile \
745src/Makefile \ 768src/Makefile \
746]) 769])
766if test x$RESFALLBACK != x; then 789if test x$RESFALLBACK != x; then
767 echo " resource class fallback: $RESFALLBACK" 790 echo " resource class fallback: $RESFALLBACK"
768fi 791fi
769echo 792echo
770echo " embedded perl: $support_perl" 793echo " embedded perl: $support_perl"
771echo " libafterimage: $support_afterimage" 794echo " image library: $image_lib"
772dnl echo " AfterStep integration: $support_afterstep"
773echo 795echo
774if test x$support_xim = xyes -a x$rxvt_cv_func_xlocale = xno; then 796if test x$support_xim = xyes -a x$rxvt_cv_func_xlocale = xno; then
775 echo ".----------------------------------------------------------------." 797 echo ".----------------------------------------------------------------."
776 echo ". WARNING: --enable-xim was specified however the locale support ." 798 echo ". WARNING: --enable-xim was specified however the locale support ."
777 echo ". functions could not be found. ." 799 echo ". functions could not be found. ."

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines