-
Notifications
You must be signed in to change notification settings - Fork 10
/
configure.ac
88 lines (76 loc) · 2.65 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
dnl
dnl Licensed under the Apache License, Version 2.0 (the "License");
dnl you may not use this file except in compliance with the License.
dnl You may obtain a copy of the License at
dnl
dnl http://www.apache.org/licenses/LICENSE-2.0
dnl
dnl Unless required by applicable law or agreed to in writing, software
dnl distributed under the License is distributed on an "AS IS" BASIS,
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
dnl See the License for the specific language governing permissions and
dnl limitations under the License.
dnl
AC_PREREQ(2.60)
define([VERSION_MAJOR], [4])
define([VERSION_MINOR], [5])
define([VERSION_FIX], [1])
define([VERSION_NUMBER], VERSION_MAJOR[.]VERSION_MINOR[.]VERSION_FIX)
define([VERSION_SUFFIX], [_master])
AC_INIT([ovirt-log-collector], VERSION_NUMBER[]VERSION_SUFFIX)
PACKAGE_RPM_VERSION="VERSION_NUMBER"
PACKAGE_RPM_RELEASE="0.0.$(echo VERSION_SUFFIX | sed 's/^_//')"
AC_SUBST([PACKAGE_RPM_VERSION])
AC_SUBST([PACKAGE_RPM_RELEASE])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_SRCDIR([src/ovirt-log-collector.8])
AC_CONFIG_MACRO_DIR([m4])
AM_GNU_GETTEXT_VERSION([0.17])
AM_INIT_AUTOMAKE([1.9 tar-pax])
AM_PO_SUBDIRS
GITHEAD=`git rev-parse --short HEAD`
AC_SUBST([GITHEAD])
AC_ARG_ENABLE(
[python-syntax-check],
[AS_HELP_STRING([--disable-python-syntax-check], [disable python syntax check @<:@default=enabled@:>@])],
,
[enable_python_syntax_check="yes"]
)
AC_PROG_INSTALL
AC_PROG_SED
AC_PROG_MAKE_SET
AC_PROG_MKDIR_P
AC_PROG_LN_S
AC_ARG_VAR([PYFLAKES], [path to pyflakes utility])
AC_CHECK_PROGS([PYFLAKES], [pyflakes])
AC_ARG_VAR([PEP8], [path to pep8 utility])
AC_CHECK_PROGS([PEP8], [pycodestyle-3 pep8])
AC_ARG_VAR([RPMBUILD], [path to rpmbuild utility])
AC_CHECK_PROGS([RPMBUILD], [rpmbuild])
AM_PATH_PYTHON([3.6],,[AC_MSG_ERROR([Cannot find python])])
AX_PYTHON_MODULE([ovirtsdk4])
AX_PYTHON_MODULE([sos])
engineconfigdir="\$(sysconfdir)/ovirt-engine"
ovirtlogcollectorlibdir="\$(pythondir)/ovirt_log_collector"
ovirtlogcollectoranalyzerdir="\$(pkgdatadir)/analyzer"
AC_SUBST([engineconfigdir])
AC_SUBST([ovirtlogcollectorlibdir])
AC_SUBST([ovirtlogcollectoranalyzerdir])
AM_CONDITIONAL([PYTHON_SYNTAX_CHECK], [test "${enable_python_syntax_check}" = "yes"])
AC_CONFIG_FILES([
Makefile
ovirt-log-collector.spec
src/config.py.in
src/ovirt-log-collector
src/Makefile
src/helper/Makefile
src/logrotate.d/Makefile
po/Makefile.in
])
AC_CONFIG_FILES([po/Makefile], [AM_POSTPROCESS_PO_MAKEFILE])
AC_OUTPUT
# warn about uninstalled python modules
set | grep HAVE_PYMOD | grep "=no" | while read v; do
module=`echo "${v}" | sed 's/HAVE_PYMOD_\(.*\)=no/\1/'`
AC_MSG_WARN([Cannot find python ${module} module])
done