aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-24 17:11:45 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-24 17:11:45 +0000
commit29f496ef12247a2401d02428fa533020b588f5b6 (patch)
tree170532911902642fdae405ec644509398b0b6ee5 /pbx
parent3cbcc049473cb374710364337d0d415c56133b0e (diff)
Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have autoconf and menuselect tools for Asterisk!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22267 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/Makefile30
-rw-r--r--pbx/pbx_dundi.c5
-rw-r--r--pbx/pbx_gtkconsole.c12
-rw-r--r--pbx/pbx_kdeconsole.cc4
4 files changed, 21 insertions, 30 deletions
diff --git a/pbx/Makefile b/pbx/Makefile
index b32fbcae7..60b965c29 100644
--- a/pbx/Makefile
+++ b/pbx/Makefile
@@ -11,31 +11,12 @@
# the GNU General Public License
#
-MODS:=$(patsubst %.c,%.so,$(wildcard pbx_*.c))
+MODS:=$(filter-out $(MENUSELECT_PBX),$(patsubst %.c,%.so,$(wildcard pbx_*.c)))
-#GTK=$(shell $(CROSS_COMPILE_BIN)gtk-config --cflags >/dev/null 2>/dev/null && echo "OK")
-ifeq (${GTK},)
- MODS:=$(filter-out pbx_gtkconsole.so,$(MODS))
-endif
-
-#KDE=$(shell [ "$$QTDIR" != "" ] && echo "OK")
-ifeq (${GTK},)
- MODS:=$(filter-out pbx_kdeconsole.so,$(MODS))
-endif
-
-GTK_FLAGS=`${CROSS_COMPILE_BIN}gtk-config --cflags gthread`
-GTK_LIBS=`${CROSS_COMPILE_BIN}gtk-config --libs gthread`
MOC=$(QTDIR)/bin/moc
KDE_FLAGS=-I$(KDEDIR)/include -I$(KDEDIR)/include/kde -I$(QTDIR)/include
KDE_LIBS=-L$(KDEDIR)/lib -L$(QTDIR)/lib -lqt -lkdecore -lkdeui
-ifeq (${OSARCH},CYGWIN)
- CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
- CYGSOLIB=-L.. -L. -L../res -lasterisk.dll
-else
- CFLAGS+=-fPIC
-endif
-
KDE_CONSOLE_OBJS=pbx_kdeconsole_main.o pbx_kdeconsole.o
all: depend $(MODS)
@@ -61,14 +42,17 @@ pbx_kdeconsole_main.o: pbx_kdeconsole_main.cc pbx_kdeconsole.h
pbx_kdeconsole.so: $(KDE_CONSOLE_OBJS)
$(CC) $(SOLINK) -o $@ $(KDE_CONSOLE_OBJS) $(KDE_LIBS)
-pbx_dundi.so: dundi-parser.o pbx_dundi.o
- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB}
+pbx_dundi.so: pbx_dundi.o dundi-parser.o
+ $(CC) $(SOLINK) -o $@ $< dundi-parser.o $(Z_LIB)
+
+pbx_dundi.o: pbx_dundi.c
+ $(CC) -c -o $@ $(CFLAGS) $(Z_INCLUDE) $<
%.moc : %.h
$(MOC) $< -o $@
%.so : %.o
- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
+ $(CC) $(SOLINK) -o $@ $<
ifneq ($(wildcard .depend),)
include .depend
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 88fa3d7d1..ab9ba94db 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -22,6 +22,10 @@
*
*/
+/*** MODULEINFO
+ <depend>zlib</depend>
+ ***/
+
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
@@ -4720,3 +4724,4 @@ static const char *key(void)
}
STD_MOD(MOD_1 | NO_USECOUNT | NO_UNLOAD, reload, NULL, NULL);
+
diff --git a/pbx/pbx_gtkconsole.c b/pbx/pbx_gtkconsole.c
index 4547c94c3..787bd46e3 100644
--- a/pbx/pbx_gtkconsole.c
+++ b/pbx/pbx_gtkconsole.c
@@ -22,13 +22,10 @@
*
*/
-/*
- * I know this might seem somewhat pointless in its current phase, but one
- * of the most important parts of this module is demonstrate that modules
- * can require other external libraries and still be loaded (in this
- * case, a host of libraries involving gtk), so long as they are properly
- * linked (see the Makefile)
- */
+/*** MODULEINFO
+ <depend>gtk</depend>
+ <defaultenabled>no</defaultenabled>
+ ***/
#include <sys/types.h>
#include <stdlib.h>
@@ -516,3 +513,4 @@ const char *key(void)
{
return ASTERISK_GPL_KEY;
}
+
diff --git a/pbx/pbx_kdeconsole.cc b/pbx/pbx_kdeconsole.cc
index 6c2817366..10a3f289f 100644
--- a/pbx/pbx_kdeconsole.cc
+++ b/pbx/pbx_kdeconsole.cc
@@ -11,6 +11,10 @@
* the GNU General Public License
*/
+/*** MODULEINFO
+ <depend>qt</depend>
+ ***/
+
#include "pbx_kdeconsole.moc"
KAsteriskConsole::KAsteriskConsole() : KTMainWindow()