configure: Abort if gperf is not found but generated files don't exist
When building from a tarball gperf is not required as the generated files already exist, however, when building from the repository that's not the case, so warn the user if gperf is not found.
This commit is contained in:
parent
251ac44df3
commit
72373d940a
|
@ -378,7 +378,7 @@ AC_ARG_VAR([PERL], [the Perl interpreter])
|
|||
AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
|
||||
AC_ARG_VAR([GPERF], [the GNU gperf program])
|
||||
|
||||
# because gperf is not needed by end-users we just report it but do not abort on failure
|
||||
# because gperf is not needed by end-users we only abort if generated files don't exist
|
||||
AC_MSG_CHECKING([gperf version >= 3.0.0])
|
||||
if test -x "$GPERF"; then
|
||||
if test "`$GPERF --version | $AWK -F' ' '/^GNU gperf/ { print $3 }' | $AWK -F. '{ print $1 }'`" -ge "3"; then
|
||||
|
@ -403,6 +403,10 @@ if test -x "$GPERF"; then
|
|||
fi
|
||||
else
|
||||
AC_MSG_RESULT([not found])
|
||||
GPERF_TEST_FILE="$srcdir/src/libstrongswan/crypto/proposal/proposal_keywords_static.c"
|
||||
if test ! -f "$GPERF_TEST_FILE"; then
|
||||
AC_MSG_ERROR([GNU gperf required to generate e.g. $GPERF_TEST_FILE])
|
||||
fi
|
||||
fi
|
||||
|
||||
# ========================
|
||||
|
|
Loading…
Reference in New Issue