[Asterisk-cvs] libpri Makefile,1.9,1.10 pri_q921.h,1.7,1.8 pridump.c,1.1,1.2 pritest.c,1.2,1.3 testprilib.c,1.1,1.2

markster at lists.digium.com markster at lists.digium.com
Sat May 22 00:12:43 CDT 2004


Update of /usr/cvsroot/libpri
In directory mongoose.digium.com:/tmp/cvs-serv16059

Modified Files:
	Makefile pri_q921.h pridump.c pritest.c testprilib.c 
Log Message:
Make build on FreeBSD


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/libpri/Makefile,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Makefile	30 Mar 2004 20:18:12 -0000	1.9
+++ Makefile	22 May 2004 04:25:53 -0000	1.10
@@ -27,6 +27,8 @@
 # Uncomment if you want libpri to count number of Q921/Q931 sent/received
 #LIBPRI_COUNTERS=-DLIBPRI_COUNTERS
 
+OSARCH=$(shell uname -s)
+
 TOBJS=testpri.o
 T2OBJS=testprilib.o
 STATIC_LIBRARY=libpri.a
@@ -35,6 +37,14 @@
 DYNAMIC_OBJS=pri.lo q921.lo prisched.lo q931.lo
 CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g $(ALERTING) $(LIBPRI_COUNTERS)
 INSTALL_PREFIX=
+ifeq (${OSARCH},Linux)
+LDCONFIG_FLAGS=-n
+else
+ifeq (${OSARCH},FreeBSD)
+LDCONFIG_FLAGS=-m
+CFLAGS += -I../zaptel -I../zapata
+endif
+endif
 
 all: depend $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
 
@@ -81,7 +91,7 @@
 
 $(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
 	$(CC) -shared -Wl,-soname,libpri.so.1 -o $@ $(DYNAMIC_OBJS)
-	/sbin/ldconfig -n .
+	/sbin/ldconfig $(LDCONFIG_FLAGS) .
 	ln -sf libpri.so.1 libpri.so
 
 clean:

Index: pri_q921.h
===================================================================
RCS file: /usr/cvsroot/libpri/pri_q921.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- pri_q921.h	11 Apr 2004 01:55:54 -0000	1.7
+++ pri_q921.h	22 May 2004 04:25:53 -0000	1.8
@@ -26,7 +26,11 @@
 #define _PRI_Q921_H
 
 #include <sys/types.h>
+#if defined(__linux__)
 #include <endian.h>
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>
+#endif
 
 /* Timer values */
 

Index: pridump.c
===================================================================
RCS file: /usr/cvsroot/libpri/pridump.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- pridump.c	16 Mar 2002 04:17:53 -0000	1.1
+++ pridump.c	22 May 2004 04:25:53 -0000	1.2
@@ -36,7 +36,12 @@
 #include <string.h>
 #include <sys/ioctl.h>
 #include <sys/select.h>
+#include <sys/types.h>
+#if defined(__linux__)
 #include <linux/zaptel.h>
+#elif defined(__FreeBSD__)
+#include <zaptel.h>
+#endif
 #include "libpri.h"
 #include "pri_q921.h"
 #include "pri_q931.h"

Index: pritest.c
===================================================================
RCS file: /usr/cvsroot/libpri/pritest.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pritest.c	12 Feb 2003 13:59:23 -0000	1.2
+++ pritest.c	22 May 2004 04:25:53 -0000	1.3
@@ -40,7 +40,11 @@
 #include <sys/wait.h>
 #include <sys/resource.h>
 #include <sys/time.h>
+#if defined(__linux__)
 #include <linux/zaptel.h>
+#elif defined(__FreeBSD__)
+#include <zaptel.h>
+#endif
 #include <zap.h>
 #include "libpri.h"
 

Index: testprilib.c
===================================================================
RCS file: /usr/cvsroot/libpri/testprilib.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- testprilib.c	29 Mar 2004 08:09:01 -0000	1.1
+++ testprilib.c	22 May 2004 04:25:53 -0000	1.2
@@ -42,7 +42,11 @@
 #include <sys/time.h>
 #include <netinet/in.h>
 #include <sys/socket.h>
+#if defined(__linux__)
 #include <linux/zaptel.h>
+#elif defined(__FreeBSD__)
+#include <zaptel.h>
+#endif
 #include <zap.h>
 #include <pthread.h>
 #include <sys/select.h>




More information about the svn-commits mailing list