diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-03-08 04:44:43 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-03-08 04:44:43 +0100 |
commit | 3ca82ea98fc46e3365c514aa3398f54df91bf329 (patch) | |
tree | 0b12c50c17ecdb46d9f201218bbcd4d128665bfc /configure.ac | |
parent | 99661b01b0dbf6a0ccb34574f599992e714ac726 (diff) | |
download | blogc-3ca82ea98fc46e3365c514aa3398f54df91bf329.tar.gz blogc-3ca82ea98fc46e3365c514aa3398f54df91bf329.tar.bz2 blogc-3ca82ea98fc46e3365c514aa3398f54df91bf329.zip |
build: added make rule to build srpm
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1fc00aa..ad759c6 100644 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,30 @@ AS_IF([test "x$ac_cv_prog_cc_c99" = "xno"], [ PKG_PROG_PKG_CONFIG +AC_PROG_SED + +RPM_VERSION=`echo ${PACKAGE_VERSION} | sed "s/-/./g"` +AC_SUBST(RPM_VERSION) + +AC_ARG_ENABLE([rpmbuild], AS_HELP_STRING([--disable-rpmbuild], + [ignore presence of rpmbuild and disable srpm generation])) +AS_IF([test "x$enable_rpmbuild" != "xno"], [ + AC_PATH_PROG([rpmbuild], [rpmbuild]) + AS_IF([test "x$ac_cv_path_rpmbuild" = "x"], [ + have_rpmbuild=no + ], [ + have_rpmbuild=yes + ]) +]) +AS_IF([test "x$have_rpmbuild" = "xyes"], , [ + AS_IF([test "x$enable_rpmbuild" = "xyes"], [ + AC_MSG_ERROR([rpmbuild requested but not found]) + ]) +]) +AM_CONDITIONAL([USE_RPMBUILD], [test "x$ac_cv_path_rpmbuild" != "x"]) +RPMBUILD="$ac_cv_path_rpmbuild" +AC_SUBST(RPMBUILD) + AC_ARG_ENABLE([ronn], AS_HELP_STRING([--disable-ronn], [ignore presence of ronn and disable man pages generation])) AS_IF([test "x$enable_ronn" != "xno"], [ @@ -145,4 +169,5 @@ AS_ECHO(" ronn: ${RONN} valgrind: ${VALGRIND} + rpmbuild: ${RPMBUILD} ") |