From 336c8cab4ad7a09433baf069e92af3e8830f1d0e Mon Sep 17 00:00:00 2001 From: robijn Date: Thu, 11 Apr 2002 13:56:28 +0000 Subject: [PATCH] Modified the autoconf stuff for modules. Makefile.am.pre is no longer needed. --- LCDd.conf | 1 - acinclude.m4 | 27 ++++------------ configure.in | 3 +- server/drivers/Makefile.am | 59 ++++++++++++++++++++++++++++++++++ server/drivers/Makefile.am.pre | 1 - 5 files changed, 66 insertions(+), 25 deletions(-) create mode 100644 server/drivers/Makefile.am diff --git a/LCDd.conf b/LCDd.conf index 2b8207e..1ad86c6 100644 --- a/LCDd.conf +++ b/LCDd.conf @@ -152,7 +152,6 @@ Reboot=yes [curses] -file=curses_drv.so # Curses driver # color settings diff --git a/acinclude.m4 b/acinclude.m4 index 8382ad3..2ed512b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -20,12 +20,12 @@ fi for driver in $drivers do - case "$driver" in - lcdm001) + case "$driver" in + lcdm001) DRIVERS="$DRIVERS lcdm001${SO}" actdrivers=["$actdrivers lcdm001"] ;; - mtxorb) + mtxorb) DRIVERS="$DRIVERS MtxOrb${SO}" actdrivers=["$actdrivers mtxorb"] ;; @@ -473,7 +473,6 @@ dnl If your platform does not compile or link the modules correctly, add dnl appropriate flags here. AC_DEFUN([AC_MODULES_INFO], [ -AC_SUBST(SO) dnl $SO is the extension of shared libraries (including the dot!) dnl It is available in the program code as MODULE_EXTENSION AC_MSG_CHECKING(module extension) @@ -488,9 +487,7 @@ esac AC_DEFINE_UNQUOTED(MODULE_EXTENSION,"$SO") AC_MSG_RESULT($SO) -AC_SUBST(CCSHARED) dnl CCSHARED are the flags used to compile the sources for the shared library -AC_SUBST(LDSHARED) dnl LDSHARED are the flags used to create shared library. dnl By default assume a GNU compatible build system @@ -525,21 +522,9 @@ dnl checks for libraries AC_CHECK_LIB(dl, dlopen) # Dynamic linking for Linux, *BSD, SunOS/Solaris and SYSV AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX +AC_SUBST(SO) +AC_SUBST(CCSHARED) +AC_SUBST(LDSHARED) dnl End of loadable modules determination ]) dnl AC_MODULES_INFO - -dnl Generate the drivers/Makefile.am file from Makefile.am.pre -dnl Joris Robijn, 2002 -AC_DEFUN([AC_GENERATE_MAKEFILE_AM], -[ -echo creating server/drivers/Makefile.am -( cd $srcdir/server/drivers - SO_WO_DOT=`echo $SO|sed 's/[[.]]//'` - sed "s/[[!]]SO[[!]]/$SO_WO_DOT/g" < Makefile.am.pre | \ - sed "s/[[!]]DRIVERS[[!]]/$DRIVERS/g" > Makefile.am -) - -dnl End of Generate drivers Makefile.am -]) dnl AC_GENERATE_MAKEFILE_AM - diff --git a/configure.in b/configure.in index aeab5c1..aa05f4f 100644 --- a/configure.in +++ b/configure.in @@ -2,6 +2,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(clients/lcdproc/batt.c) AM_INIT_AUTOMAKE(lcdproc, 0.5dev) AM_CONFIG_HEADER(config.h) +AC_EXEEXT AC_CANONICAL_HOST case "$host" in @@ -155,8 +156,6 @@ AC_MODULES_INFO LCD_DRIVERS_SELECT -AC_GENERATE_MAKEFILE_AM - AC_OUTPUT(Makefile shared/Makefile server/Makefile diff --git a/server/drivers/Makefile.am b/server/drivers/Makefile.am new file mode 100644 index 0000000..e40d520 --- /dev/null +++ b/server/drivers/Makefile.am @@ -0,0 +1,59 @@ +## We use bin_ to generate the shared libraries, because automake only +## supports libtool shared libraries. But we don't want to use libtool... +## +## configure replaces all occurrences of so to the appropriate extension +## (without dot!) +## + +## Fill in loadable module extension +EXEEXT = @SO@ + +## How to compile the files for the modules: +CCFLAGS += @CCSHARED@ + +## And how to build them +LDFLAGS += @LDSHARED@ + +## Forget the libs that the server core requires +LIBS = + +pkglib_PROGRAMS = @DRIVERS@ +EXTRA_PROGRAMS = bayrad CFontz CFontz633 curses glk hd44780 irman joy lb216 lcdm001 lirc MtxOrb sed1330 sed1520 stv5730 svga t6963 text wirz_sli +noinst_LIBRARIES = libLCD.a + +CFontz_LDADD = libLCD.a +CFontz633_LDADD = libLCD.a +curses_LDADD = @LIBCURSES@ +hd44780_LDADD = libLCD.a +irman_LDADD = @LIBIRMAN@ +lirc_LDADD = @LIBLIRC_CLIENT@ +svga_LDADD = @LIBSVGA@ +t6963_LDADD = libLCD.a + +libLCD_a_SOURCES = lcd_lib.h lcd_lib.c + +bayrad_SOURCES = lcd.h bayrad.h bayrad.c report.h +CFontz_SOURCES = lcd.h CFontz.c CFontz.h report.h +CFontz633_SOURCES = lcd.h CFontz633.c CFontz633.h CFontz633io.c CFontz633io.h report.h +curses_SOURCES = lcd.h curses_drv.h curses_drv.c report.h +glk_SOURCES = lcd.h glk.c glk.h glkproto.c glkproto.h report.h +hd44780_SOURCES = lcd.h hd44780.h hd44780.c hd44780-drivers.h hd44780-low.h hd44780-charmap.h hd44780-4bit.c hd44780-4bit.h hd44780-ext8bit.c hd44780-ext8bit.h lcd_sem.c lcd_sem.h hd44780-serialLpt.c hd44780-serialLpt.h hd44780-winamp.c hd44780-winamp.h hd44780-picanlcd.c hd44780-picanlcd.h port.h lpt-port.h timing.h report.h +irman_SOURCES = lcd.h irmanin.c irmanin.h report.h +joy_SOURCES = lcd.h joy.c joy.h port.h report.h +lb216_SOURCES = lcd.h lb216.c lb216.h report.h +lcdm001_SOURCES = lcd.h lcdm001.c lcdm001.h report.h +lirc_SOURCES = lcd.h lircin.c lircin.h report.h +MtxOrb_SOURCES = lcd.h MtxOrb.c MtxOrb.h report.h bigfont.h +sed1330_SOURCES = lcd.h sed1330.h sed1330.c port.h lpt-port.h timing.h report.h +sed1520_SOURCES = lcd.h sed1520.c sed1520.h sed1520fm.c sed1520fm.h port.h report.h +stv5730_SOURCES = lcd.h stv5730.c stv5730.h report.h +svga_SOURCES = lcd.h svgalib_drv.c svgalib_drv.h report.h +t6963_SOURCES = lcd.h t6963.c t6963.h t6963_font.h report.h +text_SOURCES = lcd.h text.h text.c report.h +wirz_sli_SOURCES = lcd.h wirz-sli.h wirz-sli.c report.h + +Makefile.am: Makefile.am.pre + @echo Makefile.am.pre has been changed, please rerun configure. + @false + +INCLUDES = -I$(top_srcdir) diff --git a/server/drivers/Makefile.am.pre b/server/drivers/Makefile.am.pre index d58a265..b378061 100644 --- a/server/drivers/Makefile.am.pre +++ b/server/drivers/Makefile.am.pre @@ -10,7 +10,6 @@ EXTRA_PROGRAMS = bayrad.!SO! CFontz.!SO! CFontz633.!SO! curses.!SO! glk.!SO! hd4 noinst_LIBRARIES = libLCD.a EXTRA_DIST = Makefile.am.pre -nodist_DIST = Makefile.am ## How to compile the files for the modules: CCFLAGS += @CCSHARED@