[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Zmailer autoconf



Just noticed that ./configure uses /etc/zmailer.conf to supply default
values.  Way cool!  If it could also deal more gracefully with
smtpserver.conf, sm.com, scheduler.conf and router.cf that would be
perfect!  But I understand that it'd be much much harder due to
different syntax...

While we are here.  For me, subsequent runs of configure always fail
telling something about "config.cache inconsistency" and mentioning
"db" type...  Have to remove config.cache before every configure.

And one more about configure: I have an autoconf test that tries to
determine authoritatively if ndbm is bsd db (hmm, just mistyped it as
"bad db" which suits better;), look if you want to use something
similar:

====
AC_MSG_CHECKING([if ndbm is in fact BSD db])
AC_CACHE_VAL(ac_cv_is_bsd_db, [AC_TRY_RUN([
#include <sys/types.h>
#ifdef STDC_HEADERS
#include <stdio.h>
#endif
#ifdef HAVE_NDBM_H
#include <ndbm.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
 
int main(argc,argv)
int argc;
char *argv[];
{
        FILE *in,*out;
        DBM *db;
        int ok=0;
 
        /* if this is BSD db, dbm_open creates new file and its extention
           is ".db".  On the contrary, ndbm (sdbm, gdbm) require that you
           pre-create empty ".dir" and ".pag" files */
 
        db=dbm_open("conftestdb",O_RDWR | O_CREAT,0644);
        dbm_close(db);
        if ((in=fopen("conftestdb.db","r"))) {
                close(in);
                ok=1;
        }
        if ((out=fopen("conftestdata","w"))) {
                fprintf(out,ok?"yes\n":"no\n");
                fclose(out);
                exit(0);
        }
        exit(1);
}
], [
  read ac_cv_is_bsd_db <conftestdata
], [
  AC_MSG_CHECKING([(failed to run test progam, using default)])
  ac_cv_is_bsd_db=no
], [
  AC_MSG_CHECKING([(default for cross-compiling)])
  ac_cv_is_bsd_db=no
])])dnl
AC_MSG_RESULT($ac_cv_is_bsd_db)
if test X$ac_cv_is_bsd_db = Xyes; then
        AC_DEFINE(HAVE_BSD_DB)dnl
fi
====

Eugene