diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-27 01:26:15 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-27 01:26:15 +0000 |
commit | d18d099eb7865c82cca46ff3c1b77b1e2bf81a4a (patch) | |
tree | 76bc147eae26259f005d07f325edbf3f3944ede9 /configure.ac | |
parent | 96fe3ec5cca42575b6da2d4c0d6a27ccedad5e17 (diff) |
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/branches/1.4@114695 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 78386914e..fed40c3eb 100644 --- a/configure.ac +++ b/configure.ac @@ -1280,9 +1280,19 @@ fi 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" |