]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - configure.ac
build: Change OS X-specific CFLAGS/LDFLAGS
[thirdparty/xfsprogs-dev.git] / configure.ac
CommitLineData
7d8b7080 1AC_INIT([xfsprogs], [4.2.0-rc1])
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
TT
11AC_PROG_CC
12if test $cross_compiling = no; then
13 BUILD_CC="$CC"
14 AC_SUBST(BUILD_CC)
15else
16 AC_CHECK_PROGS(BUILD_CC, gcc cc)
17fi
18
534b0bfd 19AC_ARG_ENABLE(shared,
dfc13ce1 20[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
d5dca43b
NS
21 enable_shared=yes)
22AC_SUBST(enable_shared)
23
16c44ed2
NS
24AC_ARG_ENABLE(gettext,
25[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
26 enable_gettext=yes)
27AC_SUBST(enable_gettext)
28
e246ba5f 29AC_ARG_ENABLE(readline,
16c44ed2 30[ --enable-readline=[yes/no] Enable readline command editing [default=no]],
541a1d4f 31 test $enable_readline = yes && libreadline="-lreadline",
e246ba5f 32 enable_readline=no)
e246ba5f
NS
33AC_SUBST(libreadline)
34AC_SUBST(enable_readline)
35
d4b9ebda 36AC_ARG_ENABLE(editline,
16c44ed2 37[ --enable-editline=[yes/no] Enable editline command editing [default=no]],
541a1d4f 38 test $enable_editline = yes && libeditline="-ledit",
d4b9ebda 39 enable_editline=no)
d4b9ebda
NS
40AC_SUBST(libeditline)
41AC_SUBST(enable_editline)
42
541a1d4f
NS
43AC_ARG_ENABLE(termcap,
44[ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]],
45 test $enable_termcap = yes && libtermcap="-ltermcap",)
46AC_SUBST(libtermcap)
47
e4da9941 48
82805b60 49AC_ARG_ENABLE(lib64,
595e27db
CH
50[ --enable-lib64=[yes/no] Enable lib64 support [default=yes]],,
51 enable_lib64=yes)
82805b60
TS
52AC_SUBST(enable_lib64)
53
595e27db
CH
54#
55# If the user specified a libdir ending in lib64 do not append another
56# 64 to the library names.
57#
58base_libdir=`basename "$libdir"`
59case $base_libdir in
60lib64)
61 enable_lib64=no
62esac
63
64#
65# Some important tools should be installed into the root partitions.
66#
67# Check whether exec_prefix=/usr: and install them to /sbin in that
68# case. If the user choses a different prefix assume he just wants
69# a local install for testing and not a system install.
70#
71case $exec_prefix:$prefix in
72NONE:NONE | NONE:/usr | /usr:*)
73 root_sbindir='/sbin'
595e27db 74 root_libdir="/${base_libdir}"
2ccb8cf0
CH
75 ;;
76*)
77 root_sbindir="${sbindir}"
78 root_libdir="${libdir}"
79 ;;
595e27db
CH
80esac
81
2ccb8cf0
CH
82AC_SUBST([root_sbindir])
83AC_SUBST([root_libdir])
84
d9ee1c4c
AE
85# Find localized files. Don't descend into any "dot directories"
86# (like .git or .pc from quilt). Strangely, the "-print" argument
87# to "find" is required, to avoid including such directories in the
88# list.
8c053393 89LOCALIZED_FILES=""
d9ee1c4c 90for lfile in `find ${srcdir} -path './.??*' -prune -o -name '*.c' -type f -print || exit 1`; do
8c053393
AM
91 LOCALIZED_FILES="$LOCALIZED_FILES \$(TOPDIR)/$lfile"
92done
93AC_SUBST(LOCALIZED_FILES)
94
16c44ed2
NS
95AC_PACKAGE_GLOBALS(xfsprogs)
96AC_PACKAGE_UTILITIES(xfsprogs)
82805b60 97AC_MULTILIB($enable_lib64)
93d9f139 98
6ec3f6ba
NS
99AC_PACKAGE_NEED_AIO_H
100AC_PACKAGE_NEED_LIO_LISTIO
101
0686de0f 102AC_PACKAGE_NEED_UUID_H
7b9d2be9 103AC_PACKAGE_NEED_UUIDCOMPARE
fc49813f 104
949c0f10
NS
105AC_PACKAGE_NEED_PTHREAD_H
106AC_PACKAGE_NEED_PTHREADMUTEXINIT
107
0bba1a49
NS
108AC_HAVE_FADVISE
109AC_HAVE_MADVISE
110AC_HAVE_MINCORE
111AC_HAVE_SENDFILE
cfe6e3f0
NS
112AC_HAVE_GETMNTENT
113AC_HAVE_GETMNTINFO
c0b5232a 114AC_HAVE_FALLOCATE
8f0e0912 115AC_HAVE_FIEMAP
197d5828
ES
116AC_HAVE_PREADV
117AC_HAVE_SYNC_FILE_RANGE
2a3a4942 118AC_HAVE_BLKID_TOPO
3bc05641 119AC_HAVE_READDIR
0bba1a49 120
865f1075
JE
121AC_CHECK_SIZEOF([long])
122AC_CHECK_SIZEOF([char *])
cd960ece 123AC_TYPE_UMODE_T
16c44ed2 124AC_MANUAL_FORMAT
fc49813f 125
f474cd4f
JE
126AC_CONFIG_FILES([include/builddefs])
127AC_OUTPUT