Skip to content

Commit 2ce923a

Browse files
committed
configure.ac: update AC_PROG_LEX
Autoconf >= v2.70 requires an argument to AC_PROG_LEX. Also convert some "if" statements to AS_IF. Signed-off-by: Jeff Squyres <jsquyres@cisco.com> (cherry picked from commit 9cf6eee)
1 parent ee43deb commit 2ce923a

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

configure.ac

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,29 +1004,32 @@ AC_PROG_GREP
10041004
AC_PROG_EGREP
10051005

10061006
#
1007-
# We need as and lex
1007+
# We need as and flex
10081008
#
10091009
AM_PROG_AS
1010-
AM_PROG_LEX
1010+
1011+
dnl Note that prior to AC v2.70, PROG_LEX did not take any arguments.
1012+
dnl But it is harmless to pass an argument to it ($1 will just be
1013+
dnl ignored).
1014+
AC_PROG_LEX([noyywrap])
10111015

10121016
# If we don't have Flex and we don't have a generated .c file
10131017
# (distribution tarballs will have the .c file included, but git
10141018
# clones will not), then error. Must have Flex -- other versions of
10151019
# Lex are not workable (all things being equal, since this is *only*
10161020
# required for developers, we decided that it really was not worth it
10171021
# to be portable between different versions of lex ;-).
1018-
1019-
if test -z "$LEX" || \
1022+
AS_IF([test -z "$LEX" || \
10201023
test -n "`echo $LEX | $GREP missing`" || \
1021-
test "`basename $LEX`" != "flex"; then
1022-
if test ! -f "$srcdir/opal/util/show_help_lex.c"; then
1023-
AC_MSG_WARN([*** Could not find Flex on your system.])
1024+
test "`basename $LEX`" != "flex"],
1025+
[AS_IF([test ! -f "$srcdir/opal/util/show_help_lex.c"],
1026+
[AC_MSG_WARN([*** Could not find Flex on your system.])
10241027
AC_MSG_WARN([*** Flex is required for developer builds of Open MPI.])
10251028
AC_MSG_WARN([*** Other versions of Lex are not supported.])
10261029
AC_MSG_WARN([*** NOTE: If you are building a tarball downloaded from www.open-mpi.org, you do not need Flex])
10271030
AC_MSG_ERROR([Cannot continue])
1028-
fi
1029-
fi
1031+
])
1032+
])
10301033

10311034
#
10321035
# Setup man page processing

0 commit comments

Comments
 (0)