-dnl Check for CNID DB support
-AC_ARG_ENABLE(cnid-db,
- [ --enable-cnid-db use persistent cnid database per volume (EXPERIMENTAL) ],
- if test "x$enableval" = "xyes"; then
- dnl Now we need DB3
- db3_required="yes"
-
- dnl Note that we don't AC_DEFINE(CNID_DB, 1) here...
- dnl we have to check for the library first.
- dnl AC_MSG_RESULT([db3 check enabled])
+dnl Determine DID scheme
+AC_MSG_CHECKING([for DID scheme to use])
+AC_ARG_WITH(did,
+ [ --with-did=SCHEME set DID scheme (cnid,last)],
+ [ did_scheme="$withval" ],
+ [ did_scheme="cnid" ]
+)
+
+if test "x$did_scheme" = "xlast"; then
+ AC_DEFINE(USE_LASTDID, 1)
+ AC_MSG_RESULT([last])
+elif test "x$did_scheme" = "xcnid"; then
+ db3_required="yes"
+ AC_DEFINE(CNID_DB, 1)
+ AC_MSG_RESULT([enabling build with CNID DB support])
+else
+ AC_MSG_ERROR([unknown DID scheme])
+fi
+AM_CONDITIONAL(COMPILE_CNID, test "x$did_scheme" = "xcnid")
+
+dnl Determine whether or not to use filename mangling
+AC_MSG_CHECKING([whether or not to use filename mangling])
+AC_ARG_WITH(mangling,
+ [ --with-mangling enable filename mangling],
+ if test "$withval" = "yes"; then
+ if test "x$did_scheme" != "xcnid"; then
+ AC_MSG_ERROR([DID scheme must be CNID to use filename mangling])
+ else
+ AC_DEFINE(FILE_MANGLING, 1)
+ AC_MSG_RESULT([yes])
+ fi
+ else
+ AC_MSG_RESULT([no])