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.87 by ayin, Mon Dec 10 19:17:29 2007 UTC vs.
Revision 1.97 by ayin, Tue Dec 11 18:07:08 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
27orig_CXXFLAGS="$CXXFLAGS" 26orig_CXXFLAGS="$CXXFLAGS"
28 27
29dnl# Checks for programs. 28dnl# Checks for programs.
30dnl AC_MAKE_SET
31
32AC_PROG_CC 29AC_PROG_CC
33AC_PROG_CXX 30AC_PROG_CXX
34AC_PROG_CPP 31AC_PROG_CPP
35AC_PROG_INSTALL 32AC_PROG_INSTALL
36 33
37AC_AIX 34AC_AIX
35AC_GNU_SOURCE
38AC_ISC_POSIX 36AC_ISC_POSIX
39AC_LANG(C++) 37AC_LANG(C++)
40 38
41dnl check wether we can link with gcc -lsupc++ 39dnl check wether we can link with gcc -lsupc++
42if test x$GCC = xyes && test x$GXX = xyes; then 40if test x$GCC = xyes && test x$GXX = xyes; then
71 CXXFLAGS="-O" 69 CXXFLAGS="-O"
72 fi 70 fi
73 CFLAGS="$CXXFLAGS" 71 CFLAGS="$CXXFLAGS"
74fi 72fi
75 73
76AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.)
77
78case $host in 74case $host in
79 *-*-solaris* ) 75 *-*-solaris* )
80 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)
81 ;; 77 ;;
82esac 78esac
83
84dnl if test x$GXX = xyes; then
85dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now...
86dnl fi
87 79
88dnl# FreeBSD needs to link libxpg4 80dnl# FreeBSD needs to link libxpg4
89AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) 81AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])])
90 82
91dnl# solaris needs to link libnsl and socket 83dnl# solaris needs to link libnsl and socket
123 115
124dnl# -------------------------------------------------------------------------- 116dnl# --------------------------------------------------------------------------
125dnl# CHECKING COMMAND LINE OPTIONS 117dnl# CHECKING COMMAND LINE OPTIONS
126dnl# -------------------------------------------------------------------------- 118dnl# --------------------------------------------------------------------------
127 119
128if test "x$enable_shared" = xyes; then 120dnl if test "x$enable_shared" = xyes; then
129 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)
130 INSTALL_LIBRXVT=yes 122dnl INSTALL_LIBRXVT=yes
131fi 123dnl fi
132AC_SUBST(INSTALL_LIBRXVT) 124dnl AC_SUBST(INSTALL_LIBRXVT)
133 125
134AC_ARG_ENABLE(everything, 126AC_ARG_ENABLE(everything,
135 [ --enable-everything enable standard non-multichoice features 127 [ --enable-everything enable standard non-multichoice features
136 NOTE: this option is order dependent], 128 NOTE: this option is order dependent],
137 [ 129 [
482fi 474fi
483 475
484dnl# -------------------------------------------------------------------------- 476dnl# --------------------------------------------------------------------------
485dnl# CHECKING FOR HEADER FILES 477dnl# CHECKING FOR HEADER FILES
486dnl# -------------------------------------------------------------------------- 478dnl# --------------------------------------------------------------------------
487AC_HEADER_SYS_WAIT
488AC_CHECK_HEADERS( \ 479AC_CHECK_HEADERS( \
489 assert.h \
490 fcntl.h \
491 stdarg.h \
492 stdlib.h \
493 string.h \
494 termios.h \
495 unistd.h \
496 sys/byteorder.h \ 480 sys/byteorder.h \
497 sys/ioctl.h \ 481 sys/ioctl.h \
498 sys/select.h \
499 sys/sockio.h \ 482 sys/sockio.h \
500 sys/strredir.h \ 483 sys/strredir.h \
501 sys/time.h \
502 stdint.h \ 484 stdint.h \
503 wchar.h \ 485 wchar.h \
504 cwchar \ 486 cwchar \
505 clocale \ 487 clocale \
506) 488)
507 489
508AC_HEADER_TIME
509
510dnl# check to allow both <termios.h> and <sys/ioctl.h> 490dnl# check to allow both <termios.h> and <sys/ioctl.h>
511AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, 491AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl,
512[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> 492[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
513#include <sys/ioctl.h> 493#include <sys/ioctl.h>
514#ifdef HAVE_TERMIOS_H
515#include <termios.h> 494#include <termios.h>
516#endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) 495]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])])
517 496
518AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, 497AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer,
519[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) 498[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])])
520if test x$rxvt_cv_xpointer = xyes; then 499if test x$rxvt_cv_xpointer = xyes; then
521 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) 500 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef)
534)]) 513)])
535if test x$rxvt_xlib_illegal_access = xyes; then 514if test x$rxvt_xlib_illegal_access = xyes; then
536 AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) 515 AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it)
537fi 516fi
538 517
539AC_C_CONST
540AC_C_INLINE
541
542dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow.
543
544dnl# -------------------------------------------------------------------------- 518dnl# --------------------------------------------------------------------------
545dnl# CHECKING FOR MISSING TYPEDEFS 519dnl# CHECKING FOR MISSING TYPEDEFS
546dnl# -------------------------------------------------------------------------- 520dnl# --------------------------------------------------------------------------
547dnl# Missing typedefs and replacements 521dnl# Missing typedefs and replacements
548AC_TYPE_MODE_T 522AC_TYPE_MODE_T
555AC_CHECK_SIZEOF(int, 4) 529AC_CHECK_SIZEOF(int, 4)
556dnl AC_CHECK_SIZEOF(long, 4) 530dnl AC_CHECK_SIZEOF(long, 4)
557AC_CHECK_SIZEOF(long long, 8) 531AC_CHECK_SIZEOF(long long, 8)
558AC_CHECK_SIZEOF(int *, 4) 532AC_CHECK_SIZEOF(int *, 4)
559 533
560dnl# see usage below 534AC_TYPE_INT16_T
561AC_DEFUN([RXVT_CHECK_SIZE], 535AC_TYPE_UINT16_T
562 [AC_CACHE_CHECK([for $2], $1, 536AC_TYPE_INT32_T
563 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl 537AC_TYPE_UINT32_T
564if test "$ac_cv_sizeof_char" -ge $3; then
565 $1="$4 char"
566else
567 if test "$ac_cv_sizeof_short" -ge $3; then
568 $1="$4 short"
569 else
570 if test "$ac_cv_sizeof_int" -ge $3; then
571 $1="$4 int"
572 else
573 if test "$ac_cv_sizeof_long" -ge $3; then
574 $1="$4 long"
575 else
576 if test "$ac_cv_sizeof_long_long" -ge $3; then
577 $1="$4 long long"
578 else
579 $1="$4 $5" # we _must_ have a (possibly wrong) default
580 fi
581 fi
582 fi
583 fi
584fi])])]
585if test x"$$1" != xyes; then
586 $6="typedef $$1 $2;"
587else
588 if test x"$4" = x; then
589 $6="/* typedef $5 $2; */"
590 else
591 $6="/* typedef $4 $5 $2; */"
592 fi
593fi dnl
594)
595dnl#
596dnl# Look for types the system may know about anyway.
597dnl#
598RXVT_CHECK_SIZE(rxvt_cv_int16_t, int16_t, 2, , short, rxvt_int16_typedef)
599AC_SUBST(rxvt_int16_typedef)
600RXVT_CHECK_SIZE(rxvt_cv_uint16_t, uint16_t, 2, unsigned, short, rxvt_uint16_typedef)
601AC_SUBST(rxvt_uint16_typedef)
602RXVT_CHECK_SIZE(rxvt_cv_int32_t, int32_t, 4, , int, rxvt_int32_typedef)
603AC_SUBST(rxvt_int32_typedef)
604RXVT_CHECK_SIZE(rxvt_cv_uint32_t, uint32_t, 4, unsigned, int, rxvt_uint32_typedef)
605AC_SUBST(rxvt_uint32_typedef)
606dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef)
607dnl AC_SUBST(rxvt_int64_typedef)
608dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef)
609dnl AC_SUBST(rxvt_uint64_typedef)
610dnl#
611dnl# Now look for another we use
612dnl#
613if test "$ac_cv_sizeof_int_p" -eq 8; then
614 rxvt_intp_define="#define intp_t int64_t"
615 rxvt_u_intp_define="#define u_intp_t u_int64_t"
616else
617 if test "$ac_cv_sizeof_int_p" -eq 4; then
618 rxvt_intp_define="#define intp_t int32_t"
619 rxvt_u_intp_define="#define u_intp_t u_int32_t"
620 else
621 if test "$ac_cv_sizeof_int_p" -eq 2; then
622 rxvt_intp_define="#define intp_t int16_t"
623 rxvt_u_intp_define="#define u_intp_t u_int16_t"
624 else
625 rxvt_intp_define="#error set intp_t"
626 rxvt_u_intp_define="#error set u_intp_t"
627 fi
628 fi
629fi
630AC_SUBST(rxvt_intp_define)
631AC_SUBST(rxvt_u_intp_define)
632 538
633dnl# -------------------------------------------------------------------------- 539dnl# --------------------------------------------------------------------------
634dnl# CHECKING FOR LIBRARY FUNCTIONS 540dnl# CHECKING FOR LIBRARY FUNCTIONS
635dnl# -------------------------------------------------------------------------- 541dnl# --------------------------------------------------------------------------
636AC_TYPE_SIGNAL
637dnl> AC_FUNC_VPRINTF
638
639AC_CHECK_FUNCS(unsetenv) 542AC_CHECK_FUNCS(unsetenv)
640 543
641UTMP_CHECK 544UTMP_CHECK
642 545
643dnl# -------------------------------------------------------------------------- 546dnl# --------------------------------------------------------------------------
886 $1="/* #include <$2> */" 789 $1="/* #include <$2> */"
887fi dnl 790fi dnl
888AC_SUBST($1)]) 791AC_SUBST($1)])
889 792
890RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) 793RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch)
891RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch)
892RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch)
893RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch)
894RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch)
895RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch)
896RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch)
897RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch)
898RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) 794RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch)
899RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch)
900RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) 795RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch)
901RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch)
902RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes)
903 796
904AC_CONFIG_FILES([Makefile \ 797AC_CONFIG_FILES([Makefile \
905doc/Makefile \ 798doc/Makefile \
906src/Makefile \ 799src/Makefile \
907src/rxvtlib.h \ 800src/rxvtlib.h \

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines