Fix crash in mail stuff due to bad free().
[monky] / configure.ac.in
index f6beef8..a08ef7f 100644 (file)
@@ -2,10 +2,10 @@
 #
 dnl major, minor and micro version macros.
 m4_define([conky_version_major], [1])
-m4_define([conky_version_minor], [7])
-m4_define([conky_version_micro], [3])
+m4_define([conky_version_minor], [8])
+m4_define([conky_version_micro], [1])
 m4_define([conky_version_tag], [pre]) dnl [] for releases
-m4_define([conky_version_revision],[_pre@REVISION@])
+m4_define([conky_version_revision],[_rc1])
 m4_define([conky_version],
     [conky_version_major().conky_version_minor().conky_version_micro()ifelse(
       conky_version_tag(), [pre],
@@ -149,7 +149,7 @@ AC_ARG_ENABLE([audacious],
 
 AM_CONDITIONAL(BUILD_AUDACIOUS, test x$want_audacious = xyes -o x$want_audacious = xlegacy)
 if test x$want_audacious = xyes; then
-      PKG_CHECK_MODULES([Audacious], [audacious >= 1.4.0 dbus-glib-1 glib-2.0 gobject-2.0])
+      PKG_CHECK_MODULES([Audacious], [audacious >= 1.4.0 audclient dbus-glib-1 glib-2.0 gobject-2.0])
       conky_CFLAGS="$conky_CFLAGS $Audacious_CFLAGS"
       conky_LIBS="$conky_LIBS $Audacious_LIBS"
       save_CPPFLAGS="$CPPFLAGS"
@@ -201,7 +201,7 @@ AM_CONDITIONAL(BUILD_IBM, test x$want_ibm = xyes)
 if test x$want_ibm = xyes; then
        if test x"$uname" != xLinux; then
                AC_MSG_NOTICE([support for IBM/Lenovo notebooks not supported on $uname... disabling])
-               want_ibm=no
+               want_ibm="not supported on $uname"
        else
                AC_DEFINE(IBM, 1, [Define if you want support for IBM/Lenovo notebooks (SMAPI)])
        fi
@@ -221,7 +221,7 @@ AM_CONDITIONAL(BUILD_HDDTEMP, test x$want_hddtemp = xyes)
 if test x$want_hddtemp = xyes; then
   if test x"$uname" != xLinux; then
       AC_MSG_NOTICE([hddtemp not supported on $uname... disabling])
-      want_hddtemp=no
+      want_hddtemp="not supported on $uname"
   else
       AC_DEFINE(HDDTEMP, 1, [Define if you want hddtemp support])
   fi
@@ -240,7 +240,7 @@ AC_ARG_ENABLE([apcupsd],
 if test x$want_apcupsd = xyes; then
   if test x"$uname" != xLinux; then
       AC_MSG_NOTICE([apcupsd not supported on $uname... disabling])
-      want_apcupsd=no
+      want_apcupsd="not supported on $uname"
   else
       AC_DEFINE(APCUPSD, 1, [Define if you want apcupsd support])
   fi
@@ -260,7 +260,7 @@ AC_ARG_ENABLE([iostats],
 if test x$want_iostats = xyes; then
   if test x"$uname" != xLinux; then
       AC_MSG_NOTICE([iostats not supported on $uname... disabling])
-      want_iostats=no
+      want_iostats="not supported on $uname"
   else
       AC_DEFINE(IOSTATS, 1, [Define if you want support for per-task I/O statistics])
   fi
@@ -317,7 +317,7 @@ AC_ARG_ENABLE([xmms2],
 
 AM_CONDITIONAL(BUILD_XMMS2, test x$want_xmms2 = xyes)
 if test x$want_xmms2 = xyes; then
-  PKG_CHECK_MODULES([XMMS2], [xmms2-client])
+  PKG_CHECK_MODULES([XMMS2], [xmms2-client] >= [0.6])
     conky_CFLAGS="$conky_CFLAGS $XMMS2_CFLAGS"
     conky_LIBS="$conky_LIBS $XMMS2_LIBS"
     AC_DEFINE(XMMS2, 1, [Define if you want XMMS2 support])
@@ -423,6 +423,23 @@ if test "x$want_x11" = "xyes"; then
 fi
 
 dnl
+dnl ARGB
+dnl
+
+AC_ARG_ENABLE([argb],
+              AC_HELP_STRING([--disable-argb], [disable if you do not want a argb visual @<:@default=yes@:>@]),
+              [want_argb="$enableval"], [want_argb=yes])
+
+if test x$want_argb = xyes; then
+    if test "x$want_x11" != "xyes"; then
+       dnl silently disable if no x11
+       want_argb=no
+    else
+       AC_DEFINE(USE_ARGB, 1, [Define if you want argb visual support])
+    fi
+fi
+
+dnl
 dnl IMLIB2
 dnl
 
@@ -494,12 +511,12 @@ if test x$want_lua = xyes; then
                                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)
+               AC_CHECK_PROGS(toluapp, [tolua++ tolua++5.1 tolua++-5.1], no)
                if test x$toluapp = xno; then
-                       AC_MSG_ERROR([tolua++ or tolua++5.1 is required for Lua extras.])
+                       AC_MSG_ERROR([tolua++, tolua++5.1, or tolua++-5.1 is required for Lua extras.])
                else
                        AC_SEARCH_LIBS(tolua_error,
-                                                  [tolua++ tolua++5.1],
+                                                  [tolua++-5.1 tolua++ tolua++5.1],
                                                   [
                                                        AC_SUBST(tolua_LIBS, "${LIBS}")
                                                        AC_SUBST(tolua_CFLAGS, "${CFLAGS}")
@@ -527,8 +544,9 @@ AC_ARG_ENABLE([wlan],
 AM_CONDITIONAL(BUILD_WLAN, test x$want_wlan = xyes)
 if test x$want_wlan = xyes; then
   AC_CHECK_HEADERS([iwlib.h], [], AC_MSG_ERROR([iwlib.h header not found]))
-  AC_CHECK_LIB([iw], [iw_sockets_open], [conky_LIBS="$conky_LIBS -liw"], AC_MSG_ERROR([iw_sockets_open not found]))
-       AC_DEFINE(HAVE_IWLIB, 1, [Define if you want wireless support])
+  AC_CHECK_LIB([iw], [iw_sockets_open], [conky_LIBS="-liw $conky_LIBS"],
+               AC_MSG_ERROR([iw_sockets_open not found]), [$conky_LIBS])
+  AC_DEFINE(HAVE_IWLIB, 1, [Define if you want wireless support])
 fi
 
 dnl
@@ -543,7 +561,7 @@ AC_ARG_ENABLE([portmon],
 if test x"$want_portmon" = xyes; then
   if test x"$uname" != xLinux; then
       AC_MSG_NOTICE([port monitors not supported on $uname... disabling])
-      want_portmon=no
+      want_portmon="not supported on $uname"
   else
         AC_CHECK_FUNCS([getnameinfo], [], AC_MSG_ERROR([getnameinfo function not found]))
         AC_CHECK_HEADERS([netdb.h netinet/in.h netinet/tcp.h sys/socket.h arpa/inet.h], [],
@@ -749,9 +767,6 @@ fi
 if test x$want_alsa = xyes; then
     AC_CHECK_LIB(asound, snd_pcm_open,conky_LIBS="$conky_LIBS -lasound", want_alsa=no)
 fi
-if test x$want_alsa = xyes; then
-AC_DEFINE(MIXER_IS_ALSA, 1, [Define if the mixers use ALSA])
-fi
 dnl
 dnl Some headers
 dnl
@@ -782,7 +797,7 @@ dnl Some functions
 dnl
 
 AC_CHECK_FUNCS([calloc malloc free popen sysinfo getloadavg memrchr strndup gethostbyname_r])
-AC_SEARCH_LIBS(clock_gettime, [rt], conky_LIBS="$conky_LIBS -lrt"
+AC_SEARCH_LIBS(clock_gettime, [rt], conky_LIBS="$conky_LIBS $LIBS"
                [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if you have clock_gettime()])],
                [AC_CHECK_FUNCS([gettimeofday], [], [AC_MSG_ERROR([gettimeofday() not available!])])], [])
 
@@ -902,7 +917,7 @@ AC_ARG_ENABLE([debug],
               [want_debug="$enableval"], [want_debug=no])
 
 if test "x$want_debug" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
-  conky_CFLAGS="$conky_CFLAGS -g3"
+  conky_CFLAGS="$conky_CFLAGS -g3 -O0"
   AC_DEFINE([DEBUG], 1, [Define for debugging])
 fi
 
@@ -919,7 +934,7 @@ if test "x$want_testing" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
     conky_CFLAGS="$conky_CFLAGS -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic -Werror"
     AC_DEFINE([TESTING], [], [Define for testing (enables strict compiler flags)])
   else
-    conky_CFLAGS="$conky_CFLAGS -g3 -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic -Werror"
+    conky_CFLAGS="$conky_CFLAGS -O0 -g3 -Wextra -Wunused -Wdeclaration-after-statement -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition -Winline -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -std=c99 -pedantic -Werror"
     AC_DEFINE([TESTING], [], [Define for testing (enables strict compiler flags)])
   fi
 fi
@@ -965,6 +980,7 @@ $PACKAGE $VERSION configured successfully:
   XDamage support:  $want_xdamage
   XDBE support:     $want_double_buffer
   Xft support:      $want_xft
+  ARGB support      $want_argb
 
  * Music detection:
   Audacious:        $want_audacious
@@ -992,6 +1008,7 @@ dnl  OpenMP:           $want_openmp
   ALSA mixer:       $want_alsa
   apcupsd:          $want_apcupsd
   I/O stats:        $want_iostats
+  ncurses:          $want_ncurses
 
  * Lua ($want_lua) bindings:
   Cairo:            $want_lua_cairo