aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-30 23:23:24 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-30 23:23:24 +0000
commit26576fb64dae9b4dcc7271ea71a95424d1400516 (patch)
tree00ae03fe76d43fa1e73bdfadd0826a9809fd2fd5 /configure.ac
parent29f76f25b9c0e379ca0f0f20e6e568a36fdc2ee8 (diff)
When we are checking for a system installed version of libgsm, we need to check
for gsm.h as well. Furthermore, when checking for this header, it may be located in a gsm/ sub directory, so check for that, as well. (issue #8773) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@52997 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac55
1 files changed, 43 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 5531d3ec2..61508b4a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -365,26 +365,57 @@ if test "${USE_GSM}" != "no"; then
if test "${GSM_SYSTEM}" = "yes"; then
gsmlibdir=""
if test "x${GSM_DIR}" != "x"; then
- if test -d ${GSM_DIR}/lib; then
- gsmlibdir="-L${GSM_DIR}/lib"
- else
- gsmlibdir="-L${GSM_DIR}"
- fi
+ if test -d ${GSM_DIR}/lib; then
+ gsmlibdir="-L${GSM_DIR}/lib"
+ else
+ gsmlibdir="-L${GSM_DIR}"
+ fi
fi
AC_CHECK_LIB([gsm], [gsm_create], AC_DEFINE_UNQUOTED([HAVE_GSM], 1,
[Define to indicate the GSM library]), [], ${gsmlibdir})
if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then
- GSM_LIB="-lgsm"
- if test "x${GSM_DIR}" != "x"; then
- GSM_LIB="${gsmlibdir} ${GSM_LIB}"
- GSM_INCLUDE="-I${GSM_DIR}/include"
- fi
- PBX_GSM=1
- GSM_INTERNAL="no"
+ if test "x${GSM_DIR}" != "x" ; then
+ AC_CHECK_HEADER([${GSM_DIR}/include/gsm.h], [GSM_HEADER_FOUND=1], [GSM_HEADER_FOUND=0])
+ AC_CHECK_HEADER([${GSM_DIR}/include/gsm/gsm.h], [GSM_GSM_HEADER_FOUND=1], [GSM_GSM_HEADER_FOUND=0])
+ else
+ AC_CHECK_HEADER([gsm.h], [GSM_HEADER_FOUND=1], [GSM_HEADER_FOUND=0])
+ AC_CHECK_HEADER([gsm/gsm.h], [GSM_GSM_HEADER_FOUND=1], [GSM_GSM_HEADER_FOUND=0])
+ fi
+ if test "${GSM_HEADER_FOUND}" = "0" ; then
+ if test "{GSM_GSM_HEADER_FOUND}" = "0" ; then
+ if test "x${GSM_MANDATORY}" = "xyes" ; then
+ AC_MSG_NOTICE([***])
+ AC_MSG_NOTICE([*** It appears that you do not have the gsm development package installed.])
+ AC_MSG_NOTICE([*** Please install it to include ${GSM_DESCRIP} support, or re-run configure])
+ AC_MSG_NOTICE([*** without explicitly specifying --with-${GSM_OPTION}])
+ exit 1
+ fi
+ fi
+ fi
+ GSM_OK=0
+ if test "${GSM_HEADER_FOUND}" = "1" ; then
+ AC_DEFINE_UNQUOTED([HAVE_GSM_HEADER], 1, [Define to indicate that gsm.h has no prefix for its location])
+ GSM_OK=1
+ else
+ if test "${GSM_GSM_HEADER_FOUND}" = "1" ; then
+ AC_DEFINE_UNQUOTED([HAVE_GSM_GSM_HEADER], 1, [Define to indicate that gsm.h is in gsm/gsm.h])
+ GSM_OK=1
+ fi
+ fi
+ if test "${GSM_OK}" = "1" ; then
+ GSM_LIB="-lgsm"
+ if test "x${GSM_DIR}" != "x"; then
+ GSM_LIB="${gsmlibdir} ${GSM_LIB}"
+ GSM_INCLUDE="-I${GSM_DIR}/include"
+ fi
+ PBX_GSM=1
+ GSM_INTERNAL="no"
+ fi
fi
fi
if test "${GSM_INTERNAL}" = "yes"; then
PBX_GSM=1
+ AC_DEFINE_UNQUOTED([HAVE_GSM_HEADER], 1, [Define to indicate that gsm.h has no prefix for its location])
fi
fi