1 | dnl# -*- sh -*- |
1 | dnl# -*- sh -*- |
2 | dnl# |
2 | dnl# |
3 | dnl# Process this file with autoconf to produce a configure script. |
3 | dnl# Process this file with autoconf to produce a configure script. |
4 | dnl# |
4 | dnl# |
|
|
5 | |
|
|
6 | AC_INIT |
5 | AC_PREREQ(2.50) |
7 | AC_PREREQ(2.50) |
6 | orig_CXXFLAGS="$CXXFLAGS" |
|
|
7 | |
|
|
8 | AC_INIT |
|
|
9 | AC_CONFIG_SRCDIR([src/feature.h]) |
8 | AC_CONFIG_SRCDIR([src/feature.h]) |
10 | AC_CONFIG_AUX_DIR(autoconf) |
9 | AC_CONFIG_AUX_DIR(autoconf) |
11 | AC_CONFIG_HEADER(config.h:autoconf/config.h.in) |
10 | AC_CONFIG_HEADER(config.h:autoconf/config.h.in) |
12 | |
11 | |
13 | AC_CANONICAL_HOST |
12 | AC_CANONICAL_HOST |
… | |
… | |
24 | AC_SUBST(LIBVERSION)dnl |
23 | AC_SUBST(LIBVERSION)dnl |
25 | echo "" |
24 | echo "" |
26 | echo "configuring for rxvt $VERSION" |
25 | echo "configuring for rxvt $VERSION" |
27 | echo "" |
26 | echo "" |
28 | |
27 | |
|
|
28 | orig_CXXFLAGS="$CXXFLAGS" |
|
|
29 | |
29 | dnl# Checks for programs. |
30 | dnl# Checks for programs. |
30 | dnl AC_MAKE_SET |
31 | dnl AC_MAKE_SET |
31 | |
32 | |
32 | AC_PROG_CC |
33 | AC_PROG_CC |
33 | AC_PROG_CXX |
34 | AC_PROG_CXX |
… | |
… | |
39 | |
40 | |
40 | dnl# -------------------------------------------------------------------------- |
41 | dnl# -------------------------------------------------------------------------- |
41 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
42 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
42 | dnl# |
43 | dnl# |
43 | if test -z "$orig_CXXFLAGS"; then |
44 | if test -z "$orig_CXXFLAGS"; then |
44 | CXXFLAGS='-O' |
|
|
45 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
45 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
46 | CXXFLAGS="-g -O3" |
46 | CXXFLAGS="-g -O3" |
|
|
47 | else |
|
|
48 | CXXFLAGS="-O" |
47 | fi |
49 | fi |
48 | CFLAGS="$CXXFLAGS" |
50 | CFLAGS="$CXXFLAGS" |
49 | fi |
51 | fi |
50 | |
52 | |
51 | LINKER="$CXX" |
53 | LINKER="$CXX" |
… | |
… | |
725 | setreuid \ |
727 | setreuid \ |
726 | setsid \ |
728 | setsid \ |
727 | setpgrp \ |
729 | setpgrp \ |
728 | setpgid \ |
730 | setpgid \ |
729 | _getpty \ |
731 | _getpty \ |
|
|
732 | getpt \ |
730 | posix_openpt \ |
733 | posix_openpt \ |
731 | grantpt \ |
734 | grantpt \ |
732 | unlockpt \ |
735 | unlockpt \ |
733 | isastream \ |
736 | isastream \ |
734 | on_exit \ |
737 | on_exit \ |
… | |
… | |
1164 | |
1167 | |
1165 | if test x$rxvt_broken_ximcb = xyes; then |
1168 | if test x$rxvt_broken_ximcb = xyes; then |
1166 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
1169 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
1167 | fi |
1170 | fi |
1168 | |
1171 | |
1169 | if test x$ac_cv_func_posix_openpt = xno; then |
1172 | if test x$ac_cv_func_getpt = xno -a x$ac_cv_func_posix_openpt = xno; then |
1170 | AC_CHECK_FUNC(openpty, [], [AC_CHECK_LIB(util, openpty, [LIBS="$LIBS -lutil"])]) |
1173 | AC_CHECK_FUNC(openpty, [], [AC_CHECK_LIB(util, openpty, [LIBS="$LIBS -lutil"])]) |
1171 | fi |
1174 | fi |
1172 | |
1175 | |
1173 | dnl# if we don't guess right then it's up to the user |
1176 | dnl# if we don't guess right then it's up to the user |
1174 | AC_CACHE_CHECK(for pty/tty type, rxvt_cv_ptys, |
1177 | AC_CACHE_CHECK(for pty/tty type, rxvt_cv_ptys, |
1175 | [if test x$ac_cv_func_openpty = xyes -o x$ac_cv_lib_util_openpty = xyes; then |
1178 | [if test x$ac_cv_func_openpty = xyes -o x$ac_cv_lib_util_openpty = xyes; then |
1176 | rxvt_cv_ptys=OPENPTY |
1179 | rxvt_cv_ptys=OPENPTY |
|
|
1180 | else if test x$ac_cv_func_getpt = xyes; then |
|
|
1181 | rxvt_cv_ptys=GLIBC |
1177 | else if test x$ac_cv_func_posix_openpt = xyes; then |
1182 | else if test x$ac_cv_func_posix_openpt = xyes; then |
1178 | rxvt_cv_ptys=POSIX |
1183 | rxvt_cv_ptys=POSIX |
1179 | else if test x$ac_cv_func__getpty = xyes; then |
1184 | else if test x$ac_cv_func__getpty = xyes; then |
1180 | rxvt_cv_ptys=SGI4 |
1185 | rxvt_cv_ptys=SGI4 |
1181 | else if test -c /dev/ttyp20; then |
1186 | else if test -c /dev/ttyp20; then |
… | |
… | |
1200 | fi |
1205 | fi |
1201 | fi |
1206 | fi |
1202 | fi |
1207 | fi |
1203 | fi |
1208 | fi |
1204 | fi |
1209 | fi |
|
|
1210 | fi |
1205 | ]) |
1211 | ]) |
1206 | |
1212 | |
|
|
1213 | if test x$rxvt_cv_ptys = xGLIBC; then |
|
|
1214 | AC_DEFINE(PTYS_ARE_GETPT, 1, Define for this pty type) |
|
|
1215 | fi |
1207 | if test x$rxvt_cv_ptys = xPOSIX; then |
1216 | if test x$rxvt_cv_ptys = xPOSIX; then |
1208 | AC_DEFINE(PTYS_ARE_POSIX, 1, Define for this pty type) |
1217 | AC_DEFINE(PTYS_ARE_POSIX, 1, Define for this pty type) |
1209 | fi |
1218 | fi |
1210 | if test x$rxvt_cv_ptys = xOPENPTY; then |
1219 | if test x$rxvt_cv_ptys = xOPENPTY; then |
1211 | AC_DEFINE(PTYS_ARE_OPENPTY, 1, Define for this pty type) |
1220 | AC_DEFINE(PTYS_ARE_OPENPTY, 1, Define for this pty type) |
… | |
… | |
1425 | AC_SUBST(DLIB) |
1434 | AC_SUBST(DLIB) |
1426 | AC_SUBST(LIBS) |
1435 | AC_SUBST(LIBS) |
1427 | AC_SUBST(X_LIBS) |
1436 | AC_SUBST(X_LIBS) |
1428 | AC_SUBST(X_EXTRA_LIBS) |
1437 | AC_SUBST(X_EXTRA_LIBS) |
1429 | |
1438 | |
1430 | dnl# common parts of the Makefile |
|
|
1431 | MCOMMON=./autoconf/Make.common |
|
|
1432 | AC_SUBST_FILE(MCOMMON) |
|
|
1433 | |
|
|
1434 | AC_ARG_PROGRAM |
1439 | AC_ARG_PROGRAM |
1435 | |
1440 | |
1436 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
1441 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
1437 | |
1442 | |
1438 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
1443 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
… | |
… | |
1456 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
1461 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
1457 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
1462 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
1458 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
1463 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
1459 | RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
1464 | RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
1460 | |
1465 | |
1461 | AC_CONFIG_FILES([autoconf/Make.common \ |
1466 | AC_CONFIG_FILES([Makefile \ |
1462 | Makefile \ |
|
|
1463 | doc/Makefile \ |
1467 | doc/Makefile \ |
1464 | src/Makefile \ |
1468 | src/Makefile \ |
1465 | src/rxvtlib.h \ |
1469 | src/rxvtlib.h \ |
1466 | ]) |
1470 | ]) |
1467 | AC_OUTPUT |
1471 | AC_OUTPUT |