mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-23 04:48:03 +00:00
configure: check for GNU awk, not any awk
Building glibc requires GNU awk, not any other. Reported-by: Han Sooloo <hansooloo@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> (transplanted from 4ccfca658d9bbbc4a682751332ce5b92cbdfb0fe)
This commit is contained in:
parent
7c0a1717a5
commit
f1d45eccd3
@ -53,6 +53,7 @@ export mandir := @mandir@
|
|||||||
export datarootdir := @datarootdir@
|
export datarootdir := @datarootdir@
|
||||||
export install := @INSTALL@
|
export install := @INSTALL@
|
||||||
export bash := @_BASH@
|
export bash := @_BASH@
|
||||||
|
export awk := @_AWK@
|
||||||
export grep := @GREP@
|
export grep := @GREP@
|
||||||
export make := @MAKE@
|
export make := @MAKE@
|
||||||
export sed := @SED@
|
export sed := @SED@
|
||||||
@ -177,6 +178,7 @@ define sed_it
|
|||||||
-e 's,@@CT_DATE@@,$(DATE),g;' \
|
-e 's,@@CT_DATE@@,$(DATE),g;' \
|
||||||
-e 's,@@CT_make@@,$(make),g;' \
|
-e 's,@@CT_make@@,$(make),g;' \
|
||||||
-e 's,@@CT_bash@@,$(bash),g;' \
|
-e 's,@@CT_bash@@,$(bash),g;' \
|
||||||
|
-e 's,@@CT_awk@@,$(awk),g;' \
|
||||||
$< >$@
|
$< >$@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -195,6 +197,7 @@ paths.mk: FORCE
|
|||||||
@echo " GEN '$@'"
|
@echo " GEN '$@'"
|
||||||
@(echo 'export install=$(install)'; \
|
@(echo 'export install=$(install)'; \
|
||||||
echo 'export bash=$(bash)'; \
|
echo 'export bash=$(bash)'; \
|
||||||
|
echo 'export awk=$(awk)'; \
|
||||||
echo 'export grep=$(grep)'; \
|
echo 'export grep=$(grep)'; \
|
||||||
echo 'export make=$(make)'; \
|
echo 'export make=$(make)'; \
|
||||||
echo 'export sed=$(sed)'; \
|
echo 'export sed=$(sed)'; \
|
||||||
@ -210,6 +213,7 @@ paths.sh: FORCE
|
|||||||
@echo " GEN '$@'"
|
@echo " GEN '$@'"
|
||||||
@(echo 'export install="$(install)"'; \
|
@(echo 'export install="$(install)"'; \
|
||||||
echo 'export bash="$(bash)"'; \
|
echo 'export bash="$(bash)"'; \
|
||||||
|
echo 'export awk="$(awk)"'; \
|
||||||
echo 'export grep="$(grep)"'; \
|
echo 'export grep="$(grep)"'; \
|
||||||
echo 'export make="$(make)"'; \
|
echo 'export make="$(make)"'; \
|
||||||
echo 'export sed="$(sed)"'; \
|
echo 'export sed="$(sed)"'; \
|
||||||
|
20
configure.ac
20
configure.ac
@ -99,7 +99,7 @@ AS_IF(
|
|||||||
AC_CACHE_VAL([ac_cv_path_SED],
|
AC_CACHE_VAL([ac_cv_path_SED],
|
||||||
[AC_ARG_WITH([sed],
|
[AC_ARG_WITH([sed],
|
||||||
AS_HELP_STRING([--with-sed=PATH],
|
AS_HELP_STRING([--with-sed=PATH],
|
||||||
[Specify the full PATH to sed]),
|
[Specify the full PATH to GNU sed]),
|
||||||
[ac_cv_path_SED=$withval])])
|
[ac_cv_path_SED=$withval])])
|
||||||
AC_PROG_SED
|
AC_PROG_SED
|
||||||
AC_MSG_CHECKING([whether sed understands -r -i -e])
|
AC_MSG_CHECKING([whether sed understands -r -i -e])
|
||||||
@ -129,7 +129,6 @@ ACX_PATH_TOOL_REQ([READELF], [readelf])
|
|||||||
ACX_CHECK_PROGS_REQ([bison], [bison])
|
ACX_CHECK_PROGS_REQ([bison], [bison])
|
||||||
ACX_CHECK_PROGS_REQ([flex], [flex])
|
ACX_CHECK_PROGS_REQ([flex], [flex])
|
||||||
ACX_CHECK_PROGS_REQ([gperf], [gperf])
|
ACX_CHECK_PROGS_REQ([gperf], [gperf])
|
||||||
ACX_CHECK_PROGS_REQ([awk], [gawk mawk nawk awk])
|
|
||||||
ACX_CHECK_PROGS_REQ([makeinfo], [makeinfo])
|
ACX_CHECK_PROGS_REQ([makeinfo], [makeinfo])
|
||||||
ACX_CHECK_PROGS_REQ([cut], [cut])
|
ACX_CHECK_PROGS_REQ([cut], [cut])
|
||||||
ACX_CHECK_PROGS_REQ([stat], [stat])
|
ACX_CHECK_PROGS_REQ([stat], [stat])
|
||||||
@ -151,7 +150,7 @@ ACX_PATH_PROGS_REQ([PATCH], [patch])
|
|||||||
AC_CACHE_VAL([ac_cv_path__BASH],
|
AC_CACHE_VAL([ac_cv_path__BASH],
|
||||||
[AC_ARG_WITH([bash],
|
[AC_ARG_WITH([bash],
|
||||||
AS_HELP_STRING([--with-bash=PATH],
|
AS_HELP_STRING([--with-bash=PATH],
|
||||||
[Specify the full PATH to bash >= 3.1]),
|
[Specify the full PATH to GNU bash >= 3.1]),
|
||||||
[ac_cv_path__BASH=$withval])])
|
[ac_cv_path__BASH=$withval])])
|
||||||
AC_CACHE_CHECK([for bash >= 3.1], [ac_cv_path__BASH],
|
AC_CACHE_CHECK([for bash >= 3.1], [ac_cv_path__BASH],
|
||||||
[AC_PATH_PROGS_FEATURE_CHECK([_BASH], [bash],
|
[AC_PATH_PROGS_FEATURE_CHECK([_BASH], [bash],
|
||||||
@ -162,6 +161,21 @@ AC_CACHE_CHECK([for bash >= 3.1], [ac_cv_path__BASH],
|
|||||||
AC_MSG_ERROR([could not find bash >= 3.1])])])
|
AC_MSG_ERROR([could not find bash >= 3.1])])])
|
||||||
AC_SUBST([_BASH], [$ac_cv_path__BASH])
|
AC_SUBST([_BASH], [$ac_cv_path__BASH])
|
||||||
|
|
||||||
|
# We need a awk that *is* GNU awk
|
||||||
|
AC_CACHE_VAL([ac_cv_path__AWK],
|
||||||
|
[AC_ARG_WITH([awk],
|
||||||
|
AS_HELP_STRING([--with-awk=PATH],
|
||||||
|
[Specify the full PATH to GNU awk]),
|
||||||
|
[ac_cv_path__AWK=$withval])])
|
||||||
|
AC_CACHE_CHECK([for GNU awk], [ac_cv_path__AWK],
|
||||||
|
[AC_PATH_PROGS_FEATURE_CHECK([_AWK], [awk gawk],
|
||||||
|
[[_AWK_ver=$($ac_path__AWK --version 2>&1 \
|
||||||
|
|$EGREP '^GNU Awk ')
|
||||||
|
test -n "$_AWK_ver" && ac_cv_path__AWK=$ac_path__AWK ac_path__AWK_found=:]],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
|
AC_MSG_ERROR([could not find GNU awk])])])
|
||||||
|
AC_SUBST([_AWK], [$ac_cv_path__AWK])
|
||||||
|
|
||||||
#----------------------------------------
|
#----------------------------------------
|
||||||
# Check for GNU make 3.80 or above
|
# Check for GNU make 3.80 or above
|
||||||
AC_CACHE_VAL([ac_cv_path_MAKE],
|
AC_CACHE_VAL([ac_cv_path_MAKE],
|
||||||
|
@ -28,18 +28,18 @@ oldconfig: .config
|
|||||||
|
|
||||||
# Always be silent, the stdout an be >.config
|
# Always be silent, the stdout an be >.config
|
||||||
extractconfig:
|
extractconfig:
|
||||||
@awk 'BEGIN { dump=0; } \
|
@$(awk) 'BEGIN { dump=0; } \
|
||||||
dump==1 && $$0~/^\[.....\][[:space:]]+(# |)CT_/ { \
|
dump==1 && $$0~/^\[.....\][[:space:]]+(# |)CT_/ { \
|
||||||
$$1=""; \
|
$$1=""; \
|
||||||
gsub("^[[:space:]]",""); \
|
gsub("^[[:space:]]",""); \
|
||||||
print; \
|
print; \
|
||||||
} \
|
} \
|
||||||
$$0~/Dumping user-supplied crosstool-NG configuration: done in/ { \
|
$$0~/Dumping user-supplied crosstool-NG configuration: done in/ { \
|
||||||
dump=0; \
|
dump=0; \
|
||||||
} \
|
} \
|
||||||
$$0~/Dumping user-supplied crosstool-NG configuration$$/ { \
|
$$0~/Dumping user-supplied crosstool-NG configuration$$/ { \
|
||||||
dump=1; \
|
dump=1; \
|
||||||
}'
|
}'
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
# Help text used by make help
|
# Help text used by make help
|
||||||
|
Loading…
Reference in New Issue
Block a user