home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.parl.clemson.edu
/
2015-02-07.ftp.parl.clemson.edu.tar
/
ftp.parl.clemson.edu
/
pub
/
pvfs2
/
orangefs-2.8.3-20110323.tar.gz
/
orangefs-2.8.3-20110323.tar
/
orangefs
/
test
/
configure.in
< prev
next >
Wrap
Text File
|
2010-04-30
|
8KB
|
282 lines
dnl **************************************************************
dnl PVFS2 AUTOCONF SCRIPT
dnl
dnl Process this file with autoconf to produce a configure script.
dnl You may need to use autoheader as well if changing any DEFINEs
dnl sanity checks, output header, location of scripts used here
AC_INIT(correctness/pts/pts.h)
AC_CONFIG_HEADER(pvfs2-test-config.h)
AC_CONFIG_AUX_DIR(maint)
USR_CFLAGS=$CFLAGS
if test "x$USR_CFLAGS" = "x"; then
USR_CFLAGS_SET=no
fi
dnl PAV configuration needs absolute location of source and build.
dnl Linux-2.6 module needs absolute location of source, and uses the
dnl relative location for soft links for out-of-tree builds.
BUILD_ABSOLUTE_TOP=`pwd`
SRC_RELATIVE_TOP=$srcdir
SRC_ABSOLUTE_TOP=`cd $srcdir ; pwd`
AC_SUBST(BUILD_ABSOLUTE_TOP)
AC_SUBST(SRC_RELATIVE_TOP)
AC_SUBST(SRC_ABSOLUTE_TOP)
dnl Check if user actually wants to see all our build output (compiles, links, etc.).
AC_ARG_ENABLE(verbose-build,
[ --enable-verbose-build Enables full output during build process],
QUIET_COMPILE=0,
QUIET_COMPILE=1)
AC_SUBST(QUIET_COMPILE)
dnl Check for utilities that we need during the build process
AC_PROG_INSTALL
AC_PROG_CC
AC_MSG_CHECKING(whether cc is gcc)
if test "x$GCC" = "x"; then
AC_MSG_ERROR(pvfs2 currently requires gcc as the compiler)
fi
CFLAGS=$USR_CFLAGS
AC_PROG_CPP
AC_CHECK_PROG(HAVE_PERL, perl, yes, no)
AC_CHECK_PROG(HAVE_FIND, find, yes, no)
AC_CHECK_PROG(HAVE_BISON, bison, yes, no)
AC_CHECK_PROG(HAVE_FLEX, flex, yes, no)
AC_CHECK_HEADERS(openssl/evp.h)
AC_CHECK_HEADERS(openssl/crypto.h)
AC_CHECK_HEADERS(zlib.h)
dnl See if CC is a GNU compiler. This may require a real test in future
dnl versions of autoconf. In 2.13 it is a side-effect of AC_PROG_CC. First
dnl check if it is an Intel compiler; those lie and claim to be gcc but are
dnl not argument compatible
INTELC=
GNUC=
AC_MSG_CHECKING(whether cc is an Intel compiler)
AC_TRY_COMPILE([
#ifndef __ICC
choke me
#endif
], [],
AC_MSG_RESULT(yes)
INTELC=1
,
AC_MSG_RESULT(no)
)
if test x$INTELC = x ; then
if test x$GCC = xyes ; then
GNUC=1
fi
fi
AC_SUBST(INTELC)
AC_SUBST(GNUC)
AC_ARG_WITH(efence,
[ --with-efence=<path> Use electric fence for malloc debugging.],
if test x$withval != xyes ; then
LDFLAGS="${LDFLAGS} -L$withval"
fi
AC_CHECK_LIB(efence,malloc)
)
AC_ARG_WITH(zlib,
[ --with-zlib=<path> Use zlib for checksums.],
if test x$withval != xyes ; then
LDFLAGS="${LDFLAGS} -L$withval"
fi
)
AC_CHECK_LIB(z, adler32, [
LIBS="${LIBS} -lz"
AC_DEFINE(HAVE_LIBZ, 1, Define if libz exists)
])
AC_ARG_WITH(mpi,
[ --with-mpi=<dir> Location of the MPI installation],
if test x$withval = xyes; then
AC_MSG_ERROR(--with-mpi must be given a pathname)
else
MPICC="${withval}/bin/mpicc"
CFLAGS="${CFLAGS} -I${withval}/include"
LDFLAGS="${LDFLAGS} -L${withval}/lib"
BUILD_MPI="1"
fi
)
dnl a mechanism to turn off threads in the client library
AC_ARG_ENABLE(thread-safety,
[ --disable-thread-safety Disables thread safety in the client library],
[if test "x$enableval" = "xno" ; then
CFLAGS="$CFLAGS -D__GEN_NULL_LOCKING__"
AC_MSG_RESULT(no)
fi],
[ CFLAGS="$CFLAGS -D__GEN_POSIX_LOCKING__"
AC_MSG_RESULT(yes) ]
)
dnl default paths:
PVFS2_SRC_RELATIVE_TOP="${srcdir}/.."
PVFS2_BUILD_RELATIVE_TOP=".."
AC_ARG_WITH(pvfs2-src,
[ --with-pvfs2-src=<dir> Location of the PVFS2 src directory],
if test x$withval = xyes; then
AC_MSG_ERROR(--with-pvfs2-src must be given a pathname)
else
PVFS2_SRC_RELATIVE_TOP="${withval}"
PVFS2_BUILD_RELATIVE_TOP="${withval}"
fi
)
AC_ARG_WITH(pvfs2-build,
[ --with-pvfs2-build=<dir> Location of the PVFS2 build dir (if different from src dir)],
if test x$withval = xyes; then
AC_MSG_ERROR(--with-pvfs2-build must be given a pathname)
else
PVFS2_BUILD_RELATIVE_TOP="${withval}"
fi
)
AC_SUBST(PVFS2_SRC_RELATIVE_TOP)
AC_SUBST(PVFS2_BUILD_RELATIVE_TOP)
AC_ARG_ENABLE(strict,
[ --enable-strict Turn on strict debugging with gcc],
[
if test "x$USR_CFLAGS_SET" = "xno"; then
CFLAGS="$CFLAGS -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast"
fi
],
[
if test "x$USR_CFLAGS_SET" = "xno"; then
CFLAGS="$CFLAGS -O2"
fi
])
LDFLAGS="${LDFLAGS} -L${PVFS2_BUILD_RELATIVE_TOP}/lib"
CFLAGS="${CFLAGS} -I${PVFS2_SRC_RELATIVE_TOP} -I${PVFS2_SRC_RELATIVE_TOP}/include -I${PVFS2_BUILD_RELATIVE_TOP}"
CPPFLAGS="${CFLAGS} -I${PVFS2_SRC_RELATIVE_TOP} -I${PVFS2_SRC_RELATIVE_TOP}/include -I${PVFS2_BUILD_RELATIVE_TOP}"
dnl make sure we actually were supplied all of the PVFS2 components we need
AC_CHECK_HEADER(pvfs2-config.h, ,
AC_MSG_ERROR("could not find pvfs2-config.h... must specify path to PVFS2 src with --with-pvfs2-src")
)
dnl ask pvfs2-config to tell us what libraries to use for client and server
dnl tests
LIBS="${LIBS} `/bin/sh ${PVFS2_BUILD_RELATIVE_TOP}/src/apps/admin/pvfs2-config --libs`"
SERVERLIBS=`/bin/sh ${PVFS2_BUILD_RELATIVE_TOP}/src/apps/admin/pvfs2-config --serverlibs`
PVFS2_TOP_PREFIX=`/bin/sh ${PVFS2_BUILD_RELATIVE_TOP}/src/apps/admin/pvfs2-config --prefix`
AC_SUBST(SERVERLIBS)
AC_SUBST(PVFS2_TOP_PREFIX)
dnl make sure the libs exist and work
AC_CHECK_LIB(pvfs2, PVFS_sys_create, ,
AC_MSG_ERROR("could not find libpvfs2... must specify path to PVFS2 installation or build tree with --with-pvfs2-build")
)
MPI_INTELC=
MPI_GNUC=
if test x$BUILD_MPI = x1; then
AC_MSG_CHECKING(whether the mpicc compiler works)
saveCC="$CC"
CC="$MPICC"
AC_TRY_COMPILE([#include <mpi.h>], [int ret = MPI_Init(0, (void*)0)],
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
AC_MSG_ERROR($CC doesn't appear to be a valid MPI compiler)
)
dnl See if mpicc is a GNU compiler, notice that intel compiler claims
dnl it is GCC, but isn't argument compatible, hence check it first.
AC_MSG_CHECKING(whether mpicc is an Intel compiler)
AC_TRY_COMPILE([
#ifndef __ICC
choke me
#endif
], [],
AC_MSG_RESULT(yes)
MPI_INTELC=1
,
AC_MSG_RESULT(no)
)
if test x$MPI_INTELC = x; then
AC_MSG_CHECKING(whether mpicc is a GNU compiler)
AC_TRY_COMPILE([
#ifndef __GNUC__
choke me
#endif
], [],
AC_MSG_RESULT(yes)
MPI_GNUC=1
,
AC_MSG_RESULT(no)
)
fi
CC="$saveCC"
AC_SUBST(MPICC)
AC_SUBST(BUILD_MPI)
fi
AC_SUBST(MPI_INTELC)
AC_SUBST(MPI_GNUC)
AC_ARG_WITH(db,
[ --with-db=<dir> Location of installed DB package (default=/usr)],
[AX_BERKELEY_DB(${withval})],
[AX_BERKELEY_DB("")])
AC_ARG_WITH(openssl,
[ --with-openssl=<dir> Location of installed openssl package (default=/usr)
--without-openssl Don't build with openssl.
],
[AX_OPENSSL(${withval})],
[AX_OPENSSL_OPTIONAL])
AC_ARG_WITH(libaio,
[ --with-libaio=<dir> Location of installed libaio package (default=/usr)
--without-libaio Don't build with libaio.
],
[AX_AIO(${withval})],
[AX_AIO_OPTIONAL])
dnl create any missing subdirectories that wouldn't be created
dnl by AC_OUTPUT below (which won't create intermediate dirs).
for d in common io client correctness/pts kernel ; do
install -d $d;
done
dnl output final version of top level makefile and subdirectory
dnl makefile includes
AC_OUTPUT(Makefile
io/trove/module.mk
io/buffer/module.mk
common/quicklist/module.mk
common/id-generator/module.mk
common/gossip/module.mk
common/gen-locks/module.mk
common/misc/module.mk
io/bmi/module.mk
io/description/module.mk
io/flow/module.mk
io/job/module.mk
io/dev/module.mk
client/sysint/module.mk
client/mpi-io/module.mk
client/vfs/module.mk
proto/module.mk
server/module.mk
server/request-scheduler/module.mk
correctness/pts/module.mk
correctness/module.mk
common/pav/configfile.sample
kernel/linux-2.6/module.mk
maint/mpi-depend.sh
shared/module.mk
perfbase/benchmarks/module.mk
posix/module.mk
)