irqbalance: Misc build enhancements
- Remove AC_CANONICAL_TARGET macro from configure to allow easier cross compilation - Add private implementation of called glib2 functions so that irqbalance can be built on systems not supporting a sufficiently recent version of glib2 - Add --without-glib2 configure option to support explicit selection of internal glib2 function definitions, overriding automatic selection. Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
This commit is contained in:
parent
1189cd6f19
commit
8d7404149e
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,6 +1,9 @@
|
||||||
|
*.a
|
||||||
*.o
|
*.o
|
||||||
*~
|
*~
|
||||||
|
|
||||||
|
.deps
|
||||||
|
|
||||||
*.diff
|
*.diff
|
||||||
*.patch
|
*.patch
|
||||||
*.orig
|
*.orig
|
||||||
|
@ -9,6 +12,8 @@
|
||||||
/INSTALL
|
/INSTALL
|
||||||
/Makefile
|
/Makefile
|
||||||
/Makefile.in
|
/Makefile.in
|
||||||
|
*/Makefile
|
||||||
|
*/Makefile.in
|
||||||
/aclocal.m4
|
/aclocal.m4
|
||||||
/autom4te.cache
|
/autom4te.cache
|
||||||
/compile
|
/compile
|
||||||
|
@ -25,6 +30,7 @@
|
||||||
/m4
|
/m4
|
||||||
/missing
|
/missing
|
||||||
/stamp-h1
|
/stamp-h1
|
||||||
|
/depcomp
|
||||||
|
|
||||||
/irqbalance
|
/irqbalance
|
||||||
irqbalance-*.tar.*
|
irqbalance-*.tar.*
|
||||||
|
|
|
@ -25,7 +25,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||||
EXTRA_DIST = README INSTALL COPYING autogen.sh m4/cap-ng.m4 misc/irqbalance.service
|
EXTRA_DIST = README INSTALL COPYING autogen.sh m4/cap-ng.m4 misc/irqbalance.service
|
||||||
|
|
||||||
INCLUDES = -I${top_srcdir}
|
INCLUDES = -I${top_srcdir}
|
||||||
LIBS = $(CAPNG_LDADD) $(GLIB_LIBS) @LIBS@
|
LIBS = $(CAPNG_LDADD) @LIBS@
|
||||||
AM_CFLAGS = $(GLIB_CFLAGS)
|
AM_CFLAGS = $(GLIB_CFLAGS)
|
||||||
AM_CPPFLAGS = -W -Wall -Wshadow -Wformat -Wundef -D_GNU_SOURCE
|
AM_CPPFLAGS = -W -Wall -Wshadow -Wformat -Wundef -D_GNU_SOURCE
|
||||||
noinst_HEADERS = bitmap.h constants.h cpumask.h irqbalance.h non-atomic.h \
|
noinst_HEADERS = bitmap.h constants.h cpumask.h irqbalance.h non-atomic.h \
|
||||||
|
@ -33,6 +33,7 @@ noinst_HEADERS = bitmap.h constants.h cpumask.h irqbalance.h non-atomic.h \
|
||||||
sbin_PROGRAMS = irqbalance
|
sbin_PROGRAMS = irqbalance
|
||||||
irqbalance_SOURCES = activate.c bitmap.c classify.c cputree.c irqbalance.c \
|
irqbalance_SOURCES = activate.c bitmap.c classify.c cputree.c irqbalance.c \
|
||||||
irqlist.c numa.c placement.c powermode.c procinterrupts.c
|
irqlist.c numa.c placement.c powermode.c procinterrupts.c
|
||||||
|
irqbalance_LDADD = $(CAPNG_LDADD) $(GLIB_LIBS)
|
||||||
dist_man_MANS = irqbalance.1
|
dist_man_MANS = irqbalance.1
|
||||||
|
|
||||||
CONFIG_CLEAN_FILES = debug*.list config/*
|
CONFIG_CLEAN_FILES = debug*.list config/*
|
||||||
|
@ -40,3 +41,4 @@ clean-generic:
|
||||||
rm -rf autom4te*.cache
|
rm -rf autom4te*.cache
|
||||||
rm -f *.rej *.orig *~
|
rm -f *.rej *.orig *~
|
||||||
|
|
||||||
|
SUBDIRS = $(GLIB_SUBDIR)
|
||||||
|
|
34
configure.ac
34
configure.ac
|
@ -36,7 +36,6 @@ AM_CONFIG_HEADER(config.h)
|
||||||
echo Configuring irqbalance $VERSION
|
echo Configuring irqbalance $VERSION
|
||||||
|
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
AC_CANONICAL_TARGET
|
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
AM_PROG_LIBTOOL
|
AM_PROG_LIBTOOL
|
||||||
AC_SUBST(LIBTOOL_DEPS)
|
AC_SUBST(LIBTOOL_DEPS)
|
||||||
|
@ -70,10 +69,39 @@ AC_C_CONST
|
||||||
AC_C_INLINE
|
AC_C_INLINE
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
|
|
||||||
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28])
|
AC_ARG_WITH([glib2],
|
||||||
|
[AS_HELP_STRING([--without-glib2],
|
||||||
|
[Don't use system glib2 library. Use local implementation instead.])],
|
||||||
|
[],
|
||||||
|
[with_glib2=check])
|
||||||
|
|
||||||
|
local_glib2=
|
||||||
|
AS_IF(
|
||||||
|
[test "x$with_glib2" = xyes],
|
||||||
|
[PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28])],
|
||||||
|
|
||||||
|
[test "x$with_glib2" = xno],
|
||||||
|
[local_glib2="yes"],
|
||||||
|
|
||||||
|
[PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28], [], [local_glib2="yes"])]
|
||||||
|
)
|
||||||
|
|
||||||
|
AS_IF(
|
||||||
|
[test "x$local_glib2" = xyes],
|
||||||
|
[
|
||||||
|
GLIB_CFLAGS=-I./glib-local
|
||||||
|
GLIB_LIBS=glib-local/libglib.a
|
||||||
|
GLIB_SUBDIR=glib-local
|
||||||
|
AC_SUBST(GLIB_CFLAGS)
|
||||||
|
AC_SUBST(GLIB_LIBS)
|
||||||
|
AC_SUBST(GLIB_SUBDIR)
|
||||||
|
AC_MSG_WARN(Using locale implementation of GList functions)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
LIBCAP_NG_PATH
|
LIBCAP_NG_PATH
|
||||||
|
|
||||||
AC_OUTPUT(Makefile)
|
AC_OUTPUT(Makefile glib-local/Makefile)
|
||||||
|
|
||||||
AC_MSG_NOTICE()
|
AC_MSG_NOTICE()
|
||||||
AC_MSG_NOTICE([irqbalance Version: $VERSION])
|
AC_MSG_NOTICE([irqbalance Version: $VERSION])
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <time.h>
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#ifdef HAVE_NUMA_H
|
#ifdef HAVE_NUMA_H
|
||||||
|
|
Loading…
Reference in a new issue