From f0ee8f0b7ebeb38c2a6216733d981b18fe73d525 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Nov 12 2010 16:27:59 +0000 Subject: - try to be more flexible about where we look for uuid.h util-linux-ng's uuid.pc says -I/usr/include/uuid e2fsprogs's uuid.pc said -I/usr/include and both of them put the header in /usr/include/uuid/uuid.h --- diff --git a/configure.ac b/configure.ac index 3cbcd38..2032c17 100644 --- a/configure.ac +++ b/configure.ac @@ -319,9 +319,20 @@ if pkg-config uuid ; then uuid=yes fi ]) +# Older uuid pkgconfig sets us up to need . Newer versions +# set us up to need . +savedCFLAGS="$CFLAGS" +CFLAGS="$UUID_CFLAGS" +AC_CHECK_HEADERS(uuid.h uuid/uuid.h) +CFLAGS="$savedCFLAGS" if test x$uuid = xyes ; then AC_DEFINE(HAVE_UUID,1,[Define to have the ability to populate subjectUniqueID in self-signed certs.]) fi +if test x$ac_cv_header_uuid_uuid_h = xno ; then + if test x$ac_cv_header_uuid_h = xno ; then + AC_MSG_ERROR(uuid.h header file not found) + fi +fi CM_DEFAULT_POPULATE_UNIQUE_ID=no AC_SUBST(CM_DEFAULT_POPULATE_UNIQUE_ID) AC_DEFINE_UNQUOTED(CM_DEFAULT_POPULATE_UNIQUE_ID,"$CM_DEFAULT_POPULATE_UNIQUE_ID",[Define to the default for the selfsign/populate_unique_id configuration setting.]) diff --git a/src/submit-u.c b/src/submit-u.c index 8760133..5ae7f00 100644 --- a/src/submit-u.c +++ b/src/submit-u.c @@ -28,7 +28,11 @@ #include #ifdef HAVE_UUID +#if defined(HAVE_UUID_H) #include +#elif defined(HAVE_UUID_UUID_H) +#include +#endif #endif #include "log.h"