Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bpo-45847: Fix uuid detection on macOS
  • Loading branch information
tiran committed Dec 6, 2021
commit 80aa277136310ad246ba677d515deb1eddf1c23e
27 changes: 27 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -10559,6 +10559,33 @@ fi
done


if test "x$have_uuid" = xmissing; then :

for ac_header in uuid/uuid.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UUID_UUID_H 1
_ACEOF

ac_fn_c_check_func "$LINENO" "uuid_generate_time" "ac_cv_func_uuid_generate_time"
if test "x$ac_cv_func_uuid_generate_time" = xyes; then :

have_uuid=yes
LIBUUID_CFLAGS=
LIBUUID_LIBS=

fi


fi

done


fi

if test "x$have_uuid" = xmissing; then :


Expand Down
11 changes: 11 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2952,6 +2952,17 @@ AC_CHECK_HEADERS([uuid.h], [
])
])

dnl macOS has uuid/uuid.h but uuid_generate_time is in libc
AS_VAR_IF([have_uuid], [missing], [
AC_CHECK_HEADERS([uuid/uuid.h], [
AC_CHECK_FUNC([uuid_generate_time], [
have_uuid=yes
LIBUUID_CFLAGS=
LIBUUID_LIBS=
])
])
])

AS_VAR_IF([have_uuid], [missing], [
PKG_CHECK_MODULES(
[LIBUUID], [uuid >= 2.20], [
Expand Down