xref: /freebsd/sys/contrib/openzfs/configure.ac (revision 24e4dcf4ba5e9dedcf89efd358ea3e1fe5867020)
1// SPDX-License-Identifier: CDDL-1.0
2/*
3 * This file is part of OpenZFS.
4 *
5 * Copyright (c) 2009 Lawrence Livermore National Security, LLC.
6 * Produced at Lawrence Livermore National Laboratory
7 * Written by:
8 *         Brian Behlendorf <behlendorf1@llnl.gov>,
9 *         Herb Wartens <wartens2@llnl.gov>,
10 *         Jim Garlick <garlick@llnl.gov>
11 * LLNL-CODE-403049
12 *
13 * CDDL HEADER START
14 *
15 * The contents of this file are subject to the terms of the
16 * Common Development and Distribution License, Version 1.0 only
17 * (the "License").  You may not use this file except in compliance
18 * with the License.
19 *
20 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
21 * or https://opensource.org/licenses/CDDL-1.0.
22 * See the License for the specific language governing permissions
23 * and limitations under the License.
24 *
25 * When distributing Covered Code, include this CDDL HEADER in each
26 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
27 * If applicable, add the following below this CDDL HEADER, with the
28 * fields enclosed by brackets "[]" replaced with your own identifying
29 * information: Portions Copyright [yyyy] [name of copyright owner]
30 *
31 * CDDL HEADER END
32 */
33
34AC_INIT(m4_esyscmd(awk '/^Name:/ {printf $2}' META),
35	m4_esyscmd(awk '/^Version:/ {printf $2}' META))
36CFGOPTS="$*"
37AC_LANG(C)
38ZFS_AC_META
39AC_CONFIG_AUX_DIR([config])
40AC_CONFIG_MACRO_DIR([config])
41AC_CANONICAL_TARGET
42AM_MAINTAINER_MODE
43m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
44AM_INIT_AUTOMAKE([subdir-objects foreign])
45# Remove default macros from config.h:
46#   PACKAGE, PACKAGE_{BUGREPORT,NAME,STRING,TARNAME,VERSION}, STDC_HEADERS, VERSION
47AC_CONFIG_HEADERS([zfs_config.h], [
48	$SED -nri~ -e '/^$/be' -e 'N;N;/#define (PACKAGE|VERSION|STDC_HEADERS)/d' -e ':e' -e 'p' zfs_config.h && rm zfs_config.h~ || exit])
49
50LT_INIT
51AC_PROG_INSTALL
52AC_PROG_CC
53AC_PROG_LN_S
54PKG_PROG_PKG_CONFIG
55AM_PROG_AS
56AM_PROG_CC_C_O
57AX_CODE_COVERAGE
58_AM_PROG_TAR(pax)
59
60ZFS_AC_LICENSE
61ZFS_AC_CONFIG
62ZFS_AC_PACKAGE
63ZFS_AC_DEBUG
64ZFS_AC_DEBUGINFO
65ZFS_AC_DEBUG_KMEM
66ZFS_AC_DEBUG_KMEM_TRACKING
67ZFS_AC_DEBUG_INVARIANTS
68ZFS_AC_OBJTOOL_WERROR
69
70AC_CONFIG_FILES([
71	contrib/debian/rules
72	contrib/debian/changelog
73	Makefile
74	include/Makefile
75	lib/libzfs/libzfs.pc
76	lib/libzfs_core/libzfs_core.pc
77	lib/libzfsbootenv/libzfsbootenv.pc
78	module/Kbuild
79	module/Makefile
80	rpm/generic/zfs-dkms.spec
81	rpm/generic/zfs-kmod.spec
82	rpm/generic/zfs.spec
83	rpm/redhat/zfs-dkms.spec
84	rpm/redhat/zfs-kmod.spec
85	rpm/redhat/zfs.spec
86	tests/zfs-tests/tests/Makefile
87	zfs.release
88])
89
90AC_CONFIG_FILES([scripts/objtool-wrapper], [chmod +x scripts/objtool-wrapper])
91
92AC_OUTPUT
93
94ZFS_AC_KERNEL_VERSION_WARNING
95