comparison configure @ 22934:da61a88adf63

remove ugly #include from tvi_bsdbt848.c (better detection of bt848 headers)
author voroshil
date Mon, 09 Apr 2007 13:18:06 +0000
parents d8cfd3a1300e
children 0f9bd35f971a
comparison
equal deleted inserted replaced
22933:b99c2feda3eb 22934:da61a88adf63
6674 fi 6674 fi
6675 echores "$_tv" 6675 echores "$_tv"
6676 6676
6677 6677
6678 if bsd; then 6678 if bsd; then
6679 echocheck "*BSD BT848 bt8xx header"
6680 _ioctl_bt848_h=no
6681 for file in "machine/ioctl_bt848.h" \
6682 "dev/bktr/ioctl_bt848.h" \
6683 "dev/video/bktr/ioctl_bt848.h" \
6684 "dev/ic/bt8xx.h" ; do
6685 cat > $TMPC <<EOF
6686 #include <sys/types.h>
6687 #include <$file>
6688 int main(void) {
6689 ioctl(0, TVTUNER_GETFREQ, 0);
6690 return 0;
6691 }
6692 EOF
6693 if cc_check ; then
6694 _ioctl_bt848_h=yes
6695 _ioctl_bt848_h_name="$file"
6696 break;
6697 fi
6698 done
6699 if test "$_ioctl_bt848_h" = yes ; then
6700 _def_ioctl_bt848_h_name="#define IOCTL_BT848_H_NAME <$_ioctl_bt848_h_name>"
6701 _res_comment="using $_ioctl_bt848_h_name"
6702 else
6703 _def_ioctl_bt848_h_name="#undef IOCTL_BT848_H_NAME"
6704 fi
6705 echores "$_ioctl_bt848_h"
6706
6707 echocheck "*BSD ioctl_meteor.h"
6708 _ioctl_meteor_h=no
6709 for file in "machine/ioctl_meteor.h" \
6710 "dev/bktr/ioctl_meteor.h" \
6711 "dev/video/bktr/ioctl_meteor.h" ; do
6712 cat > $TMPC <<EOF
6713 #include <sys/types.h>
6714 #include <$file>
6715 int main(void) {
6716 ioctl(0, METEORSINPUT, 0);
6717 return 0;
6718 }
6719 EOF
6720 if cc_check ; then
6721 _ioctl_meteor_h=yes
6722 _ioctl_meteor_h_name="$file"
6723 break;
6724 fi
6725 done
6726 if test "$_ioctl_meteor_h" = yes ; then
6727 _def_ioctl_meteor_h_name="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
6728 _res_comment="using $_ioctl_meteor_h_name"
6729 else
6730 _def_ioctl_meteor_h_name="#undef IOCTL_METEOR_H_NAME"
6731 fi
6732 echores "$_ioctl_meteor_h"
6733
6679 echocheck "*BSD BrookTree 848 TV interface" 6734 echocheck "*BSD BrookTree 848 TV interface"
6680 if test "$_tv_bsdbt848" = auto ; then 6735 if test "$_tv_bsdbt848" = auto ; then
6681 _tv_bsdbt848=no 6736 _tv_bsdbt848=no
6682 if test "$_tv" = yes ; then 6737 if test "$_tv" = yes ; then
6683 cat > $TMPC <<EOF 6738 cat > $TMPC <<EOF
6684 #include <sys/types.h> 6739 #include <sys/types.h>
6685 #if defined(__NetBSD__) 6740 $_def_ioctl_meteor_h_name
6686 #include <dev/ic/bt8xx.h> 6741 $_def_ioctl_bt848_h_name
6687 #else 6742 #ifdef IOCTL_METEOR_H_NAME
6688 #include <machine/ioctl_bt848.h> 6743 #include IOCTL_METEOR_H_NAME
6689 #endif 6744 #endif
6690 int main(void) { return 0; } 6745 #ifdef IOCTL_BT848_H_NAME
6746 #include IOCTL_BT848_H_NAME
6747 #endif
6748 int main(void){
6749 ioctl(0, METEORSINPUT, 0);
6750 ioctl(0, TVTUNER_GETFREQ, 0);
6751 return 0;
6752 }
6691 EOF 6753 EOF
6692 cc_check && _tv_bsdbt848=yes 6754 cc_check && _tv_bsdbt848=yes
6693 fi 6755 fi
6694 fi 6756 fi
6695 if test "$_tv_bsdbt848" = yes ; then 6757 if test "$_tv_bsdbt848" = yes ; then
8093 $_def_tv_v4l1 8155 $_def_tv_v4l1
8094 8156
8095 /* Enable Video 4 Linux 2 TV interface support */ 8157 /* Enable Video 4 Linux 2 TV interface support */
8096 $_def_tv_v4l2 8158 $_def_tv_v4l2
8097 8159
8160 /* *BSD BrookTree headers */
8161 $_def_ioctl_meteor_h_name
8162 $_def_ioctl_bt848_h_name
8163
8098 /* Enable *BSD BrookTree TV interface support */ 8164 /* Enable *BSD BrookTree TV interface support */
8099 $_def_tv_bsdbt848 8165 $_def_tv_bsdbt848
8100 8166
8101 /* Enable Radio Interface support */ 8167 /* Enable Radio Interface support */
8102 $_def_radio 8168 $_def_radio