[Asterisk-cvs] zaptel Makefile,1.51,1.52 ztcfg.h,1.1,1.2

russell at lists.digium.com russell at lists.digium.com
Sat Sep 25 23:31:46 CDT 2004


Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv11093

Modified Files:
	Makefile ztcfg.h 
Log Message:
make ztcfg respect INSTALL_PREFIX


Index: Makefile
===================================================================
RCS file: /usr/cvsroot/zaptel/Makefile,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- Makefile	24 Jul 2004 16:03:27 -0000	1.51
+++ Makefile	26 Sep 2004 03:34:29 -0000	1.52
@@ -33,6 +33,9 @@
 
 INSTALL_PREFIX=
 
+CONFIG_FILE=$(INSTALL_PREFIX)/etc/zaptel.conf
+CFLAGS+=-DZAPTEL_CONFIG=\"$(CONFIG_FILE)\"
+
 BUILDVER=$(shell if uname -r | grep -q ^2.6; then echo "linux26"; else echo "linux24"; fi)
 MODCONF=$(shell if [ -d $(INSTALL_PREFIX)/etc/modprobe.d ]; then echo "$(INSTALL_PREFIX)/etc/modprobe.d/zaptel"; elif [ -d $(INSTALL_PREFIX)/etc/modutils ]; then echo "$(INSTALL_PREFIX)/etc/modutils/zaptel"; elif [ -f $(INSTALL_PREFIX)/etc/modprobe.conf ]; then echo "$(INSTALL_PREFIX)/etc/modprobe.conf"; elif [ -f $(INSTALL_PREFIX)/etc/modules.conf ]; then echo "$(INSTALL_PREFIX)/etc/modules.conf"; else echo $(INSTALL_PREFIX)/etc/conf.modules ; fi)
 
@@ -310,7 +313,7 @@
 		/sbin/update-modules ; \
 	fi
 	-/sbin/depmod -a
-	[ -f $(INSTALL_PREFIX)/etc/zaptel.conf ] || install -m 644 zaptel.conf.sample $(INSTALL_PREFIX)/etc/zaptel.conf
+	[ -f $(CONFIG_FILE) ] || install -m 644 zaptel.conf.sample $(CONFIG_FILE)
 
 config:
 	if [ -d $(INSTALL_PREFIX)/etc/rc.d/init.d ]; then \

Index: ztcfg.h
===================================================================
RCS file: /usr/cvsroot/zaptel/ztcfg.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ztcfg.h	3 Jun 2001 16:01:39 -0000	1.1
+++ ztcfg.h	26 Sep 2004 03:34:29 -0000	1.2
@@ -22,6 +22,6 @@
 #ifndef _ZTCFG_H
 #define _ZTCFG_H
 
-#define CONFIG_FILENAME "/etc/zaptel.conf"
+#define CONFIG_FILENAME ZAPTEL_CONFIG
 #define MASTER_DEVICE   "/dev/zap/ctl"
 #endif




More information about the svn-commits mailing list