[asterisk-commits] branch group/autoconf_and_menuselect r11038 - in /team/group/autoconf_and_men...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Feb 24 13:40:12 MST 2006


Author: russell
Date: Fri Feb 24 14:40:08 2006
New Revision: 11038

URL: http://svn.digium.com/view/asterisk?rev=11038&view=rev
Log:
instead of checking for the presence of headers in Makefiles, use the information
provided by configure

Added:
    team/group/autoconf_and_menuselect/include/asterisk/smdi.h   (with props)
Modified:
    team/group/autoconf_and_menuselect/apps/Makefile
    team/group/autoconf_and_menuselect/cdr/Makefile
    team/group/autoconf_and_menuselect/channels/Makefile
    team/group/autoconf_and_menuselect/formats/Makefile
    team/group/autoconf_and_menuselect/pbx/Makefile
    team/group/autoconf_and_menuselect/res/Makefile
    team/group/autoconf_and_menuselect/utils/Makefile

Modified: team/group/autoconf_and_menuselect/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/Makefile?rev=11038&r1=11037&r2=11038&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/Makefile (original)
+++ team/group/autoconf_and_menuselect/apps/Makefile Fri Feb 24 14:40:08 2006
@@ -20,17 +20,16 @@
 #
 MODS:=$(filter-out app_ivrdemo.so,$(MODS))
 MODS:=$(filter-out app_skel.so,$(MODS))
-MODS:=$(filter-out app_rpt.so,$(MODS))
 
 ifndef WITHOUT_ZAPTEL
-ZAPAVAIL:=$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)
+ZAPAVAIL:=$(ZAPTEL)
 endif
 
-ifeq (${ZAPAVAIL},)
-  MODS:=$(filter-out app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so app_page.so,$(MODS))
+ifneq (${ZAPAVAIL},1)
+  MODS:=$(filter-out app_rpt.so app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so app_page.so,$(MODS))
 endif
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
+ifneq ($(LIBOSPTK),1)
   MODS:=$(filter-out app_osplookup.so,$(MODS))
 endif
 

Modified: team/group/autoconf_and_menuselect/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/cdr/Makefile?rev=11038&r1=11037&r2=11038&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/cdr/Makefile (original)
+++ team/group/autoconf_and_menuselect/cdr/Makefile Fri Feb 24 14:40:08 2006
@@ -15,21 +15,20 @@
 
 MODS:=$(filter-out $(MENUSELECT_CDR),$(MODS))
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
+ifneq ($(UNIXODBC),1)
   MODS:=$(filter-out cdr_odbc.so,$(MODS))
 endif
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/postgresql $(CROSS_COMPILE_TARGET)/usr/local/pgsql/include $(CROSS_COMPILE_TARGET)/usr/include/pgsql $(CROSS_COMPILE_TARGET)/usr/local/include/pgsql $(CROSS_COMPILE_TARGET)/opt/pgsql/include $(CROSS_COMPILE_TARGET)/usr/include/libpq-fe.h),)
+ifneq ($(PQSQL),1)
   MODS:=$(filter-out cdr_pgsql.so,$(MODS))
 endif
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sqlite.h),)
+ifneq ($(SQLITE),1)
   MODS:=$(filter-out cdr_sqlite.so,$(MODS))
 endif
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/tds.h $(CROSS_COMPILE_TARGET)/usr/local/include/tds.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tds.h),)
+ifneq ($(FREETDS),1)
   MODS:=$(filter-out cdr_tds.so,$(MODS))
-  NOTDS=1
 endif
 
 ifeq (${OSARCH},CYGWIN)
@@ -54,7 +53,7 @@
   CFLAGS += -mtune=$(PROC) -O3 -pipe -fomit-frame-pointer -mcpu=v8
 endif
 
