ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/configure.ac
(Generate patch)

Comparing rxvt-unicode/configure.ac (file contents):
Revision 1.80 by ayin, Mon Nov 5 00:19:14 2007 UTC vs.
Revision 1.94 by ayin, Tue Dec 11 09:10:56 2007 UTC

15DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` 15DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
16dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` 16dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
17changequote([, ])dnl 17changequote([, ])dnl
18AC_SUBST(VERSION)dnl 18AC_SUBST(VERSION)dnl
19AC_SUBST(DATE)dnl 19AC_SUBST(DATE)dnl
20AC_SUBST(LSMDATE)dnl
21AC_SUBST(LIBVERSION)dnl 20dnl AC_SUBST(LIBVERSION)dnl
21
22echo "" 22echo ""
23echo "configuring for rxvt $VERSION" 23echo "configuring for rxvt $VERSION"
24echo "" 24echo ""
25 25
26orig_CXXFLAGS="$CXXFLAGS" 26orig_CXXFLAGS="$CXXFLAGS"
27 27
28dnl# Checks for programs. 28dnl# Checks for programs.
29dnl AC_MAKE_SET
30
31AC_PROG_CC 29AC_PROG_CC
32AC_PROG_CXX 30AC_PROG_CXX
33AC_PROG_CPP 31AC_PROG_CPP
34AC_PROG_INSTALL 32AC_PROG_INSTALL
35 33
36AC_AIX 34AC_AIX
35AC_GNU_SOURCE
37AC_ISC_POSIX 36AC_ISC_POSIX
38AC_LANG(C++) 37AC_LANG(C++)
39 38
40dnl check wether we can link with gcc -lsupc++ 39dnl check wether we can link with gcc -lsupc++
41if test x$GCC = xyes && test x$GXX = xyes; then 40if test x$GCC = xyes && test x$GXX = xyes; then
62dnl# -------------------------------------------------------------------------- 61dnl# --------------------------------------------------------------------------
63dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' 62dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure'
64dnl# 63dnl#
65if test -z "$orig_CXXFLAGS"; then 64if test -z "$orig_CXXFLAGS"; then
66 if test x$GCC = xyes && test "x$GXX" = xyes; then 65 if test x$GCC = xyes && test "x$GXX" = xyes; then
67 CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" 66 CXXFLAGS="-g -O3 -fno-rtti -fvisibility-inlines-hidden -fno-threadsafe-statics -fno-enforce-eh-specs"
68 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) 67 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"])
69 else 68 else
70 CXXFLAGS="-O" 69 CXXFLAGS="-O"
71 fi 70 fi
72 CFLAGS="$CXXFLAGS" 71 CFLAGS="$CXXFLAGS"
73fi 72fi
74 73
75AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.)
76
77case $host in 74case $host in
78 *-*-solaris* ) 75 *-*-solaris* )
79 AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) 76 AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris)
80 ;; 77 ;;
81esac 78esac
82
83dnl if test x$GXX = xyes; then
84dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now...
85dnl fi
86 79
87dnl# FreeBSD needs to link libxpg4 80dnl# FreeBSD needs to link libxpg4
88AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) 81AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])])
89 82
90dnl# solaris needs to link libnsl and socket 83dnl# solaris needs to link libnsl and socket
122 115
123dnl# -------------------------------------------------------------------------- 116dnl# --------------------------------------------------------------------------
124dnl# CHECKING COMMAND LINE OPTIONS 117dnl# CHECKING COMMAND LINE OPTIONS
125dnl# -------------------------------------------------------------------------- 118dnl# --------------------------------------------------------------------------
126 119
127if test "x$enable_shared" = xyes; then 120dnl if test "x$enable_shared" = xyes; then
128 AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) 121dnl AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only)
129 INSTALL_LIBRXVT=yes 122dnl INSTALL_LIBRXVT=yes
130fi 123dnl fi
131AC_SUBST(INSTALL_LIBRXVT) 124dnl AC_SUBST(INSTALL_LIBRXVT)
132 125
133AC_ARG_ENABLE(everything, 126AC_ARG_ENABLE(everything,
134 [ --enable-everything enable standard non-multichoice features 127 [ --enable-everything enable standard non-multichoice features
135 NOTE: this option is order dependent 128 NOTE: this option is order dependent],
136 NOTE: automatically enabled with --enable-shared],
137 [ 129 [
138 if test x$enableval = xno; then 130 if test x$enableval = xno; then
139 support_frills=no 131 support_frills=no
140 support_inheritpixmap=no 132 support_inheritpixmap=no
141 support_fading=no 133 support_fading=no
281 [ --enable-xterm-scroll enable Xterm style scrollbar], 273 [ --enable-xterm-scroll enable Xterm style scrollbar],
282 [if test x$enableval = xyes -o x$enableval = xno; then 274 [if test x$enableval = xyes -o x$enableval = xno; then
283 support_scroll_xterm=$enableval 275 support_scroll_xterm=$enableval
284 fi]) 276 fi])
285 277
278AC_ARG_ENABLE(plain-scroll,
279 [ --enable-plain-scroll enable plain style scrollbar],
280 [if test x$enableval = xyes -o x$enableval = xno; then
281 support_scroll_plain=$enableval
282 fi])
283
286AC_ARG_ENABLE(perl, 284AC_ARG_ENABLE(perl,
287 [ --enable-perl enable embedded perl interpreter], 285 [ --enable-perl enable embedded perl interpreter],
288 [if test x$enableval = xyes -o x$enableval = xno; then 286 [if test x$enableval = xyes -o x$enableval = xno; then
289 support_perl=$enableval 287 support_perl=$enableval
290 fi])
291
292AC_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]) 288 fi])
297 289
298AC_ARG_WITH(codesets, 290AC_ARG_WITH(codesets,
299 [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], 291 [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)],
300 [codesets="$withval"]) 292 [codesets="$withval"])
435 AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" 427 AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval"
436 fi]) 428 fi])
437 429
438dnl# -------------------------------------------------------------------------- 430dnl# --------------------------------------------------------------------------
439 431
432LIBEV_M4_AVOID_LIBRT=1
433m4_include([libev/libev.m4])
434
435dnl# --------------------------------------------------------------------------
436
440AC_PATH_PROG(TIC, tic, :) 437AC_PATH_PROG(TIC, tic, :)
441
442dnl# need a neat way to detect SVR4 or its features
443dnl# in src/command.c we use these functions:
444dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h>
445dnl# - but are these also defined for other systems?
446
447dnl# hack to find if this is SVR4 -- who knows?
448dnl## AC_MSG_CHECKING(for SVR4)
449dnl## AC_EGREP_CPP(yes,
450dnl## [#if defined (SVR4) || defined (_SVR4) || defined (__svr4__)
451dnl## yes;
452dnl## #endif
453dnl## ], [AC_MSG_RESULT(yes); AC_DEFINE(PERHAPS_SVR4)], AC_MSG_RESULT(perhaps not?))
454 438
455AC_PATH_XTRA 439AC_PATH_XTRA
456 440
457AFTERIMAGE_CFLAGS= 441AFTERIMAGE_CFLAGS=
458AFTERIMAGE_LIBS= 442AFTERIMAGE_LIBS=
490fi 474fi
491 475
492dnl# -------------------------------------------------------------------------- 476dnl# --------------------------------------------------------------------------
493dnl# CHECKING FOR HEADER FILES 477dnl# CHECKING FOR HEADER FILES
494dnl# -------------------------------------------------------------------------- 478dnl# --------------------------------------------------------------------------
495AC_HEADER_SYS_WAIT
496AC_CHECK_HEADERS( \ 479AC_CHECK_HEADERS( \
497 assert.h \ 480 assert.h \
498 fcntl.h \ 481 fcntl.h \
499 stdarg.h \ 482 stdarg.h \
500 stdlib.h \ 483 stdlib.h \
505 sys/ioctl.h \ 488 sys/ioctl.h \
506 sys/select.h \ 489 sys/select.h \
507 sys/sockio.h \ 490 sys/sockio.h \
508 sys/strredir.h \ 491 sys/strredir.h \
509 sys/time.h \ 492 sys/time.h \
493 time.h \
510 stdint.h \ 494 stdint.h \
511 wchar.h \ 495 wchar.h \
512 cwchar \ 496 cwchar \
513 clocale \ 497 clocale \
514) 498)
515
516AC_HEADER_TIME
517 499
518dnl# check to allow both <termios.h> and <sys/ioctl.h> 500dnl# check to allow both <termios.h> and <sys/ioctl.h>
519AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, 501AC_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> 502[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
521#include <sys/ioctl.h> 503#include <sys/ioctl.h>
541 [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] 523 [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no]
542)]) 524)])
543if test x$rxvt_xlib_illegal_access = xyes; then 525if test x$rxvt_xlib_illegal_access = xyes; then
544 AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) 526 AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it)
545fi 527fi
546
547AC_C_CONST
548AC_C_INLINE
549
550dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow.
551 528
552dnl# -------------------------------------------------------------------------- 529dnl# --------------------------------------------------------------------------
553dnl# CHECKING FOR MISSING TYPEDEFS 530dnl# CHECKING FOR MISSING TYPEDEFS
554dnl# -------------------------------------------------------------------------- 531dnl# --------------------------------------------------------------------------
555dnl# Missing typedefs and replacements 532dnl# Missing typedefs and replacements
613AC_SUBST(rxvt_uint32_typedef) 590AC_SUBST(rxvt_uint32_typedef)
614dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef) 591dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef)
615dnl AC_SUBST(rxvt_int64_typedef) 592dnl AC_SUBST(rxvt_int64_typedef)
616dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) 593dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef)
617dnl AC_SUBST(rxvt_uint64_typedef) 594dnl AC_SUBST(rxvt_uint64_typedef)
618dnl#
619dnl# Now look for another we use
620dnl#
621if 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"
624else
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
637fi
638AC_SUBST(rxvt_intp_define)
639AC_SUBST(rxvt_u_intp_define)
640 595
641dnl# -------------------------------------------------------------------------- 596dnl# --------------------------------------------------------------------------
642dnl# CHECKING FOR LIBRARY FUNCTIONS 597dnl# CHECKING FOR LIBRARY FUNCTIONS
643dnl# -------------------------------------------------------------------------- 598dnl# --------------------------------------------------------------------------
644AC_TYPE_SIGNAL
645dnl> AC_FUNC_VPRINTF
646
647AC_CHECK_FUNCS(unsetenv) 599AC_CHECK_FUNCS(unsetenv)
648 600
649UTMP_CHECK 601UTMP_CHECK
650 602
651dnl# -------------------------------------------------------------------------- 603dnl# --------------------------------------------------------------------------
652
653dnl# find ttys/ttytab
654AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab,
655[for ttys_file in dnl
656 /etc/ttys /etc/ttytab;
657do
658 if test -f "$ttys_file" ; then
659 rxvt_cv_path_ttytab=$ttys_file
660 break
661 fi
662done
663])
664if test x$rxvt_cv_path_ttytab != x; then
665 AC_DEFINE_UNQUOTED(TTYTAB_FILENAME, "$rxvt_cv_path_ttytab", Define location of ttys/ttytab)
666fi
667 604
668dnl# -------------------------------------------------------------------------- 605dnl# --------------------------------------------------------------------------
669dnl# -------------------------------------------------------------------------- 606dnl# --------------------------------------------------------------------------
670 607
671dnl# this is a really hack test for some basic Xlocale stuff 608dnl# this is a really hack test for some basic Xlocale stuff
736dnl# now add and remove other stuff 673dnl# now add and remove other stuff
737dnl# -------------------------------------------------------------------------- 674dnl# --------------------------------------------------------------------------
738if test x$support_xft = xyes; then 675if test x$support_xft = xyes; then
739 AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 676 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
740 if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then 677 if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then
741 LIBS="$LIBS `$PKG_CONFIG xft --libs`" 678 X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS"
742 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" 679 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`"
743 else 680 else
744 AC_PATH_PROG(XFT_CONFIG, xft-config, no) 681 AC_PATH_PROG(XFT_CONFIG, xft-config, no)
745 if test $XFT_CONFIG != no; then 682 if test $XFT_CONFIG != no; then
746 LIBS="$LIBS `$XFT_CONFIG --libs`" 683 X_LIBS="`$XFT_CONFIG --libs` $X_LIBS"
747 CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" 684 CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`"
748 fi 685 fi
749 fi 686 fi
750 687
688 save_LIBS="$LIBS"
689 LIBS="$LIBS $X_LIBS"
751 AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) 690 AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no])
752 AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) 691 AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no])
692 LIBS="$save_LIBS"
753 693
754 if test x$support_xft = xyes; then 694 if test x$support_xft = xyes; then
755 AC_DEFINE(XFT, 1, Define to enable xft support) 695 AC_DEFINE(XFT, 1, Define to enable xft support)
756 fi 696 fi
757fi 697fi
911RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) 851RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch)
912RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) 852RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch)
913RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) 853RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch)
914RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) 854RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch)
915RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) 855RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch)
916RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch)
917RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) 856RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch)
918RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) 857RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch)
919RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) 858RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch)
920RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) 859RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch)
921RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) 860RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines