2011-08-09 11:00:19 +04:00
dnl Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com>
2011-07-12 09:33:29 +04:00
2009-02-18 15:06:07 +03:00
dnl This file is part of GlusterFS.
dnl
dnl GlusterFS is free software; you can redistribute it and/or modify
2011-08-06 12:30:03 +04:00
dnl it under the terms of the GNU General Public License as published by
2009-02-18 15:06:07 +03:00
dnl the Free Software Foundation; either version 3 of the License, or
dnl (at your option) any later version.
dnl
dnl GlusterFS is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2011-08-06 12:30:03 +04:00
dnl GNU General Public License for more details.
2009-02-18 15:06:07 +03:00
dnl
2011-08-06 12:30:03 +04:00
dnl You should have received a copy of the GNU General Public License
2009-02-18 15:06:07 +03:00
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
2012-02-21 16:05:31 +04:00
AC_INIT([glusterfs],[3git],[gluster-users@gluster.org],,[https://github.com/gluster/glusterfs.git])
2009-02-18 15:06:07 +03:00
AM_INIT_AUTOMAKE
2011-07-26 18:23:27 +04:00
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
2011-08-05 12:34:43 +04:00
if make --help 2>&1 | grep -q no-print-directory; then
2011-08-05 13:22:01 +04:00
AM_MAKEFLAGS="$AM_MAKEFLAGS --no-print-directory";
fi
if make --help 2>&1 | grep -q quiet; then
AM_MAKEFLAGS="$AM_MAKEFLAGS --quiet"
fi
if libtool --help 2>&1 | grep -q quiet; then
AM_LIBTOOLFLAGS="--quiet";
2011-08-05 12:34:43 +04:00
fi
2009-02-18 15:06:07 +03:00
AM_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile
2011-01-27 08:23:31 +03:00
libglusterfs/Makefile
2009-02-18 15:06:07 +03:00
libglusterfs/src/Makefile
glusterfsd/Makefile
glusterfsd/src/Makefile
2010-06-28 06:49:46 +04:00
rpc/Makefile
rpc/rpc-lib/Makefile
rpc/rpc-lib/src/Makefile
rpc/rpc-transport/Makefile
rpc/rpc-transport/socket/Makefile
rpc/rpc-transport/socket/src/Makefile
2010-08-30 12:03:52 +04:00
rpc/rpc-transport/rdma/Makefile
rpc/rpc-transport/rdma/src/Makefile
2010-07-14 20:26:17 +04:00
rpc/xdr/Makefile
rpc/xdr/src/Makefile
2009-02-18 15:06:07 +03:00
xlators/Makefile
xlators/mount/Makefile
xlators/mount/fuse/Makefile
xlators/mount/fuse/src/Makefile
xlators/mount/fuse/utils/mount.glusterfs
xlators/mount/fuse/utils/mount_glusterfs
xlators/mount/fuse/utils/Makefile
xlators/storage/Makefile
xlators/storage/posix/Makefile
xlators/storage/posix/src/Makefile
xlators/cluster/Makefile
xlators/cluster/afr/Makefile
xlators/cluster/afr/src/Makefile
xlators/cluster/stripe/Makefile
xlators/cluster/stripe/src/Makefile
xlators/cluster/dht/Makefile
xlators/cluster/dht/src/Makefile
xlators/performance/Makefile
xlators/performance/write-behind/Makefile
xlators/performance/write-behind/src/Makefile
xlators/performance/read-ahead/Makefile
xlators/performance/read-ahead/src/Makefile
xlators/performance/io-threads/Makefile
xlators/performance/io-threads/src/Makefile
xlators/performance/io-cache/Makefile
xlators/performance/io-cache/src/Makefile
xlators/performance/symlink-cache/Makefile
xlators/performance/symlink-cache/src/Makefile
2009-07-09 04:25:28 +04:00
xlators/performance/quick-read/Makefile
xlators/performance/quick-read/src/Makefile
2011-09-24 14:44:11 +04:00
xlators/performance/md-cache/Makefile
xlators/performance/md-cache/src/Makefile
2009-02-18 15:06:07 +03:00
xlators/debug/Makefile
xlators/debug/trace/Makefile
xlators/debug/trace/src/Makefile
xlators/debug/error-gen/Makefile
xlators/debug/error-gen/src/Makefile
2009-04-28 14:22:03 +04:00
xlators/debug/io-stats/Makefile
xlators/debug/io-stats/src/Makefile
2009-02-18 15:06:07 +03:00
xlators/protocol/Makefile
2010-05-04 04:36:24 +04:00
xlators/protocol/auth/Makefile
xlators/protocol/auth/addr/Makefile
xlators/protocol/auth/addr/src/Makefile
xlators/protocol/auth/login/Makefile
xlators/protocol/auth/login/src/Makefile
2010-06-21 11:00:04 +04:00
xlators/protocol/client/Makefile
xlators/protocol/client/src/Makefile
xlators/protocol/server/Makefile
xlators/protocol/server/src/Makefile
2009-02-18 15:06:07 +03:00
xlators/features/Makefile
xlators/features/locks/Makefile
xlators/features/locks/src/Makefile
xlators/features/quota/Makefile
xlators/features/quota/src/Makefile
2011-01-27 08:23:31 +03:00
xlators/features/marker/Makefile
xlators/features/marker/src/Makefile
2011-01-27 08:23:35 +03:00
xlators/features/marker/utils/Makefile
2011-09-02 21:03:33 +04:00
xlators/features/marker/utils/src/Makefile
2011-01-27 08:23:35 +03:00
xlators/features/marker/utils/syncdaemon/Makefile
2010-03-24 07:04:02 +03:00
xlators/features/read-only/Makefile
xlators/features/read-only/src/Makefile
2010-05-12 23:10:47 +04:00
xlators/features/mac-compat/Makefile
xlators/features/mac-compat/src/Makefile
2010-09-28 10:11:07 +04:00
xlators/features/quiesce/Makefile
xlators/features/quiesce/src/Makefile
2012-02-02 17:44:28 +04:00
xlators/features/index/Makefile
xlators/features/index/src/Makefile
2009-02-18 15:06:07 +03:00
xlators/encryption/Makefile
xlators/encryption/rot-13/Makefile
xlators/encryption/rot-13/src/Makefile
2011-07-01 21:18:10 +04:00
xlators/system/Makefile
xlators/system/posix-acl/Makefile
xlators/system/posix-acl/src/Makefile
2010-07-08 12:16:13 +04:00
cli/Makefile
cli/src/Makefile
2009-02-18 15:06:07 +03:00
doc/Makefile
extras/Makefile
extras/init.d/Makefile
2010-09-13 07:40:16 +04:00
extras/init.d/glusterd.plist
extras/init.d/glusterd-Debian
extras/init.d/glusterd-Redhat
extras/init.d/glusterd-SuSE
2009-02-18 15:06:07 +03:00
extras/benchmarking/Makefile
2012-04-23 11:52:42 +04:00
extras/hook-scripts/Makefile
2009-08-12 05:26:11 +04:00
contrib/fuse-util/Makefile
2011-11-30 03:20:48 +04:00
contrib/uuid/uuid_types.h
2010-03-31 11:27:01 +04:00
xlators/nfs/Makefile
2010-03-31 11:27:03 +04:00
xlators/nfs/server/Makefile
xlators/nfs/server/src/Makefile
2010-07-08 12:16:13 +04:00
xlators/mgmt/Makefile
xlators/mgmt/glusterd/Makefile
xlators/mgmt/glusterd/src/Makefile
2009-02-18 15:06:07 +03:00
glusterfs.spec])
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_LIBTOOL
2009-03-25 04:19:14 +03:00
AC_ARG_WITH(mountutildir,
[ --with-mountutildir=DIR mount helper utility in DIR @<:@/sbin@:>@],
[mountutildir=$withval],
[mountutildir='/sbin'])
AC_SUBST(mountutildir)
2009-10-27 15:52:16 +03:00
AC_ARG_WITH(initdir,
[ --with-initdir=DIR init.d scripts in DIR @<:@/etc/init.d@:>@],
[initdir=$withval],
[initdir='/etc/init.d'])
AC_SUBST(initdir)
2010-05-28 11:00:42 +04:00
AC_ARG_WITH(launchddir,
[ --with-launchddir=DIR launchd services in DIR @<:@/Library/LaunchDaemons@:>@],
[launchddir=$withval],
[launchddir='/Library/LaunchDaemons'])
AC_SUBST(launchddir)
2009-02-18 15:06:07 +03:00
# LEX needs a check
AC_PROG_LEX
if test "x${LEX}" != "xflex" -a "x${FLEX}" != "xlex"; then
AC_MSG_ERROR([Flex or lex required to build glusterfs.])
fi
2011-11-30 03:20:48 +04:00
dnl
dnl Word sizes...
dnl
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
SIZEOF_SHORT=$ac_cv_sizeof_short
SIZEOF_INT=$ac_cv_sizeof_int
SIZEOF_LONG=$ac_cv_sizeof_long
SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long
AC_SUBST(SIZEOF_SHORT)
AC_SUBST(SIZEOF_INT)
AC_SUBST(SIZEOF_LONG)
AC_SUBST(SIZEOF_LONG_LONG)
2009-02-18 15:06:07 +03:00
# YACC needs a check
AC_PROG_YACC
if test "x${YACC}" = "xbyacc" -o "x${YACC}" = "xyacc" -o "x${YACC}" = "x"; then
AC_MSG_ERROR([GNU Bison required to build glusterfs.])
fi
AC_CHECK_TOOL([LD],[ld])
Replace GPLV3 MD5 with OpenSSL MD5
Ric asked me to look at replacing the GPL licensed MD5 code with
something better, i.e. perhaps faster, and with a less restrictive
license, etc. So I took a couple hour holiday from working on
wrapping up the client_t and did this.
OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT
style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD,
Open Solaris, etc. IOW it's universally available on the platforms we
care about. It's written by Eric Young (eay), now at EMC/RSA, and I
can say from experience that the OpenSSL implementation of MD5 (at least)
is every bit as fast as RSA's proprietary implementation (primarily
because the implementations are very, very similar.) The last time I
surveyed MD5 implementations I found they're all pretty much the same
speed.
I changed the APIs (and ABIs) for the strong and weak checksums.
Strictly speaking I didn't need to do that. They're only called on
short strings of data, i.e. pathnames, so using int32_t and uint32_t
is ostensibly okay. My change is arguably a better, more general API
for this sort of thing. It's also what bit me when gerrit/jenkins
validation failed due to glusterfs segv-ing. (I didn't pay close enough
attention to the implementation of the weak checksum. But it forced me
to learn what gerrit/jenkins are doing and going forward I can do better
testing before submitting to gerrit.)
Now resubmitting with a BZ
Change-Id: I545fade1604e74fc68399894550229bd57a5e0df
BUG: 807718
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-27 19:14:23 +04:00
AC_CHECK_LIB([crypto], [MD5], , AC_MSG_ERROR([OpenSSL crypto library is required to build glusterfs]))
2009-02-18 15:06:07 +03:00
AC_CHECK_LIB([pthread], [pthread_mutex_init], , AC_MSG_ERROR([Posix threads library is required to build glusterfs]))
Replace GPLV3 MD5 with OpenSSL MD5
Ric asked me to look at replacing the GPL licensed MD5 code with
something better, i.e. perhaps faster, and with a less restrictive
license, etc. So I took a couple hour holiday from working on
wrapping up the client_t and did this.
OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT
style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD,
Open Solaris, etc. IOW it's universally available on the platforms we
care about. It's written by Eric Young (eay), now at EMC/RSA, and I
can say from experience that the OpenSSL implementation of MD5 (at least)
is every bit as fast as RSA's proprietary implementation (primarily
because the implementations are very, very similar.) The last time I
surveyed MD5 implementations I found they're all pretty much the same
speed.
I changed the APIs (and ABIs) for the strong and weak checksums.
Strictly speaking I didn't need to do that. They're only called on
short strings of data, i.e. pathnames, so using int32_t and uint32_t
is ostensibly okay. My change is arguably a better, more general API
for this sort of thing. It's also what bit me when gerrit/jenkins
validation failed due to glusterfs segv-ing. (I didn't pay close enough
attention to the implementation of the weak checksum. But it forced me
to learn what gerrit/jenkins are doing and going forward I can do better
testing before submitting to gerrit.)
Now resubmitting with a BZ
Change-Id: I545fade1604e74fc68399894550229bd57a5e0df
BUG: 807718
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-27 19:14:23 +04:00
2009-02-18 15:06:07 +03:00
AC_CHECK_FUNC([dlopen], [has_dlopen=yes], AC_CHECK_LIB([dl], [dlopen], , AC_MSG_ERROR([Dynamic linking library required to build glusterfs])))
AC_CHECK_HEADERS([sys/xattr.h])
AC_CHECK_HEADERS([sys/extattr.h])
Replace GPLV3 MD5 with OpenSSL MD5
Ric asked me to look at replacing the GPL licensed MD5 code with
something better, i.e. perhaps faster, and with a less restrictive
license, etc. So I took a couple hour holiday from working on
wrapping up the client_t and did this.
OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT
style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD,
Open Solaris, etc. IOW it's universally available on the platforms we
care about. It's written by Eric Young (eay), now at EMC/RSA, and I
can say from experience that the OpenSSL implementation of MD5 (at least)
is every bit as fast as RSA's proprietary implementation (primarily
because the implementations are very, very similar.) The last time I
surveyed MD5 implementations I found they're all pretty much the same
speed.
I changed the APIs (and ABIs) for the strong and weak checksums.
Strictly speaking I didn't need to do that. They're only called on
short strings of data, i.e. pathnames, so using int32_t and uint32_t
is ostensibly okay. My change is arguably a better, more general API
for this sort of thing. It's also what bit me when gerrit/jenkins
validation failed due to glusterfs segv-ing. (I didn't pay close enough
attention to the implementation of the weak checksum. But it forced me
to learn what gerrit/jenkins are doing and going forward I can do better
testing before submitting to gerrit.)
Now resubmitting with a BZ
Change-Id: I545fade1604e74fc68399894550229bd57a5e0df
BUG: 807718
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-27 19:14:23 +04:00
AC_CHECK_HEADERS([openssl/md5.h])
2010-05-17 11:06:58 +04:00
case $host_os in
darwin*)
if ! test "`/usr/bin/sw_vers | grep ProductVersion: | cut -f 2 | cut -d. -f2`" -ge 5; then
AC_MSG_ERROR([You need at least OS X 10.5 (Leopard) to build Glusterfs])
fi
;;
esac
2009-02-18 15:06:07 +03:00
dnl Mac OS X does not have spinlocks
AC_CHECK_FUNC([pthread_spin_init], [have_spinlock=yes])
if test "x${have_spinlock}" = "xyes"; then
AC_DEFINE(HAVE_SPINLOCK, 1, [define if found spinlock])
fi
AC_SUBST(HAVE_SPINLOCK)
dnl some os may not have GNU defined strnlen function
AC_CHECK_FUNC([strnlen], [have_strnlen=yes])
if test "x${have_strnlen}" = "xyes"; then
AC_DEFINE(HAVE_STRNLEN, 1, [define if found strnlen])
fi
AC_SUBST(HAVE_STRNLEN)
AC_CHECK_FUNC([setfsuid], [have_setfsuid=yes])
AC_CHECK_FUNC([setfsgid], [have_setfsgid=yes])
if test "x${have_setfsuid}" = "xyes" -a "x${have_setfsgid}" = "xyes"; then
AC_DEFINE(HAVE_SET_FSID, 1, [define if found setfsuid setfsgid])
fi
# FUSE section
AC_ARG_ENABLE([fuse-client],
AC_HELP_STRING([--disable-fuse-client],
[Do not build the fuse client. NOTE: you cannot mount glusterfs without the client]))
BUILD_FUSE_CLIENT=no
2009-07-14 00:28:07 +04:00
if test "x$enable_fuse_client" != "xno"; then
2009-02-18 15:06:07 +03:00
FUSE_CLIENT_SUBDIR=fuse
BUILD_FUSE_CLIENT="yes"
fi
AC_SUBST(FUSE_CLIENT_SUBDIR)
# end FUSE section
2009-08-12 05:26:11 +04:00
# FUSERMOUNT section
AC_ARG_ENABLE([fusermount],
2009-12-02 21:19:53 +03:00
AC_HELP_STRING([--enable-fusermount],
2009-12-18 10:49:43 +03:00
[Build fusermount]))
2009-08-12 05:26:11 +04:00
BUILD_FUSERMOUNT="no"
2009-12-02 21:19:53 +03:00
if test "x$enable_fusermount" = "xyes"; then
2010-07-08 09:47:52 +04:00
FUSERMOUNT_SUBDIR="contrib/fuse-util"
2009-08-12 05:26:11 +04:00
BUILD_FUSERMOUNT="yes"
AC_DEFINE(GF_FUSERMOUNT, 1, [Use our own fusermount])
fi
AC_SUBST(FUSERMOUNT_SUBDIR)
#end FUSERMOUNT section
2009-02-18 15:06:07 +03:00
# EPOLL section
AC_ARG_ENABLE([epoll],
AC_HELP_STRING([--disable-epoll],
[Use poll instead of epoll.]))
BUILD_EPOLL=no
if test "x$enable_epoll" != "xno"; then
AC_CHECK_HEADERS([sys/epoll.h],
[BUILD_EPOLL=yes],
[BUILD_EPOLL=no])
fi
# end EPOLL section
# IBVERBS section
AC_ARG_ENABLE([ibverbs],
AC_HELP_STRING([--disable-ibverbs],
[Do not build the ibverbs transport]))
if test "x$enable_ibverbs" != "xno"; then
AC_CHECK_LIB([ibverbs],
[ibv_get_device_list],
[HAVE_LIBIBVERBS="yes"],
[HAVE_LIBIBVERBS="no"])
fi
if test "x$enable_ibverbs" = "xyes" -a "x$HAVE_LIBIBVERBS" = "xno"; then
echo "ibverbs requested but not found."
exit 1
fi
2010-08-31 07:20:29 +04:00
BUILD_RDMA=no
2009-02-18 15:06:07 +03:00
BUILD_IBVERBS=no
if test "x$enable_ibverbs" != "xno" -a "x$HAVE_LIBIBVERBS" = "xyes"; then
IBVERBS_SUBDIR=ib-verbs
BUILD_IBVERBS=yes
2010-08-31 07:20:29 +04:00
RDMA_SUBDIR=rdma
BUILD_RDMA=yes
2009-02-18 15:06:07 +03:00
fi
AC_SUBST(IBVERBS_SUBDIR)
2010-08-31 07:20:29 +04:00
AC_SUBST(RDMA_SUBDIR)
2009-02-18 15:06:07 +03:00
# end IBVERBS section
2011-01-27 08:23:35 +03:00
# SYNCDAEMON section
AC_ARG_ENABLE([georeplication],
AC_HELP_STRING([--disable-georeplication],
[Do not install georeplication components]))
BUILD_SYNCDAEMON=no
2011-02-17 10:31:18 +03:00
case $host_os in
linux*)
2011-08-12 11:17:44 +04:00
#do nothing
;;
netbsd*)
2011-02-17 10:31:18 +03:00
#do nothing
;;
*)
#disabling geo replication for non-linux platforms
enable_georeplication=no
;;
esac
2011-02-24 03:08:46 +03:00
SYNCDAEMON_COMPILE=0
2011-01-27 08:23:35 +03:00
if test "x$enable_georeplication" != "xno"; then
SYNCDAEMON_SUBDIR=utils
2011-02-24 03:08:46 +03:00
SYNCDAEMON_COMPILE=1
2011-01-27 08:23:35 +03:00
BUILD_SYNCDAEMON="yes"
AM_PATH_PYTHON([2.4])
echo -n "checking if python is python 2.x... "
if echo $PYTHON_VERSION | grep ^2; then
:
else
echo no
AC_MSG_ERROR([only python 2.x is supported])
fi
echo -n "checking if python has ctypes support... "
if "$PYTHON" -c 'import ctypes' 2>/dev/null; then
echo yes
else
echo no
AC_MSG_ERROR([python does not have ctypes support])
fi
fi
2011-02-24 03:08:46 +03:00
AC_SUBST(SYNCDAEMON_COMPILE)
2011-01-27 08:23:35 +03:00
AC_SUBST(SYNCDAEMON_SUBDIR)
# end SYNCDAEMON section
2011-07-12 09:33:29 +04:00
#check if libxml is present if so enable HAVE_LIB_XML
echo -n "checking if libxml2 is present... "
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6.19],
[echo "yes (features requiring libxml2 enabled)" AC_DEFINE(HAVE_LIB_XML, 1, [define if libxml2 is present])],
[echo "no"] )
AC_SUBST(LIBXML2_CFLAGS)
AC_SUBST(LIBXML2_LIBS)
2011-01-27 08:23:35 +03:00
2009-02-18 15:06:07 +03:00
dnl FreeBSD > 5 has execinfo as a Ported library for giving a workaround
dnl solution to GCC backtrace functionality
AC_CHECK_HEADERS([execinfo.h], [have_backtrace=yes],
AC_CHECK_LIB([execinfo], [backtrace], [have_backtrace=yes]))
dnl AC_MSG_ERROR([libexecinfo not found libexecinfo required.])))
if test "x${have_backtrace}" = "xyes"; then
AC_DEFINE(HAVE_BACKTRACE, 1, [define if found backtrace])
fi
AC_SUBST(HAVE_BACKTRACE)
dnl glusterfs prints memory usage to stderr by sending it SIGUSR1
AC_CHECK_FUNC([malloc_stats], [have_malloc_stats=yes])
if test "x${have_malloc_stats}" = "xyes"; then
AC_DEFINE(HAVE_MALLOC_STATS, 1, [define if found malloc_stats])
fi
AC_SUBST(HAVE_MALLOC_STATS)
dnl Linux, Solaris, Cygwin
AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec])
dnl FreeBSD, NetBSD
AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec])
2012-03-30 17:58:43 +04:00
case $host_os in
*netbsd*)
CFLAGS=-D_INCOMPLETE_XOPEN_C063
;;
esac
2011-08-12 11:12:27 +04:00
AC_CHECK_FUNC([linkat], [have_linkat=yes])
if test "x${have_linkat}" = "xyes"; then
AC_DEFINE(HAVE_LINKAT, 1, [define if found linkat])
fi
AC_SUBST(HAVE_LINKAT)
2009-02-18 15:06:07 +03:00
dnl Check for argp
AC_CHECK_HEADER([argp.h], AC_DEFINE(HAVE_ARGP, 1, [have argp]))
AC_CONFIG_SUBDIRS(argp-standalone)
BUILD_ARGP_STANDALONE=no
if test "x${ac_cv_header_argp_h}" = "xno"; then
BUILD_ARGP_STANDALONE=yes
ARGP_STANDALONE_CPPFLAGS='-I${top_srcdir}/argp-standalone'
ARGP_STANDALONE_LDADD='${top_builddir}/argp-standalone/libargp.a'
fi
AC_SUBST(ARGP_STANDALONE_CPPFLAGS)
AC_SUBST(ARGP_STANDALONE_LDADD)
AC_CHECK_HEADER([malloc.h], AC_DEFINE(HAVE_MALLOC_H, 1, [have malloc.h]))
AC_CHECK_FUNC([llistxattr], [have_llistxattr=yes])
if test "x${have_llistxattr}" = "xyes"; then
AC_DEFINE(HAVE_LLISTXATTR, 1, [define if llistxattr exists])
fi
AC_CHECK_FUNC([fdatasync], [have_fdatasync=yes])
if test "x${have_fdatasync}" = "xyes"; then
AC_DEFINE(HAVE_FDATASYNC, 1, [define if fdatasync exists])
fi
2009-03-01 16:35:18 +03:00
# Check the distribution where you are compiling glusterfs on
GF_DISTRIBUTION=
AC_CHECK_FILE([/etc/debian_version])
AC_CHECK_FILE([/etc/SuSE-release])
AC_CHECK_FILE([/etc/redhat-release])
if test "x$ac_cv_file__etc_debian_version" = "xyes"; then
GF_DISTRIBUTION=Debian
fi
if test "x$ac_cv_file__etc_SuSE_release" = "xyes"; then
GF_DISTRIBUTION=SuSE
fi
if test "x$ac_cv_file__etc_redhat_release" = "xyes"; then
GF_DISTRIBUTION=Redhat
fi
AC_SUBST(GF_DISTRIBUTION)
2009-02-18 15:06:07 +03:00
GF_HOST_OS=""
GF_LDFLAGS="-rdynamic"
case $host_os in
linux*)
dnl GF_LINUX_HOST_OS=1
GF_HOST_OS="GF_LINUX_HOST_OS"
2010-09-20 06:29:14 +04:00
GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -O0"
2009-02-18 15:06:07 +03:00
GF_GLUSTERFS_CFLAGS="${GF_CFLAGS}"
GF_LDADD="${ARGP_STANDALONE_LDADD}"
2010-05-17 11:06:58 +04:00
GF_FUSE_CFLAGS="-DFUSERMOUNT_DIR=\\\"\$(bindir)\\\""
2009-02-18 15:06:07 +03:00
;;
solaris*)
GF_HOST_OS="GF_SOLARIS_HOST_OS"
2011-02-17 10:31:18 +03:00
GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O0 -m64"
2009-02-18 15:06:07 +03:00
GF_LDFLAGS=""
GF_GLUSTERFS_CFLAGS="${GF_CFLAGS}"
GF_LDADD="${ARGP_STANDALONE_LDADD}"
GF_GLUSTERFS_LDFLAGS="-lnsl -lresolv -lsocket"
2009-12-18 15:38:04 +03:00
BUILD_FUSE_CLIENT=no
FUSE_CLIENT_SUBDIR=""
2009-02-18 15:06:07 +03:00
;;
2011-05-20 20:56:27 +04:00
*netbsd*)
GF_HOST_OS="GF_BSD_HOST_OS"
2011-08-12 18:29:28 +04:00
GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -D_INCOMPLETE_XOPEN_C063"
2011-05-20 20:56:27 +04:00
GF_GLUSTERFS_CFLAGS="${GF_CFLAGS}"
GF_LDADD="${ARGP_STANDALONE_LDADD}"
if test "x$ac_cv_header_execinfo_h" = "xyes"; then
GF_GLUSTERFS_LDFLAGS="-lexecinfo"
fi
2012-03-30 17:58:43 +04:00
GF_FUSE_LDADD="-lperfuse"
BUILD_FUSE_CLIENT=yes
LEXLIB=""
2011-05-20 20:56:27 +04:00
;;
2009-02-18 15:06:07 +03:00
*bsd*)
GF_HOST_OS="GF_BSD_HOST_OS"
2010-09-20 06:29:14 +04:00
GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -O0"
2009-02-18 15:06:07 +03:00
GF_GLUSTERFS_CFLAGS="${GF_CFLAGS}"
GF_LDADD="${ARGP_STANDALONE_LDADD}"
if test "x$ac_cv_header_execinfo_h" = "xyes"; then
GF_GLUSTERFS_LDFLAGS="-lexecinfo"
Replace GPLV3 MD5 with OpenSSL MD5
Ric asked me to look at replacing the GPL licensed MD5 code with
something better, i.e. perhaps faster, and with a less restrictive
license, etc. So I took a couple hour holiday from working on
wrapping up the client_t and did this.
OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT
style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD,
Open Solaris, etc. IOW it's universally available on the platforms we
care about. It's written by Eric Young (eay), now at EMC/RSA, and I
can say from experience that the OpenSSL implementation of MD5 (at least)
is every bit as fast as RSA's proprietary implementation (primarily
because the implementations are very, very similar.) The last time I
surveyed MD5 implementations I found they're all pretty much the same
speed.
I changed the APIs (and ABIs) for the strong and weak checksums.
Strictly speaking I didn't need to do that. They're only called on
short strings of data, i.e. pathnames, so using int32_t and uint32_t
is ostensibly okay. My change is arguably a better, more general API
for this sort of thing. It's also what bit me when gerrit/jenkins
validation failed due to glusterfs segv-ing. (I didn't pay close enough
attention to the implementation of the weak checksum. But it forced me
to learn what gerrit/jenkins are doing and going forward I can do better
testing before submitting to gerrit.)
Now resubmitting with a BZ
Change-Id: I545fade1604e74fc68399894550229bd57a5e0df
BUG: 807718
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-27 19:14:23 +04:00
fi
2010-05-17 11:06:58 +04:00
BUILD_FUSE_CLIENT=no
2009-02-18 15:06:07 +03:00
;;
darwin*)
GF_HOST_OS="GF_DARWIN_HOST_OS"
LIBTOOL=glibtool
2010-09-20 06:29:14 +04:00
GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -D__DARWIN_64_BIT_INO_T -bundle -undefined suppress -flat_namespace -D_XOPEN_SOURCE -O0"
GF_GLUSTERFS_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -D__DARWIN_64_BIT_INO_T -undefined suppress -flat_namespace -O0"
2009-02-18 15:06:07 +03:00
GF_LDADD="${ARGP_STANDALONE_LDADD}"
2010-05-17 11:06:58 +04:00
GF_FUSE_CFLAGS="-I\$(CONTRIBDIR)/macfuse"
2009-02-18 15:06:07 +03:00
;;
esac
2010-07-08 12:16:13 +04:00
BUILD_READLINE=no
AC_CHECK_LIB([readline -lcurses],[readline],[RLLIBS="-lreadline -lcurses"])
AC_CHECK_LIB([readline -ltermcap],[readline],[RLLIBS="-lreadline -ltermcap"])
AC_CHECK_LIB([readline -lncurses],[readline],[RLLIBS="-lreadline -lncurses"])
if test "x$RLLIBS" != "x"; then
AC_DEFINE(HAVE_READLINE, 1, [readline enabled CLI])
BUILD_READLINE=yes
fi
2009-02-18 15:06:07 +03:00
AC_SUBST(GF_HOST_OS)
AC_SUBST(GF_GLUSTERFS_LDFLAGS)
AC_SUBST(GF_GLUSTERFS_CFLAGS)
AC_SUBST(GF_CFLAGS)
AC_SUBST(GF_LDFLAGS)
AC_SUBST(GF_LDADD)
2011-05-20 20:56:27 +04:00
AC_SUBST(GF_FUSE_LDADD)
2010-05-17 11:06:58 +04:00
AC_SUBST(GF_FUSE_CFLAGS)
2010-07-08 12:16:13 +04:00
AC_SUBST(RLLIBS)
2011-08-05 12:34:43 +04:00
AC_SUBST(AM_MAKEFLAGS)
2011-08-05 13:22:01 +04:00
AC_SUBST(AM_LIBTOOLFLAGS)
2009-02-18 15:06:07 +03:00
2009-08-12 05:26:11 +04:00
CONTRIBDIR='$(top_srcdir)/contrib'
AC_SUBST(CONTRIBDIR)
2010-09-03 17:58:11 +04:00
INCLUDES='-I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/uuid'
AC_SUBST(INCLUDES)
Replace GPLV3 MD5 with OpenSSL MD5
Ric asked me to look at replacing the GPL licensed MD5 code with
something better, i.e. perhaps faster, and with a less restrictive
license, etc. So I took a couple hour holiday from working on
wrapping up the client_t and did this.
OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT
style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD,
Open Solaris, etc. IOW it's universally available on the platforms we
care about. It's written by Eric Young (eay), now at EMC/RSA, and I
can say from experience that the OpenSSL implementation of MD5 (at least)
is every bit as fast as RSA's proprietary implementation (primarily
because the implementations are very, very similar.) The last time I
surveyed MD5 implementations I found they're all pretty much the same
speed.
I changed the APIs (and ABIs) for the strong and weak checksums.
Strictly speaking I didn't need to do that. They're only called on
short strings of data, i.e. pathnames, so using int32_t and uint32_t
is ostensibly okay. My change is arguably a better, more general API
for this sort of thing. It's also what bit me when gerrit/jenkins
validation failed due to glusterfs segv-ing. (I didn't pay close enough
attention to the implementation of the weak checksum. But it forced me
to learn what gerrit/jenkins are doing and going forward I can do better
testing before submitting to gerrit.)
Now resubmitting with a BZ
Change-Id: I545fade1604e74fc68399894550229bd57a5e0df
BUG: 807718
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-27 19:14:23 +04:00
AM_CONDITIONAL([GF_DARWIN_HOST_OS], test "${GF_HOST_OS}" = "GF_DARWIN_HOST_OS")
2009-02-18 15:06:07 +03:00
AC_OUTPUT
echo
echo "GlusterFS configure summary"
echo "==========================="
echo "FUSE client : $BUILD_FUSE_CLIENT"
echo "Infiniband verbs : $BUILD_IBVERBS"
echo "epoll IO multiplex : $BUILD_EPOLL"
echo "argp-standalone : $BUILD_ARGP_STANDALONE"
2009-08-12 05:26:11 +04:00
echo "fusermount : $BUILD_FUSERMOUNT"
2010-07-08 12:16:13 +04:00
echo "readline : $BUILD_READLINE"
2011-01-27 08:23:35 +03:00
echo "georeplication : $BUILD_SYNCDAEMON"
2009-02-18 15:06:07 +03:00
echo