further cleanups to the build system: indenting, quoting, ...

This commit is contained in:
marschap
2007-11-01 19:09:07 +00:00
parent 91f48f8720
commit 6af05c509a
2 changed files with 89 additions and 76 deletions
+22 -6
View File
@@ -1,3 +1,6 @@
dnl
dnl Define function/macro for driver selection using the --enable-drivers=... option
dnl
AC_DEFUN([LCD_DRIVERS_SELECT], [ AC_DEFUN([LCD_DRIVERS_SELECT], [
AC_CHECKING(which drivers to compile) AC_CHECKING(which drivers to compile)
@@ -443,10 +446,10 @@ AC_DEFUN([AC_CURSES_ACS_ARRAY], [
fi fi
]) ])
dnl dnl
dnl Find out where is the mounted filesystem table dnl Find out where is the mounted filesystem table
dnl dnl
AC_DEFUN([AC_FIND_MTAB_FILE], [ AC_DEFUN([AC_FIND_MTAB_FILE], [
AC_CACHE_CHECK([for your mounted filesystem table], ac_cv_mtab_file, [ AC_CACHE_CHECK([for your mounted filesystem table], ac_cv_mtab_file, [
dnl Linux dnl Linux
@@ -469,6 +472,7 @@ AC_DEFUN([AC_FIND_MTAB_FILE], [
fi fi
]) ])
dnl dnl
dnl Filesystem information detection dnl Filesystem information detection
dnl dnl
@@ -477,7 +481,6 @@ dnl
dnl This code is stolen from mc-4.5.41, which in turn has stolen it dnl This code is stolen from mc-4.5.41, which in turn has stolen it
dnl from GNU fileutils-3.12. dnl from GNU fileutils-3.12.
dnl dnl
AC_DEFUN([AC_GET_FS_INFO], [ AC_DEFUN([AC_GET_FS_INFO], [
AC_CHECK_HEADERS(fcntl.h sys/dustat.h sys/param.h sys/statfs.h sys/fstyp.h) AC_CHECK_HEADERS(fcntl.h sys/dustat.h sys/param.h sys/statfs.h sys/fstyp.h)
AC_CHECK_HEADERS(mnttab.h mntent.h utime.h sys/statvfs.h sys/vfs.h) AC_CHECK_HEADERS(mnttab.h mntent.h utime.h sys/statvfs.h sys/vfs.h)
@@ -645,6 +648,7 @@ AC_DEFUN([AC_GET_FS_INFO], [
dnl fi dnl fi
]) ])
dnl 1.1 (2001/07/26) -- Miscellaneous @ ac-archive-0.5.32 dnl 1.1 (2001/07/26) -- Miscellaneous @ ac-archive-0.5.32
dnl Warren Young <warren@etr-usa.com> dnl Warren Young <warren@etr-usa.com>
dnl This macro checks for the SysV IPC header files. It only checks dnl This macro checks for the SysV IPC header files. It only checks
@@ -670,6 +674,7 @@ AC_CACHE_CHECK([for System V IPC headers], ac_cv_sysv_ipc, [
fi fi
]) dnl ETR_SYSV_IPC ]) dnl ETR_SYSV_IPC
dnl 1.1 (2001/07/26) -- Miscellaneous @ ac-archive-0.5.32 dnl 1.1 (2001/07/26) -- Miscellaneous @ ac-archive-0.5.32
dnl Warren Young <warren@etr-usa.com> dnl Warren Young <warren@etr-usa.com>
dnl This macro checks to see if sys/sem.h defines union semun. Some dnl This macro checks to see if sys/sem.h defines union semun. Some
@@ -701,6 +706,7 @@ AC_CACHE_CHECK([for union semun], ac_cv_union_semun, [
fi fi
]) dnl ETR_UNION_SEMUN ]) dnl ETR_UNION_SEMUN
dnl Loadable modules determination. dnl Loadable modules determination.
dnl Joris Robijn, 2002 dnl Joris Robijn, 2002
dnl I choose not to use libtool. dnl I choose not to use libtool.
@@ -766,13 +772,22 @@ AC_SUBST(LDSHARED)
dnl End of loadable modules determination dnl End of loadable modules determination
]) dnl AC_MODULES_INFO ]) dnl AC_MODULES_INFO
dnl stolen from cppunit project (http://cppunit.sourceforge.net/) dnl stolen from cppunit project (http://cppunit.sourceforge.net/)
AC_DEFUN([BB_ENABLE_DOXYGEN], AC_DEFUN([BB_ENABLE_DOXYGEN],
[ [
AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)]) AC_ARG_ENABLE(doxygen,
AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)]) [AS_HELP_STRING([--enable-doxygen], [enable documentation generation with doxygen (auto)])])
AC_ARG_ENABLE(html-dox, [ --enable-html-dox enable HTML generation with doxygen (yes)], [], [ enable_html_dox=yes]) AC_ARG_ENABLE(dot,
AC_ARG_ENABLE(latex-dox, [ --enable-latex-dox enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_dox=no]) [AS_HELP_STRING([--enable-dot], [use 'dot' to generate graphs in doxygen (auto)])])
AC_ARG_ENABLE(html-dox,
[AS_HELP_STRING([--enable-html-dox], [enable HTML generation with doxygen (yes)])],
[],
[enable_html_dox=yes])
AC_ARG_ENABLE(latex-dox,
[AS_HELP_STRING([--enable-latex-dox], [enable LaTeX documentation generation with doxygen (no)])],
[],
[enable_latex_dox=no])
if test "x$enable_doxygen" = xno; then if test "x$enable_doxygen" = xno; then
enable_dox=no enable_dox=no
else else
@@ -802,6 +817,7 @@ AC_SUBST(enable_html_dox)
AC_SUBST(enable_latex_dox) AC_SUBST(enable_latex_dox)
]) ])
dnl From: http://autoconf-archive.cryp.to/ax_cflags_gcc_option.html dnl From: http://autoconf-archive.cryp.to/ax_cflags_gcc_option.html
dnl Author: Guido Draheim <guidod@gmx.de> dnl Author: Guido Draheim <guidod@gmx.de>
dnl Last Modified: 2003-11-04 dnl Last Modified: 2003-11-04
+44 -47
View File
@@ -41,14 +41,14 @@ AM_CONDITIONAL(DARWIN, test x$ac_system_host = xDarwin)
AC_MSG_CHECKING(whether to enable debugging) AC_MSG_CHECKING(whether to enable debugging)
AC_ARG_ENABLE(debug, AC_ARG_ENABLE(debug,
[ --enable-debug show debug information], [AS_HELP_STRING([--enable-debug], [show debug information])],
if [[[ "$enableval" = "yes" ]]]; then [ if test "$enableval" != "no"; then
AC_DEFINE(DEBUG, [1], [Define to 1 to show debug information]) AC_DEFINE(DEBUG, [1], [Define to 1 to show debug information])
debug="yes" debug="yes"
else else
debug="no" debug="no"
fi, fi ],
debug="no" [ debug=no ]
) )
AC_MSG_RESULT($debug) AC_MSG_RESULT($debug)
@@ -148,11 +148,13 @@ AC_CHECK_HEADERS(sys/io.h)
dnl Check if we support this parallel (LPT) port dnl Check if we support this parallel (LPT) port
dnl IMPORTANT: we must do all the checks used in port.h before doing this test! dnl IMPORTANT: we must do all the checks used in port.h before doing this test!
AC_CACHE_CHECK([for a parallel port], ac_cv_port_have_lpt, AC_CACHE_CHECK([for a parallel port], ac_cv_port_have_lpt,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "${srcdir}/server/drivers/port.h"]], [[char val = port_in(0x350)]])],[ac_cv_port_have_lpt=yes],[ac_cv_port_have_lpt=no])]) [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "${srcdir}/server/drivers/port.h"]],
[[char val = port_in(0x350)]])],
[ac_cv_port_have_lpt=yes],[ac_cv_port_have_lpt=no])])
if test "$ac_cv_port_have_lpt" = yes if test "$ac_cv_port_have_lpt" = yes; then
then AC_DEFINE([HAVE_PCSTYLE_LPT_CONTROL], [1],
AC_DEFINE([HAVE_PCSTYLE_LPT_CONTROL],[1],[Define if you have a parallel port and LCDproc knows how to talk to it.]) [Define if you have a parallel port and LCDproc knows how to talk to it.])
else else
AC_MSG_WARN([Can't talk to the parallel port, disabling drivers that use it.]) AC_MSG_WARN([Can't talk to the parallel port, disabling drivers that use it.])
fi fi
@@ -190,7 +192,7 @@ AC_CONFIG_LIBOBJ_DIR(shared)
AC_CHECK_FUNC(getopt_long, AC_CHECK_FUNC(getopt_long,
[ [
AC_ARG_WITH(included-getopt, AC_ARG_WITH(included-getopt,
[ --with-included-getopt Use the included getopt rather than glibc's], [AS_HELP_STRING([--with-included-getopt], [Use the included getopt rather than glibc's])],
with_getopt=$withval, with_getopt=$withval,
with_getopt=$no) with_getopt=$no)
if test "x$with_getopt" = xyes; then if test "x$with_getopt" = xyes; then
@@ -211,7 +213,7 @@ AC_GET_FS_INFO
dnl Check for various defines and features dnl Check for various defines and features
AC_ARG_WITH(lcdport, AC_ARG_WITH(lcdport,
[ --with-lcdport=<port> the server port [13666]], [AS_HELP_STRING([--with-lcdport=<port>], [the server port [13666]])],
LCDPORT=$withval, LCDPORT=$withval,
LCDPORT="13666" LCDPORT="13666"
) )
@@ -229,20 +231,19 @@ dnl ######################################################################
dnl libusb support dnl libusb support
dnl ###################################################################### dnl ######################################################################
AC_MSG_CHECKING([if libusb support has been enabled]); AC_MSG_CHECKING([if libusb support has been enabled]);
AC_ARG_ENABLE( AC_ARG_ENABLE(libusb,
libusb,
[AS_HELP_STRING([--disable-libusb],[disable USB support using libusb])], [AS_HELP_STRING([--disable-libusb],[disable USB support using libusb])],
[ [ if test "$enableval" != "no"; then
if test "$enableval" != "no"; then
enable_libusb="yes" enable_libusb="yes"
fi fi ],
], [ enable_libusb=yes ]
[ enable_libusb="yes" ]
) )
AC_MSG_RESULT($enable_libusb) AC_MSG_RESULT($enable_libusb)
if test "$enable_libusb" = "yes"; then 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) PKG_CHECK_MODULES(LIBUSB, libusb,
[AC_DEFINE(HAVE_LIBUSB, [1], [Define to 1 if you have libusb])],
[ enable_libusb=no ])
fi fi
AC_SUBST(LIBUSB_LIBS) AC_SUBST(LIBUSB_LIBS)
AC_SUBST(LIBUSB_CFLAGS) AC_SUBST(LIBUSB_CFLAGS)
@@ -251,22 +252,19 @@ dnl ######################################################################
dnl libftdi support dnl libftdi support
dnl ###################################################################### dnl ######################################################################
AC_MSG_CHECKING([if libftdi support has been enabled]); AC_MSG_CHECKING([if libftdi support has been enabled]);
AC_ARG_ENABLE( AC_ARG_ENABLE(libftdi,
libftdi,
[AS_HELP_STRING([--disable-libftdi],[disable FTDI support using libftdi])], [AS_HELP_STRING([--disable-libftdi],[disable FTDI support using libftdi])],
[ [ if test "$enableval" != "no"; then
if test "$enableval" != "no"; then enable_libftdi=yes
enable_libftdi="yes" fi ],
fi [ enable_libftdi=yes ]
],
[
enable_libftdi="yes"
]
) )
AC_MSG_RESULT($enable_libftdi) AC_MSG_RESULT($enable_libftdi)
if test "$enable_libftdi" = "yes"; then 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) PKG_CHECK_MODULES(LIBFTDI, libftdi >= 0.8,
[AC_DEFINE(HAVE_LIBFTDI, [1], [Define to 1 if you have libftdi])],
[ enable_libftdi=no ])
fi fi
AC_SUBST(LIBFTDI_LIBS) AC_SUBST(LIBFTDI_LIBS)
AC_SUBST(LIBFTDI_CFLAGS) AC_SUBST(LIBFTDI_CFLAGS)
@@ -277,53 +275,52 @@ LCD_DRIVERS_SELECT
# Features applicable to the server # Features applicable to the server
AC_ARG_ENABLE(seamless-hbars, AC_ARG_ENABLE(seamless-hbars,
[ --enable-seamless-hbars no gaps in horizontal bar graphs (if HW supports it)], [AS_HELP_STRING([--enable-seamless-hbars], [no gaps in horizontal bar graphs (if HW supports it)])],
[ if test "$enableval" = "yes" ; then [ if test "$enableval" != "no" ; then
AC_DEFINE(SEAMLESS_HBARS, [1], AC_DEFINE(SEAMLESS_HBARS, [1],
[Define to 1 to avoid gaps in horizontal bar graphs (if HW supports it)]) [Define to 1 to avoid gaps in horizontal bar graphs (if HW supports it)])
fi ] fi ]
) )
AC_ARG_ENABLE(testmenus, AC_ARG_ENABLE(testmenus,
[ --enable-testmenus enable server test menus], [AS_HELP_STRING([--enable-testmenus], [enable server test menus])],
if test "$enableval" = "yes" ; then [ if test "$enableval" != "no" ; then
AC_DEFINE(LCDPROC_TESTMENUS, [1], AC_DEFINE(LCDPROC_TESTMENUS, [1],
[Define to 1 to enable server test menus]) [Define to 1 to enable server test menus])
fi fi ]
) )
AC_ARG_ENABLE(permissive_menu_goto, AC_ARG_ENABLE(permissive_menu_goto,
[ --enable-permissive-menu-goto allow transitions] [AS_HELP_STRING([--enable-permissive-menu-goto], [allow transitions between different client's menus])],
[ between different client's menus], [ if test "$enableval" != "no" ; then
if test "$enableval" = "yes" ; then
AC_DEFINE(LCDPROC_PERMISSIVE_MENU_GOTO, [1], AC_DEFINE(LCDPROC_PERMISSIVE_MENU_GOTO, [1],
[Define to 1 to allow transitions between different client's menus]) [Define to 1 to allow transitions between different client's menus])
fi fi ]
) )
dnl Features applicable to the lcdproc client dnl Features applicable to the lcdproc client
AC_ARG_ENABLE(lcdproc-menus, AC_ARG_ENABLE(lcdproc-menus,
[ --enable-lcdproc-menus enable menu support in lcdproc client], [AS_HELP_STRING([--enable-lcdproc-menus], [enable menu support in lcdproc client])],
if test "$enableval" = "yes" ; then [ if test "$enableval" != "no" ; then
AC_DEFINE(LCDPROC_MENUS, [1], AC_DEFINE(LCDPROC_MENUS, [1],
[Define to 1 to enable menu support in lcdproc client]) [Define to 1 to enable menu support in lcdproc client])
fi fi ]
) )
AC_ARG_ENABLE(stat-nfs, AC_ARG_ENABLE(stat-nfs,
[ --enable-stat-nfs display NFS filesystem stats in lcdproc client], [AS_HELP_STRING([--enable-stat-nfs], [display NFS filesystem stats in lcdproc client])],
if test "$enableval" = "yes" ; then [ if test "$enableval" != "no" ; then
AC_DEFINE(STAT_NFS, [1], AC_DEFINE(STAT_NFS, [1],
[Define to 1 to display NFS filesystem stats in lcdproc client]) [Define to 1 to display NFS filesystem stats in lcdproc client])
fi fi ]
) )
AC_ARG_ENABLE(stat-smbfs, AC_ARG_ENABLE(stat-smbfs,
[ --enable-stat-smbfs display SMBFS filesystem stats in lcdproc client], [AS_HELP_STRING([--enable-stat-smbfs], [display SMBFS filesystem stats in lcdproc client])],
if test "$enableval" = "yes" ; then [ if test "$enableval" != "no" ; then
AC_DEFINE(STAT_SMBFS, [1], AC_DEFINE(STAT_SMBFS, [1],
[Define to 1 to display SMBFS filesystem stats in lcdproc client]) [Define to 1 to display SMBFS filesystem stats in lcdproc client])
fi fi ]
) )