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.7 by root, Wed Jan 18 08:33:34 2006 UTC vs.
Revision 1.14 by ayin, Sat Jan 21 00:09:06 2006 UTC

31AC_PROG_CC 31AC_PROG_CC
32AC_PROG_CXX 32AC_PROG_CXX
33AC_PROG_CPP 33AC_PROG_CPP
34AC_PROG_INSTALL 34AC_PROG_INSTALL
35 35
36AC_AIX
37AC_ISC_POSIX
38
36AC_LANG(C) 39AC_LANG(C)
37 40
38dnl# -------------------------------------------------------------------------- 41dnl check wetehr we can link with gcc -lsupc++
39dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
40dnl#
41if test -z "$orig_CXXFLAGS"; then
42 if test x$GCC = xyes && test "x$GXX" = xyes; then
43 CXXFLAGS="-g -O3"
44 else
45 CXXFLAGS="-O"
46 fi
47 CFLAGS="$CXXFLAGS"
48fi
49
50LINKER="$CXX" 42LINKER="$CXX"
51if test x$GCC = xyes && test x$GXX = xyes; then 43if test x$GCC = xyes && test x$GXX = xyes; then
52 AC_CHECK_LIB(supc++, main, [ 44 AC_CHECK_LIB(supc++, main, [
53 LINKER="$CC" 45 LINKER="$CC"
54 LIBS="$LIBS -lsupc++" 46 LIBS="$LIBS -lsupc++"
55 ]) 47 ])
56fi 48fi
57AC_SUBST(LINKER,[$LINKER]) 49AC_SUBST(LINKER,[$LINKER])
50
51AC_LANG(C++)
52dnl# --------------------------------------------------------------------------
53dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure'
54dnl#
55if test -z "$orig_CXXFLAGS"; then
56 if test x$GCC = xyes && test "x$GXX" = xyes; then
57 CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs"
58 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [], [CXXFLAGS="-g -O3"])
59 else
60 CXXFLAGS="-O"
61 fi
62 CFLAGS="$CXXFLAGS"
63fi
58 64
59AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) 65AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.)
60 66
61case $host in 67case $host in
62 *-*-solaris* ) 68 *-*-solaris* )
67esac 73esac
68 74
69dnl if test x$GXX = xyes; then 75dnl if test x$GXX = xyes; then
70dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... 76dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now...
71dnl fi 77dnl fi
72
73AC_LANG(C++)
74
75dnl# system hacks
76AC_AIX
77AC_ISC_POSIX
78 78
79dnl# FreeBSD needs to link libxpg4 79dnl# FreeBSD needs to link libxpg4
80AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) 80AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])])
81 81
82dnl# solaris needs to link libnsl and socket 82dnl# solaris needs to link libnsl and socket
531 sys/byteorder.h \ 531 sys/byteorder.h \
532 sys/ioctl.h \ 532 sys/ioctl.h \
533 sys/select.h \ 533 sys/select.h \
534 sys/sockio.h \ 534 sys/sockio.h \
535 sys/strredir.h \ 535 sys/strredir.h \
536 sys/stropts.h \ 536 sys/stropts.h \
537 sys/time.h \ 537 sys/time.h \
538 utmp.h \ 538 utmp.h \
539 utmpx.h \ 539 utmpx.h \
540 stdint.h \ 540 stdint.h \
541 pty.h \ 541 pty.h \
542 util.h \ 542 util.h \
543 libutil.h \ 543 libutil.h \
544 wchar.h \ 544 wchar.h \
545 cwchar \ 545 cwchar \
546 clocale \ 546 clocale \
547) 547)
548 548
549AC_HEADER_TIME 549AC_HEADER_TIME
550 550
551dnl# check to allow both <termios.h> and <sys/ioctl.h> 551dnl# check to allow both <termios.h> and <sys/ioctl.h>
626dnl AC_CHECK_SIZEOF(long, 4) 626dnl AC_CHECK_SIZEOF(long, 4)
627AC_CHECK_SIZEOF(long long, 8) 627AC_CHECK_SIZEOF(long long, 8)
628AC_CHECK_SIZEOF(int *, 4) 628AC_CHECK_SIZEOF(int *, 4)
629 629
630dnl# see usage below 630dnl# see usage below
631AC_DEFUN(RXVT_CHECK_SIZE, 631AC_DEFUN([RXVT_CHECK_SIZE],
632 [AC_CACHE_CHECK([for $2], $1, 632 [AC_CACHE_CHECK([for $2], $1,
633 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl 633 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl
634if test "$ac_cv_sizeof_char" -ge $3; then 634if test "$ac_cv_sizeof_char" -ge $3; then
635 $1="$4 char" 635 $1="$4 char"
636else 636else
733 733
734dnl# -------------------------------------------- 734dnl# --------------------------------------------
735AC_CHECK_HEADER(utmp.h, 735AC_CHECK_HEADER(utmp.h,
736[AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp, 736[AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp,
737[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> 737[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
738#include <stdint.h>
739#include <utmp.h>]], [[struct utmp ut;]])],[rxvt_cv_struct_utmp=yes],[rxvt_cv_struct_utmp=no])]) 738#include <utmp.h>]], [[struct utmp ut;]])],[rxvt_cv_struct_utmp=yes],[rxvt_cv_struct_utmp=no])])
740if test x$rxvt_cv_struct_utmp = xyes; then 739if test x$rxvt_cv_struct_utmp = xyes; then
741 AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) 740 AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp)
742fi 741fi
743] 742]
1424AC_ARG_PROGRAM 1423AC_ARG_PROGRAM
1425 1424
1426dnl# test for "sun" or "__sun__" before include sys_ioctl 1425dnl# test for "sun" or "__sun__" before include sys_ioctl
1427 1426
1428dnl# revert HAVE_BLAH_H into a "#include <blah.h>" 1427dnl# revert HAVE_BLAH_H into a "#include <blah.h>"
1429AC_DEFUN(RXVT_DEFINE_TO_INCLUDE, dnl 1428AC_DEFUN([RXVT_DEFINE_TO_INCLUDE], dnl
1430[if test "$$3" = "$4" -o "$$5" = "$6"; then 1429[if test "$$3" = "$4" -o "$$5" = "$6"; then
1431 $1="#include <$2>" 1430 $1="#include <$2>"
1432else 1431else
1433 $1="/* #include <$2> */" 1432 $1="/* #include <$2> */"
1434fi dnl 1433fi dnl

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines