merge ibm-acpi and smapi together
authorPhil Sutter <phil@nwl.cc>
Sat, 3 Jan 2009 23:25:15 +0000 (00:25 +0100)
committerPhil Sutter <phil@nwl.cc>
Sun, 22 Feb 2009 01:58:42 +0000 (02:58 +0100)
Well, not really. I don't dare putting it all together into a single
source file, as that would just not make sense. Instead, this patch
eliminates the --enable-smapi configure option and all related checks,
replacing them with the equivalents from --enable-ibm.

ChangeLog
configure.ac.in
src/Makefile.am
src/conky.c
src/conky.h
src/text_object.h

index e0776ca..290e4f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
        sohalt).
 
 2009-01-04
+       * Drop --enable-smapi and use --enable-ibm instead
        * Make ibm-acpi objects optional (--enable-ibm)
 
 2008-12-20
index 84e460d..e0eee7d 100644 (file)
@@ -303,19 +303,6 @@ if test x$want_rss = xyes; then
 fi
 
 dnl
-dnl SMAPI
-dnl
-
-AC_ARG_ENABLE([smapi],
-             AC_HELP_STRING([--enable-smapi], [enable if you want smapi support @<:@default=no@:>@]),
-             [want_smapi="$enableval"], [want_smapi=no])
-
-AM_CONDITIONAL(BUILD_SMAPI, test x$want_smapi = xyes)
-if test x$want_smapi = xyes; then
-       AC_DEFINE(SMAPI, 1, [Define if you want smapi support])
-fi
-
-dnl
 dnl Wireless extensions
 dnl
 
@@ -741,7 +728,6 @@ $PACKAGE $VERSION configured successfully:
   portmon:          $want_portmon
   RSS:              $want_rss
   wireless:         $want_wlan
-  SMAPI:            $want_smapi
   IBM:              $want_ibm
   nvidia:           $want_nvidia
   eve-online:       $want_eve
index 058e473..93d3ec3 100644 (file)
@@ -48,7 +48,7 @@ bmpx = bmpx.c
 endif
 
 if BUILD_IBM
-ibm = ibm.c ibm.h
+ibm = ibm.c ibm.h smapi.c smapi.h
 endif
 
 if BUILD_MPD
@@ -107,10 +107,6 @@ if BUILD_RSS
 rss = rss.c prss.c prss.h
 endif
 
-if BUILD_SMAPI
-smapi = smapi.c smapi.h
-endif
-
 if BUILD_NVIDIA
 nvidia = nvidia.c nvidia.h
 endif
@@ -145,7 +141,6 @@ conky_SOURCES =             \
        mboxscan.h              \
        $(x11)                  \
        $(xmms2)                \
-       $(smapi)                \
        $(ibm)                  \
        temphelper.c            \
        temphelper.h            \
index e617e48..cbcd073 100644 (file)
@@ -205,9 +205,9 @@ static void print_version(void)
 #ifdef HAVE_IWLIB
                   "  * wireless\n"
 #endif /* HAVE_IWLIB */
-#ifdef SMAPI
-       "  * smapi\n"
-#endif /* SMAPI */
+#ifdef IBM
+       "  * support for IBM/Lenovo notebooks\n"
+#endif /* IBM */
 #ifdef NVIDIA
        "  * nvidia\n"
 #endif
@@ -1506,7 +1506,7 @@ static void free_text_objects(struct text_object *root)
                                        info.users.times = 0;
                                }
                                break;
-#ifdef SMAPI
+#ifdef IBM
                        case OBJ_smapi:
                        case OBJ_smapi_bat_perc:
                        case OBJ_smapi_bat_temp:
@@ -3032,7 +3032,7 @@ static struct text_object *construct_text_object(const char *s,
                } else {
                        obj->global_mode = 1;
                }
-#ifdef SMAPI
+#ifdef IBM
        END OBJ(smapi, 0)
                if (arg)
                        obj->data.s = strndup(arg, text_buffer_size);
@@ -3071,7 +3071,7 @@ static struct text_object *construct_text_object(const char *s,
                        }
                } else
                        ERR("smapi_bat_bar needs an argument");
-#endif /* SMAPI */
+#endif /* IBM */
 #ifdef MPD
 #define mpd_set_maxlen(name) \
                if (arg) { \
@@ -5642,7 +5642,7 @@ head:
                                        (double) cur->entropy.poolsize;
                                new_bar(p, obj->a, obj->b, (int) (entropy_perc * 255.0f));
                        }
-#ifdef SMAPI
+#ifdef IBM
                        OBJ(smapi) {
                                char *s;
                                if(obj->data.s) {
@@ -5696,7 +5696,7 @@ head:
                                else
                                        new_bar(p, obj->a, obj->b, 0);
                        }
-#endif /* SMAPI */
+#endif /* IBM */
                        OBJ(scroll) {
                                unsigned int j;
                                char *tmp, buf[max_user_text];
index 274e837..2010f8e 100644 (file)
@@ -90,10 +90,6 @@ char *strndup(const char *s, size_t n);
 #include "rss.h"
 #endif
 
-#ifdef SMAPI
-#include "smapi.h"
-#endif
-
 #ifdef TCP_PORT_MONITOR
 #include "tcp-portmon.h"
 #endif
@@ -104,6 +100,7 @@ char *strndup(const char *s, size_t n);
 
 #ifdef IBM
 #include "ibm.h"
+#include "smapi.h"
 #endif
 
 /* A size for temporary, static buffers to use when
@@ -177,7 +174,7 @@ enum {
 #ifdef RSS
        INFO_RSS = 24,
 #endif
-#ifdef SMAPI
+#ifdef IBM
        INFO_SMAPI = 25,
 #endif
        INFO_USERS = 26,
index 8b61104..d87f597 100644 (file)
@@ -137,6 +137,12 @@ enum text_object_type {
        OBJ_ibm_temps,
        OBJ_ibm_volume,
        OBJ_ibm_brightness,
+       OBJ_smapi,
+       OBJ_smapi_bat_bar,
+       OBJ_smapi_bat_perc,
+       OBJ_smapi_bat_temp,
+       OBJ_smapi_bat_power,
+       OBJ_if_smapi_bat_installed,
 #endif /* IBM */
        OBJ_if_up,
        OBJ_if_gw,
@@ -352,14 +358,6 @@ enum text_object_type {
 #ifdef HDDTEMP
        OBJ_hddtemp,
 #endif
-#ifdef SMAPI
-       OBJ_smapi,
-       OBJ_smapi_bat_bar,
-       OBJ_smapi_bat_perc,
-       OBJ_smapi_bat_temp,
-       OBJ_smapi_bat_power,
-       OBJ_if_smapi_bat_installed,
-#endif
        OBJ_scroll,
        OBJ_entropy_avail,
        OBJ_entropy_poolsize,