[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: db3 now in unstable



On Wed, 14 Mar 2001, Ben Collins wrote:

> (yes, it's fine to intermix db2 and db3 now)

Great !

> > db3-dev doesn't put things in /usr/include/db3
> >
> > How am I supposed to determine (autoconf) if building against
> > db3, db2, or db1 ?
>
> >From db.h:
>
> #define DB_VERSION_MAJOR        3
> #define DB_VERSION_MINOR        2
>
> This is true of libdb2 as well. You can also check into this function:
>
> char *db_version __P((int *, int *, int *));

I'd still like to see db3 setup like db2:
   includes in /usr/include/db3
   links in /usr/include

This is the path used in the first of the 2.4.2-acx kernels - so I
assume (yeah, I know) that its may be a more standard location.

My autoconf process now is:
#
# Check for presence of NEWDB headers
#
CPPFLAGS=""
AC_CHECK_HEADERS(db3/db.h)
AC_SUBST(ac_cv_header_db3_db_h)
AC_CHECK_HEADERS(db2/db.h)
AC_SUBST(ac_cv_header_db2_db_h)
AC_CHECK_HEADERS(db.h)
AC_SUBST(ac_cv_header_db_h)

Then, the m4 uses those values thusly:
define(`ac_cv_header_db3_db_h', `@ac_cv_header_db3_db_h@')dnl
define(`ac_cv_header_db2_db_h', `@ac_cv_header_db2_db_h@')dnl
define(`ac_cv_header_db_h', `@ac_cv_header_db_h@')dnl
ifelse(ac_cv_header_db3_db_h, `yes',
	`APPENDDEF(`confINCDIRS',         `-I/usr/include/db3')'
	`APPENDDEF(`conf_sendmail_LIBS',  `-ldb3')'
ac_cv_header_db2_db_h, `yes',
	`APPENDDEF(`confINCDIRS',         `-I/usr/include/db2')'
        `APPENDDEF(`conf_sendmail_LIBS',  `-ldb2')'
ac_cv_header_db_h, `yes',
dnl     `APPENDDEF(`confINCDIRS',         `-I/usr/include')' #not needed
        `APPENDDEF(`conf_sendmail_LIBS',  `-ldb')'
	)

All this is done to figure out how to compile sendmail....  sendmail
itself uses the things you mentioned above for determining the db
version (it supports db1, db2, and db3).

I'm (for the nonce) at a loss as how to fit db3 in without there being a
/usr/include/db3 path...

-- 
Rick Nelson
Life'll kill ya                         -- Warren Zevon
Then you'll be dead                     -- Life'll kill ya



Reply to: