Skip to content
Permalink
Browse files

Slight modifications to autoconf/make files to not require library-sp…

…ecific env vars even when libraries exist in default locations.
  • Loading branch information...
gransom committed Mar 8, 2019
1 parent af2d6ee commit 8e929446630cf8b81655de89921590f6b19bf509
Showing with 27 additions and 10 deletions.
  1. +19 −5 Makefile.am
  2. +8 −5 configure.ac
@@ -8,10 +8,15 @@
# that will also exist at run-time, but you no longer need the PA2X
# install at run-time.

AM_CPPFLAGS = -Icommon/configuration/src -Icommon/log/src -I$(AWS4C) \
# AM_CPPFLAGS = -Icommon/configuration/src -Icommon/log/src -I$(AWS4C)
AM_CPPFLAGS = -Icommon/configuration/src -Icommon/log/src \
-Ifuse/src -D_GNU_SOURCE -D_XOPEN_SOURCE=700 \
-DDATAPARSE -DBUILD_INC_DIR=@includedir@ -I$(PARSE_DIR)

if AWS4C
AM_CPPFLAGS += -I$(AWS4C)
endif

# automake requires '=' before '+=', even for these built-in vars
AM_CFLAGS =
AM_LDFLAGS =
@@ -81,8 +86,11 @@ libmarfs_a_SOURCES = parser fuse/src/common.c fuse/ src/common.h \

libmarfs_a_LIBADD = $(PARSE_OBJ)

LDADD += libmarfs.a $(AWS4C)/libaws4c.a $(AWS4C)/libaws4c_extra.a
LDADD += libmarfs.a #$(AWS4C)/libaws4c.a $(AWS4C)/libaws4c_extra.a

if AWS4C
LDADD += $(AWS4C)/libaws4c.a $(AWS4C)/libaws4c_extra.a
endif



@@ -114,10 +122,16 @@ bin_PROGRAMS =


# --- additions for multi-component builds
# Configure has already added the -lne flag and verified that libne is in our path
if USE_MC
AM_CPPFLAGS += -I$(LIBNE)/include -DUSE_MC=1
AM_LDFLAGS += -L$(LIBNE)/lib
LDADD += -L$(LIBNE)/lib -lne -lft
# AM_CPPFLAGS += -I$(LIBNE)/include -DUSE_MC=1
AM_CPPFLAGS += -DUSE_MC=1
# AM_LDFLAGS += -L$(LIBNE)/lib
# LDADD += -L$(LIBNE)/lib -lne -lft
endif

if LIBNE
AM_CPPFLAGS += -I$(LIBNE)/include
endif


@@ -180,8 +180,8 @@ AC_CHECK_LIB([dl], [dlsym])
AC_CHECK_LIB([crypto], [MD5_Init])
AC_CHECK_LIB([curl], [curl_easy_cleanup])
AC_CHECK_LIB([xml2], [xmlSAX2GetEntity])
AC_CHECK_LIB([aws4c], [s3_enable_Scality_extensions])
AC_CHECK_LIB([aws4c_extra], [s3_create_bucket])
AC_CHECK_LIB([aws4c], [s3_enable_Scality_extensions], [], [AC_MSG_ERROR(["Failed to locate libaws4c! Please ensure the library is installed in a default location or that your AWS4C env var is properly set."])])
AC_CHECK_LIB([aws4c_extra], [s3_create_bucket], [], [AC_MSG_ERROR(["Failed to locate libaws4c_extra! Please ensure the library is installed in a default location or that your AWS4C env var is properly set."])])

# DAL=MC+RDMA also needs rdma_sockets and rdmacm
AS_IF([test x"$enable_mc" = xsockets],
@@ -259,7 +259,7 @@ AM_CONDITIONAL([GPFS_UTILITIES], [test x"$build_gpfs_utilities" = xyes])

# We depend on a number of environment variables
AC_ARG_VAR(AWS4C, [The location of the aws4c installation])
AC_ARG_VAR(PA2X, [The location of the PA2X installation])
#AC_ARG_VAR(PA2X, [The location of the PA2X installation])
AC_ARG_VAR(LIBNE, [The location of the erasureUtils libne installation])
AC_ARG_VAR(PARSE_DIR, [The location of PA2X (need this and PA2X)])

@@ -271,8 +271,11 @@ AC_ARG_VAR(MARFS_MNT, [The MarFS mount point (optional)])
AC_ARG_VAR(MARFSCONFIGRC, [The path to the marfs config (or any valid config)])

AS_IF([test -z "$PARSE_DIR"], [AC_ERROR([PARSE_DIR is not set])])
AS_IF([test -z "$AWS4C"], [AC_ERROR([AWS4C is not set])])
AS_IF([test x"$enable_mc" != xno && test -z "$LIBNE"], [AC_ERROR([LIBNE is not set])])
# We've already verified we have the libraries. If we have found them, we don't necessarily need the env vars
#AS_IF([test -z "$AWS4C"], [AC_ERROR([AWS4C is not set])])
AM_CONDITIONAL([AWS4C],[test "$AWS4C"]) #just note if the var is set
#AS_IF([test x"$enable_mc" != xno && test -z "$LIBNE"], [AC_ERROR([LIBNE is not set])])
AM_CONDITIONAL([LIBNE],[test "$LIBNE"]) #just note if the var is set

AS_IF([test x"$enable_mc" = xsockets && test x"$with_aws_auth" = xno],
[AC_ERROR([sockets MC cant have aws-auth disabled])])

0 comments on commit 8e92944

Please sign in to comment.
You can’t perform that action at this time.