diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-27 01:28:32 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-27 01:28:32 +0000 |
commit | ce63165e2900040a781a9444fe7f56a7846afe7d (patch) | |
tree | d5d99a15daf3b57be261d9b308fa47d18a1036df /configure.ac | |
parent | 46711468718b36db33e28410f5b5517f3ef81440 (diff) |
Merged revisions 114695 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r114695 | seanbright | 2008-04-26 21:26:15 -0400 (Sat, 26 Apr 2008) | 5 lines
When we don't explicitly pass a path to the --with-tds configure option, we
may end up finding tds.h in /usr/local/include instead of /usr/include. If
this happens, the grep that looks for the version (from tdsver.h) will fail
and we'll have some problems during the build.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114696 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 498bf6983..b225f0ab8 100644 --- a/configure.ac +++ b/configure.ac @@ -1336,9 +1336,19 @@ AST_EXT_TOOL_CHECK([GMIME], [gmime]) AST_EXT_LIB_CHECK([FREETDS], [tds], [tds_version], [tds.h]) if test "${PBX_FREETDS}" != "0"; then - case `grep TDS_VERSION_NO ${FREETDS_DIR:-/usr}/include/tdsver.h` in - *0.64*) - FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_64" + if test "${FREETDS_DIR}x" = "x"; + then + for tds_dir in /usr /usr/local; + do + if test -f "${tds_dir}/include/tdsver.h"; + then + FREETDS_DIR="${tds_dir}" + fi + done + fi + case `${GREP} TDS_VERSION_NO ${FREETDS_DIR:-/usr}/include/tdsver.h` in + *0.64*) + FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_64" ;; *0.63*) FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_63" |