… | |
… | |
482 | sys/sockio.h \ |
482 | sys/sockio.h \ |
483 | sys/strredir.h \ |
483 | sys/strredir.h \ |
484 | stdint.h \ |
484 | stdint.h \ |
485 | wchar.h \ |
485 | wchar.h \ |
486 | cwchar \ |
486 | cwchar \ |
487 | clocale \ |
|
|
488 | ) |
487 | ) |
489 | |
|
|
490 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
|
|
491 | AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
|
|
492 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
|
|
493 | #include <sys/ioctl.h> |
|
|
494 | #include <termios.h> |
|
|
495 | ]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
|
|
496 | |
488 | |
497 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
489 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
498 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
490 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
499 | if test x$rxvt_cv_xpointer = xyes; then |
491 | if test x$rxvt_cv_xpointer = xyes; then |
500 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
492 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
… | |
… | |
518 | dnl# -------------------------------------------------------------------------- |
510 | dnl# -------------------------------------------------------------------------- |
519 | dnl# CHECKING FOR MISSING TYPEDEFS |
511 | dnl# CHECKING FOR MISSING TYPEDEFS |
520 | dnl# -------------------------------------------------------------------------- |
512 | dnl# -------------------------------------------------------------------------- |
521 | dnl# Missing typedefs and replacements |
513 | dnl# Missing typedefs and replacements |
522 | AC_TYPE_MODE_T |
514 | AC_TYPE_MODE_T |
523 | dnl> AC_CHECK_TYPE(umode_t, int) |
|
|
524 | dnl> AC_CHECK_TYPE(off_t, long) |
|
|
525 | AC_TYPE_PID_T |
515 | AC_TYPE_PID_T |
526 | AC_TYPE_UID_T |
516 | AC_TYPE_UID_T |
527 | |
517 | AC_TYPE_INT16_T |
528 | AC_CHECK_SIZEOF(short, 2) |
518 | AC_TYPE_UINT16_T |
529 | AC_CHECK_SIZEOF(int, 4) |
519 | AC_TYPE_INT32_T |
530 | dnl AC_CHECK_SIZEOF(long, 4) |
520 | AC_TYPE_UINT32_T |
531 | AC_CHECK_SIZEOF(long long, 8) |
|
|
532 | AC_CHECK_SIZEOF(int *, 4) |
|
|
533 | |
|
|
534 | dnl# see usage below |
|
|
535 | AC_DEFUN([RXVT_CHECK_SIZE], |
|
|
536 | [AC_CACHE_CHECK([for $2], $1, |
|
|
537 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
|
|
538 | if test "$ac_cv_sizeof_char" -ge $3; then |
|
|
539 | $1="$4 char" |
|
|
540 | else |
|
|
541 | if test "$ac_cv_sizeof_short" -ge $3; then |
|
|
542 | $1="$4 short" |
|
|
543 | else |
|
|
544 | if test "$ac_cv_sizeof_int" -ge $3; then |
|
|
545 | $1="$4 int" |
|
|
546 | else |
|
|
547 | if test "$ac_cv_sizeof_long" -ge $3; then |
|
|
548 | $1="$4 long" |
|
|
549 | else |
|
|
550 | if test "$ac_cv_sizeof_long_long" -ge $3; then |
|
|
551 | $1="$4 long long" |
|
|
552 | else |
|
|
553 | $1="$4 $5" # we _must_ have a (possibly wrong) default |
|
|
554 | fi |
|
|
555 | fi |
|
|
556 | fi |
|
|
557 | fi |
|
|
558 | fi])])] |
|
|
559 | if test x"$$1" != xyes; then |
|
|
560 | $6="typedef $$1 $2;" |
|
|
561 | else |
|
|
562 | if test x"$4" = x; then |
|
|
563 | $6="/* typedef $5 $2; */" |
|
|
564 | else |
|
|
565 | $6="/* typedef $4 $5 $2; */" |
|
|
566 | fi |
|
|
567 | fi dnl |
|
|
568 | ) |
|
|
569 | dnl# |
|
|
570 | dnl# Look for types the system may know about anyway. |
|
|
571 | dnl# |
|
|
572 | RXVT_CHECK_SIZE(rxvt_cv_int16_t, int16_t, 2, , short, rxvt_int16_typedef) |
|
|
573 | AC_SUBST(rxvt_int16_typedef) |
|
|
574 | RXVT_CHECK_SIZE(rxvt_cv_uint16_t, uint16_t, 2, unsigned, short, rxvt_uint16_typedef) |
|
|
575 | AC_SUBST(rxvt_uint16_typedef) |
|
|
576 | RXVT_CHECK_SIZE(rxvt_cv_int32_t, int32_t, 4, , int, rxvt_int32_typedef) |
|
|
577 | AC_SUBST(rxvt_int32_typedef) |
|
|
578 | RXVT_CHECK_SIZE(rxvt_cv_uint32_t, uint32_t, 4, unsigned, int, rxvt_uint32_typedef) |
|
|
579 | AC_SUBST(rxvt_uint32_typedef) |
|
|
580 | dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef) |
|
|
581 | dnl AC_SUBST(rxvt_int64_typedef) |
|
|
582 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
|
|
583 | dnl AC_SUBST(rxvt_uint64_typedef) |
|
|
584 | |
521 | |
585 | dnl# -------------------------------------------------------------------------- |
522 | dnl# -------------------------------------------------------------------------- |
586 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
523 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
587 | dnl# -------------------------------------------------------------------------- |
524 | dnl# -------------------------------------------------------------------------- |
588 | AC_CHECK_FUNCS(unsetenv) |
525 | AC_CHECK_FUNCS(unsetenv) |
… | |
… | |
776 | |
713 | |
777 | save_CXXFLAGS="$CXXFLAGS" |
714 | save_CXXFLAGS="$CXXFLAGS" |
778 | save_LIBS="$LIBS" |
715 | save_LIBS="$LIBS" |
779 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
716 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
780 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
717 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
781 | AC_TRY_LINK([ |
718 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
782 | #include <EXTERN.h> |
719 | #include <EXTERN.h> |
783 | #include <perl.h> |
720 | #include <perl.h> |
784 | #include <XSUB.h> |
721 | #include <XSUB.h> |
785 | ],[ |
722 | ]], [[ |
786 | PerlInterpreter *perl = perl_alloc (); |
723 | PerlInterpreter *perl = perl_alloc (); |
787 | ],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
724 | ]])],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
788 | CXXFLAGS="$save_CXXFLAGS" |
725 | CXXFLAGS="$save_CXXFLAGS" |
789 | LIBS="$save_LIBS" |
726 | LIBS="$save_LIBS" |
790 | |
727 | |
791 | if test x$rxvt_perl_link = xyes; then |
728 | if test x$rxvt_perl_link = xyes; then |
792 | AC_MSG_RESULT(ok) |
729 | AC_MSG_RESULT(ok) |
… | |
… | |
823 | AC_SUBST(AFTERIMAGE_CFLAGS) |
760 | AC_SUBST(AFTERIMAGE_CFLAGS) |
824 | AC_SUBST(AFTERIMAGE_LIBS) |
761 | AC_SUBST(AFTERIMAGE_LIBS) |
825 | |
762 | |
826 | AC_ARG_PROGRAM |
763 | AC_ARG_PROGRAM |
827 | |
764 | |
828 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
|
|
829 | |
|
|
830 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
|
|
831 | AC_DEFUN([RXVT_DEFINE_TO_INCLUDE], dnl |
|
|
832 | [if test "$$3" = "$4" -o "$$5" = "$6"; then |
|
|
833 | $1="#include <$2>" |
|
|
834 | else |
|
|
835 | $1="/* #include <$2> */" |
|
|
836 | fi dnl |
|
|
837 | AC_SUBST($1)]) |
|
|
838 | |
|
|
839 | RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) |
|
|
840 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
|
|
841 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
|
|
842 | |
|
|
843 | AC_CONFIG_FILES([Makefile \ |
765 | AC_CONFIG_FILES([Makefile \ |
844 | doc/Makefile \ |
766 | doc/Makefile \ |
845 | src/Makefile \ |
767 | src/Makefile \ |
846 | src/rxvtlib.h \ |
|
|
847 | ]) |
768 | ]) |
848 | AC_OUTPUT |
769 | AC_OUTPUT |
849 | |
770 | |
850 | echo "Configuration: |
771 | echo "Configuration: |
851 | |
772 | |