From 702fbfa06ed5bbdb1bc6d72c2226d84764fa6b49 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 29 Apr 2026 21:48:52 -0400 Subject: [PATCH] make the inclusion of NHUUID support the default in hints files On macOS, the required underlying pieces are in there. On Linux, we try to test for the presence of libuuid and the uuid.h header files. If the tests are both successful, we proceed to include NHUUID support. On either macOS or Linux, NO_NHUUID=1 on the Make command line will forcibly prevent the inclusion of the support for NHUUID. --- sys/unix/hints/include/multiw-2.370 | 4 --- sys/unix/hints/linux.370 | 41 ++++++++++++++++++++++++++--- sys/unix/hints/macOS.370 | 9 ++++++- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/sys/unix/hints/include/multiw-2.370 b/sys/unix/hints/include/multiw-2.370 index ca732f6c8..e1cf1633d 100644 --- a/sys/unix/hints/include/multiw-2.370 +++ b/sys/unix/hints/include/multiw-2.370 @@ -168,10 +168,6 @@ CPLUSPLUS_NEED_DEPSUPPRESS = 1 endif # WANT_WIN_QT6 endif # WANT_WIN_QT -ifdef WANT_NHUUID -USE_UUIDLIB=1 -endif - ifeq "$(GIT)" "1" ifndef GITSUBMODULES GITSUBMODULES=1 diff --git a/sys/unix/hints/linux.370 b/sys/unix/hints/linux.370 index ea239260e..a8c4bc212 100755 --- a/sys/unix/hints/linux.370 +++ b/sys/unix/hints/linux.370 @@ -227,11 +227,46 @@ ifdef MAKEFILE_SRC ifdef CURSESLIB WINLIB += $(CURSESLIB) endif #CURSESLIB -ifdef WANT_NHUUID + +ifneq "$(NO_NHUUID)" "1" +UUID_LIB_CHECK := $(shell echo `/sbin/ldconfig -p | grep libuuid`) +#$(info UUID_LIB_CHECK=$(UUID_LIB_CHECK)) +ifneq "$(UUID_LIB_CHECK)" "" +UUID_LIB=1 +else +UUID_LIB=0 +endif +#$(info UUID_LIB=$(UUID_LIB)) +# +# check for uuid development headers +UUID_HEADERS_CHECK := $(wildcard /usr/include/uuid/uuid.h) +#$(info UUID_HEADERS_CHECK=$(UUID_HEADERS_CHECK)) +ifneq "$(UUID_HEADERS_CHECK)" "" +UUID_HEADERS = 1 +else +UUID_HEADERS = 0 +endif +#$(info UUID_HEADERS=$(UUID_HEADERS)) + +ifeq "$(UUID_LIB)" "1" +ifeq "$(UUID_HEADERS)" "1" +ifndef WANT_NHUUID +WANT_NHUUID=1 +endif +endif +endif +else # NO_NHUUID +WANT_NHUUID=0 +endif # NO_NHUUID + +ifeq "$(WANT_NHUUID)" "1" +#$(info NHUUID support will be included) CFLAGS+= -DNHUUID LIBS+=-luuid -endif #NHUUID -endif #MAKEFILE_SRC +else # WANT_NHUUID +$(info Attention - No NHUUID support will be included) +endif # WANT_NHUUID +endif # MAKEFILE_SRC ifdef WANT_WIN_X11 USE_XPM=1 diff --git a/sys/unix/hints/macOS.370 b/sys/unix/hints/macOS.370 index 006c54a45..c48926805 100755 --- a/sys/unix/hints/macOS.370 +++ b/sys/unix/hints/macOS.370 @@ -216,11 +216,18 @@ LFLAGS += -framework AVFoundation endif ifdef MAKEFILE_SRC +ifndef NO_NHUUID +# macOS doesn't need any extra prerequisite libraries +# so do this unconditionally, unless NO_NHUUID=1 is +# passed on the Make command line. +WANT_NHUUID=1 +endif #NO_NHUUID + ifdef WANT_NHUUID CFLAGS += -DNHUUID UUIDOBJ = macuuid.o endif -endif +endif #MAKEFILE_SRC # #-INCLUDE multisnd1-pre.370