aboutsummaryrefslogtreecommitdiff
path: root/m4/iem_parallelport.m4
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2015-03-05 15:09:05 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2015-03-05 15:09:05 +0000
commit3620a1ce26b6a139e3bc6b0f13f6fe9e85ff7c4a (patch)
treeb03e9788817a686b6bd271c8c24c9a03333360c7 /m4/iem_parallelport.m4
parent05f71533d872a0dfd055ef36125e1492ef438468 (diff)
added missing files for autotools migration
svn path=/trunk/externals/iem/iemmatrix/; revision=17433
Diffstat (limited to 'm4/iem_parallelport.m4')
-rw-r--r--m4/iem_parallelport.m439
1 files changed, 39 insertions, 0 deletions
diff --git a/m4/iem_parallelport.m4 b/m4/iem_parallelport.m4
new file mode 100644
index 0000000..c6b5fbe
--- /dev/null
+++ b/m4/iem_parallelport.m4
@@ -0,0 +1,39 @@
+dnl Copyright (C) 2005-2006 IOhannes m zmölnig
+dnl This file is free software; IOhannes m zmölnig
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([IEM_CHECK_LPT],
+[
+dnl check for LPT
+AC_ARG_ENABLE(lpt, [ --enable-lpt enable parallelport-support])
+
+if test "x" = "x${enable_lpt}" ; then
+ enable_lpt="${with_lpt}"
+fi
+
+AC_CHECK_HEADERS(linux/ppdev.h, [ have_ppdev=" (with device-support)" ], [ have_ppdev="" ])
+
+if test x"$enable_lpt" != "xno"
+then
+ AC_MSG_CHECKING([parallel-port])
+ if test "x$enable_lpt" = "xyes"
+ then
+# forced
+ AC_DEFINE([Z_WANT_LPT], [1], [Define if you want parallelport support])
+ have_lpt="yes (forced)"
+ else
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/io.h>]], [[ ioperm(0x3bc, 8, 1); outb(0, 0x3bc); ioperm(0x3bc, 8, 0); ]])],
+ [have_lpt="yes"], [have_lpt="no"])
+ fi
+fi
+
+if test "x$have_lpt" != "xno"; then
+ AC_DEFINE([Z_WANT_LPT], [1], [Define if you want line printer support])
+ AC_MSG_RESULT([$have_lpt$have_ppdev])
+else
+ AC_MSG_RESULT([no])
+fi
+AM_CONDITIONAL([LPT], [test "x${have_lpt}" != "xno"])
+
+]) dnl IEM_CHECK_LPT