Files
lcdproc/configure.in
T
ppokorny 00cc9fca23 + Changed protocol to 0.3 because we now accept both -foo and foo
as argument introducers.  in 0.4-pre10, these were changed
   from foo to -foo and this broke many clients.  This change
   should fix that and be backward/forward compatible.
 + Added a noop function to the protocol.  This is useful for writing
   shell script clients of LCDproc.
 + Changed the shared sock_send_string function to NOT send the
   ending NUL ('\0') byte with the string.  This was confusing
   in Perl clients which saw NUL's as the first character of
   each reply.  WARNING: The LCDPROC client depended on this
   behavior, your client may too.  Use the newline instead.
   See the code in clients/lcdproc/main.c (look for "switch(buf[i])")
   to see one way to handle this.  This should allow new clients
   to connect to old servers and vice-versa.
 + Messed with include structure in .c files.  It should no longer
   be necessary to specify ../.. to get to shared code headers.
   Also, since we are using automake, the global config.h can be
   found with just #include "config.h" as it's location is included
   in a -I to the compilers.  As a result "make distcheck" now works.
2001-05-25 03:14:27 +00:00

143 lines
3.2 KiB
Plaintext

dnl Process this file with autoconf to produce a configure script.
AC_INIT(clients/lcdproc/batt.c)
AM_INIT_AUTOMAKE(lcdproc, 0.4.1)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
case "$host" in
*-*-*linux*)
AC_DEFINE(LINUX)
;;
*-*-*solaris*)
AC_DEFINE(SOLARIS)
;;
esac
AC_MSG_CHECKING(whether to enable debugging)
AC_ARG_ENABLE(debug,
[ --enable-debug show debug information],
AC_DEFINE(DEBUG)
debug="yes",
debug="no"
)
AC_MSG_RESULT($debug)
if test $debug = "yes"; then
CFLAGS="-g"
else
CFLAGS="-Wno-unused -O6"
fi
CFLAGS="-Wall $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 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)
AC_CHECK_FUNCS(getloadavg swapctl)
AC_CHECK_HEADERS(procfs.h sys/procfs.h sys/loadavg.h)
dnl Some versions of Solaris require -lelf for -lkvm
AC_CHECK_LIB(kvm, kvm_open,[
LIBS="-lkvm $LIBS"
],[AC_MSG_CHECKING(for kvm_open in -lkvm with -lelf)
AC_CACHE_VAL(ac_cv_lib_kvm_with_elf,
[ac_save_LIBS="$LIBS"
LIBS="-lkvm -lelf $LIBS"
AC_TRY_LINK([char kvm_open();], [kvm_open()],
ac_cv_lib_kvm_with_elf=yes, ac_cv_lib_kvm_with_elf=no)
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
])
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h)
AC_CHECK_HEADERS(curses.h ncurses.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_GET_FS_INFO
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_DEFINE_UNQUOTED(PROTOCOL_VERSION, "0.3")
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)