changeset 32659:07549885dad7

configure: Simplify *BSD ioctl_meteor.h check.
author diego
date Sun, 02 Jan 2011 12:10:51 +0000
parents 7246ea769aef
children 426e6c6a36d2
files configure
diffstat 1 files changed, 5 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sun Jan 02 12:05:23 2011 +0000
+++ b/configure	Sun Jan 02 12:10:51 2011 +0000
@@ -7297,23 +7297,13 @@
 
   echocheck "*BSD ioctl_meteor.h"
   _ioctl_meteor_h=no
-  for file in "machine/ioctl_meteor.h" \
-            "dev/bktr/ioctl_meteor.h" \
-            "dev/video/bktr/ioctl_meteor.h" ; do
-    cat > $TMPC <<EOF
-#include <sys/types.h>
-#include <$file>
-int main(void) { ioctl(0, METEORSINPUT, 0); return 0; }
-EOF
-    if cc_check ; then
-     _ioctl_meteor_h=yes
-     _ioctl_meteor_h_name="$file"
-     break;
-    fi
+  for ioctl_meteor_h_path in "machine/ioctl_meteor.h" "dev/bktr/ioctl_meteor.h" "dev/video/bktr/ioctl_meteor.h" ; do
+    statement_check_broken "sys/types.h" "$ioctl_meteor_h_path" 'ioctl(0, METEORSINPUT, 0)' &&
+      _ioctl_meteor_h=yes && break
   done
   if test "$_ioctl_meteor_h" = yes ; then
-    def_ioctl_meteor_h_name="#define IOCTL_METEOR_H_NAME <$_ioctl_meteor_h_name>"
-    res_comment="using $_ioctl_meteor_h_name"
+    def_ioctl_meteor_h_name="#define IOCTL_METEOR_H_NAME <$ioctl_meteor_h_path>"
+    res_comment="using $ioctl_meteor_h_path"
   else
     def_ioctl_meteor_h_name="#undef IOCTL_METEOR_H_NAME"
   fi