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
+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 ]
)