]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/builddefs.in
configure: don't check for openat
[thirdparty/xfsprogs-dev.git] / include / builddefs.in
1 # SPDX-License-Identifier: GPL-2.0
2 # Copyright (c) 2004-2006 Silicon Graphics, Inc.
3 # All Rights Reserved.
4 #
5 # @configure_input@
6 #
7
8 ifndef _BUILDDEFS_INCLUDED_
9 _BUILDDEFS_INCLUDED_ = 1
10
11 DEBUG = @debug_build@
12 OPTIMIZER = @opt_build@
13 MALLOCLIB = @malloc_lib@
14 LOADERFLAGS = @LDFLAGS@
15 LTLDFLAGS = @LDFLAGS@
16 CFLAGS = @CFLAGS@ -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wno-address-of-packed-member
17 BUILD_CFLAGS = @BUILD_CFLAGS@ -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
18
19 # make sure we don't pick up whacky LDFLAGS from the make environment and
20 # only use what we calculate from the configured options above.
21 LDFLAGS =
22
23 LIBRT = @librt@
24 LIBUUID = @libuuid@
25 LIBURCU = @liburcu@
26 LIBPTHREAD = @libpthread@
27 LIBTERMCAP = @libtermcap@
28 LIBEDITLINE = @libeditline@
29 LIBBLKID = @libblkid@
30 LIBDEVMAPPER = @libdevmapper@
31 LIBINIH = @libinih@
32 LIBXFS = $(TOPDIR)/libxfs/libxfs.la
33 LIBFROG = $(TOPDIR)/libfrog/libfrog.la
34 LIBXCMD = $(TOPDIR)/libxcmd/libxcmd.la
35 LIBXLOG = $(TOPDIR)/libxlog/libxlog.la
36 LIBHANDLE = $(TOPDIR)/libhandle/libhandle.la
37
38 PKG_NAME = @pkg_name@
39 PKG_USER = @pkg_user@
40 PKG_GROUP = @pkg_group@
41 PKG_RELEASE = @pkg_release@
42 PKG_VERSION = @pkg_version@
43 PKG_DISTRIBUTION= @pkg_distribution@
44
45 prefix = @prefix@
46 exec_prefix = @exec_prefix@
47 datarootdir = @datarootdir@
48 top_builddir = @top_builddir@
49
50 PKG_SBIN_DIR = @sbindir@
51 PKG_ROOT_SBIN_DIR = @root_sbindir@
52 PKG_ROOT_LIB_DIR= @root_libdir@@libdirsuffix@
53 PKG_LIB_DIR = @libdir@@libdirsuffix@
54 PKG_LIBEXEC_DIR = @libexecdir@/@pkg_name@
55 PKG_INC_DIR = @includedir@/xfs
56 DK_INC_DIR = @includedir@/disk
57 PKG_MAN_DIR = @mandir@
58 PKG_DOC_DIR = @datadir@/doc/@pkg_name@
59 PKG_LOCALE_DIR = @datadir@/locale
60 PKG_DATA_DIR = @datadir@/@pkg_name@
61 MKFS_CFG_DIR = @datadir@/@pkg_name@/mkfs
62
63 CC = @cc@
64 BUILD_CC = @BUILD_CC@
65 AWK = @awk@
66 SED = @sed@
67 TAR = @tar@
68 ZIP = @zip@
69 MAKE = @make@
70 ECHO = @echo@
71 SORT = @sort@
72 LN_S = @LN_S@
73 SHELL = @SHELL@
74 LIBTOOL = @LIBTOOL@
75 MAKEDEPEND = @makedepend@
76
77 MSGFMT = @msgfmt@
78 MSGMERGE = @msgmerge@
79 XGETTEXT = @xgettext@
80 LOCALIZED_FILES = @LOCALIZED_FILES@
81
82 RPM = @rpm@
83 RPMBUILD = @rpmbuild@
84 RPM_VERSION = @rpm_version@
85
86 ENABLE_SHARED = @enable_shared@
87 ENABLE_GETTEXT = @enable_gettext@
88 ENABLE_EDITLINE = @enable_editline@
89 ENABLE_SCRUB = @enable_scrub@
90
91 HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
92
93 HAVE_PWRITEV2 = @have_pwritev2@
94 HAVE_COPY_FILE_RANGE = @have_copy_file_range@
95 NEED_INTERNAL_FSXATTR = @need_internal_fsxattr@
96 NEED_INTERNAL_FSCRYPT_ADD_KEY_ARG = @need_internal_fscrypt_add_key_arg@
97 NEED_INTERNAL_FSCRYPT_POLICY_V2 = @need_internal_fscrypt_policy_v2@
98 HAVE_GETFSMAP = @have_getfsmap@
99 HAVE_MAP_SYNC = @have_map_sync@
100 HAVE_DEVMAPPER = @have_devmapper@
101 HAVE_MALLINFO = @have_mallinfo@
102 HAVE_MALLINFO2 = @have_mallinfo2@
103 HAVE_LIBATTR = @have_libattr@
104 HAVE_LIBICU = @have_libicu@
105 HAVE_FSTATAT = @have_fstatat@
106 HAVE_SG_IO = @have_sg_io@
107 HAVE_HDIO_GETGEO = @have_hdio_getgeo@
108 HAVE_SYSTEMD = @have_systemd@
109 SYSTEMD_SYSTEM_UNIT_DIR = @systemd_system_unit_dir@
110 HAVE_CROND = @have_crond@
111 CROND_DIR = @crond_dir@
112 HAVE_UDEV = @have_udev@
113 UDEV_RULE_DIR = @udev_rule_dir@
114 HAVE_LIBURCU_ATOMIC64 = @have_liburcu_atomic64@
115
116 GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
117 # -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
118
119 # _LGPL_SOURCE is for liburcu to work correctly with GPL/LGPL programs
120 PCFLAGS = -D_LGPL_SOURCE -D_GNU_SOURCE $(GCCFLAGS)
121 DEPENDFLAGS = -D__linux__
122 ifeq ($(HAVE_MNTENT),yes)
123 PCFLAGS+= -DHAVE_MNTENT
124 endif
125 ifeq ($(NEED_INTERNAL_FSXATTR),yes)
126 PCFLAGS+= -DOVERRIDE_SYSTEM_FSXATTR
127 endif
128 ifeq ($(NEED_INTERNAL_FSCRYPT_ADD_KEY_ARG),yes)
129 PCFLAGS+= -DOVERRIDE_SYSTEM_FSCRYPT_ADD_KEY_ARG
130 endif
131 ifeq ($(NEED_INTERNAL_FSCRYPT_POLICY_V2),yes)
132 PCFLAGS+= -DOVERRIDE_SYSTEM_FSCRYPT_POLICY_V2
133 endif
134 ifeq ($(HAVE_GETFSMAP),yes)
135 PCFLAGS+= -DHAVE_GETFSMAP
136 endif
137
138 LIBICU_LIBS = @libicu_LIBS@
139 LIBICU_CFLAGS = @libicu_CFLAGS@
140 ifeq ($(HAVE_LIBURCU_ATOMIC64),yes)
141 PCFLAGS += -DHAVE_LIBURCU_ATOMIC64
142 endif
143
144 SANITIZER_CFLAGS += @addrsan_cflags@ @threadsan_cflags@ @ubsan_cflags@
145 SANITIZER_LDFLAGS += @addrsan_ldflags@ @threadsan_ldflags@ @ubsan_ldflags@
146
147 # Use special ar/ranlib wrappers if we have lto
148 HAVE_LTO = @have_lto@
149 ifeq ($(HAVE_LTO),yes)
150 OPTIMIZER += @lto_cflags@
151 LOADERFLAGS += @lto_ldflags@
152 AR = @gcc_ar@
153 RANLIB = @gcc_ranlib@
154 endif
155
156 GCFLAGS = $(DEBUG) \
157 -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \
158 -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs \
159 -I$(TOPDIR)
160
161 ifeq ($(ENABLE_GETTEXT),yes)
162 GCFLAGS += -DENABLE_GETTEXT
163 endif
164
165 BUILD_CFLAGS += $(GCFLAGS) $(PCFLAGS)
166 # First, Sanitizer, Global, Platform, Local CFLAGS
167 CFLAGS += $(FCFLAGS) $(SANITIZER_CFLAGS) $(OPTIMIZER) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
168
169 include $(TOPDIR)/include/buildmacros
170
171 endif
172
173 #
174 # For targets that should always be rebuilt,
175 # define a target that is never up-to-date.
176 # Targets needing this should depend on $(_FORCE)
177 _FORCE = __force_build