2006-11-21 07:31:42 +00:00
|
|
|
dnl $Id$
|
|
|
|
|
2006-11-21 04:33:59 +00:00
|
|
|
dnl major, minor and micro version macros.
|
|
|
|
m4_define([conky_version_major], [1])
|
2007-02-25 23:35:53 +00:00
|
|
|
m4_define([conky_version_minor], [4])
|
2007-08-08 00:27:40 +00:00
|
|
|
m4_define([conky_version_micro], [7])
|
2007-08-31 02:05:02 +00:00
|
|
|
m4_define([conky_version_tag], []) dnl [] for releases
|
2006-11-21 07:31:42 +00:00
|
|
|
m4_define([conky_version_revision],[r@REVISION@])
|
2006-11-21 04:33:59 +00:00
|
|
|
m4_define([conky_version],
|
2006-12-23 06:01:16 +00:00
|
|
|
[conky_version_major().conky_version_minor().conky_version_micro()ifelse(
|
|
|
|
conky_version_tag(), [svn],
|
|
|
|
[-conky_version_tag()-conky_version_revision()],
|
|
|
|
[ifelse(conky_version_tag(), [], [], [-conky_version_tag()])])])
|
2006-11-21 04:33:59 +00:00
|
|
|
|
|
|
|
AC_INIT([Conky], [conky_version()], [brenden1@users.sourceforge.net])
|
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE(conky, conky_version())
|
2005-08-21 22:10:54 +00:00
|
|
|
AM_CONFIG_HEADER(src/config.h)
|
2006-05-30 01:23:06 +00:00
|
|
|
|
2006-09-30 19:21:58 +00:00
|
|
|
dnl prevent libtool setting LTCFLAGS to default of -g -O2 when CFLAGS unset.
|
|
|
|
dnl libtool must be deleted with make distclean to see this fix.
|
|
|
|
if test x"$CFLAGS" = x""; then
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_SUBST(CFLAGS, [ ])
|
2006-09-30 19:21:58 +00:00
|
|
|
fi
|
|
|
|
|
2006-12-23 06:01:16 +00:00
|
|
|
dnl
|
|
|
|
dnl Tools
|
|
|
|
dnl
|
2006-05-30 01:23:06 +00:00
|
|
|
AC_PROG_CC
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_PROG_LD
|
|
|
|
AC_PROG_INSTALL
|
2005-08-22 23:32:35 +00:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
|
|
|
|
if test x"$HAVE_PKGCONFIG" = x"no"; then
|
|
|
|
AC_MSG_ERROR([pkg-config is required!])
|
|
|
|
fi
|
2007-08-30 16:19:02 +00:00
|
|
|
PKG_PROG_PKG_CONFIG([0.19])
|
2005-07-20 00:30:40 +00:00
|
|
|
|
2005-08-21 23:09:36 +00:00
|
|
|
AC_CONFIG_FILES(
|
2006-12-23 06:01:16 +00:00
|
|
|
Makefile
|
|
|
|
doc/Makefile
|
|
|
|
src/Makefile
|
|
|
|
src/build.h
|
|
|
|
)
|
2005-08-21 23:09:36 +00:00
|
|
|
|
2005-07-20 00:30:40 +00:00
|
|
|
uname=`uname`
|
|
|
|
|
|
|
|
case $uname in
|
|
|
|
Linux*)
|
|
|
|
WANT_SYSINFO=yes
|
|
|
|
;;
|
|
|
|
FreeBSD*)
|
|
|
|
WANT_KVM=yes
|
2005-08-27 11:56:22 +00:00
|
|
|
WANT_DEVSTAT=yes
|
2005-07-20 00:30:40 +00:00
|
|
|
;;
|
2005-08-31 05:20:10 +00:00
|
|
|
# NetBSD*)
|
|
|
|
# WANT_KVM=yes
|
|
|
|
# WANT_OSSLIB=yes
|
|
|
|
# ;;
|
2005-07-20 00:30:40 +00:00
|
|
|
|
2007-03-01 01:43:43 +00:00
|
|
|
OpenBSD*)
|
|
|
|
WANT_KVM=yes
|
|
|
|
WANT_OSSLIB=yes
|
|
|
|
;;
|
2006-03-24 13:49:25 +00:00
|
|
|
|
2005-08-31 05:20:10 +00:00
|
|
|
# Solaris doesn't work at all right now
|
2005-07-20 00:30:40 +00:00
|
|
|
# SunOS*)
|
|
|
|
# WANT_KSTAT=yes
|
|
|
|
# ;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "Your operating system $uname isn't supported"
|
|
|
|
echo "Feel free to help. :P"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AM_CONDITIONAL(BUILD_LINUX, test x$uname = xLinux)
|
2006-08-12 06:10:18 +00:00
|
|
|
#AM_CONDITIONAL(BUILD_SOLARIS, test x$uname = xSunOS)
|
2005-07-20 00:30:40 +00:00
|
|
|
AM_CONDITIONAL(BUILD_FREEBSD, test x$uname = xFreeBSD)
|
2006-08-12 06:10:18 +00:00
|
|
|
#AM_CONDITIONAL(BUILD_NETBSD, test x$uname = xNetBSD)
|
2007-03-01 01:43:43 +00:00
|
|
|
AM_CONDITIONAL(BUILD_OPENBSD, test x$uname = xOpenBSD)
|
2005-07-20 00:30:40 +00:00
|
|
|
|
2006-08-12 06:10:18 +00:00
|
|
|
BUILD_DATE=$(LANG=en_US LC_ALL=en_US LOCALE=en_US date)
|
|
|
|
BUILD_ARCH="$(uname -sr) ($(uname -m))"
|
|
|
|
AC_SUBST(BUILD_DATE)
|
|
|
|
AC_SUBST(BUILD_ARCH)
|
|
|
|
|
2005-07-20 00:30:40 +00:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl OWN_WINDOW option
|
|
|
|
dnl
|
|
|
|
|
2006-11-04 17:56:24 +00:00
|
|
|
AC_ARG_ENABLE([own_window],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--disable-own-window],
|
|
|
|
[disable if you do not want support for creating own window @<:@default=yes@:>@]),
|
|
|
|
[dah="$enableval"], [dah=yes])
|
2005-07-20 00:30:40 +00:00
|
|
|
|
|
|
|
if test $dah != "no"; then
|
|
|
|
AC_DEFINE(OWN_WINDOW, 1, [Define if you want support for window creating])
|
|
|
|
fi
|
|
|
|
|
2006-01-11 17:03:45 +00:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Audacious Media Player
|
|
|
|
dnl
|
|
|
|
|
2006-11-04 17:56:24 +00:00
|
|
|
AC_ARG_ENABLE([audacious],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--enable-audacious], [enable audacious player support @<:@default=no@:>@]),
|
|
|
|
[want_audacious="$enableval"], [want_audacious=no])
|
2006-11-07 01:19:32 +00:00
|
|
|
|
2006-01-11 17:03:45 +00:00
|
|
|
AM_CONDITIONAL(BUILD_AUDACIOUS, test x$want_audacious = xyes)
|
2006-11-07 01:19:32 +00:00
|
|
|
if test x$want_audacious = xyes; then
|
2006-12-23 06:01:16 +00:00
|
|
|
PKG_CHECK_MODULES([AUDACIOUS], [audacious >= 0.1])
|
|
|
|
CFLAGS="$CFLAGS $AUDACIOUS_CFLAGS"
|
|
|
|
LIBS="$LIBS $AUDACIOUS_LIBS"
|
|
|
|
AC_DEFINE(AUDACIOUS, 1, [Define for Audacious support])
|
2006-11-07 01:19:32 +00:00
|
|
|
fi
|
2006-01-11 17:03:45 +00:00
|
|
|
|
2006-01-07 07:01:22 +00:00
|
|
|
|
2005-12-30 09:44:40 +00:00
|
|
|
dnl
|
|
|
|
dnl BMPx
|
|
|
|
dnl
|
|
|
|
|
2006-11-04 17:56:24 +00:00
|
|
|
AC_ARG_ENABLE([bmpx],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--enable-bmpx], [enable if you want BMPx support @<:@default=no@:>@]),
|
|
|
|
[want_bmpx="$enableval"], [want_bmpx=no])
|
2005-12-30 09:44:40 +00:00
|
|
|
|
|
|
|
AM_CONDITIONAL(BUILD_BMPX, test x$want_bmpx = xyes)
|
|
|
|
if test x$want_bmpx = xyes; then
|
2006-12-23 06:01:16 +00:00
|
|
|
PKG_CHECK_MODULES([BMPX], [bmp-2.0 >= 0.14.0])
|
|
|
|
CFLAGS="$CFLAGS $BMPX_CFLAGS"
|
|
|
|
LIBS="$LIBS $BMPX_LIBS"
|
|
|
|
AC_DEFINE(BMPX, 1, [Define if you want BMPx support])
|
2005-12-30 09:44:40 +00:00
|
|
|
fi
|
|
|
|
|
2005-07-20 00:30:40 +00:00
|
|
|
|
2006-08-10 16:56:13 +00:00
|
|
|
dnl
|
|
|
|
dnl Hddtemp
|
|
|
|
dnl
|
|
|
|
|
2006-11-04 17:56:24 +00:00
|
|
|
AC_ARG_ENABLE([hddtemp],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--disable-hddtemp],
|
|
|
|
[disable if you do not want hddtemp support @<:@default=yes@:>@]),
|
|
|
|
[want_hddtemp="$enableval"], [want_hddtemp=yes])
|
2006-08-10 16:56:13 +00:00
|
|
|
|
|
|
|
AM_CONDITIONAL(BUILD_HDDTEMP, test x$want_hddtemp = xyes)
|
|
|
|
if test x$want_hddtemp = xyes; then
|
2007-08-30 16:35:45 +00:00
|
|
|
if test x"$uname" != xLinux; then
|
|
|
|
AC_MSG_NOTICE([hddtemp not supported on $uname... disabling])
|
|
|
|
want_hddtemp=no
|
|
|
|
else
|
|
|
|
AC_DEFINE(HDDTEMP, 1, [Define if you want hddtemp support])
|
|
|
|
fi
|
2006-08-10 16:56:13 +00:00
|
|
|
fi
|
|
|
|
|
2005-07-20 00:30:40 +00:00
|
|
|
dnl
|
|
|
|
dnl MPD
|
|
|
|
dnl
|
|
|
|
|
2006-11-04 17:56:24 +00:00
|
|
|
AC_ARG_ENABLE([mpd],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--disable-mpd], [disable if you do not want MPD support @<:@default=yes@:>@]),
|
|
|
|
[want_mpd="$enableval"], [want_mpd=yes])
|
2005-07-20 00:30:40 +00:00
|
|
|
|
2005-09-02 14:17:31 +00:00
|
|
|
AM_CONDITIONAL(BUILD_MPD, test x$want_mpd = xyes)
|
|
|
|
if test x$want_mpd = xyes; then
|
2005-07-20 00:30:40 +00:00
|
|
|
AC_DEFINE(MPD, 1, [Define if you want MPD support])
|
|
|
|
fi
|
|
|
|
|
2006-03-25 21:21:07 +00:00
|
|
|
dnl
|
|
|
|
dnl XMMS2
|
|
|
|
dnl
|
|
|
|
|
2006-11-04 17:56:24 +00:00
|
|
|
AC_ARG_ENABLE([xmms2],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--enable-xmms2], [enable if you want XMMS2 support @<:@default=no@:>@]),
|
|
|
|
[want_xmms2="$enableval"], [want_xmms2=no])
|
2006-03-25 21:21:07 +00:00
|
|
|
|
|
|
|
AM_CONDITIONAL(BUILD_XMMS2, test x$want_xmms2 = xyes)
|
|
|
|
if test x$want_xmms2 = xyes; then
|
2006-12-23 06:01:16 +00:00
|
|
|
PKG_CHECK_MODULES([XMMS2], [xmms2-client])
|
|
|
|
CFLAGS="$CFLAGS $XMMS2_CFLAGS"
|
|
|
|
LIBS="$LIBS $XMMS2_LIBS"
|
|
|
|
AC_DEFINE(XMMS2, 1, [Define if you want XMMS2 support])
|
2006-03-25 21:21:07 +00:00
|
|
|
fi
|
|
|
|
|
2007-05-06 12:17:13 +00:00
|
|
|
dnl
|
|
|
|
dnl RSS
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([rss],
|
2007-06-01 13:32:06 +00:00
|
|
|
AC_HELP_STRING([--enable-rss], [enable if you want rss support @<:@default=no@:>@]),
|
2007-05-06 12:17:13 +00:00
|
|
|
[want_rss="$enableval"], [want_rss=no])
|
|
|
|
#
|
|
|
|
AM_CONDITIONAL(BUILD_RSS, test x$want_rss = xyes)
|
|
|
|
if test x$want_rss = xyes; then
|
|
|
|
WANT_GLIB=yes
|
2007-06-01 13:32:06 +00:00
|
|
|
PKG_CHECK_MODULES(RSS, libxml-2.0 libcurl,,exit)
|
|
|
|
CFLAGS="$CFLAGS $RSS_CFLAGS"
|
|
|
|
LIBS="$LIBS $RSS_LIBS"
|
2007-05-06 12:17:13 +00:00
|
|
|
AC_DEFINE(RSS, 1, [Define if you want rss support])
|
|
|
|
fi
|
2006-11-07 01:19:32 +00:00
|
|
|
|
2007-08-07 12:51:08 +00:00
|
|
|
dnl
|
|
|
|
dnl Wireless extensions
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([wlan],
|
|
|
|
AC_HELP_STRING([--enable-wlan], [enable if you want wireless support @<:@default=no@:>@]),
|
|
|
|
[want_wlan="$enableval"], [want_wlan=no])
|
|
|
|
#
|
2007-08-08 02:12:46 +00:00
|
|
|
AM_CONDITIONAL(BUILD_WLAN, test x$want_wlan = xyes)
|
2007-08-07 12:51:08 +00:00
|
|
|
if test x$want_wlan = xyes; then
|
2007-08-10 20:30:06 +00:00
|
|
|
AC_CHECK_HEADERS([iwlib.h], [], AC_MSG_ERROR([iwlib.h header not found]))
|
|
|
|
AC_CHECK_LIB([iw], [iw_sockets_open], [LIBS="$LIBS -liw"], AC_MSG_ERROR([iw_sockets_open not found]))
|
2007-08-07 12:51:08 +00:00
|
|
|
AC_DEFINE(HAVE_IWLIB, 1, [Define if you want wireless support])
|
|
|
|
fi
|
|
|
|
|
2006-05-25 07:00:12 +00:00
|
|
|
dnl
|
|
|
|
dnl IMLIB2
|
|
|
|
dnl
|
|
|
|
|
2006-11-07 22:02:50 +00:00
|
|
|
dnl --commented out until brenden finishes it --
|
|
|
|
dnl AC_ARG_ENABLE([imlib2],
|
|
|
|
dnl AC_HELP_STRING([--enable-imlib2], [enable if you want Imlib2 support [[default=no]]]),
|
|
|
|
dnl [want_imlib2="$enableval"], [want_imlib2=no])
|
|
|
|
dnl
|
|
|
|
dnl AM_CONDITIONAL(BUILD_IMLIB2, test x$want_imlib2 = xyes)
|
|
|
|
dnl if test x$want_imlib2 = xyes; then
|
2006-12-23 06:01:16 +00:00
|
|
|
dnl PKG_CHECK_MODULES([Imlib2], [imlib2])
|
|
|
|
dnl CFLAGS="$CFLAGS $Imlib2_CFLAGS"
|
|
|
|
dnl LIBS="$LIBS $Imlib2_LIBS"
|
|
|
|
dnl AC_DEFINE(IMLIB2, 1, [Define if you want Imlib2 support])
|
2006-11-07 22:02:50 +00:00
|
|
|
dnl fi
|
2006-05-25 07:00:12 +00:00
|
|
|
|
2006-12-23 06:01:16 +00:00
|
|
|
|
2005-10-31 05:17:06 +00:00
|
|
|
dnl
|
|
|
|
dnl PORT_MONITORS
|
|
|
|
dnl
|
|
|
|
|
2006-11-04 17:56:24 +00:00
|
|
|
AC_ARG_ENABLE([portmon],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--disable-portmon],
|
|
|
|
[disable if you do not want tcp (ip4) port monitoring @<:@default=yes@:>@]),
|
|
|
|
[want_portmon="$enableval"], [want_portmon=yes])
|
2005-10-31 05:17:06 +00:00
|
|
|
|
2007-06-13 20:06:59 +00:00
|
|
|
if test x"$want_portmon" = xyes; then
|
|
|
|
if test x"$uname" != xLinux; then
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_MSG_NOTICE([port monitors not supported on $uname... disabling])
|
|
|
|
want_portmon=no
|
|
|
|
else
|
|
|
|
AC_CHECK_HEADERS([netdb.h netinet/in.h netinet/tcp.h sys/socket.h arpa/inet.h], [],
|
|
|
|
[PORT_MONITORS_MISSING=yes])
|
2007-06-13 20:06:59 +00:00
|
|
|
if test x"$PORT_MONITORS_MISSING" = xyes; then
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_MSG_ERROR([missing a needed network header for port monitoring])
|
|
|
|
fi
|
2007-05-06 12:17:13 +00:00
|
|
|
WANT_GLIB=yes
|
|
|
|
AC_DEFINE(TCP_PORT_MONITOR, 1, [Define if you want tcp port monitoring support])
|
2006-12-23 06:01:16 +00:00
|
|
|
fi
|
|
|
|
fi
|
2007-06-13 20:06:59 +00:00
|
|
|
AM_CONDITIONAL(BUILD_PORT_MONITORS, test x"$want_portmon" = xyes)
|
2006-12-23 06:01:16 +00:00
|
|
|
|
|
|
|
|
2006-05-13 19:51:26 +00:00
|
|
|
dnl
|
|
|
|
dnl ICONV
|
|
|
|
dnl
|
|
|
|
|
2006-05-13 20:14:26 +00:00
|
|
|
AM_ICONV
|
|
|
|
if test "$am_cv_func_iconv" != yes; then
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_MSG_WARN([Could not find libiconv])
|
2006-05-22 17:32:44 +00:00
|
|
|
else
|
2006-12-23 06:01:16 +00:00
|
|
|
LIBS="$LIBS $LIBICONV"
|
2006-05-13 19:51:26 +00:00
|
|
|
fi
|
|
|
|
|
2006-09-30 16:31:06 +00:00
|
|
|
dnl
|
|
|
|
dnl debug
|
|
|
|
dnl
|
|
|
|
|
2006-11-04 17:56:24 +00:00
|
|
|
AC_ARG_ENABLE([debug],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--enable-debug], [compile with debug symbols @<:@default=no@:>@]),
|
|
|
|
[want_debug="$enableval"], [want_debug=no])
|
2006-09-30 16:31:06 +00:00
|
|
|
|
|
|
|
if test "x$want_debug" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
|
2006-12-23 06:01:16 +00:00
|
|
|
CFLAGS="$CFLAGS -g3"
|
|
|
|
AC_DEFINE([DEBUG], [], [Define for debugging])
|
2006-09-30 16:31:06 +00:00
|
|
|
fi
|
2006-05-13 19:51:26 +00:00
|
|
|
|
2005-07-20 00:30:40 +00:00
|
|
|
dnl
|
2006-11-07 01:19:32 +00:00
|
|
|
dnl X11
|
2005-07-20 00:30:40 +00:00
|
|
|
dnl
|
|
|
|
|
2006-11-04 17:56:24 +00:00
|
|
|
AC_ARG_ENABLE([x11],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--disable-x11], [disable if you do not want X11 support @<:@default=yes@:>@]),
|
|
|
|
[want_x11="$enableval"], [want_x11=yes])
|
2005-08-08 01:18:52 +00:00
|
|
|
|
2006-11-07 01:19:32 +00:00
|
|
|
AM_CONDITIONAL(BUILD_X11, test x$want_x11 = xyes)
|
2005-08-30 12:27:48 +00:00
|
|
|
if test "x$want_x11" = "xyes"; then
|
2006-11-07 20:17:08 +00:00
|
|
|
if $PKG_CONFIG --exists x11; then
|
2006-12-23 06:01:16 +00:00
|
|
|
PKG_CHECK_MODULES([X11], [x11])
|
|
|
|
CFLAGS="$CFLAGS $X11_CFLAGS"
|
|
|
|
LIBS="$LIBS $X11_LIBS"
|
2006-11-07 20:17:08 +00:00
|
|
|
else
|
2006-12-23 06:01:16 +00:00
|
|
|
dnl non-modular X11 installations
|
|
|
|
AC_PATH_X
|
|
|
|
AC_PATH_XTRA
|
|
|
|
CFLAGS="$CFLAGS $X_CFLAGS"
|
|
|
|
LIBS="$LIBS $X_LIBS"
|
|
|
|
LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS"
|
|
|
|
if test "x$no_x" = "xyes"; then
|
|
|
|
AC_MSG_ERROR([Can't locate your X11 installation])
|
|
|
|
fi
|
|
|
|
AC_CHECK_LIB([X11], [XOpenDisplay], [], AC_MSG_ERROR([Could not find XOpenDisplay in -lX11]))
|
2006-11-07 20:17:08 +00:00
|
|
|
fi
|
2006-11-07 01:19:32 +00:00
|
|
|
AC_DEFINE(X11, 1, [Define if you want to use X11])
|
|
|
|
fi
|
2006-12-23 06:01:16 +00:00
|
|
|
|
2006-10-05 19:18:34 +00:00
|
|
|
|
2006-11-07 01:19:32 +00:00
|
|
|
dnl
|
|
|
|
dnl Xext Double-buffering Extension
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([double_buffer],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--disable-double-buffer],
|
|
|
|
[disable for no Xdbe double-buffering support @<:@default=yes@:>@]),
|
|
|
|
[want_double_buffer="$enableval"], [want_double_buffer=yes])
|
2006-11-07 01:19:32 +00:00
|
|
|
|
|
|
|
if test "x$want_double_buffer" = "xyes"; then
|
|
|
|
if test "x$want_x11" != "xyes"; then
|
2006-12-23 06:01:16 +00:00
|
|
|
dnl silently disable if no x11
|
|
|
|
want_double_buffer=no
|
|
|
|
else
|
|
|
|
if $PKG_CONFIG --exists xext; then
|
|
|
|
PKG_CHECK_MODULES([XEXT],[xext])
|
|
|
|
CFLAGS="$CFLAGS $XEXT_CFLAGS"
|
|
|
|
LIBS="$LIBS $XEXT_LIBS"
|
|
|
|
else
|
|
|
|
dnl non-modular X11 installation
|
|
|
|
AC_CHECK_LIB([Xext], [XdbeQueryExtension], [LIBS="$LIBS -lXext"],
|
|
|
|
AC_MSG_ERROR([Could not find XdbeQueryExtension in -lXext]))
|
|
|
|
fi
|
|
|
|
AC_DEFINE(HAVE_XDBE, 1, [Define for X11 double-buffering])
|
2006-11-07 20:17:08 +00:00
|
|
|
fi
|
2006-11-07 01:19:32 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Xdamage Extension
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([xdamage],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--disable-xdamage],
|
|
|
|
[disable if you do not want Xdamage support @<:@default=yes@:>@]),
|
|
|
|
[want_xdamage="$enableval"], [want_xdamage=yes])
|
2006-11-07 01:19:32 +00:00
|
|
|
|
|
|
|
if test "x$want_xdamage" = "xyes"; then
|
|
|
|
if test "x$want_x11" != "xyes"; then
|
2006-12-23 06:01:16 +00:00
|
|
|
dnl silently disable if no x11
|
|
|
|
want_xdamage=no
|
|
|
|
else
|
|
|
|
if $PKG_CONFIG --exists xdamage; then
|
|
|
|
PKG_CHECK_MODULES([XDAMAGE],[xdamage])
|
|
|
|
CFLAGS="$CFLAGS $XDAMAGE_CFLAGS"
|
|
|
|
LIBS="$LIBS $XDAMAGE_LIBS"
|
|
|
|
else
|
|
|
|
dnl non-modular X11 installation
|
|
|
|
AC_CHECK_LIB([Xdamage], [XDamageQueryExtension], [LIBS="$LIBS -lXdamage"],
|
|
|
|
AC_MSG_ERROR([Could not find XDamageQueryExtension in -lXdamage]))
|
|
|
|
fi
|
|
|
|
AC_DEFINE(HAVE_XDAMAGE, 1, [Define for X11 Xdamage extension])
|
2006-11-07 01:19:32 +00:00
|
|
|
fi
|
2005-07-20 00:30:40 +00:00
|
|
|
fi
|
|
|
|
|
2006-11-07 01:19:32 +00:00
|
|
|
|
2005-07-20 00:30:40 +00:00
|
|
|
dnl
|
|
|
|
dnl Xft
|
|
|
|
dnl
|
|
|
|
|
2006-11-07 01:19:32 +00:00
|
|
|
AC_ARG_ENABLE([xft],
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_HELP_STRING([--disable-xft], [disable if you do not want to use Xft @<:@default=yes@:>@]),
|
|
|
|
[want_xft="$enableval"], [want_xft=yes])
|
2006-11-07 01:19:32 +00:00
|
|
|
|
|
|
|
if test x$want_xft = "xyes"; then
|
|
|
|
if test "x$want_x11" != "xyes"; then
|
2006-12-23 06:01:16 +00:00
|
|
|
dnl silently disable if no x11
|
|
|
|
want_xft=no
|
|
|
|
else
|
|
|
|
PKG_CHECK_MODULES(XFT, [xft])
|
|
|
|
CFLAGS="$CFLAGS $XFT_CFLAGS"
|
|
|
|
LIBS="$LIBS $XFT_LIBS"
|
|
|
|
AC_DEFINE(XFT, 1, [Define for Xft support])
|
2006-11-07 01:19:32 +00:00
|
|
|
fi
|
2005-07-20 00:30:40 +00:00
|
|
|
fi
|
|
|
|
|
2007-05-06 12:17:13 +00:00
|
|
|
dnl
|
|
|
|
dnl GLIB
|
|
|
|
dnl
|
|
|
|
|
|
|
|
if test x$WANT_GLIB = xyes; then
|
|
|
|
PKG_CHECK_MODULES([GLIB], [glib-2.0])
|
|
|
|
CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
|
|
|
LIBS="$LIBS $GLIB_LIBS"
|
|
|
|
fi
|
2006-11-07 01:19:32 +00:00
|
|
|
|
2005-07-20 00:30:40 +00:00
|
|
|
dnl
|
|
|
|
dnl KVM
|
|
|
|
dnl
|
|
|
|
|
|
|
|
if test x$WANT_KVM = xyes; then
|
|
|
|
AC_CHECK_LIB(kvm, kvm_open,
|
2006-12-23 06:01:16 +00:00
|
|
|
LIBS="$LIBS -lkvm",
|
|
|
|
AC_MSG_ERROR([Could not find kvm_open in -lkvm.])
|
2005-07-20 00:30:40 +00:00
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
2005-08-27 11:56:22 +00:00
|
|
|
dnl
|
|
|
|
dnl devstat
|
|
|
|
dnl
|
|
|
|
|
|
|
|
if test x$WANT_DEVSTAT = xyes; then
|
2006-12-23 06:01:16 +00:00
|
|
|
AC_CHECK_LIB(devstat, devstat_getversion,
|
|
|
|
LIBS="$LIBS -ldevstat",
|
|
|
|
AC_MSG_ERROR([Cound not find devstat_getversion in -ldevstat.])
|
|
|
|
)
|
2005-08-27 11:56:22 +00:00
|
|
|
fi
|
|
|
|
|
2005-07-20 00:30:40 +00:00
|
|
|
dnl
|
2006-03-24 13:49:25 +00:00
|
|
|
dnl OSSLIB for NetBSD/OpenBSD
|
2005-07-20 00:30:40 +00:00
|
|
|
dnl
|
|
|
|
|
|
|
|
if test x$WANT_OSSLIB = xyes; then
|
|
|
|
AC_CHECK_LIB(ossaudio, _oss_ioctl,
|
2006-12-23 06:01:16 +00:00
|
|
|
LIBS="$LIBS -lossaudio",
|
|
|
|
AC_MSG_ERROR([Could not find oss_ioctl in -lossaudio.])
|
2005-07-20 00:30:40 +00:00
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl
|
2006-11-14 22:30:31 +00:00
|
|
|
dnl Some headers
|
2005-07-20 00:30:40 +00:00
|
|
|
dnl
|
|
|
|
|
2006-11-14 22:30:31 +00:00
|
|
|
AC_CHECK_HEADERS([signal.h unistd.h sys/utsname.h sys/stat.h linux/soundcard.h dirent.h mcheck.h \
|
2006-12-23 06:01:16 +00:00
|
|
|
sys/statfs.h sys/param.h pthread.h assert.h errno.h time.h])
|
2005-08-30 12:27:48 +00:00
|
|
|
AC_CHECK_HEADERS([sys/mount.h], [], [],
|
2006-12-23 06:01:16 +00:00
|
|
|
[#ifdef HAVE_SYS_PARAM_H
|
|
|
|
#include <sys/param.h>
|
|
|
|
#endif
|
|
|
|
])
|
2007-02-25 23:35:53 +00:00
|
|
|
|
|
|
|
AC_DEFINE([_GNU_SOURCE], [], [Define for GNU source and extensions])
|
|
|
|
|
2006-11-14 22:30:31 +00:00
|
|
|
dnl
|
|
|
|
dnl Some functions
|
|
|
|
dnl
|
|
|
|
|
2007-02-25 23:35:53 +00:00
|
|
|
AC_CHECK_FUNCS([calloc malloc free popen sysinfo getloadavg memrchr])
|
2007-01-15 00:02:38 +00:00
|
|
|
AC_SEARCH_LIBS(clock_gettime, [rt],
|
|
|
|
[AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if you have clock_gettime()])],
|
|
|
|
[AC_CHECK_FUNCS([gettimeofday], [], [AC_MSG_ERROR([gettimeofday() not available!])])], [])
|
|
|
|
|
2006-11-14 22:30:31 +00:00
|
|
|
|
2006-12-29 23:14:31 +00:00
|
|
|
dnl
|
|
|
|
dnl Check for zlib
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_CHECK_HEADER(zlib.h,
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([zlib is missing; please install the headers first])])
|
|
|
|
|
2005-07-20 00:30:40 +00:00
|
|
|
|
|
|
|
dnl
|
2005-08-22 01:05:39 +00:00
|
|
|
dnl Check doc stuff
|
2005-07-20 00:30:40 +00:00
|
|
|
dnl
|
|
|
|
|
2005-08-24 20:47:29 +00:00
|
|
|
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
|
2006-12-23 06:01:16 +00:00
|
|
|
AM_CONDITIONAL(HAVE_DOCSTUFF, false)
|
2005-08-24 20:47:29 +00:00
|
|
|
else
|
2006-12-23 06:01:16 +00:00
|
|
|
AM_CONDITIONAL(HAVE_DOCSTUFF, true)
|
2005-08-24 20:47:29 +00:00
|
|
|
fi
|
2005-08-22 01:05:39 +00:00
|
|
|
|
2005-07-20 00:30:40 +00:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl kstat in Solaris
|
|
|
|
dnl
|
|
|
|
|
|
|
|
if test x$WANT_KSTAT = xyes; then
|
|
|
|
dah=no
|
|
|
|
AC_CHECK_LIB([kstat], [kstat_open], [dah=yes], [])
|
|
|
|
|
|
|
|
if test x$dah = xyes; then
|
|
|
|
AC_DEFINE(HAVE_KSTAT, 1, [Define if you have kstat (Solaris)])
|
|
|
|
LDFLAGS="$LDFLAGS -lkstat"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2005-07-24 23:08:51 +00:00
|
|
|
AC_DEFUN([AM_LANGINFO_CODESET],
|
|
|
|
[
|
|
|
|
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
|
|
|
|
[AC_TRY_LINK([#include <langinfo.h>],
|
|
|
|
[char* cs = nl_langinfo(CODESET);],
|
|
|
|
am_cv_langinfo_codeset=yes,
|
|
|
|
am_cv_langinfo_codeset=no)
|
|
|
|
])
|
|
|
|
if test $am_cv_langinfo_codeset = yes; then
|
|
|
|
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
|
|
|
|
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
2005-07-20 00:30:40 +00:00
|
|
|
|
2006-12-23 06:01:16 +00:00
|
|
|
dnl ************************
|
|
|
|
dnl * Linker optimizations *
|
|
|
|
dnl ************************
|
|
|
|
AC_MSG_CHECKING([if $LD accepts -O1])
|
|
|
|
case `$LD -O1 -v 2>&1 </dev/null` in
|
|
|
|
*GNU* | *BSD*)
|
|
|
|
LDFLAGS="$LDFLAGS -Wl,-O1"
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
;;
|
|
|
|
esac
|
2005-07-20 00:30:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Da.
|
|
|
|
dnl
|
|
|
|
|
|
|
|
CFLAGS="$CFLAGS -Wall -W"
|
|
|
|
|
|
|
|
AC_SUBST(CFLAGS)
|
|
|
|
AC_SUBST(X11_LIBS)
|
|
|
|
|
2005-08-21 23:09:36 +00:00
|
|
|
AC_OUTPUT
|
2006-08-12 05:19:40 +00:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Print summary
|
|
|
|
dnl
|
|
|
|
cat << EOF
|
|
|
|
|
|
|
|
$PACKAGE $VERSION configured successfully:
|
2006-08-12 06:15:52 +00:00
|
|
|
|
2006-12-23 06:01:16 +00:00
|
|
|
Installing into: $prefix
|
|
|
|
C compiler flags: $CFLAGS
|
|
|
|
Linker flags: $LDFLAGS
|
|
|
|
Libraries: $LIBS
|
2006-08-12 06:15:52 +00:00
|
|
|
|
2006-08-12 05:19:40 +00:00
|
|
|
* x11:
|
2006-12-23 06:01:16 +00:00
|
|
|
x11 support: $want_x11
|
|
|
|
xdamage support: $want_xdamage
|
|
|
|
xdbe support: $want_double_buffer
|
|
|
|
xft support: $want_xft
|
2006-08-12 05:19:40 +00:00
|
|
|
|
|
|
|
* music detection:
|
2006-12-23 06:01:16 +00:00
|
|
|
audacious: $want_audacious
|
|
|
|
bmpx: $want_bmpx
|
|
|
|
mpd: $want_mpd
|
|
|
|
xmms2: $want_xmms2
|
2006-08-12 05:19:40 +00:00
|
|
|
|
|
|
|
* general:
|
2006-12-23 06:01:16 +00:00
|
|
|
hddtemp: $want_hddtemp
|
|
|
|
portmon: $want_portmon
|
2007-05-06 12:17:13 +00:00
|
|
|
RSS: $want_rss
|
2007-08-07 12:51:08 +00:00
|
|
|
wireless: $want_wlan
|
2006-08-12 05:19:40 +00:00
|
|
|
EOF
|