[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
Thu Aug 27 11:15:36 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=14906 
====================================================================== 
Reported By:                gknispel_proformatique
Assigned To:                lmadsen
====================================================================== 
Project:                    Asterisk
Issue ID:                   14906
Category:                   Core/BuildSystem
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
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-27 11:15 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.

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

---------------------------------------------------------------------- 
 (0109741) svnbot (reporter) - 2009-08-27 11:15
 https://issues.asterisk.org/view.php?id=14906#c109741 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 214361

_U  branches/1.6.0/
U   branches/1.6.0/autoconf/ast_ext_lib.m4
U   branches/1.6.0/configure
U   branches/1.6.0/include/asterisk/autoconfig.h.in

------------------------------------------------------------------------
r214361 | tilghman | 2009-08-27 11:15:35 -0500 (Thu, 27 Aug 2009) | 17
lines

Merged revisions 214360 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r214360 | tilghman | 2009-08-27 11:12:03 -0500 (Thu, 27 Aug 2009) | 10
lines
  
  Merged revisions 214357 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r214357 | tilghman | 2009-08-27 11:03:50 -0500 (Thu, 27 Aug 2009) | 3
lines
    
    Make autoheader descriptions render correctly in our autoconfig.h
file.
    (Figured out while working with issue
https://issues.asterisk.org/view.php?id=14906)
  ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=214361 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-27 11:15 svnbot         Checkin                                      
2009-08-27 11:15 svnbot         Note Added: 0109741                          
======================================================================




More information about the asterisk-bugs mailing list