[patch iwhd 1/1] Add 2-legged OAuth message of "Tue, 4 Oct 2011 19:57:37 -0600")
Jim Meyering
jim at meyering.net
Thu Oct 6 13:06:31 UTC 2011
Jim Meyering wrote:
> Thanks again for your OAuth-adding work and the patch.
> Even though your t/poke.c program is "just" for testing,
> I like it a lot and thought it'd be worth spending an hour or so on.
> Some of these changes are mostly cosmetic, but even those
> improve readability, at least for me. Anything that reduces
> complexity and line-count as much as this series does usually
> helps me. It's not all cosmetic, too...
>
> b/rest.c | 12 +++---
> b/t/Makefile.am | 18 +++------
> b/t/oauth | 13 +++---
> b/t/poke.c | 106 ++++++++++++++++++++++-------------------------------
> b/user.c | 9 +---
> t/poke.c | 110 +++++++++++++++++++++++---------------------------------
> 6 files changed, 116 insertions(+), 152 deletions(-)
>
> [PATCH 01/11] use error rather than printf/strerror/exit; const
> [PATCH 02/11] t/Makefile.am: Use automake variables rather than
> [PATCH 03/11] (do_input, input_one): remove unused parameter
> [PATCH 04/11] more const-correctness; ensure that cat never returns
> [PATCH 05/11] more s/fprintf+exit+strerror/error/
> [PATCH 06/11] * t/poke.c (do_input): Don't ignore write failure.
> [PATCH 07/11] save a line; use "sizeof *VAR" rather than
> [PATCH 08/11] t/poke: don't ignore write error to stdout; use
> [PATCH 09/11] simplify user_add
> [PATCH 10/11] t/oauth: prettify
> [PATCH 11/11] avoid NULL-deref on OOM
>
> I realize that handling all of these patches may be a pain,
> i.e., merging with my other Makefile.am changes (I haven't tried),
> but I should be able to add take care of that tomorrow morning.
Turned out to be trivial after all.
Here's the patch I posted last week.
It applies verbatim on top of all of those others:
>From 6b5d26b21e6162a888186799b111857d616d9181 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Thu, 29 Sep 2011 19:01:41 +0200
Subject: [PATCH] add configure-time check for liboauth
* configure.ac (OAUTH_LIB): Check for liboauth.
* Makefile.am (iwhd_LDADD): Use it.
---
Makefile.am | 1 +
configure.ac | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 1a2027b..8163e2f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -156,6 +156,7 @@ iwhd_LDADD = \
$(BOOST_THREAD_LIB) \
$(CURL_LIB) \
$(JANSSON_LIB) \
+ $(OAUTH_LIB) \
$(UHTTPD_LIB) \
$(PTHREAD_LIB) \
$(HAIL_LIBS)
diff --git a/configure.ac b/configure.ac
index 8b115cb..2cd667a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,8 +70,10 @@ AC_CHECK_LIB([uuid], [uuid_generate_random],
[AC_MSG_ERROR([Missing required uuid lib])])
AC_SUBST([UUID_LIB])
-dnl How to check properly?
-LIBS="$LIBS -loauth"
+AC_CHECK_LIB([oauth], [oauth_init_nss],
+ [OAUTH_LIB=-loauth],
+ [AC_MSG_ERROR([Missing required oauth lib])])
+AC_SUBST([OAUTH_LIB])
PKG_CHECK_MODULES([HAIL],[libhail >= 0.8])
AC_SUBST([HAIL_LIBS])
--
1.7.7.rc0.362.g5a14
More information about the iwhd-devel
mailing list