summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in2
-rwxr-xr-xconfigure12
-rw-r--r--configure.ac18
-rw-r--r--include/config.h.in6
5 files changed, 22 insertions, 18 deletions
diff --git a/Makefile.am b/Makefile.am
index d83f47f..f6cfc08 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
diff --git a/Makefile.in b/Makefile.in
index 4666e4a..9f0d538 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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:
diff --git a/configure b/configure
index 6b18472..ef2f091 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/configure.ac b/configure.ac
index 844022f..c0c67a9 100644
--- a/configure.ac
+++ b/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"
diff --git a/include/config.h.in b/include/config.h.in
index d5282d0..e2f00b9 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -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