-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added pkg-config support #37
Conversation
These are currently pull requests: strophe#30 strophe#37 Once these are merged, and a new release is made, this commit can be reverted.
@@ -60,9 +60,17 @@ fi | |||
|
|||
AC_CHECK_HEADERS([arpa/nameser_compat.h]) | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was taken from
http://git.infradead.org/users/dwmw2/openconnect.git/commitdiff/372bd3daf
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], | ||
[AC_ARG_WITH([pkgconfigdir], | ||
[AS_HELP_STRING([--with-pkgconfigdir], | ||
[install directory for openconnect.pc pkg-config file])], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/openconnect.pc/libstrophe.pc/
09d95a6
to
3bef663
Compare
@pasis, I have made the changes you suggested. At the opportunity, I refactored some of the if/else cruft in configure.ac to use the implicit cases in |
3bef663
to
478d03e
Compare
@@ -63,9 +86,21 @@ fi | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I should also add resolv to Requires:
.
@fabianfreyer, I'll take a look. Meanwhile, some changes required due to my mistake. Linking with libstrophe.so doesn't require any dependency. Dynamic library already has it:
But static library is just an archive with object files and it requires all the depenndecies. So, we need to use fields
This should work in the following way:
Yes, but to |
This means, technically, this would suffice? diff --git a/libstrophe.pc.in b/libstrophe.pc.in
index bee8b7b..ba271c2 100644
--- a/libstrophe.pc.in
+++ b/libstrophe.pc.in
@@ -7,6 +7,8 @@ Name: libstrophe
Description: A simple, lightweight C library for writing XMPP clients
URL: http://strophe.im/libstrophe/
Version: @VERSION@
-Requires: @PC_REQUIRES@
-Libs: -L${libdir} -lstrophe @PC_LIBS@
+Requires:
+Requires.private: @PC_REQUIRES@
+Libs: -L${libdir} -lstrophe
+Libs.private: -L${libdir} -lstrophe @PC_LIBS@
Cflags: -I${includedir} @PC_CFLAGS@ |
Yes, but
|
@pasis: done. Are there any changes to be made to |
Otherwise, I'd rebase this into a single squash commit. |
These are currently pull requests: strophe#30 strophe#37 Once these are merged, and a new release is made, this commit can be reverted.
These are currently pull requests: strophe#30 strophe#37 Once these are merged, and a new release is made, this commit can be reverted.
These are currently pull requests: strophe#30 strophe#37 Once these are merged, and a new release is made, this commit can be reverted.
These are currently pull requests: strophe#30 strophe#37 Once these are merged, and a new release is made, this commit can be reverted.
These are currently pull requests: strophe#30 strophe#37 Once these are merged, and a new release is made, this commit can be reverted.
These are currently pull requests: strophe#30 strophe#37 Once these are merged, and a new release is made, this commit can be reverted.
c96922d
to
671ebda
Compare
I have rebased this into two commits. |
671ebda
to
3231214
Compare
@@ -54,8 +77,8 @@ AC_MSG_NOTICE([libstrophe will use the $with_parser XML parser]) | |||
AC_SEARCH_LIBS([socket], [socket]) | |||
|
|||
if test "x$PLATFORM" != xfreebsd; then | |||
AC_CHECK_LIB([resolv], [res_query], [], | |||
[AC_CHECK_LIB([resolv], [__res_query], [], | |||
AC_CHECK_LIB([resolv], [res_query], [LIBS="-lresolv $LIBS"; PC_LIBS+=(-lresolv)], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move PC_LIBS
out of AC_CHECK_LIB() just to avoid duplication:
if test "x$PLATFORM" != xfreebsd; then
AC_CHECK_LIB()
PC_LIBS+=(-lresolv)
else
Isn't -lresolv
added to LIBS twice in your patch? AC_CHECK_LIB() should add it implicitly.
I left 1 comment. It looks good, but I still need to check it. |
I think
This is with the following
|
@fabianfreyer, could you show files Makefile.am, configure.ac that lead to your problem with libresolv? And please, provide some info:
I can't reproduce this problem on my system with the latest version of your patch. And libstrophe.so is linked with libresolv properly:
|
@pasis this is weird, I can't seem to be able to reproduce this either, on the same systems I was observing this earlier. |
Merged. I've made a minor change, see 057f906. |
This patch adds pkg-config support. This has been tested on OS X and FreeBSD using the expat parser. No tests with the libxml parser have been made.