-ifeq (${NOTDS},)
+ifeq ($(FREETDS),1)
   ifeq ($(shell grep -s TDS_VERSION_NO $(CROSS_COMPILE_TARGET)/usr/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/local/include/tdsver.h $(CROSS_COMPILE_TARGET)/usr/include/freetds/tdsver.h | grep -c 0.63),1)
     CFLAGS += -DFREETDS_0_63
   else

Modified: team/group/autoconf_and_menuselect/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/Makefile?rev=11038&r1=11037&r2=11038&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/Makefile (original)
+++ team/group/autoconf_and_menuselect/channels/Makefile Fri Feb 24 14:40:08 2006
@@ -69,7 +69,7 @@
 endif
 
 ifeq (${WITH_SMDI},1)
-CFLAGS+=-DWITH_SMDI
+  CFLAGS+=-DWITH_SMDI
 endif
 
 ifeq ($(wildcard h323/libchanh323.a),)
@@ -84,18 +84,18 @@
 
 CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/alsa/asoundlib.h),)
+ifneq ($(ASOUND),1)
   MODS:=$(filter-out chan_alsa.so,$(MODS))
 endif
 
 ifndef WITHOUT_PRI
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1 $(CROSS_COMPILE_TARGET)/usr/local/lib/libpri.so.1),)
+ifeq ($(LIBPRI),1)
   CFLAGS+=-DZAPATA_PRI
   ZAPPRI=-lpri
 endif
 endif # WITHOUT_PRI
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1 $(CROSS_COMPILE_TARGET)/usr/local/lib/libmfcr2.so.1),)
+ifeq ($(LIBMFCR2),1)
   CFLAGS+=-DZAPATA_R2
   ZAPR2=-lmfcr2
 endif
@@ -108,10 +108,10 @@
 endif
 
 ifndef WITHOUT_ZAPTEL
-ZAPAVAIL:=$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)
-endif
-
-ifeq (${ZAPAVAIL},)
+ZAPAVAIL:=$(ZAPTEL)
+endif
+
+ifneq (${ZAPAVAIL},1)
   MODS:=$(filter-out chan_zap.so,$(MODS))
 else
   ifeq (${OSARCH},NetBSD)
@@ -123,7 +123,7 @@
   CFLAGS+=-DIAX_TRUNKING
 endif
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),)
+ifneq ($(VPBAPI),1)
   MODS:=$(filter-out chan_vpb.so,$(MODS))
 else
   CFLAGS+=-DLINUX
@@ -139,7 +139,7 @@
 
 ZAPDIR=/usr/lib
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/nbs.h),)
+ifneq ($(NBS),1)
   MODS:=$(filter-out chan_nbs.so,$(MODS))
 endif
 

Modified: team/group/autoconf_and_menuselect/formats/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/formats/Makefile?rev=11038&r1=11037&r2=11038&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/formats/Makefile (original)
+++ team/group/autoconf_and_menuselect/formats/Makefile Fri Feb 24 14:40:08 2006
@@ -18,7 +18,7 @@
 #
 # OGG/Vorbis format
 #
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vorbis/codec.h),)
+ifneq ($(LIBVORBIS),1)
   MODS:=$(filter-out format_ogg_vorbis.so,$(MODS))
 endif
 

