[zaptel-commits] tzafrir: branch 1.4 r2990 - in /branches/1.4: ./ ppp/
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Fri Aug 31 22:32:53 CDT 2007
Author: tzafrir
Date: Fri Aug 31 22:32:51 2007
New Revision: 2990
URL: http://svn.digium.com/view/zaptel?view=rev&rev=2990
Log:
* Maintain the same meaning of DESTDIR and INSTALL_PREFIX as in main
Makefile
* Document ppp support to the best of my knowledge.
* Err clearly if the VERSION was not found.
* Add some basic/broken detection of ppp in autoconf.
Merged revisions 2987 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2
Modified:
branches/1.4/ (props changed)
branches/1.4/README
branches/1.4/configure
branches/1.4/configure.ac
branches/1.4/makeopts.in
branches/1.4/ppp/ (props changed)
branches/1.4/ppp/Makefile
Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: branches/1.4/README
URL: http://svn.digium.com/view/zaptel/branches/1.4/README?view=diff&rev=2990&r1=2989&r2=2990
==============================================================================
--- branches/1.4/README (original)
+++ branches/1.4/README Fri Aug 31 22:32:51 2007
@@ -385,6 +385,26 @@
2 XPP_FXS/0/0/1 FXOLS (In use)
+[[ppp]]
+PPP Support
+-----------
+Zaptel digital cards can provide data channels through ppp as
+point-to-point connections. This requires a plugin to the ppp daemon
+that is included in the ppp/ subdirectory. To install it:
+
+1. Make sure you have the PPP source / headers installed. On Debian:
+
+ apt-get install ppp-dev
+
+2. Run 'make' on the ppp subdirectory:
+
+ make -C ppp
+ make -C ppp install
+
+3. Make sure your kernel has support for both PPP (which is common is
+ distribution kernels and for HDLC (much less common) - CONFIG_PPP and
+ CONFIG_HDLC .
+
What is the license for the zaptel driver?
------------------------------------------
@@ -394,8 +414,7 @@
If you wish to use the zaptel drivers in an application for which the
GPL is not appropriate (e.g. a proprietary embedded system), licenses
-under more flexible terms can be readily obtained through Digium, Inc.
-at reasonable cost.
+under more flexible terms can be readily obtained through Digium, Inc.at reasonable cost.
How do I report bugs or contribute?
Modified: branches/1.4/configure
URL: http://svn.digium.com/view/zaptel/branches/1.4/configure?view=diff&rev=2990&r1=2989&r2=2990
==============================================================================
--- branches/1.4/configure (original)
+++ branches/1.4/configure Fri Aug 31 22:32:51 2007
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 2107 .
+# From configure.ac Revision: 2216 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61.
#
@@ -686,6 +686,7 @@
USB_LIB
USB_INCLUDE
PBX_LIBUSB
+PPPD_VERSION
LIBOBJS
LTLIBOBJS'
ac_subst_files=''
@@ -1270,6 +1271,7 @@
--with-ncurses=PATH use ncurses files in PATH
--with-newt=PATH use newt files in PATH
--with-usb=PATH use libusb files in PATH
+ --with-ppp=PATH Use ppp support from PATH
Some influential environment variables:
CC C compiler command
@@ -5323,6 +5325,46 @@
+
+
+
+# Check whether --with-ppp was given.
+if test "${with_ppp+set}" = set; then
+ withval=$with_ppp;
+else
+ with_ppp=check
+
+fi
+
+set -x
+# somebody will fix that
+default_ppp_path=/usr
+
+case "$with_ppp" in
+ yes|check) ppp_path="$default_ppp_path";;
+ no) ppp_path='' ;;
+ *) ppp_path="$with_ppp" ;;
+esac
+
+level_file="$ppp_path/include/pppd/patchlevel.h"
+PPP_VERSION=
+if test "$ppp_path" != '' && test -r "$level_file"; then
+ PPPD_VERSION=`awk -F '"' '/VERSION/ { print $$2; }' $level_file`
+fi
+
+case "$with_ppp" in
+ check|no) :;;
+ *)
+ # If we asked explicitly for ppp support
+ if test "$PPPD_VERSION" = ''; then
+ # but have not detected it
+ { { echo "$as_me:$LINENO: error: failed to find pppd/patchlevel.h: no ppp support." >&5
+echo "$as_me: error: failed to find pppd/patchlevel.h: no ppp support." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ ;;
+esac
+set +x
ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts"
@@ -6026,11 +6068,12 @@
USB_LIB!$USB_LIB$ac_delim
USB_INCLUDE!$USB_INCLUDE$ac_delim
PBX_LIBUSB!$PBX_LIBUSB$ac_delim
+PPPD_VERSION!$PPPD_VERSION$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 72; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Modified: branches/1.4/configure.ac
URL: http://svn.digium.com/view/zaptel/branches/1.4/configure.ac?view=diff&rev=2990&r1=2989&r2=2990
==============================================================================
--- branches/1.4/configure.ac (original)
+++ branches/1.4/configure.ac Fri Aug 31 22:32:51 2007
@@ -60,6 +60,40 @@
AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt])
AST_EXT_LIB([usb], [usb_init], [usb.h], [USB], [libusb])
+AC_ARG_WITH(ppp,
+ [AS_HELP_STRING([--with-ppp=PATH],[Use ppp support from PATH])],
+ [],
+ [with_ppp=check]
+ )
+set -x
+# somebody will fix that
+default_ppp_path=/usr
+
+case "$with_ppp" in
+ yes|check) ppp_path="$default_ppp_path";;
+ no) ppp_path='' ;;
+ *) ppp_path="$with_ppp" ;;
+esac
+
+level_file="$ppp_path/include/pppd/patchlevel.h"
+PPP_VERSION=
+if test "$ppp_path" != '' && test -r "$level_file"; then
+ PPPD_VERSION=`awk -F '"' '/VERSION/ { print $$2; }' $level_file`
+fi
+
+case "$with_ppp" in
+ check|no) :;;
+ *)
+ # If we asked explicitly for ppp support
+ if test "$PPPD_VERSION" = ''; then
+ # but have not detected it
+ AC_MSG_ERROR(failed to find pppd/patchlevel.h: no ppp support.)
+ fi
+ ;;
+esac
+set +x
+AC_SUBST(PPPD_VERSION)
+
AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
AC_OUTPUT
Modified: branches/1.4/makeopts.in
URL: http://svn.digium.com/view/zaptel/branches/1.4/makeopts.in?view=diff&rev=2990&r1=2989&r2=2990
==============================================================================
--- branches/1.4/makeopts.in (original)
+++ branches/1.4/makeopts.in Fri Aug 31 22:32:51 2007
@@ -36,6 +36,7 @@
NCURSES_INCLUDE=@NCURSES_INCLUDE@
PBX_LIBUSB=@PBX_LIBUSB@
-USB_LIB=@NCURSES_LIB@
+USB_LIB=@USB_LIB@
USB_INCLUDE=@USB_INCLUDE@
+PPPD_VERSION=@PPPD_VERSION@
Propchange: branches/1.4/ppp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Aug 31 22:32:51 2007
@@ -1,0 +1,1 @@
+zaptel.so
Modified: branches/1.4/ppp/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.4/ppp/Makefile?view=diff&rev=2990&r1=2989&r2=2990
==============================================================================
--- branches/1.4/ppp/Makefile (original)
+++ branches/1.4/ppp/Makefile Fri Aug 31 22:32:51 2007
@@ -1,25 +1,29 @@
-CC = gcc
-COPTS = -O2 -g
-CFLAGS = $(COPTS) -I.. -fPIC
-LDFLAGS = -shared
-INSTALL = install
+#COPTS = -O2 -g
-DESTDIR = /usr
+-include ../makeopts
-VERSION := $(shell awk -F '"' '/VERSION/ { print $$2; }' $(DESTDIR)/include/pppd/patchlevel.h)
+CFLAGS += $(COPTS) -I.. -fPIC
+LDFLAGS += -shared
-LIBDIR := $(DESTDIR)/lib/pppd/$(VERSION)
+INCLUDE_DIR = $(includedir)/pppd
+
+LIBDIR = $(libdir)/pppd/$(PPPD_VERSION)
PLUGINS := zaptel.so
all: $(PLUGINS)
%.so: %.c
- $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
+ifeq (,$(PPPD_VERSION))
+ @echo "pppd version not found (in patchlevel.h)."
+ @echo "Install ppp source/headers and/or ./configure --with-ppp=PATH."
+ exit 1
+endif
+ $(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS)
install: $(PLUGINS)
- $(INSTALL) -d $(LIBDIR)
- $(INSTALL) -m 0644 $? $(LIBDIR)
+ $(INSTALL) -d $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m 0644 $? $(DESTDIR)$(LIBDIR)
clean:
rm -f *.o *.so *.a
More information about the zaptel-commits
mailing list