summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 92ba2e3)
raw | patch | inline | side by side (parent: 92ba2e3)
author | Ruben Kerkhof <ruben@tilaa.com> | |
Fri, 11 Dec 2015 16:59:21 +0000 (17:59 +0100) | ||
committer | Ruben Kerkhof <ruben@tilaa.com> | |
Fri, 11 Dec 2015 16:59:21 +0000 (17:59 +0100) |
Split flags in _LDFLAGS and _LIBS
Allows the plugin to be detected and to be build on FreeBSD
Allows the plugin to be detected and to be build on FreeBSD
configure.ac | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index c4483792b016ce3436dd3b58d44394a8c39e4a40..655d6d8fd0d82b0e9b7815ad5b805fc639302623 100644 (file)
--- a/configure.ac
+++ b/configure.ac
# --with-libowcapi {{{
with_libowcapi_cppflags=""
-with_libowcapi_libs="-lowcapi"
+with_libowcapi_ldflags=""
AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
[
if test "x$withval" != "xno" && test "x$withval" != "xyes"
then
with_libowcapi_cppflags="-I$withval/include"
- with_libowcapi_libs="-L$withval/lib -lowcapi"
+ with_libowcapi_ldflags="-L$withval/lib"
with_libowcapi="yes"
else
with_libowcapi="$withval"
@@ -3253,7 +3253,7 @@ AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path
if test "x$with_libowcapi" = "xyes"
then
SAVE_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$with_libowcapi_cppflags"
+ CPPFLAGS="$CPPFLAGS $with_libowcapi_cppflags"
AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
then
SAVE_LDFLAGS="$LDFLAGS"
SAVE_CPPFLAGS="$CPPFLAGS"
- LDFLAGS="$with_libowcapi_libs"
+ LDFLAGS="$LDFLAGS $with_libowcapi_ldflags"
CPPFLAGS="$with_libowcapi_cppflags"
AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
if test "x$with_libowcapi" = "xyes"
then
BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
- BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
+ BUILD_WITH_LIBOWCAPI_LDFLAGS="$with_libowcapi_ldflags"
+ BUILD_WITH_LIBOWCAPI_LIBS="-lowcapi"
AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
+ AC_SUBST(BUILD_WITH_LIBOWCAPI_LDFLAGS)
AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
fi
# }}}
diff --git a/src/Makefile.am b/src/Makefile.am
index 9c1e32fbac32e6134437a337a7e50b0d0e9b0480..1996bed6175f77d657e914d0eb434fd4c8841126 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
onewire_la_CFLAGS = $(AM_CFLAGS)
onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
-onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOWCAPI_LDFLAGS)
endif
if BUILD_PLUGIN_OPENLDAP