Added: team/group/autoconf_and_menuselect/include/asterisk/smdi.h
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/include/asterisk/smdi.h?rev=11038&view=auto
==============================================================================
--- team/group/autoconf_and_menuselect/include/asterisk/smdi.h (added)
+++ team/group/autoconf_and_menuselect/include/asterisk/smdi.h Fri Feb 24 14:40:08 2006
@@ -1,0 +1,127 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * Copyright (C) 2005-2006, Digium, Inc.
+ *
+ * Matthew A. Nicholson <mnicholson at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*! 
+ * \file
+ * \brief SMDI support for Asterisk.
+ * \author Matthew A. Nicholson <mnicholson at digium.com>
+ */
+
+
+/* C is simply a ego booster for those who want to do objects the hard way. */
+
+
+#ifndef ASTERISK_SMDI_H
+#define ASTERISK_SMDI_H
+
+#include <termios.h>
+#include <time.h>
+
+#include "asterisk/config.h"
+#include "asterisk/module.h"
+#include "asterisk/astobj.h"
+
+#define SMDI_MESG_DESK_NUM_LEN 3
+#define SMDI_MESG_DESK_TERM_LEN 4
+#define SMDI_MWI_FAIL_CAUSE_LEN 3
+#define SMDI_MAX_STATION_NUM_LEN 10
+#define SMDI_MAX_FILENAME_LEN 256
+
+/*!
+ * \brief An SMDI message waiting indicator message.
+ *
+ * The ast_smdi_mwi_message structure contains the parsed out parts of an smdi
+ * message.  Each ast_smdi_interface structure has a message queue consisting
+ * ast_smdi_mwi_message structures. 
+ */
+struct ast_smdi_mwi_message {
+	ASTOBJ_COMPONENTS(struct ast_smdi_mwi_message);
+	char fwd_st[SMDI_MAX_STATION_NUM_LEN + 1];		/* forwarding station number */
+	char cause[SMDI_MWI_FAIL_CAUSE_LEN + 1];		/* the type of failure */
+	struct timeval timestamp;				/* a timestamp for the message */
+};
+
+/*!
+ * \brief An SMDI message desk message.
+ *
+ * The ast_smdi_md_message structure contains the parsed out parts of an smdi
+ * message.  Each ast_smdi_interface structure has a message queue consisting
+ * ast_smdi_md_message structures. 
+ */
+struct ast_smdi_md_message {
+	ASTOBJ_COMPONENTS(struct ast_smdi_md_message);
+	char mesg_desk_num[SMDI_MESG_DESK_NUM_LEN + 1];		/* message desk number */
+	char mesg_desk_term[SMDI_MESG_DESK_TERM_LEN + 1];	/* message desk terminal */
+	char fwd_st[SMDI_MAX_STATION_NUM_LEN + 1];		/* forwarding station number */
+	char calling_st[SMDI_MAX_STATION_NUM_LEN + 1];		/* calling station number */
+	char type;						/* the type of the call */
+	struct timeval timestamp;				/* a timestamp for the message */
+};
+
+/*! \brief SMDI message desk message queue. */
+struct ast_smdi_md_queue {
+	ASTOBJ_CONTAINER_COMPONENTS(struct ast_smdi_md_message);
+};
+
+/*! \brief SMDI message waiting indicator message queue. */
+struct ast_smdi_mwi_queue {
+	ASTOBJ_CONTAINER_COMPONENTS(struct ast_smdi_mwi_message);
+};
+
+/*! 
+ * \brief SMDI interface structure.
+ *
+ * The ast_smdi_interface structure holds information on a serial port that
+ * should be monitored for SMDI activity.  The structure contains a message
+ * queue of messages that have been recieved on the interface.
+ */
+struct ast_smdi_interface {
+	ASTOBJ_COMPONENTS_FULL(struct ast_smdi_interface, SMDI_MAX_FILENAME_LEN, 1);
+	struct ast_smdi_md_queue md_q;
+	struct ast_smdi_mwi_queue mwi_q;
+	FILE *file;
+	int fd;
+	pthread_t thread;
+	struct termios mode;
+	int msdstrip;
+	long msg_expiry;
+};
+
+
+/* MD message queue functions */
+struct ast_smdi_md_message *ast_smdi_md_message_pop(struct ast_smdi_interface *iface);
+struct ast_smdi_md_message *ast_smdi_md_message_wait(struct ast_smdi_interface *iface, int timeout);
+void ast_smdi_md_message_putback(struct ast_smdi_interface *iface, struct ast_smdi_md_message *msg);
+
+/* MWI message queue functions */
+struct ast_smdi_mwi_message *ast_smdi_mwi_message_pop(struct ast_smdi_interface *iface);
+struct ast_smdi_mwi_message *ast_smdi_mwi_message_wait(struct ast_smdi_interface *iface, int timeout);
+void ast_smdi_mwi_message_putback(struct ast_smdi_interface *iface, struct ast_smdi_mwi_message *msg);
+
+struct ast_smdi_interface *ast_smdi_interface_find(const char *iface_name);
+
+/* MWI functions */
+int ast_smdi_mwi_set(struct ast_smdi_interface *iface, const char *mailbox);
+int ast_smdi_mwi_unset(struct ast_smdi_interface *iface, const char *mailbox);
+
+void ast_smdi_md_message_destroy(struct ast_smdi_md_message *msg);
+void ast_smdi_mwi_message_destroy(struct ast_smdi_mwi_message *msg);
+
+void ast_smdi_interface_destroy(struct ast_smdi_interface *iface);
+
+#endif /* !ASTERISK_SMDI_H */

