On 17/01/2003 at 6:53 Christopher Riordan wrote: >--with-dbdir=/usr/local/BerkeleyDB.4.1 > >Running FreeBSD 4.7 > >gcc -c -I.. -I/usr/local/include -I/usr/local/include -DHAVE_CONFIG_H -I. -I. -Wall >-g -O2 cyrusdb_berkeley.c >cyrusdb_berkeley.c:86: syntax error before `*' ... >Stop in /usr/local/src/cyrus/cyrus-imapd-2_2/lib. >*** Error code 1
It seems a problem with db.h header file. >here is the output from Configure line above ... >checking db.h usability... yes >checking db.h presence... yes >checking for db.h... yes >checking for db_create in -ldb-4.1... no >checking for db_create in -ldb4.1... no >checking for db_create in -ldb-4.0... no >checking for db_create in -ldb4.0... no >checking for db_create in -ldb-4... no >checking for db_create in -ldb4... yes However it seems to detect a usable "db.h", strange. have you another "db.h" in your system apart of /usr/local/BerkeleyDB.4.1 one? The real problem is that actually configure script is 1) ignoring --with-dbdir, and 2) --with-bdb-libdir and --with-bdb-incdir are not used at the time of checking. Here's a patch: > cvs -d :pserver:[EMAIL PROTECTED]:/cvs diff -r cyrus-imapd-2_2 configure.in >cmulocal/* Index: configure.in =================================================================== RCS file: /cvs/src/cyrus/configure.in,v retrieving revision 1.232.4.32 diff -u -r1.232.4.32 configure.in --- configure.in 2003/01/17 15:29:15 1.232.4.32 +++ configure.in 2003/01/17 19:47:23 @@ -127,9 +127,7 @@ dnl support old-style AC_ARG_WITH(dbdir, - [ --with-dbdir=DIR Berkeley DB files are in prefix DIR], - with_bdb_lib="$withval/lib"; with_db_inc="$withval/include", - with_bdb_lib=none; with_bdb_inc=none) + [ --with-dbdir=DIR Berkeley DB files are in prefix DIR]) CYRUS_BERKELEY_DB_CHK() Index: cmulocal/berkdb.m4 =================================================================== RCS file: /cvs/src/cmulocal/berkdb.m4,v retrieving revision 1.3.4.1 diff -u -r1.3.4.1 berkdb.m4 --- berkdb.m4 2002/12/10 20:57:06 1.3.4.1 +++ berkdb.m4 2003/01/17 19:47:26 @@ -89,12 +89,18 @@ [ --with-db-lib=dir use db libraries in dir], [if test "$withval" = "yes" -o "$withval" = "no"; then AC_MSG_ERROR([No argument for --with-db-lib]) - fi]) + fi], + [if test -n "$with_dbdir"; then + with_db_lib="${with_dbdir}/lib" + fi]) AC_ARG_WITH(db-include, [ --with-db-include=dir use db headers in dir], [if test "$withval" = "yes" -o "$withval" = "no"; then AC_MSG_ERROR([No argument for --with-db-include]) - fi]) + fi], + [if test -n "$with_dbdir"; then + with_db_inc="${with_dbdir}/include" + fi]) AC_ARG_ENABLE(db4, [ --enable-db4 use db 4.x libraries]) @@ -233,11 +239,19 @@ AC_ARG_WITH(bdb-libdir, [ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR], with_bdb_lib=$withval, - with_bdb_lib=none) + [if test -n "$with_dbdir"; then + with_bdb_lib="${with_dbdir}/lib" + else + with_bdb_lib=none + fi]) AC_ARG_WITH(bdb-incdir, [ --with-bdb-incdir=DIR Berkeley DB include files are in DIR], with_bdb_inc=$withval, - with_bdb_inc=none) + [if test -n "$with_dbdir"; then + with_bdb_inc="${with_dbdir}/include" + else + with_bdb_inc=none + fi]) ]) AC_DEFUN(CYRUS_BERKELEY_DB_CHK, @@ -250,9 +264,19 @@ BDB_INCADD="" fi + SAVE_CPPFLAGS=${CPPFLAGS} + CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}" + + dnl Note that FreeBSD puts it in a wierd place + dnl (but they should use with-bdb-incdir) + AC_CHECK_HEADER(db.h, + CYRUS_BERKELEY_DB_CHK_LIB(), + dblib="no") dnl Note that FreeBSD puts it in a wierd place dnl (but they should use with-bdb-incdir) AC_CHECK_HEADER(db.h, CYRUS_BERKELEY_DB_CHK_LIB(), dblib="no") + + CPPFLAGS=${SAVE_CPPFLAGS} ]) Regards, Carlos Velasco