Bug 519459 - Semi-hardcoded include and lib directories in db.m4
Summary: Semi-hardcoded include and lib directories in db.m4
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Install/Uninstall
Version: 1.2.1
Hardware: All
OS: All
low
low
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
: 460174 (view as bug list)
Depends On:
Blocks: 434914 389_1.2.6
TreeView+ depends on / blocked
 
Reported: 2009-08-26 17:46 UTC by Evaldo Gardenali
Modified: 2015-12-07 16:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 16:40:04 UTC
Embargoed:


Attachments (Terms of Use)
patch (13.25 KB, patch)
2010-01-22 16:33 UTC, Rich Megginson
nkinder: review+
Details | Diff

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>
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. ***


Note You need to log in before you can comment on or make changes to this bug.