1
0
mirror of https://github.com/simh/simh.git synced 2026-01-26 04:01:38 +00:00

SCP, makefile: Rename build conditional HAVE_DLOPEN to SIM_HAVE_DLOPEN

Some dependent packages on some platforms may also define HAVE_DLOPEN
and that definition may have different syntax or semantics.  This change
avoids the potential symbol conflict.

As reported in #1098
This commit is contained in:
Mark Pizzolato
2021-12-04 17:44:57 -08:00
parent 3621db4e6a
commit c5cd38afbf
6 changed files with 23 additions and 23 deletions

View File

@@ -577,21 +577,21 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
endif
ifneq (,$(call find_include,dlfcn))
ifneq (,$(call find_lib,dl))
OS_CCDEFS += -DHAVE_DLOPEN=$(LIBSOEXT)
OS_CCDEFS += -DSIM_HAVE_DLOPEN=$(LIBSOEXT)
OS_LDFLAGS += -ldl
$(info using libdl: $(call find_lib,dl) $(call find_include,dlfcn))
else
ifneq (,$(findstring BSD,$(OSTYPE))$(findstring AIX,$(OSTYPE))$(findstring Haiku,$(OSTYPE)))
OS_CCDEFS += -DHAVE_DLOPEN=so
OS_CCDEFS += -DSIM_HAVE_DLOPEN=so
$(info using libdl: $(call find_include,dlfcn))
else
ifneq (,$(call find_lib,dld))
OS_CCDEFS += -DHAVE_DLOPEN=$(LIBSOEXT)
OS_CCDEFS += -DSIM_HAVE_DLOPEN=$(LIBSOEXT)
OS_LDFLAGS += -ldld
$(info using libdld: $(call find_lib,dld) $(call find_include,dlfcn))
else
ifeq (Darwin,$(OSTYPE))
OS_CCDEFS += -DHAVE_DLOPEN=dylib
OS_CCDEFS += -DSIM_HAVE_DLOPEN=dylib
$(info using macOS dlopen with .dylib)
endif
endif