package/x11r7/xdriver_xf86-video-openchrome: bump version to 0.5.0
[buildroot-gz.git] / package / apr / apr.mk
blob361a79f99baf601e8471451cd0b2d971ffd2093d
1 ################################################################################
3 # apr
5 ################################################################################
7 APR_VERSION = 1.5.1
8 APR_SITE = http://archive.apache.org/dist/apr
9 APR_LICENSE = Apache-2.0
10 APR_LICENSE_FILES = LICENSE
11 APR_INSTALL_STAGING = YES
12 # We have a patch touching configure.in and Makefile.in,
13 # so we need to autoreconf:
14 APR_AUTORECONF = YES
16 APR_CONF_ENV = \
17 CC_FOR_BUILD="$(HOSTCC)" \
18 CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
19 ac_cv_file__dev_zero=yes \
20 ac_cv_func_setpgrp_void=yes \
21 apr_cv_process_shared_works=yes \
22 apr_cv_mutex_robust_shared=no \
23 apr_cv_tcp_nodelay_with_cork=yes \
24 ac_cv_sizeof_struct_iovec=8 \
25 ac_cv_struct_rlimit=yes \
26 ac_cv_o_nonblock_inherited=no \
27 apr_cv_mutex_recursive=yes
28 APR_CONFIG_SCRIPTS = apr-1-config
30 # Doesn't even try to guess when cross compiling
31 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
32 APR_CONF_ENV += apr_cv_pthreads_lib="-lpthread"
33 endif
35 # Fix lfs detection when cross compiling
36 APR_CONF_ENV += apr_cv_use_lfs64=yes
38 # Use non-portable atomics when available: 8 bytes atomics are used on
39 # 64-bits architectures, 4 bytes atomics on 32-bits architectures. We
40 # have to override ap_cv_atomic_builtins because the test used to
41 # check for atomic builtins uses AC_TRY_RUN, which doesn't work when
42 # cross-compiling.
43 ifeq ($(BR2_ARCH_IS_64):$(BR2_TOOLCHAIN_HAS_SYNC_8),y:y)
44 APR_CONF_OPTS += --enable-nonportable-atomics
45 APR_CONF_ENV += ap_cv_atomic_builtins=yes
46 else ifeq ($(BR2_ARCH_IS_64):$(BR2_TOOLCHAIN_HAS_SYNC_4),:y)
47 APR_CONF_OPTS += --enable-nonportable-atomics
48 APR_CONF_ENV += ap_cv_atomic_builtins=yes
49 else
50 APR_CONF_OPTS += --disable-nonportable-atomics
51 endif
53 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
54 APR_DEPENDENCIES += util-linux
55 endif
57 define APR_CLEANUP_UNNEEDED_FILES
58 $(RM) -rf $(TARGET_DIR)/usr/build-1/
59 endef
61 APR_POST_INSTALL_TARGET_HOOKS += APR_CLEANUP_UNNEEDED_FILES
63 define APR_FIXUP_RULES_MK
64 $(SED) 's%apr_builddir=%apr_builddir=$(STAGING_DIR)%' \
65 $(STAGING_DIR)/usr/build-1/apr_rules.mk
66 $(SED) 's%apr_builders=%apr_builders=$(STAGING_DIR)%' \
67 $(STAGING_DIR)/usr/build-1/apr_rules.mk
68 $(SED) 's%top_builddir=%top_builddir=$(STAGING_DIR)%' \
69 $(STAGING_DIR)/usr/build-1/apr_rules.mk
70 endef
72 APR_POST_INSTALL_STAGING_HOOKS += APR_FIXUP_RULES_MK
74 $(eval $(autotools-package))