Commit fcd74c65 authored by Doug Goldstein's avatar Doug Goldstein Committed by Eric Blake

Fix build rules to use LDADD to add libraries

Fix build rules to use LDADD to add libraries to support --as-needed.
Also refactored some of the other automake variables in the same fashion
of the libvirt's automake rules.
Signed-off-by: Doug Goldstein's avatarDoug Goldstein <cardoe@cardoe.com>
parent 22c2f5fd
......@@ -3,6 +3,10 @@ AM_INIT_AUTOMAKE([-Wall -Werror])
AC_CONFIG_HEADERS([config.h])
AC_PREREQ([2.50])
AC_PROG_CC
AM_PROG_CC_C_O
AC_CHECK_FUNCS([memset])
AC_CHECK_FUNCS([strdup])
AC_CHECK_HEADERS([stdlib.h])
......
bin_PROGRAMS=libvirtMib_subagent
AM_CFLAGS = \
$(COVERAGE_CFLAGS) \
$(DRIVER_MODULE_CFLAGS) \
$(SNMP_CFLAGS) \
$(LIBVIRT_CFLAGS) \
$(WARN_CFLAGS) \
$(LOCK_CHECKING_CFLAGS)
AM_LDFLAGS = \
$(COVERAGE_LDFLAGS) \
$(PTHREAD_LIBS) \
$(LIBVIRT_LIBS) \
$(SNMP_LIBS)
LIBVIRT_OLD_SRCS = \
threads.c \
event_poll.c \
......@@ -58,7 +44,22 @@ HDRS = \
libvirtGuestTable.h
libvirtMib_subagent_SOURCES=${SRCS} ${HDRS}
libvirtMib_subagent_LDFLAGS=${AM_LDFLAGS}
libvirtMib_subagent_CFLAGS= \
$(DRIVER_MODULE_CFLAGS) \
$(SNMP_CFLAGS) \
$(LIBVIRT_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(WARN_CFLAGS) \
$(LOCK_CHECKING_CFLAGS)
libvirtMib_subagent_LDFLAGS= \
$(COVERAGE_LDFLAGS)
libvirtMib_subagent_LDADD= \
$(PTHREAD_LIBS) \
$(LIBVIRT_LIBS) \
$(SNMP_LIBS)
if LIBVIRT_OLD
libvirtMib_subagent_SOURCES+=${LIBVIRT_OLD_SRCS} ${LIBVIRT_OLD_HDRS}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment