… | |
… | |
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 |
20 | AC_SUBST(LSMDATE)dnl |
21 | AC_SUBST(LIBVERSION)dnl |
21 | AC_SUBST(LIBVERSION)dnl |
|
|
22 | |
22 | echo "" |
23 | echo "" |
23 | echo "configuring for rxvt $VERSION" |
24 | echo "configuring for rxvt $VERSION" |
24 | echo "" |
25 | echo "" |
25 | |
26 | |
26 | orig_CXXFLAGS="$CXXFLAGS" |
27 | orig_CXXFLAGS="$CXXFLAGS" |
… | |
… | |
62 | dnl# -------------------------------------------------------------------------- |
63 | dnl# -------------------------------------------------------------------------- |
63 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
64 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
64 | dnl# |
65 | dnl# |
65 | if test -z "$orig_CXXFLAGS"; then |
66 | if test -z "$orig_CXXFLAGS"; then |
66 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
67 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
67 | CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" |
68 | 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"]) |
69 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
69 | else |
70 | else |
70 | CXXFLAGS="-O" |
71 | CXXFLAGS="-O" |
71 | fi |
72 | fi |
72 | CFLAGS="$CXXFLAGS" |
73 | CFLAGS="$CXXFLAGS" |
… | |
… | |
193 | support_perl=yes |
194 | support_perl=yes |
194 | codesets=all |
195 | codesets=all |
195 | fi |
196 | fi |
196 | ]) |
197 | ]) |
197 | |
198 | |
|
|
199 | WARNINGS=no |
|
|
200 | AC_ARG_ENABLE(warnings, |
|
|
201 | [ --enable-warnings turn on g++ warnings], |
|
|
202 | [if test x$enableval = xyes; then |
|
|
203 | WARNINGS=yes |
|
|
204 | fi]) |
|
|
205 | if test x$GXX = xyes; then |
|
|
206 | if test $WARNINGS = yes; then |
|
|
207 | save_CXXFLAGS="$CXXFLAGS" |
|
|
208 | CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" |
|
|
209 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
|
|
210 | else |
|
|
211 | CXXFLAGS="$CXXFLAGS -w" |
|
|
212 | fi |
|
|
213 | fi |
|
|
214 | |
198 | AC_ARG_ENABLE(unicode3, |
215 | AC_ARG_ENABLE(unicode3, |
199 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
216 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
200 | [if test x$enableval = xyes -o x$enableval = xno; then |
217 | [if test x$enableval = xyes -o x$enableval = xno; then |
201 | support_unicode3=$enableval |
218 | support_unicode3=$enableval |
202 | fi]) |
219 | fi]) |
… | |
… | |
265 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
282 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
266 | [if test x$enableval = xyes -o x$enableval = xno; then |
283 | [if test x$enableval = xyes -o x$enableval = xno; then |
267 | support_scroll_xterm=$enableval |
284 | support_scroll_xterm=$enableval |
268 | fi]) |
285 | fi]) |
269 | |
286 | |
|
|
287 | AC_ARG_ENABLE(plain-scroll, |
|
|
288 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
289 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
290 | support_scroll_plain=$enableval |
|
|
291 | fi]) |
|
|
292 | |
270 | AC_ARG_ENABLE(perl, |
293 | AC_ARG_ENABLE(perl, |
271 | [ --enable-perl enable embedded perl interpreter], |
294 | [ --enable-perl enable embedded perl interpreter], |
272 | [if test x$enableval = xyes -o x$enableval = xno; then |
295 | [if test x$enableval = xyes -o x$enableval = xno; then |
273 | support_perl=$enableval |
296 | support_perl=$enableval |
274 | fi]) |
297 | fi]) |
275 | |
298 | |
276 | AC_ARG_ENABLE(plain-scroll, |
|
|
277 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
278 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
279 | support_scroll_plain=$enableval |
|
|
280 | fi]) |
|
|
281 | |
|
|
282 | AC_ARG_WITH(codesets, |
299 | AC_ARG_WITH(codesets, |
283 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
300 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
284 | [codesets="$withval"]) |
301 | [codesets="$withval"]) |
285 | |
302 | |
286 | AC_ARG_ENABLE(xim, |
303 | AC_ARG_ENABLE(xim, |
287 | [ --enable-xim XIM (X Input Method) protocol support], |
304 | [ --enable-xim XIM (X Input Method) protocol support], |
288 | [if test x$enableval = xyes -o x$enableval = xno; then |
305 | [if test x$enableval = xyes -o x$enableval = xno; then |
… | |
… | |
416 | AC_ARG_WITH(terminfo, |
433 | AC_ARG_WITH(terminfo, |
417 | [ --with-terminfo=PATH set the path to the terminfo tree to PATH], |
434 | [ --with-terminfo=PATH set the path to the terminfo tree to PATH], |
418 | [if test x$withval != x; then |
435 | [if test x$withval != x; then |
419 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
436 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
420 | fi]) |
437 | fi]) |
|
|
438 | |
|
|
439 | dnl# -------------------------------------------------------------------------- |
|
|
440 | |
|
|
441 | LIBEV_M4_AVOID_LIBRT=1 |
|
|
442 | m4_include([libev/libev.m4]) |
421 | |
443 | |
422 | dnl# -------------------------------------------------------------------------- |
444 | dnl# -------------------------------------------------------------------------- |
423 | |
445 | |
424 | AC_PATH_PROG(TIC, tic, :) |
446 | AC_PATH_PROG(TIC, tic, :) |
425 | |
447 | |
… | |
… | |
626 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
648 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
627 | dnl# -------------------------------------------------------------------------- |
649 | dnl# -------------------------------------------------------------------------- |
628 | AC_TYPE_SIGNAL |
650 | AC_TYPE_SIGNAL |
629 | dnl> AC_FUNC_VPRINTF |
651 | dnl> AC_FUNC_VPRINTF |
630 | |
652 | |
631 | AC_CHECK_FUNCS( \ |
653 | AC_CHECK_FUNCS(unsetenv) |
632 | unsetenv \ |
|
|
633 | setutent \ |
|
|
634 | on_exit \ |
|
|
635 | ) |
|
|
636 | |
654 | |
637 | UTMP_CHECK |
655 | UTMP_CHECK |
638 | |
656 | |
639 | dnl# -------------------------------------------------------------------------- |
657 | dnl# -------------------------------------------------------------------------- |
640 | |
658 | |
641 | dnl# find ttys/ttytab |
|
|
642 | AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab, |
|
|
643 | [for ttys_file in dnl |
|
|
644 | /etc/ttys /etc/ttytab; |
|
|
645 | do |
|
|
646 | if test -f "$ttys_file" ; then |
|
|
647 | rxvt_cv_path_ttytab=$ttys_file |
|
|
648 | break |
|
|
649 | fi |
|
|
650 | done |
|
|
651 | ]) |
|
|
652 | if test x$rxvt_cv_path_ttytab != x; then |
|
|
653 | AC_DEFINE_UNQUOTED(TTYTAB_FILENAME, "$rxvt_cv_path_ttytab", Define location of ttys/ttytab) |
|
|
654 | fi |
|
|
655 | |
|
|
656 | dnl# -------------------------------------------------------------------------- |
659 | dnl# -------------------------------------------------------------------------- |
657 | dnl# -------------------------------------------------------------------------- |
660 | dnl# -------------------------------------------------------------------------- |
658 | |
661 | |
659 | dnl# this is a really hack test for some basic Xlocale stuff |
662 | dnl# this is a really hack test for some basic Xlocale stuff |
660 | ac_save_LIBS=$LIBS |
663 | save_LIBS=$LIBS |
661 | ac_save_CFLAGS=$CFLAGS |
664 | save_CFLAGS=$CFLAGS |
662 | CFLAGS="$CFLAGS $X_CFLAGS" |
665 | CFLAGS="$CFLAGS $X_CFLAGS" |
663 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
666 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
664 | if test x$support_xim = xyes; then |
667 | if test x$support_xim = xyes; then |
665 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
668 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
666 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
669 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
… | |
… | |
697 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
700 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
698 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
701 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
699 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
702 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
700 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
703 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
701 | fi |
704 | fi |
702 | LIBS=$ac_save_LIBS |
705 | LIBS=$save_LIBS |
703 | CFLAGS=$ac_save_CFLAGS |
706 | CFLAGS=$save_CFLAGS |
704 | |
707 | |
705 | AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
708 | AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
706 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])]) |
709 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])]) |
707 | if test x$rxvt_cv_func_setlocale = xyes; then |
710 | if test x$rxvt_cv_func_setlocale = xyes; then |
708 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
711 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
… | |
… | |
724 | dnl# now add and remove other stuff |
727 | dnl# now add and remove other stuff |
725 | dnl# -------------------------------------------------------------------------- |
728 | dnl# -------------------------------------------------------------------------- |
726 | if test x$support_xft = xyes; then |
729 | if test x$support_xft = xyes; then |
727 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
730 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
728 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
731 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
729 | LIBS="$LIBS `$PKG_CONFIG xft --libs`" |
732 | X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
730 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
733 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
731 | else |
734 | else |
732 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
735 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
733 | if test $XFT_CONFIG != no; then |
736 | if test $XFT_CONFIG != no; then |
734 | LIBS="$LIBS `$XFT_CONFIG --libs`" |
737 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
735 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
738 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
736 | fi |
739 | fi |
737 | fi |
740 | fi |
738 | |
741 | |
|
|
742 | save_LIBS="$LIBS" |
|
|
743 | LIBS="$LIBS $X_LIBS" |
739 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
744 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
740 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
745 | AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) |
|
|
746 | LIBS="$save_LIBS" |
741 | |
747 | |
742 | if test x$support_xft = xyes; then |
748 | if test x$support_xft = xyes; then |
743 | AC_DEFINE(XFT, 1, Define to enable xft support) |
749 | AC_DEFINE(XFT, 1, Define to enable xft support) |
744 | fi |
750 | fi |
745 | fi |
751 | fi |