… | |
… | |
62 | dnl# -------------------------------------------------------------------------- |
62 | dnl# -------------------------------------------------------------------------- |
63 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
63 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
64 | dnl# |
64 | dnl# |
65 | if test -z "$orig_CXXFLAGS"; then |
65 | if test -z "$orig_CXXFLAGS"; then |
66 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
66 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
67 | CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" |
67 | CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" |
68 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
68 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
69 | else |
69 | else |
70 | CXXFLAGS="-O" |
70 | CXXFLAGS="-O" |
71 | fi |
71 | fi |
72 | CFLAGS="$CXXFLAGS" |
72 | CFLAGS="$CXXFLAGS" |
… | |
… | |
193 | support_perl=yes |
193 | support_perl=yes |
194 | codesets=all |
194 | codesets=all |
195 | fi |
195 | fi |
196 | ]) |
196 | ]) |
197 | |
197 | |
|
|
198 | WARNINGS=no |
|
|
199 | AC_ARG_ENABLE(warnings, |
|
|
200 | [ --enable-warnings turn on g++ warnings], |
|
|
201 | [if test x$enableval = xyes; then |
|
|
202 | WARNINGS=yes |
|
|
203 | fi]) |
|
|
204 | if test x$GXX = xyes; then |
|
|
205 | if test $WARNINGS = yes; then |
|
|
206 | save_CXXFLAGS="$CXXFLAGS" |
|
|
207 | CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" |
|
|
208 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
|
|
209 | else |
|
|
210 | CXXFLAGS="$CXXFLAGS -w" |
|
|
211 | fi |
|
|
212 | fi |
|
|
213 | |
198 | AC_ARG_ENABLE(unicode3, |
214 | AC_ARG_ENABLE(unicode3, |
199 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
215 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
200 | [if test x$enableval = xyes -o x$enableval = xno; then |
216 | [if test x$enableval = xyes -o x$enableval = xno; then |
201 | support_unicode3=$enableval |
217 | support_unicode3=$enableval |
202 | fi]) |
218 | fi]) |
… | |
… | |
278 | [if test x$enableval = xyes -o x$enableval = xno; then |
294 | [if test x$enableval = xyes -o x$enableval = xno; then |
279 | support_scroll_plain=$enableval |
295 | support_scroll_plain=$enableval |
280 | fi]) |
296 | fi]) |
281 | |
297 | |
282 | AC_ARG_WITH(codesets, |
298 | AC_ARG_WITH(codesets, |
283 | [ --with-codesets=NAME,.. compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
299 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
284 | [codesets="$withval"]) |
300 | [codesets="$withval"]) |
285 | |
301 | |
286 | AC_ARG_ENABLE(xim, |
302 | AC_ARG_ENABLE(xim, |
287 | [ --enable-xim XIM (X Input Method) protocol support], |
303 | [ --enable-xim XIM (X Input Method) protocol support], |
288 | [if test x$enableval = xyes -o x$enableval = xno; then |
304 | [if test x$enableval = xyes -o x$enableval = xno; then |
… | |
… | |
313 | support_8bitctrls=$enableval |
329 | support_8bitctrls=$enableval |
314 | fi]) |
330 | fi]) |
315 | |
331 | |
316 | RESFALLBACK=Rxvt |
332 | RESFALLBACK=Rxvt |
317 | AC_ARG_ENABLE(fallback, |
333 | AC_ARG_ENABLE(fallback, |
318 | [ --enable-fallback(=CLASS) fall back on CLASS resources in addition to URxvt ones (default: Rxvt)], |
334 | [ --enable-fallback@<:@=CLASS@:>@ fall back on CLASS resources in addition to URxvt ones (default: Rxvt)], |
319 | [ |
335 | [ |
320 | test x$enableval = xyes && enableval=Rxvt |
336 | test x$enableval = xyes && enableval=Rxvt |
321 | test x$enableval = xno && enableval= |
337 | test x$enableval = xno && enableval= |
322 | RESFALLBACK="$enableval" |
338 | RESFALLBACK="$enableval" |
323 | ]) |
339 | ]) |
… | |
… | |
382 | [if test x$enableval = xyes -o x$enableval = xno; then |
398 | [if test x$enableval = xyes -o x$enableval = xno; then |
383 | support_mousewheel=$enableval |
399 | support_mousewheel=$enableval |
384 | fi]) |
400 | fi]) |
385 | |
401 | |
386 | AC_ARG_ENABLE(slipwheeling, |
402 | AC_ARG_ENABLE(slipwheeling, |
387 | [ --enable-slipwheeling enable slip wheel scrolling (requires previous)], |
403 | [ --enable-slipwheeling enable slip wheel scrolling (requires --enable-mousewheel)], |
388 | [if test x$enableval = xyes -o x$enableval = xno; then |
404 | [if test x$enableval = xyes -o x$enableval = xno; then |
389 | support_mouseslipwheel=$enableval |
405 | support_mouseslipwheel=$enableval |
390 | fi]) |
406 | fi]) |
391 | |
407 | |
392 | AC_ARG_ENABLE(smart-resize, |
408 | AC_ARG_ENABLE(smart-resize, |
… | |
… | |
419 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
435 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
420 | fi]) |
436 | fi]) |
421 | |
437 | |
422 | dnl# -------------------------------------------------------------------------- |
438 | dnl# -------------------------------------------------------------------------- |
423 | |
439 | |
424 | AC_PATH_PROG(TIC, tic) |
440 | AC_PATH_PROG(TIC, tic, :) |
425 | |
441 | |
426 | dnl# need a neat way to detect SVR4 or its features |
442 | dnl# need a neat way to detect SVR4 or its features |
427 | dnl# in src/command.c we use these functions: |
443 | dnl# in src/command.c we use these functions: |
428 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
444 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
429 | dnl# - but are these also defined for other systems? |
445 | dnl# - but are these also defined for other systems? |
… | |
… | |
655 | |
671 | |
656 | dnl# -------------------------------------------------------------------------- |
672 | dnl# -------------------------------------------------------------------------- |
657 | dnl# -------------------------------------------------------------------------- |
673 | dnl# -------------------------------------------------------------------------- |
658 | |
674 | |
659 | dnl# this is a really hack test for some basic Xlocale stuff |
675 | dnl# this is a really hack test for some basic Xlocale stuff |
660 | ac_save_LIBS=$LIBS |
676 | save_LIBS=$LIBS |
661 | ac_save_CFLAGS=$CFLAGS |
677 | save_CFLAGS=$CFLAGS |
662 | CFLAGS="$CFLAGS $X_CFLAGS" |
678 | CFLAGS="$CFLAGS $X_CFLAGS" |
663 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
679 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
664 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
|
|
665 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
|
|
666 | #include <stdlib.h> |
|
|
667 | main() { |
|
|
668 | char *p; |
|
|
669 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
|
|
670 | exit (XSupportsLocale() ? 0 : 1); |
|
|
671 | else |
|
|
672 | exit (1);}]])],[dnl |
|
|
673 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
|
|
674 | :])]) |
|
|
675 | if test x$support_xim = xyes; then |
680 | if test x$support_xim = xyes; then |
|
|
681 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
|
|
682 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
|
|
683 | #include <stdlib.h> |
|
|
684 | main() { |
|
|
685 | char *p; |
|
|
686 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
|
|
687 | exit (XSupportsLocale() ? 0 : 1); |
|
|
688 | else |
|
|
689 | exit (1);}]])],[dnl |
|
|
690 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
|
|
691 | :])]) |
676 | if test x$rxvt_cv_func_xlocale = xyes; then |
692 | if test x$rxvt_cv_func_xlocale = xyes; then |
677 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
693 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
|
|
694 | AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, |
|
|
695 | [AC_COMPILE_IFELSE([ |
|
|
696 | #include <X11/Xlib.h> |
|
|
697 | |
|
|
698 | void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); |
|
|
699 | |
|
|
700 | void f() { |
|
|
701 | XIMCallback cb; |
|
|
702 | cb.callback = im_destroy_cb; |
|
|
703 | } |
|
|
704 | ],rxvt_broken_ximcb=yes,rxvt_broken_ximcb=no)]) |
|
|
705 | |
|
|
706 | if test x$rxvt_broken_ximcb = xyes; then |
|
|
707 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
|
|
708 | fi |
678 | fi |
709 | fi |
679 | fi |
710 | fi |
680 | |
711 | |
681 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
712 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
682 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
713 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
683 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
714 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
684 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
715 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
685 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
716 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
686 | fi |
717 | fi |
687 | LIBS=$ac_save_LIBS |
718 | LIBS=$save_LIBS |
688 | CFLAGS=$ac_save_CFLAGS |
719 | CFLAGS=$save_CFLAGS |
689 | |
720 | |
690 | AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
721 | AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
691 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])]) |
722 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])]) |
692 | if test x$rxvt_cv_func_setlocale = xyes; then |
723 | if test x$rxvt_cv_func_setlocale = xyes; then |
693 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
724 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
… | |
… | |
698 | if test x$rxvt_cv_func_nl_langinfo = xyes; then |
729 | if test x$rxvt_cv_func_nl_langinfo = xyes; then |
699 | AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) |
730 | AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) |
700 | fi |
731 | fi |
701 | |
732 | |
702 | SCM_RIGHTS_CHECK |
733 | SCM_RIGHTS_CHECK |
703 | |
|
|
704 | AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, |
|
|
705 | [AC_COMPILE_IFELSE([ |
|
|
706 | #include <X11/Xlib.h> |
|
|
707 | |
|
|
708 | void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); |
|
|
709 | |
|
|
710 | void f() { |
|
|
711 | XIMCallback cb; |
|
|
712 | cb.callback = im_destroy_cb; |
|
|
713 | } |
|
|
714 | ],rxvt_broken_ximcb=yes,rxvt_broken_ximcb=no)]) |
|
|
715 | |
|
|
716 | if test x$rxvt_broken_ximcb = xyes; then |
|
|
717 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
|
|
718 | fi |
|
|
719 | |
734 | |
720 | PTY_CHECK |
735 | PTY_CHECK |
721 | |
736 | |
722 | TTY_GROUP_CHECK |
737 | TTY_GROUP_CHECK |
723 | |
738 | |
… | |
… | |
774 | if test x$support_mouseslipwheel = xyes; then |
789 | if test x$support_mouseslipwheel = xyes; then |
775 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
790 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
776 | fi |
791 | fi |
777 | if test x$support_afterimage = xyes; then |
792 | if test x$support_afterimage = xyes; then |
778 | AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing) |
793 | AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing) |
779 | AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libAfterImage) |
794 | AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps. Needs libAfterImage) |
780 | fi |
795 | fi |
781 | |
796 | |
782 | dnl if test x$support_afterstep = xyes; then |
797 | dnl if test x$support_afterstep = xyes; then |
783 | dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) |
798 | dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) |
784 | dnl fi |
799 | dnl fi |