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:
8
makefile
8
makefile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user