diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-22 17:42:14 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-22 17:42:14 +0000 |
commit | ae5c80e1deeae11fa0f3478a6efa03e38971897f (patch) | |
tree | a3a0875ae4e73c9d9a1fc67f56ffa1ce73fe5457 /channels/h323 | |
parent | 8f813d432c685f0b0c25e98261379b083263cf32 (diff) |
Merge major BSD mutex and symbol conflict patches (bug #1816) (link patch still pending)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3273 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323')
-rwxr-xr-x | channels/h323/INSTALL.openh323 | 10 | ||||
-rwxr-xr-x | channels/h323/Makefile | 27 |
2 files changed, 30 insertions, 7 deletions
diff --git a/channels/h323/INSTALL.openh323 b/channels/h323/INSTALL.openh323 index 426e76701..f46c37905 100755 --- a/channels/h323/INSTALL.openh323 +++ b/channels/h323/INSTALL.openh323 @@ -6,3 +6,13 @@ You only need to do 'make opt'. Anything else you will be simply waisting time a Also, you will notice they never tell you to 'make install' so don't do it. +On FreeBSD, the Makefiles are configured to +locate the compiled openh323 port, if it has +been built. Here is one way to build +openh323 and ptlib on such that the Makefiles +find it: + # cd /usr/ports/net/openh323 + # make +It is not necessary to install the port. The +asterisk makefiles do not use any files +installed by the port. diff --git a/channels/h323/Makefile b/channels/h323/Makefile index 56cd61974..fa9c8ea11 100755 --- a/channels/h323/Makefile +++ b/channels/h323/Makefile @@ -19,8 +19,15 @@ endif # # This needs to be updated to deal with more than just little endian machines # -CFLAGS += -march=$(shell uname -m) -DPBYTE_ORDER=PLITTLE_ENDIAN +OSARCH=$(shell uname -s) +ifneq (${OSARCH},FreeBSD) +CFLAGS += -march=$(shell uname -m) +endif +CFLAGS += -DPBYTE_ORDER=PLITTLE_ENDIAN +ifeq (${OSARCH},Linux) +LDLIBS+=-ldl +endif ############################################# # @@ -38,16 +45,22 @@ CFLAGS += -march=$(shell uname -m) -DPBYTE_ORDER=PLITTLE_ENDIAN # Pre Janus release directives CFLAGS += -DNDEBUG -DDO_CRASH -DDEBUG_THREADS -CFLAGS += -pipe -Wall -fPIC -Wmissing-prototypes -Wmissing-declarations +CFLAGS += -pipe -Wall -fPIC ifeq (${OSARCH},Linux) CFLAGS += -DP_LINUX +LIBS+=-lpthread +endif +ifeq ($(findstring BSD,${OSARCH}),BSD) +CFLAGS += -pthread endif CFLAGS += -D_REENTRANT -D_GNU_SOURCE CFLAGS += -DP_HAS_SEMAPHORES -DP_SSL -DP_PTHREADS CFLAGS += -DPHAS_TEMPLATES -DPTRACING -DP_USE_PRAGMA CFLAGS += -I../../include CFLAGS += -I$(PWLIBDIR)/include/ptlib/unix -I$(PWLIBDIR)/include -CFLAGS += -I$(OPENH323DIR)/include -Wno-missing-prototypes -Wno-missing-declarations +CFLAGS += -I$(OPENH323DIR)/include +CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations +LIBS+= -lcrypto -lssl -lexpat all: libchanh323.a @@ -59,19 +72,19 @@ samples: ast_h323.o: ast_h323.cpp - g++ -g -c -fno-rtti -o $@ $(CFLAGS) $< + $(CXX) -g -c -fno-rtti -o $@ $(CFLAGS) $< libchanh323.a: ast_h323.o ar cr libchanh323.a ast_h323.o chan_h323.so: - g++ -g -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_linux_x86_r -L$(OPENH323DIR)/lib -lh323_linux_x86_r -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat + $(CXX) -g -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_linux_x86_r -L$(OPENH323DIR)/lib -lh323_linux_x86_r -L/usr/lib $(CHANH323LIB) chan_h323_d.so: chan_h323.o ast_h323.o - g++ -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_linux_x86_d -L$(OPENH323DIR)/lib -lh323_linux_x86_d -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat + $(CXX) -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_linux_x86_d -L$(OPENH323DIR)/lib -lh323_linux_x86_d -L/usr/lib $(CHANH323LIB) chan_h323_s.so: chan_h323.o ast_h323.o - g++ -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_linux_x86_r_s -L$(OPENH323DIR)/lib -lh323_linux_x86_r_s -L/usr/lib -lpthread -ldl -lcrypto -lssl -lexpat + $(CXX) -shared -Xlinker -x -o chan_h323.so chan_h323.o ast_h323.o -L$(PWLIBDIR)/lib -lpt_linux_x86_r_s -L$(OPENH323DIR)/lib -lh323_linux_x86_r_s -L/usr/lib $(CHANH323LIB) clean: rm -f *.o *.so core.* libchanh323.a |