From 07957823d253b55d91afe1f5c1606931d01c3f81 Mon Sep 17 00:00:00 2001 From: marschap Date: Thu, 16 Oct 2008 09:16:15 +0000 Subject: [PATCH] autoconf: fix obsolete macros, check for pkg-config macros, show drivers to be compiled --- ChangeLog | 1 + acinclude.m4 | 12 ++++++++---- configure.in | 24 ++++++++++++++---------- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index becb406..a39a465 100644 --- a/ChangeLog +++ b/ChangeLog @@ -58,6 +58,7 @@ v.0.5dev (ongoing development) + picolcd driver: support for 20x4 picoLCDs (Nicu Pavel) + hd44780 driver: new ConnectionType uss720 (Eric Pooch) * new make targets to compile & install server & clients separately + * autoconf fixes: check for pkg-config macros v.0.5.2 * fix switching on/off the Load screen in lcdproc client using the menu diff --git a/acinclude.m4 b/acinclude.m4 index 90171f7..a633112 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2,7 +2,7 @@ dnl dnl Define function/macro for driver selection using the --enable-drivers=... option dnl AC_DEFUN([LCD_DRIVERS_SELECT], [ -AC_CHECKING(which drivers to compile) +AC_MSG_NOTICE([checking which drivers to compile...]) AC_ARG_ENABLE(drivers, [ --enable-drivers= compile drivers for LCDs in ,] @@ -458,8 +458,12 @@ dnl else esac done -actdrivers=`echo $actdrivers | sed -e 's/ /,/g'` -AC_MSG_RESULT([Will compile drivers: $actdrivers]) +AC_MSG_RESULT([---------------------------------------]) +AC_MSG_RESULT([LCDd will be compiled with the drivers:]) +for driver in $actdrivers; do + AC_MSG_RESULT([ - $driver]) +done +AC_MSG_RESULT([---------------------------------------]) AC_SUBST(LIBCURSES) AC_SUBST(LIBIRMAN) @@ -545,7 +549,7 @@ AC_DEFUN([AC_GET_FS_INFO], [ ]) AC_CHECK_FUNCS(getmntinfo) - AC_CHECKING(how to get filesystem space usage) + AC_MSG_NOTICE([checking how to get filesystem space usage...]) space=no # Here we'll compromise a little (and perform only the link test) diff --git a/configure.in b/configure.in index 2130257..c60c856 100644 --- a/configure.in +++ b/configure.in @@ -242,9 +242,11 @@ AC_ARG_ENABLE(libusb, AC_MSG_RESULT($enable_libusb) if test "$enable_libusb" = "yes"; then - PKG_CHECK_MODULES(LIBUSB, libusb, - [AC_DEFINE(HAVE_LIBUSB, [1], [Define to 1 if you have libusb])], - [ enable_libusb=no ]) + ifdef([PKG_CHECK_MODULES], + [PKG_CHECK_MODULES(LIBUSB, libusb, + [AC_DEFINE(HAVE_LIBUSB, [1], [Define to 1 if you have libusb])], + [ enable_libusb=no ])], + [AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libusb may not be built])]) fi AC_SUBST(LIBUSB_LIBS) AC_SUBST(LIBUSB_CFLAGS) @@ -263,9 +265,11 @@ AC_ARG_ENABLE(libftdi, AC_MSG_RESULT($enable_libftdi) if test "$enable_libftdi" = "yes"; then - PKG_CHECK_MODULES(LIBFTDI, libftdi >= 0.8, - [AC_DEFINE(HAVE_LIBFTDI, [1], [Define to 1 if you have libftdi])], - [ enable_libftdi=no ]) + ifdef([PKG_CHECK_MODULES], + [PKG_CHECK_MODULES(LIBFTDI, libftdi >= 0.8, + [AC_DEFINE(HAVE_LIBFTDI, [1], [Define to 1 if you have libftdi])], + [ enable_libftdi=no ])], + [AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libftdi may not be built])]) fi AC_SUBST(LIBFTDI_LIBS) AC_SUBST(LIBFTDI_CFLAGS) @@ -284,8 +288,11 @@ AC_ARG_ENABLE(ethlcd, AC_MSG_RESULT($enable_ethlcd) +# check for doxygen +BB_ENABLE_DOXYGEN -dnl Select drivers to build + +# Select drivers to build LCD_DRIVERS_SELECT @@ -364,9 +371,6 @@ AC_ARG_ENABLE(stat-smbfs, ) -# check for doxygen -BB_ENABLE_DOXYGEN - AC_CONFIG_FILES([Makefile shared/Makefile server/Makefile