summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f42ef76)
raw | patch | inline | side by side (parent: f42ef76)
author | Jim Radford <radford@galvanix.com> | |
Wed, 7 Aug 2013 20:21:08 +0000 (13:21 -0700) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 6 Feb 2015 15:36:26 +0000 (16:36 +0100) |
Without this configure fails compile its libperl test program because
-lperl comes before the test program on the compiler command line.
Conflicts:
src/Makefile.am
-lperl comes before the test program on the compiler command line.
Conflicts:
src/Makefile.am
configure.in | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/configure.in b/configure.in
index c2d577478167b115841387501698d79d61555ae1..42028b7d9f1478130b11e1c3d5e25f7083e2418d 100644 (file)
--- a/configure.in
+++ b/configure.in
&& test -n "$perl_interpreter"
then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
- PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
+ PERL_LIBS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
CFLAGS="$CFLAGS $PERL_CFLAGS"
- LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
+ LIBS="$LIBS $PERL_LIBS"
AC_CACHE_CHECK([for libperl],
[c_cv_have_libperl],
@@ -3124,13 +3124,13 @@ dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string
then
AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
AC_SUBST(PERL_CFLAGS)
- AC_SUBST(PERL_LDFLAGS)
+ AC_SUBST(PERL_LIBS)
else
with_libperl="no"
fi
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
else if test -z "$perl_interpreter"; then
with_libperl="no (no perl interpreter found)"
c_cv_have_libperl="no"
if test "x$with_libperl" = "xyes"
then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CFLAGS="$CFLAGS $PERL_CFLAGS"
- LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
+ LIBS="$LIBS $PERL_LIBS"
AC_CACHE_CHECK([if perl supports ithreads],
[c_cv_have_perl_ithreads],
fi
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
if test "x$with_libperl" = "xyes"
then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
# trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
# (see issues #41 and #42)
CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
- LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
+ LIBS="$LIBS $PERL_LIBS"
AC_CACHE_CHECK([for broken Perl_load_module()],
[c_cv_have_broken_perl_load_module],
)
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
test "x$c_cv_have_broken_perl_load_module" = "xyes")
if test "x$with_libperl" = "xyes"
then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CFLAGS="$CFLAGS $PERL_CFLAGS"
- LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
+ LIBS="$LIBS $PERL_LIBS"
AC_CHECK_MEMBER(
[struct mgvtbl.svt_local],
fi
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
# }}}
diff --git a/src/Makefile.am b/src/Makefile.am
index 0bec7ab7c83494056f093797d4342e78e0253dfe..23c3a3b0fabbb3dec7d6474c963e15d5a2e4d9b2 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
endif
perl_la_LDFLAGS = -module -avoid-version \
$(PERL_LDFLAGS)
+perl_la_LIBS = $(PERL_LIBS)
collectd_LDADD += "-dlopen" perl.la
collectd_DEPENDENCIES += perl.la
endif