diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-01 10:03:44 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-01 10:03:44 +0000 |
commit | 027ba007a974156a14f427e43a800252bc9c6c72 (patch) | |
tree | 6981a39fc70d6f54e5ec4a522c5815203b591886 /configure.ac | |
parent | db8e06ec8dc81f5a75ce8bcec16a6f001264c022 (diff) |
do the check for VoiceTronix support using C++
set the library/header include parameters properly for the search
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23896 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index c90b53898..bc3fd3ea8 100644 --- a/configure.ac +++ b/configure.ac @@ -319,6 +319,8 @@ AC_CHECK_HEADER([linux/ixjuser.h], [PBX_IXJUSER=1], [PBX_IXJUSER=0], [ ]) AC_SUBST(PBX_IXJUSER) +AC_LANG_PUSH(C++) + AC_ARG_WITH([vpb], AC_HELP_STRING([--with-vpb=PATH],[use vpb files in PATH]),[ case ${withval} in n|no) @@ -335,12 +337,17 @@ esac ]) if test "${USE_VPB}" != "no"; then echo -n "checking for vpb_open in -lvpb..." - saved_ldflags="${LDFLAGS}" - LDFLAGS="${LDFLAGS} -L${VPB_DIR} -lvpb" + saved_libs="${LIBS}" + saved_cppflags="${CPPFLAGS}" + if test "x${VPB_DIR}" != "x" ; then + LIBS="${LIBS} -L${VPB_DIR}/lib" + CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include" + fi + LIBS="${LIBS} -lvpb -lpthread" AC_LINK_IFELSE( [ AC_LANG_PROGRAM( - [#include "${VPB_DIR}vpbapi.h"], + [#include <vpbapi.h>], [int q = vpb_open(0,0);]) ], [ AC_MSG_RESULT(yes) @@ -350,15 +357,15 @@ if test "${USE_VPB}" != "no"; then ac_cv_lib_vpb_vpb_open="no" ] ) - LDFLAGS="${saved_ldflags}" - - PBX_LIBvpb=0 - if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then + LIBS="${saved_libs}" + CPPFLAGS="${saved_cppflags}" + PBX_LIBvpb=0 + if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then VPB_LIB="-lvpb" if test "${VPB_DIR}" != ""; then - VPB_LIB="-L${VPB_DIR}/lib ${VPB_LIB}" - VPB_INCLUDE="-I${VPB_DIR}/include" - AC_SUBST([VPB_INCLUDE]) + VPB_LIB="-L${VPB_DIR}/lib ${VPB_LIB}" + VPB_INCLUDE="-I${VPB_DIR}/include" + AC_SUBST([VPB_INCLUDE]) fi AC_SUBST([VPB_LIB]) PBX_LIBvpb=1 @@ -374,9 +381,6 @@ if test "${USE_VPB}" != "no"; then fi AC_SUBST([PBX_LIBvpb]) - -AC_LANG_PUSH(C++) - AC_ARG_WITH([qt], AC_HELP_STRING([--with-qt=PATH],[use Qt files in PATH]),[ case ${withval} in n|no) |