Skip to content

Commit

Permalink
configure: simplify rpm build checks
Browse files Browse the repository at this point in the history
Remove the --enable-rpm configuration option and define the
BUILDING_RPM build conditional directly depending on the presence of
the rpmbuild and rpm utilities.

Signed-off-by: Damien Le Moal <[email protected]>
  • Loading branch information
damien-lemoal committed Mar 31, 2021
1 parent aa968cf commit 1a5c1d9
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,8 @@ CC="$PTHREAD_CC"
# Checks for rpm package builds
AC_PATH_PROG([RPMBUILD], [rpmbuild], [notfound])
AC_PATH_PROG([RPM], [rpm], [notfound])

AC_ARG_ENABLE([rpm],
[AS_HELP_STRING([--enable-rpm],
[Configure for building RPM package (default=no, requires rpm and rpmbuild)])],
[AS_IF([test "x$enable_rpm" = xyes],
[AS_IF([test "x$RPMBUILD" = xnotfound],
[AC_MSG_ERROR([rpmbuild is required for --enable-rpm])],
[test "x$RPM" = xnotfound],
[AC_MSG_ERROR([rpm is required for --enable-rpm])])])],
[enable_rpm=no])
AM_CONDITIONAL(BUILDING_RPM, test "x$enable_rpm" = xyes)
AM_CONDITIONAL([BUILDING_RPM],
[test "x$RPMBUILD" != xnotfound && test "x$RPM" != xnotfound])

# Checks for header files
AC_CHECK_HEADER(libgen.h, [],
Expand Down

0 comments on commit 1a5c1d9

Please sign in to comment.