chunkd: Make AC_CHECK_LIB failure for libevent explicit
PATCH 1/1 chunkd: Make AC_CHECK_LIB failure for libevent explicit
When libevent headers were missing, configure would complete with an exit code of 1, but no clear message as to what failed. This patch makes things more clear as to why configure is exiting. It could be extended to include information about needing libevent headers or development libraries.
--- configure.ac | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
configure.ac +2 -1
@@ -74,7 +74,8 @@ dnl Checks for required libraries dnl ----------------------------- AC_CHECK_LIB(crypto, MD5_Init, CRYPTO_LIBS=-lcrypto) AC_CHECK_LIB(ssl, SSL_new, SSL_LIBS=-lssl) -AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent, exit 1) +AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent, + [AC_MSG_ERROR([Missing required libevent])]) AC_CHECK_LIB(argp, argp_parse, ARGP_LIBS=-largp) AC_CHECK_LIB(socket, bind, SOCKET_LIBS=-lsocket) PKG_CHECK_MODULES(CLDC, libcldc)
Signature · 1 line
1.6.0.6
Jeff Garzik
AppliedQuoted 10 lines · Matthew Farrellee
When libevent headers were missing, configure would complete with an exit code of 1, but no clear message as to what failed. This patch makes things more clear as to why configure is exiting. It could be extended to include information about needing libevent headers or development libraries.
Signed-off-by Matthew Farrellee <[email protected]>--- configure.ac | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
applied
Quoted 16 lines · Matthew Farrellee
When libevent headers were missing, configure would complete with an exit code of 1, but no clear message as to what failed. This patch makes things more clear as to why configure is exiting. It could be extended to include information about needing libevent headers or development libraries.
Signed-off-by Matthew Farrellee <[email protected]>--- configure.ac | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)configure.ac +0
-0
configure.ac dnl Checks for required libraries · line 81
Quoted 9 lines
configure.ac +2
-1@@ -74,7 +74,8 @@ dnl Checks for required libraries dnl ----------------------------- AC_CHECK_LIB(crypto, MD5_Init, CRYPTO_LIBS=-lcrypto) AC_CHECK_LIB(ssl, SSL_new, SSL_LIBS=-lssl) -AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent, exit 1) +AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent, + [AC_MSG_ERROR([Missing required libevent])]) AC_CHECK_LIB(argp, argp_parse, ARGP_LIBS=-largp) AC_CHECK_LIB(socket, bind, SOCKET_LIBS=-lsocket) PKG_CHECK_MODULES(CLDC, libcldc)
ditto for tabled?
PATCH 1/1 configure.ac reports errors instead of exiting quietly
For each place that configure could "exit 1" it now AC_MSG_ERROR's with a useful message.
--- configure.ac | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
configure.ac +8 -4
@@ -80,8 +80,10 @@ AC_CHECK_LIB(db-4.7, db_create, DB4_LIBS=-ldb-4.7, AC_CHECK_LIB(db-4.6, db_create, DB4_LIBS=-ldb-4.6, AC_CHECK_LIB(db-4.5, db_create, DB4_LIBS=-ldb-4.5, AC_CHECK_LIB(db-4.4, db_create, DB4_LIBS=-ldb-4.4, - AC_CHECK_LIB(db-4.3, db_create, DB4_LIBS=-ldb-4.3, exit 1))))) -AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent, exit 1) + AC_CHECK_LIB(db-4.3, db_create, DB4_LIBS=-ldb-4.3, + [AC_MSG_ERROR([Missing required libdb 4.x])]))))) +AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent, + [AC_MSG_ERROR([Missing required libevent])]) AC_CHECK_LIB(argp, argp_parse, ARGP_LIBS=-largp) PKG_CHECK_MODULES(CHUNKDC, libchunkdc) PKG_CHECK_MODULES(CLDC, libcldc)
@@ -99,8 +101,10 @@ dnl autoconf output generation dnl -------------------------- AM_PATH_GLIB_2_0(2.0.0) -AM_PATH_XML2(2.6.0, , exit 1) -LIBCURL_CHECK_CONFIG(, 7.10.1, , exit 1) +AM_PATH_XML2(2.6.0, , + [AC_MSG_ERROR([Missing required XML2 >= 2.6.0])]]) +LIBCURL_CHECK_CONFIG(, 7.10.1, , + [AC_MSG_ERROR([Missing required libcurl >= 7.10.1])]) AC_SUBST(PCRE_LIBS) AC_SUBST(CRYPTO_LIBS)
Signature · 1 line
1.6.0.6
Re: [PATCH] configure.ac reports errors instead of exiting quietly
Quoted 26 lines · Matthew Farrellee
For each place that configure could "exit 1" it now AC_MSG_ERROR's with a useful message.
Signed-off-by Matthew Farrellee <[email protected]>--- configure.ac | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)configure.ac +4
-2@@ -80,8 +80,10 @@ AC_CHECK_LIB(db-4.7, db_create, DB4_LIBS=-ldb-4.7, AC_CHECK_LIB(db-4.6, db_create, DB4_LIBS=-ldb-4.6, AC_CHECK_LIB(db-4.5, db_create, DB4_LIBS=-ldb-4.5, AC_CHECK_LIB(db-4.4, db_create, DB4_LIBS=-ldb-4.4, - AC_CHECK_LIB(db-4.3, db_create, DB4_LIBS=-ldb-4.3, exit 1))))) -AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent, exit 1) + AC_CHECK_LIB(db-4.3, db_create, DB4_LIBS=-ldb-4.3, + [AC_MSG_ERROR([Missing required libdb 4.x])]))))) +AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent, + [AC_MSG_ERROR([Missing required libevent])]) AC_CHECK_LIB(argp, argp_parse, ARGP_LIBS=-largp) PKG_CHECK_MODULES(CHUNKDC, libchunkdc) PKG_CHECK_MODULES(CLDC, libcldc)
configure.ac dnl autoconf output generation · line 107
Quoted 9 lines
configure.ac +4
-2@@ -99,8 +101,10 @@ dnl autoconf output generation dnl -------------------------- AM_PATH_GLIB_2_0(2.0.0) -AM_PATH_XML2(2.6.0, , exit 1) -LIBCURL_CHECK_CONFIG(, 7.10.1, , exit 1) +AM_PATH_XML2(2.6.0, , + [AC_MSG_ERROR([Missing required XML2 >= 2.6.0])]]) +LIBCURL_CHECK_CONFIG(, 7.10.1, , + [AC_MSG_ERROR([Missing required libcurl >= 7.10.1])])
Not applied. This fails to build, at the "./autogen.sh && ./configure" stage on Fedora 10:
[...]
checking pkg-config is at least version 0.9.0... yes
checking for pcre_compile in -lpcre... yes
checking for MD5_Init in -lcrypto... yes
checking for SSL_new in -lssl... yes
checking for db_create in -ldb-4.7... yes
checking for event_base_new in -levent... yes
checking for argp_parse in -largp... no
checking for CHUNKDC... yes
checking for CLDC... yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.16... yes
checking for GLIB - version >= 2.0.0... yes (version 2.18.4)
checking for xml2-config... /usr/bin/xml2-config
checking for libxml - version >= 2.6.0... ./configure: line 21878: syntax error near unexpected token fi' ./configure: line 21878: fi'
Re: [PATCH] configure.ac reports errors instead of exiting quietly
Quoted 49 lines · Jeff Garzik
Quoted 26 lines · Matthew Farrellee
For each place that configure could "exit 1" it now AC_MSG_ERROR's with a useful message.
Signed-off-by Matthew Farrellee <[email protected]>--- configure.ac | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)configure.ac +4
-2@@ -80,8 +80,10 @@ AC_CHECK_LIB(db-4.7, db_create, DB4_LIBS=-ldb-4.7, AC_CHECK_LIB(db-4.6, db_create, DB4_LIBS=-ldb-4.6, AC_CHECK_LIB(db-4.5, db_create, DB4_LIBS=-ldb-4.5, AC_CHECK_LIB(db-4.4, db_create, DB4_LIBS=-ldb-4.4, - AC_CHECK_LIB(db-4.3, db_create, DB4_LIBS=-ldb-4.3, exit 1))))) -AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent, exit 1) + AC_CHECK_LIB(db-4.3, db_create, DB4_LIBS=-ldb-4.3, + [AC_MSG_ERROR([Missing required libdb 4.x])]))))) +AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent, + [AC_MSG_ERROR([Missing required libevent])]) AC_CHECK_LIB(argp, argp_parse, ARGP_LIBS=-largp) PKG_CHECK_MODULES(CHUNKDC, libchunkdc) PKG_CHECK_MODULES(CLDC, libcldc)configure.ac dnl autoconf output generation · line 107
Quoted 9 lines
configure.ac +4
-2@@ -99,8 +101,10 @@ dnl autoconf output generation dnl -------------------------- AM_PATH_GLIB_2_0(2.0.0) -AM_PATH_XML2(2.6.0, , exit 1) -LIBCURL_CHECK_CONFIG(, 7.10.1, , exit 1) +AM_PATH_XML2(2.6.0, , + [AC_MSG_ERROR([Missing required XML2 >= 2.6.0])]]) +LIBCURL_CHECK_CONFIG(, 7.10.1, , + [AC_MSG_ERROR([Missing required libcurl >= 7.10.1])])Not applied. This fails to build, at the "./autogen.sh && ./configure" stage on Fedora 10:
[...]
checking pkg-config is at least version 0.9.0... yes checking forpcre_compilein -lpcre... yes checking forMD5_Initin -lcrypto... yes checking forSSL_newin -lssl... yes checking fordb_createin -ldb-4.7... yes checking forevent_base_newin -levent... yes checking forargp_parsein -largp... no checking for CHUNKDC... yes
Quoted 9 lines
checking for CLDC... yes
checking for pkg-config... (cached)/usr/bin/pkg-configchecking pkg-config is at least version 0.16... yes checking for GLIB - version >= 2.0.0... yes (version 2.18.4) checking for xml2-config.../usr/bin/xml2-configchecking for libxml - version >= 2.6.0... ./configure: line 21878:
syntax error near unexpected token `fi'
./configure: line 21878: ` fi'
Weird. There's an extra ] on the XML2 line.
])]]) should be ])])
Don't ask me how it got there. I need to figure out how to use git-send-imap to populate my local thunderbird Drafts box so I can avoid hand importing git-format-patch output.
Best,
matt
Re: [PATCH] configure.ac reports errors instead of exiting quietly
In reply to Matthew FarrelleeQuoted 7 lines · Matthew Farrellee
For each place that configure could "exit 1" it now AC_MSG_ERROR's with a useful message.
Signed-off-by Matthew Farrellee <[email protected]>--- configure.ac | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
applied manually, sorry for the delay