Automake patch
This commit is contained in:
+108
@@ -0,0 +1,108 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(clients/lcdproc/batt.c)
|
||||
AM_INIT_AUTOMAKE(lcdproc, 0.4-pre9-auto)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
case "$host" in
|
||||
*-*-*linux*)
|
||||
AC_DEFINE(LINUX)
|
||||
;;
|
||||
*-*-*bsd*)
|
||||
AC_DEFINE(xBSD)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING(whether to enable debugging)
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug show debug information],
|
||||
AC_DEFINE(DEBUG)
|
||||
debug=$withval,
|
||||
debug="no"
|
||||
)
|
||||
AC_MSG_RESULT($debug)
|
||||
|
||||
if test $debug = "yes"; then
|
||||
CFLAGS="-g"
|
||||
else
|
||||
CFLAGS="-Wno-unused"
|
||||
fi
|
||||
CFLAGS="-Wall -Wp,-lang-c-c++-comments -O6 $CFLAGS"
|
||||
export CFLAGS
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl Checks for libraries.
|
||||
dnl Replace `main' with a function in -lLCDstuff:
|
||||
dnl AC_CHECK_LIB(LCDstuff, main)
|
||||
dnl Replace `main' with a function in -lncurses:
|
||||
dnl AC_CHECK_LIB(ncurses, main)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h)
|
||||
|
||||
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
|
||||
AC_CHECK_FUNCS(select socket strdup strerror strtol uname)
|
||||
|
||||
dnl Check for various defines and features
|
||||
AC_ARG_ENABLE(stat-nfs,
|
||||
[ --enable-stat-nfs display filesystem stats for NFS],
|
||||
AC_DEFINE(STAT_NFS)
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE(stat-smbfs,
|
||||
[ --enable-stat-smbfs display filesystem stats for SMBFS],
|
||||
AC_DEFINE(STAT_SMBFS)
|
||||
)
|
||||
|
||||
|
||||
AC_ARG_WITH(lcdport,
|
||||
[ --with-lcdport=<port> the server port [13666]],
|
||||
LCDPORT=$withval,
|
||||
LCDPORT="13666"
|
||||
)
|
||||
AC_DEFINE_UNQUOTED(LCDPORT, $LCDPORT)
|
||||
|
||||
AC_ARG_WITH(loadmax,
|
||||
[ --with-loadmax=<load> Max Load Avg at which the backlight will]
|
||||
[ start blinking [1.3]],
|
||||
LOAD_MAX=$withval,
|
||||
LOAD_MAX=1.3
|
||||
)
|
||||
AC_DEFINE_UNQUOTED(LOAD_MAX, $LOAD_MAX)
|
||||
|
||||
AC_ARG_WITH(loadmin,
|
||||
[ --with-loadmin=<load> Min Load Avg at which the backlight will]
|
||||
[ turn off (asleep) [0.05]],
|
||||
LOAD_MIN=$withval,
|
||||
LOAD_MIN=0.05
|
||||
)
|
||||
AC_DEFINE_UNQUOTED(LOAD_MIN, $LOAD_MIN)
|
||||
|
||||
LCD_DRIVERS_SELECT
|
||||
|
||||
AC_OUTPUT(Makefile
|
||||
shared/Makefile
|
||||
server/Makefile
|
||||
server/drivers/Makefile
|
||||
clients/Makefile
|
||||
clients/lcdproc/Makefile
|
||||
clients/examples/Makefile
|
||||
clients/headlines/Makefile
|
||||
docs/Makefile)
|
||||
Reference in New Issue
Block a user