X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=configure.ac.in;h=e85f9b90080690b9710c4f54aaccb29b2009617a;hb=1ed564fd0b44d00c63cb92d1ab775d13a9e5fc13;hp=a56bd6d3b07a438530e2630319bef25430f8ad7e;hpb=d9cb0954416c0ddfb171f83da6c31232e4e1cf7c;p=monky diff --git a/configure.ac.in b/configure.ac.in index a56bd6d..e85f9b9 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -1,7 +1,9 @@ +# -*- 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]) -m4_define([conky_version_micro], [2]) +m4_define([conky_version_micro], [3]) m4_define([conky_version_tag], [pre]) dnl [] for releases m4_define([conky_version_revision],[_pre@REVISION@]) m4_define([conky_version], @@ -121,6 +123,20 @@ if test $dah != "no"; then 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 @@ -238,13 +254,13 @@ dnl AC_ARG_ENABLE([iostats], AC_HELP_STRING([--enable-iostats], - [enable if you want support for per-task I/O statistics @<:@default=no@:>@]), - [want_iostats="$enableval"], [want_iostats=no]) + [enable if you want support for per-task I/O statistics @<:@default=yes@:>@]), + [want_iostats="$enableval"], [want_iostats=yes]) if test x$want_iostats = xyes; then if test x"$uname" != xLinux; then AC_MSG_NOTICE([iostats not supported on $uname... disabling]) - want_apcupsd=no + want_iostats=no else AC_DEFINE(IOSTATS, 1, [Define if you want support for per-task I/O statistics]) fi @@ -308,6 +324,14 @@ if test x$want_xmms2 = xyes; then fi dnl +dnl libcurl, see below for more (this has to be above the other uses of want_curl) +dnl + +AC_ARG_ENABLE([curl], + AC_HELP_STRING([--enable-curl], [enable if you want curl support @<:@default=no@:>@]), + [want_curl="$enableval"], [want_curl=no]) + +dnl dnl EVE Skill Monitor dnl @@ -317,10 +341,8 @@ AC_ARG_ENABLE([eve], AM_CONDITIONAL(BUILD_EVE, test x$want_eve = xyes) if test x$want_eve = xyes; then - PKG_CHECK_MODULES([libxml2], libxml-2.0) - PKG_CHECK_MODULES([libcurl], libcurl) - conky_CFLAGS="$conky_CFLAGS $libxml2_CFLAGS $libcurl_CFLAGS" - conky_LIBS="$conky_LIBS $libxml2_LIBS $libcurl_LIBS" + want_curl=yes + want_libxml2=yes AC_DEFINE(EVE, 1, [Define if you want Eve-Online Skill monitor support]) AC_DEFINE(EVEURL_TRAINING, "http://api.eve-online.com/char/SkillInTraining.xml.aspx", [Eve training URL]) AC_DEFINE(EVEURL_SKILLTREE, "http://api.eve-online.com/eve/Skilltree.xml.aspx", [Eve skilltree URL]) @@ -339,27 +361,36 @@ AC_ARG_ENABLE([rss], AM_CONDITIONAL(BUILD_RSS, test x$want_rss = xyes) if test x$want_rss = xyes; then WANT_GLIB=yes - PKG_CHECK_MODULES([libxml2], libxml-2.0) - PKG_CHECK_MODULES([libcurl], libcurl) - conky_CFLAGS="$conky_CFLAGS $libxml2_CFLAGS $libcurl_CFLAGS" - conky_LIBS="$conky_LIBS $libxml2_LIBS $libcurl_LIBS" - AC_DEFINE(RSS, 1, [Define if you want rss support]) + want_curl=yes + want_libxml2=yes + AC_DEFINE(RSS, 1, [Define if you want Curl support]) fi dnl dnl WEATHER dnl -AC_ARG_ENABLE([weather], - AC_HELP_STRING([--enable-weather], [enable if you want weather support @<:@default=no@:>@]), - [want_weather="$enableval"], [want_weather=no]) +AC_ARG_ENABLE([weather-metar], + AC_HELP_STRING([--enable-weather-metar], [enable if you want METAR weather support @<:@default=no@:>@]), + [want_metar="$enableval"], [want_metar=no]) + +AC_ARG_ENABLE([weather-xoap], + AC_HELP_STRING([--enable-weather-xoap], [enable if you want XOAP weather support (also enables METAR) @<:@default=no@:>@]), + [want_xoap="$enableval"], [want_xoap=no]) # -AM_CONDITIONAL(BUILD_WEATHER, test x$want_weather = xyes) -if test x$want_weather = xyes; then - PKG_CHECK_MODULES([libcurl], libcurl) - conky_CFLAGS="$conky_CFLAGS $libcurl_CFLAGS" - conky_LIBS="$conky_LIBS $libcurl_LIBS" - AC_DEFINE(WEATHER, 1, [Define if you want weather support]) +if test x$want_xoap = xyes; then + want_metar=yes +fi +AM_CONDITIONAL(BUILD_WEATHER, test x$want_metar = xyes) +AM_CONDITIONAL(BUILD_XOAP, test x$want_xoap = xyes) +if test x$want_metar = xyes; then + if test x$want_xoap = xyes; then + want_libxml2=yes + AC_DEFINE(XOAP, 1, [Define if you want XOAP weather support]) + AC_DEFINE(XOAP_FILE, "$HOME/.xoaprc", [User xoap keys file]) + fi + want_curl=yes + AC_DEFINE(WEATHER, 1, [Define if you want METAR weather support]) fi dnl @@ -396,8 +427,17 @@ dnl IMLIB2 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 @@ -418,13 +458,14 @@ dnl 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 @@ -436,12 +477,8 @@ 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 - AC_CHECK_PROG(HAVE_TOLUAPP, tolua++, yes, no) + 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 want_lua_cairo=no @@ -449,25 +486,30 @@ if test x$want_lua = xyes; then if test x$want_lua_cairo = xyes; then PKG_CHECK_MODULES([cairo], cairo) PKG_CHECK_MODULES([cairo_xlib], cairo-xlib) - if test x"$HAVE_TOLUAPP" = x"no"; then - AC_MSG_ERROR([tolua++ is required for Lua Cairo support.]) - else - AC_CHECK_PROGS(toluapp, tolua++) - AC_DEFINE(HAVE_LUA_CAIRO, 1, [Define if you want Lua Cairo bindings for Conky]) - fi + AC_DEFINE(HAVE_LUA_CAIRO, 1, [Define if you want Lua Cairo bindings for Conky]) 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 - if test x"$HAVE_TOLUAPP" = x"no"; then - AC_MSG_ERROR([tolua++ is required for Lua Imlib2 support.]) - else - want_lua_imlib2=yes - AC_CHECK_PROGS(toluapp, tolua++) - AC_DEFINE(HAVE_LUA_IMLIB2, 1, [Define if you want Lua Imlib2 bindings for Conky]) - fi + AC_DEFINE(HAVE_LUA_IMLIB2, 1, [Define if you want Lua Imlib2 bindings for Conky]) fi fi + 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 @@ -520,12 +562,14 @@ dnl 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 @@ -575,7 +619,7 @@ if test "x$want_xdamage" = "xyes"; then conky_LIBS="$conky_LIBS $XDamage_LIBS" else dnl non-modular X11 installation - AC_CHECK_LIB([Xdamage], [XDamageQueryExtension], [conky_LIBS="$conky_LIBS -lXdamage"], + AC_CHECK_LIB([Xdamage], [XDamageQueryExtension], [conky_LIBS="$conky_LIBS -lXdamage"], AC_MSG_ERROR([Could not find XDamageQueryExtension in -lXdamage])) fi AC_DEFINE(HAVE_XDAMAGE, 1, [Define for X11 Xdamage extension]) @@ -637,6 +681,28 @@ if test x$WANT_GLIB = xyes; then fi dnl +dnl libcurl +dnl + +if test x$want_curl = xyes; then + PKG_CHECK_MODULES([libcurl], libcurl) + conky_CFLAGS="$conky_CFLAGS $libcurl_CFLAGS" + conky_LIBS="$conky_LIBS $libcurl_LIBS" + AC_DEFINE(HAVE_CURL, 1, [Define if you want Curl support]) +fi +AM_CONDITIONAL(BUILD_CURL, test x$want_curl = xyes) + +dnl +dnl libx +dnl + +if test x$want_libxml2 = xyes; then + PKG_CHECK_MODULES([libxml2], libxml-2.0) + conky_CFLAGS="$conky_CFLAGS $libxml2_CFLAGS" + conky_LIBS="$conky_LIBS $libxml2_LIBS" +fi + +dnl dnl KVM dnl @@ -691,7 +757,7 @@ dnl Some headers 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 @@ -740,26 +806,26 @@ AC_CHECK_HEADER(zlib.h, dnl dnl Check for OpenMP support dnl +dnl removed for now due to problems with GCC's OpenMP implementation -AC_ARG_ENABLE([openmp], - AC_HELP_STRING([--enable-openmp], [enable if you want OpenMP support @<:@default=no@:>@]), - [want_openmp="$enableval"], [want_openmp=no]) - -if test x$want_openmp = xyes; then - AX_OPENMP([ - gcc_version=`$CC -dumpversion` - gcc_major=`echo $gcc_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gcc_minor=`echo $gcc_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - dnl check that the gcc version is >=4.3, if we're using gcc - if test ! "x$GCC" = "xyes" -o $gcc_major -ge 4 -a $gcc_minor -ge 3; then - AC_DEFINE(HAVE_OPENMP,1,[Define if OpenMP is enabled]) - conky_CFLAGS="$conky_CFLAGS $OPENMP_CFLAGS" - else - want_openmp=no - fi +dnl AC_ARG_ENABLE([openmp], +dnl AC_HELP_STRING([--enable-openmp], [enable if you want OpenMP support @<:@default=no@:>@]), +dnl [want_openmp="$enableval"], [want_openmp=no]) - ]) -fi +dnl if test x$want_openmp = xyes; then +dnl AX_OPENMP([ +dnl gcc_version=`$CC -dumpversion` +dnl gcc_major=`echo $gcc_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` +dnl gcc_minor=`echo $gcc_version | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` +dnl dnl check that the gcc version is >=4.3, if we're using gcc +dnl if test ! "x$GCC" = "xyes" -o $gcc_major -ge 4 -a $gcc_minor -ge 3; then +dnl AC_DEFINE(HAVE_OPENMP,1,[Define if OpenMP is enabled]) +dnl conky_CFLAGS="$conky_CFLAGS $OPENMP_CFLAGS" +dnl else +dnl want_openmp=no +dnl fi +dnl ]) +dnl fi dnl dnl Check doc stuff @@ -857,6 +923,23 @@ if test "x$want_testing" = "xyes" -a $ac_cv_c_compiler_gnu != no; then 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) @@ -890,12 +973,15 @@ $PACKAGE $VERSION configured successfully: XMMS2: $want_xmms2 * General: - OpenMP: $want_openmp +dnl OpenMP: $want_openmp math: $want_math hddtemp: $want_hddtemp portmon: $want_portmon RSS: $want_rss - Weather (METAR): $want_weather + Curl: $want_curl + Weather + METAR: $want_metar + XOAP: $want_xoap wireless: $want_wlan IBM: $want_ibm nvidia: $want_nvidia