configure.ac: Restructure uuid library detection.
The 'uuid' library functionality may be located in a separate 'uuid' library, but it may also be included in the standard C library. This is the case on Mac OS X. Instead of relying on the uuid code being located in a 'uuid' library, we restructure the code so that it checks different libraries, in order for the 'uuid_generate' function. This code is easy to extend if we would find a new configuration where uuid_generate is located in a different library.edge.strict_endians
parent
11a7e8297d
commit
ea55e5e3c8
46
configure.ac
46
configure.ac
|
@ -375,16 +375,46 @@ if test "x$extrapath" != "x"; then
|
|||
MKNTFS_CPPFLAGS="$MKNTFS_CPPFLAGS -I$extrapath/include"
|
||||
MKNTFS_LIBS="$MKNTFS_LIBS -L$extrapath/lib"
|
||||
fi
|
||||
|
||||
search_for_luuid="yes"
|
||||
AC_CHECK_HEADER([uuid/uuid.h],
|
||||
AC_CHECK_LIB([uuid], [uuid_generate],
|
||||
AC_DEFINE([ENABLE_UUID], 1,
|
||||
[Define this to 1 if you want to enable generation of
|
||||
DCE compliant UUIDs.])
|
||||
MKNTFS_LIBS="$MKNTFS_LIBS -luuid",
|
||||
AC_MSG_WARN([ntfsprogs DCE compliant UUID generation code requires the uuid library.]),
|
||||
),
|
||||
AC_MSG_WARN([ntfsprogs DCE compliant UUID generation code requires the uuid library.]),
|
||||
[],
|
||||
[
|
||||
AC_MSG_WARN([ntfsprogs DCE compliant UUID generation code requires the uuid library.])
|
||||
search_for_luuid="no"
|
||||
],
|
||||
)
|
||||
|
||||
if test "x$search_for_luuid" != "xno"; then
|
||||
# Look for uuid_generate in the standard C library.
|
||||
AC_CHECK_FUNC([uuid_generate],
|
||||
[
|
||||
AC_DEFINE([ENABLE_UUID], 1,
|
||||
[Define this to 1 if you want to enable
|
||||
generation of DCE compliant UUIDs.])
|
||||
search_for_luuid="no"
|
||||
],
|
||||
[],
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$search_for_luuid" != "xno"; then
|
||||
# Look for uuid_generate in the 'uuid' library.
|
||||
AC_CHECK_LIB([uuid], [uuid_generate],
|
||||
[
|
||||
AC_DEFINE([ENABLE_UUID], 1,
|
||||
[Define this to 1 if you want to enable
|
||||
generation of DCE compliant UUIDs.])
|
||||
MKNTFS_LIBS="$MKNTFS_LIBS -luuid"
|
||||
search_for_luuid="no"
|
||||
],
|
||||
[],
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$search_for_luuid" != "xno"; then
|
||||
AC_MSG_WARN([ntfsprogs DCE compliant UUID generation code requires the uuid library.])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Checks for header files.
|
||||
|
|
Loading…
Reference in New Issue