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 | orig_CXXFLAGS="$CXXFLAGS" |
|
|
6 | |
5 | |
7 | AC_INIT |
6 | AC_INIT |
|
|
7 | AC_PREREQ(2.50) |
8 | AC_CONFIG_SRCDIR([src/feature.h]) |
8 | AC_CONFIG_SRCDIR([src/feature.h]) |
9 | AC_CONFIG_AUX_DIR(autoconf) |
9 | AC_CONFIG_AUX_DIR(autoconf) |
10 | AC_CONFIG_HEADER(config.h:autoconf/config.h.in) |
10 | AC_CONFIG_HEADER(config.h:autoconf/config.h.in) |
11 | |
11 | |
12 | AC_CANONICAL_HOST |
12 | AC_CANONICAL_HOST |
… | |
… | |
23 | AC_SUBST(LIBVERSION)dnl |
23 | AC_SUBST(LIBVERSION)dnl |
24 | echo "" |
24 | echo "" |
25 | echo "configuring for rxvt $VERSION" |
25 | echo "configuring for rxvt $VERSION" |
26 | echo "" |
26 | echo "" |
27 | |
27 | |
|
|
28 | orig_CXXFLAGS="$CXXFLAGS" |
|
|
29 | |
28 | dnl# Checks for programs. |
30 | dnl# Checks for programs. |
29 | dnl AC_MAKE_SET |
31 | dnl AC_MAKE_SET |
30 | |
32 | |
31 | AC_PROG_CC |
33 | AC_PROG_CC |
32 | AC_PROG_CXX |
34 | AC_PROG_CXX |
… | |
… | |
38 | |
40 | |
39 | dnl# -------------------------------------------------------------------------- |
41 | dnl# -------------------------------------------------------------------------- |
40 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
42 | dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
41 | dnl# |
43 | dnl# |
42 | if test -z "$orig_CXXFLAGS"; then |
44 | if test -z "$orig_CXXFLAGS"; then |
43 | CXXFLAGS='-O' |
|
|
44 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
45 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
45 | CXXFLAGS="-g -O3" |
46 | CXXFLAGS="-g -O3" |
|
|
47 | else |
|
|
48 | CXXFLAGS="-O" |
46 | fi |
49 | fi |
47 | CFLAGS="$CXXFLAGS" |
50 | CFLAGS="$CXXFLAGS" |
48 | fi |
51 | fi |
49 | |
52 | |
50 | LINKER="$CXX" |
53 | LINKER="$CXX" |
… | |
… | |
298 | [ --enable-plain-scroll enable plain style scrollbar], |
301 | [ --enable-plain-scroll enable plain style scrollbar], |
299 | [if test x$enableval = xyes -o x$enableval = xno; then |
302 | [if test x$enableval = xyes -o x$enableval = xno; then |
300 | support_scroll_plain=$enableval |
303 | support_scroll_plain=$enableval |
301 | fi]) |
304 | fi]) |
302 | |
305 | |
303 | AC_ARG_ENABLE(half-shadow, |
306 | dnl AC_ARG_ENABLE(half-shadow, |
304 | [ --enable-half-shadow use half width/height shadow on rxvt scrollbar], |
307 | dnl [ --enable-half-shadow use half width/height shadow on rxvt scrollbar], |
305 | [if test x$enableval = xyes; then |
308 | dnl [if test x$enableval = xyes; then |
306 | AC_DEFINE(HALFSHADOW, 1, Define if you want the depth of scrollbars and menus to be less) |
309 | dnl AC_DEFINE(HALFSHADOW, 1, Define if you want the depth of scrollbars and menus to be less) |
307 | fi]) |
310 | dnl fi]) |
308 | |
311 | |
309 | AC_ARG_WITH(codesets, |
312 | AC_ARG_WITH(codesets, |
310 | [ --with-codesets=NAME,.. compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
313 | [ --with-codesets=NAME,.. compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
311 | [codesets="$withval"]) |
314 | [codesets="$withval"]) |
312 | |
315 | |
… | |
… | |
707 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
710 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
708 | dnl# -------------------------------------------------------------------------- |
711 | dnl# -------------------------------------------------------------------------- |
709 | AC_TYPE_SIGNAL |
712 | AC_TYPE_SIGNAL |
710 | dnl> AC_FUNC_VPRINTF |
713 | dnl> AC_FUNC_VPRINTF |
711 | |
714 | |
712 | dnl# Note: On Ultrix, setsid() does weirdo stuff, disable it |
|
|
713 | case "$host_alias" in |
|
|
714 | *ultrix) ac_cv_func_setsid='no' ;; |
|
|
715 | *) break;; |
|
|
716 | esac |
|
|
717 | |
|
|
718 | AC_CHECK_FUNCS( \ |
715 | AC_CHECK_FUNCS( \ |
719 | atexit \ |
|
|
720 | revoke \ |
716 | revoke \ |
721 | unsetenv \ |
717 | unsetenv \ |
722 | setutent \ |
718 | setutent \ |
723 | seteuid \ |
719 | seteuid \ |
724 | setreuid \ |
720 | setreuid \ |
725 | setsid \ |
|
|
726 | setpgrp \ |
|
|
727 | setpgid \ |
|
|
728 | _getpty \ |
721 | _getpty \ |
|
|
722 | getpt \ |
729 | posix_openpt \ |
723 | posix_openpt \ |
730 | grantpt \ |
724 | grantpt \ |
731 | unlockpt \ |
725 | unlockpt \ |
732 | isastream \ |
726 | isastream \ |
733 | on_exit \ |
727 | on_exit \ |
… | |
… | |
1163 | |
1157 | |
1164 | if test x$rxvt_broken_ximcb = xyes; then |
1158 | if test x$rxvt_broken_ximcb = xyes; then |
1165 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
1159 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
1166 | fi |
1160 | fi |
1167 | |
1161 | |
1168 | if test x$ac_cv_func_posix_openpt = xno; then |
1162 | if test x$ac_cv_func_getpt = xno -a x$ac_cv_func_posix_openpt = xno; then |
1169 | AC_CHECK_FUNC(openpty, [], [AC_CHECK_LIB(util, openpty, [LIBS="$LIBS -lutil"])]) |
1163 | AC_CHECK_FUNC(openpty, [], [AC_CHECK_LIB(util, openpty, [LIBS="$LIBS -lutil"])]) |
1170 | fi |
1164 | fi |
1171 | |
1165 | |
1172 | dnl# if we don't guess right then it's up to the user |
1166 | dnl# if we don't guess right then it's up to the user |
1173 | AC_CACHE_CHECK(for pty/tty type, rxvt_cv_ptys, |
1167 | AC_CACHE_CHECK(for pty/tty type, rxvt_cv_ptys, |
1174 | [if test x$ac_cv_func_openpty = xyes -o x$ac_cv_lib_util_openpty = xyes; then |
1168 | [if test x$ac_cv_func_openpty = xyes -o x$ac_cv_lib_util_openpty = xyes; then |
1175 | rxvt_cv_ptys=OPENPTY |
1169 | rxvt_cv_ptys=OPENPTY |
|
|
1170 | else if test x$ac_cv_func_getpt = xyes; then |
|
|
1171 | rxvt_cv_ptys=GLIBC |
1176 | else if test x$ac_cv_func_posix_openpt = xyes; then |
1172 | else if test x$ac_cv_func_posix_openpt = xyes; then |
1177 | rxvt_cv_ptys=POSIX |
1173 | rxvt_cv_ptys=POSIX |
1178 | else if test x$ac_cv_func__getpty = xyes; then |
1174 | else if test x$ac_cv_func__getpty = xyes; then |
1179 | rxvt_cv_ptys=SGI4 |
1175 | rxvt_cv_ptys=SGI4 |
1180 | else if test -c /dev/ttyp20; then |
1176 | else if test -c /dev/ttyp20; then |
… | |
… | |
1199 | fi |
1195 | fi |
1200 | fi |
1196 | fi |
1201 | fi |
1197 | fi |
1202 | fi |
1198 | fi |
1203 | fi |
1199 | fi |
|
|
1200 | fi |
1204 | ]) |
1201 | ]) |
1205 | |
1202 | |
|
|
1203 | if test x$rxvt_cv_ptys = xGLIBC; then |
|
|
1204 | AC_DEFINE(PTYS_ARE_GETPT, 1, Define for this pty type) |
|
|
1205 | fi |
1206 | if test x$rxvt_cv_ptys = xPOSIX; then |
1206 | if test x$rxvt_cv_ptys = xPOSIX; then |
1207 | AC_DEFINE(PTYS_ARE_POSIX, 1, Define for this pty type) |
1207 | AC_DEFINE(PTYS_ARE_POSIX, 1, Define for this pty type) |
1208 | fi |
1208 | fi |
1209 | if test x$rxvt_cv_ptys = xOPENPTY; then |
1209 | if test x$rxvt_cv_ptys = xOPENPTY; then |
1210 | AC_DEFINE(PTYS_ARE_OPENPTY, 1, Define for this pty type) |
1210 | AC_DEFINE(PTYS_ARE_OPENPTY, 1, Define for this pty type) |
… | |
… | |
1424 | AC_SUBST(DLIB) |
1424 | AC_SUBST(DLIB) |
1425 | AC_SUBST(LIBS) |
1425 | AC_SUBST(LIBS) |
1426 | AC_SUBST(X_LIBS) |
1426 | AC_SUBST(X_LIBS) |
1427 | AC_SUBST(X_EXTRA_LIBS) |
1427 | AC_SUBST(X_EXTRA_LIBS) |
1428 | |
1428 | |
1429 | dnl# common parts of the Makefile |
|
|
1430 | MCOMMON=./autoconf/Make.common |
|
|
1431 | AC_SUBST_FILE(MCOMMON) |
|
|
1432 | |
|
|
1433 | AC_ARG_PROGRAM |
1429 | AC_ARG_PROGRAM |
1434 | |
1430 | |
1435 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
1431 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
1436 | |
1432 | |
1437 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
1433 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
… | |
… | |
1455 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
1451 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
1456 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
1452 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
1457 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
1453 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
1458 | RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
1454 | RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
1459 | |
1455 | |
1460 | AC_CONFIG_FILES([autoconf/Make.common \ |
1456 | AC_CONFIG_FILES([Makefile \ |
1461 | Makefile \ |
|
|
1462 | doc/Makefile \ |
1457 | doc/Makefile \ |
1463 | src/Makefile \ |
1458 | src/Makefile \ |
1464 | src/rxvtlib.h \ |
1459 | src/rxvtlib.h \ |
1465 | ]) |
1460 | ]) |
1466 | AC_OUTPUT |
1461 | AC_OUTPUT |