Bug 519459

Summary: Semi-hardcoded include and lib directories in db.m4
Product: [Retired] 389 Reporter: Evaldo Gardenali <evaldo>
Component: Install/UninstallAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: low Docs Contact:
Priority: low    
Version: 1.2.1CC: bwailea+11, jgalipea, rmeggins
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-07 16:40:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 434914, 543590    
Attachments:
Description Flags
patch nkinder: review+

Description Evaldo Gardenali 2009-08-26 17:46:20 UTC
Description of problem:
semi-hardcoded db_incdir="$DBDIR/include" should be better handled for --with-db-dir and --with-db-inc instead of the current checks

Version-Release number of selected component (if applicable):
389-ds-base 1.2.2

How reproducible:


Steps to Reproduce:
1. Install db with include directory set to prefix/include/db4
2. ./configure --with-db=prefix --with-db-inc=prefix/include/db4
  
Actual results:
Aborted configure script

Expected results:
Configure script finished successfully and include directory correctly set on Makefiles

Additional info:
WARNING: EXTREMELY UGLY PATCH BELOW THIS POINT! This was just coded to test the validity of the bug and allow me to work on other stuff while this gets fixed upstream.

--- m4/db.m4.orig       2009-05-26 11:57:29.000000000 -0300
+++ m4/db.m4
@@ -43,7 +43,11 @@ AC_ARG_WITH(db, [  --with-db=PATH   Berk
     db_libdir="$DBDIR/lib"
     db_incdir="$DBDIR/include"
     if ! test -e "$db_incdir/db.h" ; then
-      AC_MSG_ERROR([$withval include dir not found])
+      if test -e "$db_incdir/db4/db.h" ; then
+        db_incdir="$DBDIR/include/db4"
+      else
+        AC_MSG_ERROR([$withval include dir not found])
+      fi
     fi
     db_inc="-I$db_incdir"
   else

Comment 1 Rich Megginson 2010-01-22 16:33:07 UTC
Created attachment 386186 [details]
patch

Comment 2 Rich Megginson 2010-01-22 19:22:37 UTC
To ssh://git.fedorahosted.org/git/389/ds.git
   b5e653a..1292eef  master -> master

commit 1292eef3093c98a7f92ad9d7071c03ad76bb43db
Author: Rich Megginson <rmeggins@redhat.com>
Date:   Fri Jan 22 09:17:33 2010 -0700

    Reviewed by: nkinder (Thanks!)
    Branch: HEAD
    Fix Description: Added --with-db-inc and --with-db-lib to configure.  For th
    default case, check first in /usr/include/db4, then in /usr/include.
    Platforms tested: RHEL5 x86_64
    Flag Day: no
    Doc impact: no

Comment 3 Rich Megginson 2010-01-22 19:33:28 UTC
*** Bug 460174 has been marked as a duplicate of this bug. ***