]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - configure.ac
build: resolve autoheader warning
[thirdparty/xfsprogs-dev.git] / configure.ac
CommitLineData
95d85185 1AC_INIT([xfsprogs], [4.9.0], [linux-xfs@vger.kernel.org])
86b99f0a 2AC_PREREQ(2.50)
07c561fe
AG
3AC_CONFIG_AUX_DIR([.])
4AC_CONFIG_MACRO_DIR([m4])
f474cd4f 5AC_CONFIG_SRCDIR([include/libxfs.h])
9440d84d 6AC_CONFIG_HEADER(include/platform_defs.h)
521902a9 7AC_PREFIX_DEFAULT(/usr)
9440d84d 8
07c561fe
AG
9AC_PROG_LIBTOOL
10
e14913c1 11AC_PROG_CC
0a71e383
GG
12AC_ARG_VAR(BUILD_CC, [C compiler for build tools])
13if test "${BUILD_CC+set}" != "set"; then
14 if test $cross_compiling = no; then
15 BUILD_CC="$CC"
16 else
17 AC_CHECK_PROGS(BUILD_CC, gcc cc)
18 fi
19fi
20AC_ARG_VAR(BUILD_CFLAGS, [C compiler flags for build tools])
21if test "${BUILD_CFLAGS+set}" != "set"; then
22 if test $cross_compiling = no; then
23 BUILD_CFLAGS="$CFLAGS"
24 else
25 BUILD_CFLAGS="-g -O2"
26 fi
e14913c1
TT
27fi
28
534b0bfd 29AC_ARG_ENABLE(shared,
dfc13ce1 30[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
d5dca43b
NS
31 enable_shared=yes)
32AC_SUBST(enable_shared)
33
16c44ed2
NS
34AC_ARG_ENABLE(gettext,
35[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
36 enable_gettext=yes)
37AC_SUBST(enable_gettext)
38
6635d6ab
JT
39AC_ARG_ENABLE(blkid,
40[ --enable-blkid=[yes/no] Enable use of block device id library [default=yes]],,
41 enable_blkid=yes)
42AC_SUBST(enable_blkid)
43
e246ba5f 44AC_ARG_ENABLE(readline,
16c44ed2 45[ --enable-readline=[yes/no] Enable readline command editing [default=no]],
541a1d4f 46 test $enable_readline = yes && libreadline="-lreadline",
e246ba5f 47 enable_readline=no)
e246ba5f
NS
48AC_SUBST(libreadline)
49AC_SUBST(enable_readline)
50
d4b9ebda 51AC_ARG_ENABLE(editline,
16c44ed2 52[ --enable-editline=[yes/no] Enable editline command editing [default=no]],
541a1d4f 53 test $enable_editline = yes && libeditline="-ledit",
d4b9ebda 54 enable_editline=no)
d4b9ebda
NS
55AC_SUBST(libeditline)
56AC_SUBST(enable_editline)
57
541a1d4f
NS
58AC_ARG_ENABLE(termcap,
59[ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]],
60 test $enable_termcap = yes && libtermcap="-ltermcap",)
61AC_SUBST(libtermcap)
62
e4da9941 63
82805b60 64AC_ARG_ENABLE(lib64,
595e27db
CH
65[ --enable-lib64=[yes/no] Enable lib64 support [default=yes]],,
66 enable_lib64=yes)
82805b60
TS
67AC_SUBST(enable_lib64)
68
1d43056b
JT
69AC_ARG_ENABLE(librt,
70[ --enable-librt=[yes/no] Enable librt support [default=yes]],,
71 enable_librt=yes)
72AC_SUBST(enable_librt)
0caa2bae 73
595e27db
CH
74#
75# If the user specified a libdir ending in lib64 do not append another
76# 64 to the library names.
77#
78base_libdir=`basename "$libdir"`
79case $base_libdir in
80lib64)
81 enable_lib64=no
82esac
83
84#
85# Some important tools should be installed into the root partitions.
86#
87# Check whether exec_prefix=/usr: and install them to /sbin in that
88# case. If the user choses a different prefix assume he just wants
89# a local install for testing and not a system install.
90#
91case $exec_prefix:$prefix in
92NONE:NONE | NONE:/usr | /usr:*)
93 root_sbindir='/sbin'
595e27db 94 root_libdir="/${base_libdir}"
2ccb8cf0
CH
95 ;;
96*)
97 root_sbindir="${sbindir}"
98 root_libdir="${libdir}"
99 ;;
595e27db
CH
100esac
101
2ccb8cf0
CH
102AC_SUBST([root_sbindir])
103AC_SUBST([root_libdir])
104
d9ee1c4c
AE
105# Find localized files. Don't descend into any "dot directories"
106# (like .git or .pc from quilt). Strangely, the "-print" argument
107# to "find" is required, to avoid including such directories in the
108# list.
8c053393 109LOCALIZED_FILES=""
d9ee1c4c 110for lfile in `find ${srcdir} -path './.??*' -prune -o -name '*.c' -type f -print || exit 1`; do
8c053393
AM
111 LOCALIZED_FILES="$LOCALIZED_FILES \$(TOPDIR)/$lfile"
112done
113AC_SUBST(LOCALIZED_FILES)
114
16c44ed2
NS
115AC_PACKAGE_GLOBALS(xfsprogs)
116AC_PACKAGE_UTILITIES(xfsprogs)
82805b60 117AC_MULTILIB($enable_lib64)
1d43056b 118AC_RT($enable_librt)
93d9f139 119
0686de0f 120AC_PACKAGE_NEED_UUID_H
7b9d2be9 121AC_PACKAGE_NEED_UUIDCOMPARE
fc49813f 122
949c0f10
NS
123AC_PACKAGE_NEED_PTHREAD_H
124AC_PACKAGE_NEED_PTHREADMUTEXINIT
125
0bba1a49
NS
126AC_HAVE_FADVISE
127AC_HAVE_MADVISE
128AC_HAVE_MINCORE
129AC_HAVE_SENDFILE
cfe6e3f0
NS
130AC_HAVE_GETMNTENT
131AC_HAVE_GETMNTINFO
c0b5232a 132AC_HAVE_FALLOCATE
8f0e0912 133AC_HAVE_FIEMAP
197d5828 134AC_HAVE_PREADV
628e112a 135AC_HAVE_COPY_FILE_RANGE
197d5828 136AC_HAVE_SYNC_FILE_RANGE
5ae294ea 137AC_HAVE_MNTENT
5121281b 138AC_HAVE_FLS
3bc05641 139AC_HAVE_READDIR
c14c7b79 140AC_HAVE_FSETXATTR
a49984b3 141AC_HAVE_MREMAP
6529e656 142AC_NEED_INTERNAL_FSXATTR
0bba1a49 143
6635d6ab
JT
144if test "$enable_blkid" = yes; then
145AC_HAVE_BLKID_TOPO
146fi
147
865f1075
JE
148AC_CHECK_SIZEOF([long])
149AC_CHECK_SIZEOF([char *])
cd960ece 150AC_TYPE_UMODE_T
16c44ed2 151AC_MANUAL_FORMAT
fc49813f 152
f474cd4f
JE
153AC_CONFIG_FILES([include/builddefs])
154AC_OUTPUT