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 | |
38 | AC_LANG(C) |
36 | AC_LANG(C) |
39 | |
37 | |
40 | dnl# -------------------------------------------------------------------------- |
38 | dnl# -------------------------------------------------------------------------- |
41 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
39 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
… | |
… | |
479 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
477 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
480 | fi]) |
478 | fi]) |
481 | |
479 | |
482 | dnl# -------------------------------------------------------------------------- |
480 | dnl# -------------------------------------------------------------------------- |
483 | |
481 | |
484 | AC_DEFINE(PROTOTYPES, 1, Define if you need function prototypes) |
|
|
485 | |
|
|
486 | AC_PATH_PROG(MV, mv, mv) |
482 | AC_PATH_PROG(MV, mv, mv) |
487 | AC_PATH_PROG(RM, rm, rm) |
483 | AC_PATH_PROG(RM, rm, rm) |
488 | AC_PATH_PROG(CP, cp, cp) |
484 | AC_PATH_PROG(CP, cp, cp) |
489 | AC_PATH_PROG(LN, ln, ln) |
485 | AC_PATH_PROG(LN, ln, ln) |
490 | AC_PATH_PROG(SED, sed, sed) |
486 | AC_PATH_PROG(SED, sed, sed) |
491 | AC_PATH_PROG(ECHO, echo, echo) |
487 | AC_PATH_PROG(ECHO, echo, echo) |
492 | AC_PATH_PROG(CMP, cmp, cmp) |
488 | AC_PATH_PROG(CMP, cmp, cmp) |
493 | AC_PATH_PROG(TBL, tbl) |
|
|
494 | AC_PATH_PROG(TIC, tic) |
489 | AC_PATH_PROG(TIC, tic) |
495 | |
490 | |
496 | dnl# need a neat way to detect SVR4 or its features |
491 | dnl# need a neat way to detect SVR4 or its features |
497 | dnl# in src/command.c we use these functions: |
492 | dnl# in src/command.c we use these functions: |
498 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
493 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
… | |
… | |
714 | AC_CHECK_FUNCS( \ |
709 | AC_CHECK_FUNCS( \ |
715 | revoke \ |
710 | revoke \ |
716 | unsetenv \ |
711 | unsetenv \ |
717 | setutent \ |
712 | setutent \ |
718 | seteuid \ |
713 | seteuid \ |
|
|
714 | setresuid \ |
719 | setreuid \ |
715 | setreuid \ |
720 | _getpty \ |
716 | _getpty \ |
721 | getpt \ |
717 | getpt \ |
722 | posix_openpt \ |
718 | posix_openpt \ |
723 | grantpt \ |
719 | grantpt \ |
… | |
… | |
737 | |
733 | |
738 | dnl# -------------------------------------------- |
734 | dnl# -------------------------------------------- |
739 | AC_CHECK_HEADER(utmp.h, |
735 | AC_CHECK_HEADER(utmp.h, |
740 | [AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp, |
736 | [AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp, |
741 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
737 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
742 | #include <stdint.h> |
|
|
743 | #include <utmp.h>]], [[struct utmp ut;]])],[rxvt_cv_struct_utmp=yes],[rxvt_cv_struct_utmp=no])]) |
738 | #include <utmp.h>]], [[struct utmp ut;]])],[rxvt_cv_struct_utmp=yes],[rxvt_cv_struct_utmp=no])]) |
744 | if test x$rxvt_cv_struct_utmp = xyes; then |
739 | if test x$rxvt_cv_struct_utmp = xyes; then |
745 | AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) |
740 | AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) |
746 | fi |
741 | fi |
747 | ] |
742 | ] |
… | |
… | |
1138 | return sendmsg (3, &msg, 0); |
1133 | return sendmsg (3, &msg, 0); |
1139 | } |
1134 | } |
1140 | ],[rxvt_can_pass_fds=yes],[rxvt_can_pass_fds=no])]) |
1135 | ],[rxvt_can_pass_fds=yes],[rxvt_can_pass_fds=no])]) |
1141 | if test x$rxvt_can_pass_fds = xyes; then |
1136 | if test x$rxvt_can_pass_fds = xyes; then |
1142 | AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) |
1137 | AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) |
|
|
1138 | else |
|
|
1139 | AC_MSG_ERROR([urxvt requires unix-compliant filehandle passing ability]) |
1143 | fi |
1140 | fi |
1144 | |
1141 | |
1145 | AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, |
1142 | AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, |
1146 | [AC_COMPILE_IFELSE([ |
1143 | [AC_COMPILE_IFELSE([ |
1147 | #include <X11/Xlib.h> |
1144 | #include <X11/Xlib.h> |
… | |
… | |
1378 | PERL_O=rxvtperl.o |
1375 | PERL_O=rxvtperl.o |
1379 | PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" |
1376 | PERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" |
1380 | PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" |
1377 | PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" |
1381 | PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" |
1378 | PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" |
1382 | else |
1379 | else |
1383 | support_perl=no |
|
|
1384 | AC_MSG_RESULT([no, unable to link]) |
1380 | AC_MSG_ERROR([no, unable to link]) |
1385 | fi |
1381 | fi |
1386 | else |
1382 | else |
1387 | AC_MSG_ERROR(no working perl found, or perl not version >= 5.8) |
1383 | AC_MSG_ERROR([no working perl found, or perl not version >= 5.8]) |
1388 | support_perl=no |
|
|
1389 | fi |
1384 | fi |
1390 | fi |
1385 | fi |
1391 | AC_SUBST(PERLLIB) |
1386 | AC_SUBST(PERLLIB) |
1392 | AC_SUBST(PERLFLAGS) |
1387 | AC_SUBST(PERLFLAGS) |
1393 | AC_SUBST(PERLPRIVLIBEXP) |
1388 | AC_SUBST(PERLPRIVLIBEXP) |