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_sizeof_pid_t
=4 \
26 ac_cv_struct_rlimit
=yes \
27 ac_cv_o_nonblock_inherited
=no \
28 apr_cv_mutex_recursive
=yes
29 APR_CONFIG_SCRIPTS
= apr-1-config
31 # Doesn't even try to guess when cross compiling
32 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS
),y
)
33 APR_CONF_ENV
+= apr_cv_pthreads_lib
="-lpthread"
36 # Fix lfs detection when cross compiling
37 APR_CONF_ENV
+= apr_cv_use_lfs64
=yes
39 # Use non-portable atomics when available: 8 bytes atomics are used on
40 # 64-bits architectures, 4 bytes atomics on 32-bits architectures. We
41 # have to override ap_cv_atomic_builtins because the test used to
42 # check for atomic builtins uses AC_TRY_RUN, which doesn't work when
44 ifeq ($(BR2_ARCH_IS_64
):$(BR2_TOOLCHAIN_HAS_SYNC_8
),y
:y
)
45 APR_CONF_OPTS
+= --enable-nonportable-atomics
46 APR_CONF_ENV
+= ap_cv_atomic_builtins
=yes
47 else ifeq ($(BR2_ARCH_IS_64
):$(BR2_TOOLCHAIN_HAS_SYNC_4
),:y
)
48 APR_CONF_OPTS
+= --enable-nonportable-atomics
49 APR_CONF_ENV
+= ap_cv_atomic_builtins
=yes
51 APR_CONF_OPTS
+= --disable-nonportable-atomics
54 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID
),y
)
55 APR_DEPENDENCIES
+= util-linux
58 define APR_CLEANUP_UNNEEDED_FILES
59 $(RM
) -rf
$(TARGET_DIR
)/usr
/build-1
/
62 APR_POST_INSTALL_TARGET_HOOKS
+= APR_CLEANUP_UNNEEDED_FILES
64 define APR_FIXUP_RULES_MK
65 $(SED
) 's%apr_builddir=%apr_builddir=$(STAGING_DIR)%' \
66 $(STAGING_DIR
)/usr
/build-1
/apr_rules.mk
67 $(SED
) 's%apr_builders=%apr_builders=$(STAGING_DIR)%' \
68 $(STAGING_DIR
)/usr
/build-1
/apr_rules.mk
69 $(SED
) 's%top_builddir=%top_builddir=$(STAGING_DIR)%' \
70 $(STAGING_DIR
)/usr
/build-1
/apr_rules.mk
73 APR_POST_INSTALL_STAGING_HOOKS
+= APR_FIXUP_RULES_MK
75 $(eval
$(autotools-package
))