[Asterisk-Dev] FreeBSD

Jared Mauch jared at puck.Nether.net
Sat Oct 4 08:05:10 MST 2003


	This should do it for you:

cvs server: Diffing .
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.33
diff -u -r1.33 Makefile
--- Makefile    27 Sep 2003 15:52:17 -0000      1.33
+++ Makefile    4 Oct 2003 15:30:03 -0000
@@ -130,8 +130,14 @@
 SUBDIRS=res channels pbx apps codecs formats agi cdr astman
 ifeq (${OSARCH},Linux)
 LIBS=-ldl
+LIBS+=-lpthread
 endif
-LIBS+=-lpthread -lncurses -lm -lresolv  #-lnjamd
+ifeq (${OSARCH},FreeBSD)
+CFLAGS+=-pthread
+endif
+# Not needed on FreeBSD
+#LIBS+=-lresolv
+LIBS+=-lncurses -lm #-lnjamd
 OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
        translate.o file.o say.o pbx.o cli.o md5.o term.o \
        ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
@@ -204,7 +210,7 @@
        fi
 
 asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
-       $(CC) $(DEBUG) -o asterisk -Wl,-E $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a
+       $(CC) $(CFLAGS) $(DEBUG) -o asterisk -Wl,-E $(OBJS) $(LIBS) $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a
 
 subdirs: 
        for x in $(SUBDIRS); do $(MAKE) -C $$x || exit 1 ; done


On Sat, Oct 04, 2003 at 10:56:19AM -0400, Jared Mauch wrote:
> On Sat, Oct 04, 2003 at 04:42:13PM +0200, Magnus Benngard wrote:
> > On Sat, 2003-10-04 at 16:46, Jared Mauch wrote:
> > > On Sat, Oct 04, 2003 at 04:26:38PM +0200, Magnus Benngard wrote:
> > > > On Sat, 2003-10-04 at 16:24, Jared Mauch wrote:
> > > > > On Sat, Oct 04, 2003 at 03:24:14PM +0200, Magnus Benngard wrote:
> > > > > > Hi!
> > > > > > 
> > > > > > I am pretty intrested in using Asterisk in a project I am
> > > > > > involved in:
> > > > > > I have been reading that people has managed to compile
> > > > > > under FreeBSD. Are those patches applied? Do not think so.
> > > > > > I am planning to spend some time with Asterisk and 
> > > > > > FreeBSD... Should I send the patches somewhere
> > > > > > Which formt do u prefer?
> > > > > 
> > > > > 	It *should* compile just fine, the only caveat is that
> > > > > currently the Makefiles require gnu make, which is not the default
> > > > > on FreeBSD.
> > > > 
> > > > Fresh cvs, did not compile att all :(
> > > > Will start to see if I can get it to do so. :)
> > > 
> > > 	you're using gnu make, correct?
> > 
> > YES!
> 
> 	what error are you getting?
> 
> 	I'm still solving my conflicts from my makefile
> tweaks to get to latest cvs..
> 
> 	you probally want this one makefile hack and other source
> cleanup:
> 
> Index: codecs/lpc10/Makefile
> ===================================================================
> RCS file: /usr/cvsroot/asterisk/codecs/lpc10/Makefile,v
> retrieving revision 1.3
> diff -u -r1.3 Makefile
> --- codecs/lpc10/Makefile       27 Apr 2003 18:13:11 -0000      1.3
> +++ codecs/lpc10/Makefile       4 Oct 2003 15:20:55 -0000
> @@ -25,6 +25,8 @@
>  CFLAGS = $(OPTIMIZE) -I$(LIB_TARGET_DIR) $(WARNINGS) -fPIC
>  #CFLAGS+= $(shell if uname -m | grep -q 86; then echo "-mpentium" ; fi)
>  
> +PROC=i386
> +
>  #fix for PPC processors
>  ifneq ($(PROC),ppc)
>         CFLAGS+= -march=$(PROC)
> cvs server: Diffing codecs/mp3
> cvs server: Diffing codecs/mp3/include
> Index: codecs/mp3/include/L3.h
> ===================================================================
> RCS file: /usr/cvsroot/asterisk/codecs/mp3/include/L3.h,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 L3.h
> --- codecs/mp3/include/L3.h     12 Feb 2003 13:59:14 -0000      1.1.1.1
> +++ codecs/mp3/include/L3.h     4 Oct 2003 15:20:55 -0000
> @@ -37,6 +37,10 @@
>  /* #define GLOBAL_GAIN_SCALE 0 */
>  
>  
> +#if defined(i386)
> +#define _M_IX86
> +#endif /* i386 */
> +
>  #ifdef _M_IX86
>  #define LITTLE_ENDIAN 1
>  #endif
> 
> 
> 	- jared
> 
> > > 	i've not checked out the latest cvs on FreeBSD recently,
> > > let me do some quick tests..
> > 
> > I am running: FreeBSD dns.g.port80.se 4.8-STABLE, should upgrade
> > to 4.9 anyday, can do it today!
> 
> -- 
> Jared Mauch  | pgp key available via finger from jared at puck.nether.net
> clue++;      | http://puck.nether.net/~jared/  My statements are only mine.
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev

-- 
Jared Mauch  | pgp key available via finger from jared at puck.nether.net
clue++;      | http://puck.nether.net/~jared/  My statements are only mine.



More information about the asterisk-dev mailing list