-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
92 lines (80 loc) · 2.84 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
89
90
91
92
dnl
dnl Licensed to the Apache Software Foundation (ASF) under one or more
dnl contributor license agreements. See the NOTICE file distributed with
dnl this work for additional information regarding copyright ownership.
dnl The ASF licenses this file to You under the Apache License, Version 2.0
dnl (the "License"); you may not use this file except in compliance with
dnl the License. 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], [0])
define([VERSION_MINOR], [9])
define([VERSION_FIX], [7])
define([VERSION_NUMBER], VERSION_MAJOR[.]VERSION_MINOR[.]VERSION_FIX)
define([VERSION_SUFFIX], [-2])
AC_INIT([redhat-support-tool], VERSION_NUMBER[]VERSION_SUFFIX)
PACKAGE_RPM_VERSION="VERSION_NUMBER"
PACKAGE_RPM_RELEASE="2"
AC_SUBST([PACKAGE_RPM_VERSION])
AC_SUBST([PACKAGE_RPM_RELEASE])
AC_CONFIG_AUX_DIR([.])
dnl AC_CONFIG_SRCDIR([src/engine-image-uploader.8])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE
AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])
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], [pep8])
AC_ARG_VAR([RPMBUILD], [path to rpmbuild utility])
AC_CHECK_PROGS([RPMBUILD], [rpmbuild])
AM_PATH_PYTHON([2.4],,[AC_MSG_ERROR([Cannot find python])])
case "${PYTHON_VERSION}" in
2.*);;
*) AC_MSG_ERROR([python 2.4 or newer is required])
esac
AX_PYTHON_MODULE([lxml])
AX_PYTHON_MODULE([dateutil])
rhsupporttoollibdir="\$(pythondir)/redhat_support_tool"
AC_SUBST([rhsupporttoollibdir])
AM_CONDITIONAL([PYTHON_SYNTAX_CHECK], [test "${enable_python_syntax_check}" = "yes"])
AC_CONFIG_FILES([
Makefile
redhat-support-tool.spec
src/Makefile
src/redhat_support_tool/Makefile
src/redhat_support_tool/helpers/Makefile
src/redhat_support_tool/helpers/version.py
src/redhat_support_tool/plugins/Makefile
src/redhat_support_tool/symptoms/Makefile
src/redhat_support_tool/tools/Makefile
src/redhat_support_tool/vendors/Makefile
po/Makefile.in
])
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