Summary:ASTERISK-12686: [patch] OpenH323 detection problem
Reporter:Andriy I Pylypenko (bamby)Labels:
Date Opened:2008-09-05 01:32:49Date Closed:2008-09-10 13:56:22
Versions:Frequency of
Environment:Attachments:( 0) detect_openh323.diff
Description:The recognition procedure of the version of pwlib and openh323 includes this construct:

   $2_VERSION=`grep "$2_VERSION" ${$2_INCDIR}/$3 | cut -f2 -d ' ' | sed -e 's/"//g'`

and is designed to parse the following line:

   #define PWLIB_VERSION "1.12.0"

As you see the version is not second but third part of the line. Anyway the above construct works fine in most cases because the first spacing character is actually a tab. However in some cases the header file can contain a whitespace (this for example occurs if pwlib has been built with CFLAGS="-march=pentiumpro").

To make the detection procedure independent of the spacing character, the tabs should be converted to spaces before further processing.

I'm attaching the patch against acinclude.m4 only so the 'configure' script should be regenerated also.
Comments:By: Digium Subversion (svnbot) 2008-09-10 13:56:20

Repository: asterisk
Revision: 142416

U   branches/1.4/acinclude.m4
U   branches/1.4/configure

r142416 | seanbright | 2008-09-10 13:56:19 -0500 (Wed, 10 Sep 2008) | 9 lines

Fix detection of PWLIB and OpenH323 version when spacing in the headers
isn't consistent.

(closes issue ASTERISK-12686)
Reported by: bamby
     detect_openh323.diff uploaded by bamby (license 430)
     (Modified by me to use sed instead of tr)