… | |
… | |
15 | DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
15 | DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
16 | dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
16 | dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
17 | changequote([, ])dnl |
17 | changequote([, ])dnl |
18 | AC_SUBST(VERSION)dnl |
18 | AC_SUBST(VERSION)dnl |
19 | AC_SUBST(DATE)dnl |
19 | AC_SUBST(DATE)dnl |
20 | AC_SUBST(LSMDATE)dnl |
|
|
21 | AC_SUBST(LIBVERSION)dnl |
20 | dnl AC_SUBST(LIBVERSION)dnl |
|
|
21 | |
22 | echo "" |
22 | echo "" |
23 | echo "configuring for rxvt $VERSION" |
23 | echo "configuring for rxvt $VERSION" |
24 | echo "" |
24 | echo "" |
25 | |
25 | |
26 | orig_CXXFLAGS="$CXXFLAGS" |
26 | orig_CXXFLAGS="$CXXFLAGS" |
27 | |
27 | |
28 | dnl# Checks for programs. |
28 | dnl# Checks for programs. |
29 | dnl AC_MAKE_SET |
|
|
30 | |
|
|
31 | AC_PROG_CC |
29 | AC_PROG_CC |
32 | AC_PROG_CXX |
30 | AC_PROG_CXX |
33 | AC_PROG_CPP |
31 | AC_PROG_CPP |
34 | AC_PROG_INSTALL |
32 | AC_PROG_INSTALL |
35 | |
33 | |
36 | AC_AIX |
34 | AC_AIX |
|
|
35 | AC_GNU_SOURCE |
37 | AC_ISC_POSIX |
36 | AC_ISC_POSIX |
38 | AC_LANG(C++) |
37 | AC_LANG(C++) |
39 | |
38 | |
40 | dnl check wether we can link with gcc -lsupc++ |
39 | dnl check wether we can link with gcc -lsupc++ |
41 | if test x$GCC = xyes && test x$GXX = xyes; then |
40 | if test x$GCC = xyes && test x$GXX = xyes; then |
… | |
… | |
62 | dnl# -------------------------------------------------------------------------- |
61 | dnl# -------------------------------------------------------------------------- |
63 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
62 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
64 | dnl# |
63 | dnl# |
65 | if test -z "$orig_CXXFLAGS"; then |
64 | if test -z "$orig_CXXFLAGS"; then |
66 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
65 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
67 | CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" |
66 | CXXFLAGS="-g -O3 -fno-rtti -fvisibility-inlines-hidden -fno-threadsafe-statics -fno-enforce-eh-specs" |
68 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
67 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
69 | else |
68 | else |
70 | CXXFLAGS="-O" |
69 | CXXFLAGS="-O" |
71 | fi |
70 | fi |
72 | CFLAGS="$CXXFLAGS" |
71 | CFLAGS="$CXXFLAGS" |
73 | fi |
72 | fi |
74 | |
73 | |
75 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
|
|
76 | |
|
|
77 | case $host in |
74 | case $host in |
78 | *-*-solaris* ) |
75 | *-*-solaris* ) |
79 | AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) |
76 | AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) |
80 | ;; |
77 | ;; |
81 | esac |
78 | esac |
82 | |
|
|
83 | dnl if test x$GXX = xyes; then |
|
|
84 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
|
|
85 | dnl fi |
|
|
86 | |
79 | |
87 | dnl# FreeBSD needs to link libxpg4 |
80 | dnl# FreeBSD needs to link libxpg4 |
88 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
81 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
89 | |
82 | |
90 | dnl# solaris needs to link libnsl and socket |
83 | dnl# solaris needs to link libnsl and socket |
… | |
… | |
122 | |
115 | |
123 | dnl# -------------------------------------------------------------------------- |
116 | dnl# -------------------------------------------------------------------------- |
124 | dnl# CHECKING COMMAND LINE OPTIONS |
117 | dnl# CHECKING COMMAND LINE OPTIONS |
125 | dnl# -------------------------------------------------------------------------- |
118 | dnl# -------------------------------------------------------------------------- |
126 | |
119 | |
127 | if test "x$enable_shared" = xyes; then |
120 | dnl if test "x$enable_shared" = xyes; then |
128 | AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
121 | dnl AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
129 | INSTALL_LIBRXVT=yes |
122 | dnl INSTALL_LIBRXVT=yes |
130 | fi |
123 | dnl fi |
131 | AC_SUBST(INSTALL_LIBRXVT) |
124 | dnl AC_SUBST(INSTALL_LIBRXVT) |
132 | |
125 | |
133 | AC_ARG_ENABLE(everything, |
126 | AC_ARG_ENABLE(everything, |
134 | [ --enable-everything enable standard non-multichoice features |
127 | [ --enable-everything enable standard non-multichoice features |
135 | NOTE: this option is order dependent |
128 | NOTE: this option is order dependent], |
136 | NOTE: automatically enabled with --enable-shared], |
|
|
137 | [ |
129 | [ |
138 | if test x$enableval = xno; then |
130 | if test x$enableval = xno; then |
139 | support_frills=no |
131 | support_frills=no |
140 | support_inheritpixmap=no |
132 | support_inheritpixmap=no |
141 | support_fading=no |
133 | support_fading=no |
… | |
… | |
193 | support_perl=yes |
185 | support_perl=yes |
194 | codesets=all |
186 | codesets=all |
195 | fi |
187 | fi |
196 | ]) |
188 | ]) |
197 | |
189 | |
|
|
190 | WARNINGS=no |
|
|
191 | AC_ARG_ENABLE(warnings, |
|
|
192 | [ --enable-warnings turn on g++ warnings], |
|
|
193 | [if test x$enableval = xyes; then |
|
|
194 | WARNINGS=yes |
|
|
195 | fi]) |
|
|
196 | if test x$GXX = xyes; then |
|
|
197 | if test $WARNINGS = yes; then |
|
|
198 | save_CXXFLAGS="$CXXFLAGS" |
|
|
199 | CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" |
|
|
200 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
|
|
201 | else |
|
|
202 | CXXFLAGS="$CXXFLAGS -w" |
|
|
203 | fi |
|
|
204 | fi |
|
|
205 | |
198 | AC_ARG_ENABLE(unicode3, |
206 | AC_ARG_ENABLE(unicode3, |
199 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
207 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
200 | [if test x$enableval = xyes -o x$enableval = xno; then |
208 | [if test x$enableval = xyes -o x$enableval = xno; then |
201 | support_unicode3=$enableval |
209 | support_unicode3=$enableval |
202 | fi]) |
210 | fi]) |
… | |
… | |
265 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
273 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
266 | [if test x$enableval = xyes -o x$enableval = xno; then |
274 | [if test x$enableval = xyes -o x$enableval = xno; then |
267 | support_scroll_xterm=$enableval |
275 | support_scroll_xterm=$enableval |
268 | fi]) |
276 | fi]) |
269 | |
277 | |
|
|
278 | AC_ARG_ENABLE(plain-scroll, |
|
|
279 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
280 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
281 | support_scroll_plain=$enableval |
|
|
282 | fi]) |
|
|
283 | |
270 | AC_ARG_ENABLE(perl, |
284 | AC_ARG_ENABLE(perl, |
271 | [ --enable-perl enable embedded perl interpreter], |
285 | [ --enable-perl enable embedded perl interpreter], |
272 | [if test x$enableval = xyes -o x$enableval = xno; then |
286 | [if test x$enableval = xyes -o x$enableval = xno; then |
273 | support_perl=$enableval |
287 | support_perl=$enableval |
274 | fi]) |
288 | fi]) |
275 | |
289 | |
276 | AC_ARG_ENABLE(plain-scroll, |
|
|
277 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
278 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
279 | support_scroll_plain=$enableval |
|
|
280 | fi]) |
|
|
281 | |
|
|
282 | AC_ARG_WITH(codesets, |
290 | AC_ARG_WITH(codesets, |
283 | [ --with-codesets=NAME,.. compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
291 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
284 | [codesets="$withval"]) |
292 | [codesets="$withval"]) |
285 | |
293 | |
286 | AC_ARG_ENABLE(xim, |
294 | AC_ARG_ENABLE(xim, |
287 | [ --enable-xim XIM (X Input Method) protocol support], |
295 | [ --enable-xim XIM (X Input Method) protocol support], |
288 | [if test x$enableval = xyes -o x$enableval = xno; then |
296 | [if test x$enableval = xyes -o x$enableval = xno; then |
… | |
… | |
313 | support_8bitctrls=$enableval |
321 | support_8bitctrls=$enableval |
314 | fi]) |
322 | fi]) |
315 | |
323 | |
316 | RESFALLBACK=Rxvt |
324 | RESFALLBACK=Rxvt |
317 | AC_ARG_ENABLE(fallback, |
325 | AC_ARG_ENABLE(fallback, |
318 | [ --enable-fallback(=CLASS) fall back on CLASS resources in addition to URxvt ones (default: Rxvt)], |
326 | [ --enable-fallback@<:@=CLASS@:>@ fall back on CLASS resources in addition to URxvt ones (default: Rxvt)], |
319 | [ |
327 | [ |
320 | test x$enableval = xyes && enableval=Rxvt |
328 | test x$enableval = xyes && enableval=Rxvt |
321 | test x$enableval = xno && enableval= |
329 | test x$enableval = xno && enableval= |
322 | RESFALLBACK="$enableval" |
330 | RESFALLBACK="$enableval" |
323 | ]) |
331 | ]) |
… | |
… | |
382 | [if test x$enableval = xyes -o x$enableval = xno; then |
390 | [if test x$enableval = xyes -o x$enableval = xno; then |
383 | support_mousewheel=$enableval |
391 | support_mousewheel=$enableval |
384 | fi]) |
392 | fi]) |
385 | |
393 | |
386 | AC_ARG_ENABLE(slipwheeling, |
394 | AC_ARG_ENABLE(slipwheeling, |
387 | [ --enable-slipwheeling enable slip wheel scrolling (requires previous)], |
395 | [ --enable-slipwheeling enable slip wheel scrolling (requires --enable-mousewheel)], |
388 | [if test x$enableval = xyes -o x$enableval = xno; then |
396 | [if test x$enableval = xyes -o x$enableval = xno; then |
389 | support_mouseslipwheel=$enableval |
397 | support_mouseslipwheel=$enableval |
390 | fi]) |
398 | fi]) |
391 | |
399 | |
392 | AC_ARG_ENABLE(smart-resize, |
400 | AC_ARG_ENABLE(smart-resize, |
… | |
… | |
419 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
427 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
420 | fi]) |
428 | fi]) |
421 | |
429 | |
422 | dnl# -------------------------------------------------------------------------- |
430 | dnl# -------------------------------------------------------------------------- |
423 | |
431 | |
|
|
432 | LIBEV_M4_AVOID_LIBRT=1 |
|
|
433 | m4_include([libev/libev.m4]) |
|
|
434 | |
|
|
435 | dnl# -------------------------------------------------------------------------- |
|
|
436 | |
424 | AC_PATH_PROG(TIC, tic) |
437 | AC_PATH_PROG(TIC, tic, :) |
425 | |
|
|
426 | dnl# need a neat way to detect SVR4 or its features |
|
|
427 | dnl# in src/command.c we use these functions: |
|
|
428 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
|
|
429 | dnl# - but are these also defined for other systems? |
|
|
430 | |
|
|
431 | dnl# hack to find if this is SVR4 -- who knows? |
|
|
432 | dnl## AC_MSG_CHECKING(for SVR4) |
|
|
433 | dnl## AC_EGREP_CPP(yes, |
|
|
434 | dnl## [#if defined (SVR4) || defined (_SVR4) || defined (__svr4__) |
|
|
435 | dnl## yes; |
|
|
436 | dnl## #endif |
|
|
437 | dnl## ], [AC_MSG_RESULT(yes); AC_DEFINE(PERHAPS_SVR4)], AC_MSG_RESULT(perhaps not?)) |
|
|
438 | |
438 | |
439 | AC_PATH_XTRA |
439 | AC_PATH_XTRA |
440 | |
440 | |
441 | AFTERIMAGE_CFLAGS= |
441 | AFTERIMAGE_CFLAGS= |
442 | AFTERIMAGE_LIBS= |
442 | AFTERIMAGE_LIBS= |
… | |
… | |
474 | fi |
474 | fi |
475 | |
475 | |
476 | dnl# -------------------------------------------------------------------------- |
476 | dnl# -------------------------------------------------------------------------- |
477 | dnl# CHECKING FOR HEADER FILES |
477 | dnl# CHECKING FOR HEADER FILES |
478 | dnl# -------------------------------------------------------------------------- |
478 | dnl# -------------------------------------------------------------------------- |
479 | AC_HEADER_SYS_WAIT |
|
|
480 | AC_CHECK_HEADERS( \ |
479 | AC_CHECK_HEADERS( \ |
481 | assert.h \ |
480 | assert.h \ |
482 | fcntl.h \ |
481 | fcntl.h \ |
483 | stdarg.h \ |
482 | stdarg.h \ |
484 | stdlib.h \ |
483 | stdlib.h \ |
485 | string.h \ |
484 | string.h \ |
486 | termios.h \ |
|
|
487 | unistd.h \ |
485 | unistd.h \ |
488 | sys/byteorder.h \ |
486 | sys/byteorder.h \ |
489 | sys/ioctl.h \ |
487 | sys/ioctl.h \ |
490 | sys/select.h \ |
488 | sys/select.h \ |
491 | sys/sockio.h \ |
489 | sys/sockio.h \ |
492 | sys/strredir.h \ |
490 | sys/strredir.h \ |
493 | sys/time.h \ |
491 | sys/time.h \ |
|
|
492 | time.h \ |
494 | stdint.h \ |
493 | stdint.h \ |
495 | wchar.h \ |
494 | wchar.h \ |
496 | cwchar \ |
495 | cwchar \ |
497 | clocale \ |
496 | clocale \ |
498 | ) |
497 | ) |
499 | |
498 | |
500 | AC_HEADER_TIME |
|
|
501 | |
|
|
502 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
499 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
503 | AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
500 | AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
504 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
501 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
505 | #include <sys/ioctl.h> |
502 | #include <sys/ioctl.h> |
506 | #ifdef HAVE_TERMIOS_H |
|
|
507 | #include <termios.h> |
503 | #include <termios.h> |
508 | #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
504 | ]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
509 | |
505 | |
510 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
506 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
511 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
507 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
512 | if test x$rxvt_cv_xpointer = xyes; then |
508 | if test x$rxvt_cv_xpointer = xyes; then |
513 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
509 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
… | |
… | |
525 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
521 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
526 | )]) |
522 | )]) |
527 | if test x$rxvt_xlib_illegal_access = xyes; then |
523 | if test x$rxvt_xlib_illegal_access = xyes; then |
528 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
524 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
529 | fi |
525 | fi |
530 | |
|
|
531 | AC_C_CONST |
|
|
532 | AC_C_INLINE |
|
|
533 | |
|
|
534 | dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow. |
|
|
535 | |
526 | |
536 | dnl# -------------------------------------------------------------------------- |
527 | dnl# -------------------------------------------------------------------------- |
537 | dnl# CHECKING FOR MISSING TYPEDEFS |
528 | dnl# CHECKING FOR MISSING TYPEDEFS |
538 | dnl# -------------------------------------------------------------------------- |
529 | dnl# -------------------------------------------------------------------------- |
539 | dnl# Missing typedefs and replacements |
530 | dnl# Missing typedefs and replacements |
… | |
… | |
597 | AC_SUBST(rxvt_uint32_typedef) |
588 | AC_SUBST(rxvt_uint32_typedef) |
598 | dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef) |
589 | dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef) |
599 | dnl AC_SUBST(rxvt_int64_typedef) |
590 | dnl AC_SUBST(rxvt_int64_typedef) |
600 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
591 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
601 | dnl AC_SUBST(rxvt_uint64_typedef) |
592 | dnl AC_SUBST(rxvt_uint64_typedef) |
602 | dnl# |
|
|
603 | dnl# Now look for another we use |
|
|
604 | dnl# |
|
|
605 | if test "$ac_cv_sizeof_int_p" -eq 8; then |
|
|
606 | rxvt_intp_define="#define intp_t int64_t" |
|
|
607 | rxvt_u_intp_define="#define u_intp_t u_int64_t" |
|
|
608 | else |
|
|
609 | if test "$ac_cv_sizeof_int_p" -eq 4; then |
|
|
610 | rxvt_intp_define="#define intp_t int32_t" |
|
|
611 | rxvt_u_intp_define="#define u_intp_t u_int32_t" |
|
|
612 | else |
|
|
613 | if test "$ac_cv_sizeof_int_p" -eq 2; then |
|
|
614 | rxvt_intp_define="#define intp_t int16_t" |
|
|
615 | rxvt_u_intp_define="#define u_intp_t u_int16_t" |
|
|
616 | else |
|
|
617 | rxvt_intp_define="#error set intp_t" |
|
|
618 | rxvt_u_intp_define="#error set u_intp_t" |
|
|
619 | fi |
|
|
620 | fi |
|
|
621 | fi |
|
|
622 | AC_SUBST(rxvt_intp_define) |
|
|
623 | AC_SUBST(rxvt_u_intp_define) |
|
|
624 | |
593 | |
625 | dnl# -------------------------------------------------------------------------- |
594 | dnl# -------------------------------------------------------------------------- |
626 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
595 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
627 | dnl# -------------------------------------------------------------------------- |
596 | dnl# -------------------------------------------------------------------------- |
628 | AC_TYPE_SIGNAL |
597 | AC_CHECK_FUNCS(unsetenv) |
629 | dnl> AC_FUNC_VPRINTF |
|
|
630 | |
|
|
631 | AC_CHECK_FUNCS( \ |
|
|
632 | unsetenv \ |
|
|
633 | setutent \ |
|
|
634 | on_exit \ |
|
|
635 | ) |
|
|
636 | |
598 | |
637 | UTMP_CHECK |
599 | UTMP_CHECK |
638 | |
600 | |
639 | dnl# -------------------------------------------------------------------------- |
601 | dnl# -------------------------------------------------------------------------- |
640 | |
602 | |
641 | dnl# find ttys/ttytab |
|
|
642 | AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab, |
|
|
643 | [for ttys_file in dnl |
|
|
644 | /etc/ttys /etc/ttytab; |
|
|
645 | do |
|
|
646 | if test -f "$ttys_file" ; then |
|
|
647 | rxvt_cv_path_ttytab=$ttys_file |
|
|
648 | break |
|
|
649 | fi |
|
|
650 | done |
|
|
651 | ]) |
|
|
652 | if test x$rxvt_cv_path_ttytab != x; then |
|
|
653 | AC_DEFINE_UNQUOTED(TTYTAB_FILENAME, "$rxvt_cv_path_ttytab", Define location of ttys/ttytab) |
|
|
654 | fi |
|
|
655 | |
|
|
656 | dnl# -------------------------------------------------------------------------- |
603 | dnl# -------------------------------------------------------------------------- |
657 | dnl# -------------------------------------------------------------------------- |
604 | dnl# -------------------------------------------------------------------------- |
658 | |
605 | |
659 | dnl# this is a really hack test for some basic Xlocale stuff |
606 | dnl# this is a really hack test for some basic Xlocale stuff |
660 | ac_save_LIBS=$LIBS |
607 | save_LIBS=$LIBS |
661 | ac_save_CFLAGS=$CFLAGS |
608 | save_CFLAGS=$CFLAGS |
662 | CFLAGS="$CFLAGS $X_CFLAGS" |
609 | CFLAGS="$CFLAGS $X_CFLAGS" |
663 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
610 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
664 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
|
|
665 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
|
|
666 | #include <stdlib.h> |
|
|
667 | main() { |
|
|
668 | char *p; |
|
|
669 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
|
|
670 | exit (XSupportsLocale() ? 0 : 1); |
|
|
671 | else |
|
|
672 | exit (1);}]])],[dnl |
|
|
673 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
|
|
674 | :])]) |
|
|
675 | if test x$support_xim = xyes; then |
611 | if test x$support_xim = xyes; then |
|
|
612 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
|
|
613 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
|
|
614 | #include <stdlib.h> |
|
|
615 | main() { |
|
|
616 | char *p; |
|
|
617 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
|
|
618 | exit (XSupportsLocale() ? 0 : 1); |
|
|
619 | else |
|
|
620 | exit (1);}]])],[dnl |
|
|
621 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
|
|
622 | :])]) |
676 | if test x$rxvt_cv_func_xlocale = xyes; then |
623 | if test x$rxvt_cv_func_xlocale = xyes; then |
677 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
624 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
|
|
625 | AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, |
|
|
626 | [AC_COMPILE_IFELSE([ |
|
|
627 | #include <X11/Xlib.h> |
|
|
628 | |
|
|
629 | void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); |
|
|
630 | |
|
|
631 | void f() { |
|
|
632 | XIMCallback cb; |
|
|
633 | cb.callback = im_destroy_cb; |
|
|
634 | } |
|
|
635 | ],rxvt_broken_ximcb=yes,rxvt_broken_ximcb=no)]) |
|
|
636 | |
|
|
637 | if test x$rxvt_broken_ximcb = xyes; then |
|
|
638 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
|
|
639 | fi |
678 | fi |
640 | fi |
679 | fi |
641 | fi |
680 | |
642 | |
681 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
643 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
682 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
644 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
683 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
645 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
684 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
646 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
685 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
647 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
686 | fi |
648 | fi |
687 | LIBS=$ac_save_LIBS |
649 | LIBS=$save_LIBS |
688 | CFLAGS=$ac_save_CFLAGS |
650 | CFLAGS=$save_CFLAGS |
689 | |
651 | |
690 | AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
652 | AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
691 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])]) |
653 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])]) |
692 | if test x$rxvt_cv_func_setlocale = xyes; then |
654 | if test x$rxvt_cv_func_setlocale = xyes; then |
693 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
655 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
… | |
… | |
699 | AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) |
661 | AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) |
700 | fi |
662 | fi |
701 | |
663 | |
702 | SCM_RIGHTS_CHECK |
664 | SCM_RIGHTS_CHECK |
703 | |
665 | |
704 | AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, |
|
|
705 | [AC_COMPILE_IFELSE([ |
|
|
706 | #include <X11/Xlib.h> |
|
|
707 | |
|
|
708 | void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); |
|
|
709 | |
|
|
710 | void f() { |
|
|
711 | XIMCallback cb; |
|
|
712 | cb.callback = im_destroy_cb; |
|
|
713 | } |
|
|
714 | ],rxvt_broken_ximcb=yes,rxvt_broken_ximcb=no)]) |
|
|
715 | |
|
|
716 | if test x$rxvt_broken_ximcb = xyes; then |
|
|
717 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
|
|
718 | fi |
|
|
719 | |
|
|
720 | PTY_CHECK |
666 | PTY_CHECK |
721 | |
667 | |
722 | TTY_GROUP_CHECK |
668 | TTY_GROUP_CHECK |
723 | |
669 | |
724 | dnl# -------------------------------------------------------------------------- |
670 | dnl# -------------------------------------------------------------------------- |
725 | dnl# now add and remove other stuff |
671 | dnl# now add and remove other stuff |
726 | dnl# -------------------------------------------------------------------------- |
672 | dnl# -------------------------------------------------------------------------- |
727 | if test x$support_xft = xyes; then |
673 | if test x$support_xft = xyes; then |
728 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
674 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
729 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
675 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
730 | LIBS="$LIBS `$PKG_CONFIG xft --libs`" |
676 | X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
731 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
677 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
732 | else |
678 | else |
733 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
679 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
734 | if test $XFT_CONFIG != no; then |
680 | if test $XFT_CONFIG != no; then |
735 | LIBS="$LIBS `$XFT_CONFIG --libs`" |
681 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
736 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
682 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
737 | fi |
683 | fi |
738 | fi |
684 | fi |
739 | |
685 | |
|
|
686 | save_LIBS="$LIBS" |
|
|
687 | LIBS="$LIBS $X_LIBS" |
740 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
688 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
741 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
689 | AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) |
|
|
690 | LIBS="$save_LIBS" |
742 | |
691 | |
743 | if test x$support_xft = xyes; then |
692 | if test x$support_xft = xyes; then |
744 | AC_DEFINE(XFT, 1, Define to enable xft support) |
693 | AC_DEFINE(XFT, 1, Define to enable xft support) |
745 | fi |
694 | fi |
746 | fi |
695 | fi |
… | |
… | |
774 | if test x$support_mouseslipwheel = xyes; then |
723 | if test x$support_mouseslipwheel = xyes; then |
775 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
724 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
776 | fi |
725 | fi |
777 | if test x$support_afterimage = xyes; then |
726 | if test x$support_afterimage = xyes; then |
778 | AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing) |
727 | AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing) |
779 | AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libAfterImage) |
728 | AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps. Needs libAfterImage) |
780 | fi |
729 | fi |
781 | |
730 | |
782 | dnl if test x$support_afterstep = xyes; then |
731 | dnl if test x$support_afterstep = xyes; then |
783 | dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) |
732 | dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) |
784 | dnl fi |
733 | dnl fi |
… | |
… | |
900 | RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) |
849 | RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) |
901 | RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) |
850 | RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) |
902 | RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) |
851 | RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) |
903 | RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) |
852 | RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) |
904 | RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) |
853 | RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) |
905 | RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch) |
|
|
906 | RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) |
854 | RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) |
907 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
855 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
908 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
856 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
909 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
857 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
910 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
858 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |