Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 162 lines (145 sloc) 4.08 kb
99d73258 »
2009-08-12 added a few more missing files
1 dnl ... hmm ... we have to duplicate the data below again
c22b3d77 »
2012-01-27 Update configure.ac version number (it was a few versions behind...)
2 AC_INIT(libsigar, 1.6.5)
08ed781e »
2008-11-26 start an autotools based build
3 AC_CONFIG_SRCDIR(src/sigar.c)
99d73258 »
2009-08-12 added a few more missing files
4 dnl AC_CONFIG_HEADERS(src/config.h)
2e83d293 »
2012-01-27 Update autotools stuff. Bump the version number.
5 AM_INIT_AUTOMAKE([1.9 foreign])
08ed781e »
2008-11-26 start an autotools based build
6 AC_CANONICAL_HOST
7
99d73258 »
2009-08-12 added a few more missing files
8 dnl for sigar_version_autoconf.c.in
9 VERSION_MAJOR=1
10 VERSION_MINOR=6
c22b3d77 »
2012-01-27 Update configure.ac version number (it was a few versions behind...)
11 VERSION_MAINT=5
99d73258 »
2009-08-12 added a few more missing files
12 VERSION_BUILD=0
13
14 AC_SUBST(VERSION_MAJOR)
15 AC_SUBST(VERSION_MINOR)
16 AC_SUBST(VERSION_MAINT)
17 AC_SUBST(VERSION_BUILD)
18
08ed781e »
2008-11-26 start an autotools based build
19 AC_PROG_CC
20 AC_PROG_LN_S
21 AC_PROG_INSTALL
22 AC_PROG_MAKE_SET
b35c2c14 »
2012-02-10 Build as a static library by default.
23 AC_PROG_LIBTOOL([disable-shared static])
2e83d293 »
2012-01-27 Update autotools stuff. Bump the version number.
24 PKG_PROG_PKG_CONFIG
8bd48cc4 »
2011-07-07 Fix stupid build issues.
25 AC_CONFIG_MACRO_DIR([m4])
08ed781e »
2008-11-26 start an autotools based build
26
27 AC_MSG_CHECKING([for os type ($host_os)])
99d73258 »
2009-08-12 added a few more missing files
28 FRAMEWORK=
08ed781e »
2008-11-26 start an autotools based build
29 case $host_os in
30 *aix*)
31 SRC_OS="aix"
99d73258 »
2009-08-12 added a few more missing files
32 AC_DEFINE(SIGAR_TEST_OS_AIX, [1], [for the tests])
33 LIBS="-lodm -lcfg -lperfstat -lpthreads"
08ed781e »
2008-11-26 start an autotools based build
34 ;;
35 *darwin*)
36 SRC_OS="darwin"
99d73258 »
2009-08-12 added a few more missing files
37 AC_DEFINE(DARWIN,[],[running on MacOS X])
38 AC_DEFINE(SIGAR_TEST_OS_DARWIN, [1], [for the tests])
39 SIGAR_LIBS="-framework IOKit -framework CoreServices"
40 ;;
41 *netbsd*)
42 SRC_OS="darwin"
43 AC_DEFINE(SIGAR_TEST_OS_DARWIN, [1], [for the tests])
44 SIGAR_LIBS="-lkvm"
45 ;;
46 *openbsd*)
47 SRC_OS="darwin"
48 AC_DEFINE(SIGAR_TEST_OS_DARWIN, [1], [for the tests])
49 SIGAR_LIBS="-lkvm"
08ed781e »
2008-11-26 start an autotools based build
50 ;;
51 *freebsd*)
52 SRC_OS="darwin"
99d73258 »
2009-08-12 added a few more missing files
53 AC_DEFINE(SIGAR_TEST_OS_DARWIN, [1], [for the tests])
54 SIGAR_LIBS="-lkvm"
08ed781e »
2008-11-26 start an autotools based build
55 ;;
56 *hpux*)
99d73258 »
2009-08-12 added a few more missing files
57 AC_DEFINE(SIGAR_HPUX,[],[running on HPUX])
08ed781e »
2008-11-26 start an autotools based build
58 SRC_OS="hpux"
99d73258 »
2009-08-12 added a few more missing files
59 AC_DEFINE(SIGAR_TEST_OS_HPUX, [1], [for the tests])
60 SIGAR_LIBS="-lnm -lnsl"
08ed781e »
2008-11-26 start an autotools based build
61 ;;
62 *linux*)
63 SRC_OS="linux"
99d73258 »
2009-08-12 added a few more missing files
64 AC_DEFINE(SIGAR_TEST_OS_LINUX, [1], [for the tests])
08ed781e »
2008-11-26 start an autotools based build
65 ;;
66 *solaris*)
99d73258 »
2009-08-12 added a few more missing files
67 AC_DEFINE(SOLARIS,[],[running on Solaris])
08ed781e »
2008-11-26 start an autotools based build
68 SRC_OS="solaris"
99d73258 »
2009-08-12 added a few more missing files
69 AC_DEFINE(SIGAR_TEST_OS_SOLARIS, [1], [for the tests])
58f44b87 »
2012-01-17 1/2] Added a missing dependency for Solaris.
70 SIGAR_LIBS="-lkstat -lsocket -lnsl"
08ed781e »
2008-11-26 start an autotools based build
71 ;;
72 *)
73 ac_system="unknown"
74 esac
75 AC_MSG_RESULT([$SRC_OS])
76
99d73258 »
2009-08-12 added a few more missing files
77 AC_CHECK_HEADERS(libproc.h valgrind/valgrind.h)
78 if test $ac_cv_header_libproc_h = yes; then
79 AC_DEFINE(DARWIN_HAS_LIBPROC_H, [1], [sigar named them DARWIN_HAS_... instead of HAVE_])
80 fi
81
82 INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/src/os/$SRC_OS $SIGAR_INCLUDES"
08ed781e »
2008-11-26 start an autotools based build
83
84 AC_SUBST(SRC_OS)
85 AC_SUBST(INCLUDES)
99d73258 »
2009-08-12 added a few more missing files
86 AC_SUBST(SIGAR_LIBS)
87
88 AM_CONDITIONAL(OS_WIN32, test x$SRC_OS = xwin32)
89 AM_CONDITIONAL(OS_MACOSX, test x$SRC_OS = xdarwin)
90 AM_CONDITIONAL(OS_LINUX, test x$SRC_OS = xlinux)
91 AM_CONDITIONAL(OS_HPUX, test x$SRC_OS = xhpux)
92 AM_CONDITIONAL(OS_AIX, test x$SRC_OS = xaix)
93 AM_CONDITIONAL(OS_SOLARIS, test x$SRC_OS = xsolaris)
94
95 AC_ARG_WITH(valgrind, [AC_HELP_STRING(
96 [--with-valgrind[=binary]],
97 [run the tests in valgrind to check for mem-leaks]
98 )],
99 [],
100 [with_valgrind=no])
101 AS_IF([test "x$with_valgrind" != xno],
102 [AS_IF([test "x$with_valgrind" = xyes],
103 [AC_CHECK_PROG(VALGRIND, valgrind)
104 AS_IF([test "x$VALGRIND" = x],
105 [AC_MSG_ERROR("--with-valgrind ... but no valgrind found")])
106 ],
107 [VALGRIND="$with_valgrind"
108 AC_SUBST(VALGRIND)])
109 ])
110 AM_CONDITIONAL(USE_VALGRIND, test "x$VALGRIND" != x)
111
8470738f »
2009-08-13 applied the configure-lua patch to the lua branch
112 dnl Check for lua
113 AC_MSG_CHECKING(if with lua)
114 AC_ARG_WITH(lua, AC_HELP_STRING([--with-lua],[lua]),
115 [WITH_LUA=$withval],[WITH_LUA=no])
116
117 if test "$WITH_LUA" != "no"; then
118 AC_MSG_RESULT($WITH_LUA)
119 # try pkgconfig
120 if test "$WITH_LUA" = "yes"; then
121 LUAPC=lua
122 else
123 LUAPC=$WITH_LUA
124 fi
125
126 PKG_CHECK_MODULES(LUA, $LUAPC >= 5.1, [
127 AC_DEFINE([HAVE_LUA], [1], [liblua])
128 AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
129 ],[
130 PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1, [
131 AC_DEFINE([HAVE_LUA], [1], [liblua])
132 AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
4608cde9 »
2009-08-22 Don't try to build lua if we don't ask for it.
133 ],[WITH_LUA=no])
8470738f »
2009-08-13 applied the configure-lua patch to the lua branch
134 ])
135
136 AC_SUBST(LUA_CFLAGS)
137 AC_SUBST(LUA_LIBS)
138 fi
139
4608cde9 »
2009-08-22 Don't try to build lua if we don't ask for it.
140 AM_CONDITIONAL([BUILD_LUA],[test "$WITH_LUA" != "no"])
141
08ed781e »
2008-11-26 start an autotools based build
142 AC_CONFIG_FILES([
143 Makefile
99d73258 »
2009-08-12 added a few more missing files
144 include/Makefile
08ed781e »
2008-11-26 start an autotools based build
145 src/Makefile
146 src/os/Makefile
147 src/os/aix/Makefile
148 src/os/darwin/Makefile
99d73258 »
2009-08-12 added a few more missing files
149 src/os/freebsd/Makefile
08ed781e »
2008-11-26 start an autotools based build
150 src/os/hpux/Makefile
99d73258 »
2009-08-12 added a few more missing files
151 src/os/linux/Makefile
08ed781e »
2008-11-26 start an autotools based build
152 src/os/solaris/Makefile
99d73258 »
2009-08-12 added a few more missing files
153 src/os/win32/Makefile
08ed781e »
2008-11-26 start an autotools based build
154 examples/Makefile
99d73258 »
2009-08-12 added a few more missing files
155 src/sigar_version_autoconf.c
156 tests/Makefile
8470738f »
2009-08-13 applied the configure-lua patch to the lua branch
157 bindings/Makefile
158 bindings/lua/Makefile
08ed781e »
2008-11-26 start an autotools based build
159 ])
160
161 AC_OUTPUT
Something went wrong with that request. Please try again.