apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <I...@cnet.com>
Subject Re: dbm changes broke httpd-2.0
Date Thu, 29 Nov 2001 01:53:49 GMT
looks good aaron,
but then I broke it in the first place 
;-0
On Wed, 2001-11-28 at 17:50, Aaron Bannert wrote:
> On Wed, Nov 28, 2001 at 05:19:33PM -0800, Ian Holsman wrote:
> > how is this ?
> ...
> > -AC_CHECK_HEADER(db1/db.h, [
> > -  apu_have_db=1
> > -  db_header=db1/db.h
> > -  db_lib=db1
> > -  ])
> > -])
> > +
> > +AC_CHECK_LIB( db1, dbopen, 
> > +    [ AC_CHECK_HEADER( db1/db.h, 
> > +        [ apu_have_db=1
> > +        db_header=db1/db.h db_lib=1 ], apu_have_db=0)],
> > +        ) ]
> > +      AC_MSG_WARN( "db1 DBM not found"),)
> > +
> 
> That's pretty much where I was headed, but I opted to omit the AC_MSG_WARN
> since it's not required to have db1 or gdbm support. This works for me:
> 
> 
> Index: srclib/apr-util/build/apu-conf.m4
> ===================================================================
> RCS file: /home/cvs/apr-util/build/apu-conf.m4,v
> retrieving revision 1.16
> diff -u -r1.16 apu-conf.m4
> --- srclib/apr-util/build/apu-conf.m4	2001/11/28 17:34:17	1.16
> +++ srclib/apr-util/build/apu-conf.m4	2001/11/29 01:27:19
> @@ -65,11 +65,11 @@
>  dnl
>  AC_DEFUN(APU_CHECK_DB1,[
>  AC_CHECK_HEADER(db1/db.h, [
> +  AC_CHECK_LIB(db1, dbopen, [
>    apu_have_db=1
>    db_header=db1/db.h
>    db_lib=db1
> -  ])
> -])
> +  ])])])
>  
>  dnl
>  dnl APU_CHECK_DB185: is DB1.85 present?
> @@ -78,11 +78,11 @@
>  dnl
>  AC_DEFUN(APU_CHECK_DB185,[
>  AC_CHECK_HEADER(db_185.h, [
> +  AC_CHECK_LIB(db, dbopen, [
>    apu_have_db=1
>    db_header=db_185.h
>    db_lib=db1
> -  ])
> -])
> +  ])])])
>  
>  dnl
>  dnl APU_CHECK_DB2or3: are DB2 or DB3 present?
> @@ -91,11 +91,11 @@
>  dnl
>  AC_DEFUN(APU_CHECK_DB2or3,[
>  AC_CHECK_HEADER(db.h, [
> +  AC_CHECK_LIB(db2, db_open, [
>    apu_have_db=1
>    db_header=db.h
>    db_lib=db
> -  ])
> -])
> +  ])])])
>  
>  dnl
>  dnl APU_CHECK_DB_VSN: check the actual version of db (for db2 or db3)
> @@ -125,6 +125,7 @@
>  dnl if found, then which_dbm is set to one of: db1, db185, db2, db3
>  dnl
>  AC_DEFUN(APU_FIND_DB,[
> +  apu_have_db=0
>    APU_CHECK_DB2or3
>    if test $apu_have_db = 1; then
>      APU_CHECK_DB_VSN
> @@ -169,11 +170,8 @@
>    look_for=default
>  ])
>  
> -AC_CHECK_LIB( gdbm, gdbm_open, 
> -    [ AC_CHECK_HEADER( gdbm.h, 
> -        apu_have_gdbm=1,
> -        apu_have_gdbm=0)],
> -      AC_MSG_WARN( "gdbm DBM not found"),)
> +apu_have_gdbm=0
> +AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [apu_have_gdbm=1]))
>  
>  APU_FIND_DB
>  
> @@ -238,6 +236,8 @@
>      ;;
>    default)
>      dnl ### use more sophisticated DBMs for the default?
> +    dnl If we're specifying --with-dbm=default then we don't need -ldb
> +    apu_have_db=0
>      which_dbm="sdbm (default)"
>      apu_use_sdbm=1
>      ;;
> 
> It could be made more robust by adding more functions to the AC_CHECK_LIB
> list.
> 
> -aaron
-- 
Ian Holsman
Performance Measurement & Analysis
CNET Networks    -    415 344-2608

Mime
View raw message