[go: up one dir, main page]

File: configure.ac

package info (click to toggle)
irqbalance 1.1.0-2.3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 3,476 kB
  • ctags: 617
  • sloc: sh: 11,446; ansic: 3,460; makefile: 38
file content (101 lines) | stat: -rw-r--r-- 2,309 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
AC_INIT(irqbalance,1.1.0)
AC_PREREQ(2.12)dnl
AM_CONFIG_HEADER(config.h)

AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)

AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_AWK

AC_ARG_ENABLE([numa],
  AS_HELP_STRING([--disable-numa], [enable numa support (default is auto)]))
AS_IF([test "$enable_numa" = "no"],[
  ac_cv_header_numa_h=no
  ac_cv_lib_numa_numa_available=no
])

AC_HEADER_STDC
AC_CHECK_HEADERS([numa.h])

AC_CHECK_FUNCS(getopt_long)

AC_CHECK_LIB(numa, numa_available)
AC_CHECK_LIB(m, floor)

AC_C_CONST
AC_C_INLINE
AM_PROG_CC_C_O

AC_ARG_WITH([systemd],
  [ AS_HELP_STRING([--with-systemd],[Add systemd-lib support])]
)
AS_IF(
  [test "x$with_systemd" = xyes], [
    PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [journal_lib=yes])
    AC_DEFINE(HAVE_LIBSYSTEMD, 1, [systemd support])
    AC_CHECK_LIB([systemd], [sd_journal_print_with_location])
    AC_CHECK_LIB([systemd], [sd_journal_print])
])

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
  AC_SUBST(GLIB_CFLAGS)
  AC_SUBST(GLIB_LIBS)
  AC_MSG_WARN(Using locale implementation of GList functions)
  ]
)

AM_CONDITIONAL([LOCAL_GLIB], [test "x$local_glib2" = "xyes"])

AC_ARG_WITH([libcap-ng],
  AS_HELP_STRING([libcap-ng], [Add libcap-ng-support @<:@default=auto@:>@]))

AS_IF(
  [test "x$libcap_ng" != "xno"],
  [
  PKG_CHECK_MODULES([LIBCAP_NG], [libcap-ng],
    [AC_DEFINE(HAVE_LIBCAP_NG,1,[libcap-ng support])],
    [
     AS_IF(
       [test "x$libcap_ng" = "xyes"],
       [
       AC_MSG_ERROR([libcap-ng not found])
       ]
       )
    ]
  )
  ]
)

AC_OUTPUT(Makefile glib-local/Makefile)

AC_MSG_NOTICE()
AC_MSG_NOTICE([irqbalance Version:     $VERSION])
AC_MSG_NOTICE([Target:                 $target])
AC_MSG_NOTICE([Installation prefix:    $prefix])
AC_MSG_NOTICE([Compiler:               $CC])
AC_MSG_NOTICE([Compiler flags: $CFLAGS])