Fix obscure build error in the port. Basically, depending on versions

of some externals packages (I suspect it's autotools), files
openh323buildopts.h and ptbuildopts.h can be generated with either
tab or space after #define. As a result, configure in some case could
have failed to grep the correct field.

Reported by:	Rodrigo Graeff
This commit is contained in:
Maxim Sobolev 2008-08-22 22:11:30 +00:00
parent ad0a58d328
commit a3374a76f0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=219015
4 changed files with 104 additions and 32 deletions

View file

@ -3,7 +3,7 @@ $FreeBSD$
--- configure.orig
+++ configure
@@ -3926,8 +3926,6 @@
@@ -3951,8 +3951,6 @@
case "${host_os}" in
freebsd*)
ac_default_prefix=/usr/local
@ -12,7 +12,16 @@ $FreeBSD$
;;
*)
ac_default_prefix=/usr
@@ -26228,6 +26226,7 @@
@@ -27517,7 +27515,7 @@
if test "${HAS_PWLIB:-unset}" != "unset"; then
- PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'`
+ PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | tr '\t' ' ' | cut -f3 -d ' ' | sed -e 's/"//g'`
PWLIB_MAJOR_VERSION=`echo ${PWLIB_VERSION} | cut -f1 -d.`
PWLIB_MINOR_VERSION=`echo ${PWLIB_VERSION} | cut -f2 -d.`
PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.`
@@ -28118,6 +28116,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -20,7 +29,7 @@ $FreeBSD$
#include <${HOME}/openh323/include/h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -26268,6 +26267,7 @@
@@ -28158,6 +28157,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@ -28,7 +37,7 @@ $FreeBSD$
#include <${HOME}/openh323/include/h323.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -26365,6 +26365,7 @@
@@ -28260,6 +28260,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -36,7 +45,7 @@ $FreeBSD$
#include </usr/local/include/openh323/h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -26405,6 +26406,7 @@
@@ -28300,6 +28301,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@ -44,7 +53,16 @@ $FreeBSD$
#include </usr/local/include/openh323/h323.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -26652,7 +26654,7 @@
@@ -28477,7 +28479,7 @@
if test "${HAS_OPENH323:-unset}" != "unset"; then
- OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'`
+ OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | tr '\t' ' ' | cut -f3 -d ' ' | sed -e 's/"//g'`
OPENH323_MAJOR_VERSION=`echo ${OPENH323_VERSION} | cut -f1 -d.`
OPENH323_MINOR_VERSION=`echo ${OPENH323_VERSION} | cut -f2 -d.`
OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.`
@@ -28552,7 +28554,7 @@
fi
@ -53,7 +71,7 @@ $FreeBSD$
if test "${HAS_OPENH323:-unset}" != "unset"; then
{ echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5
@@ -31800,6 +31802,7 @@
@@ -34788,6 +34790,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -61,7 +79,7 @@ $FreeBSD$
#include <h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -31840,6 +31843,7 @@
@@ -34828,6 +34831,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */

View file

@ -3,7 +3,7 @@ $FreeBSD$
--- configure.orig
+++ configure
@@ -3926,8 +3926,6 @@
@@ -3951,8 +3951,6 @@
case "${host_os}" in
freebsd*)
ac_default_prefix=/usr/local
@ -12,7 +12,16 @@ $FreeBSD$
;;
*)
ac_default_prefix=/usr
@@ -26228,6 +26226,7 @@
@@ -27517,7 +27515,7 @@
if test "${HAS_PWLIB:-unset}" != "unset"; then
- PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'`
+ PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | tr '\t' ' ' | cut -f3 -d ' ' | sed -e 's/"//g'`
PWLIB_MAJOR_VERSION=`echo ${PWLIB_VERSION} | cut -f1 -d.`
PWLIB_MINOR_VERSION=`echo ${PWLIB_VERSION} | cut -f2 -d.`
PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.`
@@ -28118,6 +28116,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -20,7 +29,7 @@ $FreeBSD$
#include <${HOME}/openh323/include/h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -26268,6 +26267,7 @@
@@ -28158,6 +28157,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@ -28,7 +37,7 @@ $FreeBSD$
#include <${HOME}/openh323/include/h323.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -26365,6 +26365,7 @@
@@ -28260,6 +28260,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -36,7 +45,7 @@ $FreeBSD$
#include </usr/local/include/openh323/h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -26405,6 +26406,7 @@
@@ -28300,6 +28301,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@ -44,7 +53,16 @@ $FreeBSD$
#include </usr/local/include/openh323/h323.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -26652,7 +26654,7 @@
@@ -28477,7 +28479,7 @@
if test "${HAS_OPENH323:-unset}" != "unset"; then
- OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'`
+ OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | tr '\t' ' ' | cut -f3 -d ' ' | sed -e 's/"//g'`
OPENH323_MAJOR_VERSION=`echo ${OPENH323_VERSION} | cut -f1 -d.`
OPENH323_MINOR_VERSION=`echo ${OPENH323_VERSION} | cut -f2 -d.`
OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.`
@@ -28552,7 +28554,7 @@
fi
@ -53,7 +71,7 @@ $FreeBSD$
if test "${HAS_OPENH323:-unset}" != "unset"; then
{ echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5
@@ -31800,6 +31802,7 @@
@@ -34788,6 +34790,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -61,7 +79,7 @@ $FreeBSD$
#include <h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -31840,6 +31843,7 @@
@@ -34828,6 +34831,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */

View file

@ -3,7 +3,7 @@ $FreeBSD$
--- configure.orig
+++ configure
@@ -3926,8 +3926,6 @@
@@ -3951,8 +3951,6 @@
case "${host_os}" in
freebsd*)
ac_default_prefix=/usr/local
@ -12,7 +12,16 @@ $FreeBSD$
;;
*)
ac_default_prefix=/usr
@@ -26228,6 +26226,7 @@
@@ -27517,7 +27515,7 @@
if test "${HAS_PWLIB:-unset}" != "unset"; then
- PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'`
+ PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | tr '\t' ' ' | cut -f3 -d ' ' | sed -e 's/"//g'`
PWLIB_MAJOR_VERSION=`echo ${PWLIB_VERSION} | cut -f1 -d.`
PWLIB_MINOR_VERSION=`echo ${PWLIB_VERSION} | cut -f2 -d.`
PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.`
@@ -28118,6 +28116,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -20,7 +29,7 @@ $FreeBSD$
#include <${HOME}/openh323/include/h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -26268,6 +26267,7 @@
@@ -28158,6 +28157,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@ -28,7 +37,7 @@ $FreeBSD$
#include <${HOME}/openh323/include/h323.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -26365,6 +26365,7 @@
@@ -28260,6 +28260,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -36,7 +45,7 @@ $FreeBSD$
#include </usr/local/include/openh323/h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -26405,6 +26406,7 @@
@@ -28300,6 +28301,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@ -44,7 +53,16 @@ $FreeBSD$
#include </usr/local/include/openh323/h323.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -26652,7 +26654,7 @@
@@ -28477,7 +28479,7 @@
if test "${HAS_OPENH323:-unset}" != "unset"; then
- OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'`
+ OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | tr '\t' ' ' | cut -f3 -d ' ' | sed -e 's/"//g'`
OPENH323_MAJOR_VERSION=`echo ${OPENH323_VERSION} | cut -f1 -d.`
OPENH323_MINOR_VERSION=`echo ${OPENH323_VERSION} | cut -f2 -d.`
OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.`
@@ -28552,7 +28554,7 @@
fi
@ -53,7 +71,7 @@ $FreeBSD$
if test "${HAS_OPENH323:-unset}" != "unset"; then
{ echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5
@@ -31800,6 +31802,7 @@
@@ -34788,6 +34790,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -61,7 +79,7 @@ $FreeBSD$
#include <h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -31840,6 +31843,7 @@
@@ -34828,6 +34831,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */

View file

@ -3,7 +3,7 @@ $FreeBSD$
--- configure.orig
+++ configure
@@ -3926,8 +3926,6 @@
@@ -3951,8 +3951,6 @@
case "${host_os}" in
freebsd*)
ac_default_prefix=/usr/local
@ -12,7 +12,16 @@ $FreeBSD$
;;
*)
ac_default_prefix=/usr
@@ -26228,6 +26226,7 @@
@@ -27517,7 +27515,7 @@
if test "${HAS_PWLIB:-unset}" != "unset"; then
- PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'`
+ PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | tr '\t' ' ' | cut -f3 -d ' ' | sed -e 's/"//g'`
PWLIB_MAJOR_VERSION=`echo ${PWLIB_VERSION} | cut -f1 -d.`
PWLIB_MINOR_VERSION=`echo ${PWLIB_VERSION} | cut -f2 -d.`
PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.`
@@ -28118,6 +28116,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -20,7 +29,7 @@ $FreeBSD$
#include <${HOME}/openh323/include/h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -26268,6 +26267,7 @@
@@ -28158,6 +28157,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@ -28,7 +37,7 @@ $FreeBSD$
#include <${HOME}/openh323/include/h323.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -26365,6 +26365,7 @@
@@ -28260,6 +28260,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -36,7 +45,7 @@ $FreeBSD$
#include </usr/local/include/openh323/h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -26405,6 +26406,7 @@
@@ -28300,6 +28301,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@ -44,7 +53,16 @@ $FreeBSD$
#include </usr/local/include/openh323/h323.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
@@ -26652,7 +26654,7 @@
@@ -28477,7 +28479,7 @@
if test "${HAS_OPENH323:-unset}" != "unset"; then
- OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'`
+ OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | tr '\t' ' ' | cut -f3 -d ' ' | sed -e 's/"//g'`
OPENH323_MAJOR_VERSION=`echo ${OPENH323_VERSION} | cut -f1 -d.`
OPENH323_MINOR_VERSION=`echo ${OPENH323_VERSION} | cut -f2 -d.`
OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.`
@@ -28552,7 +28554,7 @@
fi
@ -53,7 +71,7 @@ $FreeBSD$
if test "${HAS_OPENH323:-unset}" != "unset"; then
{ echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5
@@ -31800,6 +31802,7 @@
@@ -34788,6 +34790,7 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
@ -61,7 +79,7 @@ $FreeBSD$
#include <h323.h>
_ACEOF
rm -f conftest.$ac_objext
@@ -31840,6 +31843,7 @@
@@ -34828,6 +34831,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */