Commit 57ab0879 57ab087927e117698ed06cb89512ae583396abc7 by Sergey Poznyakoff

New options: --with-gdbm, --with-ndbm, --with-old-dbm

1 parent 4547324e
...@@ -55,13 +55,38 @@ AC_ARG_WITH(mail-rc, ...@@ -55,13 +55,38 @@ AC_ARG_WITH(mail-rc,
55 esac], 55 esac],
56 [SITE_MAIL_RC="\$(sysconfdir)/mail.rc"]) 56 [SITE_MAIL_RC="\$(sysconfdir)/mail.rc"])
57 57
58 use_dbm=no
59 AC_ARG_WITH(gdbm,
60 [ --with-gdbm use GDBM],
61 [case "${withval}" in
62 yes) use_dbm=GDBM ;;
63 no) use_dbm=no ;;
64 *) AC_MSG_ERROR(bad value ${withval} for --with-gdbm) ;;
65 esac])
66
58 AC_ARG_WITH(db2, 67 AC_ARG_WITH(db2,
59 [ --with-db2 use Berkeley DB], 68 [ --with-db2 use Berkeley DB],
60 [case "${withval}" in 69 [case "${withval}" in
61 yes) usedb2=yes ;; 70 yes) use_dbm=BDB2 ;;
62 no) usedb2=no ;; 71 no) use_dbm=no ;;
63 *) AC_MSG_ERROR(bad value ${withval} for --with-db) ;; 72 *) AC_MSG_ERROR(bad value ${withval} for --with-db) ;;
64 esac],[usedb2=no]) 73 esac])
74
75 AC_ARG_WITH(ndbm,
76 [ --with-ndbm use NDBM],
77 [case "${withval}" in
78 yes) use_dbm=NDBM ;;
79 no) use_dbm=no ;;
80 *) AC_MSG_ERROR(bad value ${withval} for --with-ndbm) ;;
81 esac])
82
83 AC_ARG_WITH(dbm,
84 [ --with-old-dbm use old DBM],
85 [case "${withval}" in
86 yes) use_dbm=ODBM ;;
87 no) use_dbm=no ;;
88 *) AC_MSG_ERROR(bad value ${withval} for --with-old-dbm) ;;
89 esac])
65 90
66 AC_MSG_CHECKING(for log facility) 91 AC_MSG_CHECKING(for log facility)
67 log_facility="LOG_MAIL" 92 log_facility="LOG_MAIL"
...@@ -221,11 +246,31 @@ if test x"$usereadline" = x"yes"; then ...@@ -221,11 +246,31 @@ if test x"$usereadline" = x"yes"; then
221 -lcurses) 246 -lcurses)
222 fi 247 fi
223 248
224 dnl Check for Berkeley DB 249 dnl Check for DBM
225 if test x"${usedb2}" = x"yes"; then 250
226 AC_CHECK_LIB(db, db_open, [AC_CHECK_HEADERS(db.h, AC_DEFINE(WITH_BDB2)) 251 AC_SUBST(POPAUTH)
227 LIBS="$LIBS -ldb"]) 252 case "$use_dbm" in
228 fi 253 GDBM)
254 AC_CHECK_LIB(gdbm, gdbm_open,
255 [AC_CHECK_HEADERS(gdbm.h, AC_DEFINE(WITH_GDBM))
256 LIBS="$LIBS -lgdbm"
257 POPAUTH=popauth]);;
258 BDB2)
259 AC_CHECK_LIB(db, db_open,
260 [AC_CHECK_HEADERS(db.h, AC_DEFINE(WITH_BDB2))
261 LIBS="$LIBS -ldb"
262 POPAUTH=popauth]);;
263 NDBM)
264 AC_CHECK_LIB(ndbm, dbm_open,
265 [AC_CHECK_HEADERS(ndbm.h, AC_DEFINE(WITH_NDBM))
266 LIBS="$LIBS -lndbm"
267 POPAUTH=popauth]);;
268 ODBM)
269 AC_CHECK_LIB(dbm, dbminit,
270 [AC_CHECK_HEADERS(dbm.h, AC_DEFINE(WITH_OLD_DBM))
271 LIBS="$LIBS -ldbm"
272 POPAUTH=popauth]);;
273 esac
229 274
230 dnl Make sysconfdir available to the application 275 dnl Make sysconfdir available to the application
231 CPPFLAGS="$CPPFLAGS -DSYSCONFDIR=\\\"\$(sysconfdir)\\\"" 276 CPPFLAGS="$CPPFLAGS -DSYSCONFDIR=\\\"\$(sysconfdir)\\\""
...@@ -258,4 +303,4 @@ AC_OUTPUT(Makefile mailutils.spec include/Makefile include/mailutils/Makefile ...@@ -258,4 +303,4 @@ AC_OUTPUT(Makefile mailutils.spec include/Makefile include/mailutils/Makefile
258 mailbox/include/Makefile from/Makefile mail/Makefile pop3d/Makefile 303 mailbox/include/Makefile from/Makefile mail/Makefile pop3d/Makefile
259 frm/Makefile sieve/Makefile messages/Makefile scripts/Makefile 304 frm/Makefile sieve/Makefile messages/Makefile scripts/Makefile
260 libmu_scm/Makefile guimb/Makefile guimb/scm/Makefile 305 libmu_scm/Makefile guimb/Makefile guimb/scm/Makefile
261 MySql/Makefile) 306 MySql/Makefile mh/Makefile comsat/Makefile)
......