From ef3d96dd9c3546c5deda52e510fa7b5faed2518b Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sun, 7 Sep 2008 00:08:01 +0000 Subject: [PATCH] don't use shell, that is a gmakeism, instead detect from configure git-svn-id: http://svn.openzap.org/svn/openzap/trunk@543 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/Makefile.in | 9 +++++---- libs/openzap/configure.ac | 9 ++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/libs/openzap/Makefile.in b/libs/openzap/Makefile.in index 3ee8af7863..63c1a4d6e3 100644 --- a/libs/openzap/Makefile.in +++ b/libs/openzap/Makefile.in @@ -37,6 +37,8 @@ CFLAGS=@CFLAGS@ @COMP_VENDOR_CFLAGS@ @DEFS@ LIBS = @LIBS@ DYNAMIC_LIB_EXTEN = @DYNAMIC_LIB_EXTEN@ SOLINK = @SOLINK@ +OZ_SRCDIR=@oz_srcdir@ +oz_builddir=@oz_builddir@ SRC=src top_builddir=@top_builddir@ INSTALL=@INSTALL@ @@ -44,11 +46,10 @@ LIBTOOL=@LIBTOOL@ LTINSTALL=$(LIBTOOL) --mode=install $(INSTALL) LTUNINSTALL=$(LIBTOOL) --mode=uninstall rm -f CCLD = $(CC) -PWD=$(shell pwd) -INCS=-I$(PWD)/$(SRC)/include -I$(PWD)/$(SRC)/isdn/include -I$(PWD)/$(SRC)/ozmod/ozmod_ss7_boost +INCS=-I$(OZ_SRCDIR)/$(SRC)/include -I$(OZ_SRCDIR)/$(SRC)/isdn/include -I$(OZ_SRCDIR)/$(SRC)/ozmod/ozmod_ss7_boost CFLAGS+= $(INCS) $(ZAP_CFLAGS) -DZAP_CONFIG_DIR=\"@prefix@/conf\" -DZAP_MOD_DIR=\"@prefix@/mod\" -COMPILE = $(CC) $(CFLAGS) $(DEFS) $(INCS) +COMPILE = $(CC) $(CFLAGS) $(INCS) LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(COMPILE) LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@ @@ -216,7 +217,7 @@ $(SRC)/zap_io.o: $(SRC)/zap_io.c $(LTCOMPILE) -c $< -o $@ dox: - cd docs && doxygen $(PWD)/docs/Doxygen.conf + cd docs && doxygen $(OZ_SRCDIR)/docs/Doxygen.conf mod_openzap/mod_openzap.$(DYNAMIC_LIB_EXTEN): $(MYLIB) mod_openzap/mod_openzap.c cd mod_openzap && make diff --git a/libs/openzap/configure.ac b/libs/openzap/configure.ac index aff46c9a36..ae71dcba1a 100644 --- a/libs/openzap/configure.ac +++ b/libs/openzap/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ(2.59) AC_INIT([openzap],[pre-alpha],[bugs@freeswitch.org]) -AC_CONFIG_SRCDIR([src/libteletone_detect.c]) +AC_CONFIG_SRCDIR([src/zap_io.c]) AC_CONFIG_AUX_DIR(build) #AM_INIT_AUTOMAKE(libopenzap,0.1) @@ -14,6 +14,13 @@ AC_PROG_MAKE_SET AC_PREFIX_DEFAULT(/usr/local/openzap) + +# Absolute source/build directory +oz_srcdir=`(cd $srcdir && pwd)` +oz_builddir=`pwd` +AC_SUBST(oz_srcdir) +AC_SUBST(oz_builddir) + #override some default libtool behavior and invoke AC_PROG_LIBTOOL (see http://lists.gnu.org/archive/html/libtool/2007-03/msg00000.html) m4_defun([_LT_AC_LANG_F77_CONFIG], [:]) m4_defun([_LT_AC_LANG_GCJ_CONFIG], [:])