-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
115 lines (94 loc) · 3.67 KB
/
configure.ac
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
dnl Based off original GNOME 2 applet build files copyright:
dnl
dnl 2003-2007 Ole Laursen <[email protected]>
dnl
dnl Based off xfce4-genmon-plugins build files, which are copyright:
dnl
dnl 2004 Roger Seguin <[email protected]>
dnl 2006 Julien Devemy <[email protected]>
dnl
dnl XFCE4 modifications copyright:
dnl
dnl 2013-2014 OmegaPhil ([email protected])
dnl
dnl Initialising autoconf - this provides PACKAGE_NAME and PACKAGE_VERSION
dnl output variables
AC_INIT([xfce4-hardware-monitor-plugin], [1.4.6])
dnl Initialise automake with minimum version 1.11.6 (as of 17.11.13 Debian
dnl Stable (Wheezy) has this version - http://mail.xfce.org/pipermail/xfce4-dev/2013-November/030523.html)
dnl enabling all warnings and errors
AM_INIT_AUTOMAKE([1.11.6 -Wall -Werror])
dnl Collecting all macro definitions together into this header
AM_CONFIG_HEADER(config.h)
dnl Tidy directory for containing extra m4 macros
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
dnl Check for UNIX variants
AC_AIX
AC_ISC_POSIX
AC_MINIX
dnl Check for basic programs - AM_PROG_AR gets around non-POSIX archiver
dnl warning, AC_PROG_CC is needed as there is one pure C file to compile
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
IT_PROG_INTLTOOL([0.40.0])
AM_PROG_AR
dnl Initialize libtool, prevent static libraries to remove pointless
dnl compilation
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
dnl Check for standard header files
AC_HEADER_STDC
dnl Configure the panel plugin (XFCE4 xdt-depends.m4)
XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
dnl Checks for libraries
PKG_CHECK_MODULES([DEPS], [gtkmm-2.4 >= 2.6.0 \
libgnomecanvasmm-2.6 >= 2.6.0 \
libglademm-2.4 >= 2.4.0 \
libgtop-2.0 >= 2.6.0])
dnl Translations (XFCE4 xdt-i18n.m4) - this needs to be done before the
dnl libsensors checking for some reason?? Otherwise the assembler tries
dnl to open these files in the current directory??
XDT_I18N([ar as az be bg bn_IN bs ca cs cy da de dz el en_CA en_GB es eu fi fr gl gu he hi hr hu it ja kn ko lv mr ms nb ne nl oc pa pl pt pt_BR ru rw sl sq sr sr@Latn sv ta th tr uk vi zh_CN zh_HK zh_TW])
AC_SUBST([DEPS_CFLAGS])
AC_SUBST([DEPS_LIBS])
_cppflags="${CPPFLAGS}"
_ldflags="${LDFLAGS}"
AC_ARG_WITH(libsensors,
[ --with-libsensors[=DIR] use libsensors in DIR],[
if test "$withval" != "no" -a "$withval" != "yes"; then
SENSORS_DIR=$withval
CPPFLAGS="${CPPFLAGS} -I$withval/include/sensors"
LDFLAGS="${LDFLAGS} -L$withval/lib"
fi
])
if test "$with_libsensors" = "no"; then
echo "Disabling lmsensors support"
else
AC_CHECK_HEADERS(sensors/sensors.h,
AC_CHECK_LIB(sensors, sensors_init,[
AC_DEFINE(HAVE_LIBSENSORS,1,[libsensors is available])
if test "x${SENSORS_DIR}" != "x"; then
SENSORS_CFLAGS="-I${SENSORS_DIR}/include"
SENSORS_LIBS="-L${SENSORS_DIR}/lib -lsensors"
[case ${host} in
*-*-solaris*)
SENSORS_LIBS="-L${SENSORS_DIR}/lib -R${SENSORS_DIR}/lib -lsensors"
;;
esac]
else
SENSORS_LIBS="-lsensors"
fi]))
fi
AC_SUBST([SENSORS_CFLAGS])
AC_SUBST([SENSORS_LIBS])
CPPFLAGS=${_cppflags}
LDFLAGS=${_ldflags}
dnl Create makefiles
AC_CONFIG_FILES([Makefile
src/Makefile
po/Makefile.in
])
AC_OUTPUT