… | |
… | |
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 |
|
|
21 | |
22 | echo "" |
22 | echo "" |
23 | echo "configuring for rxvt $VERSION" |
23 | echo "configuring for rxvt $VERSION" |
24 | echo "" |
24 | echo "" |
25 | |
25 | |
26 | orig_CXXFLAGS="$CXXFLAGS" |
26 | orig_CXXFLAGS="$CXXFLAGS" |
27 | |
27 | |
28 | dnl# Checks for programs. |
28 | dnl# Checks for programs. |
29 | dnl AC_MAKE_SET |
|
|
30 | |
|
|
31 | AC_PROG_CC |
29 | AC_PROG_CC |
32 | AC_PROG_CXX |
30 | AC_PROG_CXX |
33 | AC_PROG_CPP |
31 | AC_PROG_CPP |
34 | AC_PROG_INSTALL |
32 | AC_PROG_INSTALL |
35 | |
33 | |
… | |
… | |
62 | dnl# -------------------------------------------------------------------------- |
60 | dnl# -------------------------------------------------------------------------- |
63 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
61 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
64 | dnl# |
62 | dnl# |
65 | if test -z "$orig_CXXFLAGS"; then |
63 | if test -z "$orig_CXXFLAGS"; then |
66 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
64 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
67 | 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" |
68 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
66 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
69 | else |
67 | else |
70 | CXXFLAGS="-O" |
68 | CXXFLAGS="-O" |
71 | fi |
69 | fi |
72 | CFLAGS="$CXXFLAGS" |
70 | CFLAGS="$CXXFLAGS" |
… | |
… | |
122 | |
120 | |
123 | dnl# -------------------------------------------------------------------------- |
121 | dnl# -------------------------------------------------------------------------- |
124 | dnl# CHECKING COMMAND LINE OPTIONS |
122 | dnl# CHECKING COMMAND LINE OPTIONS |
125 | dnl# -------------------------------------------------------------------------- |
123 | dnl# -------------------------------------------------------------------------- |
126 | |
124 | |
127 | if test "x$enable_shared" = xyes; then |
125 | dnl if test "x$enable_shared" = xyes; then |
128 | 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) |
129 | INSTALL_LIBRXVT=yes |
127 | dnl INSTALL_LIBRXVT=yes |
130 | fi |
128 | dnl fi |
131 | AC_SUBST(INSTALL_LIBRXVT) |
129 | dnl AC_SUBST(INSTALL_LIBRXVT) |
132 | |
130 | |
133 | AC_ARG_ENABLE(everything, |
131 | AC_ARG_ENABLE(everything, |
134 | [ --enable-everything enable standard non-multichoice features |
132 | [ --enable-everything enable standard non-multichoice features |
135 | NOTE: this option is order dependent |
133 | NOTE: this option is order dependent], |
136 | NOTE: automatically enabled with --enable-shared], |
|
|
137 | [ |
134 | [ |
138 | if test x$enableval = xno; then |
135 | if test x$enableval = xno; then |
139 | support_frills=no |
136 | support_frills=no |
140 | support_inheritpixmap=no |
137 | support_inheritpixmap=no |
141 | support_fading=no |
138 | support_fading=no |
… | |
… | |
281 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
278 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
282 | [if test x$enableval = xyes -o x$enableval = xno; then |
279 | [if test x$enableval = xyes -o x$enableval = xno; then |
283 | support_scroll_xterm=$enableval |
280 | support_scroll_xterm=$enableval |
284 | fi]) |
281 | fi]) |
285 | |
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 | |
286 | AC_ARG_ENABLE(perl, |
289 | AC_ARG_ENABLE(perl, |
287 | [ --enable-perl enable embedded perl interpreter], |
290 | [ --enable-perl enable embedded perl interpreter], |
288 | [if test x$enableval = xyes -o x$enableval = xno; then |
291 | [if test x$enableval = xyes -o x$enableval = xno; then |
289 | support_perl=$enableval |
292 | support_perl=$enableval |
290 | fi]) |
|
|
291 | |
|
|
292 | AC_ARG_ENABLE(plain-scroll, |
|
|
293 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
294 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
295 | support_scroll_plain=$enableval |
|
|
296 | fi]) |
293 | fi]) |
297 | |
294 | |
298 | AC_ARG_WITH(codesets, |
295 | AC_ARG_WITH(codesets, |
299 | [ --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)], |
300 | [codesets="$withval"]) |
297 | [codesets="$withval"]) |
… | |
… | |
435 | 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" |
436 | fi]) |
433 | fi]) |
437 | |
434 | |
438 | dnl# -------------------------------------------------------------------------- |
435 | dnl# -------------------------------------------------------------------------- |
439 | |
436 | |
|
|
437 | LIBEV_M4_AVOID_LIBRT=1 |
440 | m4_include([libev/libev.m4]) |
438 | m4_include([libev/libev.m4]) |
441 | |
439 | |
442 | dnl# -------------------------------------------------------------------------- |
440 | dnl# -------------------------------------------------------------------------- |
443 | |
441 | |
444 | AC_PATH_PROG(TIC, tic, :) |
442 | AC_PATH_PROG(TIC, tic, :) |
445 | |
|
|
446 | dnl# need a neat way to detect SVR4 or its features |
|
|
447 | dnl# in src/command.c we use these functions: |
|
|
448 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
|
|
449 | dnl# - but are these also defined for other systems? |
|
|
450 | |
|
|
451 | dnl# hack to find if this is SVR4 -- who knows? |
|
|
452 | dnl## AC_MSG_CHECKING(for SVR4) |
|
|
453 | dnl## AC_EGREP_CPP(yes, |
|
|
454 | dnl## [#if defined (SVR4) || defined (_SVR4) || defined (__svr4__) |
|
|
455 | dnl## yes; |
|
|
456 | dnl## #endif |
|
|
457 | dnl## ], [AC_MSG_RESULT(yes); AC_DEFINE(PERHAPS_SVR4)], AC_MSG_RESULT(perhaps not?)) |
|
|
458 | |
443 | |
459 | AC_PATH_XTRA |
444 | AC_PATH_XTRA |
460 | |
445 | |
461 | AFTERIMAGE_CFLAGS= |
446 | AFTERIMAGE_CFLAGS= |
462 | AFTERIMAGE_LIBS= |
447 | AFTERIMAGE_LIBS= |
… | |
… | |
494 | fi |
479 | fi |
495 | |
480 | |
496 | dnl# -------------------------------------------------------------------------- |
481 | dnl# -------------------------------------------------------------------------- |
497 | dnl# CHECKING FOR HEADER FILES |
482 | dnl# CHECKING FOR HEADER FILES |
498 | dnl# -------------------------------------------------------------------------- |
483 | dnl# -------------------------------------------------------------------------- |
499 | AC_HEADER_SYS_WAIT |
|
|
500 | AC_CHECK_HEADERS( \ |
484 | AC_CHECK_HEADERS( \ |
501 | assert.h \ |
485 | assert.h \ |
502 | fcntl.h \ |
486 | fcntl.h \ |
503 | stdarg.h \ |
487 | stdarg.h \ |
504 | stdlib.h \ |
488 | stdlib.h \ |
… | |
… | |
515 | wchar.h \ |
499 | wchar.h \ |
516 | cwchar \ |
500 | cwchar \ |
517 | clocale \ |
501 | clocale \ |
518 | ) |
502 | ) |
519 | |
503 | |
520 | AC_HEADER_TIME |
|
|
521 | |
|
|
522 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
504 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
523 | 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, |
524 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
506 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
525 | #include <sys/ioctl.h> |
507 | #include <sys/ioctl.h> |
526 | #ifdef HAVE_TERMIOS_H |
508 | #ifdef HAVE_TERMIOS_H |
… | |
… | |
545 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
527 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
546 | )]) |
528 | )]) |
547 | if test x$rxvt_xlib_illegal_access = xyes; then |
529 | if test x$rxvt_xlib_illegal_access = xyes; then |
548 | 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) |
549 | fi |
531 | fi |
550 | |
|
|
551 | AC_C_CONST |
|
|
552 | AC_C_INLINE |
|
|
553 | |
|
|
554 | dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow. |
|
|
555 | |
532 | |
556 | dnl# -------------------------------------------------------------------------- |
533 | dnl# -------------------------------------------------------------------------- |
557 | dnl# CHECKING FOR MISSING TYPEDEFS |
534 | dnl# CHECKING FOR MISSING TYPEDEFS |
558 | dnl# -------------------------------------------------------------------------- |
535 | dnl# -------------------------------------------------------------------------- |
559 | dnl# Missing typedefs and replacements |
536 | dnl# Missing typedefs and replacements |
… | |
… | |
643 | AC_SUBST(rxvt_u_intp_define) |
620 | AC_SUBST(rxvt_u_intp_define) |
644 | |
621 | |
645 | dnl# -------------------------------------------------------------------------- |
622 | dnl# -------------------------------------------------------------------------- |
646 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
623 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
647 | dnl# -------------------------------------------------------------------------- |
624 | dnl# -------------------------------------------------------------------------- |
648 | AC_TYPE_SIGNAL |
|
|
649 | dnl> AC_FUNC_VPRINTF |
|
|
650 | |
|
|
651 | AC_CHECK_FUNCS(unsetenv) |
625 | AC_CHECK_FUNCS(unsetenv) |
652 | |
626 | |
653 | UTMP_CHECK |
627 | UTMP_CHECK |
654 | |
628 | |
655 | dnl# -------------------------------------------------------------------------- |
629 | dnl# -------------------------------------------------------------------------- |
… | |
… | |
725 | dnl# now add and remove other stuff |
699 | dnl# now add and remove other stuff |
726 | dnl# -------------------------------------------------------------------------- |
700 | dnl# -------------------------------------------------------------------------- |
727 | if test x$support_xft = xyes; then |
701 | if test x$support_xft = xyes; then |
728 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
702 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
729 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
703 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
730 | LIBS="$LIBS `$PKG_CONFIG xft --libs`" |
704 | X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
731 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
705 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
732 | else |
706 | else |
733 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
707 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
734 | if test $XFT_CONFIG != no; then |
708 | if test $XFT_CONFIG != no; then |
735 | LIBS="$LIBS `$XFT_CONFIG --libs`" |
709 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
736 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
710 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
737 | fi |
711 | fi |
738 | fi |
712 | fi |
739 | |
713 | |
|
|
714 | save_LIBS="$LIBS" |
|
|
715 | LIBS="$LIBS $X_LIBS" |
740 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
716 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
741 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
717 | AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) |
|
|
718 | LIBS="$save_LIBS" |
742 | |
719 | |
743 | if test x$support_xft = xyes; then |
720 | if test x$support_xft = xyes; then |
744 | AC_DEFINE(XFT, 1, Define to enable xft support) |
721 | AC_DEFINE(XFT, 1, Define to enable xft support) |
745 | fi |
722 | fi |
746 | fi |
723 | fi |