Index: Makefile =================================================================== RCS file: /usr/cvsroot/asterisk/Makefile,v retrieving revision 1.17 diff -u -r1.17 Makefile --- Makefile 17 Jun 2003 22:30:25 -0000 1.17 +++ Makefile 19 Jun 2003 10:50:00 -0000 @@ -51,6 +51,9 @@ # MALLOC_DEBUG = #-include $(PWD)/include/asterisk/astmm.h +# Do you want ENUM support? +ENUM_SUPPORT = #-DENUM_SUPPORT + # Where to install asterisk after compiling # Default -> leave empty INSTALL_PREFIX= @@ -85,12 +88,14 @@ INCLUDE=-Iinclude -I../include CFLAGS=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY CFLAGS+=$(OPTIMIZE) +CFLAGS+=$(ENUM_SUPPORT) CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) CFLAGS+=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) ifeq (${OSARCH},OpenBSD) CFLAGS+=-pthread endif +#CFLAGS+=-DSLD #CFLAGS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi) LIBEDIT=editline/libedit.a @@ -125,7 +130,8 @@ ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \ cdr.o tdd.o acl.o rtp.o manager.o asterisk.o ast_expr.o \ dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \ - astmm.o enum.o srv.o + astmm.o +OBJS+=enum.o srv.o CC=gcc INSTALL=install Index: asterisk.c =================================================================== RCS file: /usr/cvsroot/asterisk/asterisk.c,v retrieving revision 1.11 diff -u -r1.11 asterisk.c --- asterisk.c 22 May 2003 14:24:06 -0000 1.11 +++ asterisk.c 19 Jun 2003 10:50:03 -0000 @@ -1339,10 +1339,12 @@ printf(term_quit()); exit(1); } +#ifdef ENUM_SUPPORT if (ast_enum_init()) { printf(term_quit()); exit(1); } +#endif /* We might have the option of showing a console, but for now just do nothing... */ if (option_console && !option_verbose) Index: enum.c =================================================================== RCS file: /usr/cvsroot/asterisk/enum.c,v retrieving revision 1.5 diff -u -r1.5 enum.c --- enum.c 12 Jun 2003 12:48:57 -0000 1.5 +++ enum.c 19 Jun 2003 10:50:08 -0000 @@ -11,6 +11,8 @@ * */ +#ifdef ENUM_SUPPORT + #include #include #include @@ -382,3 +384,5 @@ { return ast_enum_init(); } + +#endif /* -DENUM_SUPPORT */ Index: loader.c =================================================================== RCS file: /usr/cvsroot/asterisk/loader.c,v retrieving revision 1.5 diff -u -r1.5 loader.c --- loader.c 16 May 2003 02:50:46 -0000 1.5 +++ loader.c 19 Jun 2003 10:50:10 -0000 @@ -146,7 +146,9 @@ /* We'll do the logger and manager the favor of calling its reload here first */ reload_manager(); +#ifdef ENUM_SUPPORT ast_enum_reload(); +#endif ast_rtp_reload(); time(&ast_lastreloadtime); Index: srv.c =================================================================== RCS file: /usr/cvsroot/asterisk/srv.c,v retrieving revision 1.1 diff -u -r1.1 srv.c --- srv.c 12 Jun 2003 22:14:03 -0000 1.1 +++ srv.c 19 Jun 2003 10:50:23 -0000 @@ -11,6 +11,8 @@ * */ +#ifdef ENUM_SUPPORT + #include #include #include @@ -297,3 +299,5 @@ res_nclose(&srvstate); return ret; } + +#endif /* ifdef ENUM_SUPPORT */ Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.125 diff -u -r1.125 chan_sip.c --- channels/chan_sip.c 18 Jun 2003 22:34:55 -0000 1.125 +++ channels/chan_sip.c 19 Jun 2003 10:50:50 -0000 @@ -664,6 +668,7 @@ portno = atoi(port); else portno = DEFAULT_SIP_PORT; +#ifdef ENUM_SUPPORT if (srvlookup) { char service[256]; int tportno; @@ -675,6 +680,7 @@ portno = tportno; } } +#endif hp = gethostbyname(hostn); if (hp) { strncpy(r->tohost, peer, sizeof(r->tohost) - 1);