1 | dnl# |
1 | dnl# |
2 | dnl# Process this file with autoconf to produce a configure script. |
2 | dnl# Process this file with autoconf to produce a configure script. |
3 | dnl# |
3 | dnl# |
4 | |
4 | |
5 | AC_INIT |
5 | AC_INIT |
6 | AC_PREREQ(2.50) |
6 | AC_PREREQ(2.71) |
7 | AC_CONFIG_SRCDIR([src/feature.h]) |
7 | AC_CONFIG_SRCDIR([src/feature.h]) |
8 | AC_CONFIG_HEADER(config.h:config.h.in) |
8 | AC_CONFIG_HEADER(config.h:config.h.in) |
9 | |
9 | |
10 | AC_CANONICAL_HOST |
10 | AC_CANONICAL_HOST |
11 | |
11 | |
12 | dnl RXVT version |
12 | dnl RXVT version |
13 | changequote(, )dnl |
13 | changequote(, )dnl |
14 | VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
14 | VERSION=`sed -n -e 's/^.* VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
15 | DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
15 | DATE=`sed -n -e 's/^.* DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
16 | changequote([, ])dnl |
16 | changequote([, ])dnl |
17 | AC_SUBST(VERSION)dnl |
17 | AC_SUBST(VERSION)dnl |
18 | AC_SUBST(DATE)dnl |
18 | AC_SUBST(DATE)dnl |
19 | |
19 | |
20 | echo "" |
20 | echo "" |
… | |
… | |
24 | orig_CXXFLAGS="$CXXFLAGS" |
24 | orig_CXXFLAGS="$CXXFLAGS" |
25 | |
25 | |
26 | dnl# Checks for programs. |
26 | dnl# Checks for programs. |
27 | AC_PROG_CC |
27 | AC_PROG_CC |
28 | AC_PROG_CXX |
28 | AC_PROG_CXX |
29 | AC_PROG_CPP |
|
|
30 | AC_PROG_INSTALL |
29 | AC_PROG_INSTALL |
31 | |
30 | |
32 | AC_AIX |
31 | AC_AIX |
33 | AC_GNU_SOURCE |
32 | AC_GNU_SOURCE |
34 | AC_ISC_POSIX |
33 | AC_ISC_POSIX |
35 | AC_LANG(C++) |
34 | AC_LANG(C++) |
36 | |
35 | |
|
|
36 | if test "$ac_prog_cxx_stdcxx" != cxx11; then |
|
|
37 | AC_MSG_ERROR([the compiler does not support C++11]) |
|
|
38 | fi |
|
|
39 | |
|
|
40 | LINKER="$CXX" |
37 | dnl check whether we can link with gcc -lsupc++ |
41 | dnl check whether we can link with gcc -lsupc++ |
38 | if test x$GCC = xyes && test x$GXX = xyes; then |
42 | if test x$GCC = xyes && test x$GXX = xyes; then |
39 | dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it |
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" |
56 | fi |
59 | fi |
57 | AC_SUBST(LINKER,[$LINKER]) |
60 | AC_SUBST(LINKER,[$LINKER]) |
… | |
… | |
66 | else |
69 | else |
67 | CXXFLAGS="-O" |
70 | CXXFLAGS="-O" |
68 | fi |
71 | fi |
69 | CFLAGS="$CXXFLAGS" |
72 | CFLAGS="$CXXFLAGS" |
70 | fi |
73 | fi |
71 | |
|
|
72 | case $host in |
|
|
73 | *-*-solaris* ) |
|
|
74 | AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) |
|
|
75 | ;; |
|
|
76 | esac |
|
|
77 | |
74 | |
78 | dnl# FreeBSD needs to link libxpg4 |
75 | dnl# FreeBSD needs to link libxpg4 |
79 | AC_SEARCH_LIBS(setlocale, xpg4) |
76 | AC_SEARCH_LIBS(setlocale, xpg4) |
80 | |
77 | |
81 | dnl# solaris needs to link libnsl and socket |
78 | dnl# solaris needs to link libnsl and socket |
… | |
… | |
94 | support_scroll_rxvt=yes |
91 | support_scroll_rxvt=yes |
95 | support_scroll_next=yes |
92 | support_scroll_next=yes |
96 | support_scroll_xterm=yes |
93 | support_scroll_xterm=yes |
97 | support_xim=yes |
94 | support_xim=yes |
98 | support_pixbuf=yes |
95 | support_pixbuf=yes |
99 | support_afterimage=yes |
96 | support_startup_notification=yes |
100 | support_xft=yes |
97 | support_xft=yes |
101 | support_unicode3=no |
98 | support_unicode3=no |
102 | support_combining=yes |
99 | support_combining=yes |
103 | support_8bitctrls=no |
100 | support_8bitctrls=no |
104 | support_iso14755=yes |
101 | support_iso14755=yes |
… | |
… | |
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_pixbuf=no |
131 | support_pixbuf=no |
135 | support_afterimage=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 |
… | |
… | |
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_pixbuf=yes |
159 | support_pixbuf=yes |
163 | support_afterimage=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 | |
175 | ASSERTIONS=no |
172 | support_assertions=no |
176 | AC_ARG_ENABLE(assert, |
173 | AC_ARG_ENABLE(assert, |
177 | [ --enable-assert enable assertions], |
174 | [ --enable-assert enable assertions], |
178 | [if test x$enableval = xyes; then |
175 | [if test x$enableval = xyes; then |
179 | ASSERTIONS=yes |
176 | support_assertions=yes |
180 | fi]) |
177 | fi]) |
181 | if test x$ASSERTIONS = xno; then |
178 | if test x$support_assertions = xno; then |
182 | AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging)) |
179 | AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging)) |
183 | fi |
180 | fi |
184 | |
181 | |
185 | WARNINGS=no |
182 | support_warnings=no |
186 | AC_ARG_ENABLE(warnings, |
183 | AC_ARG_ENABLE(warnings, |
187 | [ --enable-warnings turn on g++ warnings], |
184 | [ --enable-warnings turn on g++ warnings], |
188 | [if test x$enableval = xyes; then |
185 | [if test x$enableval = xyes; then |
189 | WARNINGS=yes |
186 | support_warnings=yes |
190 | fi]) |
187 | fi]) |
191 | if test x$GXX = xyes; then |
188 | if test x$GXX = xyes; then |
192 | if test $WARNINGS = yes; then |
189 | if test $support_warnings = yes; then |
193 | save_CXXFLAGS="$CXXFLAGS" |
190 | save_CXXFLAGS="$CXXFLAGS" |
194 | CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" |
191 | CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-unused-value" |
195 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
192 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
196 | else |
193 | else |
197 | CXXFLAGS="$CXXFLAGS -w" |
194 | CXXFLAGS="$CXXFLAGS -w" |
198 | fi |
195 | fi |
199 | fi |
196 | fi |
… | |
… | |
230 | [ --enable-font-styles enable bold and italic support], |
227 | [ --enable-font-styles enable bold and italic support], |
231 | [if test x$enableval = xyes -o x$enableval = xno; then |
228 | [if test x$enableval = xyes -o x$enableval = xno; then |
232 | support_styles=$enableval |
229 | support_styles=$enableval |
233 | fi]) |
230 | fi]) |
234 | |
231 | |
235 | AC_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 | |
|
|
241 | AC_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 | |
|
|
247 | AC_ARG_ENABLE(pixbuf, |
232 | AC_ARG_ENABLE(pixbuf, |
248 | [ --enable-pixbuf enable integration with gdk-pixbuf for background images], |
233 | [ --enable-pixbuf enable integration with gdk-pixbuf for background images], |
249 | [if test x$enableval = xyes -o x$enableval = xno; then |
234 | [if test x$enableval = xyes -o x$enableval = xno; then |
250 | support_pixbuf=$enableval |
235 | support_pixbuf=$enableval |
|
|
236 | fi]) |
|
|
237 | |
|
|
238 | AC_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 |
251 | fi]) |
242 | fi]) |
252 | |
243 | |
253 | AC_ARG_ENABLE(transparency, |
244 | AC_ARG_ENABLE(transparency, |
254 | [ --enable-transparency enable transparent backgrounds], |
245 | [ --enable-transparency enable transparent backgrounds], |
255 | [if test x$enableval = xyes -o x$enableval = xno; then |
246 | [if test x$enableval = xyes -o x$enableval = xno; then |
… | |
… | |
306 | [ --disable-delete-key disable handling of the delete key], |
297 | [ --disable-delete-key disable handling of the delete key], |
307 | [if test x$enableval = xno; then |
298 | [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) |
299 | AC_DEFINE(NO_DELETE_KEY, 1, Define if you don't want support for the (non-keypad) delete key) |
309 | fi]) |
300 | fi]) |
310 | |
301 | |
|
|
302 | support_resources=yes |
311 | AC_ARG_ENABLE(resources, |
303 | AC_ARG_ENABLE(resources, |
312 | [ --disable-resources disable all resource checking], |
304 | [ --disable-resources disable all resource checking], |
313 | [if test x$enableval = xno; then |
305 | [if test x$enableval = xno; then |
314 | AC_DEFINE(NO_RESOURCES, 1, Define if you don't want any resources read) |
306 | support_resources=no |
315 | fi]) |
307 | fi]) |
316 | |
308 | |
317 | AC_ARG_ENABLE(8bitctrls, |
309 | AC_ARG_ENABLE(8bitctrls, |
318 | [ --enable-8bitctrls enable 8 bit control sequences (not recommended)], |
310 | [ --enable-8bitctrls enable 8 bit control sequences (not recommended)], |
319 | [if test x$enableval = xyes -o x$enableval = xno; then |
311 | [if test x$enableval = xyes -o x$enableval = xno; then |
… | |
… | |
423 | [ --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], |
424 | [if test x$withval != x; then |
416 | [if test x$withval != x; then |
425 | 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" |
426 | fi]) |
418 | fi]) |
427 | |
419 | |
|
|
420 | if 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) |
|
|
426 | fi |
|
|
427 | |
428 | dnl# -------------------------------------------------------------------------- |
428 | dnl# -------------------------------------------------------------------------- |
429 | |
429 | |
430 | LIBEV_M4_AVOID_LIBRT=1 |
430 | LIBEV_M4_AVOID_LIBRT=1 |
431 | m4_include([libev/libev.m4]) |
431 | m4_include([libev/libev.m4]) |
432 | |
432 | |
… | |
… | |
434 | |
434 | |
435 | AC_PATH_PROG(TIC, tic, :) |
435 | AC_PATH_PROG(TIC, tic, :) |
436 | |
436 | |
437 | AC_PATH_XTRA |
437 | AC_PATH_XTRA |
438 | |
438 | |
|
|
439 | AC_PATH_TOOL(PKG_CONFIG, pkg-config, no) |
|
|
440 | |
439 | image_lib=none |
441 | image_lib=none |
440 | |
442 | |
441 | PIXBUF_CFLAGS= |
443 | PIXBUF_CFLAGS= |
442 | PIXBUF_LIBS= |
444 | PIXBUF_LIBS= |
443 | |
445 | |
444 | if test x$support_pixbuf = xyes; then |
446 | if test x$support_pixbuf = xyes; then |
445 | support_pixbuf=no |
447 | 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 |
448 | 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) |
449 | 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.) |
450 | ], [:]) |
460 | else |
|
|
461 | AC_MSG_RESULT(no) |
|
|
462 | fi |
|
|
463 | fi |
451 | fi |
464 | |
452 | |
465 | AC_SUBST(PIXBUF_CFLAGS) |
453 | AC_SUBST(PIXBUF_CFLAGS) |
466 | AC_SUBST(PIXBUF_LIBS) |
454 | AC_SUBST(PIXBUF_LIBS) |
467 | |
455 | |
468 | AFTERIMAGE_CFLAGS= |
456 | STARTUP_NOTIFICATION_CFLAGS= |
469 | AFTERIMAGE_LIBS= |
457 | STARTUP_NOTIFICATION_LIBS= |
470 | AFTERIMAGE_VERSION= |
|
|
471 | |
458 | |
|
|
459 | if 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 | ], [:]) |
|
|
463 | fi |
|
|
464 | |
|
|
465 | AC_SUBST(STARTUP_NOTIFICATION_CFLAGS) |
|
|
466 | AC_SUBST(STARTUP_NOTIFICATION_LIBS) |
|
|
467 | |
472 | if test x$support_afterimage = xyes; then |
468 | if test x$support_frills = xyes; then |
473 | support_afterimage=no |
469 | RXVT_CHECK_MODULES([XMU], [xmu], [ |
474 | |
470 | X_LIBS="$XMU_LIBS $X_LIBS" |
475 | if test "x$afterimage_config" = "x" ; then |
471 | CPPFLAGS="$CPPFLAGS $XMU_CFLAGS" |
476 | AC_PATH_PROG(afterimage_config, afterimage-config, no) |
472 | AC_DEFINE(HAVE_XMU, 1, Define to enable Xmu support) |
477 | fi |
473 | ], [:]) |
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 |
|
|
504 | fi |
474 | fi |
505 | |
|
|
506 | AC_SUBST(AFTERIMAGE_CFLAGS) |
|
|
507 | AC_SUBST(AFTERIMAGE_LIBS) |
|
|
508 | |
475 | |
509 | dnl# -------------------------------------------------------------------------- |
476 | dnl# -------------------------------------------------------------------------- |
510 | dnl# CHECKING FOR HEADER FILES |
477 | dnl# CHECKING FOR HEADER FILES |
511 | dnl# -------------------------------------------------------------------------- |
478 | dnl# -------------------------------------------------------------------------- |
512 | AC_CHECK_HEADERS( \ |
479 | AC_CHECK_HEADERS( \ |
… | |
… | |
514 | sys/ioctl.h \ |
481 | sys/ioctl.h \ |
515 | sys/sockio.h \ |
482 | sys/sockio.h \ |
516 | sys/strredir.h \ |
483 | sys/strredir.h \ |
517 | stdint.h \ |
484 | stdint.h \ |
518 | wchar.h \ |
485 | wchar.h \ |
519 | cwchar \ |
|
|
520 | ) |
486 | ) |
521 | |
487 | |
522 | AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_cv_xlib_illegal_access, |
488 | AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_cv_xlib_illegal_access, |
523 | [AC_COMPILE_IFELSE( |
489 | [AC_COMPILE_IFELSE( |
524 | [AC_LANG_PROGRAM([ |
490 | [AC_LANG_PROGRAM([ |
… | |
… | |
558 | dnl# -------------------------------------------------------------------------- |
524 | dnl# -------------------------------------------------------------------------- |
559 | dnl# -------------------------------------------------------------------------- |
525 | dnl# -------------------------------------------------------------------------- |
560 | |
526 | |
561 | dnl# this is a really hack test for some basic Xlocale stuff |
527 | dnl# this is a really hack test for some basic Xlocale stuff |
562 | save_LIBS=$LIBS |
528 | save_LIBS=$LIBS |
563 | save_CFLAGS=$CFLAGS |
529 | save_CXXFLAGS=$CXXFLAGS |
564 | CFLAGS="$CFLAGS $X_CFLAGS" |
530 | CXXFLAGS="$CXXFLAGS $X_CFLAGS" |
565 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
531 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
566 | if test x$support_xim = xyes; then |
532 | if test x$support_xim = xyes; then |
567 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
533 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
568 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
534 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
569 | #include <X11/Xlib.h> |
535 | #include <X11/Xlib.h> |
… | |
… | |
601 | #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])]) |
602 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
568 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
603 | 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) |
604 | fi |
570 | fi |
605 | LIBS=$save_LIBS |
571 | LIBS=$save_LIBS |
606 | CFLAGS=$save_CFLAGS |
572 | CXXFLAGS=$save_CXXFLAGS |
607 | |
|
|
608 | AC_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])]) |
|
|
610 | if test x$rxvt_cv_func_setlocale = xyes; then |
|
|
611 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
|
|
612 | fi |
|
|
613 | |
573 | |
614 | AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo, |
574 | AC_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])]) |
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])]) |
616 | if test x$rxvt_cv_func_nl_langinfo = xyes; then |
576 | if test x$rxvt_cv_func_nl_langinfo = xyes; then |
617 | 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) |
… | |
… | |
624 | TTY_GROUP_CHECK |
584 | TTY_GROUP_CHECK |
625 | |
585 | |
626 | dnl# -------------------------------------------------------------------------- |
586 | dnl# -------------------------------------------------------------------------- |
627 | dnl# now add and remove other stuff |
587 | dnl# now add and remove other stuff |
628 | dnl# -------------------------------------------------------------------------- |
588 | dnl# -------------------------------------------------------------------------- |
|
|
589 | support_image=no |
|
|
590 | if test x$support_inheritpixmap = xyes || test x$support_pixbuf = xyes; then |
|
|
591 | support_image=yes |
|
|
592 | fi |
629 | if test x$support_xft = xyes || test x$support_inheritpixmap = xyes; then |
593 | if test x$support_xft = xyes || test x$support_image = xyes; then |
630 | rxvt_have_xrender=no |
594 | rxvt_have_xrender=no |
631 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
595 | RXVT_CHECK_MODULES([XRENDER], [xrender], [ |
632 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xrender; then |
596 | X_LIBS="$XRENDER_LIBS $X_LIBS" |
633 | X_LIBS="`$PKG_CONFIG xrender --libs` $X_LIBS" |
597 | CPPFLAGS="$CPPFLAGS $XRENDER_CFLAGS" |
634 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xrender --cflags`" |
|
|
635 | rxvt_have_xrender=yes |
598 | rxvt_have_xrender=yes |
636 | |
599 | |
637 | save_LIBS="$LIBS" |
600 | save_LIBS="$LIBS" |
638 | LIBS="$LIBS $X_LIBS" |
601 | LIBS="$LIBS $X_LIBS" |
639 | AC_CHECK_HEADER(X11/extensions/Xrender.h,,[rxvt_have_xrender=no]) |
602 | AC_CHECK_HEADER(X11/extensions/Xrender.h,,[rxvt_have_xrender=no]) |
640 | AC_CHECK_FUNC(XRenderFindStandardFormat,,[rxvt_have_xrender=no]) |
603 | AC_CHECK_FUNC(XRenderFindStandardFormat,,[rxvt_have_xrender=no]) |
641 | LIBS="$save_LIBS" |
604 | LIBS="$save_LIBS" |
642 | fi |
605 | ], [:]) |
643 | fi |
606 | fi |
644 | |
607 | |
645 | if test x$support_xft = xyes && test x$rxvt_have_xrender = xyes; then |
608 | if test x$support_xft = xyes && test x$rxvt_have_xrender = xyes; then |
646 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
609 | RXVT_CHECK_MODULES([XFT], [fontconfig xft], [ |
647 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
610 | X_LIBS="$XFT_LIBS $X_LIBS" |
648 | X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
611 | CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" |
649 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
612 | ], [ |
650 | else |
|
|
651 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
613 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
652 | if test $XFT_CONFIG != no; then |
614 | if test $XFT_CONFIG != no; then |
653 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
615 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
654 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
616 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
655 | fi |
617 | fi |
656 | fi |
618 | ]) |
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 | |
619 | |
663 | save_LIBS="$LIBS" |
620 | save_LIBS="$LIBS" |
664 | LIBS="$LIBS $X_LIBS" |
621 | 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]) |
622 | AC_CHECK_HEADERS(X11/Xft/Xft.h fontconfig/fontconfig.h,,[support_xft=no]) |
668 | AC_CHECK_LIB(fontconfig,FcPatternGet,:,[support_xft=no]) |
623 | AC_CHECK_FUNCS(XftDrawString32 FcPatternGet,,[support_xft=no]) |
669 | LIBS="$save_LIBS" |
624 | LIBS="$save_LIBS" |
670 | |
625 | |
671 | if test x$support_xft = xyes; then |
626 | if test x$support_xft = xyes; then |
672 | AC_DEFINE(XFT, 1, Define to enable xft support) |
627 | AC_DEFINE(XFT, 1, Define to enable xft support) |
673 | fi |
628 | fi |
674 | fi |
629 | fi |
|
|
630 | |
|
|
631 | if 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 |
|
|
636 | error |
|
|
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 |
|
|
650 | fi |
|
|
651 | |
675 | if test x$support_styles = xyes; then |
652 | if test x$support_styles = xyes; then |
676 | 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) |
677 | fi |
654 | fi |
678 | if test x$support_iso14755 = xyes; then |
655 | if test x$support_iso14755 = xyes; then |
679 | 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) |
… | |
… | |
681 | if test x$support_8bitctrls = xyes; then |
658 | if test x$support_8bitctrls = xyes; then |
682 | 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) |
683 | fi |
660 | fi |
684 | if test x$support_fading = xyes; then |
661 | if test x$support_fading = xyes; then |
685 | 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) |
686 | fi |
|
|
687 | if 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) |
|
|
693 | fi |
663 | fi |
694 | if test x$support_keepscrolling = xno; then |
664 | if 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) |
665 | AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed) |
696 | fi |
666 | fi |
697 | if test x$support_selectionscrolling = xyes; then |
667 | if test x$support_selectionscrolling = xyes; then |
… | |
… | |
749 | esac |
719 | esac |
750 | done |
720 | done |
751 | |
721 | |
752 | IF_PERL=\# |
722 | IF_PERL=\# |
753 | if test x$support_perl = xyes; then |
723 | if test x$support_perl = xyes; then |
754 | AC_PATH_PROG(PERL, perl5) |
724 | AC_PATH_PROG(PERL, perl5, perl) |
755 | AC_PATH_PROG(PERL, perl) |
|
|
756 | |
725 | |
757 | AC_MSG_CHECKING(for $PERL suitability) |
726 | AC_MSG_CHECKING(for $PERL suitability) |
758 | 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 |
759 | |
728 | |
760 | save_CXXFLAGS="$CXXFLAGS" |
729 | save_CXXFLAGS="$CXXFLAGS" |