+# -*- mode: Makefile; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
+#
dnl major, minor and micro version macros.
m4_define([conky_version_major], [1])
m4_define([conky_version_minor], [7])
AC_DEFINE(OWN_WINDOW, 1, [Define if you want support for window creating])
fi
+dnl
+dnl NCURSES option
+dnl
+
+AC_ARG_ENABLE([ncurses],
+ AC_HELP_STRING([--disable-ncurses], [disable if you do not want ncurses support in conky @<:@default=yes@:>@]),
+ [want_ncurses="$enableval"], [want_ncurses=yes])
+
+AM_CONDITIONAL(BUILD_NCURSES, test x$want_ncurses = xyes)
+if test x$want_ncurses = xyes; then
+ conky_LIBS="$conky_LIBS -lncurses"
+ AC_DEFINE(NCURSES, 1, [Define for ncurses support])
+fi
+
dnl
dnl Audacious Media Player
dnl
AC_ARG_ENABLE([imlib2],
- AC_HELP_STRING([--enable-imlib2], [enable if you want Imlib2 support (also enables Lua Imlib2 support if lua-extras enabled) [[default=no]]]),
+ AC_HELP_STRING([--enable-imlib2], [enable if you want Imlib2 support [[default=no]]]),
[want_imlib2="$enableval"], [want_imlib2=no])
+AC_ARG_ENABLE([lua-imlib2],
+ AC_HELP_STRING([--enable-lua-imlib2], [enable if you want Lua Imlib2 bindings for Conky @<:@default=no@:>@]),
+ [want_lua_imlib2="$enableval"], [want_lua_imlib2=no])
+
+# if lua-imlib2 is enabled, we must force imlib2
+if test x$want_lua_imlib2 = xyes; then
+ want_imlib2=yes
+fi
+
if test x$want_imlib2 = xyes; then
if test "x$want_x11" != "xyes"; then
dnl silently disable if no x11
AC_ARG_ENABLE([lua],
AC_HELP_STRING([--enable-lua], [enable if you want Lua scripting support @<:@default=yes@:>@]),
[want_lua="$enableval"], [want_lua=yes])
-AC_ARG_ENABLE([lua-extras],
- AC_HELP_STRING([--enable-lua-extras], [enable if you want to install Lua extras (including bindings) @<:@default=no@:>@]),
- [want_lua_extras="$enableval"], [want_lua_extras=no])
AC_ARG_ENABLE([lua-cairo],
- AC_HELP_STRING([--enable-lua-cairo], [enable if you want Lua Cairo bindings for Conky (requires lua-extras enabled) @<:@default=no@:>@]),
+ AC_HELP_STRING([--enable-lua-cairo], [enable if you want Lua Cairo bindings for Conky @<:@default=no@:>@]),
[want_lua_cairo="$enableval"], [want_lua_cairo=no])
-want_lua_imlib2=no
need_tolua=no
+if test x$want_lua_cairo = xyes -o x$want_lua_imlib2 = xyes; then
+ need_tolua=yes
+ want_lua=yes
+fi
AM_CONDITIONAL(BUILD_LUA, test x$want_lua = xyes)
if test x$want_lua = xyes; then
conky_CFLAGS="$conky_CFLAGS $LUA_CFLAGS $LUA51_CFLAGS"
conky_LIBS="$conky_LIBS $LUA_LIBS $LUA51_LIBS"
- want_lua_imlib2="$want_imlib2"
- if test x$want_lua_extras != xyes; then
- want_lua_cairo=no
- want_lua_imlib2=no
- else
+ if test x$need_tolua = xyes; then
AC_DEFINE(LUA_EXTRAS, 1, [Define if you want Lua extras])
if test "x$want_x11" != "xyes"; then
dnl silently disable if no x11
PKG_CHECK_MODULES([cairo], cairo)
PKG_CHECK_MODULES([cairo_xlib], cairo-xlib)
AC_DEFINE(HAVE_LUA_CAIRO, 1, [Define if you want Lua Cairo bindings for Conky])
- need_tolua=yes
libcairo_CFLAGS="$libcairo_CFLAGS $cairo_CFLAGS $cairo_xlib_CFLAGS"
libcairo_LIBS="$libcairo_LIBS $cairo_LIBS $cairo_xlib_LIBS"
fi
if test x$want_imlib2 = xyes; then
- need_tolua=yes
- want_lua_imlib2=yes
AC_DEFINE(HAVE_LUA_IMLIB2, 1, [Define if you want Lua Imlib2 bindings for Conky])
fi
fi
- if test x$need_tolua = xyes; then
- AC_CHECK_PROGS(toluapp, [tolua++ tolua++5.1], no)
- if test x$toluapp = xno; then
- AC_MSG_ERROR([tolua++ or tolua++5.1 is required for Lua extras.])
- else
- AC_SEARCH_LIBS(tolua_error,
- [tolua++ tolua++5.1],
- AC_SUBST(tolua_LIBS,"${LIBS}"),
- AC_MSG_ERROR([tolua_error not found]),
- $LUA51_LIBS)
- fi
- conky_LIBS="$conky_LIBS $tolua_LIBS"
+ AC_CHECK_PROGS(toluapp, [tolua++ tolua++5.1], no)
+ if test x$toluapp = xno; then
+ AC_MSG_ERROR([tolua++ or tolua++5.1 is required for Lua extras.])
+ else
+ AC_SEARCH_LIBS(tolua_error,
+ [tolua++ tolua++5.1],
+ [
+ AC_SUBST(tolua_LIBS, "${LIBS}")
+ AC_SUBST(tolua_CFLAGS, "${CFLAGS}")
+ ],
+ AC_MSG_ERROR([tolua_error not found]),
+ [$LUA_LIBS $LUA51_LIBS])
fi
-
+ conky_LIBS="$conky_LIBS $tolua_LIBS"
+ tolua_CFLAGS="$tolua_CFLAGS $LUA_CFLAGS $LUA51_CFLAGS"
+ tolua_LIBS="$tolua_LIBS $LUA_LIBS $LUA51_LIBS"
fi
AC_DEFINE(HAVE_LUA, 1, [Define if you want Lua scripting support])
fi
dnl ICONV
dnl
+m4_pattern_allow([AM_ICONV])
AM_ICONV
if test "$am_cv_func_iconv" != yes; then
AC_MSG_WARN([Could not find libiconv])
else
conky_LIBS="$conky_LIBS $LIBICONV"
fi
+AM_CONDITIONAL(BUILD_ICONV, test "$am_cv_func_iconv" = yes)
dnl
dnl Xext Double-buffering Extension
dnl
AC_CHECK_HEADERS([signal.h unistd.h sys/utsname.h sys/stat.h linux/soundcard.h alsa/asoundlib.h dirent.h mcheck.h \
- sys/statfs.h sys/param.h pthread.h assert.h errno.h time.h])
+ sys/statfs.h sys/param.h pthread.h semaphore.h assert.h errno.h time.h])
AC_CHECK_HEADERS([sys/mount.h], [], [],
[#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
fi
fi
+dnl
+dnl profiling
+dnl
+
+AC_ARG_ENABLE([profiling],
+ AC_HELP_STRING([--enable-profiling], [specify compiler flags for use with gprof and gcov @<:@default=no@:>@]),
+ [want_profiling="$enableval"], [want_profiling=no])
+
+if test "x$want_profiling" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
+ if test "x$want_debug" = "xyes"; then
+ conky_CFLAGS="$conky_CFLAGS -pg -fprofile-arcs -ftest-coverage"
+ else
+ conky_CFLAGS="$conky_CFLAGS -g3 -pg -fprofile-arcs -ftest-coverage"
+ fi
+ AC_DEFINE([PROFILING], [], [Define for profiling (gprof and gcov) support])
+fi
+
AC_SUBST(conky_CFLAGS)
AC_SUBST(conky_LIBS)
AC_SUBST(X11_LIBS)
XMMS2: $want_xmms2
* General:
- OpenMP: $want_openmp
+dnl OpenMP: $want_openmp
math: $want_math
hddtemp: $want_hddtemp
portmon: $want_portmon