mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
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:
19
acinclude.m4
19
acinclude.m4
@@ -42,7 +42,7 @@ AC_SUBST([$1_DIR])
|
||||
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],
|
||||
[
|
||||
@@ -63,17 +63,14 @@ if test "${USE_$1}" != "no"; then
|
||||
if test "x${$1_DIR}" != "x"; then
|
||||
$1_LIB="${pbxlibdir} ${$1_LIB}"
|
||||
$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
|
||||
$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 -n "${$1_MANDATORY}" ;
|
||||
then
|
||||
|
@@ -1361,12 +1361,12 @@ fi
|
||||
if test "${PBX_DAHDI}" = "1" || test "${USE_ZAPTEL}" = "no"; then
|
||||
tonezone_dir="dahdi"
|
||||
if test "x${DAHDI_DIR}" != "x"; then
|
||||
tonezone_extra="${tonezone_extra} -I${DAHDI_DIR}/include"
|
||||
tonezone_extra="${tonezone_extra} ${DAHDI_INCLUDE}"
|
||||
fi
|
||||
else
|
||||
tonezone_dir="zaptel"
|
||||
if test "x${ZAPTEL_DIR}" != "x"; then
|
||||
tonezone_extra="${tonezone_extra} -I${ZAPTEL_DIR}/include"
|
||||
tonezone_extra="${tonezone_extra} ${ZAPTEL_INCLUDE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -121,8 +121,7 @@ testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
|
||||
$(CC) -g -o testexpr2 ast_expr2f.o ast_expr2.o
|
||||
rm ast_expr2.o ast_expr2f.o
|
||||
|
||||
channel.o: ASTCFLAGS+=$(ZAPTEL_INCLUDE)
|
||||
asterisk.o: ASTCFLAGS+=$(ZAPTEL_INCLUDE)
|
||||
asterisk.o channel.o: ASTCFLAGS+=$(ZAPTEL_INCLUDE) $(DAHDI_INCLUDE)
|
||||
|
||||
stdtime/localtime.o: ASTCFLAGS+=$(AST_NO_STRICT_OVERFLOW)
|
||||
|
||||
|
Reference in New Issue
Block a user