2005-04-05 07:25:17 +00:00
|
|
|
# -*- mode: m4; -*-
|
2011-11-07 06:55:00 +00:00
|
|
|
dnl Process this file with autoconf 2.61 (or higher) to produce a configure script.
|
|
|
|
|
AC_PREREQ(2.61)
|
|
|
|
|
AC_INIT([lcdproc], [0.5dev], [lcdproc@lists.omnipotent.net])
|
2004-10-17 21:01:13 +00:00
|
|
|
AC_CONFIG_SRCDIR([clients/lcdproc/batt.c])
|
2011-11-07 06:55:00 +00:00
|
|
|
AM_INIT_AUTOMAKE
|
2004-10-17 21:01:13 +00:00
|
|
|
|
2005-02-27 22:11:42 +00:00
|
|
|
AC_CONFIG_HEADERS(config.h)
|
1999-12-11 19:33:35 +00:00
|
|
|
|
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
case "$host" in
|
2001-12-28 21:52:39 +00:00
|
|
|
*-*-*linux*) dnl i586-pc-linux-gnu
|
|
|
|
|
AC_DEFINE([LINUX],[1],[Define if you're using Linux.])
|
|
|
|
|
ac_system_host=Linux
|
1999-12-11 19:33:35 +00:00
|
|
|
;;
|
2000-11-29 18:48:53 +00:00
|
|
|
*-*-*solaris*)
|
2001-12-28 21:52:39 +00:00
|
|
|
AC_DEFINE([SOLARIS],[1],[Define if you're using Solaris.])
|
|
|
|
|
ac_system_host=Solaris
|
|
|
|
|
;;
|
|
|
|
|
*-*-*openbsd*) dnl i386-unknown-openbsd3.0
|
|
|
|
|
AC_DEFINE([OPENBSD],[1],[Define if you're using OpenBSD.])
|
|
|
|
|
ac_system_host=OpenBSD
|
|
|
|
|
;;
|
|
|
|
|
*-*-*netbsd*)
|
|
|
|
|
AC_DEFINE([NETBSD],[1],[Define if you're using NetBSD.])
|
|
|
|
|
ac_system_host=NetBSD
|
|
|
|
|
;;
|
|
|
|
|
*-*-*freebsd*)
|
|
|
|
|
AC_DEFINE([FREEBSD],[1],[Define if you're using FreeBSD.])
|
|
|
|
|
ac_system_host=FreeBSD
|
2000-11-29 18:48:53 +00:00
|
|
|
;;
|
2006-02-04 19:38:09 +00:00
|
|
|
*-*-*darwin*)
|
|
|
|
|
AC_DEFINE([DARWIN],[1],[Define if you're using Darwin/Mac OS X.])
|
|
|
|
|
ac_system_host=Darwin
|
|
|
|
|
;;
|
1999-12-11 19:33:35 +00:00
|
|
|
esac
|
2006-02-04 19:38:09 +00:00
|
|
|
AC_DEFINE_UNQUOTED([SYSTEM_HOST], [$ac_system_host], [Set this to your system host (Linux, Solaris, OpenBSD, NetBSD, FreeBSD or Darwin)])
|
|
|
|
|
|
|
|
|
|
dnl treat Darwin special in Makefiles
|
2006-02-05 12:15:06 +00:00
|
|
|
AM_CONDITIONAL(DARWIN, test x$ac_system_host = xDarwin)
|
1999-12-11 19:33:35 +00:00
|
|
|
|
2011-04-03 19:25:08 +00:00
|
|
|
AC_MSG_CHECKING([whether to enable debugging])
|
1999-12-11 19:33:35 +00:00
|
|
|
AC_ARG_ENABLE(debug,
|
2007-11-01 19:09:07 +00:00
|
|
|
[AS_HELP_STRING([--enable-debug], [show debug information])],
|
|
|
|
|
[ if test "$enableval" != "no"; then
|
|
|
|
|
AC_DEFINE(DEBUG, [1], [Define to 1 to show debug information])
|
2003-08-17 15:46:03 +00:00
|
|
|
debug="yes"
|
2007-11-01 19:09:07 +00:00
|
|
|
else
|
2003-08-17 15:46:03 +00:00
|
|
|
debug="no"
|
2007-11-01 19:09:07 +00:00
|
|
|
fi ],
|
|
|
|
|
[ debug=no ]
|
1999-12-11 19:33:35 +00:00
|
|
|
)
|
|
|
|
|
AC_MSG_RESULT($debug)
|
|
|
|
|
|
|
|
|
|
if test $debug = "yes"; then
|
2006-01-15 20:12:27 +00:00
|
|
|
dnl Enable debugging information with minimal optimisation if not set differently
|
|
|
|
|
dnl (the spaces before $CFLAGS and -O are significant)
|
|
|
|
|
CFLAGS="$CFLAGS -g"
|
|
|
|
|
if ! echo " $CFLAGS" | grep -q -- " -O" ; then
|
2006-01-15 19:34:28 +00:00
|
|
|
CFLAGS="$CFLAGS -O"
|
|
|
|
|
fi
|
1999-12-11 19:33:35 +00:00
|
|
|
else
|
2006-01-15 20:12:27 +00:00
|
|
|
dnl Maximum optimisation if not already set
|
|
|
|
|
dnl (the spaces before $CFLAGS and -O are significant)
|
|
|
|
|
if ! echo " $CFLAGS" | grep -q -- " -O" ; then
|
2006-01-15 19:34:28 +00:00
|
|
|
CFLAGS="$CFLAGS -O3"
|
|
|
|
|
fi
|
1999-12-11 19:33:35 +00:00
|
|
|
fi
|
|
|
|
|
|
2008-09-20 16:44:24 +00:00
|
|
|
dnl Checks for programs used in building
|
1999-12-11 19:33:35 +00:00
|
|
|
AC_PROG_CC
|
|
|
|
|
AC_PROG_CPP
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
AC_PROG_RANLIB
|
2008-09-20 16:44:24 +00:00
|
|
|
AM_PROG_CC_C_O
|
2011-01-19 19:04:54 +00:00
|
|
|
AC_PATH_PROG([XMLTO], [xmlto], [no])
|
1999-12-11 19:33:35 +00:00
|
|
|
|
2005-10-25 22:33:39 +00:00
|
|
|
dnl Avoid unused static function warnings
|
|
|
|
|
CFLAGS="-Wall $CFLAGS"
|
2006-04-14 08:04:09 +00:00
|
|
|
AX_CFLAGS_GCC_OPTION(-Wno-unused-function)
|
|
|
|
|
AX_CFLAGS_GCC_OPTION(-ftrampolines)
|
2005-10-25 22:33:39 +00:00
|
|
|
export CFLAGS
|
|
|
|
|
|
2000-12-20 00:38:06 +00:00
|
|
|
dnl Solaris
|
|
|
|
|
AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
|
|
|
|
|
AC_CHECK_FUNC(connect,,[AC_CHECK_LIB(socket,connect)])
|
|
|
|
|
AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton)])
|
|
|
|
|
AC_CHECK_LIB(kstat, kstat_open)
|
2002-05-09 00:30:19 +00:00
|
|
|
AC_CHECK_LIB(posix4, nanosleep)
|
2000-12-20 00:38:06 +00:00
|
|
|
AC_CHECK_FUNCS(getloadavg swapctl)
|
2001-12-28 21:52:39 +00:00
|
|
|
AC_CHECK_HEADERS(procfs.h sys/procfs.h sys/loadavg.h utmpx.h)
|
2000-12-20 00:38:06 +00:00
|
|
|
|
|
|
|
|
dnl Some versions of Solaris require -lelf for -lkvm
|
|
|
|
|
AC_CHECK_LIB(kvm, kvm_open,[
|
|
|
|
|
LIBS="-lkvm $LIBS"
|
2011-04-03 19:25:08 +00:00
|
|
|
],[AC_MSG_CHECKING([for kvm_open in -lkvm with -lelf])
|
2000-12-20 00:38:06 +00:00
|
|
|
AC_CACHE_VAL(ac_cv_lib_kvm_with_elf,
|
|
|
|
|
[ac_save_LIBS="$LIBS"
|
|
|
|
|
LIBS="-lkvm -lelf $LIBS"
|
2004-10-17 21:01:13 +00:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[char kvm_open();]], [[kvm_open()]])],[ac_cv_lib_kvm_with_elf=yes],[ac_cv_lib_kvm_with_elf=no])
|
2000-12-20 00:38:06 +00:00
|
|
|
LIBS="$ac_save_LIBS"
|
|
|
|
|
])
|
|
|
|
|
if test "$ac_cv_lib_kvm_with_elf" = "yes"; then
|
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
|
LIBS="-lkvm -lelf $LIBS"
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
|
fi
|
|
|
|
|
])
|
|
|
|
|
|
2001-12-25 19:28:54 +00:00
|
|
|
dnl NetBSD, OpenBSD and FreeBSD
|
2010-09-04 20:57:10 +00:00
|
|
|
AC_CHECK_HEADERS(sched.h sys/types.h machine/pio.h machine/sysarch.h sys/cpuvar.h machine/apm_bios.h)
|
2001-12-25 19:28:54 +00:00
|
|
|
ETR_SYSV_IPC
|
|
|
|
|
ETR_UNION_SEMUN
|
|
|
|
|
|
2007-09-08 13:26:16 +00:00
|
|
|
dnl machine/cpufunc.h needs additional header on FreeBSD
|
|
|
|
|
AC_CHECK_HEADERS([machine/cpufunc.h], [], [],
|
|
|
|
|
[[#if HAVE_SYS_TYPES_H
|
|
|
|
|
# include <sys/types.h>
|
|
|
|
|
#endif
|
|
|
|
|
]])
|
|
|
|
|
|
2002-08-27 02:03:33 +00:00
|
|
|
dnl sched_setscheduler on OpenBSD
|
|
|
|
|
AC_CHECK_FUNCS(sched_setscheduler)
|
2002-08-28 22:29:08 +00:00
|
|
|
AC_CHECK_LIB(posix4, sched_setscheduler, [
|
2007-11-01 19:09:07 +00:00
|
|
|
AC_DEFINE([HAVE_SCHED_SETSCHEDULER], [1],
|
|
|
|
|
[Define if you have the sched_setscheduler function.])
|
2002-08-28 22:29:08 +00:00
|
|
|
])
|
|
|
|
|
AC_CHECK_LIB(rt, sched_setscheduler, [
|
2007-11-01 19:09:07 +00:00
|
|
|
AC_DEFINE([HAVE_SCHED_SETSCHEDULER], [1],
|
|
|
|
|
[Define if you have the sched_setscheduler function.])
|
2002-08-28 22:29:08 +00:00
|
|
|
])
|
2002-08-27 02:03:33 +00:00
|
|
|
|
2002-04-29 23:24:14 +00:00
|
|
|
dnl i386_get_ioperm on NetBSD&OpenBSD
|
|
|
|
|
AC_CHECK_LIB(i386, i386_get_ioperm,
|
2007-11-01 19:09:07 +00:00
|
|
|
LIBS="-li386 $LIBS"
|
|
|
|
|
AC_DEFINE([HAVE_I386_IOPERM_NETBSD], [1],
|
|
|
|
|
[Define if you have the NetBSD&OpenBSD version of i386_ioperm functions.]),[
|
2002-04-29 23:24:14 +00:00
|
|
|
dnl i386_get_ioperm on FreeBSD
|
|
|
|
|
AC_CHECK_LIB(c, i386_get_ioperm,
|
2007-11-01 19:09:07 +00:00
|
|
|
AC_DEFINE([HAVE_I386_IOPERM_FREEBSD],[1],
|
|
|
|
|
[Define if you have the FreeBSD version of the i386_ioperm functions.]),
|
|
|
|
|
[])]
|
2002-04-29 23:24:14 +00:00
|
|
|
)
|
|
|
|
|
|
2003-04-04 22:53:16 +00:00
|
|
|
AC_CHECK_FUNCS(iopl)
|
2002-05-02 01:17:28 +00:00
|
|
|
AC_CHECK_FUNCS(ioperm)
|
|
|
|
|
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,
|
2007-11-01 19:09:07 +00:00
|
|
|
[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])])
|
2002-05-02 01:17:28 +00:00
|
|
|
|
2007-11-01 19:09:07 +00:00
|
|
|
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.])
|
2002-05-02 01:17:28 +00:00
|
|
|
else
|
2011-04-03 19:25:08 +00:00
|
|
|
AC_MSG_WARN([Cannot talk to the parallel port, disabling drivers that use it.])
|
2002-05-02 01:17:28 +00:00
|
|
|
fi
|
|
|
|
|
|
2010-05-11 20:50:31 +00:00
|
|
|
x_ac_have_i2c=no
|
2013-04-07 11:45:27 +00:00
|
|
|
AC_CHECK_HEADERS([linux/i2c-dev.h dev/iicbus/iic.h], [x_ac_have_i2c=yes])
|
2010-05-11 20:50:31 +00:00
|
|
|
if test "$x_ac_have_i2c" = yes; then
|
|
|
|
|
AC_DEFINE(HAVE_I2C,[1],[Define to 1 if you have the i2c headers])
|
|
|
|
|
fi
|
|
|
|
|
|
2014-01-29 21:48:03 +00:00
|
|
|
x_ac_have_spi=no
|
|
|
|
|
AC_CHECK_HEADERS([linux/spi/spidev.h], [x_ac_have_spi=yes])
|
|
|
|
|
if test "$x_ac_have_spi" = yes; then
|
|
|
|
|
AC_DEFINE(HAVE_SPI,[1],[Define to 1 if you have the spi headers])
|
|
|
|
|
fi
|
|
|
|
|
|
1999-12-11 19:33:35 +00:00
|
|
|
dnl Checks for header files.
|
|
|
|
|
AC_HEADER_DIRENT
|
|
|
|
|
AC_HEADER_STDC
|
2001-12-28 21:52:39 +00:00
|
|
|
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h sys/io.h errno.h)
|
2012-02-22 22:25:32 +00:00
|
|
|
AC_CHECK_HEADERS(limits.h kvm.h sys/param.h sys/dkstat.h stdbool.h)
|
2006-09-03 15:20:36 +00:00
|
|
|
|
|
|
|
|
dnl check sys/sysctl.h seperately, as it requires other headers on at least OpenBSD
|
|
|
|
|
AC_CHECK_HEADERS([sys/sysctl.h], [], [],
|
|
|
|
|
[[#if HAVE_SYS_PARAM_H
|
|
|
|
|
# include <sys/param.h>
|
|
|
|
|
#endif
|
|
|
|
|
]])
|
1999-12-11 19:33:35 +00:00
|
|
|
|
2010-09-04 20:57:10 +00:00
|
|
|
dnl On FreeBSD >= 8 checking sys/pcpu.h fails without sys/param.h and kvm.h
|
|
|
|
|
AC_CHECK_HEADERS([sys/pcpu.h], [], [],
|
|
|
|
|
[[#if HAVE_SYS_PARAM_H
|
|
|
|
|
# include <sys/param.h>
|
|
|
|
|
#endif
|
|
|
|
|
#if HAVE_KVM_H
|
|
|
|
|
# include <kvm.h>
|
|
|
|
|
#endif
|
|
|
|
|
]])
|
|
|
|
|
|
|
|
|
|
|
2001-10-26 22:52:10 +00:00
|
|
|
dnl Check for particular preprocessor macros
|
2009-11-01 08:38:58 +00:00
|
|
|
LCD_SA_RESTART
|
2001-10-26 22:52:10 +00:00
|
|
|
|
1999-12-11 19:33:35 +00:00
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
|
AC_C_CONST
|
|
|
|
|
AC_C_INLINE
|
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
AC_HEADER_TIME
|
|
|
|
|
AC_STRUCT_TM
|
|
|
|
|
AC_TYPE_UID_T
|
|
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
|
AC_TYPE_SIGNAL
|
2002-05-11 18:19:39 +00:00
|
|
|
AC_CHECK_FUNCS(select socket strdup strerror strtol uname cfmakeraw snprintf)
|
1999-12-11 19:33:35 +00:00
|
|
|
|
2006-01-16 19:53:28 +00:00
|
|
|
dnl Many people on non-GNU/Linux systems don't have getopt
|
|
|
|
|
AC_CONFIG_LIBOBJ_DIR(shared)
|
2009-06-06 16:01:38 +00:00
|
|
|
AC_CHECK_FUNC(getopt,
|
2006-01-16 19:53:28 +00:00
|
|
|
[
|
|
|
|
|
AC_ARG_WITH(included-getopt,
|
2007-11-01 19:09:07 +00:00
|
|
|
[AS_HELP_STRING([--with-included-getopt], [Use the included getopt rather than glibc's])],
|
2006-01-16 19:53:28 +00:00
|
|
|
with_getopt=$withval,
|
|
|
|
|
with_getopt=$no)
|
|
|
|
|
if test "x$with_getopt" = xyes; then
|
|
|
|
|
AC_LIBOBJ(getopt)
|
|
|
|
|
AC_LIBOBJ(getopt1)
|
|
|
|
|
fi
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
AC_LIBOBJ(getopt)
|
|
|
|
|
AC_LIBOBJ(getopt1)
|
|
|
|
|
])
|
|
|
|
|
|
1999-12-16 09:15:53 +00:00
|
|
|
|
2006-09-28 20:12:08 +00:00
|
|
|
dnl Check how to find the mtab file and how to get filesystem staticstics
|
2001-12-25 18:33:04 +00:00
|
|
|
AC_FIND_MTAB_FILE
|
1999-12-16 09:15:53 +00:00
|
|
|
AC_GET_FS_INFO
|
|
|
|
|
|
1999-12-11 19:33:35 +00:00
|
|
|
|
2006-09-28 20:12:08 +00:00
|
|
|
dnl Check for various defines and features
|
1999-12-11 19:33:35 +00:00
|
|
|
AC_ARG_WITH(lcdport,
|
2007-11-01 19:09:07 +00:00
|
|
|
[AS_HELP_STRING([--with-lcdport=<port>], [the server port [13666]])],
|
|
|
|
|
LCDPORT=$withval,
|
|
|
|
|
LCDPORT="13666"
|
1999-12-11 19:33:35 +00:00
|
|
|
)
|
2004-10-03 11:39:48 +00:00
|
|
|
AC_DEFINE_UNQUOTED(LCDPORT, $LCDPORT, [Set default port where LCDd should listen])
|
1999-12-11 19:33:35 +00:00
|
|
|
|
2004-10-03 11:39:48 +00:00
|
|
|
AC_DEFINE_UNQUOTED(PROTOCOL_VERSION, "0.3", [Define version of lcdproc client-server protocol])
|
2000-01-05 00:03:25 +00:00
|
|
|
|
2004-10-03 11:39:48 +00:00
|
|
|
AC_DEFINE_UNQUOTED(API_VERSION, "0.5", [Define version of lcdproc API])
|
2001-11-29 14:09:13 +00:00
|
|
|
|
2000-01-05 00:03:25 +00:00
|
|
|
|
2006-09-28 20:12:08 +00:00
|
|
|
dnl Check compiler flags to dynamically load modules
|
2002-02-21 22:50:12 +00:00
|
|
|
AC_MODULES_INFO
|
|
|
|
|
|
2004-10-09 16:15:37 +00:00
|
|
|
dnl ######################################################################
|
2007-11-01 16:46:17 +00:00
|
|
|
dnl libusb support
|
|
|
|
|
dnl ######################################################################
|
2004-10-09 16:15:37 +00:00
|
|
|
AC_MSG_CHECKING([if libusb support has been enabled]);
|
2007-11-01 19:09:07 +00:00
|
|
|
AC_ARG_ENABLE(libusb,
|
|
|
|
|
[AS_HELP_STRING([--disable-libusb],[disable USB support using libusb])],
|
|
|
|
|
[ if test "$enableval" != "no"; then
|
2011-11-03 22:09:24 +00:00
|
|
|
enable_libusb=yes
|
2007-11-01 19:09:07 +00:00
|
|
|
fi ],
|
|
|
|
|
[ enable_libusb=yes ]
|
2004-10-09 16:15:37 +00:00
|
|
|
)
|
2010-10-30 18:04:21 +00:00
|
|
|
AC_MSG_RESULT($enable_libusb)
|
2004-10-09 16:15:37 +00:00
|
|
|
|
|
|
|
|
if test "$enable_libusb" = "yes"; then
|
2008-10-16 09:16:15 +00:00
|
|
|
ifdef([PKG_CHECK_MODULES],
|
|
|
|
|
[PKG_CHECK_MODULES(LIBUSB, libusb,
|
|
|
|
|
[AC_DEFINE(HAVE_LIBUSB, [1], [Define to 1 if you have libusb])],
|
|
|
|
|
[ enable_libusb=no ])],
|
2010-10-30 18:04:21 +00:00
|
|
|
[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libusb may not be built])])
|
2004-10-09 16:15:37 +00:00
|
|
|
fi
|
2007-11-01 16:46:17 +00:00
|
|
|
AC_SUBST(LIBUSB_LIBS)
|
|
|
|
|
AC_SUBST(LIBUSB_CFLAGS)
|
2004-10-09 16:15:37 +00:00
|
|
|
|
2007-11-01 16:46:17 +00:00
|
|
|
dnl ######################################################################
|
2011-12-10 15:39:46 +00:00
|
|
|
dnl libusb-1.0 support
|
|
|
|
|
dnl ######################################################################
|
|
|
|
|
AC_MSG_CHECKING([if libusb-1-0 support has been enabled]);
|
|
|
|
|
AC_ARG_ENABLE(libusb_1_0,
|
|
|
|
|
[AS_HELP_STRING([--disable-libusb-1-0],[disable USB support using libusb-1.0])],
|
|
|
|
|
[ if test "$enableval" != "no"; then
|
|
|
|
|
enable_libusb_1_0="yes"
|
|
|
|
|
fi ],
|
|
|
|
|
[ enable_libusb_1_0=yes ]
|
|
|
|
|
)
|
|
|
|
|
AC_MSG_RESULT($enable_libusb_1_0)
|
|
|
|
|
|
|
|
|
|
if test "$enable_libusb_1_0" = "yes"; then
|
|
|
|
|
ifdef([PKG_CHECK_MODULES],
|
|
|
|
|
[PKG_CHECK_MODULES(LIBUSB_1_0, libusb-1.0 >= 1.0,
|
|
|
|
|
[AC_DEFINE(HAVE_LIBUSB_1_0, [1], [Define to 1 if you have libusb-1.0])],
|
|
|
|
|
[ enable_libusb_1_0=no ])],
|
|
|
|
|
[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libusb-1.0 may not be built])])
|
|
|
|
|
fi
|
|
|
|
|
AC_SUBST(LIBUSB_1_0_LIBS)
|
|
|
|
|
AC_SUBST(LIBUSB_1_0_CFLAGS)
|
|
|
|
|
|
|
|
|
|
dnl ######################################################################
|
2007-11-01 16:46:17 +00:00
|
|
|
dnl libftdi support
|
|
|
|
|
dnl ######################################################################
|
|
|
|
|
AC_MSG_CHECKING([if libftdi support has been enabled]);
|
2007-11-01 19:09:07 +00:00
|
|
|
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 ]
|
2007-11-01 16:46:17 +00:00
|
|
|
)
|
2010-10-30 18:04:21 +00:00
|
|
|
AC_MSG_RESULT($enable_libftdi)
|
2004-10-09 16:15:37 +00:00
|
|
|
|
2007-11-01 16:46:17 +00:00
|
|
|
if test "$enable_libftdi" = "yes"; then
|
2008-10-16 09:16:15 +00:00
|
|
|
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 ])],
|
2010-10-30 18:04:21 +00:00
|
|
|
[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libftdi may not be built])])
|
2004-10-09 16:15:37 +00:00
|
|
|
fi
|
2007-11-01 16:46:17 +00:00
|
|
|
AC_SUBST(LIBFTDI_LIBS)
|
|
|
|
|
AC_SUBST(LIBFTDI_CFLAGS)
|
2004-10-09 16:15:37 +00:00
|
|
|
|
2013-05-04 14:31:14 +00:00
|
|
|
dnl ######################################################################
|
|
|
|
|
dnl X11 library support
|
|
|
|
|
dnl ######################################################################
|
|
|
|
|
AC_MSG_CHECKING([if X11 support has been enabled]);
|
|
|
|
|
AC_ARG_ENABLE(libX11,
|
|
|
|
|
[AS_HELP_STRING([--disable-libX11],[disable X11 support])],
|
|
|
|
|
[ if test "$enableval" != "no"; then
|
|
|
|
|
enable_libX11=yes
|
|
|
|
|
fi ],
|
|
|
|
|
[ enable_libX11=yes ]
|
|
|
|
|
)
|
|
|
|
|
AC_MSG_RESULT($enable_libX11)
|
|
|
|
|
|
|
|
|
|
if test "$enable_libX11" = "yes"; then
|
|
|
|
|
ifdef([PKG_CHECK_MODULES],
|
|
|
|
|
[PKG_CHECK_MODULES([LIBX11], [x11],
|
|
|
|
|
[AC_DEFINE(HAVE_LIBX11, [1], [Define to 1 if you have X11 library])],
|
|
|
|
|
[ enable_libX11=no ])],
|
|
|
|
|
[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring X11 may not be built])])
|
|
|
|
|
fi
|
|
|
|
|
AC_SUBST(LIBX11_LIBS)
|
|
|
|
|
AC_SUBST(LIBX11_CFLAGS)
|
|
|
|
|
|
2010-11-26 21:43:57 +00:00
|
|
|
dnl ######################################################################
|
|
|
|
|
dnl libhid support
|
|
|
|
|
dnl ######################################################################
|
|
|
|
|
AC_MSG_CHECKING([if libhid support has been enabled]);
|
|
|
|
|
AC_ARG_ENABLE(libhid,
|
|
|
|
|
[AS_HELP_STRING([--disable-libhid],[disable HID support using libhid])],
|
|
|
|
|
[ if test "$enableval" != "no"; then
|
|
|
|
|
enable_libhid=yes
|
|
|
|
|
fi ],
|
|
|
|
|
[ enable_libhid=yes ]
|
|
|
|
|
)
|
2011-01-19 19:04:54 +00:00
|
|
|
AC_MSG_RESULT($enable_libhid)
|
2010-11-26 21:43:57 +00:00
|
|
|
|
|
|
|
|
if test "$enable_libhid" = "yes"; then
|
|
|
|
|
ifdef([PKG_CHECK_MODULES],
|
|
|
|
|
[PKG_CHECK_MODULES(LIBHID, libhid >= 0.2.16,
|
|
|
|
|
[AC_DEFINE(HAVE_LIBHID, [1], [Define to 1 if you have libhid])],
|
|
|
|
|
[ enable_libhid=no ])],
|
|
|
|
|
[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libhid may not be built])])
|
|
|
|
|
fi
|
|
|
|
|
AC_SUBST(LIBHID_LIBS)
|
|
|
|
|
AC_SUBST(LIBHID_CFLAGS)
|
|
|
|
|
|
2011-11-03 22:09:24 +00:00
|
|
|
# PNG library
|
|
|
|
|
LCD_PNG_LIB
|
|
|
|
|
|
|
|
|
|
dnl ######################################################################
|
|
|
|
|
dnl freetype support
|
|
|
|
|
dnl ######################################################################
|
|
|
|
|
AC_MSG_CHECKING([if freetype support has been enabled]);
|
|
|
|
|
AC_ARG_ENABLE(freetype,
|
|
|
|
|
[AS_HELP_STRING([--disable-freetype],[disable freetype support])],
|
|
|
|
|
[ if test "$enableval" != "no"; then
|
|
|
|
|
enable_freetype=yes
|
|
|
|
|
fi ],
|
|
|
|
|
[ enable_freetype=yes ]
|
|
|
|
|
)
|
|
|
|
|
AC_MSG_RESULT($enable_freetype)
|
|
|
|
|
|
|
|
|
|
if test "$enable_freetype" = "yes"; then
|
|
|
|
|
ifdef([AC_CHECK_FT2],
|
|
|
|
|
[AC_CHECK_FT2([],
|
|
|
|
|
[AC_DEFINE(HAVE_FT2, [1], [Define to 1 if you have freetype])],
|
|
|
|
|
[enable_freetype=no])],
|
|
|
|
|
[AC_MSG_WARN([freetype does not seem to be installed])])
|
|
|
|
|
fi
|
2011-11-05 07:53:33 +00:00
|
|
|
AC_SUBST([FT2_CFLAGS])
|
|
|
|
|
AC_SUBST([FT2_LIBS])
|
|
|
|
|
|
2011-11-03 22:09:24 +00:00
|
|
|
|
2008-09-17 13:28:17 +00:00
|
|
|
dnl ######################################################################
|
|
|
|
|
dnl ethlcd support
|
|
|
|
|
dnl ######################################################################
|
|
|
|
|
AC_MSG_CHECKING([if ethlcd support has been enabled]);
|
|
|
|
|
AC_ARG_ENABLE(ethlcd,
|
|
|
|
|
[AS_HELP_STRING([--disable-ethlcd],[disable ethlcd connection type for HD44780])],
|
|
|
|
|
[ if test "$enableval" != "no"; then
|
|
|
|
|
enable_ethlcd=yes
|
|
|
|
|
fi ],
|
|
|
|
|
[ enable_ethlcd=yes ]
|
|
|
|
|
)
|
2010-10-30 18:04:21 +00:00
|
|
|
AC_MSG_RESULT($enable_ethlcd)
|
2008-09-17 13:28:17 +00:00
|
|
|
|
|
|
|
|
|
2008-10-16 09:16:15 +00:00
|
|
|
# check for doxygen
|
|
|
|
|
BB_ENABLE_DOXYGEN
|
2008-09-17 13:28:17 +00:00
|
|
|
|
2008-10-16 09:16:15 +00:00
|
|
|
|
|
|
|
|
# Select drivers to build
|
2006-09-28 20:12:08 +00:00
|
|
|
LCD_DRIVERS_SELECT
|
|
|
|
|
|
|
|
|
|
|
2008-01-06 17:03:51 +00:00
|
|
|
# directory for PID files
|
|
|
|
|
pidfiledir=/var/run
|
|
|
|
|
# make sure the directory exists
|
|
|
|
|
if test ! -d $pidfiledir ; then
|
|
|
|
|
pidfiledir=`eval echo ${sysconfdir}`
|
|
|
|
|
case $pidfiledir in
|
|
|
|
|
NONE/*) pidfiledir=`echo $pidfiledir | sed "s~NONE~$ac_default_prefix~"` ;;
|
|
|
|
|
esac
|
|
|
|
|
fi
|
2010-10-30 18:04:21 +00:00
|
|
|
|
2008-01-06 17:03:51 +00:00
|
|
|
AC_ARG_WITH(pidfile-dir,
|
|
|
|
|
[AS_HELP_STRING([--with-pidfile-dir=PATH], [specify location of pid files [/var/run]])],
|
|
|
|
|
[ if test -n "$withval" && test "x$withval" != "xno" && \
|
|
|
|
|
test "x${withval}" != "xyes"; then
|
|
|
|
|
pidfiledir=$withval
|
|
|
|
|
if test ! -d $pidfiledir ; then
|
|
|
|
|
AC_MSG_WARN([** no $pidfiledir directory on this system **])
|
|
|
|
|
fi
|
|
|
|
|
fi ]
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
AC_SUBST(pidfiledir)
|
|
|
|
|
|
|
|
|
|
|
2006-09-28 20:12:08 +00:00
|
|
|
# Features applicable to the server
|
|
|
|
|
AC_ARG_ENABLE(seamless-hbars,
|
2007-11-01 19:09:07 +00:00
|
|
|
[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],
|
2006-09-28 20:12:08 +00:00
|
|
|
[Define to 1 to avoid gaps in horizontal bar graphs (if HW supports it)])
|
|
|
|
|
fi ]
|
|
|
|
|
)
|
|
|
|
|
|
2005-04-05 07:25:17 +00:00
|
|
|
AC_ARG_ENABLE(testmenus,
|
2007-11-01 19:09:07 +00:00
|
|
|
[AS_HELP_STRING([--enable-testmenus], [enable server test menus])],
|
|
|
|
|
[ if test "$enableval" != "no" ; then
|
|
|
|
|
AC_DEFINE(LCDPROC_TESTMENUS, [1],
|
2006-09-28 20:12:08 +00:00
|
|
|
[Define to 1 to enable server test menus])
|
2007-11-01 19:09:07 +00:00
|
|
|
fi ]
|
2005-04-05 07:25:17 +00:00
|
|
|
)
|
|
|
|
|
|
2005-05-20 09:43:42 +00:00
|
|
|
AC_ARG_ENABLE(permissive_menu_goto,
|
2007-11-01 19:09:07 +00:00
|
|
|
[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],
|
2006-09-28 20:12:08 +00:00
|
|
|
[Define to 1 to allow transitions between different client's menus])
|
2007-11-01 19:09:07 +00:00
|
|
|
fi ]
|
2005-04-05 07:25:17 +00:00
|
|
|
)
|
2003-12-25 15:02:34 +00:00
|
|
|
|
2006-09-28 20:12:08 +00:00
|
|
|
dnl Features applicable to the lcdproc client
|
2006-02-18 19:50:50 +00:00
|
|
|
AC_ARG_ENABLE(lcdproc-menus,
|
2007-11-01 19:09:07 +00:00
|
|
|
[AS_HELP_STRING([--enable-lcdproc-menus], [enable menu support in lcdproc client])],
|
|
|
|
|
[ if test "$enableval" != "no" ; then
|
|
|
|
|
AC_DEFINE(LCDPROC_MENUS, [1],
|
2006-09-28 20:12:08 +00:00
|
|
|
[Define to 1 to enable menu support in lcdproc client])
|
2007-11-01 19:09:07 +00:00
|
|
|
fi ]
|
2006-02-18 19:50:50 +00:00
|
|
|
)
|
|
|
|
|
|
2006-09-28 20:12:08 +00:00
|
|
|
AC_ARG_ENABLE(stat-nfs,
|
2007-11-01 19:09:07 +00:00
|
|
|
[AS_HELP_STRING([--enable-stat-nfs], [display NFS filesystem stats in lcdproc client])],
|
|
|
|
|
[ if test "$enableval" != "no" ; then
|
|
|
|
|
AC_DEFINE(STAT_NFS, [1],
|
2006-09-28 20:12:08 +00:00
|
|
|
[Define to 1 to display NFS filesystem stats in lcdproc client])
|
2007-11-01 19:09:07 +00:00
|
|
|
fi ]
|
2006-09-28 20:12:08 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(stat-smbfs,
|
2007-11-01 19:09:07 +00:00
|
|
|
[AS_HELP_STRING([--enable-stat-smbfs], [display SMBFS filesystem stats in lcdproc client])],
|
|
|
|
|
[ if test "$enableval" != "no" ; then
|
|
|
|
|
AC_DEFINE(STAT_SMBFS, [1],
|
2006-09-28 20:12:08 +00:00
|
|
|
[Define to 1 to display SMBFS filesystem stats in lcdproc client])
|
2007-11-01 19:09:07 +00:00
|
|
|
fi ]
|
2006-09-28 20:12:08 +00:00
|
|
|
)
|
|
|
|
|
|
2011-04-03 19:25:08 +00:00
|
|
|
AC_ARG_ENABLE(extra-charmaps,
|
|
|
|
|
[AS_HELP_STRING([--enable-extra-charmaps],
|
|
|
|
|
[enable additional character mapping tables in drivers])],
|
|
|
|
|
[ if test "$enableval" != "no" ; then
|
|
|
|
|
AC_DEFINE(EXTRA_CHARMAPS, [1],
|
|
|
|
|
[Define to 1 to enable additional charmaps in drivers])
|
|
|
|
|
fi ]
|
|
|
|
|
)
|
|
|
|
|
|
2006-09-28 20:12:08 +00:00
|
|
|
|
2004-10-17 21:01:13 +00:00
|
|
|
AC_CONFIG_FILES([Makefile
|
2002-02-21 22:50:12 +00:00
|
|
|
shared/Makefile
|
|
|
|
|
server/Makefile
|
2002-04-26 00:00:31 +00:00
|
|
|
server/commands/Makefile
|
2002-02-21 22:50:12 +00:00
|
|
|
server/drivers/Makefile
|
|
|
|
|
clients/Makefile
|
1999-12-11 19:33:35 +00:00
|
|
|
clients/lcdproc/Makefile
|
2002-08-19 20:47:52 +00:00
|
|
|
clients/lcdexec/Makefile
|
2006-04-24 20:05:35 +00:00
|
|
|
clients/lcdvc/Makefile
|
1999-12-11 19:33:35 +00:00
|
|
|
clients/examples/Makefile
|
2002-05-28 18:25:36 +00:00
|
|
|
clients/metar/Makefile
|
|
|
|
|
docs/Makefile
|
2005-10-25 22:33:39 +00:00
|
|
|
docs/Doxyfile
|
2002-10-01 18:49:54 +00:00
|
|
|
docs/lcdproc-dev/Makefile
|
2002-05-28 18:25:36 +00:00
|
|
|
docs/lcdproc-user/Makefile
|
|
|
|
|
docs/lcdproc-user/drivers/Makefile
|
|
|
|
|
scripts/Makefile
|
2006-10-21 20:01:42 +00:00
|
|
|
scripts/init-LCDd.LSB
|
|
|
|
|
scripts/init-lcdproc.LSB
|
|
|
|
|
scripts/init-lcdexec.LSB
|
|
|
|
|
scripts/init-lcdvc.LSB
|
2002-05-28 18:25:36 +00:00
|
|
|
scripts/init-LCDd.debian
|
|
|
|
|
scripts/init-lcdproc.debian
|
2006-10-21 20:01:42 +00:00
|
|
|
scripts/init-lcdexec.debian
|
|
|
|
|
scripts/init-lcdvc.debian
|
|
|
|
|
scripts/init-LCDd.rpm
|
2004-10-17 21:01:13 +00:00
|
|
|
scripts/init-lcdproc.rpm])
|
|
|
|
|
AC_OUTPUT
|