… | |
… | |
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 | |
488 | |
490 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
489 | 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, |
490 | 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> |
491 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
… | |
… | |
518 | dnl# -------------------------------------------------------------------------- |
517 | dnl# -------------------------------------------------------------------------- |
519 | dnl# CHECKING FOR MISSING TYPEDEFS |
518 | dnl# CHECKING FOR MISSING TYPEDEFS |
520 | dnl# -------------------------------------------------------------------------- |
519 | dnl# -------------------------------------------------------------------------- |
521 | dnl# Missing typedefs and replacements |
520 | dnl# Missing typedefs and replacements |
522 | AC_TYPE_MODE_T |
521 | 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 |
522 | AC_TYPE_PID_T |
526 | AC_TYPE_UID_T |
523 | AC_TYPE_UID_T |
527 | |
524 | AC_TYPE_INT16_T |
528 | AC_CHECK_SIZEOF(short, 2) |
525 | AC_TYPE_UINT16_T |
529 | AC_CHECK_SIZEOF(int, 4) |
526 | AC_TYPE_INT32_T |
530 | dnl AC_CHECK_SIZEOF(long, 4) |
527 | 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 | |
528 | |
585 | dnl# -------------------------------------------------------------------------- |
529 | dnl# -------------------------------------------------------------------------- |
586 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
530 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
587 | dnl# -------------------------------------------------------------------------- |
531 | dnl# -------------------------------------------------------------------------- |
588 | AC_CHECK_FUNCS(unsetenv) |
532 | AC_CHECK_FUNCS(unsetenv) |
… | |
… | |
776 | |
720 | |
777 | save_CXXFLAGS="$CXXFLAGS" |
721 | save_CXXFLAGS="$CXXFLAGS" |
778 | save_LIBS="$LIBS" |
722 | save_LIBS="$LIBS" |
779 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
723 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
780 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
724 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
781 | AC_TRY_LINK([ |
725 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
782 | #include <EXTERN.h> |
726 | #include <EXTERN.h> |
783 | #include <perl.h> |
727 | #include <perl.h> |
784 | #include <XSUB.h> |
728 | #include <XSUB.h> |
785 | ],[ |
729 | ]], [[ |
786 | PerlInterpreter *perl = perl_alloc (); |
730 | PerlInterpreter *perl = perl_alloc (); |
787 | ],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
731 | ]])],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
788 | CXXFLAGS="$save_CXXFLAGS" |
732 | CXXFLAGS="$save_CXXFLAGS" |
789 | LIBS="$save_LIBS" |
733 | LIBS="$save_LIBS" |
790 | |
734 | |
791 | if test x$rxvt_perl_link = xyes; then |
735 | if test x$rxvt_perl_link = xyes; then |
792 | AC_MSG_RESULT(ok) |
736 | AC_MSG_RESULT(ok) |