1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
$NetBSD: patch-aa,v 1.3 2005/09/02 12:58:34 adam Exp $
--- Makefile.orig 2005-04-26 14:30:23.000000000 +0000
+++ Makefile
@@ -42,7 +42,7 @@ MPG123TARG=linux
endif
ifeq ($(findstring BSD,${OSARCH}),BSD)
-PROC=$(shell uname -m)
+PROC=$(shell uname -p)
endif
# Pentium Pro Optimize
@@ -122,6 +122,7 @@ ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
+ASTEXAMPLEDIR=${PREFIX}/share/examples/asterisk
MODULES_DIR=$(ASTLIBDIR)/modules
AGI_DIR=$(ASTVARLIBDIR)/agi-bin
@@ -148,7 +149,7 @@ endif # FreeBSD
ifeq (${OSARCH},NetBSD)
CFLAGS+=-pthread
-INCLUDE+=-I/usr/local/include -I/usr/pkg/include
+INCLUDE+=-I${PREFIX}/include
MPG123TARG=netbsd
endif
@@ -159,8 +160,11 @@ endif
#Uncomment this to use the older DSP routines
#CFLAGS+=-DOLD_DSP_ROUTINES
-CFLAGS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
-CFLAGS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
+#CFLAGS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
+#CFLAGS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
+ifdef ASTERISK_USE_ZAPTEL
+CFLAGS+=-DZAPTEL_OPTIMIZATIONS
+endif
LIBEDIT=editline/libedit.a
@@ -200,7 +204,7 @@ ifeq (${OSARCH},FreeBSD)
LIBS+=-lcrypto
endif
ifeq (${OSARCH},NetBSD)
-LIBS+=-lpthread -lcrypto -lm -L/usr/local/lib -L/usr/pkg/lib -lncurses
+LIBS+=-lpthread -lcrypto -lm -L${PREFIX}/lib -R${PREFIX}/lib -lncurses
endif
ifeq (${OSARCH},OpenBSD)
LIBS=-lcrypto -lpthread -lm -lncurses
@@ -450,29 +454,29 @@ install: all datafiles bininstall
upgrade: all bininstall
adsi: all
- mkdir -p $(DESTDIR)$(ASTETCDIR)
+ mkdir -p $(DESTDIR)$(ASTEXAMPLEDIR)
for x in configs/*.adsi; do \
- if ! [ -f $(DESTDIR)$(ASTETCDIRX)/$$x ]; then \
- install -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \
+ if ! [ -f $(DESTDIR)$(ASTEXAMPLEDIR)/$$x ]; then \
+ install -m 644 $$x $(DESTDIR)$(ASTEXAMPLEDIR)/`basename $$x` ; \
fi ; \
done
samples: all datafiles adsi
- mkdir -p $(DESTDIR)$(ASTETCDIR)
+ mkdir -p $(DESTDIR)$(ASTEXAMPLEDIR)
for x in configs/*.sample; do \
- if [ -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ]; then \
- mv -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample`.old ; \
+ if [ -f $(DESTDIR)$(ASTEXAMPLEDIR)/`basename $$x .sample` ]; then \
+ mv -f $(DESTDIR)$(ASTEXAMPLEDIR)/`basename $$x .sample` $(DESTDIR)$(ASTEXAMPLEDIR)/`basename $$x .sample`.old ; \
fi ; \
- install -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ;\
+ install -m 644 $$x $(DESTDIR)$(ASTEXAMPLEDIR)/`basename $$x .sample` ;\
done
- echo "[directories]" > $(DESTDIR)$(ASTETCDIR)/asterisk.conf
- echo "astetcdir => $(ASTETCDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
- echo "astmoddir => $(MODULES_DIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
- echo "astvarlibdir => $(ASTVARLIBDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
- echo "astagidir => $(AGI_DIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
- echo "astspooldir => $(ASTSPOOLDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
- echo "astrundir => $(ASTVARRUNDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
- echo "astlogdir => $(ASTLOGDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
+ echo "[directories]" > $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
+ echo "astetcdir => $(ASTETCDIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
+ echo "astmoddir => $(MODULES_DIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
+ echo "astvarlibdir => $(ASTVARLIBDIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
+ echo "astagidir => $(AGI_DIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
+ echo "astspooldir => $(ASTSPOOLDIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
+ echo "astrundir => $(ASTVARRUNDIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
+ echo "astlogdir => $(ASTLOGDIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
for x in sounds/demo-*; do \
if grep -q "^%`basename $$x`%" sounds.txt; then \
install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
|