GUAC-762: Check for ossp/uuid.h vs uuid.h.

This commit is contained in:
Michael Jumper 2014-07-02 13:33:47 -07:00
parent 633a0fe371
commit dfafd021cf
2 changed files with 15 additions and 0 deletions

View File

@ -67,6 +67,17 @@ AC_CHECK_LIB([ossp-uuid], [uuid_make], [UUID_LIBS=-lossp-uuid],
AC_CHECK_LIB([uuid], [uuid_make], [UUID_LIBS=-luuid],
AC_MSG_ERROR("The OSSP UUID library is required")))
# Check for and validate OSSP uuid.h header
AC_CHECK_HEADERS([ossp/uuid.h])
AC_CHECK_DECL([uuid_make],,
AC_MSG_ERROR("No OSSP uuid.h found in include path"),
[#ifdef HAVE_OSSP_UUID_H
#include <ossp/uuid.h>
#else
#include <uuid.h>
#endif
])
# cunit
AC_CHECK_LIB([cunit], [CU_run_test], [CUNIT_LIBS=-lcunit])

View File

@ -33,7 +33,11 @@
#include "stream.h"
#include "timestamp.h"
#ifdef HAVE_OSSP_UUID_H
#include <ossp/uuid.h>
#else
#include <uuid.h>
#endif
#include <stdarg.h>
#include <stdio.h>