1 | dnl# -*- sh -*- |
|
|
2 | dnl# |
1 | dnl# |
3 | dnl# Process this file with autoconf to produce a configure script. |
2 | dnl# Process this file with autoconf to produce a configure script. |
4 | dnl# |
3 | dnl# |
5 | |
4 | |
6 | AC_INIT |
5 | AC_INIT |
… | |
… | |
31 | |
30 | |
32 | AC_PROG_CC |
31 | AC_PROG_CC |
33 | AC_PROG_CXX |
32 | AC_PROG_CXX |
34 | AC_PROG_CPP |
33 | AC_PROG_CPP |
35 | AC_PROG_INSTALL |
34 | AC_PROG_INSTALL |
36 | AC_PROG_AWK |
|
|
37 | |
35 | |
|
|
36 | AC_AIX |
|
|
37 | AC_ISC_POSIX |
38 | AC_LANG(C) |
38 | AC_LANG(C++) |
39 | |
39 | |
|
|
40 | dnl check wether we can link with gcc -lsupc++ |
|
|
41 | if test x$GCC = xyes && test x$GXX = xyes; then |
|
|
42 | dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it |
|
|
43 | AC_MSG_CHECKING([for working libsupc++]) |
|
|
44 | save_CXX="$CXX" |
|
|
45 | save_LIBS="$LIBS" |
|
|
46 | CXX="$CC" |
|
|
47 | LIBS="$LIBS -lsupc++" |
|
|
48 | LINKER="$CC" |
|
|
49 | AC_LINK_IFELSE( |
|
|
50 | [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }])], |
|
|
51 | [AC_MSG_RESULT(ok)], |
|
|
52 | [ |
|
|
53 | AC_MSG_RESULT([no, making everything bigger and slower]) |
|
|
54 | LIBS="$save_LIBS" |
|
|
55 | LINKER="$save_CXX" |
|
|
56 | ] |
|
|
57 | ) |
|
|
58 | CXX="$save_CXX" |
|
|
59 | fi |
|
|
60 | AC_SUBST(LINKER,[$LINKER]) |
|
|
61 | |
|
|
62 | AC_LANG(C++) |
40 | dnl# -------------------------------------------------------------------------- |
63 | dnl# -------------------------------------------------------------------------- |
41 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
64 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
42 | dnl# |
65 | dnl# |
43 | if test -z "$orig_CXXFLAGS"; then |
66 | if test -z "$orig_CXXFLAGS"; then |
44 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
67 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
45 | CXXFLAGS="-g -O3" |
68 | CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" |
|
|
69 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [], [CXXFLAGS="-g -O3"]) |
46 | else |
70 | else |
47 | CXXFLAGS="-O" |
71 | CXXFLAGS="-O" |
48 | fi |
72 | fi |
49 | CFLAGS="$CXXFLAGS" |
73 | CFLAGS="$CXXFLAGS" |
50 | fi |
74 | fi |
51 | |
|
|
52 | LINKER="$CXX" |
|
|
53 | if test x$GCC = xyes && test x$GXX = xyes; then |
|
|
54 | AC_CHECK_LIB(supc++, main, [ |
|
|
55 | LINKER="$CC" |
|
|
56 | LIBS="$LIBS -lsupc++" |
|
|
57 | ]) |
|
|
58 | fi |
|
|
59 | AC_SUBST(LINKER,[$LINKER]) |
|
|
60 | |
75 | |
61 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
76 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
62 | |
77 | |
63 | case $host in |
78 | case $host in |
64 | *-*-solaris* ) |
79 | *-*-solaris* ) |
… | |
… | |
70 | |
85 | |
71 | dnl if test x$GXX = xyes; then |
86 | dnl if test x$GXX = xyes; then |
72 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
87 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
73 | dnl fi |
88 | dnl fi |
74 | |
89 | |
75 | AC_LANG(C++) |
|
|
76 | |
|
|
77 | dnl# system hacks |
|
|
78 | AC_AIX |
|
|
79 | AC_ISC_POSIX |
|
|
80 | |
|
|
81 | dnl# FreeBSD needs to link libxpg4 |
90 | dnl# FreeBSD needs to link libxpg4 |
82 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
91 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
83 | |
92 | |
84 | dnl# solaris needs to link libnsl and socket |
93 | dnl# solaris needs to link libnsl and socket |
85 | AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) |
94 | AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) |
… | |
… | |
96 | [AC_MSG_RESULT(no)]) |
105 | [AC_MSG_RESULT(no)]) |
97 | |
106 | |
98 | dnl AC_ENABLE_SHARED(no)dnl# libtool |
107 | dnl AC_ENABLE_SHARED(no)dnl# libtool |
99 | dnl AC_ENABLE_STATIC(yes)dnl# libtool |
108 | dnl AC_ENABLE_STATIC(yes)dnl# libtool |
100 | dnl AC_PROG_LIBTOOL()dnl# libtool |
109 | dnl AC_PROG_LIBTOOL()dnl# libtool |
101 | |
|
|
102 | MALLOC_TYPE=S |
|
|
103 | |
110 | |
104 | support_frills=yes |
111 | support_frills=yes |
105 | support_inheritpixmap=yes |
112 | support_inheritpixmap=yes |
106 | support_tinting=yes |
113 | support_tinting=yes |
107 | support_fading=yes |
114 | support_fading=yes |
… | |
… | |
228 | [ --enable-font-styles enable bold and italic support], |
235 | [ --enable-font-styles enable bold and italic support], |
229 | [if test x$enableval = xyes -o x$enableval = xno; then |
236 | [if test x$enableval = xyes -o x$enableval = xno; then |
230 | support_styles=$enableval |
237 | support_styles=$enableval |
231 | fi]) |
238 | fi]) |
232 | |
239 | |
233 | AC_ARG_ENABLE(utmp, |
|
|
234 | [ --enable-utmp enable utmp (utmpx) support], |
|
|
235 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
236 | support_utmp=$enableval |
|
|
237 | fi]) |
|
|
238 | |
|
|
239 | AC_ARG_ENABLE(wtmp, |
|
|
240 | [ --enable-wtmp enable wtmp (wtmpx) support (requires --enable-utmp)], |
|
|
241 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
242 | support_wtmp=$enableval |
|
|
243 | fi]) |
|
|
244 | |
|
|
245 | AC_ARG_ENABLE(lastlog, |
|
|
246 | [ --enable-lastlog enable lastlog support (requires --enable-utmp)], |
|
|
247 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
248 | support_lastlog=$enableval |
|
|
249 | fi]) |
|
|
250 | |
|
|
251 | AC_ARG_ENABLE(xpm-background, |
240 | AC_ARG_ENABLE(xpm-background, |
252 | [ --enable-xpm-background enable XPM background pixmaps], |
241 | [ --enable-xpm-background enable XPM background pixmaps], |
253 | [if test x$enableval = xyes -o x$enableval = xno; then |
242 | [if test x$enableval = xyes -o x$enableval = xno; then |
254 | support_xpm=$enableval |
243 | support_xpm=$enableval |
255 | fi]) |
244 | fi]) |
… | |
… | |
314 | |
303 | |
315 | AC_ARG_ENABLE(xim, |
304 | AC_ARG_ENABLE(xim, |
316 | [ --enable-xim XIM (X Input Method) protocol support], |
305 | [ --enable-xim XIM (X Input Method) protocol support], |
317 | [if test x$enableval = xyes -o x$enableval = xno; then |
306 | [if test x$enableval = xyes -o x$enableval = xno; then |
318 | support_xim=$enableval |
307 | support_xim=$enableval |
319 | fi]) |
|
|
320 | |
|
|
321 | AC_ARG_ENABLE(ttygid, |
|
|
322 | [ --enable-ttygid enable tty setting to group named "tty"], |
|
|
323 | [if test x$enableval = xyes; then |
|
|
324 | AC_DEFINE(TTY_GID_SUPPORT, 1, Define to change gid of ttys to group tty) |
|
|
325 | fi]) |
308 | fi]) |
326 | |
309 | |
327 | AC_ARG_ENABLE(backspace-key, |
310 | AC_ARG_ENABLE(backspace-key, |
328 | [ --disable-backspace-key disable handling of the backspace key], |
311 | [ --disable-backspace-key disable handling of the backspace key], |
329 | [if test x$enableval = xno; then |
312 | [if test x$enableval = xno; then |
… | |
… | |
428 | [ --enable-slipwheeling enable slip wheel scrolling (requires previous)], |
411 | [ --enable-slipwheeling enable slip wheel scrolling (requires previous)], |
429 | [if test x$enableval = xyes -o x$enableval = xno; then |
412 | [if test x$enableval = xyes -o x$enableval = xno; then |
430 | support_mouseslipwheel=$enableval |
413 | support_mouseslipwheel=$enableval |
431 | fi]) |
414 | fi]) |
432 | |
415 | |
433 | AC_ARG_ENABLE(dmalloc, |
|
|
434 | [ --enable-dmalloc enable Gray Watson's malloc - for debugging use], |
|
|
435 | [if test x$enableval = xyes; then |
|
|
436 | MALLOC_TYPE=G |
|
|
437 | DEBUG=-DDEBUG_MALLOC |
|
|
438 | DLIB="-L/usr/local/lib -ldmalloc" |
|
|
439 | DINCLUDE=-I/usr/local/include |
|
|
440 | fi]) |
|
|
441 | |
|
|
442 | AC_ARG_ENABLE(dlmalloc, |
|
|
443 | [ --enable-dlmalloc enable Doug Lea's malloc - for production use |
|
|
444 | NOTE: enable only one malloc package], |
|
|
445 | [if test x$enableval = xyes; then |
|
|
446 | MALLOC_TYPE=D |
|
|
447 | DEBUG= |
|
|
448 | DLIB="-L/usr/local/lib -ldlmalloc" |
|
|
449 | DINCLUDE= |
|
|
450 | fi]) |
|
|
451 | |
|
|
452 | AC_ARG_ENABLE(smart-resize, |
416 | AC_ARG_ENABLE(smart-resize, |
453 | [ --enable-smart-resize enable smart growth/shrink behaviour], |
417 | [ --enable-smart-resize enable smart growth/shrink behaviour], |
454 | [if test x$enableval = xyes; then |
418 | [if test x$enableval = xyes; then |
455 | AC_DEFINE(SMART_RESIZE, 1, Define to use "smart" resize behavior) |
419 | AC_DEFINE(SMART_RESIZE, 1, Define to use "smart" resize behavior) |
456 | fi]) |
420 | fi]) |
… | |
… | |
479 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
443 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
480 | fi]) |
444 | fi]) |
481 | |
445 | |
482 | dnl# -------------------------------------------------------------------------- |
446 | dnl# -------------------------------------------------------------------------- |
483 | |
447 | |
484 | AC_DEFINE(PROTOTYPES, 1, Define if you need function prototypes) |
|
|
485 | |
|
|
486 | AC_PATH_PROG(MV, mv, mv) |
448 | AC_PATH_PROG(MV, mv, mv) |
487 | AC_PATH_PROG(RM, rm, rm) |
|
|
488 | AC_PATH_PROG(CP, cp, cp) |
449 | AC_PATH_PROG(CP, cp, cp) |
489 | AC_PATH_PROG(LN, ln, ln) |
450 | AC_PATH_PROG(LN, ln, ln) |
490 | AC_PATH_PROG(SED, sed, sed) |
451 | AC_PATH_PROG(SED, sed, sed) |
491 | AC_PATH_PROG(ECHO, echo, echo) |
452 | AC_PATH_PROG(ECHO, echo, echo) |
492 | AC_PATH_PROG(CMP, cmp, cmp) |
453 | AC_PATH_PROG(CMP, cmp, cmp) |
493 | AC_PATH_PROG(TBL, tbl) |
|
|
494 | AC_PATH_PROG(TIC, tic) |
454 | AC_PATH_PROG(TIC, tic) |
495 | |
455 | |
496 | dnl# need a neat way to detect SVR4 or its features |
456 | dnl# need a neat way to detect SVR4 or its features |
497 | dnl# in src/command.c we use these functions: |
457 | dnl# in src/command.c we use these functions: |
498 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
458 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
… | |
… | |
523 | dnl# -------------------------------------------------------------------------- |
483 | dnl# -------------------------------------------------------------------------- |
524 | AC_HEADER_SYS_WAIT |
484 | AC_HEADER_SYS_WAIT |
525 | AC_CHECK_HEADERS( \ |
485 | AC_CHECK_HEADERS( \ |
526 | assert.h \ |
486 | assert.h \ |
527 | fcntl.h \ |
487 | fcntl.h \ |
528 | grp.h \ |
|
|
529 | libc.h \ |
|
|
530 | lastlog.h \ |
|
|
531 | stdarg.h \ |
488 | stdarg.h \ |
532 | stdlib.h \ |
489 | stdlib.h \ |
533 | string.h \ |
490 | string.h \ |
534 | termios.h \ |
491 | termios.h \ |
535 | unistd.h \ |
492 | unistd.h \ |
536 | sys/byteorder.h \ |
493 | sys/byteorder.h \ |
537 | sys/ioctl.h \ |
494 | sys/ioctl.h \ |
538 | sys/select.h \ |
495 | sys/select.h \ |
539 | sys/sockio.h \ |
496 | sys/sockio.h \ |
540 | sys/strredir.h \ |
497 | sys/strredir.h \ |
541 | sys/stropts.h \ |
|
|
542 | sys/time.h \ |
498 | sys/time.h \ |
543 | utmp.h \ |
499 | stdint.h \ |
544 | utmpx.h \ |
500 | wchar.h \ |
545 | stdint.h \ |
501 | cwchar \ |
546 | pty.h \ |
502 | clocale \ |
547 | util.h \ |
|
|
548 | libutil.h \ |
|
|
549 | wchar.h \ |
|
|
550 | cwchar \ |
|
|
551 | clocale \ |
|
|
552 | ) |
503 | ) |
553 | |
504 | |
554 | AC_HEADER_TIME |
505 | AC_HEADER_TIME |
555 | |
506 | |
556 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
507 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
… | |
… | |
631 | dnl AC_CHECK_SIZEOF(long, 4) |
582 | dnl AC_CHECK_SIZEOF(long, 4) |
632 | AC_CHECK_SIZEOF(long long, 8) |
583 | AC_CHECK_SIZEOF(long long, 8) |
633 | AC_CHECK_SIZEOF(int *, 4) |
584 | AC_CHECK_SIZEOF(int *, 4) |
634 | |
585 | |
635 | dnl# see usage below |
586 | dnl# see usage below |
636 | AC_DEFUN(RXVT_CHECK_SIZE, |
587 | AC_DEFUN([RXVT_CHECK_SIZE], |
637 | [AC_CACHE_CHECK([for $2], $1, |
588 | [AC_CACHE_CHECK([for $2], $1, |
638 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
589 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
639 | if test "$ac_cv_sizeof_char" -ge $3; then |
590 | if test "$ac_cv_sizeof_char" -ge $3; then |
640 | $1="$4 char" |
591 | $1="$4 char" |
641 | else |
592 | else |
… | |
… | |
710 | dnl# -------------------------------------------------------------------------- |
661 | dnl# -------------------------------------------------------------------------- |
711 | AC_TYPE_SIGNAL |
662 | AC_TYPE_SIGNAL |
712 | dnl> AC_FUNC_VPRINTF |
663 | dnl> AC_FUNC_VPRINTF |
713 | |
664 | |
714 | AC_CHECK_FUNCS( \ |
665 | AC_CHECK_FUNCS( \ |
715 | revoke \ |
|
|
716 | unsetenv \ |
666 | unsetenv \ |
717 | setutent \ |
667 | setutent \ |
718 | seteuid \ |
668 | seteuid \ |
719 | setresuid \ |
669 | setresuid \ |
720 | setreuid \ |
670 | setreuid \ |
721 | _getpty \ |
|
|
722 | getpt \ |
|
|
723 | posix_openpt \ |
|
|
724 | grantpt \ |
|
|
725 | unlockpt \ |
|
|
726 | isastream \ |
|
|
727 | on_exit \ |
671 | on_exit \ |
728 | nanosleep \ |
|
|
729 | updwtmp \ |
|
|
730 | updwtmpx \ |
|
|
731 | ttyslot \ |
|
|
732 | ) |
672 | ) |
733 | |
673 | |
734 | dnl# -------------------------------------------------------------------------- |
674 | UTMP_CHECK |
735 | dnl# DO ALL UTMP AND WTMP CHECKING |
|
|
736 | dnl# -------------------------------------------------------------------------- |
|
|
737 | dnl# check for host field in utmp structure |
|
|
738 | |
|
|
739 | dnl# -------------------------------------------- |
|
|
740 | AC_CHECK_HEADER(utmp.h, |
|
|
741 | [AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp, |
|
|
742 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
|
743 | #include <stdint.h> |
|
|
744 | #include <utmp.h>]], [[struct utmp ut;]])],[rxvt_cv_struct_utmp=yes],[rxvt_cv_struct_utmp=no])]) |
|
|
745 | if test x$rxvt_cv_struct_utmp = xyes; then |
|
|
746 | AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) |
|
|
747 | fi |
|
|
748 | ] |
|
|
749 | |
|
|
750 | AC_CACHE_CHECK(for ut_host in utmp struct, rxvt_cv_struct_utmp_host, |
|
|
751 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
|
752 | #include <utmp.h>]], [[struct utmp ut; ut.ut_host;]])],[rxvt_cv_struct_utmp_host=yes],[rxvt_cv_struct_utmp_host=no])]) |
|
|
753 | if test x$rxvt_cv_struct_utmp_host = xyes; then |
|
|
754 | AC_DEFINE(HAVE_UTMP_HOST, 1, Define if struct utmp contains ut_host) |
|
|
755 | fi |
|
|
756 | |
|
|
757 | AC_CACHE_CHECK(for ut_pid in utmp struct, rxvt_cv_struct_utmp_pid, |
|
|
758 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
|
759 | #include <utmp.h>]], [[struct utmp ut; ut.ut_pid;]])],[rxvt_cv_struct_utmp_pid=yes],[rxvt_cv_struct_utmp_pid=no])]) |
|
|
760 | if test x$rxvt_cv_struct_utmp_pid = xyes; then |
|
|
761 | AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) |
|
|
762 | fi |
|
|
763 | ) dnl# AC_CHECK_HEADER(utmp.h |
|
|
764 | |
|
|
765 | dnl# -------------------------------------------- |
|
|
766 | |
|
|
767 | AC_CHECK_HEADER(utmpx.h, |
|
|
768 | [AC_CACHE_CHECK([for struct utmpx], rxvt_cv_struct_utmpx, |
|
|
769 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
|
770 | #include <utmpx.h>]], [[struct utmpx ut;]])],[rxvt_cv_struct_utmpx=yes],[rxvt_cv_struct_utmpx=no])]) |
|
|
771 | if test x$rxvt_cv_struct_utmpx = xyes; then |
|
|
772 | AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) |
|
|
773 | fi |
|
|
774 | ] |
|
|
775 | |
|
|
776 | AC_CACHE_CHECK(for host in utmpx struct, rxvt_cv_struct_utmpx_host, |
|
|
777 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
|
778 | #include <utmpx.h>]], [[struct utmpx utx; utx.ut_host;]])],[rxvt_cv_struct_utmpx_host=yes],[rxvt_cv_struct_utmpx_host=no])]) |
|
|
779 | if test x$rxvt_cv_struct_utmpx_host = xyes; then |
|
|
780 | AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) |
|
|
781 | fi |
|
|
782 | |
|
|
783 | AC_CACHE_CHECK(for session in utmpx struct, rxvt_cv_struct_utmpx_session, |
|
|
784 | [AC_TRY_COMPILE([#include <sys/types.h> |
|
|
785 | #include <utmpx.h>], |
|
|
786 | [struct utmpx utx; utx.ut_session;], |
|
|
787 | rxvt_cv_struct_utmpx_session=yes, rxvt_cv_struct_utmpx_session=no)]) |
|
|
788 | if test x$rxvt_cv_struct_utmpx_session = xyes; then |
|
|
789 | AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) |
|
|
790 | fi |
|
|
791 | ) dnl# AC_CHECK_HEADER(utmpx.h |
|
|
792 | |
|
|
793 | dnl# -------------------------------------------------------------------------- |
|
|
794 | dnl# check for struct lastlog |
|
|
795 | AC_CACHE_CHECK(for struct lastlog, rxvt_cv_struct_lastlog, |
|
|
796 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
|
797 | #include <utmp.h> |
|
|
798 | #ifdef HAVE_LASTLOG_H |
|
|
799 | #include <lastlog.h> |
|
|
800 | #endif |
|
|
801 | ]], [[struct lastlog ll;]])],[rxvt_cv_struct_lastlog=yes],[rxvt_cv_struct_lastlog=no])]) |
|
|
802 | if test x$rxvt_cv_struct_lastlog = xyes; then |
|
|
803 | AC_DEFINE(HAVE_STRUCT_LASTLOG, 1, Define if utmp.h or lastlog.h has struct lastlog) |
|
|
804 | fi |
|
|
805 | |
|
|
806 | dnl# check for struct lastlogx |
|
|
807 | AC_CACHE_CHECK(for struct lastlogx, rxvt_cv_struct_lastlogx, |
|
|
808 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
|
|
809 | #include <utmpx.h> |
|
|
810 | #ifdef HAVE_LASTLOG_H |
|
|
811 | #include <lastlog.h> |
|
|
812 | #endif |
|
|
813 | ]], [[struct lastlogx ll;]])],[rxvt_cv_struct_lastlogx=yes],[rxvt_cv_struct_lastlogx=no])]) |
|
|
814 | if test x$rxvt_cv_struct_lastlogx = xyes; then |
|
|
815 | AC_DEFINE(HAVE_STRUCT_LASTLOGX, 1, Define if utmpx.h or lastlog.h has struct lastlogx) |
|
|
816 | fi |
|
|
817 | |
|
|
818 | dnl# -------------------------------------------------------------------------- |
|
|
819 | dnl# FIND FILES |
|
|
820 | dnl# -------------------------------------------------------------------------- |
|
|
821 | |
|
|
822 | dnl# find utmp |
|
|
823 | AC_CACHE_CHECK(where utmp is located, rxvt_cv_path_utmp, |
|
|
824 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
825 | #include <sys/types.h> |
|
|
826 | #include <utmp.h> |
|
|
827 | #include <errno.h> |
|
|
828 | main() |
|
|
829 | { |
|
|
830 | char **u, *utmplist[] = { |
|
|
831 | "/var/run/utmp", "/var/adm/utmp", "/etc/utmp", "/usr/etc/utmp", "/usr/adm/utmp", NULL }; |
|
|
832 | FILE *a, *f=fopen("conftestval", "w"); |
|
|
833 | if (!f) exit(1); |
|
|
834 | #ifdef UTMP_FILE |
|
|
835 | fprintf(f, "%s\n", UTMP_FILE); |
|
|
836 | exit(0); |
|
|
837 | #endif |
|
|
838 | #ifdef _PATH_UTMP |
|
|
839 | fprintf(f, "%s\n", _PATH_UTMP); |
|
|
840 | exit(0); |
|
|
841 | #endif |
|
|
842 | for (u = utmplist; *u; u++) { |
|
|
843 | if ((a = fopen(*u, "r")) != NULL || errno == EACCES) { |
|
|
844 | fprintf(f, "%s\n", *u); |
|
|
845 | exit(0); |
|
|
846 | } |
|
|
847 | } |
|
|
848 | exit(0); |
|
|
849 | }]])],[rxvt_cv_path_utmp=`cat conftestval`],[rxvt_cv_path_utmp=],[dnl |
|
|
850 | AC_MSG_WARN(Define RXVT_UTMP_FILE in config.h manually)])]) |
|
|
851 | if test x$rxvt_cv_path_utmp != x; then |
|
|
852 | AC_DEFINE_UNQUOTED(RXVT_UTMP_FILE, "$rxvt_cv_path_utmp", Define location of utmp) |
|
|
853 | fi |
|
|
854 | |
|
|
855 | dnl# -------------------------------------------------------------------------- |
|
|
856 | |
|
|
857 | dnl# find utmpx - if a utmp file exists at the same location and is more than |
|
|
858 | dnl# a day newer, then dump the utmpx. People leave lots of junk around. |
|
|
859 | AC_CACHE_CHECK(where utmpx is located, rxvt_cv_path_utmpx, |
|
|
860 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
861 | #include <sys/types.h> |
|
|
862 | #include <utmpx.h> |
|
|
863 | #include <errno.h> |
|
|
864 | #include <sys/stat.h> |
|
|
865 | #ifdef HAVE_STRING_H |
|
|
866 | #include <string.h> |
|
|
867 | #endif |
|
|
868 | main() |
|
|
869 | { |
|
|
870 | char **u, *p, *utmplist[] = { |
|
|
871 | #ifdef UTMPX_FILE |
|
|
872 | UTMPX_FILE, |
|
|
873 | #endif |
|
|
874 | #ifdef _PATH_UTMPX |
|
|
875 | _PATH_UTMPX, |
|
|
876 | #endif |
|
|
877 | "/var/adm/utmpx", "/etc/utmpx", NULL }; |
|
|
878 | FILE *a, *f=fopen("conftestval", "w"); |
|
|
879 | struct stat statu, statux; |
|
|
880 | if (!f) exit(1); |
|
|
881 | for (u = utmplist; *u; u++) { |
|
|
882 | if ((a = fopen(*u, "r")) != NULL || errno == EACCES) { |
|
|
883 | if (stat(*u, &statux) < 0) |
|
|
884 | continue; |
|
|
885 | p = strdup(*u); |
|
|
886 | p[strlen(p) - 1] = '\0'; |
|
|
887 | if (stat(p, &statu) >= 0 |
|
|
888 | && (statu.st_mtime - statux.st_mtime > 86400)) |
|
|
889 | continue; |
|
|
890 | fprintf(f, "%s\n", *u); |
|
|
891 | exit(0); |
|
|
892 | } |
|
|
893 | } |
|
|
894 | exit(0); |
|
|
895 | }]])],[rxvt_cv_path_utmpx=`cat conftestval`],[rxvt_cv_path_utmpx=],[dnl |
|
|
896 | AC_MSG_WARN(Define RXVT_UTMPX_FILE in config.h manually)])]) |
|
|
897 | if test x$rxvt_cv_path_utmpx != x; then |
|
|
898 | AC_DEFINE_UNQUOTED(RXVT_UTMPX_FILE, "$rxvt_cv_path_utmpx", Define location of utmpx) |
|
|
899 | fi |
|
|
900 | |
|
|
901 | dnl# -------------------------------------------------------------------------- |
|
|
902 | |
|
|
903 | dnl# find wtmp |
|
|
904 | AC_CACHE_CHECK(where wtmp is located, rxvt_cv_path_wtmp, |
|
|
905 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
906 | #include <sys/types.h> |
|
|
907 | #ifdef HAVE_UTMP_H |
|
|
908 | #include <utmp.h> |
|
|
909 | #endif |
|
|
910 | #include <errno.h> |
|
|
911 | main() |
|
|
912 | { |
|
|
913 | char **w, *wtmplist[] = { |
|
|
914 | "/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL }; |
|
|
915 | FILE *a, *f=fopen("conftestval", "w"); |
|
|
916 | if (!f) exit(1); |
|
|
917 | #ifdef WTMP_FILE |
|
|
918 | fprintf(f, "%s\n", WTMP_FILE); |
|
|
919 | exit(0); |
|
|
920 | #endif |
|
|
921 | #ifdef _PATH_WTMP |
|
|
922 | fprintf(f, "%s\n", _PATH_WTMP); |
|
|
923 | exit(0); |
|
|
924 | #endif |
|
|
925 | for (w = wtmplist; *w; w++) { |
|
|
926 | if ((a = fopen(*w, "r")) != NULL || errno == EACCES) { |
|
|
927 | fprintf(f, "%s\n", *w); |
|
|
928 | exit(0); |
|
|
929 | } |
|
|
930 | } |
|
|
931 | exit(0); |
|
|
932 | }]])],[rxvt_cv_path_wtmp=`cat conftestval`],[rxvt_cv_path_wtmp=],[dnl |
|
|
933 | AC_MSG_WARN(Define RXVT_WTMP_FILE in config.h manually)])]) |
|
|
934 | if test x$rxvt_cv_path_wtmp != x; then |
|
|
935 | AC_DEFINE_UNQUOTED(RXVT_WTMP_FILE, "$rxvt_cv_path_wtmp", Define location of wtmp) |
|
|
936 | fi |
|
|
937 | dnl# -------------------------------------------------------------------------- |
|
|
938 | |
|
|
939 | dnl# find wtmpx |
|
|
940 | AC_CACHE_CHECK(where wtmpx is located, rxvt_cv_path_wtmpx, |
|
|
941 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
942 | #ifdef HAVE_UTMPX_H |
|
|
943 | #include <utmpx.h> |
|
|
944 | #endif |
|
|
945 | #include <errno.h> |
|
|
946 | main() |
|
|
947 | { |
|
|
948 | char **w, *wtmplist[] = { |
|
|
949 | "/var/log/wtmpx", "/var/adm/wtmpx", NULL }; |
|
|
950 | FILE *a, *f=fopen("conftestval", "w"); |
|
|
951 | if (!f) exit(1); |
|
|
952 | #ifdef WTMPX_FILE |
|
|
953 | fprintf(f, "%s\n", WTMPX_FILE); |
|
|
954 | exit(0); |
|
|
955 | #endif |
|
|
956 | #ifdef _PATH_WTMPX |
|
|
957 | fprintf(f, "%s\n", _PATH_WTMPX); |
|
|
958 | exit(0); |
|
|
959 | #endif |
|
|
960 | for (w = wtmplist; *w; w++) { |
|
|
961 | if ((a = fopen(*w, "r")) != NULL || errno == EACCES) { |
|
|
962 | fprintf(f, "%s\n", *w); |
|
|
963 | exit(0); |
|
|
964 | } |
|
|
965 | } |
|
|
966 | exit(0); |
|
|
967 | }]])],[rxvt_cv_path_wtmpx=`cat conftestval`],[rxvt_cv_path_wtmpx=],[dnl |
|
|
968 | AC_MSG_WARN(Define RXVT_WTMPX_FILE in config.h manually)])]) |
|
|
969 | if test x$rxvt_cv_path_wtmpx != x; then |
|
|
970 | AC_DEFINE_UNQUOTED(RXVT_WTMPX_FILE, "$rxvt_cv_path_wtmpx", Define location of wtmpx) |
|
|
971 | fi |
|
|
972 | dnl# -------------------------------------------------------------------------- |
|
|
973 | |
|
|
974 | dnl# find lastlog |
|
|
975 | AC_CACHE_CHECK(where lastlog is located, rxvt_cv_path_lastlog, |
|
|
976 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
977 | #include <sys/types.h> |
|
|
978 | #ifdef HAVE_UTMPX_H |
|
|
979 | #include <utmpx.h> |
|
|
980 | #elif defined(HAVE_UTMP_H) |
|
|
981 | #include <utmp.h> |
|
|
982 | #endif |
|
|
983 | #ifdef HAVE_LASTLOG_H |
|
|
984 | #include <lastlog.h> |
|
|
985 | #endif |
|
|
986 | #include <errno.h> |
|
|
987 | main() |
|
|
988 | { |
|
|
989 | char **w, *lastloglist[] = { "/var/log/lastlog", NULL }; |
|
|
990 | FILE *a, *f=fopen("conftestval", "w"); |
|
|
991 | if (!f) exit(1); |
|
|
992 | #ifdef LASTLOG_FILE |
|
|
993 | fprintf(f, "%s\n", LASTLOG_FILE); |
|
|
994 | exit(0); |
|
|
995 | #endif |
|
|
996 | #ifdef _PATH_LASTLOG |
|
|
997 | fprintf(f, "%s\n", _PATH_LASTLOG); |
|
|
998 | exit(0); |
|
|
999 | #endif |
|
|
1000 | for (w = lastloglist; *w; w++) { |
|
|
1001 | if ((a = fopen(*w, "r")) != NULL || errno == EACCES) { |
|
|
1002 | fprintf(f, "%s\n", *w); |
|
|
1003 | exit(0); |
|
|
1004 | } |
|
|
1005 | } |
|
|
1006 | exit(0); |
|
|
1007 | }]])],[rxvt_cv_path_lastlog=`cat conftestval`],[rxvt_cv_path_lastlog=],[dnl |
|
|
1008 | AC_MSG_WARN(Define RXVT_LASTLOG_FILE in config.h manually)])]) |
|
|
1009 | if test x$rxvt_cv_path_lastlog != x; then |
|
|
1010 | AC_DEFINE_UNQUOTED(RXVT_LASTLOG_FILE, "$rxvt_cv_path_lastlog", Define location of lastlog) |
|
|
1011 | if test -d "$rxvt_cv_path_lastlog"; then |
|
|
1012 | AC_DEFINE(LASTLOG_IS_DIR, 1, Define if lastlog is provided via a directory) |
|
|
1013 | fi |
|
|
1014 | fi |
|
|
1015 | dnl# -------------------------------------------------------------------------- |
|
|
1016 | |
|
|
1017 | dnl# find lastlogx |
|
|
1018 | AC_CACHE_CHECK(where lastlogx is located, rxvt_cv_path_lastlogx, |
|
|
1019 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> |
|
|
1020 | #ifdef HAVE_UTMPX_H |
|
|
1021 | #include <utmpx.h> |
|
|
1022 | #endif |
|
|
1023 | #include <errno.h> |
|
|
1024 | main() |
|
|
1025 | { |
|
|
1026 | char **w, *wtmplist[] = { "/var/log/lastlogx", "/var/adm/lastlogx", NULL }; |
|
|
1027 | FILE *a, *f=fopen("conftestval", "w"); |
|
|
1028 | if (!f) exit(1); |
|
|
1029 | #ifdef LASTLOGX_FILE |
|
|
1030 | fprintf(f, "%s\n", LASTLOGX_FILE); |
|
|
1031 | exit(0); |
|
|
1032 | #endif |
|
|
1033 | #ifdef _PATH_LASTLOGX |
|
|
1034 | fprintf(f, "%s\n", _PATH_LASTLOGX); |
|
|
1035 | exit(0); |
|
|
1036 | #endif |
|
|
1037 | for (w = wtmplist; *w; w++) { |
|
|
1038 | if ((a = fopen(*w, "r")) != NULL || errno == EACCES) { |
|
|
1039 | fprintf(f, "%s\n", *w); |
|
|
1040 | exit(0); |
|
|
1041 | } |
|
|
1042 | } |
|
|
1043 | exit(0); |
|
|
1044 | }]])],[rxvt_cv_path_lastlogx=`cat conftestval`],[rxvt_cv_path_lastlogx=],[dnl |
|
|
1045 | AC_MSG_WARN(Define RXVT_LASTLOGX_FILE in config.h manually)])]) |
|
|
1046 | if test x$rxvt_cv_path_lastlogx != x; then |
|
|
1047 | AC_DEFINE_UNQUOTED(RXVT_LASTLOGX_FILE, "$rxvt_cv_path_lastlogx", Define location of lastlogx) |
|
|
1048 | fi |
|
|
1049 | |
675 | |
1050 | dnl# -------------------------------------------------------------------------- |
676 | dnl# -------------------------------------------------------------------------- |
1051 | |
677 | |
1052 | dnl# find ttys/ttytab |
678 | dnl# find ttys/ttytab |
1053 | AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab, |
679 | AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab, |
… | |
… | |
1108 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo(CODESET);]])],[rxvt_cv_func_nl_langinfo=yes],[rxvt_cv_func_nl_langinfo=no])]) |
734 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo(CODESET);]])],[rxvt_cv_func_nl_langinfo=yes],[rxvt_cv_func_nl_langinfo=no])]) |
1109 | if test x$rxvt_cv_func_nl_langinfo = xyes; then |
735 | if test x$rxvt_cv_func_nl_langinfo = xyes; then |
1110 | AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) |
736 | AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) |
1111 | fi |
737 | fi |
1112 | |
738 | |
1113 | AC_CACHE_CHECK(for unix-compliant filehandle passing ability, rxvt_can_pass_fds, |
739 | SCM_RIGHTS_CHECK |
1114 | [AC_TRY_LINK([ |
|
|
1115 | #include <sys/types.h> |
|
|
1116 | #include <sys/socket.h> |
|
|
1117 | ],[ |
|
|
1118 | { |
|
|
1119 | msghdr msg; |
|
|
1120 | iovec iov; |
|
|
1121 | char buf [100]; |
|
|
1122 | char data = 0; |
|
|
1123 | |
|
|
1124 | iov.iov_base = &data; |
|
|
1125 | iov.iov_len = 1; |
|
|
1126 | |
|
|
1127 | msg.msg_iov = &iov; |
|
|
1128 | msg.msg_iovlen = 1; |
|
|
1129 | msg.msg_control = buf; |
|
|
1130 | msg.msg_controllen = sizeof buf; |
|
|
1131 | |
|
|
1132 | cmsghdr *cmsg = CMSG_FIRSTHDR (&msg); |
|
|
1133 | cmsg->cmsg_level = SOL_SOCKET; |
|
|
1134 | cmsg->cmsg_type = SCM_RIGHTS; |
|
|
1135 | cmsg->cmsg_len = 100; |
|
|
1136 | |
|
|
1137 | *(int *)CMSG_DATA (cmsg) = 5; |
|
|
1138 | |
|
|
1139 | return sendmsg (3, &msg, 0); |
|
|
1140 | } |
|
|
1141 | ],[rxvt_can_pass_fds=yes],[rxvt_can_pass_fds=no])]) |
|
|
1142 | if test x$rxvt_can_pass_fds = xyes; then |
|
|
1143 | AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) |
|
|
1144 | else |
|
|
1145 | AC_MSG_ERROR([urxvt requires unix-compliant filehandle passing ability]) |
|
|
1146 | fi |
|
|
1147 | |
740 | |
1148 | AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, |
741 | AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, |
1149 | [AC_COMPILE_IFELSE([ |
742 | [AC_COMPILE_IFELSE([ |
1150 | #include <X11/Xlib.h> |
743 | #include <X11/Xlib.h> |
1151 | |
744 | |
… | |
… | |
1159 | |
752 | |
1160 | if test x$rxvt_broken_ximcb = xyes; then |
753 | if test x$rxvt_broken_ximcb = xyes; then |
1161 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
754 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
1162 | fi |
755 | fi |
1163 | |
756 | |
1164 | if test x$ac_cv_func_getpt = xno -a x$ac_cv_func_posix_openpt = xno; then |
757 | PTY_CHECK |
1165 | AC_CHECK_FUNC(openpty, [], [AC_CHECK_LIB(util, openpty, [LIBS="$LIBS -lutil"])]) |
|
|
1166 | fi |
|
|
1167 | |
758 | |
1168 | dnl# if we don't guess right then it's up to the user |
759 | TTY_GROUP_CHECK |
1169 | AC_CACHE_CHECK(for pty/tty type, rxvt_cv_ptys, |
|
|
1170 | [if test x$ac_cv_func_openpty = xyes -o x$ac_cv_lib_util_openpty = xyes; then |
|
|
1171 | rxvt_cv_ptys=OPENPTY |
|
|
1172 | else if test x$ac_cv_func_getpt = xyes; then |
|
|
1173 | rxvt_cv_ptys=GLIBC |
|
|
1174 | else if test x$ac_cv_func_posix_openpt = xyes; then |
|
|
1175 | rxvt_cv_ptys=POSIX |
|
|
1176 | else if test x$ac_cv_func__getpty = xyes; then |
|
|
1177 | rxvt_cv_ptys=SGI4 |
|
|
1178 | else if test -c /dev/ttyp20; then |
|
|
1179 | rxvt_cv_ptys=SCO |
|
|
1180 | else if test -c /dev/ptym/clone; then |
|
|
1181 | rxvt_cv_ptys=HPUX |
|
|
1182 | else if test -c /dev/ptc -a -c /dev/pts; then |
|
|
1183 | rxvt_cv_ptys=PTC |
|
|
1184 | else if test -c /dev/ptc -a -d /dev/pts; then |
|
|
1185 | rxvt_cv_ptys=PTC |
|
|
1186 | else if test -c /dev/ptmx -a -c /dev/pts/0; then |
|
|
1187 | rxvt_cv_ptys=STREAMS |
|
|
1188 | else if test x$ac_cv_func_grantpt = xyes && test x$ac_cv_func_unlockpt = xyes; then |
|
|
1189 | dnl# catch CYGWIN |
|
|
1190 | rxvt_cv_ptys=STREAMS |
|
|
1191 | else |
|
|
1192 | rxvt_cv_ptys=BSD |
|
|
1193 | fi |
|
|
1194 | fi |
|
|
1195 | fi |
|
|
1196 | fi |
|
|
1197 | fi |
|
|
1198 | fi |
|
|
1199 | fi |
|
|
1200 | fi |
|
|
1201 | fi |
|
|
1202 | fi |
|
|
1203 | ]) |
|
|
1204 | |
|
|
1205 | if test x$rxvt_cv_ptys = xGLIBC; then |
|
|
1206 | AC_DEFINE(PTYS_ARE_GETPT, 1, Define for this pty type) |
|
|
1207 | fi |
|
|
1208 | if test x$rxvt_cv_ptys = xPOSIX; then |
|
|
1209 | AC_DEFINE(PTYS_ARE_POSIX, 1, Define for this pty type) |
|
|
1210 | fi |
|
|
1211 | if test x$rxvt_cv_ptys = xOPENPTY; then |
|
|
1212 | AC_DEFINE(PTYS_ARE_OPENPTY, 1, Define for this pty type) |
|
|
1213 | fi |
|
|
1214 | if test x$rxvt_cv_ptys = xSCO; then |
|
|
1215 | AC_DEFINE(PTYS_ARE_NUMERIC, 1, Define for this pty type) |
|
|
1216 | fi |
|
|
1217 | if test x$rxvt_cv_ptys = xSTREAMS; then |
|
|
1218 | AC_DEFINE(PTYS_ARE_PTMX, 1, Define for this pty type) |
|
|
1219 | fi |
|
|
1220 | if test x$rxvt_cv_ptys = xPTC; then |
|
|
1221 | AC_DEFINE(PTYS_ARE_PTC, 1, Define for this pty type) |
|
|
1222 | fi |
|
|
1223 | if test x$rxvt_cv_ptys = xSGI4; then |
|
|
1224 | AC_DEFINE(PTYS_ARE__GETPTY, 1, Define for this pty type) |
|
|
1225 | fi |
|
|
1226 | if test x$rxvt_cv_ptys = xHPUX; then |
|
|
1227 | AC_DEFINE(PTYS_ARE_CLONE, 1, Define for this pty type) |
|
|
1228 | fi |
|
|
1229 | if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xPOSIX; then |
|
|
1230 | AC_DEFINE(PTYS_ARE_SEARCHED, 1, Define for this pty type) |
|
|
1231 | fi |
|
|
1232 | |
|
|
1233 | |
|
|
1234 | AS_MESSAGE(checking for pty ranges...) |
|
|
1235 | ptys=`echo /dev/pty??` |
|
|
1236 | pch1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` |
|
|
1237 | pch2=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` |
|
|
1238 | if test x$pch1 != x; then |
|
|
1239 | AC_DEFINE_UNQUOTED(PTYCHAR1, "$pch1", Define for first char in devptyXX) |
|
|
1240 | fi |
|
|
1241 | if test x$pch2 != x; then |
|
|
1242 | AC_DEFINE_UNQUOTED(PTYCHAR2, "$pch2", Define for second char in devptyXX) |
|
|
1243 | fi |
|
|
1244 | |
760 | |
1245 | dnl# -------------------------------------------------------------------------- |
761 | dnl# -------------------------------------------------------------------------- |
1246 | dnl# now add and remove other stuff |
762 | dnl# now add and remove other stuff |
1247 | dnl# -------------------------------------------------------------------------- |
763 | dnl# -------------------------------------------------------------------------- |
1248 | if test x$support_xft = xyes; then |
764 | if test x$support_xft = xyes; then |
1249 | LIBS="$LIBS `pkg-config xft --libs`" |
765 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
|
|
766 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
|
|
767 | LIBS="$LIBS `$PKG_CONFIG xft --libs`" |
1250 | CPPFLAGS="$CPPFLAGS `pkg-config xft --cflags`" |
768 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
|
|
769 | else |
|
|
770 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
|
|
771 | if test $XFT_CONFIG != no; then |
|
|
772 | LIBS="$LIBS `$XFT_CONFIG --libs`" |
|
|
773 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
|
|
774 | fi |
|
|
775 | fi |
1251 | |
776 | |
1252 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
777 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
1253 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
778 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
1254 | |
779 | |
1255 | if test x$support_xft = xyes; then |
780 | if test x$support_xft = xyes; then |
… | |
… | |
1289 | if test x$support_mousewheel = xyes; then |
814 | if test x$support_mousewheel = xyes; then |
1290 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
815 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
1291 | fi |
816 | fi |
1292 | if test x$support_mouseslipwheel = xyes; then |
817 | if test x$support_mouseslipwheel = xyes; then |
1293 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
818 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
1294 | fi |
|
|
1295 | if test x$support_utmp = xyes; then |
|
|
1296 | AC_DEFINE(UTMP_SUPPORT, 1, Define if you want to have utmp/utmpx support) |
|
|
1297 | fi |
|
|
1298 | if test x$support_wtmp = xyes; then |
|
|
1299 | AC_DEFINE(WTMP_SUPPORT, 1, Define if you want to have wtmp support when utmp/utmpx is enabled) |
|
|
1300 | fi |
|
|
1301 | if test x$support_lastlog = xyes; then |
|
|
1302 | AC_DEFINE(LASTLOG_SUPPORT, 1, Define if you want to have lastlog support when utmp/utmpx is enabled) |
|
|
1303 | fi |
819 | fi |
1304 | if test x$support_xim = xyes -o x$multichar_set = xyes; then |
820 | if test x$support_xim = xyes -o x$multichar_set = xyes; then |
1305 | if test x$rxvt_cv_func_xlocale = xyes; then |
821 | if test x$rxvt_cv_func_xlocale = xyes; then |
1306 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
822 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
1307 | fi |
823 | fi |
… | |
… | |
1429 | AC_ARG_PROGRAM |
945 | AC_ARG_PROGRAM |
1430 | |
946 | |
1431 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
947 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
1432 | |
948 | |
1433 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
949 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
1434 | AC_DEFUN(RXVT_DEFINE_TO_INCLUDE, dnl |
950 | AC_DEFUN([RXVT_DEFINE_TO_INCLUDE], dnl |
1435 | [if test "$$3" = "$4" -o "$$5" = "$6"; then |
951 | [if test "$$3" = "$4" -o "$$5" = "$6"; then |
1436 | $1="#include <$2>" |
952 | $1="#include <$2>" |
1437 | else |
953 | else |
1438 | $1="/* #include <$2> */" |
954 | $1="/* #include <$2> */" |
1439 | fi dnl |
955 | fi dnl |
… | |
… | |
1467 | Install path: ${prefix}/bin |
983 | Install path: ${prefix}/bin |
1468 | Compiler: $CXX |
984 | Compiler: $CXX |
1469 | Compiler flags: $CFLAGS |
985 | Compiler flags: $CFLAGS |
1470 | Linker: $LINKER" |
986 | Linker: $LINKER" |
1471 | |
987 | |
1472 | if test "$MALLOC_TYPE" = S; then |
|
|
1473 | echo " malloc support: system default" |
|
|
1474 | fi |
|
|
1475 | if test "$MALLOC_TYPE" = G; then |
|
|
1476 | echo " malloc support: Gray Watson's dmalloc" |
|
|
1477 | fi |
|
|
1478 | if test "$MALLOC_TYPE" = D; then |
|
|
1479 | echo " malloc support: Doug Lea's malloc" |
|
|
1480 | fi |
|
|
1481 | |
|
|
1482 | if test x$support_xpm = xyes; then |
988 | if test x$support_xpm = xyes; then |
1483 | echo " Xpm library: $XPM_LIBS" |
989 | echo " Xpm library: $XPM_LIBS" |
1484 | fi |
990 | fi |
1485 | |
991 | |
1486 | echo " |
|
|
1487 | The following are set in config.h |
|
|
1488 | " |
|
|
1489 | echo " pty/tty type: "$rxvt_cv_ptys |
|
|
1490 | if test x$support_utmp != xyes; then |
|
|
1491 | echo " utmp support: disabled" |
|
|
1492 | echo |
|
|
1493 | else |
|
|
1494 | echo " utmp support: enabled |
|
|
1495 | utmp file: $rxvt_cv_path_utmp |
|
|
1496 | utmpx file: $rxvt_cv_path_utmpx |
|
|
1497 | wtmp file: $rxvt_cv_path_wtmp |
|
|
1498 | wtmpx file: $rxvt_cv_path_wtmpx |
|
|
1499 | lastlog file: $rxvt_cv_path_lastlog |
|
|
1500 | ttys/ttytab file: $rxvt_cv_path_ttytab |
|
|
1501 | embedded perl: $support_perl" |
|
|
1502 | echo |
|
|
1503 | fi |
|
|
1504 | if test x$term != x; then |
992 | if test x$term != x; then |
1505 | echo " set TERM to: $term" |
993 | echo " set TERM to: $term" |
1506 | fi |
994 | fi |
1507 | if test x$terminfo != x; then |
995 | if test x$terminfo != x; then |
1508 | echo " set TERMINFO to: $terminfo" |
996 | echo " set TERMINFO to: $terminfo" |
… | |
… | |
1511 | echo " resource class: $RESCLASS" |
999 | echo " resource class: $RESCLASS" |
1512 | if test x$RESFALLBACK != x; then |
1000 | if test x$RESFALLBACK != x; then |
1513 | echo " resource class fallback: $RESFALLBACK" |
1001 | echo " resource class fallback: $RESFALLBACK" |
1514 | fi |
1002 | fi |
1515 | echo |
1003 | echo |
1516 | if test x$rxvt_cv_ptys = xUNKNOWN; then |
1004 | echo " embedded perl: $support_perl" |
1517 | echo ".----------------------------------------------------------------." |
1005 | echo |
1518 | echo ". WARNING: could not determine pty/tty type. Do not build until ." |
|
|
1519 | echo ". the appropriate PTYS_ARE_* is defined in config.h ." |
|
|
1520 | echo ".----------------------------------------------------------------." |
|
|
1521 | fi |
|
|
1522 | if test x$support_xpm = xneedsmanualspecification; then |
1006 | if test x$support_xpm = xneedsmanualspecification; then |
1523 | echo ".----------------------------------------------------------------." |
1007 | echo ".----------------------------------------------------------------." |
1524 | echo ". WARNING: --enable-xpm-background was specified however the ." |
1008 | echo ". WARNING: --enable-xpm-background was specified however the ." |
1525 | echo ". XPM includes files and libraries could not be found. ." |
1009 | echo ". XPM includes files and libraries could not be found. ." |
1526 | echo ". XPM backgrounds are now being DISABLED! If you want ." |
1010 | echo ". XPM backgrounds are now being DISABLED! If you want ." |