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 |
35 | |
|
|
36 | AC_AIX |
|
|
37 | AC_ISC_POSIX |
37 | |
38 | |
38 | AC_LANG(C) |
39 | AC_LANG(C) |
39 | |
40 | |
40 | dnl# -------------------------------------------------------------------------- |
41 | dnl check wetehr we can link with gcc -lsupc++ |
41 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
|
|
42 | dnl# |
|
|
43 | if test -z "$orig_CXXFLAGS"; then |
|
|
44 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
|
|
45 | CXXFLAGS="-g -O3" |
|
|
46 | else |
|
|
47 | CXXFLAGS="-O" |
|
|
48 | fi |
|
|
49 | CFLAGS="$CXXFLAGS" |
|
|
50 | fi |
|
|
51 | |
|
|
52 | LINKER="$CXX" |
42 | LINKER="$CXX" |
53 | if test x$GCC = xyes && test x$GXX = xyes; then |
43 | if test x$GCC = xyes && test x$GXX = xyes; then |
54 | AC_CHECK_LIB(supc++, main, [ |
44 | AC_CHECK_LIB(supc++, main, [ |
55 | LINKER="$CC" |
45 | LINKER="$CC" |
56 | LIBS="$LIBS -lsupc++" |
46 | LIBS="$LIBS -lsupc++" |
57 | ]) |
47 | ]) |
58 | fi |
48 | fi |
59 | AC_SUBST(LINKER,[$LINKER]) |
49 | AC_SUBST(LINKER,[$LINKER]) |
|
|
50 | |
|
|
51 | AC_LANG(C++) |
|
|
52 | dnl# -------------------------------------------------------------------------- |
|
|
53 | dnl# Supply default CXXLAGS, if not specified by `CXXLAGS=flags ./configure' |
|
|
54 | dnl# |
|
|
55 | if test -z "$orig_CXXFLAGS"; then |
|
|
56 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
|
|
57 | CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" |
|
|
58 | AC_COMPILE_IFELSE([int i;], [echo didididid], [CXXFLAGS="-g -O3"]) |
|
|
59 | else |
|
|
60 | CXXFLAGS="-O" |
|
|
61 | fi |
|
|
62 | CFLAGS="$CXXFLAGS" |
|
|
63 | fi |
60 | |
64 | |
61 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
65 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
62 | |
66 | |
63 | case $host in |
67 | case $host in |
64 | *-*-solaris* ) |
68 | *-*-solaris* ) |
… | |
… | |
69 | esac |
73 | esac |
70 | |
74 | |
71 | dnl if test x$GXX = xyes; then |
75 | dnl if test x$GXX = xyes; then |
72 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
76 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
73 | dnl fi |
77 | dnl fi |
74 | |
|
|
75 | AC_LANG(C++) |
|
|
76 | |
|
|
77 | dnl# system hacks |
|
|
78 | AC_AIX |
|
|
79 | AC_ISC_POSIX |
|
|
80 | |
78 | |
81 | dnl# FreeBSD needs to link libxpg4 |
79 | dnl# FreeBSD needs to link libxpg4 |
82 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
80 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
83 | |
81 | |
84 | dnl# solaris needs to link libnsl and socket |
82 | dnl# solaris needs to link libnsl and socket |
… | |
… | |
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 \ |
719 | setresuid \ |
714 | setresuid \ |
720 | setreuid \ |
715 | setreuid \ |
721 | _getpty \ |
716 | _getpty \ |
722 | getpt \ |
717 | getpt \ |
723 | posix_openpt \ |
718 | posix_openpt \ |
724 | grantpt \ |
719 | grantpt \ |
… | |
… | |
738 | |
733 | |
739 | dnl# -------------------------------------------- |
734 | dnl# -------------------------------------------- |
740 | AC_CHECK_HEADER(utmp.h, |
735 | AC_CHECK_HEADER(utmp.h, |
741 | [AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp, |
736 | [AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp, |
742 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
737 | [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])]) |
738 | #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 |
739 | if test x$rxvt_cv_struct_utmp = xyes; then |
746 | 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) |
747 | fi |
741 | fi |
748 | ] |
742 | ] |