Fixed #1064:
- Removed orphaned third_party/gsm/inc/gsm.h.orig file
- Added support for external GSM header in /usr/include/gsm.h (rather than <gsm/gsm.h>)
Thanks Christopher Zimmermann for the fixes
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3158 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/aconfigure.ac b/aconfigure.ac
index 76d73fb..185ee0d 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -408,17 +408,30 @@
[Use external GSM codec library, not the one in "third_party" directory. When this option is set, make sure that the GSM include/lib files are accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]),
[
if test "x$with_external_gsm" != "xno"; then
- # Test GSM library installation
- AC_MSG_CHECKING([if external GSM devkit is installed])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gsm/gsm.h>
- ]],
- [gsm_create(); ])
- ],
- [AC_MSG_RESULT(yes!!)
- AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1)
- ac_external_gsm="1"
- ],
- [AC_MSG_ERROR([Unable to use external GSM library. If GSM development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])])
+ # Test GSM library installation
+ AC_MSG_CHECKING([if external GSM devkit is installed as gsm/gsm.h])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <gsm/gsm.h> ]], [gsm_create(); ]) ],
+ [AC_MSG_RESULT(yes!!)
+ AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1)
+ AC_DEFINE(PJMEDIA_EXTERNAL_GSM_GSM_H, 1)
+ ac_external_gsm="1"
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING([if external GSM devkit is installed as gsm.h])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <gsm.h> ]], [gsm_create(); ]) ],
+ [AC_MSG_RESULT(yes!!)
+ AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1)
+ AC_DEFINE(PJMEDIA_EXTERNAL_GSM_H, 1)
+ ac_external_gsm="1"
+ ],
+ [AC_MSG_ERROR([Unable to use external GSM library. If GSM development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])
+ ]
+ )
+ ]
+ )
fi
]
)