board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / apr / apr.mk
blobf09f94368cf93429cce0f4b473b4b5e797563dd4
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_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"
34 endif
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
43 # cross-compiling.
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
50 else
51 APR_CONF_OPTS += --disable-nonportable-atomics
52 endif
54 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
55 APR_DEPENDENCIES += util-linux
56 endif
58 define APR_CLEANUP_UNNEEDED_FILES
59 $(RM) -rf $(TARGET_DIR)/usr/build-1/
60 endef
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
71 endef
73 APR_POST_INSTALL_STAGING_HOOKS += APR_FIXUP_RULES_MK
75 $(eval $(autotools-package))