[PATCH] configure: fixed <linux/ppdev.h> test

Yann Droneaud yann at droneaud.fr
Mon Mar 8 07:46:46 CST 2010


To test <linux/ppdev.h> availability, an ioctl() call is used.
But the function declaration and others elements needed to declare
ioctls are missing from <linux/ppdev.h>. Header <sys/ioctl.h> has to
be included first.
---
 configure.ac |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8eb37a2..84a2194 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1266,7 +1266,11 @@ test "x$FREETYPELIBS" = "x" && enable_fonts=${enable_fonts:-no}
 
 dnl **** Check for parport (currently Linux only) ****
 AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/ppdev.h>]], [[ioctl (1,PPCLAIM,0)]])],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+#include <linux/ppdev.h>
+]], [[ioctl (1,PPCLAIM,0);]])],
     [ac_cv_c_ppdev="yes"],[ac_cv_c_ppdev="no"]))
 if test "$ac_cv_c_ppdev" = "yes"
 then
-- 
1.6.2.5




More information about the wine-patches mailing list