1 ################################################################################
5 ################################################################################
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:
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"
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
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
50 APR_CONF_OPTS
+= --disable-nonportable-atomics
53 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID
),y
)
54 APR_DEPENDENCIES
+= util-linux
57 define APR_CLEANUP_UNNEEDED_FILES
58 $(RM
) -rf
$(TARGET_DIR
)/usr
/build-1
/
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
72 APR_POST_INSTALL_STAGING_HOOKS
+= APR_FIXUP_RULES_MK
74 $(eval
$(autotools-package
))