Browse Source

Generate config/configure.in directly

from configure rather than substitute it from Makefile. Eventually we
might want to get rid of configure.in completely, doing on-the-fly
checks at the time of `ct-ng build`, but that is left for another day.

Signed-off-by: Alexey Neyman <stilor@att.net>
dev-linux
Alexey Neyman 6 years ago
parent
commit
2c0fb22641
  1. 22
      Makefile.in
  2. 46
      config/configure.in.in
  3. 9
      configure.ac

22
Makefile.in

@ -89,9 +89,6 @@ export curses_hdr := @ac_ct_curses_hdr@
export gettext := @gettext@
export CPU_COUNT := @CPU_COUNT@
# config options to push down to kconfig
KCONFIG:= @kconfig_options@
###############################################################################
# Non-configure variables
MAN_SECTION := 1
@ -169,8 +166,7 @@ build-bin: $(PROG_NAME) \
scripts/showConfig.sh
$(call __silent,CHMOD,$^)chmod 755 $^
build-lib: config/configure.in \
paths.mk \
build-lib: paths.mk \
paths.sh
build-lib-kconfig:
@ -222,21 +218,6 @@ paths.mk: FORCE
paths.sh: FORCE
$(call __silent,GEN,$@){ $(foreach w,$(__paths_vars),$(if $($w),echo 'export $w="$(subst ','\'',$($w))"';)) :; } >$@
config/configure.in: FORCE
$(call __silent,GEN,$@) \
{ printf "# Generated file, do not edit\n"; \
printf "# Default values as found by ./configure\n"; \
for var in $(KCONFIG); do \
printf "\n"; \
printf "config CONFIGURE_$${var%%=*}\n"; \
if [ "$${var#*=}" = "y" ]; then \
printf " def_bool y\n"; \
else \
printf " bool\n"; \
fi; \
done; \
} >$@
FORCE:
#--------------------------------------
@ -251,7 +232,6 @@ clean-bin:
clean-lib:
$(call __silent_rm,paths.mk paths.sh)
$(call __silent_rm,config/configure.in)
clean-lib-kconfig:
$(call __silent,ENTER,kconfig)$(MAKE) -C kconfig clean

46
config/configure.in.in

@ -0,0 +1,46 @@
# Default values as found by ./configure
config CONFIGURE_has_static_link
@KCONFIG_static_link@
config CONFIGURE_has_wget
@KCONFIG_wget@
config CONFIGURE_has_curl
@KCONFIG_curl@
config CONFIGURE_has_stat_flavor_BSD
@KCONFIG_stat_flavor_BSD@
config CONFIGURE_has_stat_flavor_GNU
@KCONFIG_stat_flavor_GNU@
config CONFIGURE_has_make_3_81_or_newer
@KCONFIG_make_3_81_or_newer@
config CONFIGURE_has_libtool_2_4_or_newer
@KCONFIG_libtool_2_4_or_newer@
config CONFIGURE_has_libtoolize_2_4_or_newer
@KCONFIG_libtoolize_2_4_or_newer@
config CONFIGURE_has_autoconf_2_63_or_newer
@KCONFIG_autoconf_2_63_or_newer@
config CONFIGURE_has_autoreconf_2_63_or_newer
@KCONFIG_autoreconf_2_63_or_newer@
config CONFIGURE_has_automake_1_15_or_newer
@KCONFIG_automake_1_15_or_newer@
config CONFIGURE_has_gnu_m4_1_4_12_or_newer
@KCONFIG_gnu_m4_1_4_12_or_newer@
config CONFIGURE_has_cvs
@KCONFIG_cvs@
config CONFIGURE_has_svn
@KCONFIG_svn@
config CONFIGURE_has_git
@KCONFIG_git@

9
configure.ac

@ -65,10 +65,9 @@ AC_DEFUN(
AC_DEFUN(
[ACX_SET_KCONFIG_OPTION],
[AS_IF(
[test -n "$$1"],
[kconfig_options="$kconfig_options has_$1=y"],
[kconfig_options="$kconfig_options has_$1"])
])
[test -n "$$1"],
[AC_SUBST([KCONFIG_$1], ["def_bool y"])],
[AC_SUBST([KCONFIG_$1], ["bool"])])])
# Check if a given program is available with a particular version.
# ACX_PROG_VERSION(VAR, HELP, PROG, SRCH, VERSION_CHECK[, CONFIG_OPT])
@ -466,5 +465,5 @@ AS_IF(
#--------------------------------------------------------------------
# Finally, generate the output file(s)
#--------------------------------------------------------------------
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([Makefile config/configure.in])
AC_OUTPUT

Loading…
Cancel
Save