## ------------------------ ## Python file handling ## From Andrew Dalke ## Updated by James Henstridge ## ------------------------ # Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # AM_PATH_PYTHON([MINIMUM-VERSION]) # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 1.5 are not dnl supported because the default installation locations changed from dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages dnl in 1.5. m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python2 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST) am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST : ; do if test "$am_cv_pathless_PYTHON" = : ; then AC_MSG_ERROR([no suitable Python interpreter found]) fi AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`]) AC_SUBST([PYTHON_PL
#
# $Id: README.MatrixOrbital,v 1.2 2000/03/22 07:33:50 reinelt Exp $
#
This is the README file for the MatrixOrbital display driver for lcd4linux
This driver supports the serial interface alphanumeric display modules by
Matrix Orbital Corporation (http://www.matrixorbital.com).
I could only test it with the LCD2041 model, but I think every other (LCD) model
should work. These displays are supported:
LCD0821: 2 lines by 8 characters
LCD1621: 2 lines by 16 characters
LCD2021: 2 lines by 20 characters
LCD2041: 4 lines by 20 characters (tested)
LCD4021: 2 lines by 40 characters
I could not test the vacuum fluorescent display models, but I think they should work, too.
There are no entries for this models in the driver table (at the bottom of MatrixOrbital.c),
but they could be easily added.
The displays come with an RS-232 and an I2C interface. The driver supports the RS-232 interface
only (because I have no idea how to find the I2C bus on my motherboard).
Power can be applied either via an external DC power supply, a modified floppy power connector
(be aware that you can destroy your display if you get the pins wrong!) or via the RI (ring)
signal of the RS-232 port. I choosed the latter, and modified a serial card so that it supplies
+5V from the ISA bus to this pin (again, be aware that this is dangerous if you connect any other
serial device to this modified port).
The driver supports vertical, horizontal and split bars (two independent bars in one line),
all bar types can be used simultanously. As the displays only have 8 user-defined characters,
the needed characters to display all the bars must be reduced to 8. This is done by replacing
characters with similar ones. To reduce flicker, a character which is displayed at the moment,
will not be redefined, even if it's not used in this run. Only if the character compaction
fails, this characters will be redefined, too.
The displays have a GPO (general purpose output), where you can connect a LED or something.
The driver supports controlling this GPO, but this function is unused by now.
Configuration:
The driver needs/supports the following entries in lcd4linux.conf:
Display: a valid Matrix Orbital Display name (e.g. "LCD2041")
Port: serial device the display is attached to (e.g. /dev/ttyS2)
Speed: the baud rate from the display (configured via jumpers) must match
this value. Possible values are 1200, 2400, 9600 and 19200
Contrast: sets the LCD display contrast to a level between 0 (light)
and 256 (dark). Default value: 160