summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ef77268)
raw | patch | inline | side by side (parent: ef77268)
author | Vincent Bernat <vincent@bernat.im> | |
Fri, 23 Jan 2015 10:57:03 +0000 (11:57 +0100) | ||
committer | Vincent Bernat <Vincent.Bernat@exoscale.ch> | |
Fri, 23 Jan 2015 11:01:41 +0000 (12:01 +0100) |
Ensure linking is done after compilation of the test program, otherwise
symbols cannot be found. `LDFLAGS` and `CFLAGS` are placed before the
test program on gcc command line while `LIBS` is placed after. Even if
in our case, `LDFLAGS` also contain the lib, being put before the
program while the linking phase is done with the same command leads to
`sg_init()` never found which is misinterpreted as requiring an
argument.
symbols cannot be found. `LDFLAGS` and `CFLAGS` are placed before the
test program on gcc command line while `LIBS` is placed after. Even if
in our case, `LDFLAGS` also contain the lib, being put before the
program while the linking phase is done with the same command leads to
`sg_init()` never found which is misinterpreted as requiring an
argument.
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index ee18c725ef4340b3f6a06cb094434c2a24619a24..6779f4b190a90548b8df291f5decae69f2f521a8 100644 (file)
--- a/configure.ac
+++ b/configure.ac
if test "x$with_libstatgrab" = "xyes"
then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CFLAGS="$CFLAGS $with_libstatgrab_cflags"
LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
+ LIBS="-lstatgrab $LIBS"
AC_CACHE_CHECK([if libstatgrab >= 0.90],
[c_cv_have_libstatgrab_0_90],
CFLAGS="$SAVE_CFLAGS"
LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")