Add configure.ac and Makefile.am and make them work
[nitsi.git] / configure.ac
1 AC_PREREQ([2.64])
2
3 AC_INIT([nitsi],
4         [0.9],
5         [info@ipfire.org],
6         [nitsi],
7         [https://git.ipfire.org/pub/git/people/jschlag/nitsi.git])
8
9 AC_CONFIG_MACRO_DIR([m4])
10 AC_CONFIG_AUX_DIR([build-aux])
11
12 AC_PREFIX_DEFAULT([/usr])
13
14 AM_INIT_AUTOMAKE([
15         foreign
16         1.11
17         -Wall
18         -Wno-portability
19         silent-rules
20         tar-pax
21         subdir-objects
22 ])
23 AM_SILENT_RULES([yes])
24
25 AC_PROG_LN_S
26 AC_PROG_MKDIR_P
27 AC_PROG_SED
28
29 AC_PATH_PROG([XSLTPROC], [xsltproc])
30
31 # Python
32 AM_PATH_PYTHON([3.5])
33
34 AX_PYTHON_MODULE([libvirt], [fatal], [python3])
35 AX_PYTHON_MODULE([guestfs], [fatal], [python3])
36 AX_PYTHON_MODULE([serial], [fatal], [python3])
37
38 save_LIBS="$LIBS"
39
40 # pkg-config
41 PKG_PROG_PKG_CONFIG
42 # This makes sure pkg.m4 is available.
43 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
44
45 # ------------------------------------------------------------------------------
46 have_manpages=no
47 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages],
48         [do not install man pages]))
49 AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
50 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
51
52 # ------------------------------------------------------------------------------
53
54 AC_CONFIG_FILES([
55         Makefile
56 ])
57
58 AC_OUTPUT
59 AC_MSG_RESULT([
60         ${PACKAGE_NAME} ${VERSION}
61
62         prefix:                 ${prefix}
63         sysconfdir:             ${sysconfdir}
64
65         Generate man-pages:     ${have_manpages}
66 ])