summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_configure.subr
blob: c6819886a74861ac1ca4b52f3ddb011ddc199037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# set +o errexit -o noglob is assumed.
#

pkg_configure() {
	local _rc=0;
	if [ -x "${PKG_CONFIGURE}" ]; then
		rtl_export_vars PKG_CONFIG "${PKG_PKG_CONFIG}" PKG_CONFIG_PATH "${PKG_PKG_CONFIG_PATH}" PYTHON "${PKG_PYTHON}";
		AR="${PKG_AR}"												\
		CC="${PKG_CC}"												\
		RANLIB="${PKG_RANLIB}"											\
		CFLAGS="${PKG_CFLAGS_CONFIGURE}${PKG_CFLAGS_CONFIGURE_EXTRA:+ ${PKG_CFLAGS_CONFIGURE_EXTRA}}"		\
		CPPFLAGS="${PKG_CFLAGS_CONFIGURE}${PKG_CFLAGS_CONFIGURE_EXTRA:+ ${PKG_CFLAGS_CONFIGURE_EXTRA}}"		\
		CXXFLAGS="${PKG_CXXFLAGS_CONFIGURE}${PKG_CXXFLAGS_CONFIGURE_EXTRA:+ ${PKG_CXXFLAGS_CONFIGURE_EXTRA}}"	\
		LDFLAGS="${PKG_LDFLAGS_CONFIGURE}${PKG_LDFLAGS_CONFIGURE_EXTRA:+ ${PKG_LDFLAGS_CONFIGURE_EXTRA}}"	\
		"${PKG_CONFIGURE}" ${PKG_CONFIGURE_ARGS} ${PKG_CONFIGURE_ARGS_EXTRA} ${PKG_CONFIGURE_ARGS_EXTRA_DEBUG}; _rc="${?}"
		rtl_export_vars -u PKG_CONFIG "${PKG_PKG_CONFIG}" PKG_CONFIG_PATH "${PKG_PKG_CONFIG_PATH}" PYTHON "${PKG_PYTHON}";
	fi;
	return "${?}";
};

# vim:filetype=sh