[asterisk-addons-commits] trunk r252 - in /trunk: ./
asterisk-ooh323c/ build_tools/ format_mp3/
asterisk-addons-commits at lists.digium.com
asterisk-addons-commits at lists.digium.com
Sat Jul 1 13:07:57 MST 2006
Author: russell
Date: Sat Jul 1 15:07:56 2006
New Revision: 252
URL: http://svn.digium.com/view/asterisk-addons?rev=252&view=rev
Log:
merge autoconf and menuselect support for asterisk-addons
Added:
trunk/acinclude.m4
- copied unchanged from r251, team/russell_autoconf/acinclude.m4
trunk/aclocal.m4
- copied unchanged from r251, team/russell_autoconf/aclocal.m4
trunk/bootstrap.sh
- copied unchanged from r251, team/russell_autoconf/bootstrap.sh
trunk/build_tools/ (props changed)
- copied from r251, team/russell_autoconf/build_tools/
trunk/build_tools/make_version
- copied unchanged from r251, team/russell_autoconf/build_tools/make_version
trunk/build_tools/menuselect-deps.in
- copied unchanged from r251, team/russell_autoconf/build_tools/menuselect-deps.in
trunk/build_tools/mkdep
- copied unchanged from r251, team/russell_autoconf/build_tools/mkdep
trunk/config.guess
- copied unchanged from r251, team/russell_autoconf/config.guess
trunk/config.sub
- copied unchanged from r251, team/russell_autoconf/config.sub
trunk/configure
- copied unchanged from r251, team/russell_autoconf/configure
trunk/configure.ac
- copied unchanged from r251, team/russell_autoconf/configure.ac
trunk/install-sh
- copied unchanged from r251, team/russell_autoconf/install-sh
trunk/makeopts.in
- copied unchanged from r251, team/russell_autoconf/makeopts.in
trunk/makeopts.xml
- copied unchanged from r251, team/russell_autoconf/makeopts.xml
Removed:
trunk/mkdep
Modified:
trunk/ (props changed)
trunk/Makefile
trunk/app_addon_sql_mysql.c
trunk/asterisk-ooh323c/ (props changed)
trunk/cdr_addon_mysql.c
trunk/format_mp3/ (props changed)
trunk/res_config_mysql.c
Propchange: trunk/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Sat Jul 1 15:07:56 2006
@@ -1,0 +1,2 @@
+menuselect http://svn.digium.com/svn/menuselect/trunk
+mxml http://svn.digium.com/svn/mxml/trunk
Propchange: trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jul 1 15:07:56 2006
@@ -1,1 +1,10 @@
+*.so
+*.o
+makeopts
+config.log
+config.status
+autom4te.cache
+missing
.depend
+menuselect.makeopts
+menuselect.makedeps
Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk-addons/trunk/Makefile?rev=252&r1=251&r2=252&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Sat Jul 1 15:07:56 2006
@@ -1,11 +1,9 @@
#
# Asterisk -- A telephony toolkit for Linux.
#
-# Makefile for CDR backends (dynamically loaded)
+# Makefile for Asterisk-addons
#
-# Copyright (C) 1999, Mark Spencer
-#
-# Mark Spencer <markster at linux-support.net>
+# Copyright (C) 1999-2006, Digium, Inc.
#
# This program is free software, distributed under the terms of
# the GNU General Public License
@@ -13,67 +11,57 @@
.EXPORT_ALL_VARIABLES:
-.PHONY: all install depend samples clean update
+.PHONY: all install depend samples clean update distclean dist-clean menuselect chan_ooh323.so format_mp3.so
-OSARCH=$(shell uname -s)
-OSREV=$(shell uname -r)
-
-#Overwite config files on "make samples"
-OVERWRITE=y
-
-MODS=format_mp3/format_mp3.so app_saycountpl.so
+# Overwite config files on "make samples"
+OVERWRITE:=y
CFLAGS+=-fPIC
-CFLAGS+=-I../asterisk
-CFLAGS+=-D_GNU_SOURCE
-INSTALL=install
-INSTALL_PREFIX=
-ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
+# If the file .asteriskaddons.makeopts is present in your home directory, you can
+# include all of your favorite menuselect options so that every time you download
+# a new version of Asterisk-addons, you don't have to run menuselect to set them.
+# The file /etc/asteriskaddons.makeopts will also be included but can be overridden
+# by the file in your home directory.
+
+GLOBAL_MAKEOPTS=$(wildcard /etc/asteriskaddons.makeopts)
+USER_MAKEOPTS=$(wildcard ~/.asteriskaddons.makeopts)
+
+ifneq ($(wildcard menuselect.makeopts),)
+ include menuselect.makeopts
+ include menuselect.makedeps
+endif
+
+ifneq ($(wildcard makeopts),)
+ include makeopts
+endif
+
+ifeq ($(OSARCH),SunOS)
+ ASTETCDIR=/var/etc/asterisk
+ ASTLIBDIR=/opt/asterisk/lib
+else
+ ASTETCDIR=$(sysconfdir)/asterisk
+ ASTLIBDIR=$(libdir)/asterisk
+endif
MODULES_DIR=$(ASTLIBDIR)/modules
+MODS:=$(sort format_mp3 app_saycountpl res_config_mysql app_addon_sql_mysql cdr_addon_mysql chan_ooh323)
-ifeq ($(OSARCH),FreeBSD)
- # XXX FreeBSD paths
- PREFIX?=/usr/local
- ASTETCDIR=$(INSTALL_PREFIX)$(PREFIX)/etc/asterisk
-else
- ifneq ($(OSARCH),SunOS)
- ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
- else
- ASTETCDIR=$(INSTALL_PREFIX)/etc/opt/asterisk
- endif
-endif # FreeBSD
+SELECTED_MODS:=$(patsubst %,%.so,$(filter-out $(MENUSELECT_ADDONS),$(MODS)))
-
-#
-# MySQL stuff... Autoconf anyone??
-#
-MODS+=$(shell if [ -d /usr/local/mysql/include ] || [ -d /usr/include/mysql ] || [ -d /usr/local/include/mysql ] || [ -d /opt/mysql/include ]; then echo "cdr_addon_mysql.so app_addon_sql_mysql.so res_config_mysql.so"; fi)
-CFLAGS+=$(shell if [ -d /usr/local/mysql/include ]; then echo "-I/usr/local/mysql/include"; fi)
-CFLAGS+=$(shell if [ -d /usr/include/mysql ]; then echo "-I/usr/include/mysql"; fi)
-CFLAGS+=$(shell if [ -d /usr/local/include/mysql ]; then echo "-I/usr/local/include/mysql"; fi)
-CFLAGS+=$(shell if [ -d /opt/mysql/include/mysql ]; then echo "-I/opt/mysql/include/mysql"; fi)
-MLFLAGS=
-MLFLAGS+=$(shell if [ -d /usr/lib/mysql ]; then echo "-L/usr/lib/mysql"; fi)
-MLFLAGS+=$(shell if [ -d /usr/lib64/mysql ]; then echo "-L/usr/lib64/mysql"; fi)
-MLFLAGS+=$(shell if [ -d /usr/local/mysql/lib ]; then echo "-L/usr/local/mysql/lib"; fi)
-MLFLAGS+=$(shell if [ -d /usr/local/lib/mysql ]; then echo "-L/usr/local/lib/mysql"; fi)
-MLFLAGS+=$(shell if [ -d /opt/mysql/lib/mysql ]; then echo "-L/opt/mysql/lib/mysql"; fi)
-
-OSARCH=$(shell uname -s)
-
-ifeq (${OSARCH},Darwin)
+ifeq ($(OSARCH),Darwin)
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
else
SOLINK=-shared -Xlinker -x
endif
-ifeq (${OSARCH},SunOS)
+ifeq ($(OSARCH),SunOS)
SOLINK=-shared -fpic -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
endif
-all: depend $(MODS)
-
+all: config.status menuselect.makeopts
+ @$(MAKE) _all
+
+_all: depend $(SELECTED_MODS)
@echo " +---- Asterisk-Addons Build Complete ----+"
@echo " + +"
@echo " + Addons has successfully been built . +"
@@ -82,12 +70,16 @@
@echo " + $(MAKE) install +"
@echo " +---------------------------------------------+"
-format_mp3/format_mp3.so:
- $(MAKE) -C format_mp3 all
+config.status: configure
+ @CFLAGS="" ./configure
+ @echo "****"
+ @echo "**** The configure script was just executed, so 'make' needs to be"
+ @echo "**** restarted."
+ @echo "****"
+ @exit 1
install: all
- for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
-
+ for x in $(SELECTED_MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
@echo " +---- Asterisk-Addons Installation Complete ----+"
@echo " + +"
@echo " + Addons has successfully been installed. +"
@@ -98,10 +90,26 @@
@echo " + $(MAKE) samples +"
@echo " +-----------------------------------------------+"
+dist-clean: distclean
+
+distclean: clean
+ @$(MAKE) -C mxml clean
+ @$(MAKE) -C menuselect distclean
+ @if [ -f asterisk-ooh323c/Makefile ] ; then \
+ $(MAKE) -C asterisk-ooh323c distclean ; \
+ fi
+ rm -f build_tools/menuselect-deps
+ rm -f menuselect.makeopts makeopts menuselect.makedeps
+ rm -f config.log config.status
+ rm -rf autom4te.cache
clean:
rm -f *.so *.o .depend
- $(MAKE) -C format_mp3 clean
+ @$(MAKE) -C format_mp3 clean
+ @$(MAKE) -C menuselect clean
+ @if [ -f asterisk-ooh323c/Makefile ] ; then \
+ $(MAKE) -C asterisk-ooh323c clean ; \
+ fi
%.so : %.o
$(CC) $(SOLINK) -o $@ $<
@@ -110,19 +118,37 @@
include .depend
endif
+cdr_addon_mysql.o: cdr_addon_mysql.c
+ $(CC) -g -c $(CFLAGS) -o $@ $<
+
cdr_addon_mysql.so: cdr_addon_mysql.o
- $(CC) $(SOLINK) -o $@ $< -lmysqlclient -lz $(MLFLAGS)
+ $(CC) $(SOLINK) -o $@ $< $(MYSQLCLIENT_LIB)
+
+res_config_mysql.o: res_config_mysql.c
+ $(CC) -g -c $(CFLAGS) -o $@ $<
res_config_mysql.so: res_config_mysql.o
- $(CC) $(SOLINK) -o $@ $< -lmysqlclient -lz $(MLFLAGS)
+ $(CC) $(SOLINK) -o $@ $< $(MYSQLCLIENT_LIB)
+
+app_addon_sql_mysql.o: app_addon_sql_mysql.c
+ $(CC) -g -c $(CFLAGS) -o $@ $<
app_addon_sql_mysql.so: app_addon_sql_mysql.o
- $(CC) $(SOLINK) -o $@ $< -lmysqlclient -lz $(MLFLAGS)
+ $(CC) $(SOLINK) -o $@ $< $(MYSQLCLIENT_LIB)
+
+chan_ooh323.so:
+ @if [ ! -f asterisk-ooh323c/Makefile ] ; then \
+ cd asterisk-ooh323c && ./configure ; \
+ fi
+ @$(MAKE) -C asterisk-ooh323c
+
+format_mp3.so:
+ @$(MAKE) -C format_mp3 all
depend: .depend
.depend:
- ./mkdep $(CFLAGS) `ls *.c`
+ build_tools/mkdep $(CFLAGS) $(wildcard *.c)
samples:
mkdir -p $(DESTDIR)$(ASTETCDIR)
@@ -149,3 +175,16 @@
else \
echo "Not under version control"; \
fi
+
+menuselect.makeopts menuselect.makedeps: menuselect/menuselect makeopts.xml
+ @menuselect/menuselect --check-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts
+
+menuselect: menuselect/menuselect makeopts.xml
+ - at menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
+
+menuselect/menuselect: menuselect/menuselect.c menuselect/menuselect_curses.c menuselect/menuselect.h menuselect/linkedlists.h config.status mxml/libmxml.a
+ @CFLAGS="" PARENTSRC="$(PWD)" $(MAKE) -C menuselect menuselect
+
+mxml/libmxml.a:
+ @cd mxml && unset CFLAGS LIBS && test -f config.h || ./configure
+ @$(MAKE) -C mxml libmxml.a
Modified: trunk/app_addon_sql_mysql.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/app_addon_sql_mysql.c?rev=252&r1=251&r2=252&view=diff
==============================================================================
--- trunk/app_addon_sql_mysql.c (original)
+++ trunk/app_addon_sql_mysql.c Sat Jul 1 15:07:56 2006
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <unistd.h>
-#include <mysql.h>
+#include <mysql/mysql.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
Propchange: trunk/asterisk-ooh323c/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Jul 1 15:07:56 2006
@@ -1,0 +1,7 @@
+.deps
+Makefile
+config.status
+libtool
+config.log
+.libs
+stamp-h1
Propchange: trunk/build_tools/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Jul 1 15:07:56 2006
@@ -1,0 +1,1 @@
+menuselect-deps
Modified: trunk/cdr_addon_mysql.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/cdr_addon_mysql.c?rev=252&r1=251&r2=252&view=diff
==============================================================================
--- trunk/cdr_addon_mysql.c (original)
+++ trunk/cdr_addon_mysql.c Sat Jul 1 15:07:56 2006
@@ -37,8 +37,8 @@
#include <unistd.h>
#include <time.h>
-#include <mysql.h>
-#include <errmsg.h>
+#include <mysql/mysql.h>
+#include <mysql/errmsg.h>
#include <sys/stat.h>
#include <sys/types.h>
Propchange: trunk/format_mp3/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Jul 1 15:07:56 2006
@@ -1,0 +1,1 @@
+*.so
Modified: trunk/res_config_mysql.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/res_config_mysql.c?rev=252&r1=251&r2=252&view=diff
==============================================================================
--- trunk/res_config_mysql.c (original)
+++ trunk/res_config_mysql.c Sat Jul 1 15:07:56 2006
@@ -50,9 +50,9 @@
#include <asterisk/utils.h>
#include <stdlib.h>
#include <string.h>
-#include <mysql.h>
-#include <mysql_version.h>
-#include <errmsg.h>
+#include <mysql/mysql.h>
+#include <mysql/mysql_version.h>
+#include <mysql/errmsg.h>
static char *res_config_mysql_desc = "MySQL RealTime Configuration Driver";
More information about the asterisk-addons-commits
mailing list