… | |
… | |
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 | |
73 | |
75 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
|
|
76 | |
|
|
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]) |
288 | fi]) |
291 | |
289 | |
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]) |
|
|
297 | |
|
|
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"]) |
301 | |
293 | |
302 | AC_ARG_ENABLE(xim, |
294 | AC_ARG_ENABLE(xim, |
303 | [ --enable-xim XIM (X Input Method) protocol support], |
295 | [ --enable-xim XIM (X Input Method) protocol support], |
304 | [if test x$enableval = xyes -o x$enableval = xno; then |
296 | [if test x$enableval = xyes -o x$enableval = xno; then |
… | |
… | |
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 |
|
|
433 | m4_include([libev/libev.m4]) |
|
|
434 | |
|
|
435 | dnl# -------------------------------------------------------------------------- |
|
|
436 | |
440 | AC_PATH_PROG(TIC, tic, :) |
437 | 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 | |
438 | |
455 | AC_PATH_XTRA |
439 | AC_PATH_XTRA |
456 | |
440 | |
457 | AFTERIMAGE_CFLAGS= |
441 | AFTERIMAGE_CFLAGS= |
458 | AFTERIMAGE_LIBS= |
442 | AFTERIMAGE_LIBS= |
… | |
… | |
490 | fi |
474 | fi |
491 | |
475 | |
492 | dnl# -------------------------------------------------------------------------- |
476 | dnl# -------------------------------------------------------------------------- |
493 | dnl# CHECKING FOR HEADER FILES |
477 | dnl# CHECKING FOR HEADER FILES |
494 | dnl# -------------------------------------------------------------------------- |
478 | dnl# -------------------------------------------------------------------------- |
495 | AC_HEADER_SYS_WAIT |
|
|
496 | AC_CHECK_HEADERS( \ |
479 | AC_CHECK_HEADERS( \ |
497 | assert.h \ |
|
|
498 | fcntl.h \ |
|
|
499 | stdarg.h \ |
|
|
500 | stdlib.h \ |
|
|
501 | string.h \ |
|
|
502 | termios.h \ |
|
|
503 | unistd.h \ |
|
|
504 | sys/byteorder.h \ |
480 | sys/byteorder.h \ |
505 | sys/ioctl.h \ |
481 | sys/ioctl.h \ |
506 | sys/select.h \ |
|
|
507 | sys/sockio.h \ |
482 | sys/sockio.h \ |
508 | sys/strredir.h \ |
483 | sys/strredir.h \ |
509 | sys/time.h \ |
|
|
510 | stdint.h \ |
484 | stdint.h \ |
511 | wchar.h \ |
485 | wchar.h \ |
512 | cwchar \ |
486 | cwchar \ |
513 | clocale \ |
487 | clocale \ |
514 | ) |
488 | ) |
515 | |
489 | |
516 | AC_HEADER_TIME |
|
|
517 | |
|
|
518 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
490 | 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, |
491 | 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> |
492 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
521 | #include <sys/ioctl.h> |
493 | #include <sys/ioctl.h> |
522 | #ifdef HAVE_TERMIOS_H |
|
|
523 | #include <termios.h> |
494 | #include <termios.h> |
524 | #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
495 | ]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
525 | |
496 | |
526 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
497 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
527 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
498 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
528 | if test x$rxvt_cv_xpointer = xyes; then |
499 | if test x$rxvt_cv_xpointer = xyes; then |
529 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
500 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
… | |
… | |
542 | )]) |
513 | )]) |
543 | if test x$rxvt_xlib_illegal_access = xyes; then |
514 | if test x$rxvt_xlib_illegal_access = xyes; then |
544 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
515 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
545 | fi |
516 | fi |
546 | |
517 | |
547 | AC_C_CONST |
|
|
548 | AC_C_INLINE |
|
|
549 | |
|
|
550 | dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow. |
|
|
551 | |
|
|
552 | dnl# -------------------------------------------------------------------------- |
518 | dnl# -------------------------------------------------------------------------- |
553 | dnl# CHECKING FOR MISSING TYPEDEFS |
519 | dnl# CHECKING FOR MISSING TYPEDEFS |
554 | dnl# -------------------------------------------------------------------------- |
520 | dnl# -------------------------------------------------------------------------- |
555 | dnl# Missing typedefs and replacements |
521 | dnl# Missing typedefs and replacements |
556 | AC_TYPE_MODE_T |
522 | AC_TYPE_MODE_T |
557 | dnl> AC_CHECK_TYPE(umode_t, int) |
|
|
558 | dnl> AC_CHECK_TYPE(off_t, long) |
|
|
559 | AC_TYPE_PID_T |
523 | AC_TYPE_PID_T |
560 | AC_TYPE_UID_T |
524 | AC_TYPE_UID_T |
561 | |
525 | AC_TYPE_INT16_T |
562 | AC_CHECK_SIZEOF(short, 2) |
526 | AC_TYPE_UINT16_T |
563 | AC_CHECK_SIZEOF(int, 4) |
527 | AC_TYPE_INT32_T |
564 | dnl AC_CHECK_SIZEOF(long, 4) |
528 | AC_TYPE_UINT32_T |
565 | AC_CHECK_SIZEOF(long long, 8) |
|
|
566 | AC_CHECK_SIZEOF(int *, 4) |
|
|
567 | |
|
|
568 | dnl# see usage below |
|
|
569 | AC_DEFUN([RXVT_CHECK_SIZE], |
|
|
570 | [AC_CACHE_CHECK([for $2], $1, |
|
|
571 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
|
|
572 | if test "$ac_cv_sizeof_char" -ge $3; then |
|
|
573 | $1="$4 char" |
|
|
574 | else |
|
|
575 | if test "$ac_cv_sizeof_short" -ge $3; then |
|
|
576 | $1="$4 short" |
|
|
577 | else |
|
|
578 | if test "$ac_cv_sizeof_int" -ge $3; then |
|
|
579 | $1="$4 int" |
|
|
580 | else |
|
|
581 | if test "$ac_cv_sizeof_long" -ge $3; then |
|
|
582 | $1="$4 long" |
|
|
583 | else |
|
|
584 | if test "$ac_cv_sizeof_long_long" -ge $3; then |
|
|
585 | $1="$4 long long" |
|
|
586 | else |
|
|
587 | $1="$4 $5" # we _must_ have a (possibly wrong) default |
|
|
588 | fi |
|
|
589 | fi |
|
|
590 | fi |
|
|
591 | fi |
|
|
592 | fi])])] |
|
|
593 | if test x"$$1" != xyes; then |
|
|
594 | $6="typedef $$1 $2;" |
|
|
595 | else |
|
|
596 | if test x"$4" = x; then |
|
|
597 | $6="/* typedef $5 $2; */" |
|
|
598 | else |
|
|
599 | $6="/* typedef $4 $5 $2; */" |
|
|
600 | fi |
|
|
601 | fi dnl |
|
|
602 | ) |
|
|
603 | dnl# |
|
|
604 | dnl# Look for types the system may know about anyway. |
|
|
605 | dnl# |
|
|
606 | RXVT_CHECK_SIZE(rxvt_cv_int16_t, int16_t, 2, , short, rxvt_int16_typedef) |
|
|
607 | AC_SUBST(rxvt_int16_typedef) |
|
|
608 | RXVT_CHECK_SIZE(rxvt_cv_uint16_t, uint16_t, 2, unsigned, short, rxvt_uint16_typedef) |
|
|
609 | AC_SUBST(rxvt_uint16_typedef) |
|
|
610 | RXVT_CHECK_SIZE(rxvt_cv_int32_t, int32_t, 4, , int, rxvt_int32_typedef) |
|
|
611 | AC_SUBST(rxvt_int32_typedef) |
|
|
612 | RXVT_CHECK_SIZE(rxvt_cv_uint32_t, uint32_t, 4, unsigned, int, rxvt_uint32_typedef) |
|
|
613 | AC_SUBST(rxvt_uint32_typedef) |
|
|
614 | dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef) |
|
|
615 | dnl AC_SUBST(rxvt_int64_typedef) |
|
|
616 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
|
|
617 | dnl AC_SUBST(rxvt_uint64_typedef) |
|
|
618 | dnl# |
|
|
619 | dnl# Now look for another we use |
|
|
620 | dnl# |
|
|
621 | if test "$ac_cv_sizeof_int_p" -eq 8; then |
|
|
622 | rxvt_intp_define="#define intp_t int64_t" |
|
|
623 | rxvt_u_intp_define="#define u_intp_t u_int64_t" |
|
|
624 | else |
|
|
625 | if test "$ac_cv_sizeof_int_p" -eq 4; then |
|
|
626 | rxvt_intp_define="#define intp_t int32_t" |
|
|
627 | rxvt_u_intp_define="#define u_intp_t u_int32_t" |
|
|
628 | else |
|
|
629 | if test "$ac_cv_sizeof_int_p" -eq 2; then |
|
|
630 | rxvt_intp_define="#define intp_t int16_t" |
|
|
631 | rxvt_u_intp_define="#define u_intp_t u_int16_t" |
|
|
632 | else |
|
|
633 | rxvt_intp_define="#error set intp_t" |
|
|
634 | rxvt_u_intp_define="#error set u_intp_t" |
|
|
635 | fi |
|
|
636 | fi |
|
|
637 | fi |
|
|
638 | AC_SUBST(rxvt_intp_define) |
|
|
639 | AC_SUBST(rxvt_u_intp_define) |
|
|
640 | |
529 | |
641 | dnl# -------------------------------------------------------------------------- |
530 | dnl# -------------------------------------------------------------------------- |
642 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
531 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
643 | dnl# -------------------------------------------------------------------------- |
532 | dnl# -------------------------------------------------------------------------- |
644 | AC_TYPE_SIGNAL |
533 | AC_CHECK_FUNCS(unsetenv) |
645 | dnl> AC_FUNC_VPRINTF |
|
|
646 | |
|
|
647 | AC_CHECK_FUNCS( \ |
|
|
648 | unsetenv \ |
|
|
649 | setutent \ |
|
|
650 | on_exit \ |
|
|
651 | ) |
|
|
652 | |
534 | |
653 | UTMP_CHECK |
535 | UTMP_CHECK |
654 | |
536 | |
655 | dnl# -------------------------------------------------------------------------- |
537 | dnl# -------------------------------------------------------------------------- |
656 | |
538 | |
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 | |
|
|
672 | dnl# -------------------------------------------------------------------------- |
539 | dnl# -------------------------------------------------------------------------- |
673 | dnl# -------------------------------------------------------------------------- |
540 | dnl# -------------------------------------------------------------------------- |
674 | |
541 | |
675 | dnl# this is a really hack test for some basic Xlocale stuff |
542 | dnl# this is a really hack test for some basic Xlocale stuff |
676 | ac_save_LIBS=$LIBS |
543 | save_LIBS=$LIBS |
677 | ac_save_CFLAGS=$CFLAGS |
544 | save_CFLAGS=$CFLAGS |
678 | CFLAGS="$CFLAGS $X_CFLAGS" |
545 | CFLAGS="$CFLAGS $X_CFLAGS" |
679 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
546 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
680 | if test x$support_xim = xyes; then |
547 | if test x$support_xim = xyes; then |
681 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
548 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
682 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
549 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
… | |
… | |
713 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
580 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
714 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
581 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
715 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
582 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
716 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
583 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
717 | fi |
584 | fi |
718 | LIBS=$ac_save_LIBS |
585 | LIBS=$save_LIBS |
719 | CFLAGS=$ac_save_CFLAGS |
586 | CFLAGS=$save_CFLAGS |
720 | |
587 | |
721 | AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
588 | AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
722 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])]) |
589 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])]) |
723 | if test x$rxvt_cv_func_setlocale = xyes; then |
590 | if test x$rxvt_cv_func_setlocale = xyes; then |
724 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
591 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
… | |
… | |
740 | dnl# now add and remove other stuff |
607 | dnl# now add and remove other stuff |
741 | dnl# -------------------------------------------------------------------------- |
608 | dnl# -------------------------------------------------------------------------- |
742 | if test x$support_xft = xyes; then |
609 | if test x$support_xft = xyes; then |
743 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
610 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
744 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
611 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
745 | LIBS="$LIBS `$PKG_CONFIG xft --libs`" |
612 | X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
746 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
613 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
747 | else |
614 | else |
748 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
615 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
749 | if test $XFT_CONFIG != no; then |
616 | if test $XFT_CONFIG != no; then |
750 | LIBS="$LIBS `$XFT_CONFIG --libs`" |
617 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
751 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
618 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
752 | fi |
619 | fi |
753 | fi |
620 | fi |
754 | |
621 | |
|
|
622 | save_LIBS="$LIBS" |
|
|
623 | LIBS="$LIBS $X_LIBS" |
755 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
624 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
756 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
625 | AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) |
|
|
626 | LIBS="$save_LIBS" |
757 | |
627 | |
758 | if test x$support_xft = xyes; then |
628 | if test x$support_xft = xyes; then |
759 | AC_DEFINE(XFT, 1, Define to enable xft support) |
629 | AC_DEFINE(XFT, 1, Define to enable xft support) |
760 | fi |
630 | fi |
761 | fi |
631 | fi |
… | |
… | |
910 | $1="/* #include <$2> */" |
780 | $1="/* #include <$2> */" |
911 | fi dnl |
781 | fi dnl |
912 | AC_SUBST($1)]) |
782 | AC_SUBST($1)]) |
913 | |
783 | |
914 | RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) |
784 | RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) |
915 | RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) |
|
|
916 | RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) |
|
|
917 | RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) |
|
|
918 | RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) |
|
|
919 | RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) |
|
|
920 | RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch) |
|
|
921 | RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) |
|
|
922 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
785 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
923 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
|
|
924 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
786 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
925 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
|
|
926 | RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
|
|
927 | |
787 | |
928 | AC_CONFIG_FILES([Makefile \ |
788 | AC_CONFIG_FILES([Makefile \ |
929 | doc/Makefile \ |
789 | doc/Makefile \ |
930 | src/Makefile \ |
790 | src/Makefile \ |
931 | src/rxvtlib.h \ |
791 | src/rxvtlib.h \ |