… | |
… | |
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 |
19 | |
21 | AC_SUBST(LIBVERSION)dnl |
|
|
22 | echo "" |
20 | echo "" |
23 | echo "configuring for rxvt $VERSION" |
21 | echo "configuring for rxvt $VERSION" |
24 | echo "" |
22 | echo "" |
25 | |
23 | |
26 | orig_CXXFLAGS="$CXXFLAGS" |
24 | orig_CXXFLAGS="$CXXFLAGS" |
27 | |
25 | |
28 | dnl# Checks for programs. |
26 | dnl# Checks for programs. |
29 | dnl AC_MAKE_SET |
|
|
30 | |
|
|
31 | AC_PROG_CC |
27 | AC_PROG_CC |
32 | AC_PROG_CXX |
28 | AC_PROG_CXX |
33 | AC_PROG_CPP |
29 | AC_PROG_CPP |
34 | AC_PROG_INSTALL |
30 | AC_PROG_INSTALL |
35 | |
31 | |
36 | AC_AIX |
32 | AC_AIX |
|
|
33 | AC_GNU_SOURCE |
37 | AC_ISC_POSIX |
34 | AC_ISC_POSIX |
38 | AC_LANG(C++) |
35 | AC_LANG(C++) |
39 | |
36 | |
40 | dnl check wether we can link with gcc -lsupc++ |
37 | dnl check wether we can link with gcc -lsupc++ |
41 | if test x$GCC = xyes && test x$GXX = xyes; then |
38 | if test x$GCC = xyes && test x$GXX = xyes; then |
… | |
… | |
62 | dnl# -------------------------------------------------------------------------- |
59 | dnl# -------------------------------------------------------------------------- |
63 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
60 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
64 | dnl# |
61 | dnl# |
65 | if test -z "$orig_CXXFLAGS"; then |
62 | if test -z "$orig_CXXFLAGS"; then |
66 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
63 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
67 | CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" |
64 | 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"]) |
65 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
69 | else |
66 | else |
70 | CXXFLAGS="-O" |
67 | CXXFLAGS="-O" |
71 | fi |
68 | fi |
72 | CFLAGS="$CXXFLAGS" |
69 | CFLAGS="$CXXFLAGS" |
73 | fi |
70 | fi |
74 | |
71 | |
75 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
|
|
76 | |
|
|
77 | case $host in |
72 | case $host in |
78 | *-*-solaris* ) |
73 | *-*-solaris* ) |
79 | 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) |
80 | ;; |
75 | ;; |
81 | esac |
76 | esac |
82 | |
77 | |
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 | |
|
|
87 | dnl# FreeBSD needs to link libxpg4 |
78 | dnl# FreeBSD needs to link libxpg4 |
88 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
79 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
89 | |
80 | |
90 | dnl# solaris needs to link libnsl and socket |
81 | dnl# solaris needs to link libnsl and socket |
91 | AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) |
82 | AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) |
92 | AC_CHECK_FUNC(socket, [], [AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])]) |
83 | AC_CHECK_FUNC(socket, [], [AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])]) |
93 | |
|
|
94 | dnl AC_ENABLE_SHARED(no)dnl# libtool |
|
|
95 | dnl AC_ENABLE_STATIC(yes)dnl# libtool |
|
|
96 | dnl AC_PROG_LIBTOOL()dnl# libtool |
|
|
97 | |
84 | |
98 | support_frills=yes |
85 | support_frills=yes |
99 | support_inheritpixmap=yes |
86 | support_inheritpixmap=yes |
100 | support_fading=yes |
87 | support_fading=yes |
101 | support_keepscrolling=yes |
88 | support_keepscrolling=yes |
… | |
… | |
105 | support_text_blink=yes |
92 | support_text_blink=yes |
106 | support_pointer_blank=yes |
93 | support_pointer_blank=yes |
107 | support_scroll_rxvt=yes |
94 | support_scroll_rxvt=yes |
108 | support_scroll_next=yes |
95 | support_scroll_next=yes |
109 | support_scroll_xterm=yes |
96 | support_scroll_xterm=yes |
110 | support_scroll_plain=yes |
|
|
111 | support_xim=yes |
97 | support_xim=yes |
112 | support_afterimage=yes |
98 | support_afterimage=yes |
113 | support_afterstep=yes |
99 | support_afterstep=yes |
114 | support_xft=yes |
100 | support_xft=yes |
115 | support_unicode3=no |
101 | support_unicode3=no |
… | |
… | |
122 | |
108 | |
123 | dnl# -------------------------------------------------------------------------- |
109 | dnl# -------------------------------------------------------------------------- |
124 | dnl# CHECKING COMMAND LINE OPTIONS |
110 | dnl# CHECKING COMMAND LINE OPTIONS |
125 | dnl# -------------------------------------------------------------------------- |
111 | dnl# -------------------------------------------------------------------------- |
126 | |
112 | |
127 | if test "x$enable_shared" = xyes; then |
|
|
128 | AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
|
|
129 | INSTALL_LIBRXVT=yes |
|
|
130 | fi |
|
|
131 | AC_SUBST(INSTALL_LIBRXVT) |
|
|
132 | |
|
|
133 | AC_ARG_ENABLE(everything, |
113 | AC_ARG_ENABLE(everything, |
134 | [ --enable-everything enable standard non-multichoice features |
114 | [ --enable-everything enable standard non-multichoice features |
135 | NOTE: this option is order dependent |
115 | NOTE: this option is order dependent], |
136 | NOTE: automatically enabled with --enable-shared], |
|
|
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 | WARNINGS=no |
|
|
176 | AC_ARG_ENABLE(warnings, |
|
|
177 | [ --enable-warnings turn on g++ warnings], |
|
|
178 | [if test x$enableval = xyes; then |
|
|
179 | WARNINGS=yes |
|
|
180 | fi]) |
|
|
181 | if test x$GXX = xyes; then |
|
|
182 | if test $WARNINGS = yes; then |
|
|
183 | save_CXXFLAGS="$CXXFLAGS" |
|
|
184 | CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" |
|
|
185 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
|
|
186 | else |
|
|
187 | CXXFLAGS="$CXXFLAGS -w" |
|
|
188 | fi |
|
|
189 | fi |
|
|
190 | |
198 | AC_ARG_ENABLE(unicode3, |
191 | AC_ARG_ENABLE(unicode3, |
199 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
192 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
200 | [if test x$enableval = xyes -o x$enableval = xno; then |
193 | [if test x$enableval = xyes -o x$enableval = xno; then |
201 | support_unicode3=$enableval |
194 | support_unicode3=$enableval |
202 | fi]) |
195 | fi]) |
… | |
… | |
218 | [if test x$enableval = xyes -o x$enableval = xno; then |
211 | [if test x$enableval = xyes -o x$enableval = xno; then |
219 | support_styles=$enableval |
212 | support_styles=$enableval |
220 | fi]) |
213 | fi]) |
221 | |
214 | |
222 | AC_ARG_ENABLE(afterimage, |
215 | AC_ARG_ENABLE(afterimage, |
223 | [ --enable-afterimage enable integration with libAfterImage for background images], |
216 | [ --enable-afterimage enable integration with libAfterImage for background images], |
224 | [if test x$enableval = xyes -o x$enableval = xno; then |
217 | [if test x$enableval = xyes -o x$enableval = xno; then |
225 | support_afterimage=$enableval |
218 | support_afterimage=$enableval |
226 | fi]) |
219 | fi]) |
227 | |
220 | |
228 | AC_ARG_WITH(afterimage_config, |
221 | AC_ARG_WITH(afterimage_config, |
… | |
… | |
271 | [ --enable-perl enable embedded perl interpreter], |
264 | [ --enable-perl enable embedded perl interpreter], |
272 | [if test x$enableval = xyes -o x$enableval = xno; then |
265 | [if test x$enableval = xyes -o x$enableval = xno; then |
273 | support_perl=$enableval |
266 | support_perl=$enableval |
274 | fi]) |
267 | fi]) |
275 | |
268 | |
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, |
269 | AC_ARG_WITH(codesets, |
283 | [ --with-codesets=NAME,.. compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
270 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
284 | [codesets="$withval"]) |
271 | [codesets="$withval"]) |
285 | |
272 | |
286 | AC_ARG_ENABLE(xim, |
273 | AC_ARG_ENABLE(xim, |
287 | [ --enable-xim XIM (X Input Method) protocol support], |
274 | [ --enable-xim XIM (X Input Method) protocol support], |
288 | [if test x$enableval = xyes -o x$enableval = xno; then |
275 | [if test x$enableval = xyes -o x$enableval = xno; then |
… | |
… | |
313 | support_8bitctrls=$enableval |
300 | support_8bitctrls=$enableval |
314 | fi]) |
301 | fi]) |
315 | |
302 | |
316 | RESFALLBACK=Rxvt |
303 | RESFALLBACK=Rxvt |
317 | AC_ARG_ENABLE(fallback, |
304 | AC_ARG_ENABLE(fallback, |
318 | [ --enable-fallback(=CLASS) fall back on CLASS resources in addition to URxvt ones (default: Rxvt)], |
305 | [ --enable-fallback@<:@=CLASS@:>@ fall back on CLASS resources in addition to URxvt ones (default: Rxvt)], |
319 | [ |
306 | [ |
320 | test x$enableval = xyes && enableval=Rxvt |
307 | test x$enableval = xyes && enableval=Rxvt |
321 | test x$enableval = xno && enableval= |
308 | test x$enableval = xno && enableval= |
322 | RESFALLBACK="$enableval" |
309 | RESFALLBACK="$enableval" |
323 | ]) |
310 | ]) |
… | |
… | |
382 | [if test x$enableval = xyes -o x$enableval = xno; then |
369 | [if test x$enableval = xyes -o x$enableval = xno; then |
383 | support_mousewheel=$enableval |
370 | support_mousewheel=$enableval |
384 | fi]) |
371 | fi]) |
385 | |
372 | |
386 | AC_ARG_ENABLE(slipwheeling, |
373 | AC_ARG_ENABLE(slipwheeling, |
387 | [ --enable-slipwheeling enable slip wheel scrolling (requires previous)], |
374 | [ --enable-slipwheeling enable slip wheel scrolling (requires --enable-mousewheel)], |
388 | [if test x$enableval = xyes -o x$enableval = xno; then |
375 | [if test x$enableval = xyes -o x$enableval = xno; then |
389 | support_mouseslipwheel=$enableval |
376 | support_mouseslipwheel=$enableval |
390 | fi]) |
377 | fi]) |
391 | |
378 | |
392 | AC_ARG_ENABLE(smart-resize, |
379 | AC_ARG_ENABLE(smart-resize, |
… | |
… | |
419 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
406 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
420 | fi]) |
407 | fi]) |
421 | |
408 | |
422 | dnl# -------------------------------------------------------------------------- |
409 | dnl# -------------------------------------------------------------------------- |
423 | |
410 | |
|
|
411 | LIBEV_M4_AVOID_LIBRT=1 |
|
|
412 | m4_include([libev/libev.m4]) |
|
|
413 | |
|
|
414 | dnl# -------------------------------------------------------------------------- |
|
|
415 | |
424 | AC_PATH_PROG(TIC, tic) |
416 | AC_PATH_PROG(TIC, tic, :) |
425 | |
|
|
426 | dnl# need a neat way to detect SVR4 or its features |
|
|
427 | dnl# in src/command.c we use these functions: |
|
|
428 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
|
|
429 | dnl# - but are these also defined for other systems? |
|
|
430 | |
|
|
431 | dnl# hack to find if this is SVR4 -- who knows? |
|
|
432 | dnl## AC_MSG_CHECKING(for SVR4) |
|
|
433 | dnl## AC_EGREP_CPP(yes, |
|
|
434 | dnl## [#if defined (SVR4) || defined (_SVR4) || defined (__svr4__) |
|
|
435 | dnl## yes; |
|
|
436 | dnl## #endif |
|
|
437 | dnl## ], [AC_MSG_RESULT(yes); AC_DEFINE(PERHAPS_SVR4)], AC_MSG_RESULT(perhaps not?)) |
|
|
438 | |
417 | |
439 | AC_PATH_XTRA |
418 | AC_PATH_XTRA |
440 | |
419 | |
441 | AFTERIMAGE_CFLAGS= |
420 | AFTERIMAGE_CFLAGS= |
442 | AFTERIMAGE_LIBS= |
421 | AFTERIMAGE_LIBS= |
… | |
… | |
474 | fi |
453 | fi |
475 | |
454 | |
476 | dnl# -------------------------------------------------------------------------- |
455 | dnl# -------------------------------------------------------------------------- |
477 | dnl# CHECKING FOR HEADER FILES |
456 | dnl# CHECKING FOR HEADER FILES |
478 | dnl# -------------------------------------------------------------------------- |
457 | dnl# -------------------------------------------------------------------------- |
479 | AC_HEADER_SYS_WAIT |
|
|
480 | AC_CHECK_HEADERS( \ |
458 | AC_CHECK_HEADERS( \ |
481 | assert.h \ |
|
|
482 | fcntl.h \ |
|
|
483 | stdarg.h \ |
|
|
484 | stdlib.h \ |
|
|
485 | string.h \ |
|
|
486 | termios.h \ |
|
|
487 | unistd.h \ |
|
|
488 | sys/byteorder.h \ |
459 | sys/byteorder.h \ |
489 | sys/ioctl.h \ |
460 | sys/ioctl.h \ |
490 | sys/select.h \ |
|
|
491 | sys/sockio.h \ |
461 | sys/sockio.h \ |
492 | sys/strredir.h \ |
462 | sys/strredir.h \ |
493 | sys/time.h \ |
|
|
494 | stdint.h \ |
463 | stdint.h \ |
495 | wchar.h \ |
464 | wchar.h \ |
496 | cwchar \ |
465 | cwchar \ |
497 | clocale \ |
|
|
498 | ) |
466 | ) |
499 | |
|
|
500 | AC_HEADER_TIME |
|
|
501 | |
|
|
502 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
|
|
503 | AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
|
|
504 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
|
|
505 | #include <sys/ioctl.h> |
|
|
506 | #ifdef HAVE_TERMIOS_H |
|
|
507 | #include <termios.h> |
|
|
508 | #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
|
|
509 | |
467 | |
510 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
468 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
511 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
469 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
512 | if test x$rxvt_cv_xpointer = xyes; then |
470 | if test x$rxvt_cv_xpointer = xyes; then |
513 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
471 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
… | |
… | |
526 | )]) |
484 | )]) |
527 | if test x$rxvt_xlib_illegal_access = xyes; then |
485 | if test x$rxvt_xlib_illegal_access = xyes; then |
528 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
486 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
529 | fi |
487 | fi |
530 | |
488 | |
531 | AC_C_CONST |
|
|
532 | AC_C_INLINE |
|
|
533 | |
|
|
534 | dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow. |
|
|
535 | |
|
|
536 | dnl# -------------------------------------------------------------------------- |
489 | dnl# -------------------------------------------------------------------------- |
537 | dnl# CHECKING FOR MISSING TYPEDEFS |
490 | dnl# CHECKING FOR MISSING TYPEDEFS |
538 | dnl# -------------------------------------------------------------------------- |
491 | dnl# -------------------------------------------------------------------------- |
539 | dnl# Missing typedefs and replacements |
492 | dnl# Missing typedefs and replacements |
540 | AC_TYPE_MODE_T |
493 | AC_TYPE_MODE_T |
541 | dnl> AC_CHECK_TYPE(umode_t, int) |
|
|
542 | dnl> AC_CHECK_TYPE(off_t, long) |
|
|
543 | AC_TYPE_PID_T |
494 | AC_TYPE_PID_T |
544 | AC_TYPE_UID_T |
495 | AC_TYPE_UID_T |
545 | |
496 | AC_TYPE_INT16_T |
546 | AC_CHECK_SIZEOF(short, 2) |
497 | AC_TYPE_UINT16_T |
547 | AC_CHECK_SIZEOF(int, 4) |
498 | AC_TYPE_INT32_T |
548 | dnl AC_CHECK_SIZEOF(long, 4) |
499 | AC_TYPE_UINT32_T |
549 | AC_CHECK_SIZEOF(long long, 8) |
|
|
550 | AC_CHECK_SIZEOF(int *, 4) |
|
|
551 | |
|
|
552 | dnl# see usage below |
|
|
553 | AC_DEFUN([RXVT_CHECK_SIZE], |
|
|
554 | [AC_CACHE_CHECK([for $2], $1, |
|
|
555 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
|
|
556 | if test "$ac_cv_sizeof_char" -ge $3; then |
|
|
557 | $1="$4 char" |
|
|
558 | else |
|
|
559 | if test "$ac_cv_sizeof_short" -ge $3; then |
|
|
560 | $1="$4 short" |
|
|
561 | else |
|
|
562 | if test "$ac_cv_sizeof_int" -ge $3; then |
|
|
563 | $1="$4 int" |
|
|
564 | else |
|
|
565 | if test "$ac_cv_sizeof_long" -ge $3; then |
|
|
566 | $1="$4 long" |
|
|
567 | else |
|
|
568 | if test "$ac_cv_sizeof_long_long" -ge $3; then |
|
|
569 | $1="$4 long long" |
|
|
570 | else |
|
|
571 | $1="$4 $5" # we _must_ have a (possibly wrong) default |
|
|
572 | fi |
|
|
573 | fi |
|
|
574 | fi |
|
|
575 | fi |
|
|
576 | fi])])] |
|
|
577 | if test x"$$1" != xyes; then |
|
|
578 | $6="typedef $$1 $2;" |
|
|
579 | else |
|
|
580 | if test x"$4" = x; then |
|
|
581 | $6="/* typedef $5 $2; */" |
|
|
582 | else |
|
|
583 | $6="/* typedef $4 $5 $2; */" |
|
|
584 | fi |
|
|
585 | fi dnl |
|
|
586 | ) |
|
|
587 | dnl# |
|
|
588 | dnl# Look for types the system may know about anyway. |
|
|
589 | dnl# |
|
|
590 | RXVT_CHECK_SIZE(rxvt_cv_int16_t, int16_t, 2, , short, rxvt_int16_typedef) |
|
|
591 | AC_SUBST(rxvt_int16_typedef) |
|
|
592 | RXVT_CHECK_SIZE(rxvt_cv_uint16_t, uint16_t, 2, unsigned, short, rxvt_uint16_typedef) |
|
|
593 | AC_SUBST(rxvt_uint16_typedef) |
|
|
594 | RXVT_CHECK_SIZE(rxvt_cv_int32_t, int32_t, 4, , int, rxvt_int32_typedef) |
|
|
595 | AC_SUBST(rxvt_int32_typedef) |
|
|
596 | RXVT_CHECK_SIZE(rxvt_cv_uint32_t, uint32_t, 4, unsigned, int, rxvt_uint32_typedef) |
|
|
597 | AC_SUBST(rxvt_uint32_typedef) |
|
|
598 | dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef) |
|
|
599 | dnl AC_SUBST(rxvt_int64_typedef) |
|
|
600 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
|
|
601 | dnl AC_SUBST(rxvt_uint64_typedef) |
|
|
602 | dnl# |
|
|
603 | dnl# Now look for another we use |
|
|
604 | dnl# |
|
|
605 | if test "$ac_cv_sizeof_int_p" -eq 8; then |
|
|
606 | rxvt_intp_define="#define intp_t int64_t" |
|
|
607 | rxvt_u_intp_define="#define u_intp_t u_int64_t" |
|
|
608 | else |
|
|
609 | if test "$ac_cv_sizeof_int_p" -eq 4; then |
|
|
610 | rxvt_intp_define="#define intp_t int32_t" |
|
|
611 | rxvt_u_intp_define="#define u_intp_t u_int32_t" |
|
|
612 | else |
|
|
613 | if test "$ac_cv_sizeof_int_p" -eq 2; then |
|
|
614 | rxvt_intp_define="#define intp_t int16_t" |
|
|
615 | rxvt_u_intp_define="#define u_intp_t u_int16_t" |
|
|
616 | else |
|
|
617 | rxvt_intp_define="#error set intp_t" |
|
|
618 | rxvt_u_intp_define="#error set u_intp_t" |
|
|
619 | fi |
|
|
620 | fi |
|
|
621 | fi |
|
|
622 | AC_SUBST(rxvt_intp_define) |
|
|
623 | AC_SUBST(rxvt_u_intp_define) |
|
|
624 | |
500 | |
625 | dnl# -------------------------------------------------------------------------- |
501 | dnl# -------------------------------------------------------------------------- |
626 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
502 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
627 | dnl# -------------------------------------------------------------------------- |
503 | dnl# -------------------------------------------------------------------------- |
628 | AC_TYPE_SIGNAL |
504 | AC_CHECK_FUNCS(unsetenv) |
629 | dnl> AC_FUNC_VPRINTF |
|
|
630 | |
|
|
631 | AC_CHECK_FUNCS( \ |
|
|
632 | unsetenv \ |
|
|
633 | setutent \ |
|
|
634 | on_exit \ |
|
|
635 | ) |
|
|
636 | |
505 | |
637 | UTMP_CHECK |
506 | UTMP_CHECK |
638 | |
507 | |
639 | dnl# -------------------------------------------------------------------------- |
508 | dnl# -------------------------------------------------------------------------- |
640 | |
509 | |
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# -------------------------------------------------------------------------- |
510 | dnl# -------------------------------------------------------------------------- |
657 | dnl# -------------------------------------------------------------------------- |
511 | dnl# -------------------------------------------------------------------------- |
658 | |
512 | |
659 | dnl# this is a really hack test for some basic Xlocale stuff |
513 | dnl# this is a really hack test for some basic Xlocale stuff |
660 | ac_save_LIBS=$LIBS |
514 | save_LIBS=$LIBS |
661 | ac_save_CFLAGS=$CFLAGS |
515 | save_CFLAGS=$CFLAGS |
662 | CFLAGS="$CFLAGS $X_CFLAGS" |
516 | CFLAGS="$CFLAGS $X_CFLAGS" |
663 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
517 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
664 | if test x$support_xim = xyes; then |
518 | if test x$support_xim = xyes; then |
665 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
519 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
666 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
520 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
… | |
… | |
697 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
551 | [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])]) |
552 | #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 |
553 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
700 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
554 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
701 | fi |
555 | fi |
702 | LIBS=$ac_save_LIBS |
556 | LIBS=$save_LIBS |
703 | CFLAGS=$ac_save_CFLAGS |
557 | CFLAGS=$save_CFLAGS |
704 | |
558 | |
705 | AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
559 | 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])]) |
560 | [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 |
561 | if test x$rxvt_cv_func_setlocale = xyes; then |
708 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
562 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
… | |
… | |
724 | dnl# now add and remove other stuff |
578 | dnl# now add and remove other stuff |
725 | dnl# -------------------------------------------------------------------------- |
579 | dnl# -------------------------------------------------------------------------- |
726 | if test x$support_xft = xyes; then |
580 | if test x$support_xft = xyes; then |
727 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
581 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
728 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
582 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
729 | LIBS="$LIBS `$PKG_CONFIG xft --libs`" |
583 | X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
730 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
584 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
731 | else |
585 | else |
732 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
586 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
733 | if test $XFT_CONFIG != no; then |
587 | if test $XFT_CONFIG != no; then |
734 | LIBS="$LIBS `$XFT_CONFIG --libs`" |
588 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
735 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
589 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
736 | fi |
590 | fi |
737 | fi |
591 | fi |
738 | |
592 | |
|
|
593 | save_LIBS="$LIBS" |
|
|
594 | LIBS="$LIBS $X_LIBS" |
739 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
595 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
740 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
596 | AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) |
|
|
597 | LIBS="$save_LIBS" |
741 | |
598 | |
742 | if test x$support_xft = xyes; then |
599 | if test x$support_xft = xyes; then |
743 | AC_DEFINE(XFT, 1, Define to enable xft support) |
600 | AC_DEFINE(XFT, 1, Define to enable xft support) |
744 | fi |
601 | fi |
745 | fi |
602 | fi |
… | |
… | |
773 | if test x$support_mouseslipwheel = xyes; then |
630 | if test x$support_mouseslipwheel = xyes; then |
774 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
631 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
775 | fi |
632 | fi |
776 | if test x$support_afterimage = xyes; then |
633 | if test x$support_afterimage = xyes; then |
777 | AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing) |
634 | AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing) |
778 | AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libAfterImage) |
635 | AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps. Needs libAfterImage) |
779 | fi |
636 | fi |
780 | |
637 | |
781 | dnl if test x$support_afterstep = xyes; then |
638 | dnl if test x$support_afterstep = xyes; then |
782 | dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) |
639 | dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) |
783 | dnl fi |
640 | dnl fi |
784 | |
641 | |
|
|
642 | scrolltypes=plain |
|
|
643 | AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) |
|
|
644 | |
785 | if test x$support_scroll_rxvt = xyes; then |
645 | if test x$support_scroll_rxvt = xyes; then |
786 | AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) |
646 | AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) |
787 | scrolltypes="rxvt" |
647 | scrolltypes="$scrolltypes rxvt" |
788 | fi |
648 | fi |
789 | if test x$support_scroll_next = xyes; then |
649 | if test x$support_scroll_next = xyes; then |
790 | AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) |
650 | AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) |
791 | scrolltypes="$scrolltypes next" |
651 | scrolltypes="$scrolltypes next" |
792 | fi |
652 | fi |
793 | if test x$support_scroll_xterm = xyes; then |
653 | if test x$support_scroll_xterm = xyes; then |
794 | AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) |
654 | AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) |
795 | scrolltypes="$scrolltypes xterm" |
655 | scrolltypes="$scrolltypes xterm" |
796 | fi |
|
|
797 | if test x$support_scroll_plain = xyes; then |
|
|
798 | AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) |
|
|
799 | scrolltypes="$scrolltypes plain" |
|
|
800 | fi |
656 | fi |
801 | if test x$support_pointer_blank = xyes; then |
657 | if test x$support_pointer_blank = xyes; then |
802 | AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) |
658 | AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) |
803 | fi |
659 | fi |
804 | if test x$support_text_blink = xyes; then |
660 | if test x$support_text_blink = xyes; then |
… | |
… | |
835 | |
691 | |
836 | save_CXXFLAGS="$CXXFLAGS" |
692 | save_CXXFLAGS="$CXXFLAGS" |
837 | save_LIBS="$LIBS" |
693 | save_LIBS="$LIBS" |
838 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
694 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
839 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
695 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
840 | AC_TRY_LINK([ |
696 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
841 | #include <EXTERN.h> |
697 | #include <EXTERN.h> |
842 | #include <perl.h> |
698 | #include <perl.h> |
843 | #include <XSUB.h> |
699 | #include <XSUB.h> |
844 | ],[ |
700 | ]], [[ |
845 | PerlInterpreter *perl = perl_alloc (); |
701 | PerlInterpreter *perl = perl_alloc (); |
846 | ],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
702 | ]])],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
847 | CXXFLAGS="$save_CXXFLAGS" |
703 | CXXFLAGS="$save_CXXFLAGS" |
848 | LIBS="$save_LIBS" |
704 | LIBS="$save_LIBS" |
849 | |
705 | |
850 | if test x$rxvt_perl_link = xyes; then |
706 | if test x$rxvt_perl_link = xyes; then |
851 | AC_MSG_RESULT(ok) |
707 | AC_MSG_RESULT(ok) |
… | |
… | |
882 | AC_SUBST(AFTERIMAGE_CFLAGS) |
738 | AC_SUBST(AFTERIMAGE_CFLAGS) |
883 | AC_SUBST(AFTERIMAGE_LIBS) |
739 | AC_SUBST(AFTERIMAGE_LIBS) |
884 | |
740 | |
885 | AC_ARG_PROGRAM |
741 | AC_ARG_PROGRAM |
886 | |
742 | |
887 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
|
|
888 | |
|
|
889 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
|
|
890 | AC_DEFUN([RXVT_DEFINE_TO_INCLUDE], dnl |
|
|
891 | [if test "$$3" = "$4" -o "$$5" = "$6"; then |
|
|
892 | $1="#include <$2>" |
|
|
893 | else |
|
|
894 | $1="/* #include <$2> */" |
|
|
895 | fi dnl |
|
|
896 | AC_SUBST($1)]) |
|
|
897 | |
|
|
898 | RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) |
|
|
899 | RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) |
|
|
900 | RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) |
|
|
901 | RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) |
|
|
902 | RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) |
|
|
903 | RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) |
|
|
904 | RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch) |
|
|
905 | RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) |
|
|
906 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
|
|
907 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
|
|
908 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
|
|
909 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
|
|
910 | RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
|
|
911 | |
|
|
912 | AC_CONFIG_FILES([Makefile \ |
743 | AC_CONFIG_FILES([Makefile \ |
913 | doc/Makefile \ |
744 | doc/Makefile \ |
914 | src/Makefile \ |
745 | src/Makefile \ |
915 | src/rxvtlib.h \ |
|
|
916 | ]) |
746 | ]) |
917 | AC_OUTPUT |
747 | AC_OUTPUT |
918 | |
748 | |
919 | echo "Configuration: |
749 | echo "Configuration: |
920 | |
750 | |