diff options
author | Roger Pau Monne <roger.pau@entel.upc.edu> | 2012-03-14 14:19:42 +0000 |
---|---|---|
committer | Roger Pau Monne <roger.pau@entel.upc.edu> | 2012-03-14 14:19:42 +0000 |
commit | 35ab4e22797545b4ed3f5430fb18d9ca002bf373 (patch) | |
tree | a9e0f7e7dfaf93c851fd4779000b7dcc66d3a80f /tools/m4 | |
parent | 5ca9053cee7d508fcabaf9a591c26930c0957aaa (diff) | |
download | xen-35ab4e22797545b4ed3f5430fb18d9ca002bf373.tar.gz xen-35ab4e22797545b4ed3f5430fb18d9ca002bf373.tar.bz2 xen-35ab4e22797545b4ed3f5430fb18d9ca002bf373.zip |
autoconf: check for uuid.h or uuid/uuid.h with -luuid
Check for uuid/uuid.h and if found check for -luuid usability (Linux
case), if not, check for uuid (NetBSD). One of this tests has to
succeed to be able to build Xen tools.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/m4')
-rw-r--r-- | tools/m4/uuid.m4 | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/m4/uuid.m4 b/tools/m4/uuid.m4 index 8e5cd31861..117da5c09d 100644 --- a/tools/m4/uuid.m4 +++ b/tools/m4/uuid.m4 @@ -1,10 +1,9 @@ -AC_DEFUN([AX_CHECK_UUID], -[if test "x$host_os" == "xlinux-gnu" -then - AC_CHECK_HEADER([uuid/uuid.h],, - [AC_MSG_ERROR([cannot find uuid headers])]) -else - AC_CHECK_HEADER([uuid.h],, - [AC_MSG_ERROR([cannot find uuid headers])]) -fi +AC_DEFUN([AX_CHECK_UUID], [ +AC_CHECK_HEADER([uuid/uuid.h],[ + AC_CHECK_LIB([uuid], [uuid_clear], [libuuid="y"]) +]) +AC_CHECK_HEADER([uuid.h],[libuuid="y"]) +AS_IF([test "$libuuid" != "y"], [ + AC_MSG_ERROR([cannot find a valid uuid library]) +]) ]) |