ensure that DAHDI_INCLUDE and ZAPTEL_INCLUDE are added in all the places needed

improve AST_EXT_LIB_CHECK to accept (and remember) additional CFLAGS data like it does in trunk already

(closes issue #12911)
Reported by: tzafrir



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@127754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2008-07-03 16:12:58 +00:00
parent e9f5152eba
commit 3b34ed635e
4 changed files with 238 additions and 4786 deletions

View File

@@ -42,7 +42,7 @@ AC_SUBST([$1_DIR])
AC_SUBST([PBX_$1]) AC_SUBST([PBX_$1])
]) ])
# AST_EXT_LIB_CHECK([package symbol name], [package library name], [function to check], [package header], [additional LIB data]) # AST_EXT_LIB_CHECK([package symbol name], [package library name], [function to check], [package header], [additional LIB data], [additional INCLUDE data])
AC_DEFUN([AST_EXT_LIB_CHECK], AC_DEFUN([AST_EXT_LIB_CHECK],
[ [
@@ -63,17 +63,14 @@ if test "${USE_$1}" != "no"; then
if test "x${$1_DIR}" != "x"; then if test "x${$1_DIR}" != "x"; then
$1_LIB="${pbxlibdir} ${$1_LIB}" $1_LIB="${pbxlibdir} ${$1_LIB}"
$1_INCLUDE="-I${$1_DIR}/include" $1_INCLUDE="-I${$1_DIR}/include"
saved_cppflags="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} -I${$1_DIR}/include"
if test "x$4" != "x" ; then
AC_CHECK_HEADER([${$1_DIR}/include/$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0])
fi
CPPFLAGS="${saved_cppflags}"
else
if test "x$4" != "x" ; then
AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0])
fi
fi fi
$1_INCLUDE="${$1_INCLUDE} $6"
saved_cppflags="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
if test "x$4" != "x" ; then
AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0])
fi
CPPFLAGS="${saved_cppflags}"
if test "x${$1_HEADER_FOUND}" = "x0" ; then if test "x${$1_HEADER_FOUND}" = "x0" ; then
if test -n "${$1_MANDATORY}" ; if test -n "${$1_MANDATORY}" ;
then then

4998
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1361,12 +1361,12 @@ fi
if test "${PBX_DAHDI}" = "1" || test "${USE_ZAPTEL}" = "no"; then if test "${PBX_DAHDI}" = "1" || test "${USE_ZAPTEL}" = "no"; then
tonezone_dir="dahdi" tonezone_dir="dahdi"
if test "x${DAHDI_DIR}" != "x"; then if test "x${DAHDI_DIR}" != "x"; then
tonezone_extra="${tonezone_extra} -I${DAHDI_DIR}/include" tonezone_extra="${tonezone_extra} ${DAHDI_INCLUDE}"
fi fi
else else
tonezone_dir="zaptel" tonezone_dir="zaptel"
if test "x${ZAPTEL_DIR}" != "x"; then if test "x${ZAPTEL_DIR}" != "x"; then
tonezone_extra="${tonezone_extra} -I${ZAPTEL_DIR}/include" tonezone_extra="${tonezone_extra} ${ZAPTEL_INCLUDE}"
fi fi
fi fi

View File

@@ -121,8 +121,7 @@ testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
$(CC) -g -o testexpr2 ast_expr2f.o ast_expr2.o $(CC) -g -o testexpr2 ast_expr2f.o ast_expr2.o
rm ast_expr2.o ast_expr2f.o rm ast_expr2.o ast_expr2f.o
channel.o: ASTCFLAGS+=$(ZAPTEL_INCLUDE) asterisk.o channel.o: ASTCFLAGS+=$(ZAPTEL_INCLUDE) $(DAHDI_INCLUDE)
asterisk.o: ASTCFLAGS+=$(ZAPTEL_INCLUDE)
stdtime/localtime.o: ASTCFLAGS+=$(AST_NO_STRICT_OVERFLOW) stdtime/localtime.o: ASTCFLAGS+=$(AST_NO_STRICT_OVERFLOW)