1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(lcd4linux.c)
AM_INIT_AUTOMAKE(lcd4linux, 0.98)
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
dnl Checks for libraries.
AC_CHECK_LIB(m, log)
dnl Checks for X11
AC_PATH_XTRA
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
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h syslog.h unistd.h)
AC_CHECK_HEADERS(sys/io.h asm/io.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_HEADER_TIME
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(gettimeofday socket strdup strerror strstr strtol uname)
AC_OUTPUT(Makefile)
|