kumquat-buildroot/package/openvpn/openvpn.mk
Thomas Petazzoni 9eaad202f1 toolchain: rework thread options
The selection of linuxthreads, linuxthreads old or NPTL doesn't make a
lot of sense for external toolchains. So, instead, we :

 * Introduce an hidden BR2_TOOLCHAIN_HAS_THREADS option, which must be
   selected by toolchain specific options when thread support is
   available. Package needing to test thread support should use this
   option.

 * Move the none/linuxthreads/linuxthreads old/NPTL selection to
   Buildroot internal toolchain configuration.

 * Add an option in external toolchain to tell if thread support is
   available or not in the external toolchain. We assume that glibc
   without threads is not possible, as Ulrich Drepper said in
   http://sourceware.org/ml/libc-alpha/2005-08/msg00091.html

ffmpeg, dmalloc and openvpn are fixed to use the new
BR2_TOOLCHAIN_HAS_THREADS option. For openvpn, --enable-threads=posix
is no longer used, as the configure script doesn't even understand
this option.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-13 22:26:41 +01:00

44 lines
1.0 KiB
Makefile

#############################################################
#
# openvpn
#
#############################################################
OPENVPN_VERSION = 2.1.3
OPENVPN_SITE = http://openvpn.net/release
OPENVPN_CONF_OPT = --enable-small
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
OPENVPN_CONF_OPT += --enable-pthread
else
OPENVPN_CONF_OPT += --disable-pthread
endif
ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
OPENVPN_DEPENDENCIES += lzo
else
OPENVPN_CONF_OPT += --disable-lzo
endif
ifeq ($(BR2_PACKAGE_OPENVPN_OPENSSL),y)
OPENVPN_DEPENDENCIES += openssl
else
OPENVPN_CONF_OPT += --disable-crypto --disable-ssl
endif
define OPENVPN_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 $(@D)/openvpn \
$(TARGET_DIR)/usr/sbin/openvpn
if [ ! -f $(TARGET_DIR)/etc/init.d/openvpn ]; then \
$(INSTALL) -m 755 -D package/openvpn/openvpn.init \
$(TARGET_DIR)/etc/init.d/openvpn; \
fi
endef
define OPENVPN_UNINSTALL_TARGET_CMDS
rm -f $(TARGET_DIR)/usr/sbin/openvpn
rm -f $(TARGET_DIR)/etc/init.d/openvpn
endef
$(eval $(call AUTOTARGETS,package,openvpn))