aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-04-11 17:37:09 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-04-11 17:37:09 +0000
commit75c3c113e90e5ffd3d356eef1bb3484046ad2716 (patch)
tree6cfebaad88a31c6f6a6047055f2d36d16470378b
parentd75d1e9720428dbc05f0807fab5a4e11eedbb7db (diff)
downloadlcd4linux-75c3c113e90e5ffd3d356eef1bb3484046ad2716.tar.gz
[lcd4linux @ 2004-04-11 17:37:09 by reinelt]
forgot these files at last checkin... sorry! git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@414 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
-rw-r--r--drivers.m4251
-rw-r--r--plugins.m4211
2 files changed, 462 insertions, 0 deletions
diff --git a/drivers.m4 b/drivers.m4
new file mode 100644
index 0000000..e058e5a
--- /dev/null
+++ b/drivers.m4
@@ -0,0 +1,251 @@
+# Drivers conf part
+
+AC_MSG_CHECKING([which drivers to compile])
+AC_ARG_WITH(
+ drivers,
+ [ --with-drivers=<list> compile driver for displays in <list>,]
+ [ drivers may be separated with commas,]
+ [ 'all' (default) compiles all available drivers,]
+ [ drivers may be excluded with 'all,!<driver>',]
+ [ (try 'all,\!<driver>' if your shell complains...)]
+ [ possible drivers are:]
+ [ BeckmannEgle, CrystalFontz, Curses, Cwlinux,]
+ [ HD44780, M50530, T6963, USBLCD, MatrixOrbital,]
+ [ MilfordInstruments, PalmPilot, PNG, PPM, X11],
+ drivers=$withval,
+ drivers=all
+)
+
+drivers=`echo $drivers|sed 's/,/ /g'`
+
+for driver in $drivers; do
+
+ case $driver in
+ !*)
+ val="no"
+ driver=`echo $driver|cut -c 2-`
+ ;;
+ *)
+ val="yes"
+ ;;
+ esac
+
+ case "$driver" in
+ all)
+ BECKMANNEGLE="yes"
+ CRYSTALFONTZ="yes"
+ CURSES="yes"
+ CWLINUX="yes"
+ HD44780="yes"
+ M50530="yes"
+ T6963="yes"
+ USBLCD="yes"
+ MATRIXORBITAL="yes"
+ MILINST="yes"
+ PALMPILOT="yes"
+ PNG="yes"
+ PPM="yes"
+ X11="yes"
+ ;;
+ BeckmannEgle)
+ BECKMANNEGLE=$val
+ ;;
+ CrystalFontz)
+ CRYSTALFONTZ=$val
+ ;;
+ Curses)
+ CURSES=$val
+ ;;
+ Cwlinux)
+ CWLINUX=$val
+ ;;
+ HD44780)
+ HD44780=$val
+ ;;
+ M50530)
+ M50530=$val
+ ;;
+ T6963)
+ T6963=$val
+ ;;
+ USBLCD)
+ USBLCD=$val
+ ;;
+ MatrixOrbital)
+ MATRIXORBITAL=$val
+ ;;
+ MilfordInstruments)
+ MILINST=$val
+ ;;
+ PalmPilot)
+ PALMPILOT=$val
+ ;;
+ PNG)
+ PNG=$val
+ ;;
+ PPM)
+ PPM=$val
+ ;;
+ X11)
+ X11=$val
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown driver '$driver'])
+ ;;
+ esac
+done
+
+AC_MSG_RESULT([done])
+
+PARPORT="no"
+SERIAL="no"
+TEXT="no"
+GRAPHIC="no"
+
+if test "$BECKMANNEGLE" = "yes"; then
+# DRIVERS="$DRIVERS BeckmannEgle.lo"
+# DRIVERS="$DRIVERS BeckmannEgle.o"
+ AC_DEFINE(WITH_BECKMANNEGLE,1,[Beckmann&Egle driver])
+fi
+
+if test "$CRYSTALFONTZ" = "yes"; then
+ TEXT="yes"
+ SERIAL="yes"
+# DRIVERS="$DRIVERS drv_Crystalfontz.lo"
+ DRIVERS="$DRIVERS drv_Crystalfontz.o"
+ AC_DEFINE(WITH_CRYSTALFONTZ,1,[Crystalfontz driver])
+fi
+
+if test "$CURSES" = "yes"; then
+ if test "$has_curses" = true; then
+# DRIVERS="$DRIVERS Text.lo"
+# DRIVERS="$DRIVERS Text.o"
+ DRVLIBS="$DRVLIBS $CURSES_LIBS"
+ CPPFLAGS="$CPPFLAGS $CURSES_INCLUDES"
+ AC_DEFINE(WITH_TEXT,1,[Curses driver])
+ else
+ AC_MSG_WARN(curses not found: Curses driver disabled)
+ fi
+fi
+
+if test "$CWLINUX" = "yes"; then
+ TEXT="yes"
+ SERIAL="yes"
+# DRIVERS="$DRIVERS drv_Cwlinux.lo"
+ DRIVERS="$DRIVERS drv_Cwlinux.o"
+ AC_DEFINE(WITH_CWLINUX,1,[CwLinux driver])
+fi
+
+if test "$HD44780" = "yes"; then
+ TEXT="yes"
+ PARPORT="yes"
+# DRIVERS="$DRIVERS drv_HD44780.lo"
+ DRIVERS="$DRIVERS drv_HD44780.o"
+ AC_DEFINE(WITH_HD44780,1,[HD44780 driver])
+fi
+
+if test "$M50530" = "yes"; then
+ TEXT="yes"
+ PARPORT="yes"
+# DRIVERS="$DRIVERS drv_M50530.lo"
+ DRIVERS="$DRIVERS drv_M50530.o"
+ AC_DEFINE(WITH_M50530,1,[M50530 driver])
+fi
+
+if test "$T6963" = "yes"; then
+ GRAPHIC="yes"
+ PARPORT="yes"
+# DRIVERS="$DRIVERS drv_T6963.lo"
+ DRIVERS="$DRIVERS drv_T6963.o"
+ AC_DEFINE(WITH_T6963,1,[T6963 driver])
+fi
+
+if test "$USBLCD" = "yes"; then
+ TEXT="yes"
+ SERIAL="yes"
+# DRIVERS="$DRIVERS drv_USBLCD.lo"
+ DRIVERS="$DRIVERS drv_USBLCD.o"
+ AC_DEFINE(WITH_USBLCD,1,[USBLCD driver])
+fi
+
+if test "$MATRIXORBITAL" = "yes"; then
+ SERIAL="yes"
+# DRIVERS="$DRIVERS drv_MatrixOrbital.lo"
+ DRIVERS="$DRIVERS drv_MatrixOrbital.o"
+ AC_DEFINE(WITH_MATRIXORBITAL,1,[MatrixOrbital driver])
+fi
+
+if test "$MILINST" = "yes"; then
+# DRIVERS="$DRIVERS MilfordInstruments.lo"
+# DRIVERS="$DRIVERS MilfordInstruments.o"
+ AC_DEFINE(WITH_MILINST,1,[Milford Instruments driver])
+fi
+
+if test "$PALMPILOT" = "yes"; then
+# DRIVERS="$DRIVERS PalmPilot.lo"
+# DRIVERS="$DRIVERS PalmPilot.o"
+ AC_DEFINE(WITH_PALMPILOT,1,[PalmPilot driver])
+fi
+
+if test "$PNG" = "yes"; then
+ if test "$has_gd" = "true"; then
+ GRAPHIC="yes"
+ AC_DEFINE(WITH_PNG,1,[ driver])
+ DRVLIBS="$DRVLIBS -lgd"
+ else
+ AC_MSG_WARN(gd.h not found: PNG driver disabled)
+ fi
+fi
+
+if test "$PPM" = "yes"; then
+ if test "$has_gd" = "true"; then
+ GRAPHIC="yes"
+ AC_DEFINE(WITH_PPM,1,[ driver])
+ else
+ AC_MSG_WARN(gd.h not found: PNG driver disabled)
+ fi
+fi
+
+if test "$X11" = "yes"; then
+ if test "$no_x" = "yes"; then
+ AC_MSG_WARN(X11 headers or libraries not available: X11 driver disabled)
+ else
+ GRAPHIC="yes"
+# DRIVERS="$DRIVERS drv_X11.lo"
+ DRIVERS="$DRIVERS drv_X11.o"
+ DRVLIBS="$DRVLIBS -L$ac_x_libraries -lX11"
+ AC_DEFINE(WITH_X11,1,[X11 driver])
+ fi
+fi
+
+if test "$DRIVERS" = ""; then
+ AC_MSG_ERROR([You should include at least one driver...])
+fi
+
+# generic text driver
+if test "$TEXT" = "yes"; then
+# DRIVERS="$DRIVERS drv_generic_text.lo"
+ DRIVERS="$DRIVERS drv_generic_text.o"
+fi
+
+# generic graphic driver
+if test "$GRAPHIC" = "yes"; then
+:
+# DRIVERS="$DRIVERS
+ DRIVERS="$DRIVERS drv_generic_graphic.o"
+fi
+
+# generic parport driver
+if test "$PARPORT" = "yes"; then
+# DRIVERS="$DRIVERS drv_generic_parport.lo"
+ DRIVERS="$DRIVERS drv_generic_parport.o"
+fi
+
+# generic serial driver
+if test "$SERIAL" = "yes"; then
+# DRIVERS="$DRIVERS drv_generic_serial.lo"
+ DRIVERS="$DRIVERS drv_generic_serial.o"
+fi
+
+AC_SUBST(DRIVERS)
+AC_SUBST(DRVLIBS)
diff --git a/plugins.m4 b/plugins.m4
new file mode 100644
index 0000000..d351f58
--- /dev/null
+++ b/plugins.m4
@@ -0,0 +1,211 @@
+# Plugins conf part
+
+AC_MSG_CHECKING([which plugins to compile])
+AC_ARG_WITH(
+ plugins,
+ [ --with-plugins=<list> choose which plugins to compile.]
+ [ type --with-plugins=list for a list]
+ [ of avaible plugins],
+ plugins=$withval,
+ plugins=all
+)
+
+plugins=`echo $plugins|sed 's/,/ /g'`
+
+for plugin in $plugins; do
+
+ case $plugin in
+ !*)
+ val="no"
+ driver=`echo $plugin|cut -c 2-`
+ ;;
+ *)
+ val="yes"
+ ;;
+ esac
+
+ case "$plugin" in
+ list)
+ AC_MSG_RESULT([TO BE DONE...])
+ AC_MSG_ERROR([run ./configure --with-plugins=...])
+ ;;
+ all)
+ PLUGIN_APM="yes"
+ PLUGIN_CPUINFO="yes"
+ PLUGIN_DVB="yes"
+ PLUGIN_EXEC="yes"
+ PLUGIN_I2C_SENSORS="yes"
+ PLUGIN_IMON="yes"
+ PLUGIN_LOADAVG="yes"
+ PLUGIN_MEMINFO="yes"
+ PLUGIN_MYSQL="yes"
+ PLUGIN_NETDEV="yes"
+ PLUGIN_POP3="yes"
+ PLUGIN_PPP="yes"
+ PLUGIN_PROC_STAT="yes"
+ PLUGIN_SETI="yes"
+ PLUGIN_UNAME="yes"
+ PLUGIN_WIRELESS="yes"
+ PLUGIN_XMMS="yes"
+ ;;
+ apm)
+ PLUGIN_APM=$val
+ ;;
+ cpuinfo)
+ PLUGIN_CPUINFO=$val
+ ;;
+ dvb)
+ PLUGIN_DVB=$val
+ ;;
+ exec)
+ PLUGIN_EXEC=$val
+ ;;
+ i2c_sensors)
+ PLUGIN_I2C_SENSORS=$val
+ ;;
+ imon)
+ PLUGIN_IMON=$val
+ ;;
+ loadavg)
+ PLUGIN_LOADAVG=$val
+ ;;
+ meminfo)
+ PLUGIN_MEMINFO=$val
+ ;;
+ mysql)
+ PLUGIN_MYSQL=$val
+ ;;
+ netdev)
+ PLUGIN_NETDEV=$val
+ ;;
+ pop3)
+ PLUGIN_POP3=$val
+ ;;
+ ppp)
+ PLUGIN_PPP=$val
+ ;;
+ proc_stat)
+ PLUGIN_PROC_STAT=$val
+ ;;
+ seti)
+ PLUGIN_SETI=$val
+ ;;
+ uname)
+ PLUGIN_UNAME=$val
+ ;;
+ wireless)
+ PLUGIN_WIRELESS=$val
+ ;;
+ xmms)
+ PLUGIN_XMMS=$val
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown plugin '$plugin'])
+ ;;
+ esac
+done
+
+AC_MSG_RESULT([done])
+if test "$PLUGIN_APM" = "yes"; then
+ PLUGINS="$PLUGINS plugin_apm.o"
+ AC_DEFINE(PLUGIN_APM,1,[apm plugin])
+fi
+if test "$PLUGIN_CPUINFO" = "yes"; then
+ PLUGINS="$PLUGINS plugin_cpuinfo.o"
+ AC_DEFINE(PLUGIN_CPUINFO,1,[cpuinfo plugin])
+fi
+if test "$PLUGIN_DVB" = "yes"; then
+ AC_CHECK_HEADERS(linux/dvb/frontend.h, [has_dvb_header=true], [has_dvb_header=false])
+ if test "$has_dvb_header" = true; then
+ PLUGINS="$PLUGINS plugin_dvb.o"
+ AC_DEFINE(PLUGIN_DVB,1,[dvb plugin])
+ else
+ AC_MSG_WARN(linux/dvb/frontend.h header not found: dvb driver disabled)
+ fi
+fi
+if test "$PLUGIN_EXEC" = "yes"; then
+ PLUGINS="$PLUGINS plugin_exec.o"
+ AC_DEFINE(PLUGIN_EXEC,1,[exec plugin])
+fi
+if test "$PLUGIN_I2C_SENSORS" = "yes"; then
+ PLUGINS="$PLUGINS plugin_i2c_sensors.o"
+ AC_DEFINE(PLUGIN_I2C_SENSORS,1,[i2c sensors plugin])
+fi
+if test "$PLUGIN_IMON" = "yes"; then
+ PLUGINS="$PLUGINS plugin_imon.o"
+ AC_DEFINE(PLUGIN_IMON,1,[imon plugin])
+fi
+if test "$PLUGIN_LOADAVG" = "yes"; then
+ PLUGINS="$PLUGINS plugin_loadavg.o"
+ AC_DEFINE(PLUGIN_LOADAVG,1,[loadavg plugin])
+fi
+if test "$PLUGIN_MEMINFO" = "yes"; then
+ PLUGINS="$PLUGINS plugin_meminfo.o"
+ AC_DEFINE(PLUGIN_MEMINFO,1,[meminfo plugin])
+fi
+if test "$PLUGIN_MYSQL" = "yes"; then
+ AC_CHECK_HEADERS(mysql/mysql.h, [has_mysql_header=true], [has_mysql_header=false])
+ if test "$has_mysql_header" = true; then
+ AC_CHECK_LIB(mysqlclient,mysql_init ,[has_mysql_lib=true], [has_mysql_lib=false])
+ if test "$has_mysql_lib" = true; then
+ PLUGINS="$PLUGINS plugin_mysql.o"
+ AC_DEFINE(PLUGIN_MYSQL,1,[mysql plugin])
+ PLUGINLIBS="$PLUGINLIBS -lmysqlclient"
+ else
+ AC_MSG_WARN(mysqlclient lib not found: mysql driver disabled)
+ fi
+ else
+ AC_MSG_WARN(mysql/mysql.h header not found: mysql driver disabled)
+ fi
+fi
+if test "$PLUGIN_NETDEV" = "yes"; then
+ PLUGINS="$PLUGINS plugin_netdev.o"
+ AC_DEFINE(PLUGIN_NETDEV,1,[netdev plugin])
+fi
+if test "$PLUGIN_POP3" = "yes"; then
+ PLUGINS="$PLUGINS plugin_pop3.o"
+ AC_DEFINE(PLUGIN_POP3,1,[POP3 plugin])
+fi
+if test "$PLUGIN_PPP" = "yes"; then
+ AC_CHECK_HEADERS(net/if_ppp.h, [has_ppp_header=true], [has_ppp_header=false])
+ if test "$has_ppp_header" = true; then
+ PLUGINS="$PLUGINS plugin_ppp.o"
+ AC_DEFINE(PLUGIN_PPP,1,[ppp plugin])
+ else
+ AC_MSG_WARN(net/if_ppp.h header not found: ppp driver disabled)
+ fi
+fi
+if test "$PLUGIN_PROC_STAT" = "yes"; then
+ PLUGINS="$PLUGINS plugin_proc_stat.o"
+ AC_DEFINE(PLUGIN_PROC_STAT,1,[proc_stat plugin])
+fi
+if test "$PLUGIN_SETI" = "yes"; then
+ PLUGINS="$PLUGINS plugin_seti.o"
+ AC_DEFINE(PLUGIN_SETI,1,[seti plugin])
+fi
+if test "$PLUGIN_UNAME" = "yes"; then
+ PLUGINS="$PLUGINS plugin_uname.o"
+ AC_DEFINE(PLUGIN_UNAME,1,[uname plugin])
+fi
+if test "$PLUGIN_WIRELESS" = "yes"; then
+ PLUGINS="$PLUGINS plugin_wireless.o"
+ AC_DEFINE(PLUGIN_WIRELESS,1,[wireless plugin])
+fi
+if test "$PLUGIN_XMMS" = "yes"; then
+ PLUGINS="$PLUGINS plugin_xmms.o"
+ AC_DEFINE(PLUGIN_XMMS,1,[xmms plugin])
+fi
+
+#if test "$PLUGIN_" = "yes"; then
+# PLUGINS="$PLUGINS plugin_.o"
+# AC_DEFINE(PLUGIN_,1,[plugin])
+#fi
+
+if test "$PLUGINS" = ""; then
+ AC_MSG_ERROR([You should include at least one plugin...])
+#else
+# AC_MSG_ERROR($PLUGINS)
+fi
+
+AC_SUBST(PLUGINS)
+AC_SUBST(PLUGINLIBS)