Hi! auth_identity in dev trunk did not compile on my FreeBSD server. By copying this code from the utils/Makefile it did. I don't know who manages auth_identity - but please throw an eye on this and tell me if it's ok to commit?
Now I need to look into why the websocket module doesn't compile either. Something with ssl. Gotta be a solution in some Makefile somewhere.
/O
index f4974b0..3b47648 100644 --- a/modules/auth_identity/Makefile +++ b/modules/auth_identity/Makefile @@ -4,11 +4,24 @@ include ../../Makefile.defs auto_gen= NAME=auth_identity.so
+ifeq ($(CROSS_COMPILE),) +CURL2CFG=$(shell which curl-config) +endif + +ifneq ($(CURL2CFG),) + DEFS += $(shell $(CURL2CFG) --cflags ) + LIBS += $(shell $(CURL2CFG) --libs) +else + DEFS+=-I$(LOCALBASE)/include + LIBS+=-L$(LOCALBASE)/lib -lcurl +endif + + DEFS+= -Wall -I$(LOCALBASE)/ssl/include # # Dynamic linking # -LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto -lcurl +LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto
# # Static linking, if you'd like to use TLS and AUTH_IDENTITY at the same time
Should be good as a first step. There shouldn't be -Wall. The next step would be to check for ssl (similar to tls). If you want, I can push a fix later on, or you can experiment :)
-ovidiu
On Tue, Dec 18, 2012 at 4:14 PM, Olle E. Johansson oej@edvina.net wrote:
Hi! auth_identity in dev trunk did not compile on my FreeBSD server. By copying this code from the utils/Makefile it did. I don't know who manages auth_identity - but please throw an eye on this and tell me if it's ok to commit?
Now I need to look into why the websocket module doesn't compile either. Something with ssl. Gotta be a solution in some Makefile somewhere.
/O
index f4974b0..3b47648 100644 --- a/modules/auth_identity/Makefile +++ b/modules/auth_identity/Makefile @@ -4,11 +4,24 @@ include ../../Makefile.defs auto_gen= NAME=auth_identity.so
+ifeq ($(CROSS_COMPILE),) +CURL2CFG=$(shell which curl-config) +endif
+ifneq ($(CURL2CFG),)
DEFS += $(shell $(CURL2CFG) --cflags )
LIBS += $(shell $(CURL2CFG) --libs)
+else
DEFS+=-I$(LOCALBASE)/include
LIBS+=-L$(LOCALBASE)/lib -lcurl
+endif
DEFS+= -Wall -I$(LOCALBASE)/ssl/include # # Dynamic linking # -LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto -lcurl +LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto
# # Static linking, if you'd like to use TLS and AUTH_IDENTITY at the same time
19 dec 2012 kl. 02:09 skrev Ovidiu Sas osas@voipembedded.com:
Should be good as a first step. There shouldn't be -Wall. The next step would be to check for ssl (similar to tls). If you want, I can push a fix later on, or you can experiment :)
Please go ahead, Ovidiu. I feel more confident with you handling this stuff ;-)
The problem I have with the websocket module seems to be that while the library is installed as part of the system in /usr/lib (not /usr/local/lib) pkg-config doesn't return an answer. Our scripts seems to depend on pkg-config always delivering a proper answer if it exists. I suggest we check if the string returned by pkg-config is empty and if it is, use LOCALBASE only. That works on my FreeBSD system.
Thanks Ovidiu, /O
-ovidiu
On Tue, Dec 18, 2012 at 4:14 PM, Olle E. Johansson oej@edvina.net wrote:
Hi! auth_identity in dev trunk did not compile on my FreeBSD server. By copying this code from the utils/Makefile it did. I don't know who manages auth_identity - but please throw an eye on this and tell me if it's ok to commit?
Now I need to look into why the websocket module doesn't compile either. Something with ssl. Gotta be a solution in some Makefile somewhere.
/O
index f4974b0..3b47648 100644 --- a/modules/auth_identity/Makefile +++ b/modules/auth_identity/Makefile @@ -4,11 +4,24 @@ include ../../Makefile.defs auto_gen= NAME=auth_identity.so
+ifeq ($(CROSS_COMPILE),) +CURL2CFG=$(shell which curl-config) +endif
+ifneq ($(CURL2CFG),)
DEFS += $(shell $(CURL2CFG) --cflags )
LIBS += $(shell $(CURL2CFG) --libs)
+else
DEFS+=-I$(LOCALBASE)/include
LIBS+=-L$(LOCALBASE)/lib -lcurl
+endif
DEFS+= -Wall -I$(LOCALBASE)/ssl/include # # Dynamic linking # -LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto -lcurl +LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto
# # Static linking, if you'd like to use TLS and AUTH_IDENTITY at the same time
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On Wed, Dec 19, 2012 at 1:14 AM, Olle E. Johansson oej@edvina.net wrote:
19 dec 2012 kl. 02:09 skrev Ovidiu Sas osas@voipembedded.com:
Should be good as a first step. There shouldn't be -Wall. The next step would be to check for ssl (similar to tls). If you want, I can push a fix later on, or you can experiment :)
Please go ahead, Ovidiu. I feel more confident with you handling this stuff ;-)
The problem I have with the websocket module seems to be that while the library is installed as part of the system in /usr/lib (not /usr/local/lib) pkg-config doesn't return an answer. Our scripts seems to depend on pkg-config always delivering a proper answer if it exists. I suggest we check if the string returned by pkg-config is empty and if it is, use LOCALBASE only. That works on my FreeBSD system.
A better way is to check the return value of pkg-config. It returns 0 if the package is installed and a non-zero value if it isn't. You can also use the --exists option to check for a specific library version.
Depending on a non-empty string returned by --cflags or --libs is unsafe. Pkg-config may return an empty string if no extra options are needed to compile against a particular library.
-Jan