-
Notifications
You must be signed in to change notification settings - Fork 24
/
configure.ac
65 lines (53 loc) · 1.76 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
# SPDX-License-Identifier: CC0-1.0
#
# Copyright (C) 2019 Western Digital Corporation or its affiliates.
AC_INIT([dm-zoned-tools], [2.2.2], [[email protected]])
AC_PREFIX_DEFAULT(/usr)
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
AM_SILENT_RULES([yes])
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
m4_pattern_allow([AM_PROG_AR])
LT_INIT
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
# Checks for header files.
AC_CHECK_HEADER(libgen.h, [],
[AC_MSG_ERROR([Couldn't find libgen.h])])
AC_CHECK_HEADER(mntent.h, [],
[AC_MSG_ERROR([Couldn't find mntent.h])])
AC_CHECK_HEADER(linux/fs.h, [],
[AC_MSG_ERROR([Couldn't find linux/fs.h])])
AC_CHECK_HEADER(linux/blkzoned.h, [],
[AC_MSG_ERROR([Couldn't find linux/blkzoned.h])])
AC_CHECK_MEMBER([struct blk_zone.capacity],
[AC_DEFINE(HAVE_BLK_ZONE_REP_V2, [1],
[report zones includes zone capacity])],
[], [[#include <linux/blkzoned.h>]])
# Checks for libraries.
PKG_CHECK_MODULES([blkid], [blkid],
[], [AC_MSG_ERROR([Could not find libblkid])])
PKG_CHECK_MODULES([kmod], [libkmod],
[], [AC_MSG_ERROR([Could not find libkmod])])
PKG_CHECK_MODULES([libudev], [libudev],
[], [AC_MSG_ERROR([Could not find libudev])])
PKG_CHECK_MODULES([uuid], [uuid],
[], [AC_MSG_ERROR([Could not find libuuid])])
PKG_CHECK_MODULES([devmapper], [devmapper],
[], [AC_MSG_ERROR([Could not find libdevmapper])])
# Checks for rpm package builds
AC_PATH_PROG([RPMBUILD], [rpmbuild], [notfound])
AC_PATH_PROG([RPM], [rpm], [notfound])
AM_CONDITIONAL([BUILD_RPM],
[test "x$RPMBUILD" != xnotfound && test "x$RPM" != xnotfound])
AC_CONFIG_FILES([
Makefile
man/Makefile
src/Makefile
])
AC_OUTPUT