diff --git a/acconfig.h b/acconfig.h index 241692d..b4d0ae6 100644 --- a/acconfig.h +++ b/acconfig.h @@ -11,6 +11,9 @@ * ignoring punctuation (such as underscores). Although this order * can split up related entries, it makes it easier to check whether * a given entry is in the file. +* +* To add a new driver, insert the appropriate variable into +* this list alphabetically. */ /* Leave the following blank line there!! Autoheader needs it. */ @@ -81,8 +84,12 @@ /* Define if you have the statvfs function */ #undef STAT_STATVFS +#undef SVGALIB_DRV + #undef TEXT_DRV +#undef T6963_DRV + /* Define the package version */ #undef VERSION diff --git a/acinclude.m4 b/acinclude.m4 index e56264c..e266421 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -9,7 +9,14 @@ AC_ARG_ENABLE(drivers, drivers=[mtxorb,cfontz,curses,text,lb216,bayrad,glk]) if test "$drivers" = "all"; then - drivers=[mtxorb,cfontz,curses,text,lb216,hd44780,joy,irman,lircin,bayrad,glk,stv5730,sed1520] + case "$host" in + *-*-*linux*) + drivers=[mtxorb,cfontz,curses,text,lb216,hd44780,joy,irman,lircin,bayrad,glk,stv5730,sed1520,svgalib] + ;; + *-*-*solaris*) + drivers=[mtxorb,cfontz,curses,text,lb216,bayrad,glk] + ;; + esac AC_MSG_RESULT(all) fi @@ -81,6 +88,16 @@ fi DRIVERS="$DRIVERS stv5730.o" AC_DEFINE(STV5730_DRV) ;; + svgalib) + AC_CHECK_LIB(vga, main, LIBSVGA="-lvga -lvgagl", + AC_MSG_ERROR([The svgalib driver needs the vga library])) + DRIVERS="$DRIVERS svgalib_drv.o" + AC_DEFINE(SVGALIB_DRV) + ;; + t6963) + DRIVERS="$DRIVERS t6963.o" + AC_DEFINE(T6963_DRV) + ;; *) AC_MSG_ERROR([Unknown driver $driver]) ;; @@ -90,6 +107,7 @@ fi AC_SUBST(LIBCURSES) AC_SUBST(LIBIRMAN) AC_SUBST(LIBLIRC_CLIENT) +AC_SUBST(LIBSVGA) AC_SUBST(DRIVERS) ]) diff --git a/server/Makefile.am b/server/Makefile.am index 941de2d..1563704 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -1,5 +1,5 @@ SUBDIRS=drivers sbin_PROGRAMS=LCDd LCDd_SOURCES= client_data.c client_data.h client_functions.c client_functions.h client_menu.h clients.c clients.h input.c input.h main.c main.h menu.c menu.h menus.c menus.h parse.c parse.h render.c render.h screen.c screen.h screenlist.c screenlist.h serverscreens.c serverscreens.h sock.c sock.h widget.c widget.h -LCDd_LDADD = drivers/libLCDdrivers.a ../shared/libLCDstuff.a @LIBCURSES@ @LIBIRMAN@ @LIBLIRC_CLIENT@ +LCDd_LDADD = drivers/libLCDdrivers.a ../shared/libLCDstuff.a @LIBCURSES@ @LIBIRMAN@ @LIBLIRC_CLIENT@ @LIBSVGA@ INCLUDES = -I$(top_srcdir) diff --git a/server/drivers/Makefile.am b/server/drivers/Makefile.am index 42f4704..cf8c7d6 100644 --- a/server/drivers/Makefile.am +++ b/server/drivers/Makefile.am @@ -13,7 +13,9 @@ EXTRA_libLCDdrivers_a_SOURCES = MtxOrb.c MtxOrb.h text.c text.h \ port.h joy.c joy.h irmanin.c irmanin.h \ bayrad.h bayrad.c \ CFontz.c CFontz.h lircin.c lircin.h debug.h \ - glk.c glk.h glkproto.c glkproto.h + glk.c glk.h glkproto.c glkproto.h \ + svgalib_drv.c svgalib_drv.h \ + t6963.c t6963.h t6963_font.h libLCDdrivers_a_DEPENDENCIES = @DRIVERS@ libLCDdrivers_a_LIBADD = @DRIVERS@ # NOTE: $(srcdir)/.. is to get .h files from the server directory