# USE_CPU_AFFINITY : enable pinning processes to CPU on Linux. Automatic.
# USE_TFO : enable TCP fast open. Supported on Linux >= 3.7.
# USE_NS : enable network namespace support. Supported on Linux >= 2.6.24.
+# USE_DL : enable it if your system requires -ldl. Automatic on Linux.
#
# Options can be forced by specifying "USE_xxx=1" or can be disabled by using
# "USE_xxx=" (empty string).
USE_POLL = implicit
USE_TPROXY = implicit
USE_LIBCRYPT = implicit
+ USE_DL = implicit
else
ifeq ($(TARGET),linux24)
# This is for standard Linux 2.4 with netfilter but without epoll()
USE_POLL = implicit
USE_TPROXY = implicit
USE_LIBCRYPT = implicit
+ USE_DL = implicit
else
ifeq ($(TARGET),linux24e)
# This is for enhanced Linux 2.4 with netfilter and epoll() patch > 0.21
USE_MY_EPOLL = implicit
USE_TPROXY = implicit
USE_LIBCRYPT = implicit
+ USE_DL = implicit
else
ifeq ($(TARGET),linux26)
# This is for standard Linux 2.6 with netfilter and standard epoll()
USE_LIBCRYPT = implicit
USE_FUTEX = implicit
EXTRA += haproxy-systemd-wrapper
+ USE_DL = implicit
else
ifeq ($(TARGET),linux2628)
# This is for standard Linux >= 2.6.28 with netfilter, epoll, tproxy and splice
USE_CPU_AFFINITY= implicit
ASSUME_SPLICE_WORKS= implicit
EXTRA += haproxy-systemd-wrapper
+ USE_DL = implicit
else
ifeq ($(TARGET),solaris)
# This is for Solaris 8
BUILD_OPTIONS += $(call ignore_implicit,USE_REGPARM)
endif
+ifneq ($(USE_DL),)
+BUILD_OPTIONS += $(call ignore_implicit,USE_DL)
+OPTIONS_LDFLAGS += -ldl
+endif
+
# report DLMALLOC_SRC only if explicitly specified
ifneq ($(DLMALLOC_SRC),)
BUILD_OPTIONS += DLMALLOC_SRC=$(DLMALLOC_SRC)
endif
endif
-OPTIONS_LDFLAGS += $(LUA_LD_FLAGS) -l$(LUA_LIB_NAME) -lm -ldl
+OPTIONS_LDFLAGS += $(LUA_LD_FLAGS) -l$(LUA_LIB_NAME) -lm
OPTIONS_OBJS += src/hlua.o
endif