Added support to find dlopen in either libdl or libdld since some platforms package it there.
This commit is contained in:
parent
ce41ac867a
commit
933a23e742
2 changed files with 13 additions and 1 deletions
12
makefile
12
makefile
|
@ -156,6 +156,12 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
|
LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
|
||||||
ifneq (,$(LDSEARCH))
|
ifneq (,$(LDSEARCH))
|
||||||
LIBPATH := $(LDSEARCH)
|
LIBPATH := $(LDSEARCH)
|
||||||
|
else
|
||||||
|
$(info *** Warning ***)
|
||||||
|
$(info *** Warning *** The library search path on your $(OSTYPE) platform can't be)
|
||||||
|
$(info *** Warning *** determined. This should be resolved before you can expect)
|
||||||
|
$(info *** Warning *** to have fully working simulators.)
|
||||||
|
$(info *** Warning ***)
|
||||||
endif
|
endif
|
||||||
ifeq (usrpkglib,$(shell if $(TEST) -d /usr/pkg/lib; then echo usrpkglib; fi))
|
ifeq (usrpkglib,$(shell if $(TEST) -d /usr/pkg/lib; then echo usrpkglib; fi))
|
||||||
LIBPATH += /usr/pkg/lib
|
LIBPATH += /usr/pkg/lib
|
||||||
|
@ -219,6 +225,12 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||||
ifeq (BSD,$(findstring BSD,$(OSTYPE)))
|
ifeq (BSD,$(findstring BSD,$(OSTYPE)))
|
||||||
OS_CCDEFS += -DHAVE_DLOPEN=so
|
OS_CCDEFS += -DHAVE_DLOPEN=so
|
||||||
$(info using libdl: $(call find_include,dlfcn))
|
$(info using libdl: $(call find_include,dlfcn))
|
||||||
|
else
|
||||||
|
ifneq (,$(call find_lib,dld))
|
||||||
|
OS_CCDEFS += -DHAVE_DLOPEN=$(LIBEXT)
|
||||||
|
OS_LDFLAGS += -ldld
|
||||||
|
$(info using libdld: $(call find_lib,dld) $(call find_include,dlfcn))
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1202,7 +1202,7 @@ int pcap_setfilter(pcap_t* a, struct bpf_program* b) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* defined(USE_SHARED) && (defined(_WIN32) || defined(HAVE_DLOPEN)) */
|
||||||
|
|
||||||
/* Some platforms have always had pcap_sendpacket */
|
/* Some platforms have always had pcap_sendpacket */
|
||||||
#if defined(_WIN32) || defined(__VMS)
|
#if defined(_WIN32) || defined(__VMS)
|
||||||
|
|
Loading…
Add table
Reference in a new issue