[asterisk-bugs] [Asterisk 0014906]: [patch] Incorrectly configure (autoconf) when using the --with-something=directory construct with non standard directories

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Aug 26 17:47:30 CDT 2009


The following issue has been UPDATED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=14906 
====================================================================== 
Reported By:                gknispel_proformatique
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14906
Category:                   Core/BuildSystem
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.24 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-04-15 09:54 CDT
Last Modified:              2009-08-26 17:47 CDT
====================================================================== 
Summary:                    [patch] Incorrectly configure (autoconf) when using
the --with-something=directory construct with non standard directories
Description: 
Asterisk ./configure is broken when trying something like:

./configure --with-libpri=/non_standard_path/to/libpri

(where /non_standard_path/to/libpri contains an unpacked and built version
of libpri-1.4.9.tar.gz)

The problem relates to the macro AST_EXT_LIB_CHECK, which is called 3
times for libpri:

AST_EXT_LIB_CHECK([PRI], [pri], [pri_keypad_facility], [libpri.h])
AST_EXT_LIB_CHECK([PRI_VERSION], [pri], [pri_get_version], [libpri.h])
AST_EXT_LIB_CHECK([PRI_INBANDDISCONNECT], [pri],
[pri_set_inbanddisconnect], [libpri.h])

The first one generates somethings that make sense:

if test "${USE_PRI}" != "no"; then
   pbxlibdir=""
   if test "x${PRI_DIR}" != "x"; then
      if test -d ${PRI_DIR}/lib; then
      	 pbxlibdir="-L${PRI_DIR}/lib"
      else
      	 pbxlibdir="-L${PRI_DIR}"
      fi
   fi
[...]

But the second yields (and the third one yields something similar):
if test "${USE_PRI_VERSION}" != "no"; then
   pbxlibdir=""
   if test "x${PRI_VERSION_DIR}" != "x"; then
      if test -d ${PRI_VERSION_DIR}/lib; then
      	 pbxlibdir="-L${PRI_VERSION_DIR}/lib"
      else
      	 pbxlibdir="-L${PRI_VERSION_DIR}"
      fi
   fi
[...]

Of course PRI_VERSION_DIR does not exist and while HAVE_PRI is correctly
defined to 1, HAVE_PRI_VERSION (and HAVE_PRI_INBANDDISCONNECT) are
incorrectly undefined.

Similar problems exist for other dependencies (include and/or lib paths
incorrect in configure script) -- I've not check if everything relates to
AST_EXT_LIB_CHECK and its use or if other macros are involved.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-26 17:47 tilghman       Summary                  Incorrectly configure
(autoconf) when using the --with-something=directory construct with non standard
directories => [patch] Incorrectly configure (autoconf) when using the
--with-something=directory construct with non standard directories
======================================================================




More information about the asterisk-bugs mailing list