… | |
… | |
11 | |
11 | |
12 | dnl RXVT version |
12 | dnl RXVT version |
13 | changequote(, )dnl |
13 | changequote(, )dnl |
14 | VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
14 | VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
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` |
|
|
17 | changequote([, ])dnl |
16 | changequote([, ])dnl |
18 | AC_SUBST(VERSION)dnl |
17 | AC_SUBST(VERSION)dnl |
19 | AC_SUBST(DATE)dnl |
18 | AC_SUBST(DATE)dnl |
20 | AC_SUBST(LSMDATE)dnl |
|
|
21 | AC_SUBST(LIBVERSION)dnl |
|
|
22 | |
19 | |
23 | echo "" |
20 | echo "" |
24 | echo "configuring for rxvt $VERSION" |
21 | echo "configuring for rxvt $VERSION" |
25 | echo "" |
22 | echo "" |
26 | |
23 | |
27 | orig_CXXFLAGS="$CXXFLAGS" |
24 | orig_CXXFLAGS="$CXXFLAGS" |
28 | |
25 | |
29 | dnl# Checks for programs. |
26 | dnl# Checks for programs. |
30 | dnl AC_MAKE_SET |
|
|
31 | |
|
|
32 | AC_PROG_CC |
27 | AC_PROG_CC |
33 | AC_PROG_CXX |
28 | AC_PROG_CXX |
34 | AC_PROG_CPP |
29 | AC_PROG_CPP |
35 | AC_PROG_INSTALL |
30 | AC_PROG_INSTALL |
36 | |
31 | |
37 | AC_AIX |
32 | AC_AIX |
|
|
33 | AC_GNU_SOURCE |
38 | AC_ISC_POSIX |
34 | AC_ISC_POSIX |
39 | AC_LANG(C++) |
35 | AC_LANG(C++) |
40 | |
36 | |
41 | dnl check wether we can link with gcc -lsupc++ |
37 | dnl check whether we can link with gcc -lsupc++ |
42 | if test x$GCC = xyes && test x$GXX = xyes; then |
38 | if test x$GCC = xyes && test x$GXX = xyes; then |
43 | dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it |
39 | dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it |
44 | AC_MSG_CHECKING([for working libsupc++]) |
40 | AC_MSG_CHECKING([for working libsupc++]) |
45 | save_CXX="$CXX" |
41 | save_CXX="$CXX" |
46 | save_LIBS="$LIBS" |
42 | save_LIBS="$LIBS" |
… | |
… | |
71 | CXXFLAGS="-O" |
67 | CXXFLAGS="-O" |
72 | fi |
68 | fi |
73 | CFLAGS="$CXXFLAGS" |
69 | CFLAGS="$CXXFLAGS" |
74 | fi |
70 | fi |
75 | |
71 | |
76 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
|
|
77 | |
|
|
78 | case $host in |
72 | case $host in |
79 | *-*-solaris* ) |
73 | *-*-solaris* ) |
80 | AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) |
74 | AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) |
81 | ;; |
75 | ;; |
82 | esac |
76 | esac |
83 | |
77 | |
84 | dnl if test x$GXX = xyes; then |
|
|
85 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
|
|
86 | dnl fi |
|
|
87 | |
|
|
88 | dnl# FreeBSD needs to link libxpg4 |
78 | dnl# FreeBSD needs to link libxpg4 |
89 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
79 | AC_SEARCH_LIBS(setlocale, xpg4) |
90 | |
80 | |
91 | dnl# solaris needs to link libnsl and socket |
81 | dnl# solaris needs to link libnsl and socket |
92 | AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) |
82 | AC_SEARCH_LIBS(gethostbyname, nsl) |
93 | AC_CHECK_FUNC(socket, [], [AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])]) |
83 | AC_SEARCH_LIBS(socket, socket) |
94 | |
|
|
95 | dnl AC_ENABLE_SHARED(no)dnl# libtool |
|
|
96 | dnl AC_ENABLE_STATIC(yes)dnl# libtool |
|
|
97 | dnl AC_PROG_LIBTOOL()dnl# libtool |
|
|
98 | |
84 | |
99 | support_frills=yes |
85 | support_frills=yes |
100 | support_inheritpixmap=yes |
86 | support_inheritpixmap=yes |
101 | support_fading=yes |
87 | support_fading=yes |
102 | support_keepscrolling=yes |
88 | support_keepscrolling=yes |
… | |
… | |
106 | support_text_blink=yes |
92 | support_text_blink=yes |
107 | support_pointer_blank=yes |
93 | support_pointer_blank=yes |
108 | support_scroll_rxvt=yes |
94 | support_scroll_rxvt=yes |
109 | support_scroll_next=yes |
95 | support_scroll_next=yes |
110 | support_scroll_xterm=yes |
96 | support_scroll_xterm=yes |
111 | support_scroll_plain=yes |
|
|
112 | support_xim=yes |
97 | support_xim=yes |
113 | support_afterimage=yes |
98 | support_afterimage=yes |
114 | support_afterstep=yes |
99 | support_afterstep=yes |
115 | support_xft=yes |
100 | support_xft=yes |
116 | support_unicode3=no |
101 | support_unicode3=no |
… | |
… | |
123 | |
108 | |
124 | dnl# -------------------------------------------------------------------------- |
109 | dnl# -------------------------------------------------------------------------- |
125 | dnl# CHECKING COMMAND LINE OPTIONS |
110 | dnl# CHECKING COMMAND LINE OPTIONS |
126 | dnl# -------------------------------------------------------------------------- |
111 | dnl# -------------------------------------------------------------------------- |
127 | |
112 | |
128 | if test "x$enable_shared" = xyes; then |
|
|
129 | AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
|
|
130 | INSTALL_LIBRXVT=yes |
|
|
131 | fi |
|
|
132 | AC_SUBST(INSTALL_LIBRXVT) |
|
|
133 | |
|
|
134 | AC_ARG_ENABLE(everything, |
113 | AC_ARG_ENABLE(everything, |
135 | [ --enable-everything enable standard non-multichoice features |
114 | [ --enable-everything enable standard non-multichoice features |
136 | NOTE: this option is order dependent], |
115 | NOTE: this option is order dependent], |
137 | [ |
116 | [ |
138 | if test x$enableval = xno; then |
117 | if test x$enableval = xno; then |
139 | support_frills=no |
118 | support_frills=no |
140 | support_inheritpixmap=no |
119 | support_inheritpixmap=no |
141 | support_fading=no |
120 | support_fading=no |
… | |
… | |
147 | support_text_blink=no |
126 | support_text_blink=no |
148 | support_pointer_blank=no |
127 | support_pointer_blank=no |
149 | support_scroll_rxvt=no |
128 | support_scroll_rxvt=no |
150 | support_scroll_next=no |
129 | support_scroll_next=no |
151 | support_scroll_xterm=no |
130 | support_scroll_xterm=no |
152 | support_scroll_plain=no |
|
|
153 | support_utmp=no |
131 | support_utmp=no |
154 | support_wtmp=no |
132 | support_wtmp=no |
155 | support_xim=no |
133 | support_xim=no |
156 | support_afterimage=no |
134 | support_afterimage=no |
157 | support_afterstep=no |
135 | support_afterstep=no |
… | |
… | |
176 | support_text_blink=yes |
154 | support_text_blink=yes |
177 | support_pointer_blank=yes |
155 | support_pointer_blank=yes |
178 | support_scroll_rxvt=yes |
156 | support_scroll_rxvt=yes |
179 | support_scroll_next=yes |
157 | support_scroll_next=yes |
180 | support_scroll_xterm=yes |
158 | support_scroll_xterm=yes |
181 | support_scroll_plain=yes |
|
|
182 | support_utmp=yes |
159 | support_utmp=yes |
183 | support_wtmp=yes |
160 | support_wtmp=yes |
184 | support_xim=yes |
161 | support_xim=yes |
185 | support_afterimage=yes |
162 | support_afterimage=yes |
186 | support_afterstep=yes |
163 | support_afterstep=yes |
… | |
… | |
193 | support_perl=yes |
170 | support_perl=yes |
194 | codesets=all |
171 | codesets=all |
195 | fi |
172 | fi |
196 | ]) |
173 | ]) |
197 | |
174 | |
|
|
175 | ASSERTIONS=no |
|
|
176 | AC_ARG_ENABLE(assert, |
|
|
177 | [ --enable-assert enable assertions], |
|
|
178 | [if test x$enableval = xyes; then |
|
|
179 | ASSERTIONS=yes |
|
|
180 | fi]) |
|
|
181 | if test x$ASSERTIONS = xno; then |
|
|
182 | AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging)) |
|
|
183 | fi |
|
|
184 | |
198 | WARNINGS=no |
185 | WARNINGS=no |
199 | AC_ARG_ENABLE(warnings, |
186 | AC_ARG_ENABLE(warnings, |
200 | [ --enable-warnings turn on g++ warnings], |
187 | [ --enable-warnings turn on g++ warnings], |
201 | [if test x$enableval = xyes; then |
188 | [if test x$enableval = xyes; then |
202 | WARNINGS=yes |
189 | WARNINGS=yes |
… | |
… | |
209 | else |
196 | else |
210 | CXXFLAGS="$CXXFLAGS -w" |
197 | CXXFLAGS="$CXXFLAGS -w" |
211 | fi |
198 | fi |
212 | fi |
199 | fi |
213 | |
200 | |
|
|
201 | support_256_color=no |
|
|
202 | AC_ARG_ENABLE(256-color, |
|
|
203 | [ --enable-256-color enable 256-color support], |
|
|
204 | [if test x$enableval = xyes; then |
|
|
205 | support_256_color=yes |
|
|
206 | fi]) |
|
|
207 | if test x$support_256_color = xyes; then |
|
|
208 | AC_DEFINE(USE_256_COLORS, 1, Define if you want 256-color support) |
|
|
209 | fi |
|
|
210 | |
214 | AC_ARG_ENABLE(unicode3, |
211 | AC_ARG_ENABLE(unicode3, |
215 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
212 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
216 | [if test x$enableval = xyes -o x$enableval = xno; then |
213 | [if test x$enableval = xyes -o x$enableval = xno; then |
217 | support_unicode3=$enableval |
214 | support_unicode3=$enableval |
218 | fi]) |
215 | fi]) |
… | |
… | |
234 | [if test x$enableval = xyes -o x$enableval = xno; then |
231 | [if test x$enableval = xyes -o x$enableval = xno; then |
235 | support_styles=$enableval |
232 | support_styles=$enableval |
236 | fi]) |
233 | fi]) |
237 | |
234 | |
238 | AC_ARG_ENABLE(afterimage, |
235 | AC_ARG_ENABLE(afterimage, |
239 | [ --enable-afterimage enable integration with libAfterImage for background images], |
236 | [ --enable-afterimage enable integration with libAfterImage for background images], |
240 | [if test x$enableval = xyes -o x$enableval = xno; then |
237 | [if test x$enableval = xyes -o x$enableval = xno; then |
241 | support_afterimage=$enableval |
238 | support_afterimage=$enableval |
242 | fi]) |
239 | fi]) |
243 | |
240 | |
244 | AC_ARG_WITH(afterimage_config, |
241 | AC_ARG_WITH(afterimage_config, |
… | |
… | |
279 | |
276 | |
280 | AC_ARG_ENABLE(xterm-scroll, |
277 | AC_ARG_ENABLE(xterm-scroll, |
281 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
278 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
282 | [if test x$enableval = xyes -o x$enableval = xno; then |
279 | [if test x$enableval = xyes -o x$enableval = xno; then |
283 | support_scroll_xterm=$enableval |
280 | support_scroll_xterm=$enableval |
284 | fi]) |
|
|
285 | |
|
|
286 | AC_ARG_ENABLE(plain-scroll, |
|
|
287 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
288 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
289 | support_scroll_plain=$enableval |
|
|
290 | fi]) |
281 | fi]) |
291 | |
282 | |
292 | AC_ARG_ENABLE(perl, |
283 | AC_ARG_ENABLE(perl, |
293 | [ --enable-perl enable embedded perl interpreter], |
284 | [ --enable-perl enable embedded perl interpreter], |
294 | [if test x$enableval = xyes -o x$enableval = xno; then |
285 | [if test x$enableval = xyes -o x$enableval = xno; then |
… | |
… | |
416 | [if test x$enableval = xyes -o x$enableval = xno; then |
407 | [if test x$enableval = xyes -o x$enableval = xno; then |
417 | support_text_blink=$enableval |
408 | support_text_blink=$enableval |
418 | fi]) |
409 | fi]) |
419 | |
410 | |
420 | AC_ARG_ENABLE(pointer-blank, |
411 | AC_ARG_ENABLE(pointer-blank, |
421 | [ --enable-pointer-blank enable pointer blank when typing or inactive pointer], |
412 | [ --enable-pointer-blank enable pointer blanking when typing or inactive], |
422 | [if test x$enableval = xyes -o x$enableval = xno; then |
413 | [if test x$enableval = xyes -o x$enableval = xno; then |
423 | support_pointer_blank=$enableval |
414 | support_pointer_blank=$enableval |
424 | fi]) |
415 | fi]) |
425 | |
416 | |
426 | AC_ARG_WITH(term, |
417 | AC_ARG_WITH(term, |
… | |
… | |
482 | fi |
473 | fi |
483 | |
474 | |
484 | dnl# -------------------------------------------------------------------------- |
475 | dnl# -------------------------------------------------------------------------- |
485 | dnl# CHECKING FOR HEADER FILES |
476 | dnl# CHECKING FOR HEADER FILES |
486 | dnl# -------------------------------------------------------------------------- |
477 | dnl# -------------------------------------------------------------------------- |
487 | AC_HEADER_SYS_WAIT |
|
|
488 | AC_CHECK_HEADERS( \ |
478 | AC_CHECK_HEADERS( \ |
489 | assert.h \ |
|
|
490 | fcntl.h \ |
|
|
491 | stdarg.h \ |
|
|
492 | stdlib.h \ |
|
|
493 | string.h \ |
|
|
494 | termios.h \ |
|
|
495 | unistd.h \ |
|
|
496 | sys/byteorder.h \ |
479 | sys/byteorder.h \ |
497 | sys/ioctl.h \ |
480 | sys/ioctl.h \ |
498 | sys/select.h \ |
|
|
499 | sys/sockio.h \ |
481 | sys/sockio.h \ |
500 | sys/strredir.h \ |
482 | sys/strredir.h \ |
501 | sys/time.h \ |
|
|
502 | stdint.h \ |
483 | stdint.h \ |
503 | wchar.h \ |
484 | wchar.h \ |
504 | cwchar \ |
485 | cwchar \ |
505 | clocale \ |
|
|
506 | ) |
486 | ) |
507 | |
|
|
508 | AC_HEADER_TIME |
|
|
509 | |
|
|
510 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
|
|
511 | AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
|
|
512 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
|
|
513 | #include <sys/ioctl.h> |
|
|
514 | #ifdef HAVE_TERMIOS_H |
|
|
515 | #include <termios.h> |
|
|
516 | #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
|
|
517 | |
487 | |
518 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
488 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
519 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
489 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
520 | if test x$rxvt_cv_xpointer = xyes; then |
490 | if test x$rxvt_cv_xpointer = xyes; then |
521 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
491 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
522 | fi |
492 | fi |
523 | |
493 | |
524 | AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_xlib_illegal_access, |
494 | AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_cv_xlib_illegal_access, |
525 | [AC_COMPILE_IFELSE( |
495 | [AC_COMPILE_IFELSE( |
526 | [AC_LANG_PROGRAM([ |
496 | [AC_LANG_PROGRAM([ |
527 | #define XLIB_ILLEGAL_ACCESS |
497 | #define XLIB_ILLEGAL_ACCESS |
528 | #include <X11/Xlib.h> |
498 | #include <X11/Xlib.h> |
529 | ],[ |
499 | ],[ |
530 | Display *dpy; |
500 | Display *dpy; |
531 | dpy->xdefaults = (char *)0; |
501 | dpy->xdefaults = (char *)0; |
532 | ])], |
502 | ])], |
533 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
503 | [rxvt_cv_xlib_illegal_access=yes],[rxvt_cv_xlib_illegal_access=no] |
534 | )]) |
504 | )]) |
535 | if test x$rxvt_xlib_illegal_access = xyes; then |
505 | if test x$rxvt_cv_xlib_illegal_access = xyes; then |
536 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
506 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
537 | fi |
507 | fi |
538 | |
|
|
539 | AC_C_CONST |
|
|
540 | AC_C_INLINE |
|
|
541 | |
|
|
542 | dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow. |
|
|
543 | |
508 | |
544 | dnl# -------------------------------------------------------------------------- |
509 | dnl# -------------------------------------------------------------------------- |
545 | dnl# CHECKING FOR MISSING TYPEDEFS |
510 | dnl# CHECKING FOR MISSING TYPEDEFS |
546 | dnl# -------------------------------------------------------------------------- |
511 | dnl# -------------------------------------------------------------------------- |
547 | dnl# Missing typedefs and replacements |
512 | dnl# Missing typedefs and replacements |
548 | AC_TYPE_MODE_T |
513 | AC_TYPE_MODE_T |
549 | dnl> AC_CHECK_TYPE(umode_t, int) |
|
|
550 | dnl> AC_CHECK_TYPE(off_t, long) |
|
|
551 | AC_TYPE_PID_T |
514 | AC_TYPE_PID_T |
552 | AC_TYPE_UID_T |
515 | AC_TYPE_UID_T |
553 | |
516 | AC_TYPE_INT16_T |
554 | AC_CHECK_SIZEOF(short, 2) |
517 | AC_TYPE_UINT16_T |
555 | AC_CHECK_SIZEOF(int, 4) |
518 | AC_TYPE_INT32_T |
556 | dnl AC_CHECK_SIZEOF(long, 4) |
519 | AC_TYPE_UINT32_T |
557 | AC_CHECK_SIZEOF(long long, 8) |
|
|
558 | AC_CHECK_SIZEOF(int *, 4) |
|
|
559 | |
|
|
560 | dnl# see usage below |
|
|
561 | AC_DEFUN([RXVT_CHECK_SIZE], |
|
|
562 | [AC_CACHE_CHECK([for $2], $1, |
|
|
563 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
|
|
564 | if test "$ac_cv_sizeof_char" -ge $3; then |
|
|
565 | $1="$4 char" |
|
|
566 | else |
|
|
567 | if test "$ac_cv_sizeof_short" -ge $3; then |
|
|
568 | $1="$4 short" |
|
|
569 | else |
|
|
570 | if test "$ac_cv_sizeof_int" -ge $3; then |
|
|
571 | $1="$4 int" |
|
|
572 | else |
|
|
573 | if test "$ac_cv_sizeof_long" -ge $3; then |
|
|
574 | $1="$4 long" |
|
|
575 | else |
|
|
576 | if test "$ac_cv_sizeof_long_long" -ge $3; then |
|
|
577 | $1="$4 long long" |
|
|
578 | else |
|
|
579 | $1="$4 $5" # we _must_ have a (possibly wrong) default |
|
|
580 | fi |
|
|
581 | fi |
|
|
582 | fi |
|
|
583 | fi |
|
|
584 | fi])])] |
|
|
585 | if test x"$$1" != xyes; then |
|
|
586 | $6="typedef $$1 $2;" |
|
|
587 | else |
|
|
588 | if test x"$4" = x; then |
|
|
589 | $6="/* typedef $5 $2; */" |
|
|
590 | else |
|
|
591 | $6="/* typedef $4 $5 $2; */" |
|
|
592 | fi |
|
|
593 | fi dnl |
|
|
594 | ) |
|
|
595 | dnl# |
|
|
596 | dnl# Look for types the system may know about anyway. |
|
|
597 | dnl# |
|
|
598 | RXVT_CHECK_SIZE(rxvt_cv_int16_t, int16_t, 2, , short, rxvt_int16_typedef) |
|
|
599 | AC_SUBST(rxvt_int16_typedef) |
|
|
600 | RXVT_CHECK_SIZE(rxvt_cv_uint16_t, uint16_t, 2, unsigned, short, rxvt_uint16_typedef) |
|
|
601 | AC_SUBST(rxvt_uint16_typedef) |
|
|
602 | RXVT_CHECK_SIZE(rxvt_cv_int32_t, int32_t, 4, , int, rxvt_int32_typedef) |
|
|
603 | AC_SUBST(rxvt_int32_typedef) |
|
|
604 | RXVT_CHECK_SIZE(rxvt_cv_uint32_t, uint32_t, 4, unsigned, int, rxvt_uint32_typedef) |
|
|
605 | AC_SUBST(rxvt_uint32_typedef) |
|
|
606 | dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef) |
|
|
607 | dnl AC_SUBST(rxvt_int64_typedef) |
|
|
608 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
|
|
609 | dnl AC_SUBST(rxvt_uint64_typedef) |
|
|
610 | dnl# |
|
|
611 | dnl# Now look for another we use |
|
|
612 | dnl# |
|
|
613 | if test "$ac_cv_sizeof_int_p" -eq 8; then |
|
|
614 | rxvt_intp_define="#define intp_t int64_t" |
|
|
615 | rxvt_u_intp_define="#define u_intp_t u_int64_t" |
|
|
616 | else |
|
|
617 | if test "$ac_cv_sizeof_int_p" -eq 4; then |
|
|
618 | rxvt_intp_define="#define intp_t int32_t" |
|
|
619 | rxvt_u_intp_define="#define u_intp_t u_int32_t" |
|
|
620 | else |
|
|
621 | if test "$ac_cv_sizeof_int_p" -eq 2; then |
|
|
622 | rxvt_intp_define="#define intp_t int16_t" |
|
|
623 | rxvt_u_intp_define="#define u_intp_t u_int16_t" |
|
|
624 | else |
|
|
625 | rxvt_intp_define="#error set intp_t" |
|
|
626 | rxvt_u_intp_define="#error set u_intp_t" |
|
|
627 | fi |
|
|
628 | fi |
|
|
629 | fi |
|
|
630 | AC_SUBST(rxvt_intp_define) |
|
|
631 | AC_SUBST(rxvt_u_intp_define) |
|
|
632 | |
520 | |
633 | dnl# -------------------------------------------------------------------------- |
521 | dnl# -------------------------------------------------------------------------- |
634 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
522 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
635 | dnl# -------------------------------------------------------------------------- |
523 | dnl# -------------------------------------------------------------------------- |
636 | AC_TYPE_SIGNAL |
|
|
637 | dnl> AC_FUNC_VPRINTF |
|
|
638 | |
|
|
639 | AC_CHECK_FUNCS(unsetenv) |
524 | AC_CHECK_FUNCS(unsetenv) |
640 | |
525 | |
641 | UTMP_CHECK |
526 | UTMP_CHECK |
642 | |
527 | |
643 | dnl# -------------------------------------------------------------------------- |
528 | dnl# -------------------------------------------------------------------------- |
… | |
… | |
662 | exit (1);}]])],[dnl |
547 | exit (1);}]])],[dnl |
663 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
548 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
664 | :])]) |
549 | :])]) |
665 | if test x$rxvt_cv_func_xlocale = xyes; then |
550 | if test x$rxvt_cv_func_xlocale = xyes; then |
666 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
551 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
667 | AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, |
552 | AC_CACHE_CHECK(for broken XIM callback, rxvt_cv_broken_ximcb, |
668 | [AC_COMPILE_IFELSE([ |
553 | [AC_COMPILE_IFELSE([ |
669 | #include <X11/Xlib.h> |
554 | #include <X11/Xlib.h> |
670 | |
555 | |
671 | void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); |
556 | void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); |
672 | |
557 | |
673 | void f() { |
558 | void f() { |
674 | XIMCallback cb; |
559 | XIMCallback cb; |
675 | cb.callback = im_destroy_cb; |
560 | cb.callback = im_destroy_cb; |
676 | } |
561 | } |
677 | ],rxvt_broken_ximcb=yes,rxvt_broken_ximcb=no)]) |
562 | ],rxvt_cv_broken_ximcb=yes,rxvt_cv_broken_ximcb=no)]) |
678 | |
563 | |
679 | if test x$rxvt_broken_ximcb = xyes; then |
564 | if test x$rxvt_cv_broken_ximcb = xyes; then |
680 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
565 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
681 | fi |
566 | fi |
682 | fi |
567 | fi |
683 | fi |
568 | fi |
684 | |
569 | |
… | |
… | |
772 | |
657 | |
773 | dnl if test x$support_afterstep = xyes; then |
658 | dnl if test x$support_afterstep = xyes; then |
774 | dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) |
659 | dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) |
775 | dnl fi |
660 | dnl fi |
776 | |
661 | |
|
|
662 | scrolltypes=plain |
|
|
663 | AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) |
|
|
664 | |
777 | if test x$support_scroll_rxvt = xyes; then |
665 | if test x$support_scroll_rxvt = xyes; then |
778 | AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) |
666 | AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) |
779 | scrolltypes="rxvt" |
667 | scrolltypes="$scrolltypes rxvt" |
780 | fi |
668 | fi |
781 | if test x$support_scroll_next = xyes; then |
669 | if test x$support_scroll_next = xyes; then |
782 | AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) |
670 | AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) |
783 | scrolltypes="$scrolltypes next" |
671 | scrolltypes="$scrolltypes next" |
784 | fi |
672 | fi |
785 | if test x$support_scroll_xterm = xyes; then |
673 | if test x$support_scroll_xterm = xyes; then |
786 | AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) |
674 | AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) |
787 | scrolltypes="$scrolltypes xterm" |
675 | scrolltypes="$scrolltypes xterm" |
788 | fi |
|
|
789 | if test x$support_scroll_plain = xyes; then |
|
|
790 | AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) |
|
|
791 | scrolltypes="$scrolltypes plain" |
|
|
792 | fi |
676 | fi |
793 | if test x$support_pointer_blank = xyes; then |
677 | if test x$support_pointer_blank = xyes; then |
794 | AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) |
678 | AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) |
795 | fi |
679 | fi |
796 | if test x$support_text_blink = xyes; then |
680 | if test x$support_text_blink = xyes; then |
… | |
… | |
827 | |
711 | |
828 | save_CXXFLAGS="$CXXFLAGS" |
712 | save_CXXFLAGS="$CXXFLAGS" |
829 | save_LIBS="$LIBS" |
713 | save_LIBS="$LIBS" |
830 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
714 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
831 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
715 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
832 | AC_TRY_LINK([ |
716 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
833 | #include <EXTERN.h> |
717 | #include <EXTERN.h> |
834 | #include <perl.h> |
718 | #include <perl.h> |
835 | #include <XSUB.h> |
719 | #include <XSUB.h> |
836 | ],[ |
720 | ]], [[ |
837 | PerlInterpreter *perl = perl_alloc (); |
721 | PerlInterpreter *perl = perl_alloc (); |
838 | ],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
722 | ]])],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
839 | CXXFLAGS="$save_CXXFLAGS" |
723 | CXXFLAGS="$save_CXXFLAGS" |
840 | LIBS="$save_LIBS" |
724 | LIBS="$save_LIBS" |
841 | |
725 | |
842 | if test x$rxvt_perl_link = xyes; then |
726 | if test x$rxvt_perl_link = xyes; then |
843 | AC_MSG_RESULT(ok) |
727 | AC_MSG_RESULT(ok) |
… | |
… | |
859 | AC_SUBST(PERLPRIVLIBEXP) |
743 | AC_SUBST(PERLPRIVLIBEXP) |
860 | AC_SUBST(PERL) |
744 | AC_SUBST(PERL) |
861 | AC_SUBST(IF_PERL) |
745 | AC_SUBST(IF_PERL) |
862 | AC_SUBST(PERL_O) |
746 | AC_SUBST(PERL_O) |
863 | |
747 | |
864 | AC_SUBST(CFLAGS) |
|
|
865 | AC_SUBST(CPPFLAGS) |
|
|
866 | AC_SUBST(LDFLAGS) |
|
|
867 | AC_SUBST(X_CFLAGS) |
|
|
868 | |
748 | |
869 | dnl# Attack the libs |
749 | dnl# Attack the libs |
870 | AC_SUBST(LIBS) |
|
|
871 | AC_SUBST(X_LIBS) |
|
|
872 | AC_SUBST(X_EXTRA_LIBS) |
|
|
873 | |
750 | |
874 | AC_SUBST(AFTERIMAGE_CFLAGS) |
751 | AC_SUBST(AFTERIMAGE_CFLAGS) |
875 | AC_SUBST(AFTERIMAGE_LIBS) |
752 | AC_SUBST(AFTERIMAGE_LIBS) |
876 | |
753 | |
877 | AC_ARG_PROGRAM |
754 | AC_ARG_PROGRAM |
878 | |
|
|
879 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
|
|
880 | |
|
|
881 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
|
|
882 | AC_DEFUN([RXVT_DEFINE_TO_INCLUDE], dnl |
|
|
883 | [if test "$$3" = "$4" -o "$$5" = "$6"; then |
|
|
884 | $1="#include <$2>" |
|
|
885 | else |
|
|
886 | $1="/* #include <$2> */" |
|
|
887 | fi dnl |
|
|
888 | AC_SUBST($1)]) |
|
|
889 | |
|
|
890 | RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) |
|
|
891 | RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) |
|
|
892 | RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) |
|
|
893 | RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) |
|
|
894 | RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) |
|
|
895 | RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) |
|
|
896 | RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch) |
|
|
897 | RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) |
|
|
898 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
|
|
899 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
|
|
900 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
|
|
901 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
|
|
902 | RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
|
|
903 | |
755 | |
904 | AC_CONFIG_FILES([Makefile \ |
756 | AC_CONFIG_FILES([Makefile \ |
905 | doc/Makefile \ |
757 | doc/Makefile \ |
906 | src/Makefile \ |
758 | src/Makefile \ |
907 | src/rxvtlib.h \ |
|
|
908 | ]) |
759 | ]) |
909 | AC_OUTPUT |
760 | AC_OUTPUT |
910 | |
761 | |
911 | echo "Configuration: |
762 | echo "Configuration: |
912 | |
763 | |