]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - configure.ac
xfsprogs: Release 4.8.0
[thirdparty/xfsprogs-dev.git] / configure.ac
1 AC_INIT([xfsprogs], [4.8.0], [linux-xfs@vger.kernel.org])
2 AC_PREREQ(2.50)
3 AC_CONFIG_AUX_DIR([.])
4 AC_CONFIG_MACRO_DIR([m4])
5 AC_CONFIG_SRCDIR([include/libxfs.h])
6 AC_CONFIG_HEADER(include/platform_defs.h)
7 AC_PREFIX_DEFAULT(/usr)
8
9 AC_PROG_LIBTOOL
10
11 AC_PROG_CC
12 if test $cross_compiling = no; then
13 BUILD_CC="$CC"
14 AC_SUBST(BUILD_CC)
15 else
16 AC_CHECK_PROGS(BUILD_CC, gcc cc)
17 fi
18
19 AC_ARG_ENABLE(shared,
20 [ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
21 enable_shared=yes)
22 AC_SUBST(enable_shared)
23
24 AC_ARG_ENABLE(gettext,
25 [ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
26 enable_gettext=yes)
27 AC_SUBST(enable_gettext)
28
29 AC_ARG_ENABLE(blkid,
30 [ --enable-blkid=[yes/no] Enable use of block device id library [default=yes]],,
31 enable_blkid=yes)
32 AC_SUBST(enable_blkid)
33
34 AC_ARG_ENABLE(readline,
35 [ --enable-readline=[yes/no] Enable readline command editing [default=no]],
36 test $enable_readline = yes && libreadline="-lreadline",
37 enable_readline=no)
38 AC_SUBST(libreadline)
39 AC_SUBST(enable_readline)
40
41 AC_ARG_ENABLE(editline,
42 [ --enable-editline=[yes/no] Enable editline command editing [default=no]],
43 test $enable_editline = yes && libeditline="-ledit",
44 enable_editline=no)
45 AC_SUBST(libeditline)
46 AC_SUBST(enable_editline)
47
48 AC_ARG_ENABLE(termcap,
49 [ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]],
50 test $enable_termcap = yes && libtermcap="-ltermcap",)
51 AC_SUBST(libtermcap)
52
53
54 AC_ARG_ENABLE(lib64,
55 [ --enable-lib64=[yes/no] Enable lib64 support [default=yes]],,
56 enable_lib64=yes)
57 AC_SUBST(enable_lib64)
58
59 AC_ARG_ENABLE(librt,
60 [ --enable-librt=[yes/no] Enable librt support [default=yes]],,
61 enable_librt=yes)
62 AC_SUBST(enable_librt)
63
64 #
65 # If the user specified a libdir ending in lib64 do not append another
66 # 64 to the library names.
67 #
68 base_libdir=`basename "$libdir"`
69 case $base_libdir in
70 lib64)
71 enable_lib64=no
72 esac
73
74 #
75 # Some important tools should be installed into the root partitions.
76 #
77 # Check whether exec_prefix=/usr: and install them to /sbin in that
78 # case. If the user choses a different prefix assume he just wants
79 # a local install for testing and not a system install.
80 #
81 case $exec_prefix:$prefix in
82 NONE:NONE | NONE:/usr | /usr:*)
83 root_sbindir='/sbin'
84 root_libdir="/${base_libdir}"
85 ;;
86 *)
87 root_sbindir="${sbindir}"
88 root_libdir="${libdir}"
89 ;;
90 esac
91
92 AC_SUBST([root_sbindir])
93 AC_SUBST([root_libdir])
94
95 # Find localized files. Don't descend into any "dot directories"
96 # (like .git or .pc from quilt). Strangely, the "-print" argument
97 # to "find" is required, to avoid including such directories in the
98 # list.
99 LOCALIZED_FILES=""
100 for lfile in `find ${srcdir} -path './.??*' -prune -o -name '*.c' -type f -print || exit 1`; do
101 LOCALIZED_FILES="$LOCALIZED_FILES \$(TOPDIR)/$lfile"
102 done
103 AC_SUBST(LOCALIZED_FILES)
104
105 AC_PACKAGE_GLOBALS(xfsprogs)
106 AC_PACKAGE_UTILITIES(xfsprogs)
107 AC_MULTILIB($enable_lib64)
108 AC_RT($enable_librt)
109
110 AC_PACKAGE_NEED_UUID_H
111 AC_PACKAGE_NEED_UUIDCOMPARE
112
113 AC_PACKAGE_NEED_PTHREAD_H
114 AC_PACKAGE_NEED_PTHREADMUTEXINIT
115
116 AC_HAVE_FADVISE
117 AC_HAVE_MADVISE
118 AC_HAVE_MINCORE
119 AC_HAVE_SENDFILE
120 AC_HAVE_GETMNTENT
121 AC_HAVE_GETMNTINFO
122 AC_HAVE_FALLOCATE
123 AC_HAVE_FIEMAP
124 AC_HAVE_PREADV
125 AC_HAVE_COPY_FILE_RANGE
126 AC_HAVE_SYNC_FILE_RANGE
127 AC_HAVE_MNTENT
128 AC_HAVE_FLS
129 AC_HAVE_READDIR
130 AC_HAVE_FSETXATTR
131 AC_HAVE_MREMAP
132
133 if test "$enable_blkid" = yes; then
134 AC_HAVE_BLKID_TOPO
135 fi
136
137 AC_CHECK_SIZEOF([long])
138 AC_CHECK_SIZEOF([char *])
139 AC_TYPE_UMODE_T
140 AC_MANUAL_FORMAT
141
142 AC_CONFIG_FILES([include/builddefs])
143 AC_OUTPUT