… | |
… | |
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 | ;; |
81 | esac |
78 | esac |
82 | |
|
|
83 | dnl if test x$GXX = xyes; then |
|
|
84 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
|
|
85 | dnl fi |
|
|
86 | |
79 | |
87 | dnl# FreeBSD needs to link libxpg4 |
80 | dnl# FreeBSD needs to link libxpg4 |
88 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
81 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
89 | |
82 | |
90 | dnl# solaris needs to link libnsl and socket |
83 | dnl# solaris needs to link libnsl and socket |
… | |
… | |
122 | |
115 | |
123 | dnl# -------------------------------------------------------------------------- |
116 | dnl# -------------------------------------------------------------------------- |
124 | dnl# CHECKING COMMAND LINE OPTIONS |
117 | dnl# CHECKING COMMAND LINE OPTIONS |
125 | dnl# -------------------------------------------------------------------------- |
118 | dnl# -------------------------------------------------------------------------- |
126 | |
119 | |
127 | if test "x$enable_shared" = xyes; then |
120 | dnl if test "x$enable_shared" = xyes; then |
128 | AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
121 | dnl AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
129 | INSTALL_LIBRXVT=yes |
122 | dnl INSTALL_LIBRXVT=yes |
130 | fi |
123 | dnl fi |
131 | AC_SUBST(INSTALL_LIBRXVT) |
124 | dnl AC_SUBST(INSTALL_LIBRXVT) |
132 | |
125 | |
133 | AC_ARG_ENABLE(everything, |
126 | AC_ARG_ENABLE(everything, |
134 | [ --enable-everything enable standard non-multichoice features |
127 | [ --enable-everything enable standard non-multichoice features |
135 | NOTE: this option is order dependent |
128 | NOTE: this option is order dependent], |
136 | NOTE: automatically enabled with --enable-shared], |
|
|
137 | [ |
129 | [ |
138 | if test x$enableval = xno; then |
130 | if test x$enableval = xno; then |
139 | support_frills=no |
131 | support_frills=no |
140 | support_inheritpixmap=no |
132 | support_inheritpixmap=no |
141 | support_fading=no |
133 | support_fading=no |
… | |
… | |
281 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
273 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
282 | [if test x$enableval = xyes -o x$enableval = xno; then |
274 | [if test x$enableval = xyes -o x$enableval = xno; then |
283 | support_scroll_xterm=$enableval |
275 | support_scroll_xterm=$enableval |
284 | fi]) |
276 | fi]) |
285 | |
277 | |
|
|
278 | AC_ARG_ENABLE(plain-scroll, |
|
|
279 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
280 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
281 | support_scroll_plain=$enableval |
|
|
282 | fi]) |
|
|
283 | |
286 | AC_ARG_ENABLE(perl, |
284 | AC_ARG_ENABLE(perl, |
287 | [ --enable-perl enable embedded perl interpreter], |
285 | [ --enable-perl enable embedded perl interpreter], |
288 | [if test x$enableval = xyes -o x$enableval = xno; then |
286 | [if test x$enableval = xyes -o x$enableval = xno; then |
289 | support_perl=$enableval |
287 | 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]) |
288 | fi]) |
297 | |
289 | |
298 | AC_ARG_WITH(codesets, |
290 | AC_ARG_WITH(codesets, |
299 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
291 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
300 | [codesets="$withval"]) |
292 | [codesets="$withval"]) |
… | |
… | |
435 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
427 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
436 | fi]) |
428 | fi]) |
437 | |
429 | |
438 | dnl# -------------------------------------------------------------------------- |
430 | dnl# -------------------------------------------------------------------------- |
439 | |
431 | |
|
|
432 | LIBEV_M4_AVOID_LIBRT=1 |
440 | m4_include([libev/libev.m4]) |
433 | m4_include([libev/libev.m4]) |
441 | |
434 | |
442 | dnl# -------------------------------------------------------------------------- |
435 | dnl# -------------------------------------------------------------------------- |
443 | |
436 | |
444 | AC_PATH_PROG(TIC, tic, :) |
437 | 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 | |
438 | |
459 | AC_PATH_XTRA |
439 | AC_PATH_XTRA |
460 | |
440 | |
461 | AFTERIMAGE_CFLAGS= |
441 | AFTERIMAGE_CFLAGS= |
462 | AFTERIMAGE_LIBS= |
442 | AFTERIMAGE_LIBS= |
… | |
… | |
494 | fi |
474 | fi |
495 | |
475 | |
496 | dnl# -------------------------------------------------------------------------- |
476 | dnl# -------------------------------------------------------------------------- |
497 | dnl# CHECKING FOR HEADER FILES |
477 | dnl# CHECKING FOR HEADER FILES |
498 | dnl# -------------------------------------------------------------------------- |
478 | dnl# -------------------------------------------------------------------------- |
499 | AC_HEADER_SYS_WAIT |
|
|
500 | AC_CHECK_HEADERS( \ |
479 | AC_CHECK_HEADERS( \ |
501 | assert.h \ |
480 | assert.h \ |
502 | fcntl.h \ |
481 | fcntl.h \ |
503 | stdarg.h \ |
482 | stdarg.h \ |
504 | stdlib.h \ |
483 | stdlib.h \ |
… | |
… | |
509 | sys/ioctl.h \ |
488 | sys/ioctl.h \ |
510 | sys/select.h \ |
489 | sys/select.h \ |
511 | sys/sockio.h \ |
490 | sys/sockio.h \ |
512 | sys/strredir.h \ |
491 | sys/strredir.h \ |
513 | sys/time.h \ |
492 | sys/time.h \ |
|
|
493 | time.h \ |
514 | stdint.h \ |
494 | stdint.h \ |
515 | wchar.h \ |
495 | wchar.h \ |
516 | cwchar \ |
496 | cwchar \ |
517 | clocale \ |
497 | clocale \ |
518 | ) |
498 | ) |
519 | |
|
|
520 | AC_HEADER_TIME |
|
|
521 | |
499 | |
522 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
500 | 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, |
501 | 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> |
502 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
525 | #include <sys/ioctl.h> |
503 | #include <sys/ioctl.h> |
… | |
… | |
545 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
523 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
546 | )]) |
524 | )]) |
547 | if test x$rxvt_xlib_illegal_access = xyes; then |
525 | if test x$rxvt_xlib_illegal_access = xyes; then |
548 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
526 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
549 | fi |
527 | 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 | |
528 | |
556 | dnl# -------------------------------------------------------------------------- |
529 | dnl# -------------------------------------------------------------------------- |
557 | dnl# CHECKING FOR MISSING TYPEDEFS |
530 | dnl# CHECKING FOR MISSING TYPEDEFS |
558 | dnl# -------------------------------------------------------------------------- |
531 | dnl# -------------------------------------------------------------------------- |
559 | dnl# Missing typedefs and replacements |
532 | dnl# Missing typedefs and replacements |
… | |
… | |
643 | AC_SUBST(rxvt_u_intp_define) |
616 | AC_SUBST(rxvt_u_intp_define) |
644 | |
617 | |
645 | dnl# -------------------------------------------------------------------------- |
618 | dnl# -------------------------------------------------------------------------- |
646 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
619 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
647 | dnl# -------------------------------------------------------------------------- |
620 | dnl# -------------------------------------------------------------------------- |
648 | AC_TYPE_SIGNAL |
|
|
649 | dnl> AC_FUNC_VPRINTF |
|
|
650 | |
|
|
651 | AC_CHECK_FUNCS(unsetenv) |
621 | AC_CHECK_FUNCS(unsetenv) |
652 | |
622 | |
653 | UTMP_CHECK |
623 | UTMP_CHECK |
654 | |
624 | |
655 | dnl# -------------------------------------------------------------------------- |
625 | dnl# -------------------------------------------------------------------------- |
… | |
… | |
725 | dnl# now add and remove other stuff |
695 | dnl# now add and remove other stuff |
726 | dnl# -------------------------------------------------------------------------- |
696 | dnl# -------------------------------------------------------------------------- |
727 | if test x$support_xft = xyes; then |
697 | if test x$support_xft = xyes; then |
728 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
698 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
729 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
699 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
730 | LIBS="$LIBS `$PKG_CONFIG xft --libs`" |
700 | X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
731 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
701 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
732 | else |
702 | else |
733 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
703 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
734 | if test $XFT_CONFIG != no; then |
704 | if test $XFT_CONFIG != no; then |
735 | LIBS="$LIBS `$XFT_CONFIG --libs`" |
705 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
736 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
706 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
737 | fi |
707 | fi |
738 | fi |
708 | fi |
739 | |
709 | |
|
|
710 | save_LIBS="$LIBS" |
|
|
711 | LIBS="$LIBS $X_LIBS" |
740 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
712 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
741 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
713 | AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) |
|
|
714 | LIBS="$save_LIBS" |
742 | |
715 | |
743 | if test x$support_xft = xyes; then |
716 | if test x$support_xft = xyes; then |
744 | AC_DEFINE(XFT, 1, Define to enable xft support) |
717 | AC_DEFINE(XFT, 1, Define to enable xft support) |
745 | fi |
718 | fi |
746 | fi |
719 | fi |
… | |
… | |
900 | RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) |
873 | RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) |
901 | RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) |
874 | RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) |
902 | RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) |
875 | RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) |
903 | RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) |
876 | RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) |
904 | RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) |
877 | RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) |
905 | RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch) |
|
|
906 | RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) |
878 | RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) |
907 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
879 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
908 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
880 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
909 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
881 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
910 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
882 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |