2 # Copyright (C) 2007-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 PKG_LIBTOOL_PATHS?
=$(CONFIGURE_PATH
)
9 PKG_REMOVE_FILES?
=aclocal.m4
11 autoconf_bool
= $(patsubst %,$(if
$($(1)),--enable
,--disable
)-%,$(2))
13 # delete *.la-files from staging_dir - we can not yet remove respective lines within all package
14 # Makefiles, since backfire still uses libtool v1.5.x which (may) require those files
15 define libtool_remove_files
16 find
$(1) -name
'*.la' |
$(XARGS
) rm -f
;
20 (cd
$(PKG_BUILD_DIR
); \
21 $(patsubst %,rm -f
%;,$(PKG_REMOVE_FILES
)) \
22 if
[ -x .
/autogen.sh
]; then \
23 .
/autogen.sh || true
; \
24 elif
[ -f .
/configure.ac
] ||
[ -f .
/configure.in
]; then \
25 [ -f .
/aclocal.m4
] && [ ! -f .
/acinclude.m4
] && mv aclocal.m4 acinclude.m4
; \
26 [ -d .
/autom4te.cache
] && rm -rf autom4te.cache
; \
27 $(STAGING_DIR_HOST
)/bin
/autoreconf
-v
-f
-i
-s \
28 -B
$(STAGING_DIR_HOST
)/share
/aclocal \
29 -B
$(STAGING_DIR
)/host
/share
/aclocal \
30 $(patsubst %,-I
%,$(PKG_LIBTOOL_PATHS
)) $(PKG_LIBTOOL_PATHS
) || true
; \
35 Hooks
/InstallDev
/Post
+= libtool_remove_files
37 ifneq ($(filter libtool
,$(PKG_FIXUP
)),)
38 PKG_BUILD_DEPENDS
+= libtool
39 ifeq ($(filter no-autoreconf
,$(PKG_FIXUP
)),)
40 Hooks
/Configure
/Pre
+= autoreconf
44 ifneq ($(filter libtool-ucxx
,$(PKG_FIXUP
)),)
45 PKG_BUILD_DEPENDS
+= libtool
46 ifeq ($(filter no-autoreconf
,$(PKG_FIXUP
)),)
47 Hooks
/Configure
/Pre
+= autoreconf
51 ifneq ($(filter autoreconf
,$(PKG_FIXUP
)),)
52 ifeq ($(filter autoreconf
,$(Hooks
/Configure
/Pre
)),)
53 Hooks
/Configure
/Pre
+= autoreconf