… | |
… | |
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 |
… | |
… | |
122 | |
109 | |
123 | dnl# -------------------------------------------------------------------------- |
110 | dnl# -------------------------------------------------------------------------- |
124 | dnl# CHECKING COMMAND LINE OPTIONS |
111 | dnl# CHECKING COMMAND LINE OPTIONS |
125 | dnl# -------------------------------------------------------------------------- |
112 | dnl# -------------------------------------------------------------------------- |
126 | |
113 | |
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, |
114 | AC_ARG_ENABLE(everything, |
134 | [ --enable-everything enable standard non-multichoice features |
115 | [ --enable-everything enable standard non-multichoice features |
135 | NOTE: this option is order dependent |
116 | NOTE: this option is order dependent], |
136 | NOTE: automatically enabled with --enable-shared], |
|
|
137 | [ |
117 | [ |
138 | if test x$enableval = xno; then |
118 | if test x$enableval = xno; then |
139 | support_frills=no |
119 | support_frills=no |
140 | support_inheritpixmap=no |
120 | support_inheritpixmap=no |
141 | support_fading=no |
121 | support_fading=no |
… | |
… | |
281 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
261 | [ --enable-xterm-scroll enable Xterm style scrollbar], |
282 | [if test x$enableval = xyes -o x$enableval = xno; then |
262 | [if test x$enableval = xyes -o x$enableval = xno; then |
283 | support_scroll_xterm=$enableval |
263 | support_scroll_xterm=$enableval |
284 | fi]) |
264 | fi]) |
285 | |
265 | |
|
|
266 | AC_ARG_ENABLE(plain-scroll, |
|
|
267 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
268 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
269 | support_scroll_plain=$enableval |
|
|
270 | fi]) |
|
|
271 | |
286 | AC_ARG_ENABLE(perl, |
272 | AC_ARG_ENABLE(perl, |
287 | [ --enable-perl enable embedded perl interpreter], |
273 | [ --enable-perl enable embedded perl interpreter], |
288 | [if test x$enableval = xyes -o x$enableval = xno; then |
274 | [if test x$enableval = xyes -o x$enableval = xno; then |
289 | support_perl=$enableval |
275 | 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]) |
276 | fi]) |
297 | |
277 | |
298 | AC_ARG_WITH(codesets, |
278 | AC_ARG_WITH(codesets, |
299 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
279 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
300 | [codesets="$withval"]) |
280 | [codesets="$withval"]) |
… | |
… | |
435 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
415 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
436 | fi]) |
416 | fi]) |
437 | |
417 | |
438 | dnl# -------------------------------------------------------------------------- |
418 | dnl# -------------------------------------------------------------------------- |
439 | |
419 | |
|
|
420 | LIBEV_M4_AVOID_LIBRT=1 |
440 | m4_include([libev/libev.m4]) |
421 | m4_include([libev/libev.m4]) |
441 | |
422 | |
442 | dnl# -------------------------------------------------------------------------- |
423 | dnl# -------------------------------------------------------------------------- |
443 | |
424 | |
444 | AC_PATH_PROG(TIC, tic, :) |
425 | AC_PATH_PROG(TIC, tic, :) |
445 | |
|
|
446 | dnl# need a neat way to detect SVR4 or its features |
|
|
447 | dnl# in src/command.c we use these functions: |
|
|
448 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
|
|
449 | dnl# - but are these also defined for other systems? |
|
|
450 | |
|
|
451 | dnl# hack to find if this is SVR4 -- who knows? |
|
|
452 | dnl## AC_MSG_CHECKING(for SVR4) |
|
|
453 | dnl## AC_EGREP_CPP(yes, |
|
|
454 | dnl## [#if defined (SVR4) || defined (_SVR4) || defined (__svr4__) |
|
|
455 | dnl## yes; |
|
|
456 | dnl## #endif |
|
|
457 | dnl## ], [AC_MSG_RESULT(yes); AC_DEFINE(PERHAPS_SVR4)], AC_MSG_RESULT(perhaps not?)) |
|
|
458 | |
426 | |
459 | AC_PATH_XTRA |
427 | AC_PATH_XTRA |
460 | |
428 | |
461 | AFTERIMAGE_CFLAGS= |
429 | AFTERIMAGE_CFLAGS= |
462 | AFTERIMAGE_LIBS= |
430 | AFTERIMAGE_LIBS= |
… | |
… | |
494 | fi |
462 | fi |
495 | |
463 | |
496 | dnl# -------------------------------------------------------------------------- |
464 | dnl# -------------------------------------------------------------------------- |
497 | dnl# CHECKING FOR HEADER FILES |
465 | dnl# CHECKING FOR HEADER FILES |
498 | dnl# -------------------------------------------------------------------------- |
466 | dnl# -------------------------------------------------------------------------- |
499 | AC_HEADER_SYS_WAIT |
|
|
500 | AC_CHECK_HEADERS( \ |
467 | AC_CHECK_HEADERS( \ |
501 | assert.h \ |
|
|
502 | fcntl.h \ |
|
|
503 | stdarg.h \ |
|
|
504 | stdlib.h \ |
|
|
505 | string.h \ |
|
|
506 | termios.h \ |
|
|
507 | unistd.h \ |
|
|
508 | sys/byteorder.h \ |
468 | sys/byteorder.h \ |
509 | sys/ioctl.h \ |
469 | sys/ioctl.h \ |
510 | sys/select.h \ |
|
|
511 | sys/sockio.h \ |
470 | sys/sockio.h \ |
512 | sys/strredir.h \ |
471 | sys/strredir.h \ |
513 | sys/time.h \ |
|
|
514 | stdint.h \ |
472 | stdint.h \ |
515 | wchar.h \ |
473 | wchar.h \ |
516 | cwchar \ |
474 | cwchar \ |
517 | clocale \ |
|
|
518 | ) |
475 | ) |
519 | |
|
|
520 | AC_HEADER_TIME |
|
|
521 | |
|
|
522 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
|
|
523 | AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
|
|
524 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
|
|
525 | #include <sys/ioctl.h> |
|
|
526 | #ifdef HAVE_TERMIOS_H |
|
|
527 | #include <termios.h> |
|
|
528 | #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
|
|
529 | |
476 | |
530 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
477 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
531 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
478 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
532 | if test x$rxvt_cv_xpointer = xyes; then |
479 | if test x$rxvt_cv_xpointer = xyes; then |
533 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
480 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
… | |
… | |
546 | )]) |
493 | )]) |
547 | if test x$rxvt_xlib_illegal_access = xyes; then |
494 | if test x$rxvt_xlib_illegal_access = xyes; then |
548 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
495 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
549 | fi |
496 | fi |
550 | |
497 | |
551 | AC_C_CONST |
|
|
552 | AC_C_INLINE |
|
|
553 | |
|
|
554 | dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow. |
|
|
555 | |
|
|
556 | dnl# -------------------------------------------------------------------------- |
498 | dnl# -------------------------------------------------------------------------- |
557 | dnl# CHECKING FOR MISSING TYPEDEFS |
499 | dnl# CHECKING FOR MISSING TYPEDEFS |
558 | dnl# -------------------------------------------------------------------------- |
500 | dnl# -------------------------------------------------------------------------- |
559 | dnl# Missing typedefs and replacements |
501 | dnl# Missing typedefs and replacements |
560 | AC_TYPE_MODE_T |
502 | AC_TYPE_MODE_T |
561 | dnl> AC_CHECK_TYPE(umode_t, int) |
|
|
562 | dnl> AC_CHECK_TYPE(off_t, long) |
|
|
563 | AC_TYPE_PID_T |
503 | AC_TYPE_PID_T |
564 | AC_TYPE_UID_T |
504 | AC_TYPE_UID_T |
565 | |
505 | AC_TYPE_INT16_T |
566 | AC_CHECK_SIZEOF(short, 2) |
506 | AC_TYPE_UINT16_T |
567 | AC_CHECK_SIZEOF(int, 4) |
507 | AC_TYPE_INT32_T |
568 | dnl AC_CHECK_SIZEOF(long, 4) |
508 | AC_TYPE_UINT32_T |
569 | AC_CHECK_SIZEOF(long long, 8) |
|
|
570 | AC_CHECK_SIZEOF(int *, 4) |
|
|
571 | |
|
|
572 | dnl# see usage below |
|
|
573 | AC_DEFUN([RXVT_CHECK_SIZE], |
|
|
574 | [AC_CACHE_CHECK([for $2], $1, |
|
|
575 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
|
|
576 | if test "$ac_cv_sizeof_char" -ge $3; then |
|
|
577 | $1="$4 char" |
|
|
578 | else |
|
|
579 | if test "$ac_cv_sizeof_short" -ge $3; then |
|
|
580 | $1="$4 short" |
|
|
581 | else |
|
|
582 | if test "$ac_cv_sizeof_int" -ge $3; then |
|
|
583 | $1="$4 int" |
|
|
584 | else |
|
|
585 | if test "$ac_cv_sizeof_long" -ge $3; then |
|
|
586 | $1="$4 long" |
|
|
587 | else |
|
|
588 | if test "$ac_cv_sizeof_long_long" -ge $3; then |
|
|
589 | $1="$4 long long" |
|
|
590 | else |
|
|
591 | $1="$4 $5" # we _must_ have a (possibly wrong) default |
|
|
592 | fi |
|
|
593 | fi |
|
|
594 | fi |
|
|
595 | fi |
|
|
596 | fi])])] |
|
|
597 | if test x"$$1" != xyes; then |
|
|
598 | $6="typedef $$1 $2;" |
|
|
599 | else |
|
|
600 | if test x"$4" = x; then |
|
|
601 | $6="/* typedef $5 $2; */" |
|
|
602 | else |
|
|
603 | $6="/* typedef $4 $5 $2; */" |
|
|
604 | fi |
|
|
605 | fi dnl |
|
|
606 | ) |
|
|
607 | dnl# |
|
|
608 | dnl# Look for types the system may know about anyway. |
|
|
609 | dnl# |
|
|
610 | RXVT_CHECK_SIZE(rxvt_cv_int16_t, int16_t, 2, , short, rxvt_int16_typedef) |
|
|
611 | AC_SUBST(rxvt_int16_typedef) |
|
|
612 | RXVT_CHECK_SIZE(rxvt_cv_uint16_t, uint16_t, 2, unsigned, short, rxvt_uint16_typedef) |
|
|
613 | AC_SUBST(rxvt_uint16_typedef) |
|
|
614 | RXVT_CHECK_SIZE(rxvt_cv_int32_t, int32_t, 4, , int, rxvt_int32_typedef) |
|
|
615 | AC_SUBST(rxvt_int32_typedef) |
|
|
616 | RXVT_CHECK_SIZE(rxvt_cv_uint32_t, uint32_t, 4, unsigned, int, rxvt_uint32_typedef) |
|
|
617 | AC_SUBST(rxvt_uint32_typedef) |
|
|
618 | dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef) |
|
|
619 | dnl AC_SUBST(rxvt_int64_typedef) |
|
|
620 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
|
|
621 | dnl AC_SUBST(rxvt_uint64_typedef) |
|
|
622 | dnl# |
|
|
623 | dnl# Now look for another we use |
|
|
624 | dnl# |
|
|
625 | if test "$ac_cv_sizeof_int_p" -eq 8; then |
|
|
626 | rxvt_intp_define="#define intp_t int64_t" |
|
|
627 | rxvt_u_intp_define="#define u_intp_t u_int64_t" |
|
|
628 | else |
|
|
629 | if test "$ac_cv_sizeof_int_p" -eq 4; then |
|
|
630 | rxvt_intp_define="#define intp_t int32_t" |
|
|
631 | rxvt_u_intp_define="#define u_intp_t u_int32_t" |
|
|
632 | else |
|
|
633 | if test "$ac_cv_sizeof_int_p" -eq 2; then |
|
|
634 | rxvt_intp_define="#define intp_t int16_t" |
|
|
635 | rxvt_u_intp_define="#define u_intp_t u_int16_t" |
|
|
636 | else |
|
|
637 | rxvt_intp_define="#error set intp_t" |
|
|
638 | rxvt_u_intp_define="#error set u_intp_t" |
|
|
639 | fi |
|
|
640 | fi |
|
|
641 | fi |
|
|
642 | AC_SUBST(rxvt_intp_define) |
|
|
643 | AC_SUBST(rxvt_u_intp_define) |
|
|
644 | |
509 | |
645 | dnl# -------------------------------------------------------------------------- |
510 | dnl# -------------------------------------------------------------------------- |
646 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
511 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
647 | dnl# -------------------------------------------------------------------------- |
512 | dnl# -------------------------------------------------------------------------- |
648 | AC_TYPE_SIGNAL |
|
|
649 | dnl> AC_FUNC_VPRINTF |
|
|
650 | |
|
|
651 | AC_CHECK_FUNCS(unsetenv) |
513 | AC_CHECK_FUNCS(unsetenv) |
652 | |
514 | |
653 | UTMP_CHECK |
515 | UTMP_CHECK |
654 | |
516 | |
655 | dnl# -------------------------------------------------------------------------- |
517 | dnl# -------------------------------------------------------------------------- |
… | |
… | |
725 | dnl# now add and remove other stuff |
587 | dnl# now add and remove other stuff |
726 | dnl# -------------------------------------------------------------------------- |
588 | dnl# -------------------------------------------------------------------------- |
727 | if test x$support_xft = xyes; then |
589 | if test x$support_xft = xyes; then |
728 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
590 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
729 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
591 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
730 | LIBS="$LIBS `$PKG_CONFIG xft --libs`" |
592 | X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
731 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
593 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
732 | else |
594 | else |
733 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
595 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
734 | if test $XFT_CONFIG != no; then |
596 | if test $XFT_CONFIG != no; then |
735 | LIBS="$LIBS `$XFT_CONFIG --libs`" |
597 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
736 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
598 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
737 | fi |
599 | fi |
738 | fi |
600 | fi |
739 | |
601 | |
|
|
602 | save_LIBS="$LIBS" |
|
|
603 | LIBS="$LIBS $X_LIBS" |
740 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
604 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
741 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
605 | AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) |
|
|
606 | LIBS="$save_LIBS" |
742 | |
607 | |
743 | if test x$support_xft = xyes; then |
608 | if test x$support_xft = xyes; then |
744 | AC_DEFINE(XFT, 1, Define to enable xft support) |
609 | AC_DEFINE(XFT, 1, Define to enable xft support) |
745 | fi |
610 | fi |
746 | fi |
611 | fi |
… | |
… | |
836 | |
701 | |
837 | save_CXXFLAGS="$CXXFLAGS" |
702 | save_CXXFLAGS="$CXXFLAGS" |
838 | save_LIBS="$LIBS" |
703 | save_LIBS="$LIBS" |
839 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
704 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
840 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
705 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
841 | AC_TRY_LINK([ |
706 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
842 | #include <EXTERN.h> |
707 | #include <EXTERN.h> |
843 | #include <perl.h> |
708 | #include <perl.h> |
844 | #include <XSUB.h> |
709 | #include <XSUB.h> |
845 | ],[ |
710 | ]], [[ |
846 | PerlInterpreter *perl = perl_alloc (); |
711 | PerlInterpreter *perl = perl_alloc (); |
847 | ],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
712 | ]])],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
848 | CXXFLAGS="$save_CXXFLAGS" |
713 | CXXFLAGS="$save_CXXFLAGS" |
849 | LIBS="$save_LIBS" |
714 | LIBS="$save_LIBS" |
850 | |
715 | |
851 | if test x$rxvt_perl_link = xyes; then |
716 | if test x$rxvt_perl_link = xyes; then |
852 | AC_MSG_RESULT(ok) |
717 | AC_MSG_RESULT(ok) |
… | |
… | |
883 | AC_SUBST(AFTERIMAGE_CFLAGS) |
748 | AC_SUBST(AFTERIMAGE_CFLAGS) |
884 | AC_SUBST(AFTERIMAGE_LIBS) |
749 | AC_SUBST(AFTERIMAGE_LIBS) |
885 | |
750 | |
886 | AC_ARG_PROGRAM |
751 | AC_ARG_PROGRAM |
887 | |
752 | |
888 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
|
|
889 | |
|
|
890 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
|
|
891 | AC_DEFUN([RXVT_DEFINE_TO_INCLUDE], dnl |
|
|
892 | [if test "$$3" = "$4" -o "$$5" = "$6"; then |
|
|
893 | $1="#include <$2>" |
|
|
894 | else |
|
|
895 | $1="/* #include <$2> */" |
|
|
896 | fi dnl |
|
|
897 | AC_SUBST($1)]) |
|
|
898 | |
|
|
899 | RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) |
|
|
900 | RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) |
|
|
901 | RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) |
|
|
902 | RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) |
|
|
903 | RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) |
|
|
904 | RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) |
|
|
905 | RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch) |
|
|
906 | RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) |
|
|
907 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
|
|
908 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
|
|
909 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
|
|
910 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
|
|
911 | RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
|
|
912 | |
|
|
913 | AC_CONFIG_FILES([Makefile \ |
753 | AC_CONFIG_FILES([Makefile \ |
914 | doc/Makefile \ |
754 | doc/Makefile \ |
915 | src/Makefile \ |
755 | src/Makefile \ |
916 | src/rxvtlib.h \ |
|
|
917 | ]) |
756 | ]) |
918 | AC_OUTPUT |
757 | AC_OUTPUT |
919 | |
758 | |
920 | echo "Configuration: |
759 | echo "Configuration: |
921 | |
760 | |