dnl Process this file with autoconf to produce a configure script. AC_INIT(slmon.c) dnl AC_MSG_WARN([ dnl ******************************************************** dnl * The configure script in this release may be broken. * dnl * In case of any problems either wait for next version * dnl * or try to compile manualy. * dnl ******************************************************** dnl ]) AM_INIT_AUTOMAKE(slmon, 0.5.13) AM_MAINTAINER_MODE dnl AM_ACLOCAL_INCLUDE(macros) dnl Checks for programs. AC_PROG_CC AC_ISC_POSIX AC_PROG_INSTALL AC_PROG_LN_S AC_ARG_WITH(libgtop, [ --with-libgtop build with libgtop support (default=yes)], , with_gtop="yes" ) AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging information], if test x$enableval = xyes then use_cc_g_flag=yes fi ) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(sys/file.h unistd.h) dnl Manual check for LibGTop, so we don't depend on gnome. AC_CHECK_PROG(pkgconfig, pkg-config, "yes", "no") AC_CHECK_PROG(libgtopconfig, libgtop-config, "yes", "no") AC_MSG_CHECKING("looking for LibGTop") if test x$pkgconfig = xyes then dnl found pkg-config so maybe libgtop2 is installed pkg-config --exists libgtop-2.0 if test ! $? -eq 0 then pkgconfig="no" else AC_MSG_RESULT("found version 2") LIBGTOPLIBS=`pkg-config libgtop-2.0 --libs | tr '\n' ' '` AC_SUBST(LIBGTOPLIBS) INCLUDES=`pkg-config libgtop-2.0 --cflags | tr '\n' ' '` AC_SUBST(INCLUDES) fi fi if test x$libgtopconfig = xyes -a x$pkgconfig = xno then AC_MSG_RESULT("found version 1") LIBGTOPLIBS=`libgtop-config --libs | tr '\n' ' '` AC_SUBST(LIBGTOPLIBS) INCLUDES=`libgtop-config --cflags` AC_SUBST(INCLUDES) fi if test x$pkgconfig = xno -a x$libgtopconfig = xno then AC_MSG_RESULT("found version 99") fi AC_CHECK_LIB(slang, SLang_init_tty, slang_found="yes") if test x$slang_found = xyes then AC_CHECK_HEADERS(slang.h, slang_h_found="yes") fi if test x$slang_h_found = xyes then LIBS="$LIBS -lslang" AC_DEFINE(HAVE_SLANG) else AC_CHECK_HEADERS(slang/slang.h, slang_h_found="yes") if test x$slang_h_found = xyes then AC_DEFINE(HAVE_SLANG) LIBS="$LIBS -lslang" else AC_MSG_WARN("Slang not found") fi fi AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG)) dnl Checks for typedefs, structures, and compiler characteristics. AC_STRUCT_TM dnl Checks for library functions. AC_FUNC_STRFTIME AC_CHECK_FUNC(setutent, AC_DEFINE(HAVE_UTMP)) AC_CHECK_FUNCS(uname) AC_OUTPUT([Makefile])