-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
35 lines (30 loc) · 918 Bytes
/
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
AC_INIT([sigar_port], 1.0)
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([Makefile])
AC_PROG_CC
AC_PROG_LIBTOOL
AC_SEARCH_LIBS([sigar_open], [sigar], [], [
AC_MSG_NOTICE([will check for libsigar in ${prefix}/lib])
unset ac_cv_search_sigar_open
AC_SEARCH_LIBS([sigar_open], [sigar], [
SIGAR_LDFLAGS="-L${prefix}/lib"
], [
AC_MSG_ERROR([need libsigar. Consider passing -L<path> in LDFLAGS])
], [-L${prefix}/lib])
])
AC_CHECK_HEADER([sigar.h], [], [
AC_MSG_NOTICE([will check for sigar.h in ${prefix}/include])
unset ac_cv_header_sigar_h
ac_func_search_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I${prefix}/include"
AC_CHECK_HEADER([sigar.h], [
SIGAR_CPPFLAGS="-I${prefix}/include"
], [
AC_MSG_ERROR([need sigar.h. Consider passing -I<path> in CPPFLAGS])
])
CPPFLAGS=$ac_func_search_save_CPPFLAGS
])
AC_SUBST(SIGAR_CPPFLAGS)
AC_SUBST(SIGAR_LDFLAGS)
AC_OUTPUT