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.88 by ayin, Mon Dec 10 23:27:49 2007 UTC vs.
Revision 1.100 by root, Sun Dec 23 05:03:52 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
22 21
23echo "" 22echo ""
24echo "configuring for rxvt $VERSION" 23echo "configuring for rxvt $VERSION"
25echo "" 24echo ""
26 25
31AC_PROG_CXX 30AC_PROG_CXX
32AC_PROG_CPP 31AC_PROG_CPP
33AC_PROG_INSTALL 32AC_PROG_INSTALL
34 33
35AC_AIX 34AC_AIX
35AC_GNU_SOURCE
36AC_ISC_POSIX 36AC_ISC_POSIX
37AC_LANG(C++) 37AC_LANG(C++)
38 38
39dnl check wether we can link with gcc -lsupc++ 39dnl check wether we can link with gcc -lsupc++
40if test x$GCC = xyes && test x$GXX = xyes; then 40if test x$GCC = xyes && test x$GXX = xyes; then
69 CXXFLAGS="-O" 69 CXXFLAGS="-O"
70 fi 70 fi
71 CFLAGS="$CXXFLAGS" 71 CFLAGS="$CXXFLAGS"
72fi 72fi
73 73
74AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.)
75
76case $host in 74case $host in
77 *-*-solaris* ) 75 *-*-solaris* )
78 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)
79 ;; 77 ;;
80esac 78esac
81
82dnl if test x$GXX = xyes; then
83dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now...
84dnl fi
85 79
86dnl# FreeBSD needs to link libxpg4 80dnl# FreeBSD needs to link libxpg4
87AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) 81AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])])
88 82
89dnl# solaris needs to link libnsl and socket 83dnl# solaris needs to link libnsl and socket
121 115
122dnl# -------------------------------------------------------------------------- 116dnl# --------------------------------------------------------------------------
123dnl# CHECKING COMMAND LINE OPTIONS 117dnl# CHECKING COMMAND LINE OPTIONS
124dnl# -------------------------------------------------------------------------- 118dnl# --------------------------------------------------------------------------
125 119
126if test "x$enable_shared" = xyes; then 120dnl if test "x$enable_shared" = xyes; then
127 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)
128 INSTALL_LIBRXVT=yes 122dnl INSTALL_LIBRXVT=yes
129fi 123dnl fi
130AC_SUBST(INSTALL_LIBRXVT) 124dnl AC_SUBST(INSTALL_LIBRXVT)
131 125
132AC_ARG_ENABLE(everything, 126AC_ARG_ENABLE(everything,
133 [ --enable-everything enable standard non-multichoice features 127 [ --enable-everything enable standard non-multichoice features
134 NOTE: this option is order dependent], 128 NOTE: this option is order dependent],
135 [ 129 [
481 475
482dnl# -------------------------------------------------------------------------- 476dnl# --------------------------------------------------------------------------
483dnl# CHECKING FOR HEADER FILES 477dnl# CHECKING FOR HEADER FILES
484dnl# -------------------------------------------------------------------------- 478dnl# --------------------------------------------------------------------------
485AC_CHECK_HEADERS( \ 479AC_CHECK_HEADERS( \
486 assert.h \
487 fcntl.h \
488 stdarg.h \
489 stdlib.h \
490 string.h \
491 termios.h \
492 unistd.h \
493 sys/byteorder.h \ 480 sys/byteorder.h \
494 sys/ioctl.h \ 481 sys/ioctl.h \
495 sys/select.h \
496 sys/sockio.h \ 482 sys/sockio.h \
497 sys/strredir.h \ 483 sys/strredir.h \
498 sys/time.h \
499 stdint.h \ 484 stdint.h \
500 wchar.h \ 485 wchar.h \
501 cwchar \ 486 cwchar \
502 clocale \
503) 487)
504 488
505dnl# check to allow both <termios.h> and <sys/ioctl.h> 489dnl# check to allow both <termios.h> and <sys/ioctl.h>
506AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, 490AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl,
507[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> 491[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
508#include <sys/ioctl.h> 492#include <sys/ioctl.h>
509#ifdef HAVE_TERMIOS_H
510#include <termios.h> 493#include <termios.h>
511#endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) 494]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])])
512 495
513AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, 496AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer,
514[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) 497[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])])
515if test x$rxvt_cv_xpointer = xyes; then 498if test x$rxvt_cv_xpointer = xyes; then
516 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) 499 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef)
534dnl# -------------------------------------------------------------------------- 517dnl# --------------------------------------------------------------------------
535dnl# CHECKING FOR MISSING TYPEDEFS 518dnl# CHECKING FOR MISSING TYPEDEFS
536dnl# -------------------------------------------------------------------------- 519dnl# --------------------------------------------------------------------------
537dnl# Missing typedefs and replacements 520dnl# Missing typedefs and replacements
538AC_TYPE_MODE_T 521AC_TYPE_MODE_T
539dnl> AC_CHECK_TYPE(umode_t, int)
540dnl> AC_CHECK_TYPE(off_t, long)
541AC_TYPE_PID_T 522AC_TYPE_PID_T
542AC_TYPE_UID_T 523AC_TYPE_UID_T
543 524AC_TYPE_INT16_T
544AC_CHECK_SIZEOF(short, 2) 525AC_TYPE_UINT16_T
545AC_CHECK_SIZEOF(int, 4) 526AC_TYPE_INT32_T
546dnl AC_CHECK_SIZEOF(long, 4) 527AC_TYPE_UINT32_T
547AC_CHECK_SIZEOF(long long, 8)
548AC_CHECK_SIZEOF(int *, 4)
549
550dnl# see usage below
551AC_DEFUN([RXVT_CHECK_SIZE],
552 [AC_CACHE_CHECK([for $2], $1,
553 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl
554if test "$ac_cv_sizeof_char" -ge $3; then
555 $1="$4 char"
556else
557 if test "$ac_cv_sizeof_short" -ge $3; then
558 $1="$4 short"
559 else
560 if test "$ac_cv_sizeof_int" -ge $3; then
561 $1="$4 int"
562 else
563 if test "$ac_cv_sizeof_long" -ge $3; then
564 $1="$4 long"
565 else
566 if test "$ac_cv_sizeof_long_long" -ge $3; then
567 $1="$4 long long"
568 else
569 $1="$4 $5" # we _must_ have a (possibly wrong) default
570 fi
571 fi
572 fi
573 fi
574fi])])]
575if test x"$$1" != xyes; then
576 $6="typedef $$1 $2;"
577else
578 if test x"$4" = x; then
579 $6="/* typedef $5 $2; */"
580 else
581 $6="/* typedef $4 $5 $2; */"
582 fi
583fi dnl
584)
585dnl#
586dnl# Look for types the system may know about anyway.
587dnl#
588RXVT_CHECK_SIZE(rxvt_cv_int16_t, int16_t, 2, , short, rxvt_int16_typedef)
589AC_SUBST(rxvt_int16_typedef)
590RXVT_CHECK_SIZE(rxvt_cv_uint16_t, uint16_t, 2, unsigned, short, rxvt_uint16_typedef)
591AC_SUBST(rxvt_uint16_typedef)
592RXVT_CHECK_SIZE(rxvt_cv_int32_t, int32_t, 4, , int, rxvt_int32_typedef)
593AC_SUBST(rxvt_int32_typedef)
594RXVT_CHECK_SIZE(rxvt_cv_uint32_t, uint32_t, 4, unsigned, int, rxvt_uint32_typedef)
595AC_SUBST(rxvt_uint32_typedef)
596dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef)
597dnl AC_SUBST(rxvt_int64_typedef)
598dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef)
599dnl AC_SUBST(rxvt_uint64_typedef)
600dnl#
601dnl# Now look for another we use
602dnl#
603if test "$ac_cv_sizeof_int_p" -eq 8; then
604 rxvt_intp_define="#define intp_t int64_t"
605 rxvt_u_intp_define="#define u_intp_t u_int64_t"
606else
607 if test "$ac_cv_sizeof_int_p" -eq 4; then
608 rxvt_intp_define="#define intp_t int32_t"
609 rxvt_u_intp_define="#define u_intp_t u_int32_t"
610 else
611 if test "$ac_cv_sizeof_int_p" -eq 2; then
612 rxvt_intp_define="#define intp_t int16_t"
613 rxvt_u_intp_define="#define u_intp_t u_int16_t"
614 else
615 rxvt_intp_define="#error set intp_t"
616 rxvt_u_intp_define="#error set u_intp_t"
617 fi
618 fi
619fi
620AC_SUBST(rxvt_intp_define)
621AC_SUBST(rxvt_u_intp_define)
622 528
623dnl# -------------------------------------------------------------------------- 529dnl# --------------------------------------------------------------------------
624dnl# CHECKING FOR LIBRARY FUNCTIONS 530dnl# CHECKING FOR LIBRARY FUNCTIONS
625dnl# -------------------------------------------------------------------------- 531dnl# --------------------------------------------------------------------------
626AC_CHECK_FUNCS(unsetenv) 532AC_CHECK_FUNCS(unsetenv)
814 720
815 save_CXXFLAGS="$CXXFLAGS" 721 save_CXXFLAGS="$CXXFLAGS"
816 save_LIBS="$LIBS" 722 save_LIBS="$LIBS"
817 CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" 723 CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`"
818 LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" 724 LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`"
819 AC_TRY_LINK([ 725 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
820#include <EXTERN.h> 726#include <EXTERN.h>
821#include <perl.h> 727#include <perl.h>
822#include <XSUB.h> 728#include <XSUB.h>
823],[ 729]], [[
824 PerlInterpreter *perl = perl_alloc (); 730 PerlInterpreter *perl = perl_alloc ();
825],[rxvt_perl_link=yes],[rxvt_perl_link=no]) 731]])],[rxvt_perl_link=yes],[rxvt_perl_link=no])
826 CXXFLAGS="$save_CXXFLAGS" 732 CXXFLAGS="$save_CXXFLAGS"
827 LIBS="$save_LIBS" 733 LIBS="$save_LIBS"
828 734
829 if test x$rxvt_perl_link = xyes; then 735 if test x$rxvt_perl_link = xyes; then
830 AC_MSG_RESULT(ok) 736 AC_MSG_RESULT(ok)
873 $1="/* #include <$2> */" 779 $1="/* #include <$2> */"
874fi dnl 780fi dnl
875AC_SUBST($1)]) 781AC_SUBST($1)])
876 782
877RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) 783RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch)
878RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch)
879RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch)
880RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch)
881RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch)
882RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch)
883RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch)
884RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch)
885RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) 784RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch)
886RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch)
887RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) 785RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch)
888RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch)
889RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes)
890 786
891AC_CONFIG_FILES([Makefile \ 787AC_CONFIG_FILES([Makefile \
892doc/Makefile \ 788doc/Makefile \
893src/Makefile \ 789src/Makefile \
894src/rxvtlib.h \ 790src/rxvtlib.h \

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines