aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile.am26
-rw-r--r--Makefile.in22
-rw-r--r--Raster.c11
-rw-r--r--XWindow.c9
-rw-r--r--aclocal.m413
-rwxr-xr-xconfigure326
-rw-r--r--configure.in75
-rw-r--r--display.c46
8 files changed, 362 insertions, 166 deletions
diff --git a/Makefile.am b/Makefile.am
index 9cfac63..00f9462 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,9 +7,8 @@ bin_PROGRAMS = lcd4linux
AM_CFLAGS = $(X_CFLAGS) -D_GNU_SOURCE -Wall
lcd4linux_LDFLAGS = $(X_LIBS)
-if WITH_X
-lcd4linux_LDADD = -lX11
-endif
+lcd4linux_LDADD = @DRIVERS@ @DRVLIBS@
+lcd4linux_DEPENDENCIES = @DRIVERS@
lcd4linux_SOURCES = \
lcd4linux.c \
@@ -26,16 +25,19 @@ filter.c filter.h \
udelay.c udelay.h \
display.c display.h \
pixmap.c pixmap.h \
-fontmap.c fontmap.h \
-Skeleton.c \
-MatrixOrbital.c \
+fontmap.c fontmap.h
+
+EXTRA_lcd4linux_SOURCES= \
BeckmannEgle.c \
-HD44780.c \
Crystalfontz.c Crystalfontz.h \
-SIN.c \
+HD44780.c \
+MatrixOrbital.c \
PalmPilot.c \
-Raster.c \
-XWindow.c
+PNG.c \
+PPM.c \
+SIN.c \
+Skeleton.c \
+XWindow.c
EXTRA_DIST = \
lcd4linux.conf.sample \
@@ -52,4 +54,6 @@ README.HD44780 \
README.Crystalfontz \
README.X11 \
README.KDE \
-README.Raster
+README.Raster \
+README.Png
+
diff --git a/Makefile.in b/Makefile.in
index 3adfe2e..7ef71df 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -59,6 +59,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
AWK = @AWK@
CC = @CC@
+DRIVERS = @DRIVERS@
+DRVLIBS = @DRVLIBS@
LN_S = @LN_S@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
@@ -71,12 +73,16 @@ bin_PROGRAMS = lcd4linux
AM_CFLAGS = $(X_CFLAGS) -D_GNU_SOURCE -Wall
lcd4linux_LDFLAGS = $(X_LIBS)
-@WITH_X_TRUE@lcd4linux_LDADD = -lX11
+lcd4linux_LDADD = @DRIVERS@ @DRVLIBS@
+lcd4linux_DEPENDENCIES = @DRIVERS@
-lcd4linux_SOURCES = lcd4linux.c debug.c debug.h cfg.c cfg.h lock.c lock.h parser.c parser.h processor.c processor.h system.c system.h isdn.c isdn.h mail.c mail.h seti.c seti.h filter.c filter.h udelay.c udelay.h display.c display.h pixmap.c pixmap.h fontmap.c fontmap.h Skeleton.c MatrixOrbital.c BeckmannEgle.c HD44780.c Crystalfontz.c Crystalfontz.h SIN.c PalmPilot.c Raster.c XWindow.c
+lcd4linux_SOURCES = lcd4linux.c debug.c debug.h cfg.c cfg.h lock.c lock.h parser.c parser.h processor.c processor.h system.c system.h isdn.c isdn.h mail.c mail.h seti.c seti.h filter.c filter.h udelay.c udelay.h display.c display.h pixmap.c pixmap.h fontmap.c fontmap.h
-EXTRA_DIST = lcd4linux.conf.sample lcd4kde.conf lcd4linux.kdelnk lcd4linux.xpm lcd4linux.lsm CREDITS FAQ TODO README.Drivers README.MatrixOrbital README.HD44780 README.Crystalfontz README.X11 README.KDE README.Raster
+EXTRA_lcd4linux_SOURCES = BeckmannEgle.c Crystalfontz.c Crystalfontz.h HD44780.c MatrixOrbital.c PalmPilot.c PNG.c PPM.c SIN.c Skeleton.c XWindow.c
+
+
+EXTRA_DIST = lcd4linux.conf.sample lcd4kde.conf lcd4linux.kdelnk lcd4linux.xpm lcd4linux.lsm CREDITS FAQ TODO README.Drivers README.MatrixOrbital README.HD44780 README.Crystalfontz README.X11 README.KDE README.Raster README.Png
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -94,9 +100,7 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
lcd4linux_OBJECTS = lcd4linux.o debug.o cfg.o lock.o parser.o \
processor.o system.o isdn.o mail.o seti.o filter.o udelay.o display.o \
-pixmap.o fontmap.o Skeleton.o MatrixOrbital.o BeckmannEgle.o HD44780.o \
-Crystalfontz.o SIN.o PalmPilot.o Raster.o XWindow.o
-@WITH_X_TRUE@lcd4linux_DEPENDENCIES =
+pixmap.o fontmap.o
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
@@ -110,13 +114,13 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
DEP_FILES = .deps/BeckmannEgle.P .deps/Crystalfontz.P .deps/HD44780.P \
-.deps/MatrixOrbital.P .deps/PalmPilot.P .deps/Raster.P .deps/SIN.P \
-.deps/Skeleton.P .deps/XWindow.P .deps/cfg.P .deps/debug.P \
+.deps/MatrixOrbital.P .deps/PNG.P .deps/PPM.P .deps/PalmPilot.P \
+.deps/SIN.P .deps/Skeleton.P .deps/XWindow.P .deps/cfg.P .deps/debug.P \
.deps/display.P .deps/filter.P .deps/fontmap.P .deps/isdn.P \
.deps/lcd4linux.P .deps/lock.P .deps/mail.P .deps/parser.P \
.deps/pixmap.P .deps/processor.P .deps/seti.P .deps/system.P \
.deps/udelay.P
-SOURCES = $(lcd4linux_SOURCES)
+SOURCES = $(lcd4linux_SOURCES) $(EXTRA_lcd4linux_SOURCES)
OBJECTS = $(lcd4linux_OBJECTS)
all: all-redirect
diff --git a/Raster.c b/Raster.c
index 1561069..1e6d4d6 100644
--- a/Raster.c
+++ b/Raster.c
@@ -1,4 +1,4 @@
-/* $Id: Raster.c,v 1.11 2001/02/13 09:00:13 reinelt Exp $
+/* $Id: Raster.c,v 1.12 2001/03/01 11:08:16 reinelt Exp $
*
* driver for raster formats
*
@@ -20,6 +20,10 @@
*
*
* $Log: Raster.c,v $
+ * Revision 1.12 2001/03/01 11:08:16 reinelt
+ *
+ * reworked configure to allow selection of drivers
+ *
* Revision 1.11 2001/02/13 09:00:13 reinelt
*
* prepared framework for GPO's (general purpose outputs)
@@ -289,6 +293,11 @@ int Raster_bar (int type, int row, int col, int max, int len1, int len2)
LCD Raster[] = {
+#ifdef WITH_PPM
{ "PPM",0,0,0,0,BARS,0,Raster_init,Raster_clear,Raster_put,Raster_bar,NULL,Raster_flush },
+#endif
+#ifdef WITH_PNG
+ { "PNG",0,0,0,0,BARS,0,Raster_init,Raster_clear,Raster_put,Raster_bar,NULL,Raster_flush },
+#endif
{ NULL }
};
diff --git a/XWindow.c b/XWindow.c
index 59f2303..46b38f6 100644
--- a/XWindow.c
+++ b/XWindow.c
@@ -1,4 +1,4 @@
-/* $Id: XWindow.c,v 1.23 2001/02/26 00:33:37 herp Exp $
+/* $Id: XWindow.c,v 1.24 2001/03/01 11:08:16 reinelt Exp $
*
* X11 Driver for LCD4Linux
*
@@ -20,6 +20,10 @@
*
*
* $Log: XWindow.c,v $
+ * Revision 1.24 2001/03/01 11:08:16 reinelt
+ *
+ * reworked configure to allow selection of drivers
+ *
* Revision 1.23 2001/02/26 00:33:37 herp
* fixed X11 signal handler
*
@@ -115,8 +119,6 @@
*
*/
-#ifndef X_DISPLAY_MISSING
-
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <stdio.h>
@@ -542,4 +544,3 @@ LCD XWindow[] = {
{ NULL }
};
-#endif /* X_DISPLAY_MISSING */
diff --git a/aclocal.m4 b/aclocal.m4
index 0df5c2f..9f8add8 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -102,16 +102,3 @@ else
fi
AC_SUBST($1)])
-# Define a conditional.
-
-AC_DEFUN(AM_CONDITIONAL,
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
diff --git a/configure b/configure
index 29ed31e..29819fb 100755
--- a/configure
+++ b/configure
@@ -13,6 +13,13 @@ ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--with-x use the X Window System"
+ac_help="$ac_help
+ --with-drivers=<list> compile driver for displays in <list>,
+ drivers may be separated with commas,
+ 'all' compiles all avvailable drivers.
+ possible drivers are:
+ BeckmannEgle, CrystalFontz, HD44780,
+ MatrixOrbital, PalmPilot, PNG, PPM, X11"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -554,7 +561,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:558: checking for a BSD compatible install" >&5
+echo "configure:565: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -607,7 +614,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:611: checking whether build environment is sane" >&5
+echo "configure:618: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -664,7 +671,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:668: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:675: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -710,7 +717,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:714: checking for working aclocal" >&5
+echo "configure:721: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -723,7 +730,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:727: checking for working autoconf" >&5
+echo "configure:734: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -736,7 +743,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:740: checking for working automake" >&5
+echo "configure:747: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -749,7 +756,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:753: checking for working autoheader" >&5
+echo "configure:760: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -762,7 +769,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:766: checking for working makeinfo" >&5
+echo "configure:773: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -781,7 +788,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:785: checking for $ac_word" >&5
+echo "configure:792: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -813,7 +820,7 @@ done
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:817: checking for $ac_word" >&5
+echo "configure:824: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -843,7 +850,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:847: checking for $ac_word" >&5
+echo "configure:854: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -894,7 +901,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:898: checking for $ac_word" >&5
+echo "configure:905: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -926,7 +933,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:930: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -937,12 +944,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 941 "configure"
+#line 948 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -968,12 +975,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:979: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:977: checking whether we are using GNU C" >&5
+echo "configure:984: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -982,7 +989,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1001,7 +1008,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1005: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1012: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1044,7 +1051,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1048: checking for a BSD compatible install" >&5
+echo "configure:1055: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1097,7 +1104,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1101: checking whether ln -s works" >&5
+echo "configure:1108: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1119,7 +1126,7 @@ fi
echo $ac_n "checking for log in -lm""... $ac_c" 1>&6
-echo "configure:1123: checking for log in -lm" >&5
+echo "configure:1130: checking for log in -lm" >&5
ac_lib_var=`echo m'_'log | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1127,7 +1134,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1131 "configure"
+#line 1138 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1138,7 +1145,7 @@ int main() {
log()
; return 0; }
EOF
-if { (eval echo configure:1142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1167,7 +1174,7 @@ fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1171: checking how to run the C preprocessor" >&5
+echo "configure:1178: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1182,13 +1189,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1186 "configure"
+#line 1193 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1199,13 +1206,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1203 "configure"
+#line 1210 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1216,13 +1223,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1220 "configure"
+#line 1227 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1251,7 +1258,7 @@ echo "$ac_t""$CPP" 1>&6
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:1255: checking for X" >&5
+echo "configure:1262: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -1313,12 +1320,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 1317 "configure"
+#line 1324 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1387,14 +1394,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1391 "configure"
+#line 1398 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -1500,17 +1507,17 @@ else
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:1504: checking whether -R must be followed by a space" >&5
+echo "configure:1511: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 1507 "configure"
+#line 1514 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_nospace=yes
else
@@ -1526,14 +1533,14 @@ rm -f conftest*
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 1530 "configure"
+#line 1537 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_space=yes
else
@@ -1565,7 +1572,7 @@ rm -f conftest*
# libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:1569: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:1576: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1573,7 +1580,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1577 "configure"
+#line 1584 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1584,7 +1591,7 @@ int main() {
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1606,7 +1613,7 @@ fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:1610: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:1617: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1614,7 +1621,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1618 "configure"
+#line 1625 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1625,7 +1632,7 @@ int main() {
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1654,12 +1661,12 @@ fi
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1658: checking for gethostbyname" >&5
+echo "configure:1665: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1663 "configure"
+#line 1670 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
@@ -1682,7 +1689,7 @@ gethostbyname();
; return 0; }
EOF
-if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
@@ -1703,7 +1710,7 @@ fi
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1707: checking for gethostbyname in -lnsl" >&5
+echo "configure:1714: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1711,7 +1718,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1715 "configure"
+#line 1722 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1722,7 +1729,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1752,12 +1759,12 @@ fi
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:1756: checking for connect" >&5
+echo "configure:1763: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1761 "configure"
+#line 1768 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
@@ -1780,7 +1787,7 @@ connect();
; return 0; }
EOF
-if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
@@ -1801,7 +1808,7 @@ fi
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:1805: checking for connect in -lsocket" >&5
+echo "configure:1812: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1809,7 +1816,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1813 "configure"
+#line 1820 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1820,7 +1827,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1844,12 +1851,12 @@ fi
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:1848: checking for remove" >&5
+echo "configure:1855: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1853 "configure"
+#line 1860 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
@@ -1872,7 +1879,7 @@ remove();
; return 0; }
EOF
-if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
@@ -1893,7 +1900,7 @@ fi
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:1897: checking for remove in -lposix" >&5
+echo "configure:1904: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1901,7 +1908,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1905 "configure"
+#line 1912 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1912,7 +1919,7 @@ int main() {
remove()
; return 0; }
EOF
-if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1936,12 +1943,12 @@ fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:1940: checking for shmat" >&5
+echo "configure:1947: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1945 "configure"
+#line 1952 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
@@ -1964,7 +1971,7 @@ shmat();
; return 0; }
EOF
-if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
@@ -1985,7 +1992,7 @@ fi
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:1989: checking for shmat in -lipc" >&5
+echo "configure:1996: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1993,7 +2000,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1997 "configure"
+#line 2004 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2004,7 +2011,7 @@ int main() {
shmat()
; return 0; }
EOF
-if { (eval echo configure:2008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2037,7 +2044,7 @@ fi
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:2041: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:2048: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2045,7 +2052,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2049 "configure"
+#line 2056 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2056,7 +2063,7 @@ int main() {
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2082,21 +2089,112 @@ fi
-if test x$no_x = x; then
- WITH_X_TRUE=
- WITH_X_FALSE='#'
+
+# Check whether --with-drivers or --without-drivers was given.
+if test "${with_drivers+set}" = set; then
+ withval="$with_drivers"
+ drivers=$withval
else
- WITH_X_TRUE='#'
- WITH_X_FALSE=
+ drivers=all
+
+fi
+
+if test "$drivers" = "all"; then
+ drivers=BeckmannEgle,CrystalFontz,HD44780,MatrixOrbital,PalmPilot,PNG,PPM,X11
fi
+drivers=`echo $drivers|sed 's/,/ /g'`
+for driver in $drivers; do
+ case "$driver" in
+ BeckmannEgle)
+ DRIVERS="$DRIVERS BeckmannEgle.o"
+ cat >> confdefs.h <<\EOF
+#define WITH_BECKMANNEGLE 1
+EOF
+
+ ;;
+ CrystalFontz)
+ DRIVERS="$DRIVERS Crystalfontz.o"
+ cat >> confdefs.h <<\EOF
+#define WITH_CRYSTALFONTZ 1
+EOF
+
+ ;;
+ HD44780)
+ DRIVERS="$DRIVERS HD44780.o"
+ cat >> confdefs.h <<\EOF
+#define WITH_HD44780 1
+EOF
+
+ ;;
+ MatrixOrbital)
+ DRIVERS="$DRIVERS MatrixOrbital.o"
+ cat >> confdefs.h <<\EOF
+#define WITH_MATRIXORBITAL 1
+EOF
+
+ ;;
+ PalmPilot)
+ DRIVERS="$DRIVERS PalmPilot.o"
+ cat >> confdefs.h <<\EOF
+#define WITH_PALMPILOT 1
+EOF
+
+ ;;
+ PNG)
+ RASTER="Raster.o"
+ cat >> confdefs.h <<\EOF
+#define WITH_PNG 1
+EOF
+
+ DRVLIBS="$DRVLIBS -lgd -lpng -lz"
+ ;;
+ PPM)
+ RASTER="Raster.o"
+ cat >> confdefs.h <<\EOF
+#define WITH_PPM 1
+EOF
+
+ ;;
+ SIN)
+ DRIVERS="$DRIVERS SIN.o"
+ cat >> confdefs.h <<\EOF
+#define WITH_SIN 1
+EOF
+
+ ;;
+ Skeleton)
+ DRIVERS="$DRIVERS Skeleton.o"
+ cat >> confdefs.h <<\EOF
+#define WITH_Skeleton 1
+EOF
+
+ ;;
+ X11)
+ DRIVERS="$DRIVERS XWindow.o"
+ DRVLIBS="$DRVLIBS -lX11"
+ cat >> confdefs.h <<\EOF
+#define WITH_X11 1
+EOF
+
+ ;;
+ *)
+ { echo "configure: error: Unknown driver '$driver'" 1>&2; exit 1; }
+ ;;
+ esac
+done
+
+DRIVERS="$DRIVERS $RASTER"
+
+
+
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2095: checking for ANSI C header files" >&5
+echo "configure:2193: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2100 "configure"
+#line 2198 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2104,7 +2202,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2121,7 +2219,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2125 "configure"
+#line 2223 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2139,7 +2237,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2143 "configure"
+#line 2241 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2160,7 +2258,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2164 "configure"
+#line 2262 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2171,7 +2269,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2198,17 +2296,17 @@ for ac_hdr in fcntl.h sys/ioctl.h sys/time.h syslog.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2202: checking for $ac_hdr" >&5
+echo "configure:2300: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2207 "configure"
+#line 2305 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2238,17 +2336,17 @@ for ac_hdr in sys/io.h asm/io.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2242: checking for $ac_hdr" >&5
+echo "configure:2340: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2247 "configure"
+#line 2345 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2276,12 +2374,12 @@ done
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2280: checking for working const" >&5
+echo "configure:2378: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2285 "configure"
+#line 2383 "configure"
#include "confdefs.h"
int main() {
@@ -2330,7 +2428,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2351,12 +2449,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:2355: checking for pid_t" >&5
+echo "configure:2453: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2360 "configure"
+#line 2458 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2384,12 +2482,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2388: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2486: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2393 "configure"
+#line 2491 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -2398,7 +2496,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:2402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -2421,13 +2519,13 @@ fi
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:2425: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:2523: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 2431 "configure"
+#line 2529 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -2445,7 +2543,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 2449 "configure"
+#line 2547 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -2467,7 +2565,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:2471: checking for 8-bit clean memcmp" >&5
+echo "configure:2569: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2475,7 +2573,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 2479 "configure"
+#line 2577 "configure"
#include "confdefs.h"
main()
@@ -2485,7 +2583,7 @@ main()
}
EOF
-if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@@ -2503,12 +2601,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2507: checking return type of signal handlers" >&5
+echo "configure:2605: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2512 "configure"
+#line 2610 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2525,7 +2623,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -2546,12 +2644,12 @@ EOF
for ac_func in gettimeofday socket strdup strerror strstr strtol uname
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2550: checking for $ac_func" >&5
+echo "configure:2648: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2555 "configure"
+#line 2653 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2574,7 +2672,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2763,8 +2861,8 @@ s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
-s%@WITH_X_TRUE@%$WITH_X_TRUE%g
-s%@WITH_X_FALSE@%$WITH_X_FALSE%g
+s%@DRIVERS@%$DRIVERS%g
+s%@DRVLIBS@%$DRVLIBS%g
s%@LIBOBJS@%$LIBOBJS%g
CEOF
diff --git a/configure.in b/configure.in
index 5a853ba..05a129e 100644
--- a/configure.in
+++ b/configure.in
@@ -13,7 +13,80 @@ AC_CHECK_LIB(m, log)
dnl Checks for X11
AC_PATH_XTRA
-AM_CONDITIONAL(WITH_X, test x$no_x = x)
+
+
+dnl Fixme AM_CONDITIONAL(WITH_X, test x$no_x = x)
+
+dnl drivers
+AC_ARG_WITH(
+ drivers,
+ [ --with-drivers=<list> compile driver for displays in <list>,]
+ [ drivers may be separated with commas,]
+ [ 'all' compiles all avvailable drivers.]
+ [ possible drivers are:]
+ [ BeckmannEgle, CrystalFontz, HD44780,]
+ [ MatrixOrbital, PalmPilot, PNG, PPM, X11],
+ drivers=$withval,
+ drivers=all
+)
+if test "$drivers" = "all"; then
+ drivers=[BeckmannEgle,CrystalFontz,HD44780,MatrixOrbital,PalmPilot,PNG,PPM,X11]
+fi
+drivers=`echo $drivers|sed 's/,/ /g'`
+for driver in $drivers; do
+ case "$driver" in
+ BeckmannEgle)
+ DRIVERS="$DRIVERS BeckmannEgle.o"
+ AC_DEFINE(WITH_BECKMANNEGLE)
+ ;;
+ CrystalFontz)
+ DRIVERS="$DRIVERS Crystalfontz.o"
+ AC_DEFINE(WITH_CRYSTALFONTZ)
+ ;;
+ HD44780)
+ DRIVERS="$DRIVERS HD44780.o"
+ AC_DEFINE(WITH_HD44780)
+ ;;
+ MatrixOrbital)
+ DRIVERS="$DRIVERS MatrixOrbital.o"
+ AC_DEFINE(WITH_MATRIXORBITAL)
+ ;;
+ PalmPilot)
+ DRIVERS="$DRIVERS PalmPilot.o"
+ AC_DEFINE(WITH_PALMPILOT)
+ ;;
+ PNG)
+ RASTER="Raster.o"
+ AC_DEFINE(WITH_PNG)
+ DRVLIBS="$DRVLIBS -lgd -lpng -lz"
+ ;;
+ PPM)
+ RASTER="Raster.o"
+ AC_DEFINE(WITH_PPM)
+ ;;
+ SIN)
+ DRIVERS="$DRIVERS SIN.o"
+ AC_DEFINE(WITH_SIN)
+ ;;
+ Skeleton)
+ DRIVERS="$DRIVERS Skeleton.o"
+ AC_DEFINE(WITH_Skeleton)
+ ;;
+ X11)
+ DRIVERS="$DRIVERS XWindow.o"
+ DRVLIBS="$DRVLIBS -lX11"
+ AC_DEFINE(WITH_X11)
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown driver '$driver'])
+ ;;
+ esac
+done
+
+DRIVERS="$DRIVERS $RASTER"
+
+AC_SUBST(DRIVERS)
+AC_SUBST(DRVLIBS)
dnl Checks for header files.
AC_HEADER_STDC
diff --git a/display.c b/display.c
index 3c0e260..4ead6b8 100644
--- a/display.c
+++ b/display.c
@@ -1,4 +1,4 @@
-/* $Id: display.c,v 1.23 2001/02/14 07:40:16 reinelt Exp $
+/* $Id: display.c,v 1.24 2001/03/01 11:08:16 reinelt Exp $
*
* framework for device drivers
*
@@ -20,6 +20,10 @@
*
*
* $Log: display.c,v $
+ * Revision 1.24 2001/03/01 11:08:16 reinelt
+ *
+ * reworked configure to allow selection of drivers
+ *
* Revision 1.23 2001/02/14 07:40:16 reinelt
*
* first (incomplete) GPO implementation
@@ -163,26 +167,42 @@
#include "cfg.h"
#include "display.h"
-extern LCD Skeleton[];
-extern LCD MatrixOrbital[];
extern LCD BeckmannEgle[];
-extern LCD HD44780[];
extern LCD Crystalfontz[];
-extern LCD SIN[];
+extern LCD HD44780[];
+extern LCD MatrixOrbital[];
extern LCD PalmPilot[];
extern LCD Raster[];
+extern LCD SIN[];
+extern LCD Skeleton[];
extern LCD XWindow[];
FAMILY Driver[] = {
- { "Skeleton", Skeleton },
- { "Matrix Orbital", MatrixOrbital },
- { "Beckmann+Egle", BeckmannEgle },
- { "HD 44780 based", HD44780 },
- { "Crystalfontz", Crystalfontz },
- { "SIN Router", SIN },
+#ifdef WITH_BECKMANNEGLE
+ { "Beckmann+Egle", BeckmannEgle },
+#endif
+#ifdef WITH_CRYSTALFONTZ
+ { "Crystalfontz", Crystalfontz },
+#endif
+#ifdef WITH_HD44780
+ { "HD 44780 based", HD44780 },
+#endif
+#ifdef WITH_MATRIXORBITAL
+ { "Matrix Orbital", MatrixOrbital },
+#endif
+#ifdef WITH_PALMPILOT
{ "3Com Palm Pilot", PalmPilot },
- { "Raster", Raster },
-#ifndef X_DISPLAY_MISSING
+#endif
+#if defined (WITH_PNG) || defined(WITH_PPM)
+ { "Raster", Raster },
+#endif
+#ifdef WITH_SIN
+ { "SIN Router", SIN },
+#endif
+#ifdef WITH_SKELETON
+ { "Skeleton", Skeleton },
+#endif
+#ifdef WITH_X11
{ "X Window System", XWindow },
#endif
{ NULL }