From xemacs-m  Thu Apr 24 05:03:45 1997
Received: from bittersweet.inetarena.com (karlheg@bittersweet.inetarena.com [206.129.216.38])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id FAA24509
	for <xemacs-beta@xemacs.org>; Thu, 24 Apr 1997 05:03:43 -0500 (CDT)
Received: (from karlheg@localhost)
	by bittersweet.inetarena.com (8.8.5/8.8.5) id DAA08834;
	Thu, 24 Apr 1997 03:05:41 -0700
Date: Thu, 24 Apr 1997 03:05:41 -0700
Message-Id: <199704241005.DAA08834@bittersweet.inetarena.com>
From: "Karl M. Hegbloom" <karlheg@inetarena.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: <xemacs-beta@xemacs.org>
Subject: <db/db.h> vs <db.h> Linux question
X-Mailer: VM 6.29 under 20.1 XEmacs Lucid
X-Face: /Q}=yl}1_v7nP)xXo5XjG8+tl@=uVu7o5u6)f]zN?+<hB!K.m9:[|*p34jVN`O;:XZXVSy>/\R>qDt(t8w!-i{(y0"`jFw^uk8inzO9wXabd'CdjUWfC\GHi:6nO*YC89#-qD>Q4r%9!V"<RYJ=7D#$";q=zML5'!=wvXk^$`6FT=5CMofQX)WUKt0p:OKl.mFOXx/D


 On my Debian GNU/Linux setup, the Berkely DB includes are in
"/usr/include/db", and need to be used with #include <db/db.h>.
Apparently, the other Linux distributions do not install them there. [1]

 So, each time I compile XEmacs, I have to fix "src/database.c".  I
propose this patch, and wonder if this is the RIGHT way to do this.
(you tell me, and we'll both know.)

*** database.c~	Wed Feb  5 18:08:18 1997
--- database.c	Thu Apr 24 02:54:43 1997
***************
*** 29,35 ****
--- 29,39 ----
  #ifdef HAVE_DATABASE
  #include <database.h>         /* Our include file     */
  #ifdef HAVE_BERKELEY_DB
+ #ifdef DEBIAN  /* define in CFLAGS from configure commandline */
+ #include <db/db.h>
+ #else
  #include <db.h>                       /* Berkeley db access   */
+ #endif
  #endif
  #ifdef HAVE_DBM
  #include <ndbm.h>

 The right way would be to have configure devine that this machine is
Debian GNU/Linux, by looking for [ -f "/etc/debian_version" ].  I
don't know how to add that; I gather that Steven would have to do it?

 Or, perhaps, configure should see if db.h is in <db/db.h> if it's not
found in <db.h>.


Footnotes: 
[1]  The reason it is done is because other packages can have a db.h
include file that way; I know for sure that rscheme has an
<rscheme/db.h>, because the first try package had placed it in
"/usr/include", causing an XEmacs compile to find it rather than the
Berkley DB one, which is properly under <db/db.h>.

-- 
Karl M. Hegbloom <karlheg@inetarena.com>
http://www.inetarena.com/~karlheg
Portland, OR  USA
Debian GNU 1.2  Linux 2.0.30t
Have you seen the Emperor's new red hat? :-o

