Skip to content

Commit

Permalink
Merge pull request #58 from liu4480/run-autogen
Browse files Browse the repository at this point in the history
add "runautogen" option for compiling
  • Loading branch information
fabbione committed Oct 25, 2017
2 parents 885a15b + 8f8384a commit 3cbfabe
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile.am
Expand Up @@ -149,6 +149,11 @@ if BUILD_LIBTAP
sed -i -e "s#@libtap@#bcond_without#g" $@-t
else
sed -i -e "s#@libtap@#bcond_with#g" $@-t
endif
if BUILD_RUNAUTOGEN
sed -i -e "s#@runautogen@#bcond_without#g" $@-t
else
sed -i -e "s#@runautogen@#bcond_with#g" $@-t
endif
sed -i -e "s#@defaultadmgroup@#$(DEFAULTADMGROUP)#g" $@-t
chmod a-w $@-t
Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Expand Up @@ -133,6 +133,11 @@ AC_ARG_ENABLE([kronosnetd],
[ enable_kronosnetd="no" ])
AM_CONDITIONAL([BUILD_KRONOSNETD], [test x$enable_kronosnetd = xyes])

AC_ARG_ENABLE([runautogen],
[ --enable-runautogen : run autogen.sh ],,
[ enable_runautogen="no" ])
AM_CONDITIONAL([BUILD_RUNAUTOGEN], [test x$enable_runautogen = xyes])

AC_ARG_ENABLE([libtap],
[ --enable-libtap : libtap support ],,
[ enable_libtap="no" ])
Expand Down
13 changes: 13 additions & 0 deletions kronosnet.spec.in
Expand Up @@ -26,6 +26,7 @@
%@bzip2@ bzip2
%@kronosnetd@ kronosnetd
%@libtap@ libtap
%@runautogen@ runautogen

%if %{with sctp}
%global buildsctp 1
Expand Down Expand Up @@ -58,6 +59,9 @@
%global buildlibtap 1
%global buildkronosnetd 1
%endif
%if %{with runautogen}
%global buildautogen 1
%endif

# main (empty) package
# http://www.rpm.org/max-rpm/s1-rpm-subpack-spec-file-changes.html
Expand Down Expand Up @@ -104,11 +108,20 @@ BuildRequires: bzip2-devel
%if %{defined buildkronosnetd}
BuildRequires: libqb-devel pam-devel
%endif
%if %{defined buildautogen}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
%endif

%prep
%setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}

%build
%if %{with runautogen}
./autogen.sh
%endif

%{configure} \
%if %{defined buildsctp}
--enable-libknet-sctp \
Expand Down

0 comments on commit 3cbfabe

Please sign in to comment.