[Asterisk-cvs] asterisk Makefile, 1.114.2.8, 1.114.2.9 loader.c, 1.26.2.2, 1.26.2.3

russell russell
Fri Sep 30 22:01:56 CDT 2005


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv24084

Modified Files:
      Tag: v1-0
	Makefile loader.c 
Log Message:
correctly fix build issues on Mac OSX Tiger by using a more generic means
for determining wheter poll and dlfcn functionality needs to be provided


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.114.2.8
retrieving revision 1.114.2.9
diff -u -d -r1.114.2.8 -r1.114.2.9
--- Makefile	13 Jul 2005 18:06:48 -0000	1.114.2.8
+++ Makefile	1 Oct 2005 01:58:20 -0000	1.114.2.9
@@ -214,7 +214,6 @@
 	astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o \
 	utils.o 
 ifeq (${OSARCH},Darwin)
-OBJS+=poll.o dlfcn.o
 ASTLINK=-Wl,-dynamic
 SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
 else
@@ -222,11 +221,19 @@
 SOLINK=-shared -Xlinker -x
 endif
 
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),)
+  OBJS+= poll.o
+  CFLAGS+=-DPOLLCOMPAT
+endif
+
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),)
+  OBJS+= dhfcn.o
+  CFLAGS+=-DDLFCNCOMPAT
+endif
+
 CC=gcc
 INSTALL=install
 
-CFLAGS+=$(shell if uname -r|grep -q 8.2.0 ; then echo " -DOSX10_4 " ; fi)
-
 _all: all
 	@echo " +--------- Asterisk Build Complete ---------+"  
 	@echo " + Asterisk has successfully been built, but +"  

Index: loader.c
===================================================================
RCS file: /usr/cvsroot/asterisk/loader.c,v
retrieving revision 1.26.2.2
retrieving revision 1.26.2.3
diff -u -d -r1.26.2.2 -r1.26.2.3
--- loader.c	27 Dec 2004 22:34:25 -0000	1.26.2.2
+++ loader.c	1 Oct 2005 01:58:20 -0000	1.26.2.3
@@ -27,7 +27,7 @@
 #include <asterisk/enum.h>
 #include <asterisk/rtp.h>
 #include <asterisk/lock.h>
-#ifdef __APPLE__
+#ifdef DLFCNCOMPAT
 #include <asterisk/dlfcn-compat.h>
 #else
 #include <dlfcn.h>




More information about the svn-commits mailing list