Added support to find dlopen in either libdl or libdld since some platforms package it there.

This commit is contained in:
Mark Pizzolato 2013-03-22 10:03:19 -07:00
parent ce41ac867a
commit 933a23e742
2 changed files with 13 additions and 1 deletions

View file

@ -156,6 +156,12 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
LDSEARCH :=$(shell ldconfig -r | grep 'search directories' | awk '{print $$3}' | sed 's/:/ /g')
ifneq (,$(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
ifeq (usrpkglib,$(shell if $(TEST) -d /usr/pkg/lib; then echo usrpkglib; fi))
LIBPATH += /usr/pkg/lib
@ -219,6 +225,12 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
ifeq (BSD,$(findstring BSD,$(OSTYPE)))
OS_CCDEFS += -DHAVE_DLOPEN=so
$(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

View file

@ -1202,7 +1202,7 @@ int pcap_setfilter(pcap_t* a, struct bpf_program* b) {
return 0;
}
}
#endif
#endif /* defined(USE_SHARED) && (defined(_WIN32) || defined(HAVE_DLOPEN)) */
/* Some platforms have always had pcap_sendpacket */
#if defined(_WIN32) || defined(__VMS)