Propchange: team/group/autoconf_and_menuselect/include/asterisk/smdi.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/group/autoconf_and_menuselect/include/asterisk/smdi.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/group/autoconf_and_menuselect/include/asterisk/smdi.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: team/group/autoconf_and_menuselect/pbx/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/pbx/Makefile?rev=11038&r1=11037&r2=11038&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/pbx/Makefile (original)
+++ team/group/autoconf_and_menuselect/pbx/Makefile Fri Feb 24 14:40:08 2006
@@ -15,13 +15,11 @@
 
 MODS:=$(filter-out $(MENUSELECT_PBX),$(MODS))
 
-#GTK=$(shell $(CROSS_COMPILE_BIN)gtk-config --cflags >/dev/null 2>/dev/null && echo "OK")
-ifeq (${GTK},)
+ifneq (${GTK},1)
   MODS:=$(filter-out pbx_gtkconsole.so,$(MODS))
 endif
 
-#KDE=$(shell [ "$$QTDIR" != "" ] && echo "OK")
-ifeq (${GTK},)
+ifneq (${QT},1)
   MODS:=$(filter-out pbx_kdeconsole.so,$(MODS))
 endif
 

Modified: team/group/autoconf_and_menuselect/res/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/res/Makefile?rev=11038&r1=11037&r2=11038&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/res/Makefile (original)
+++ team/group/autoconf_and_menuselect/res/Makefile Fri Feb 24 14:40:08 2006
@@ -15,7 +15,7 @@
 
 MODS:=$(filter-out $(MENUSELECT_RES),$(MODS))
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/odbcinst.h $(CROSS_COMPILE_TARGET)/usr/local/include/odbcinst.h),)
+ifneq ($(UNIXODBC),1)
   MODS:=$(filter-out res_odbc.so,$(MODS))
   MODS:=$(filter-out res_config_odbc.so,$(MODS))
 else
@@ -51,7 +51,7 @@
 CFLAGS+=
 
 ifndef WITHOUT_ZAPTEL
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h),)
+ifeq ($(ZAPTEL),1)
   CFLAGS+=-DZAPATA_MOH
 endif
 endif # WITHOUT_ZAPTEL

Modified: team/group/autoconf_and_menuselect/utils/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/utils/Makefile?rev=11038&r1=11037&r2=11038&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/utils/Makefile (original)
+++ team/group/autoconf_and_menuselect/utils/Makefile Fri Feb 24 14:40:08 2006
@@ -20,11 +20,11 @@
 
 UTILS:=$(filter-out $(MENUSELECT_UTILS),$(UTILS))
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/popt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/popt.h),)
+ifneq ($(LIBPOPT),1)
   UTILS:=$(filter-out smsq,$(UTILS))
 endif
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/newt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/newt.h),)
+ifneq ($(LIBNEWT),1)
   UTILS:=$(filter-out astman,$(UTILS))
 endif
 



More information about the asterisk-commits mailing list