Override default behavior of AC_CHECK_LIB so that we no longer
link libjerasure and libgf_complete to binaries built by configure
This commit is contained in:
@@ -25,7 +25,7 @@ check_PROGRAMS = text_xor_hd_code
|
||||
|
||||
alg_sig_test_SOURCES = tests/alg_sig_test.c
|
||||
alg_sig_test_CPPFLAGS = -I./tests
|
||||
alg_sig_test_LDFLAGS = -static -lerasurecode -lgf_complete
|
||||
alg_sig_test_LDFLAGS = -static -lerasurecode -lgf_complete -lJerasure
|
||||
check_PROGRAMS += alg_sig_test
|
||||
|
||||
test: alg_sig_test test_xor_hd_code
|
||||
|
||||
@@ -375,7 +375,7 @@ test_xor_hd_code_CPPFLAGS = -I./tests
|
||||
test_xor_hd_code_LDFLAGS = -static -lerasurecode -lgf_complete
|
||||
alg_sig_test_SOURCES = tests/alg_sig_test.c
|
||||
alg_sig_test_CPPFLAGS = -I./tests
|
||||
alg_sig_test_LDFLAGS = -static -lerasurecode -lgf_complete
|
||||
alg_sig_test_LDFLAGS = -static -lerasurecode -lgf_complete -lJerasure
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
12
configure
vendored
12
configure
vendored
@@ -11914,11 +11914,9 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Jerasure_jerasure_autoconf_test" >&5
|
||||
$as_echo "$ac_cv_lib_Jerasure_jerasure_autoconf_test" >&6; }
|
||||
if test "x$ac_cv_lib_Jerasure_jerasure_autoconf_test" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBJERASURE 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lJerasure $LIBS"
|
||||
echo "Found libJerasure"
|
||||
HAVE_LIBJERASURE = 1
|
||||
|
||||
else
|
||||
|
||||
@@ -11966,11 +11964,9 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gf_complete_gf_init_easy" >&5
|
||||
$as_echo "$ac_cv_lib_gf_complete_gf_init_easy" >&6; }
|
||||
if test "x$ac_cv_lib_gf_complete_gf_init_easy" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBGF_COMPLETE 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lgf_complete $LIBS"
|
||||
echo "Found libgf_complete"
|
||||
HAVE_LIBGF_COMPLETE = 1
|
||||
|
||||
else
|
||||
|
||||
|
||||
18
configure.ac
18
configure.ac
@@ -22,14 +22,28 @@ AC_PROG_CC
|
||||
# Check for jerasure/gf_complete headers
|
||||
AC_CHECK_HEADERS(jerasure.h cauchy.h galois.h liberation.h reed_sol.h gf_complete.h)
|
||||
|
||||
AC_CHECK_LIB([Jerasure], [jerasure_autoconf_test], [],
|
||||
dnl Default behavior of AC_CHECK_LIB if the library is found is to set the HAVE_LIB*
|
||||
dnl variable and add the library to LIBS, which has the result of all compiles
|
||||
dnl --including those performed by configure-- linking against the discovered
|
||||
dnl library. This un-necessary linkage can increase build time as well as
|
||||
dnl complicates configuration, so default behavior has been overridden so we dont
|
||||
dnl set the LIBS.
|
||||
AC_CHECK_LIB([Jerasure], [jerasure_autoconf_test],
|
||||
[
|
||||
echo "Found libJerasure"
|
||||
HAVE_LIBJERASURE = 1
|
||||
],
|
||||
[
|
||||
echo "Error! You need to have libJerasure installed."
|
||||
echo "libJerasure is available from bitbucket.org/kmgreen2/jerasure-kmg.git"
|
||||
exit -1
|
||||
])
|
||||
|
||||
AC_CHECK_LIB([gf_complete], [gf_init_easy], [],
|
||||
AC_CHECK_LIB([gf_complete], [gf_init_easy],
|
||||
[
|
||||
echo "Found libgf_complete"
|
||||
HAVE_LIBGF_COMPLETE = 1
|
||||
],
|
||||
[
|
||||
echo "Error! You need to have gf_complete installed."
|
||||
echo "gf_complete is available from http://web.eecs.utk.edu/~plank/plank/papers/CS-13-703.html"
|
||||
|
||||
@@ -27,12 +27,6 @@
|
||||
/* Define to 1 if you have the <liberation.h> header file. */
|
||||
#undef HAVE_LIBERATION_H
|
||||
|
||||
/* Define to 1 if you have the `gf_complete' library (-lgf_complete). */
|
||||
#undef HAVE_LIBGF_COMPLETE
|
||||
|
||||
/* Define to 1 if you have the `Jerasure' library (-lJerasure). */
|
||||
#undef HAVE_LIBJERASURE
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user