)
AC_CHECK_LIB([upsclient], [upscli_init],
- [AC_DEFINE([WITH_UPSCLIENT_27], [1], [At least version 2-7])],
- []
+ [AC_DEFINE([HAVE_UPSCLI_INIT], [1], [Define when upscli_init() (since version 2-7) is available.])]
)
LDFLAGS="$SAVE_LDFLAGS"
} /* void nut_submit */
static int nut_connect(nut_ups_t *ups) {
-#ifdef WITH_UPSCLIENT_27
+#if HAVE_UPSCLI_INIT
int status;
int ssl_status;
int ssl_flags;
} /* if (ssl_status == 1 && verify_peer == 1) */
return (0);
-#else /* #ifdef WITH_UPSCLIENT_27 */
+#else /* #if HAVE_UPSCLI_INIT */
int status;
int ssl_status;
int ssl_flags;
ups->upsname, upscli_strerror(ups->conn));
upscli_disconnect(ups->conn);
sfree(ups->conn);
-#ifdef WITH_UPSCLIENT_27
+#if HAVE_UPSCLI_INIT
upscli_cleanup();
#endif
return (-1);
free_nut_ups_t(this);
this = next;
}
-#ifdef WITH_UPSCLIENT_27
+#if HAVE_UPSCLI_INIT
upscli_cleanup();
#endif