… | |
… | |
15 | DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
15 | DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
16 | dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
16 | dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
17 | changequote([, ])dnl |
17 | changequote([, ])dnl |
18 | AC_SUBST(VERSION)dnl |
18 | AC_SUBST(VERSION)dnl |
19 | AC_SUBST(DATE)dnl |
19 | AC_SUBST(DATE)dnl |
20 | AC_SUBST(LSMDATE)dnl |
|
|
21 | AC_SUBST(LIBVERSION)dnl |
20 | dnl AC_SUBST(LIBVERSION)dnl |
22 | |
21 | |
23 | echo "" |
22 | echo "" |
24 | echo "configuring for rxvt $VERSION" |
23 | echo "configuring for rxvt $VERSION" |
25 | echo "" |
24 | echo "" |
26 | |
25 | |
27 | orig_CXXFLAGS="$CXXFLAGS" |
26 | orig_CXXFLAGS="$CXXFLAGS" |
28 | |
27 | |
29 | dnl# Checks for programs. |
28 | dnl# Checks for programs. |
30 | dnl AC_MAKE_SET |
|
|
31 | |
|
|
32 | AC_PROG_CC |
29 | AC_PROG_CC |
33 | AC_PROG_CXX |
30 | AC_PROG_CXX |
34 | AC_PROG_CPP |
31 | AC_PROG_CPP |
35 | AC_PROG_INSTALL |
32 | AC_PROG_INSTALL |
36 | |
33 | |
… | |
… | |
63 | dnl# -------------------------------------------------------------------------- |
60 | dnl# -------------------------------------------------------------------------- |
64 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
61 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
65 | dnl# |
62 | dnl# |
66 | if test -z "$orig_CXXFLAGS"; then |
63 | if test -z "$orig_CXXFLAGS"; then |
67 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
64 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
68 | CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" |
65 | CXXFLAGS="-g -O3 -fno-rtti -fvisibility-inlines-hidden -fno-threadsafe-statics -fno-enforce-eh-specs" |
69 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
66 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
70 | else |
67 | else |
71 | CXXFLAGS="-O" |
68 | CXXFLAGS="-O" |
72 | fi |
69 | fi |
73 | CFLAGS="$CXXFLAGS" |
70 | CFLAGS="$CXXFLAGS" |
… | |
… | |
123 | |
120 | |
124 | dnl# -------------------------------------------------------------------------- |
121 | dnl# -------------------------------------------------------------------------- |
125 | dnl# CHECKING COMMAND LINE OPTIONS |
122 | dnl# CHECKING COMMAND LINE OPTIONS |
126 | dnl# -------------------------------------------------------------------------- |
123 | dnl# -------------------------------------------------------------------------- |
127 | |
124 | |
128 | if test "x$enable_shared" = xyes; then |
125 | dnl if test "x$enable_shared" = xyes; then |
129 | AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
126 | dnl AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
130 | INSTALL_LIBRXVT=yes |
127 | dnl INSTALL_LIBRXVT=yes |
131 | fi |
128 | dnl fi |
132 | AC_SUBST(INSTALL_LIBRXVT) |
129 | dnl AC_SUBST(INSTALL_LIBRXVT) |
133 | |
130 | |
134 | AC_ARG_ENABLE(everything, |
131 | AC_ARG_ENABLE(everything, |
135 | [ --enable-everything enable standard non-multichoice features |
132 | [ --enable-everything enable standard non-multichoice features |
136 | NOTE: this option is order dependent |
133 | NOTE: this option is order dependent], |
137 | NOTE: automatically enabled with --enable-shared], |
|
|
138 | [ |
134 | [ |
139 | if test x$enableval = xno; then |
135 | if test x$enableval = xno; then |
140 | support_frills=no |
136 | support_frills=no |
141 | support_inheritpixmap=no |
137 | support_inheritpixmap=no |
142 | support_fading=no |
138 | support_fading=no |
… | |
… | |
282 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
278 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
283 | [if test x$enableval = xyes -o x$enableval = xno; then |
279 | [if test x$enableval = xyes -o x$enableval = xno; then |
284 | support_scroll_xterm=$enableval |
280 | support_scroll_xterm=$enableval |
285 | fi]) |
281 | fi]) |
286 | |
282 | |
|
|
283 | AC_ARG_ENABLE(plain-scroll, |
|
|
284 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
285 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
286 | support_scroll_plain=$enableval |
|
|
287 | fi]) |
|
|
288 | |
287 | AC_ARG_ENABLE(perl, |
289 | AC_ARG_ENABLE(perl, |
288 | [ --enable-perl enable embedded perl interpreter], |
290 | [ --enable-perl enable embedded perl interpreter], |
289 | [if test x$enableval = xyes -o x$enableval = xno; then |
291 | [if test x$enableval = xyes -o x$enableval = xno; then |
290 | support_perl=$enableval |
292 | support_perl=$enableval |
291 | fi]) |
|
|
292 | |
|
|
293 | AC_ARG_ENABLE(plain-scroll, |
|
|
294 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
295 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
296 | support_scroll_plain=$enableval |
|
|
297 | fi]) |
293 | fi]) |
298 | |
294 | |
299 | AC_ARG_WITH(codesets, |
295 | AC_ARG_WITH(codesets, |
300 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
296 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
301 | [codesets="$withval"]) |
297 | [codesets="$withval"]) |
… | |
… | |
436 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
432 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
437 | fi]) |
433 | fi]) |
438 | |
434 | |
439 | dnl# -------------------------------------------------------------------------- |
435 | dnl# -------------------------------------------------------------------------- |
440 | |
436 | |
|
|
437 | LIBEV_M4_AVOID_LIBRT=1 |
441 | m4_include([libev/libev.m4]) |
438 | m4_include([libev/libev.m4]) |
442 | |
439 | |
443 | dnl# -------------------------------------------------------------------------- |
440 | dnl# -------------------------------------------------------------------------- |
444 | |
441 | |
445 | AC_PATH_PROG(TIC, tic, :) |
442 | AC_PATH_PROG(TIC, tic, :) |
446 | |
|
|
447 | dnl# need a neat way to detect SVR4 or its features |
|
|
448 | dnl# in src/command.c we use these functions: |
|
|
449 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
|
|
450 | dnl# - but are these also defined for other systems? |
|
|
451 | |
|
|
452 | dnl# hack to find if this is SVR4 -- who knows? |
|
|
453 | dnl## AC_MSG_CHECKING(for SVR4) |
|
|
454 | dnl## AC_EGREP_CPP(yes, |
|
|
455 | dnl## [#if defined (SVR4) || defined (_SVR4) || defined (__svr4__) |
|
|
456 | dnl## yes; |
|
|
457 | dnl## #endif |
|
|
458 | dnl## ], [AC_MSG_RESULT(yes); AC_DEFINE(PERHAPS_SVR4)], AC_MSG_RESULT(perhaps not?)) |
|
|
459 | |
443 | |
460 | AC_PATH_XTRA |
444 | AC_PATH_XTRA |
461 | |
445 | |
462 | AFTERIMAGE_CFLAGS= |
446 | AFTERIMAGE_CFLAGS= |
463 | AFTERIMAGE_LIBS= |
447 | AFTERIMAGE_LIBS= |
… | |
… | |
495 | fi |
479 | fi |
496 | |
480 | |
497 | dnl# -------------------------------------------------------------------------- |
481 | dnl# -------------------------------------------------------------------------- |
498 | dnl# CHECKING FOR HEADER FILES |
482 | dnl# CHECKING FOR HEADER FILES |
499 | dnl# -------------------------------------------------------------------------- |
483 | dnl# -------------------------------------------------------------------------- |
500 | AC_HEADER_SYS_WAIT |
|
|
501 | AC_CHECK_HEADERS( \ |
484 | AC_CHECK_HEADERS( \ |
502 | assert.h \ |
485 | assert.h \ |
503 | fcntl.h \ |
486 | fcntl.h \ |
504 | stdarg.h \ |
487 | stdarg.h \ |
505 | stdlib.h \ |
488 | stdlib.h \ |
… | |
… | |
516 | wchar.h \ |
499 | wchar.h \ |
517 | cwchar \ |
500 | cwchar \ |
518 | clocale \ |
501 | clocale \ |
519 | ) |
502 | ) |
520 | |
503 | |
521 | AC_HEADER_TIME |
|
|
522 | |
|
|
523 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
504 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
524 | AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
505 | AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
525 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
506 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
526 | #include <sys/ioctl.h> |
507 | #include <sys/ioctl.h> |
527 | #ifdef HAVE_TERMIOS_H |
508 | #ifdef HAVE_TERMIOS_H |
… | |
… | |
546 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
527 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
547 | )]) |
528 | )]) |
548 | if test x$rxvt_xlib_illegal_access = xyes; then |
529 | if test x$rxvt_xlib_illegal_access = xyes; then |
549 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
530 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
550 | fi |
531 | fi |
551 | |
|
|
552 | AC_C_CONST |
|
|
553 | AC_C_INLINE |
|
|
554 | |
|
|
555 | dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow. |
|
|
556 | |
532 | |
557 | dnl# -------------------------------------------------------------------------- |
533 | dnl# -------------------------------------------------------------------------- |
558 | dnl# CHECKING FOR MISSING TYPEDEFS |
534 | dnl# CHECKING FOR MISSING TYPEDEFS |
559 | dnl# -------------------------------------------------------------------------- |
535 | dnl# -------------------------------------------------------------------------- |
560 | dnl# Missing typedefs and replacements |
536 | dnl# Missing typedefs and replacements |
… | |
… | |
644 | AC_SUBST(rxvt_u_intp_define) |
620 | AC_SUBST(rxvt_u_intp_define) |
645 | |
621 | |
646 | dnl# -------------------------------------------------------------------------- |
622 | dnl# -------------------------------------------------------------------------- |
647 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
623 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
648 | dnl# -------------------------------------------------------------------------- |
624 | dnl# -------------------------------------------------------------------------- |
649 | AC_TYPE_SIGNAL |
|
|
650 | dnl> AC_FUNC_VPRINTF |
|
|
651 | |
|
|
652 | AC_CHECK_FUNCS(unsetenv) |
625 | AC_CHECK_FUNCS(unsetenv) |
653 | |
626 | |
654 | UTMP_CHECK |
627 | UTMP_CHECK |
655 | |
628 | |
656 | dnl# -------------------------------------------------------------------------- |
629 | dnl# -------------------------------------------------------------------------- |