-
Notifications
You must be signed in to change notification settings - Fork 22
/
configure.ac
63 lines (49 loc) · 1.93 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
AC_PREREQ([2.69])
AC_INIT([glusterfs-coreutils],
m4_esyscmd(echo -n `git describe --always --tags`),
[https://github.com/gluster/gluster-coreutils.git])
AC_SUBST([PACKAGE_RELEASE], 1)
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([glusterfs-coreutils.spec Makefile lib/Makefile src/Makefile man/Makefile])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.13.2 foreign -Wall -Werror tar-ustar])
AM_MAINTAINER_MODE
AC_DEFINE([COPYRIGHT], ["Copyright (C) 2015 Facebook, Inc."], [Copyright notice])
AC_DEFINE_UNQUOTED([LICENSE], ["License GPLv3: GNU GPL version 3 " \
"<http://www.gnu.org/licenses/gpl-3.0.en.html>.\nThis is free software: you " \
"are free to change and redistribute it.\nThere is NO WARRANTY, " \
"to the extent permitted by law.\n"], [License text])
# Configure libtool
LT_INIT
# Checks
AC_PROG_CC
AC_PROG_CC_C99
gl_EARLY
gl_INIT
AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AC_PROG_LN_S
AC_PROG_EGREP
# Dependencies
AC_CHECK_HEADERS([readline/readline.h readline/history.h],,[AC_MSG_ERROR([cannot find readline headers])])
PKG_CHECK_MODULES([GLFS], [glusterfs-api >= 3],[],[AC_MSG_ERROR([cannot find glusterfs api headers])])
PKG_CHECK_MODULES([GLFS_7_6],[glusterfs-api >= 7.6],[AC_DEFINE(HAVE_GLFS_7_6,1,[found glusterfs api version >= 7.6])], [no])
AC_CHECK_PROG([HAVE_HELP2MAN],[help2man],[yes],[no])
AM_CONDITIONAL([HAVE_HELP2MAN], [test "x$HAVE_HELP2MAN" = xyes])
AM_COND_IF([HAVE_HELP2MAN],,[AC_MSG_ERROR([required program 'help2man' not found.])])
AC_SUBST([MORE_CFLAGS])
AC_SUBST([MORE_CPPFLAGS])
AC_SUBST([MORE_LDFLAGS])
AC_OUTPUT
cat <<EOF
------------------ Summary ------------------
$PACKAGE_NAME version $PACKAGE_VERSION
Prefix.........: $prefix
C Compiler.....: $CC $CFLAGS $CPPFLAGS
Linker.........: $LD $MORE_LDFLAGS $LDFLAGS $LIBS
---------------------------------------------
Check the above options and compile with:
${MAKE-make}
EOF