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" |
… | |
… | |
1425 | AC_SUBST(DLIB) |
1427 | AC_SUBST(DLIB) |
1426 | AC_SUBST(LIBS) |
1428 | AC_SUBST(LIBS) |
1427 | AC_SUBST(X_LIBS) |
1429 | AC_SUBST(X_LIBS) |
1428 | AC_SUBST(X_EXTRA_LIBS) |
1430 | AC_SUBST(X_EXTRA_LIBS) |
1429 | |
1431 | |
1430 | dnl# common parts of the Makefile |
|
|
1431 | MCOMMON=./autoconf/Make.common |
|
|
1432 | AC_SUBST_FILE(MCOMMON) |
|
|
1433 | |
|
|
1434 | AC_ARG_PROGRAM |
1432 | AC_ARG_PROGRAM |
1435 | |
1433 | |
1436 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
1434 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
1437 | |
1435 | |
1438 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
1436 | 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) |
1454 | 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) |
1455 | 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) |
1456 | 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) |
1457 | RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
1460 | |
1458 | |
1461 | AC_CONFIG_FILES([autoconf/Make.common \ |
1459 | AC_CONFIG_FILES([Makefile \ |
1462 | Makefile \ |
|
|
1463 | doc/Makefile \ |
1460 | doc/Makefile \ |
1464 | src/Makefile \ |
1461 | src/Makefile \ |
1465 | src/rxvtlib.h \ |
1462 | src/rxvtlib.h \ |
1466 | ]) |
1463 | ]) |
1467 | AC_OUTPUT |
1464 | AC_OUTPUT |