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.129 by sf-exg, Sat Jan 8 17:30:46 2011 UTC vs.
Revision 1.156 by sf-exg, Thu May 13 19:40:27 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_HEADERS(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_USE_SYSTEM_EXTENSIONS
33AC_GNU_SOURCE
34AC_ISC_POSIX
35AC_LANG(C++) 32AC_LANG(C++)
36 33
34if test "$ac_prog_cxx_stdcxx" != cxx11; then
35 AC_MSG_ERROR([the compiler does not support C++11])
36fi
37
38LINKER="$CXX"
37dnl check whether we can link with gcc -lsupc++ 39dnl check whether we can link with gcc -lsupc++
38if test x$GCC = xyes && test x$GXX = xyes; then 40if test x$GCC = xyes && test x$GXX = xyes; then
39 dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it 41 dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it
40 AC_MSG_CHECKING([for working libsupc++]) 42 AC_MSG_CHECKING([for working libsupc++])
41 save_CXX="$CXX" 43 save_CXX="$CXX"
42 save_LIBS="$LIBS" 44 save_LIBS="$LIBS"
43 CXX="$CC" 45 CXX="$CC"
44 LIBS="$LIBS -lsupc++" 46 LIBS="$LIBS -lsupc++"
45 LINKER="$CC"
46 AC_LINK_IFELSE( 47 AC_LINK_IFELSE(
47 [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])], 48 [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])],
48 [AC_MSG_RESULT(ok)], 49 [AC_MSG_RESULT(ok)
50 LINKER="$CC"],
49 [ 51 [
50 AC_MSG_RESULT([no, making everything bigger and slower]) 52 AC_MSG_RESULT([no, making everything bigger and slower])
51 LIBS="$save_LIBS" 53 LIBS="$save_LIBS"
52 LINKER="$save_CXX"
53 ] 54 ]
54 ) 55 )
55 CXX="$save_CXX" 56 CXX="$save_CXX"
56fi 57fi
57AC_SUBST(LINKER,[$LINKER]) 58AC_SUBST(LINKER,[$LINKER])
66 else 67 else
67 CXXFLAGS="-O" 68 CXXFLAGS="-O"
68 fi 69 fi
69 CFLAGS="$CXXFLAGS" 70 CFLAGS="$CXXFLAGS"
70fi 71fi
71
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 72
78dnl# FreeBSD needs to link libxpg4 73dnl# FreeBSD needs to link libxpg4
79AC_SEARCH_LIBS(setlocale, xpg4) 74AC_SEARCH_LIBS(setlocale, xpg4)
80 75
81dnl# solaris needs to link libnsl and socket 76dnl# solaris needs to link libnsl and socket
94support_scroll_rxvt=yes 89support_scroll_rxvt=yes
95support_scroll_next=yes 90support_scroll_next=yes
96support_scroll_xterm=yes 91support_scroll_xterm=yes
97support_xim=yes 92support_xim=yes
98support_pixbuf=yes 93support_pixbuf=yes
99support_afterimage=yes 94support_startup_notification=yes
100support_xft=yes 95support_xft=yes
101support_unicode3=no 96support_unicode3=no
102support_combining=yes 97support_combining=yes
103support_8bitctrls=no 98support_8bitctrls=no
104support_iso14755=yes 99support_iso14755=yes
130 support_scroll_xterm=no 125 support_scroll_xterm=no
131 support_utmp=no 126 support_utmp=no
132 support_wtmp=no 127 support_wtmp=no
133 support_xim=no 128 support_xim=no
134 support_pixbuf=no 129 support_pixbuf=no
135 support_afterimage=no 130 support_startup_notification=no
136 support_xft=no 131 support_xft=no
137 support_unicode3=no 132 support_unicode3=no
138 support_combining=no 133 support_combining=no
139 support_8bitctrls=no 134 support_8bitctrls=no
140 support_iso14755=no 135 support_iso14755=no
158 support_scroll_xterm=yes 153 support_scroll_xterm=yes
159 support_utmp=yes 154 support_utmp=yes
160 support_wtmp=yes 155 support_wtmp=yes
161 support_xim=yes 156 support_xim=yes
162 support_pixbuf=yes 157 support_pixbuf=yes
163 support_afterimage=yes 158 support_startup_notification=yes
164 support_xft=yes 159 support_xft=yes
165 support_unicode3=yes 160 support_unicode3=yes
166 support_combining=yes 161 support_combining=yes
167 #support_8bitctrls=yes 162 #support_8bitctrls=yes
168 support_iso14755=yes 163 support_iso14755=yes
170 support_perl=yes 165 support_perl=yes
171 codesets=all 166 codesets=all
172 fi 167 fi
173 ]) 168 ])
174 169
175ASSERTIONS=no 170support_assertions=no
176AC_ARG_ENABLE(assert, 171AC_ARG_ENABLE(assert,
177 [ --enable-assert enable assertions], 172 [ --enable-assert enable assertions],
178 [if test x$enableval = xyes; then 173 [if test x$enableval = xyes; then
179 ASSERTIONS=yes 174 support_assertions=yes
180 fi]) 175 fi])
181if test x$ASSERTIONS = xno; then 176if test x$support_assertions = xno; then
182 AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging)) 177 AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging))
183fi 178fi
184 179
185WARNINGS=no 180support_warnings=no
186AC_ARG_ENABLE(warnings, 181AC_ARG_ENABLE(warnings,
187 [ --enable-warnings turn on g++ warnings], 182 [ --enable-warnings turn on g++ warnings],
188 [if test x$enableval = xyes; then 183 [if test x$enableval = xyes; then
189 WARNINGS=yes 184 support_warnings=yes
190 fi]) 185 fi])
191if test x$GXX = xyes; then 186if test x$GXX = xyes; then
192 if test $WARNINGS = yes; then 187 if test $support_warnings = yes; then
193 save_CXXFLAGS="$CXXFLAGS" 188 save_CXXFLAGS="$CXXFLAGS"
194 CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" 189 CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-unused-value"
195 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) 190 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"])
196 else 191 else
197 CXXFLAGS="$CXXFLAGS -w" 192 CXXFLAGS="$CXXFLAGS -w"
198 fi 193 fi
199fi 194fi
230 [ --enable-font-styles enable bold and italic support], 225 [ --enable-font-styles enable bold and italic support],
231 [if test x$enableval = xyes -o x$enableval = xno; then 226 [if test x$enableval = xyes -o x$enableval = xno; then
232 support_styles=$enableval 227 support_styles=$enableval
233 fi]) 228 fi])
234 229
235AC_ARG_ENABLE(afterimage,
236 [ --enable-afterimage enable integration with libAfterImage for background images],
237 [if test x$enableval = xyes -o x$enableval = xno; then
238 support_afterimage=$enableval
239 fi])
240
241AC_ARG_WITH(afterimage_config,
242 [ --with-afterimage-config=DIR use libAfterImage config script in DIR],
243 [if test "x$withval" != x; then
244 afterimage_config=$withval/afterimage-config
245 fi])
246
247AC_ARG_ENABLE(pixbuf, 230AC_ARG_ENABLE(pixbuf,
248 [ --enable-pixbuf enable integration with gdk-pixbuf for background images], 231 [ --enable-pixbuf enable integration with gdk-pixbuf for background images],
249 [if test x$enableval = xyes -o x$enableval = xno; then 232 [if test x$enableval = xyes -o x$enableval = xno; then
250 support_pixbuf=$enableval 233 support_pixbuf=$enableval
234 fi])
235
236AC_ARG_ENABLE(startup-notification,
237 [ --enable-startup-notification enable freedesktop startup notification support],
238 [if test x$enableval = xyes -o x$enableval = xno; then
239 support_startup_notification=$enableval
251 fi]) 240 fi])
252 241
253AC_ARG_ENABLE(transparency, 242AC_ARG_ENABLE(transparency,
254 [ --enable-transparency enable transparent backgrounds], 243 [ --enable-transparency enable transparent backgrounds],
255 [if test x$enableval = xyes -o x$enableval = xno; then 244 [if test x$enableval = xyes -o x$enableval = xno; then
306 [ --disable-delete-key disable handling of the delete key], 295 [ --disable-delete-key disable handling of the delete key],
307 [if test x$enableval = xno; then 296 [if test x$enableval = xno; then
308 AC_DEFINE(NO_DELETE_KEY, 1, Define if you don't want support for the (non-keypad) delete key) 297 AC_DEFINE(NO_DELETE_KEY, 1, Define if you don't want support for the (non-keypad) delete key)
309 fi]) 298 fi])
310 299
300support_resources=yes
311AC_ARG_ENABLE(resources, 301AC_ARG_ENABLE(resources,
312 [ --disable-resources disable all resource checking], 302 [ --disable-resources disable all resource checking],
313 [if test x$enableval = xno; then 303 [if test x$enableval = xno; then
314 AC_DEFINE(NO_RESOURCES, 1, Define if you don't want any resources read) 304 support_resources=no
315 fi]) 305 fi])
316 306
317AC_ARG_ENABLE(8bitctrls, 307AC_ARG_ENABLE(8bitctrls,
318 [ --enable-8bitctrls enable 8 bit control sequences (not recommended)], 308 [ --enable-8bitctrls enable 8 bit control sequences (not recommended)],
319 [if test x$enableval = xyes -o x$enableval = xno; then 309 [if test x$enableval = xyes -o x$enableval = xno; then
423 [ --with-terminfo=PATH set the path to the terminfo tree to PATH], 413 [ --with-terminfo=PATH set the path to the terminfo tree to PATH],
424 [if test x$withval != x; then 414 [if test x$withval != x; then
425 AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" 415 AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval"
426 fi]) 416 fi])
427 417
418if test x$support_resources = xno; then
419 if test x$support_frills = xyes || test x$support_perl = xyes; then
420 AC_MSG_ERROR([--disable-resources requires --disable-frills --disable-perl])
421 fi
422
423 AC_DEFINE(NO_RESOURCES, 1, Define if you don't want any resources read)
424fi
425
428dnl# -------------------------------------------------------------------------- 426dnl# --------------------------------------------------------------------------
429 427
430LIBEV_M4_AVOID_LIBRT=1 428LIBEV_M4_AVOID_LIBRT=1
431m4_include([libev/libev.m4]) 429m4_include([libev/libev.m4])
432 430
434 432
435AC_PATH_PROG(TIC, tic, :) 433AC_PATH_PROG(TIC, tic, :)
436 434
437AC_PATH_XTRA 435AC_PATH_XTRA
438 436
437AC_PATH_TOOL(PKG_CONFIG, pkg-config, no)
438
439image_lib=none 439image_lib=none
440 440
441PIXBUF_CFLAGS= 441PIXBUF_CFLAGS=
442PIXBUF_LIBS= 442PIXBUF_LIBS=
443 443
444if test x$support_pixbuf = xyes; then 444if test x$support_pixbuf = xyes; then
445 support_pixbuf=no 445 RXVT_CHECK_MODULES([PIXBUF], [gdk-pixbuf-2.0], [
446 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
447 AC_MSG_CHECKING(for gdk-pixbuf)
448 if test $PKG_CONFIG != no && $PKG_CONFIG --exists gdk-pixbuf-2.0; then
449 PIXBUF_CFLAGS="`$PKG_CONFIG gdk-pixbuf-2.0 --cflags`"
450 PIXBUF_LIBS="`$PKG_CONFIG gdk-pixbuf-2.0 --libs`"
451 support_pixbuf=yes
452 fi
453
454 if test x$support_pixbuf = xyes; then
455 AC_MSG_RESULT(ok)
456 image_lib=gdk-pixbuf 446 image_lib=gdk-pixbuf
457 support_afterimage=no
458 AC_DEFINE(HAVE_PIXBUF, 1, Define if you want to use gdk-pixbuf for image processing) 447 AC_DEFINE(HAVE_PIXBUF, 1, Define if you want to use gdk-pixbuf for image processing)
459 AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps.) 448 ], [:])
460 else
461 AC_MSG_RESULT(no)
462 fi
463fi 449fi
464 450
465AC_SUBST(PIXBUF_CFLAGS) 451AC_SUBST(PIXBUF_CFLAGS)
466AC_SUBST(PIXBUF_LIBS) 452AC_SUBST(PIXBUF_LIBS)
467 453
468AFTERIMAGE_CFLAGS= 454STARTUP_NOTIFICATION_CFLAGS=
469AFTERIMAGE_LIBS= 455STARTUP_NOTIFICATION_LIBS=
470AFTERIMAGE_VERSION=
471 456
457if test x$support_startup_notification = xyes; then
458 RXVT_CHECK_MODULES([STARTUP_NOTIFICATION], [libstartup-notification-1.0], [
459 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, Define if freedesktop startup notifications should be supported)
460 ], [:])
461fi
462
463AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
464AC_SUBST(STARTUP_NOTIFICATION_LIBS)
465
472if test x$support_afterimage = xyes; then 466if test x$support_frills = xyes; then
473 support_afterimage=no 467 RXVT_CHECK_MODULES([XMU], [xmu], [
474 468 X_LIBS="$XMU_LIBS $X_LIBS"
475 if test "x$afterimage_config" = "x" ; then 469 CPPFLAGS="$CPPFLAGS $XMU_CFLAGS"
476 AC_PATH_PROG(afterimage_config, afterimage-config, no) 470 AC_DEFINE(HAVE_XMU, 1, Define to enable Xmu support)
477 fi 471 ], [:])
478 if test "x$afterimage_config" != "xno" ; then
479 AC_MSG_CHECKING(for libAfterImage version >= 1.15)
480 xAFTERIMAGE_VERSION=`$afterimage_config --version`
481 if test -n "$xAFTERIMAGE_VERSION" ; then
482 xAFTERIMAGE_CFLAGS=`$afterimage_config --cflags`
483 xAFTERIMAGE_LIBS=`$afterimage_config --libs`
484 if test "x$xAFTERIMAGE_LIBS" != "x"; then
485 libai_ver_major=`echo $xAFTERIMAGE_VERSION | cut -f 1 -d .`
486 libai_ver_minor=`echo $xAFTERIMAGE_VERSION | cut -f 2 -d .`
487 if test $libai_ver_major -gt 1 -o \( $libai_ver_major -eq 1 -a $libai_ver_minor -ge 15 \); then
488 support_afterimage=yes
489 AFTERIMAGE_CFLAGS="$xAFTERIMAGE_CFLAGS"
490 AFTERIMAGE_LIBS="$xAFTERIMAGE_LIBS"
491 AFTERIMAGE_VERSION="$xAFTERIMAGE_VERSION"
492 fi
493 fi
494 fi
495 if test "x$support_afterimage" = "xyes"; then
496 AC_MSG_RESULT($AFTERIMAGE_LIBS)
497 image_lib=libafterimage
498 AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing)
499 AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps.)
500 else
501 AC_MSG_RESULT(no)
502 fi
503 fi
504fi 472fi
505
506AC_SUBST(AFTERIMAGE_CFLAGS)
507AC_SUBST(AFTERIMAGE_LIBS)
508 473
509dnl# -------------------------------------------------------------------------- 474dnl# --------------------------------------------------------------------------
510dnl# CHECKING FOR HEADER FILES 475dnl# CHECKING FOR HEADER FILES
511dnl# -------------------------------------------------------------------------- 476dnl# --------------------------------------------------------------------------
512AC_CHECK_HEADERS( \ 477AC_CHECK_HEADERS( \
514 sys/ioctl.h \ 479 sys/ioctl.h \
515 sys/sockio.h \ 480 sys/sockio.h \
516 sys/strredir.h \ 481 sys/strredir.h \
517 stdint.h \ 482 stdint.h \
518 wchar.h \ 483 wchar.h \
519 cwchar \
520) 484)
521 485
522AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_cv_xlib_illegal_access, 486AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_cv_xlib_illegal_access,
523[AC_COMPILE_IFELSE( 487[AC_COMPILE_IFELSE(
524 [AC_LANG_PROGRAM([ 488 [AC_LANG_PROGRAM([
558dnl# -------------------------------------------------------------------------- 522dnl# --------------------------------------------------------------------------
559dnl# -------------------------------------------------------------------------- 523dnl# --------------------------------------------------------------------------
560 524
561dnl# this is a really hack test for some basic Xlocale stuff 525dnl# this is a really hack test for some basic Xlocale stuff
562save_LIBS=$LIBS 526save_LIBS=$LIBS
563save_CFLAGS=$CFLAGS 527save_CXXFLAGS=$CXXFLAGS
564CFLAGS="$CFLAGS $X_CFLAGS" 528CXXFLAGS="$CXXFLAGS $X_CFLAGS"
565LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" 529LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11"
566if test x$support_xim = xyes; then 530if test x$support_xim = xyes; then
567 AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, 531 AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale,
568 [AC_RUN_IFELSE([AC_LANG_SOURCE([[ 532 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
569 #include <X11/Xlib.h> 533 #include <X11/Xlib.h>
601#include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) 565#include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])])
602if test x$rxvt_cv_func_xsetlocale = xyes; then 566if test x$rxvt_cv_func_xsetlocale = xyes; then
603 AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) 567 AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works)
604fi 568fi
605LIBS=$save_LIBS 569LIBS=$save_LIBS
606CFLAGS=$save_CFLAGS 570CXXFLAGS=$save_CXXFLAGS
607
608AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale,
609[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])])
610if test x$rxvt_cv_func_setlocale = xyes; then
611 AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works)
612fi
613 571
614AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo, 572AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo,
615[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo(CODESET);]])],[rxvt_cv_func_nl_langinfo=yes],[rxvt_cv_func_nl_langinfo=no])]) 573[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo(CODESET);]])],[rxvt_cv_func_nl_langinfo=yes],[rxvt_cv_func_nl_langinfo=no])])
616if test x$rxvt_cv_func_nl_langinfo = xyes; then 574if test x$rxvt_cv_func_nl_langinfo = xyes; then
617 AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) 575 AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works)
624TTY_GROUP_CHECK 582TTY_GROUP_CHECK
625 583
626dnl# -------------------------------------------------------------------------- 584dnl# --------------------------------------------------------------------------
627dnl# now add and remove other stuff 585dnl# now add and remove other stuff
628dnl# -------------------------------------------------------------------------- 586dnl# --------------------------------------------------------------------------
587support_image=no
588if test x$support_inheritpixmap = xyes || test x$support_pixbuf = xyes; then
589 support_image=yes
590fi
629if test x$support_xft = xyes || test x$support_inheritpixmap = xyes; then 591if test x$support_xft = xyes || test x$support_image = xyes; then
630 rxvt_have_xrender=no 592 rxvt_have_xrender=no
631 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 593 RXVT_CHECK_MODULES([XRENDER], [xrender], [
632 if test $PKG_CONFIG != no && $PKG_CONFIG --exists xrender; then 594 X_LIBS="$XRENDER_LIBS $X_LIBS"
633 X_LIBS="`$PKG_CONFIG xrender --libs` $X_LIBS" 595 CPPFLAGS="$CPPFLAGS $XRENDER_CFLAGS"
634 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xrender --cflags`"
635 rxvt_have_xrender=yes 596 rxvt_have_xrender=yes
636 597
637 save_LIBS="$LIBS" 598 save_LIBS="$LIBS"
638 LIBS="$LIBS $X_LIBS" 599 LIBS="$LIBS $X_LIBS"
639 AC_CHECK_HEADER(X11/extensions/Xrender.h,,[rxvt_have_xrender=no]) 600 AC_CHECK_HEADER(X11/extensions/Xrender.h,,[rxvt_have_xrender=no])
640 AC_CHECK_FUNC(XRenderFindStandardFormat,,[rxvt_have_xrender=no]) 601 AC_CHECK_FUNC(XRenderFindStandardFormat,,[rxvt_have_xrender=no])
641 LIBS="$save_LIBS" 602 LIBS="$save_LIBS"
642 fi 603 ], [:])
643fi 604fi
644 605
645if test x$support_xft = xyes && test x$rxvt_have_xrender = xyes; then 606if test x$support_xft = xyes && test x$rxvt_have_xrender = xyes; then
646 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 607 RXVT_CHECK_MODULES([XFT], [fontconfig xft], [
647 if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then 608 X_LIBS="$XFT_LIBS $X_LIBS"
648 X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" 609 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
649 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" 610 ], [
650 else
651 AC_PATH_PROG(XFT_CONFIG, xft-config, no) 611 AC_PATH_PROG(XFT_CONFIG, xft-config, no)
652 if test $XFT_CONFIG != no; then 612 if test $XFT_CONFIG != no; then
653 X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" 613 X_LIBS="`$XFT_CONFIG --libs` $X_LIBS"
654 CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" 614 CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`"
655 fi 615 fi
656 fi 616 ])
657
658 if test $PKG_CONFIG != no && $PKG_CONFIG --exists fontconfig; then
659 X_LIBS="`$PKG_CONFIG fontconfig --libs` $X_LIBS"
660 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG fontconfig --cflags`"
661 fi
662 617
663 save_LIBS="$LIBS" 618 save_LIBS="$LIBS"
664 LIBS="$LIBS $X_LIBS" 619 LIBS="$LIBS $X_LIBS"
665 AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no])
666 AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no])
667 AC_CHECK_HEADERS(fontconfig/fontconfig.h,,[support_xft=no]) 620 AC_CHECK_HEADERS(X11/Xft/Xft.h fontconfig/fontconfig.h,,[support_xft=no])
668 AC_CHECK_LIB(fontconfig,FcPatternGet,:,[support_xft=no]) 621 AC_CHECK_FUNCS(XftDrawString32 FcPatternGet,,[support_xft=no])
669 LIBS="$save_LIBS" 622 LIBS="$save_LIBS"
670 623
671 if test x$support_xft = xyes; then 624 if test x$support_xft = xyes; then
672 AC_DEFINE(XFT, 1, Define to enable xft support) 625 AC_DEFINE(XFT, 1, Define to enable xft support)
673 fi 626 fi
674fi 627fi
628
629if test x$support_image = xyes && test x$rxvt_have_xrender = xyes; then
630 AC_MSG_CHECKING(for Render >= 0.11)
631 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
632#include <X11/extensions/Xrender.h>
633#if RENDER_MAJOR == 0 && RENDER_MINOR <= 10
634error
635#endif
636]])],[],[support_image=no])
637 if test x$support_image = xyes; then
638 AC_MSG_RESULT(ok)
639 LIBS="$LIBS -lm"
640 AC_DEFINE(XRENDER, 1, Define to enable xrender support)
641
642 if test x$support_inheritpixmap = xyes; then
643 AC_DEFINE(ENABLE_TRANSPARENCY, 1, Define if you want your background to use the parent window background)
644 fi
645 else
646 AC_MSG_RESULT(no)
647 fi
648fi
649
675if test x$support_styles = xyes; then 650if test x$support_styles = xyes; then
676 AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support) 651 AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support)
677fi 652fi
678if test x$support_iso14755 = xyes; then 653if test x$support_iso14755 = xyes; then
679 AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support) 654 AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support)
681if test x$support_8bitctrls = xyes; then 656if test x$support_8bitctrls = xyes; then
682 AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences) 657 AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences)
683fi 658fi
684if test x$support_fading = xyes; then 659if test x$support_fading = xyes; then
685 AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost) 660 AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost)
686fi
687if test x$support_inheritpixmap = xyes; then
688 if test x$rxvt_have_xrender = xyes; then
689 LIBS="$LIBS -lm"
690 AC_DEFINE(XRENDER, 1, Define to enable xrender support)
691 fi
692 AC_DEFINE(ENABLE_TRANSPARENCY, 1, Define if you want your background to use the parent window background)
693fi 661fi
694if test x$support_keepscrolling = xno; then 662if test x$support_keepscrolling = xno; then
695 AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed) 663 AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed)
696fi 664fi
697if test x$support_selectionscrolling = xyes; then 665if test x$support_selectionscrolling = xyes; then
749 esac 717 esac
750done 718done
751 719
752IF_PERL=\# 720IF_PERL=\#
753if test x$support_perl = xyes; then 721if test x$support_perl = xyes; then
754 AC_PATH_PROG(PERL, perl5) 722 AC_PATH_PROG(PERL, perl5, perl)
755 AC_PATH_PROG(PERL, perl)
756 723
757 AC_MSG_CHECKING(for $PERL suitability) 724 AC_MSG_CHECKING(for $PERL suitability)
758 if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then 725 if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>/dev/null; then
759 726
760 save_CXXFLAGS="$CXXFLAGS" 727 save_CXXFLAGS="$CXXFLAGS"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines