… | |
… | |
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 | 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 |
… | |
… | |
234 | [if test x$enableval = xyes -o x$enableval = xno; then |
221 | [if test x$enableval = xyes -o x$enableval = xno; then |
235 | support_styles=$enableval |
222 | support_styles=$enableval |
236 | fi]) |
223 | fi]) |
237 | |
224 | |
238 | AC_ARG_ENABLE(afterimage, |
225 | AC_ARG_ENABLE(afterimage, |
239 | [ --enable-afterimage enable integration with libAfterImage for background images], |
226 | [ --enable-afterimage enable integration with libAfterImage for background images], |
240 | [if test x$enableval = xyes -o x$enableval = xno; then |
227 | [if test x$enableval = xyes -o x$enableval = xno; then |
241 | support_afterimage=$enableval |
228 | support_afterimage=$enableval |
242 | fi]) |
229 | fi]) |
243 | |
230 | |
244 | AC_ARG_WITH(afterimage_config, |
231 | AC_ARG_WITH(afterimage_config, |
… | |
… | |
285 | |
272 | |
286 | AC_ARG_ENABLE(perl, |
273 | AC_ARG_ENABLE(perl, |
287 | [ --enable-perl enable embedded perl interpreter], |
274 | [ --enable-perl enable embedded perl interpreter], |
288 | [if test x$enableval = xyes -o x$enableval = xno; then |
275 | [if test x$enableval = xyes -o x$enableval = xno; then |
289 | support_perl=$enableval |
276 | support_perl=$enableval |
290 | fi]) |
|
|
291 | |
|
|
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]) |
277 | fi]) |
297 | |
278 | |
298 | AC_ARG_WITH(codesets, |
279 | AC_ARG_WITH(codesets, |
299 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
280 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
300 | [codesets="$withval"]) |
281 | [codesets="$withval"]) |
… | |
… | |
435 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
416 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
436 | fi]) |
417 | fi]) |
437 | |
418 | |
438 | dnl# -------------------------------------------------------------------------- |
419 | dnl# -------------------------------------------------------------------------- |
439 | |
420 | |
|
|
421 | LIBEV_M4_AVOID_LIBRT=1 |
|
|
422 | m4_include([libev/libev.m4]) |
|
|
423 | |
|
|
424 | dnl# -------------------------------------------------------------------------- |
|
|
425 | |
440 | AC_PATH_PROG(TIC, tic, :) |
426 | 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 | |
427 | |
455 | AC_PATH_XTRA |
428 | AC_PATH_XTRA |
456 | |
429 | |
457 | AFTERIMAGE_CFLAGS= |
430 | AFTERIMAGE_CFLAGS= |
458 | AFTERIMAGE_LIBS= |
431 | AFTERIMAGE_LIBS= |
… | |
… | |
490 | fi |
463 | fi |
491 | |
464 | |
492 | dnl# -------------------------------------------------------------------------- |
465 | dnl# -------------------------------------------------------------------------- |
493 | dnl# CHECKING FOR HEADER FILES |
466 | dnl# CHECKING FOR HEADER FILES |
494 | dnl# -------------------------------------------------------------------------- |
467 | dnl# -------------------------------------------------------------------------- |
495 | AC_HEADER_SYS_WAIT |
|
|
496 | AC_CHECK_HEADERS( \ |
468 | 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 \ |
469 | sys/byteorder.h \ |
505 | sys/ioctl.h \ |
470 | sys/ioctl.h \ |
506 | sys/select.h \ |
|
|
507 | sys/sockio.h \ |
471 | sys/sockio.h \ |
508 | sys/strredir.h \ |
472 | sys/strredir.h \ |
509 | sys/time.h \ |
|
|
510 | stdint.h \ |
473 | stdint.h \ |
511 | wchar.h \ |
474 | wchar.h \ |
512 | cwchar \ |
475 | cwchar \ |
513 | clocale \ |
|
|
514 | ) |
476 | ) |
515 | |
|
|
516 | AC_HEADER_TIME |
|
|
517 | |
|
|
518 | 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, |
|
|
520 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
|
|
521 | #include <sys/ioctl.h> |
|
|
522 | #ifdef HAVE_TERMIOS_H |
|
|
523 | #include <termios.h> |
|
|
524 | #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
|
|
525 | |
477 | |
526 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
478 | 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])]) |
479 | [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 |
480 | if test x$rxvt_cv_xpointer = xyes; then |
529 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
481 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
… | |
… | |
542 | )]) |
494 | )]) |
543 | if test x$rxvt_xlib_illegal_access = xyes; then |
495 | if test x$rxvt_xlib_illegal_access = xyes; then |
544 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
496 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
545 | fi |
497 | fi |
546 | |
498 | |
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# -------------------------------------------------------------------------- |
499 | dnl# -------------------------------------------------------------------------- |
553 | dnl# CHECKING FOR MISSING TYPEDEFS |
500 | dnl# CHECKING FOR MISSING TYPEDEFS |
554 | dnl# -------------------------------------------------------------------------- |
501 | dnl# -------------------------------------------------------------------------- |
555 | dnl# Missing typedefs and replacements |
502 | dnl# Missing typedefs and replacements |
556 | AC_TYPE_MODE_T |
503 | 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 |
504 | AC_TYPE_PID_T |
560 | AC_TYPE_UID_T |
505 | AC_TYPE_UID_T |
561 | |
506 | AC_TYPE_INT16_T |
562 | AC_CHECK_SIZEOF(short, 2) |
507 | AC_TYPE_UINT16_T |
563 | AC_CHECK_SIZEOF(int, 4) |
508 | AC_TYPE_INT32_T |
564 | dnl AC_CHECK_SIZEOF(long, 4) |
509 | 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 | |
510 | |
641 | dnl# -------------------------------------------------------------------------- |
511 | dnl# -------------------------------------------------------------------------- |
642 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
512 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
643 | dnl# -------------------------------------------------------------------------- |
513 | dnl# -------------------------------------------------------------------------- |
644 | AC_TYPE_SIGNAL |
|
|
645 | dnl> AC_FUNC_VPRINTF |
|
|
646 | |
|
|
647 | AC_CHECK_FUNCS(unsetenv) |
514 | AC_CHECK_FUNCS(unsetenv) |
648 | |
515 | |
649 | UTMP_CHECK |
516 | UTMP_CHECK |
650 | |
517 | |
651 | dnl# -------------------------------------------------------------------------- |
518 | dnl# -------------------------------------------------------------------------- |
652 | |
|
|
653 | dnl# find ttys/ttytab |
|
|
654 | AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab, |
|
|
655 | [for ttys_file in dnl |
|
|
656 | /etc/ttys /etc/ttytab; |
|
|
657 | do |
|
|
658 | if test -f "$ttys_file" ; then |
|
|
659 | rxvt_cv_path_ttytab=$ttys_file |
|
|
660 | break |
|
|
661 | fi |
|
|
662 | done |
|
|
663 | ]) |
|
|
664 | if test x$rxvt_cv_path_ttytab != x; then |
|
|
665 | AC_DEFINE_UNQUOTED(TTYTAB_FILENAME, "$rxvt_cv_path_ttytab", Define location of ttys/ttytab) |
|
|
666 | fi |
|
|
667 | |
519 | |
668 | dnl# -------------------------------------------------------------------------- |
520 | dnl# -------------------------------------------------------------------------- |
669 | dnl# -------------------------------------------------------------------------- |
521 | dnl# -------------------------------------------------------------------------- |
670 | |
522 | |
671 | dnl# this is a really hack test for some basic Xlocale stuff |
523 | dnl# this is a really hack test for some basic Xlocale stuff |
… | |
… | |
736 | dnl# now add and remove other stuff |
588 | dnl# now add and remove other stuff |
737 | dnl# -------------------------------------------------------------------------- |
589 | dnl# -------------------------------------------------------------------------- |
738 | if test x$support_xft = xyes; then |
590 | if test x$support_xft = xyes; then |
739 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
591 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
740 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
592 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
741 | LIBS="$LIBS `$PKG_CONFIG xft --libs`" |
593 | X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
742 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
594 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
743 | else |
595 | else |
744 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
596 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
745 | if test $XFT_CONFIG != no; then |
597 | if test $XFT_CONFIG != no; then |
746 | LIBS="$LIBS `$XFT_CONFIG --libs`" |
598 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
747 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
599 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
748 | fi |
600 | fi |
749 | fi |
601 | fi |
750 | |
602 | |
|
|
603 | save_LIBS="$LIBS" |
|
|
604 | LIBS="$LIBS $X_LIBS" |
751 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
605 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
752 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
606 | AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) |
|
|
607 | LIBS="$save_LIBS" |
753 | |
608 | |
754 | if test x$support_xft = xyes; then |
609 | if test x$support_xft = xyes; then |
755 | AC_DEFINE(XFT, 1, Define to enable xft support) |
610 | AC_DEFINE(XFT, 1, Define to enable xft support) |
756 | fi |
611 | fi |
757 | fi |
612 | fi |
… | |
… | |
792 | |
647 | |
793 | dnl if test x$support_afterstep = xyes; then |
648 | dnl if test x$support_afterstep = xyes; then |
794 | dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) |
649 | dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) |
795 | dnl fi |
650 | dnl fi |
796 | |
651 | |
|
|
652 | scrolltypes=plain |
|
|
653 | AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) |
|
|
654 | |
797 | if test x$support_scroll_rxvt = xyes; then |
655 | if test x$support_scroll_rxvt = xyes; then |
798 | AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) |
656 | AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) |
799 | scrolltypes="rxvt" |
657 | scrolltypes="$scrolltypes rxvt" |
800 | fi |
658 | fi |
801 | if test x$support_scroll_next = xyes; then |
659 | if test x$support_scroll_next = xyes; then |
802 | AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) |
660 | AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) |
803 | scrolltypes="$scrolltypes next" |
661 | scrolltypes="$scrolltypes next" |
804 | fi |
662 | fi |
805 | if test x$support_scroll_xterm = xyes; then |
663 | if test x$support_scroll_xterm = xyes; then |
806 | AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) |
664 | AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) |
807 | scrolltypes="$scrolltypes xterm" |
665 | scrolltypes="$scrolltypes xterm" |
808 | fi |
|
|
809 | if test x$support_scroll_plain = xyes; then |
|
|
810 | AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) |
|
|
811 | scrolltypes="$scrolltypes plain" |
|
|
812 | fi |
666 | fi |
813 | if test x$support_pointer_blank = xyes; then |
667 | if test x$support_pointer_blank = xyes; then |
814 | AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) |
668 | AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) |
815 | fi |
669 | fi |
816 | if test x$support_text_blink = xyes; then |
670 | if test x$support_text_blink = xyes; then |
… | |
… | |
847 | |
701 | |
848 | save_CXXFLAGS="$CXXFLAGS" |
702 | save_CXXFLAGS="$CXXFLAGS" |
849 | save_LIBS="$LIBS" |
703 | save_LIBS="$LIBS" |
850 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
704 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
851 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
705 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
852 | AC_TRY_LINK([ |
706 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
853 | #include <EXTERN.h> |
707 | #include <EXTERN.h> |
854 | #include <perl.h> |
708 | #include <perl.h> |
855 | #include <XSUB.h> |
709 | #include <XSUB.h> |
856 | ],[ |
710 | ]], [[ |
857 | PerlInterpreter *perl = perl_alloc (); |
711 | PerlInterpreter *perl = perl_alloc (); |
858 | ],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
712 | ]])],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
859 | CXXFLAGS="$save_CXXFLAGS" |
713 | CXXFLAGS="$save_CXXFLAGS" |
860 | LIBS="$save_LIBS" |
714 | LIBS="$save_LIBS" |
861 | |
715 | |
862 | if test x$rxvt_perl_link = xyes; then |
716 | if test x$rxvt_perl_link = xyes; then |
863 | AC_MSG_RESULT(ok) |
717 | AC_MSG_RESULT(ok) |
… | |
… | |
894 | AC_SUBST(AFTERIMAGE_CFLAGS) |
748 | AC_SUBST(AFTERIMAGE_CFLAGS) |
895 | AC_SUBST(AFTERIMAGE_LIBS) |
749 | AC_SUBST(AFTERIMAGE_LIBS) |
896 | |
750 | |
897 | AC_ARG_PROGRAM |
751 | AC_ARG_PROGRAM |
898 | |
752 | |
899 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
|
|
900 | |
|
|
901 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
|
|
902 | AC_DEFUN([RXVT_DEFINE_TO_INCLUDE], dnl |
|
|
903 | [if test "$$3" = "$4" -o "$$5" = "$6"; then |
|
|
904 | $1="#include <$2>" |
|
|
905 | else |
|
|
906 | $1="/* #include <$2> */" |
|
|
907 | fi dnl |
|
|
908 | AC_SUBST($1)]) |
|
|
909 | |
|
|
910 | RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) |
|
|
911 | RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) |
|
|
912 | RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) |
|
|
913 | RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) |
|
|
914 | RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) |
|
|
915 | RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) |
|
|
916 | RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch) |
|
|
917 | RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) |
|
|
918 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
|
|
919 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
|
|
920 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
|
|
921 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
|
|
922 | RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
|
|
923 | |
|
|
924 | AC_CONFIG_FILES([Makefile \ |
753 | AC_CONFIG_FILES([Makefile \ |
925 | doc/Makefile \ |
754 | doc/Makefile \ |
926 | src/Makefile \ |
755 | src/Makefile \ |
927 | src/rxvtlib.h \ |
|
|
928 | ]) |
756 | ]) |
929 | AC_OUTPUT |
757 | AC_OUTPUT |
930 | |
758 | |
931 | echo "Configuration: |
759 | echo "Configuration: |
932 | |
760 | |