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_CHECKING(which drivers to compile)
@@ -443,10 +446,10 @@ AC_DEFUN([AC_CURSES_ACS_ARRAY], [
fi
])
dnl
dnl Find out where is the mounted filesystem table
dnl
AC_DEFUN([AC_FIND_MTAB_FILE], [
AC_CACHE_CHECK([for your mounted filesystem table], ac_cv_mtab_file, [
dnl Linux
@@ -469,6 +472,7 @@ AC_DEFUN([AC_FIND_MTAB_FILE], [
fi
])
dnl
dnl Filesystem information detection
dnl
@@ -477,7 +481,6 @@ dnl
dnl This code is stolen from mc-4.5.41, which in turn has stolen it
dnl from GNU fileutils-3.12.
dnl
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(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 1.1 (2001/07/26) -- Miscellaneous @ ac-archive-0.5.32
dnl Warren Young <warren@etr-usa.com>
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
]) dnl ETR_SYSV_IPC
dnl 1.1 (2001/07/26) -- Miscellaneous @ ac-archive-0.5.32
dnl Warren Young <warren@etr-usa.com>
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
]) dnl ETR_UNION_SEMUN
dnl Loadable modules determination.
dnl Joris Robijn, 2002
dnl I choose not to use libtool.
@@ -766,13 +772,22 @@ AC_SUBST(LDSHARED)
dnl End of loadable modules determination
]) dnl AC_MODULES_INFO
dnl stolen from cppunit project (http://cppunit.sourceforge.net/)
AC_DEFUN([BB_ENABLE_DOXYGEN],
[
AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)])
AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)])
AC_ARG_ENABLE(html-dox, [ --enable-html-dox enable HTML generation with doxygen (yes)], [], [ enable_html_dox=yes])
AC_ARG_ENABLE(latex-dox, [ --enable-latex-dox enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_dox=no])
AC_ARG_ENABLE(doxygen,
[AS_HELP_STRING([--enable-doxygen], [enable documentation generation with doxygen (auto)])])
AC_ARG_ENABLE(dot,
[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
enable_dox=no
else
@@ -802,6 +817,7 @@ AC_SUBST(enable_html_dox)
AC_SUBST(enable_latex_dox)
])
dnl From: http://autoconf-archive.cryp.to/ax_cflags_gcc_option.html
dnl Author: Guido Draheim <guidod@gmx.de>
dnl Last Modified: 2003-11-04
+67 -70
View File
@@ -41,14 +41,14 @@ AM_CONDITIONAL(DARWIN, test x$ac_system_host = xDarwin)
AC_MSG_CHECKING(whether to enable debugging)
AC_ARG_ENABLE(debug,
[ --enable-debug show debug information],
if [[[ "$enableval" = "yes" ]]]; then
AC_DEFINE(DEBUG,[1],[Define to 1 to show debug information])
[AS_HELP_STRING([--enable-debug], [show debug information])],
[ if test "$enableval" != "no"; then
AC_DEFINE(DEBUG, [1], [Define to 1 to show debug information])
debug="yes"
else
else
debug="no"
fi,
debug="no"
fi ],
[ debug=no ]
)
AC_MSG_RESULT($debug)
@@ -121,24 +121,24 @@ AC_CHECK_HEADERS([machine/cpufunc.h], [], [],
dnl sched_setscheduler on OpenBSD
AC_CHECK_FUNCS(sched_setscheduler)
AC_CHECK_LIB(posix4, sched_setscheduler, [
AC_DEFINE([HAVE_SCHED_SETSCHEDULER],[1],
[Define if you have the sched_setscheduler function.])
AC_DEFINE([HAVE_SCHED_SETSCHEDULER], [1],
[Define if you have the sched_setscheduler function.])
])
AC_CHECK_LIB(rt, sched_setscheduler, [
AC_DEFINE([HAVE_SCHED_SETSCHEDULER],[1],
[Define if you have the sched_setscheduler function.])
AC_DEFINE([HAVE_SCHED_SETSCHEDULER], [1],
[Define if you have the sched_setscheduler function.])
])
dnl i386_get_ioperm on NetBSD&OpenBSD
AC_CHECK_LIB(i386, i386_get_ioperm,
LIBS="-li386 $LIBS"
AC_DEFINE([HAVE_I386_IOPERM_NETBSD],[1],
[Define if you have the NetBSD&OpenBSD version of i386_ioperm functions.]),[
LIBS="-li386 $LIBS"
AC_DEFINE([HAVE_I386_IOPERM_NETBSD], [1],
[Define if you have the NetBSD&OpenBSD version of i386_ioperm functions.]),[
dnl i386_get_ioperm on FreeBSD
AC_CHECK_LIB(c, i386_get_ioperm,
AC_DEFINE([HAVE_I386_IOPERM_FREEBSD],[1],
[Define if you have the FreeBSD version of the i386_ioperm functions.]),
[])]
AC_DEFINE([HAVE_I386_IOPERM_FREEBSD],[1],
[Define if you have the FreeBSD version of the i386_ioperm functions.]),
[])]
)
AC_CHECK_FUNCS(iopl)
@@ -148,11 +148,13 @@ AC_CHECK_HEADERS(sys/io.h)
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!
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
then
AC_DEFINE([HAVE_PCSTYLE_LPT_CONTROL],[1],[Define if you have a parallel port and LCDproc knows how to talk to it.])
if test "$ac_cv_port_have_lpt" = yes; then
AC_DEFINE([HAVE_PCSTYLE_LPT_CONTROL], [1],
[Define if you have a parallel port and LCDproc knows how to talk to it.])
else
AC_MSG_WARN([Can't talk to the parallel port, disabling drivers that use it.])
fi
@@ -190,7 +192,7 @@ AC_CONFIG_LIBOBJ_DIR(shared)
AC_CHECK_FUNC(getopt_long,
[
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=$no)
if test "x$with_getopt" = xyes; then
@@ -211,9 +213,9 @@ AC_GET_FS_INFO
dnl Check for various defines and features
AC_ARG_WITH(lcdport,
[ --with-lcdport=<port> the server port [13666]],
LCDPORT=$withval,
LCDPORT="13666"
[AS_HELP_STRING([--with-lcdport=<port>], [the server port [13666]])],
LCDPORT=$withval,
LCDPORT="13666"
)
AC_DEFINE_UNQUOTED(LCDPORT, $LCDPORT, [Set default port where LCDd should listen])
@@ -229,20 +231,19 @@ dnl ######################################################################
dnl libusb support
dnl ######################################################################
AC_MSG_CHECKING([if libusb support has been enabled]);
AC_ARG_ENABLE(
libusb,
[AS_HELP_STRING([--disable-libusb],[disable USB support using libusb])],
[
if test "$enableval" != "no"; then
enable_libusb="yes"
fi
],
[ enable_libusb="yes" ]
AC_ARG_ENABLE(libusb,
[AS_HELP_STRING([--disable-libusb],[disable USB support using libusb])],
[ if test "$enableval" != "no"; then
enable_libusb="yes"
fi ],
[ enable_libusb=yes ]
)
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)
PKG_CHECK_MODULES(LIBUSB, libusb,
[AC_DEFINE(HAVE_LIBUSB, [1], [Define to 1 if you have libusb])],
[ enable_libusb=no ])
fi
AC_SUBST(LIBUSB_LIBS)
AC_SUBST(LIBUSB_CFLAGS)
@@ -251,22 +252,19 @@ dnl ######################################################################
dnl libftdi support
dnl ######################################################################
AC_MSG_CHECKING([if libftdi support has been enabled]);
AC_ARG_ENABLE(
libftdi,
[AS_HELP_STRING([--disable-libftdi],[disable FTDI support using libftdi])],
[
if test "$enableval" != "no"; then
enable_libftdi="yes"
fi
],
[
enable_libftdi="yes"
]
AC_ARG_ENABLE(libftdi,
[AS_HELP_STRING([--disable-libftdi],[disable FTDI support using libftdi])],
[ if test "$enableval" != "no"; then
enable_libftdi=yes
fi ],
[ enable_libftdi=yes ]
)
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)
PKG_CHECK_MODULES(LIBFTDI, libftdi >= 0.8,
[AC_DEFINE(HAVE_LIBFTDI, [1], [Define to 1 if you have libftdi])],
[ enable_libftdi=no ])
fi
AC_SUBST(LIBFTDI_LIBS)
AC_SUBST(LIBFTDI_CFLAGS)
@@ -277,53 +275,52 @@ LCD_DRIVERS_SELECT
# Features applicable to the server
AC_ARG_ENABLE(seamless-hbars,
[ --enable-seamless-hbars no gaps in horizontal bar graphs (if HW supports it)],
[ if test "$enableval" = "yes" ; then
AC_DEFINE(SEAMLESS_HBARS,[1],
[AS_HELP_STRING([--enable-seamless-hbars], [no gaps in horizontal bar graphs (if HW supports it)])],
[ if test "$enableval" != "no" ; then
AC_DEFINE(SEAMLESS_HBARS, [1],
[Define to 1 to avoid gaps in horizontal bar graphs (if HW supports it)])
fi ]
)
AC_ARG_ENABLE(testmenus,
[ --enable-testmenus enable server test menus],
if test "$enableval" = "yes" ; then
AC_DEFINE(LCDPROC_TESTMENUS,[1],
[AS_HELP_STRING([--enable-testmenus], [enable server test menus])],
[ if test "$enableval" != "no" ; then
AC_DEFINE(LCDPROC_TESTMENUS, [1],
[Define to 1 to enable server test menus])
fi
fi ]
)
AC_ARG_ENABLE(permissive_menu_goto,
[ --enable-permissive-menu-goto allow transitions]
[ between different client's menus],
if test "$enableval" = "yes" ; then
AC_DEFINE(LCDPROC_PERMISSIVE_MENU_GOTO,[1],
[AS_HELP_STRING([--enable-permissive-menu-goto], [allow transitions between different client's menus])],
[ if test "$enableval" != "no" ; then
AC_DEFINE(LCDPROC_PERMISSIVE_MENU_GOTO, [1],
[Define to 1 to allow transitions between different client's menus])
fi
fi ]
)
dnl Features applicable to the lcdproc client
AC_ARG_ENABLE(lcdproc-menus,
[ --enable-lcdproc-menus enable menu support in lcdproc client],
if test "$enableval" = "yes" ; then
AC_DEFINE(LCDPROC_MENUS,[1],
[AS_HELP_STRING([--enable-lcdproc-menus], [enable menu support in lcdproc client])],
[ if test "$enableval" != "no" ; then
AC_DEFINE(LCDPROC_MENUS, [1],
[Define to 1 to enable menu support in lcdproc client])
fi
fi ]
)
AC_ARG_ENABLE(stat-nfs,
[ --enable-stat-nfs display NFS filesystem stats in lcdproc client],
if test "$enableval" = "yes" ; then
AC_DEFINE(STAT_NFS,[1],
[AS_HELP_STRING([--enable-stat-nfs], [display NFS filesystem stats in lcdproc client])],
[ if test "$enableval" != "no" ; then
AC_DEFINE(STAT_NFS, [1],
[Define to 1 to display NFS filesystem stats in lcdproc client])
fi
fi ]
)
AC_ARG_ENABLE(stat-smbfs,
[ --enable-stat-smbfs display SMBFS filesystem stats in lcdproc client],
if test "$enableval" = "yes" ; then
AC_DEFINE(STAT_SMBFS,[1],
[AS_HELP_STRING([--enable-stat-smbfs], [display SMBFS filesystem stats in lcdproc client])],
[ if test "$enableval" != "no" ; then
AC_DEFINE(STAT_SMBFS, [1],
[Define to 1 to display SMBFS filesystem stats in lcdproc client])
fi
fi ]
)