-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfigure.ac
114 lines (90 loc) · 3.71 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# virt-p2v
# Copyright (C) 2009-2019 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# The major, minor, and release fields MUST be numbers. Packagers can
# add extra information using --with-extra="..." which may be any
# freeform string.
m4_define([p2v_major], [1])
m4_define([p2v_minor], [42])
m4_define([p2v_release], [4])
AC_INIT([virt-p2v],p2v_major.p2v_minor.p2v_release)
# Headings within the configure script output.
m4_define([HEADING],
[AS_ECHO
AS_ECHO(["--- $1 ---"])])
AC_CONFIG_AUX_DIR([build-aux])
AC_USE_SYSTEM_EXTENSIONS
dnl Initialize automake.
AM_INIT_AUTOMAKE(foreign subdir-objects tar-pax) dnl NB: Do not [quote] this parameter.
m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
AC_CONFIG_MACRO_DIR([m4])
dnl Initialize libtool.
LT_INIT
dnl Extra string, a freeform string defined by packagers.
AC_ARG_WITH([extra],
[AS_HELP_STRING([--with-extra],
[extra version string (for use by packagers)])],
[p2v_extra="$withval"],
[p2v_extra=]
)
AC_MSG_NOTICE([virt-p2v version p2v_major.p2v_minor.p2v_release$p2v_extra])
dnl Split up the version string.
AC_DEFINE([PACKAGE_VERSION_MAJOR],[p2v_major],[Major version number.])
AC_DEFINE([PACKAGE_VERSION_MINOR],[p2v_minor],[Minor version number.])
AC_DEFINE([PACKAGE_VERSION_RELEASE],[p2v_release],[Release number.])
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_EXTRA],["$p2v_extra"],[Extra version string.])
PACKAGE_VERSION_FULL="p2v_major.p2v_minor.p2v_release${p2v_extra}"
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_FULL],["$PACKAGE_VERSION_FULL"],[Full version string.])
AC_SUBST([PACKAGE_VERSION_FULL])
dnl Check for external programs required to either build or run
dnl virt-p2v.
HEADING([Checking for external programs])
m4_include([m4/p2v-progs.m4])
dnl The C compiler environment.
HEADING([Checking for the C compiler environment])
m4_include([m4/p2v-c.m4])
dnl Any C libraries required by virt-p2v.
HEADING([Checking for libraries used by virt-p2v])
m4_include([m4/p2v-libraries.m4])
dnl Bash completion.
HEADING([Checking for bash completion])
m4_include([m4/p2v-bash-completion.m4])
dnl All the programs used for tests.
HEADING([Checking for programs for tests])
m4_include([m4/p2v-tests.m4])
dnl Produce output files.
HEADING([Generating output files])
AC_CONFIG_HEADERS([config.h])
dnl http://www.mail-archive.com/[email protected]/msg10204.html
AC_CONFIG_FILES([virt-p2v-make-disk],
[chmod +x,-w virt-p2v-make-disk])
AC_CONFIG_FILES([virt-p2v-make-kickstart],
[chmod +x,-w virt-p2v-make-kickstart])
AC_CONFIG_FILES([virt-p2v-make-kiwi],
[chmod +x,-w virt-p2v-make-kiwi])
AC_CONFIG_FILES([podwrapper.pl],
[chmod +x,-w podwrapper.pl])
AC_CONFIG_FILES([run],
[chmod +x,-w run])
AC_CONFIG_FILES([Makefile
bash/Makefile
docs/Makefile
gnulib/lib/Makefile])
AC_CONFIG_COMMANDS([p2v-config.h],
[${ac_srcdir}/generate-p2v-config.pl --file=p2v-config.h --output=p2v-config.h])
dnl gnulib embedding hacks
AC_TYPE_LONG_LONG_INT
AC_OUTPUT