-AC_INIT(conky.c)
+AC_INIT([Conky],[1.3.0],[brenden1@users.sourceforge.net])
-AM_INIT_AUTOMAKE(conky, 1.2)
-AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE(conky, 1.3.0)
+AM_CONFIG_HEADER(src/config.h)
+AC_PROG_LIBTOOL
+
+
+AC_CONFIG_FILES(
+ Makefile
+ doc/Makefile
+ src/Makefile
+ )
uname=`uname`
;;
FreeBSD*)
WANT_KVM=yes
+ WANT_DEVSTAT=yes
;;
- NetBSD*)
- WANT_KVM=yes
- WANT_OSSLIB=yes
- ;;
-# Solaris doesn't work at all right now
+# NetBSD*)
+# WANT_KVM=yes
+# WANT_OSSLIB=yes
+# ;;
+# Solaris doesn't work at all right now
# SunOS*)
# WANT_KSTAT=yes
# ;;
fi
dnl
-dnl DOUBLE_BUFFER option
-dnl
-
-dah=yes
-AC_ARG_ENABLE(double_buffer,
-[ --enable-double-buffer enable if you want to support flicker-free operation [default=yes]],
- [dah="$enableval"])
-
-if test $dah != "no"; then
- AC_DEFINE(DOUBLE_BUFFER, 1, [Define if you want support for the DBE extension])
- AC_CHECK_HEADERS([X11/extensions/Xdbe.h], [AC_DEFINE([HAVE_XDBE], 1, [Xdbe])], [XDBE_MISSING=yes])
- if test "x$XDBE_MISSING" = xyes; then
- AC_MSG_ERROR([something went wrong when checking for Xdbe (double buffer extension])
- fi
-fi
-
-dnl
dnl PROC_UPTIME option
dnl
[ --enable-seti enable if you want SETI at Home stats [default=no]],
[want_seti="$enableval"])
-AM_CONDITIONAL(BUILD_SETI, test x$want_seti == xyes)
-if test x$want_seti == xyes; then
+AM_CONDITIONAL(BUILD_SETI, test x$want_seti = xyes)
+if test x$want_seti = xyes; then
AC_DEFINE(SETI, 1, [Define if you want SETI at Home stats])
fi
want_mpd=no
AC_ARG_ENABLE(mpd,
-[ --enable-mpd enable if you want MPD support [default=no]],
+[ --enable-mpd enable if you want MPD support [default=no]],
[want_mpd="$enableval"])
-AM_CONDITIONAL(BUILD_MPD, test x$want_mpd == xyes)
-if test x$want_mpd == xyes; then
+AM_CONDITIONAL(BUILD_MPD, test x$want_mpd = xyes)
+if test x$want_mpd = xyes; then
AC_DEFINE(MPD, 1, [Define if you want MPD support])
fi
want_cairo=no
AC_ARG_ENABLE(cairo,
-[ --enable-cairo enable if you want Cairo support [default=no]],
+[ --enable-cairo enable if you want Cairo support [default=no]],
[want_cairo="$enableval"])
-AM_CONDITIONAL(BUILD_CAIRO, test x$want_cairo == xyes)
+AM_CONDITIONAL(BUILD_CAIRO, test x$want_cairo = xyes)
if test "$want_cairo" = "yes"; then
fi
fi
-dnl metar
-dnl
-
-want_metar=no
-AC_ARG_ENABLE(metar,
-[ --enable-metar enable if you want metar stats (weather information) [default=no]],
- [want_metar="$enableval"])
-
-AM_CONDITIONAL(BUILD_METAR, test x$want_metar == xyes)
-if test x$want_metar == xyes; then
-AC_CHECK_HEADERS([metar.h], [], [METAR_MISSING=yes])
- if test "x$METAR_MISSING" = xyes; then
- AC_MSG_ERROR([something went wrong when checking for mdsplib, you're probably missing headers or it's not installed])
- fi
- AC_DEFINE(METAR, 1, [Define if you want metar stats (weather information)])
-fi
-dnl
-
-
dnl
dnl MLDonkey
[ --enable-mldonkey enable if you want MLDonkey support [default=no]],
[want_mldonkey="$enableval"])
-AM_CONDITIONAL(BUILD_MLDONKEY, test x$want_mldonkey == xyes)
-if test x$want_mldonkey == xyes; then
+AM_CONDITIONAL(BUILD_MLDONKEY, test x$want_mldonkey = xyes)
+if test x$want_mldonkey = xyes; then
AC_DEFINE(MLDONKEY, 1, [Define if you want MLDonkey support])
fi
dnl X
dnl
-AC_PATH_X
-if test $have_x != "yes"; then
- echo "Sorry, X is very much needed"
- exit 1
-fi
-AC_DEFINE(HAVE_X11, 1, [Define if you have X11])
-
-dnl AC_CHECK_LIB([X11], [XOpenDisplay], [X11_LIBS="-lX11"], [], [[-L$x_libraries]])
-dnl AC_CHECK_LIB([Xext], [XdbeQueryExtension], [
-dnl X11_LIBS="$X11_LIBS -lXext"
-dnl AC_DEFINE(HAVE_LIBXEXT, 1, [Define if you have libXext])
-dnl ], [], [[-L$x_libraries $X11_LIBS]])
-
-if test "$x_libraries" != ""; then
- LDFLAGS="$LDFLAGS -L$x_libraries"
-fi
+dah=yes
+AC_ARG_ENABLE(double_buffer,
+[ --enable-double-buffer enable if you want to support flicker-free operation [default=yes]],
+ [dah="$enableval"])
-if test "$x_includes" != ""; then
- CFLAGS="$CFLAGS -Wall -I$x_includes"
+want_x11=yes
+AC_ARG_ENABLE(x11,
+[ --enable-x11 enable if you want X11 support [default=yes]],
+ [want_x11="$enableval"])
+
+
+if test "x$want_x11" = "xyes"; then
+ AC_PATH_X
+ AC_PATH_XTRA
+ CFLAGS="$CFLAGS $X_CFLAGS"
+ LIBS="$LIBS $X_LIBS $X11_LIBS"
+ LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS"
+ if test "x$X_DISPLAY_MISSING" = xyes; then
+ AC_MSG_ERROR([something went wrong when checking for X11, you're probably missing headers or it's not installed, either re-run configure with --disable-x11, or fix this])
+ fi
+ AC_DEFINE(X11, 1, [Define if you want to use X11])
+ AC_DEFINE(HAVE_X11, 1, [Define if you have X11])
+ AM_CONDITIONAL(BUILD_X11, true)
+ if test $dah != "no"; then
+ AC_DEFINE(DOUBLE_BUFFER, 1, [Define if you want support for the DBE extension])
+ AC_CHECK_LIB(Xext, XdbeQueryExtension, [AC_DEFINE([HAVE_XDBE], 1, [Xdbe]) LIBS="$LIBS -lXext"],
+ [AC_MSG_ERROR([something went wrong when checking for Xdbe (double buffer extension)])])
+ fi
+else
+ AM_CONDITIONAL(BUILD_X11, false)
fi
dnl
dnl Xft
dnl
-if test "$want_xft" = "yes"; then
+if test x$want_xft && test x$want_x11; then
AC_PATH_PROG(XFTCONFIG, xft-config)
if test x$XFTCONFIG != x; then
dnl TODO: needs more checks
fi
dnl
+dnl devstat
+dnl
+
+if test x$WANT_DEVSTAT = xyes; then
+ AC_CHECK_LIB(devstat, devstat_getversion,
+ LIBS="$LIBS -ldevstat",
+ AC_MSG_ERROR([Cound not find devstat_getversion in -ldevstat.])
+ )
+fi
+
+dnl
dnl OSSLIB for NetBSD
dnl
dnl
-AC_CHECK_HEADERS([signal.h unistd.h X11/Xlib.h sys/utsname.h sys/stat.h linux/soundcard.h dirent.h])
-AC_CHECK_HEADERS([sys/statfs.h sys/param.h sys/mount.h])
+AC_CHECK_HEADERS([signal.h unistd.h sys/utsname.h sys/stat.h linux/soundcard.h dirent.h mcheck.h])
+AC_CHECK_HEADERS([sys/statfs.h sys/param.h])
+AC_CHECK_HEADERS([sys/mount.h], [], [],
+ [#ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+])
dnl For cairo
-AC_CHECK_HEADERS([proc/procps.h proc/readproc.h], [], [PROCPS_MISSING=yes])
- if test "x$PROCPS_MISSING" = xyes; then
- AC_MSG_ERROR([something went wrong when checking for procps, you're probably missing the necessary headers])
- fi
dnl
-dnl Check help2man
+dnl Check doc stuff
dnl
-AC_PATH_PROG(HELP2MAN, help2man)
-AM_CONDITIONAL(HAVE_HELP2MAN, test x$HELP2MAN != x)
+AC_CHECK_PROGS(db2x_xsltproc_cmd, db2x_xsltproc)
+AC_CHECK_PROGS(db2x_manxml_cmd, db2x_manxml)
+AC_CHECK_PROGS(xsltproc_cmd, xsltproc)
+if test x$db2x_xsltproc_cmd = "x" -o x$xsltproc_cmd = "x"; then
+ AM_CONDITIONAL(HAVE_DOCSTUFF, false)
+else
+ AM_CONDITIONAL(HAVE_DOCSTUFF, true)
+fi
dnl
dnl Check sysinfo()
AC_SUBST(X11_LIBS)
AC_SUBST(XFT_LIBS)
-AC_OUTPUT(Makefile)
+AC_OUTPUT