Feature #1056
libuuid - non-portabile configure.in
| Status: | New | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | jan | % Done: | 0% |
|
| Category: | mod_webdav | |||
| Target version: | - | |||
| Pending: | Resolution: | |||
Description
The current configure.in depends on the presence of a libuuid that is compatible with the e2fsprogs implementation. It assumes 1) the header is /uuid/uuid.h; and 2) uuid_unparse is the function needed to get the string rep of a uuid.
This doesn't work for the OSSP implementation, which puts the header by default in /usr/local/include and uses uuid_export to get at the string representation of a uuid. See http://www.ossp.org/pkg/lib/uuid/.
The OpenBSD ports collection includes the OSSP implementation.
ToDo: 1) fix configure.in to either check for either lib, or to support a --with-uuid=implementation or the like.
Bug: currently if uuid/uuid.h is found, HAVE_UUID_H is #defined. It should be HAVE_UUID_UUID_H.
2) fix mod_webdav.c #includes:
l 23: #if defined(HAVE_LIBXML_H) && defined(HAVE_SQLITE3_H) && defined(HAVE_UUID_H)
will have to branch on HAVE_UUID_H (OSSP implementation) and HAVE_UUID_UUID_H (e2fsprgs implementation). Or maybe define HAVE_OSSP_UUID, HAVE_E2FSPRGS_UUID instead.
2) fix mod_webdav.c usage
line 2301: uuid_unparse(id, uuid);
OSSP does it this way: uuid_export(id, UUID_FMT_STR, (void **)&uuid, NULL);
Proposal: to avoid another #ifdef in the code, have configure.in create a parameterized UUID2STR macro that will substitute the approprite function call.