… | |
… | |
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 | |
36 | AC_AIX |
34 | AC_AIX |
|
|
35 | AC_GNU_SOURCE |
37 | AC_ISC_POSIX |
36 | AC_ISC_POSIX |
38 | AC_LANG(C++) |
37 | AC_LANG(C++) |
39 | |
38 | |
40 | dnl check wether we can link with gcc -lsupc++ |
39 | dnl check wether we can link with gcc -lsupc++ |
41 | if test x$GCC = xyes && test x$GXX = xyes; then |
40 | if test x$GCC = xyes && test x$GXX = xyes; then |
… | |
… | |
62 | dnl# -------------------------------------------------------------------------- |
61 | dnl# -------------------------------------------------------------------------- |
63 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
62 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
64 | dnl# |
63 | dnl# |
65 | if test -z "$orig_CXXFLAGS"; then |
64 | if test -z "$orig_CXXFLAGS"; then |
66 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
65 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
67 | CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" |
66 | 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"]) |
67 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
69 | else |
68 | else |
70 | CXXFLAGS="-O" |
69 | CXXFLAGS="-O" |
71 | fi |
70 | fi |
72 | CFLAGS="$CXXFLAGS" |
71 | CFLAGS="$CXXFLAGS" |
73 | fi |
72 | fi |
74 | |
|
|
75 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
|
|
76 | |
73 | |
77 | case $host in |
74 | case $host in |
78 | *-*-solaris* ) |
75 | *-*-solaris* ) |
79 | AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) |
76 | AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) |
80 | ;; |
77 | ;; |
… | |
… | |
122 | |
119 | |
123 | dnl# -------------------------------------------------------------------------- |
120 | dnl# -------------------------------------------------------------------------- |
124 | dnl# CHECKING COMMAND LINE OPTIONS |
121 | dnl# CHECKING COMMAND LINE OPTIONS |
125 | dnl# -------------------------------------------------------------------------- |
122 | dnl# -------------------------------------------------------------------------- |
126 | |
123 | |
127 | if test "x$enable_shared" = xyes; then |
124 | dnl if test "x$enable_shared" = xyes; then |
128 | AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
125 | dnl AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
129 | INSTALL_LIBRXVT=yes |
126 | dnl INSTALL_LIBRXVT=yes |
130 | fi |
127 | dnl fi |
131 | AC_SUBST(INSTALL_LIBRXVT) |
128 | dnl AC_SUBST(INSTALL_LIBRXVT) |
132 | |
129 | |
133 | AC_ARG_ENABLE(everything, |
130 | AC_ARG_ENABLE(everything, |
134 | [ --enable-everything enable standard non-multichoice features |
131 | [ --enable-everything enable standard non-multichoice features |
135 | NOTE: this option is order dependent |
132 | NOTE: this option is order dependent], |
136 | NOTE: automatically enabled with --enable-shared], |
|
|
137 | [ |
133 | [ |
138 | if test x$enableval = xno; then |
134 | if test x$enableval = xno; then |
139 | support_frills=no |
135 | support_frills=no |
140 | support_inheritpixmap=no |
136 | support_inheritpixmap=no |
141 | support_fading=no |
137 | support_fading=no |
… | |
… | |
281 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
277 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
282 | [if test x$enableval = xyes -o x$enableval = xno; then |
278 | [if test x$enableval = xyes -o x$enableval = xno; then |
283 | support_scroll_xterm=$enableval |
279 | support_scroll_xterm=$enableval |
284 | fi]) |
280 | fi]) |
285 | |
281 | |
|
|
282 | AC_ARG_ENABLE(plain-scroll, |
|
|
283 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
284 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
285 | support_scroll_plain=$enableval |
|
|
286 | fi]) |
|
|
287 | |
286 | AC_ARG_ENABLE(perl, |
288 | AC_ARG_ENABLE(perl, |
287 | [ --enable-perl enable embedded perl interpreter], |
289 | [ --enable-perl enable embedded perl interpreter], |
288 | [if test x$enableval = xyes -o x$enableval = xno; then |
290 | [if test x$enableval = xyes -o x$enableval = xno; then |
289 | support_perl=$enableval |
291 | 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]) |
292 | fi]) |
297 | |
293 | |
298 | AC_ARG_WITH(codesets, |
294 | AC_ARG_WITH(codesets, |
299 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
295 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
300 | [codesets="$withval"]) |
296 | [codesets="$withval"]) |
… | |
… | |
435 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
431 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
436 | fi]) |
432 | fi]) |
437 | |
433 | |
438 | dnl# -------------------------------------------------------------------------- |
434 | dnl# -------------------------------------------------------------------------- |
439 | |
435 | |
|
|
436 | LIBEV_M4_AVOID_LIBRT=1 |
|
|
437 | m4_include([libev/libev.m4]) |
|
|
438 | |
|
|
439 | dnl# -------------------------------------------------------------------------- |
|
|
440 | |
440 | AC_PATH_PROG(TIC, tic, :) |
441 | AC_PATH_PROG(TIC, tic, :) |
441 | |
|
|
442 | dnl# need a neat way to detect SVR4 or its features |
|
|
443 | dnl# in src/command.c we use these functions: |
|
|
444 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
|
|
445 | dnl# - but are these also defined for other systems? |
|
|
446 | |
|
|
447 | dnl# hack to find if this is SVR4 -- who knows? |
|
|
448 | dnl## AC_MSG_CHECKING(for SVR4) |
|
|
449 | dnl## AC_EGREP_CPP(yes, |
|
|
450 | dnl## [#if defined (SVR4) || defined (_SVR4) || defined (__svr4__) |
|
|
451 | dnl## yes; |
|
|
452 | dnl## #endif |
|
|
453 | dnl## ], [AC_MSG_RESULT(yes); AC_DEFINE(PERHAPS_SVR4)], AC_MSG_RESULT(perhaps not?)) |
|
|
454 | |
442 | |
455 | AC_PATH_XTRA |
443 | AC_PATH_XTRA |
456 | |
444 | |
457 | AFTERIMAGE_CFLAGS= |
445 | AFTERIMAGE_CFLAGS= |
458 | AFTERIMAGE_LIBS= |
446 | AFTERIMAGE_LIBS= |
… | |
… | |
490 | fi |
478 | fi |
491 | |
479 | |
492 | dnl# -------------------------------------------------------------------------- |
480 | dnl# -------------------------------------------------------------------------- |
493 | dnl# CHECKING FOR HEADER FILES |
481 | dnl# CHECKING FOR HEADER FILES |
494 | dnl# -------------------------------------------------------------------------- |
482 | dnl# -------------------------------------------------------------------------- |
495 | AC_HEADER_SYS_WAIT |
|
|
496 | AC_CHECK_HEADERS( \ |
483 | AC_CHECK_HEADERS( \ |
497 | assert.h \ |
484 | assert.h \ |
498 | fcntl.h \ |
485 | fcntl.h \ |
499 | stdarg.h \ |
486 | stdarg.h \ |
500 | stdlib.h \ |
487 | stdlib.h \ |
… | |
… | |
511 | wchar.h \ |
498 | wchar.h \ |
512 | cwchar \ |
499 | cwchar \ |
513 | clocale \ |
500 | clocale \ |
514 | ) |
501 | ) |
515 | |
502 | |
516 | AC_HEADER_TIME |
|
|
517 | |
|
|
518 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
503 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
519 | AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
504 | AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
520 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
505 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
521 | #include <sys/ioctl.h> |
506 | #include <sys/ioctl.h> |
522 | #ifdef HAVE_TERMIOS_H |
507 | #ifdef HAVE_TERMIOS_H |
… | |
… | |
541 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
526 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
542 | )]) |
527 | )]) |
543 | if test x$rxvt_xlib_illegal_access = xyes; then |
528 | if test x$rxvt_xlib_illegal_access = xyes; then |
544 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
529 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
545 | fi |
530 | fi |
546 | |
|
|
547 | AC_C_CONST |
|
|
548 | AC_C_INLINE |
|
|
549 | |
|
|
550 | dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow. |
|
|
551 | |
531 | |
552 | dnl# -------------------------------------------------------------------------- |
532 | dnl# -------------------------------------------------------------------------- |
553 | dnl# CHECKING FOR MISSING TYPEDEFS |
533 | dnl# CHECKING FOR MISSING TYPEDEFS |
554 | dnl# -------------------------------------------------------------------------- |
534 | dnl# -------------------------------------------------------------------------- |
555 | dnl# Missing typedefs and replacements |
535 | dnl# Missing typedefs and replacements |
… | |
… | |
639 | AC_SUBST(rxvt_u_intp_define) |
619 | AC_SUBST(rxvt_u_intp_define) |
640 | |
620 | |
641 | dnl# -------------------------------------------------------------------------- |
621 | dnl# -------------------------------------------------------------------------- |
642 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
622 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
643 | dnl# -------------------------------------------------------------------------- |
623 | dnl# -------------------------------------------------------------------------- |
644 | AC_TYPE_SIGNAL |
624 | AC_CHECK_FUNCS(unsetenv) |
645 | dnl> AC_FUNC_VPRINTF |
|
|
646 | |
|
|
647 | AC_CHECK_FUNCS( \ |
|
|
648 | unsetenv \ |
|
|
649 | setutent \ |
|
|
650 | on_exit \ |
|
|
651 | ) |
|
|
652 | |
625 | |
653 | UTMP_CHECK |
626 | UTMP_CHECK |
654 | |
627 | |
655 | dnl# -------------------------------------------------------------------------- |
628 | dnl# -------------------------------------------------------------------------- |
656 | |
|
|
657 | dnl# find ttys/ttytab |
|
|
658 | AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab, |
|
|
659 | [for ttys_file in dnl |
|
|
660 | /etc/ttys /etc/ttytab; |
|
|
661 | do |
|
|
662 | if test -f "$ttys_file" ; then |
|
|
663 | rxvt_cv_path_ttytab=$ttys_file |
|
|
664 | break |
|
|
665 | fi |
|
|
666 | done |
|
|
667 | ]) |
|
|
668 | if test x$rxvt_cv_path_ttytab != x; then |
|
|
669 | AC_DEFINE_UNQUOTED(TTYTAB_FILENAME, "$rxvt_cv_path_ttytab", Define location of ttys/ttytab) |
|
|
670 | fi |
|
|
671 | |
629 | |
672 | dnl# -------------------------------------------------------------------------- |
630 | dnl# -------------------------------------------------------------------------- |
673 | dnl# -------------------------------------------------------------------------- |
631 | dnl# -------------------------------------------------------------------------- |
674 | |
632 | |
675 | dnl# this is a really hack test for some basic Xlocale stuff |
633 | dnl# this is a really hack test for some basic Xlocale stuff |
… | |
… | |
740 | dnl# now add and remove other stuff |
698 | dnl# now add and remove other stuff |
741 | dnl# -------------------------------------------------------------------------- |
699 | dnl# -------------------------------------------------------------------------- |
742 | if test x$support_xft = xyes; then |
700 | if test x$support_xft = xyes; then |
743 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
701 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
744 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
702 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
745 | LIBS="$LIBS `$PKG_CONFIG xft --libs`" |
703 | X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
746 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
704 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
747 | else |
705 | else |
748 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
706 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
749 | if test $XFT_CONFIG != no; then |
707 | if test $XFT_CONFIG != no; then |
750 | LIBS="$LIBS `$XFT_CONFIG --libs`" |
708 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
751 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
709 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
752 | fi |
710 | fi |
753 | fi |
711 | fi |
754 | |
712 | |
|
|
713 | save_LIBS="$LIBS" |
|
|
714 | LIBS="$LIBS $X_LIBS" |
755 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
715 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
756 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
716 | AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) |
|
|
717 | LIBS="$save_LIBS" |
757 | |
718 | |
758 | if test x$support_xft = xyes; then |
719 | if test x$support_xft = xyes; then |
759 | AC_DEFINE(XFT, 1, Define to enable xft support) |
720 | AC_DEFINE(XFT, 1, Define to enable xft support) |
760 | fi |
721 | fi |
761 | fi |
722 | fi |