Add Windows exe files to .gitignore
[babeltrace.git] / configure.ac
... / ...
CommitLineData
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_INIT([babeltrace],[1.1.1],[mathieu dot desnoyers at efficios dot com])
5AC_CONFIG_AUX_DIR([config])
6AC_CANONICAL_TARGET
7AC_CANONICAL_HOST
8AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
9m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
10
11AC_CONFIG_MACRO_DIR([m4])
12
13AC_PROG_MKDIR_P
14
15AC_CONFIG_HEADERS([config.h])
16
17AC_SYS_LARGEFILE
18
19# Checks for programs.
20AC_PROG_CC_STDC
21AC_PROG_MAKE_SET
22LT_INIT
23AC_PROG_YACC
24AC_PROG_LEX
25
26AC_DEFUN([AC_PROG_BISON], [AC_CHECK_PROGS(BISON, bison, bison)])
27
28AM_PATH_GLIB_2_0(2.22.0, ,AC_MSG_ERROR([glib is required in order to compile BabelTrace - download it from ftp://ftp.gtk.org/pub/gtk]) , gmodule)
29
30# Checks for typedefs, structures, and compiler characteristics.
31AC_C_INLINE
32AC_TYPE_PID_T
33AC_TYPE_SIZE_T
34
35# Checks for library functions.
36AC_FUNC_MALLOC
37AC_FUNC_MMAP
38AC_CHECK_FUNCS([bzero gettimeofday munmap strtoul])
39
40# Check for MinGW32.
41MINGW32=no
42case $host in
43 *-*-mingw*)
44 MINGW32=yes;;
45esac
46
47AM_CONDITIONAL([BABELTRACE_BUILD_WITH_MINGW], [test "x$MINGW32" = "xyes"])
48
49# Check for libuuid
50AC_CHECK_LIB([uuid], [uuid_generate],
51[
52 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_LIBUUID], 1, [Has libuuid support.])
53 have_libuuid=yes
54],
55[
56 # libuuid not found, check for uuid_create in libc.
57 AC_CHECK_LIB([c], [uuid_create],
58 [
59 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_LIBC_UUID], 1, [Has libc uuid support.])
60 have_libc_uuid=yes
61 ],
62 [
63 AC_MSG_ERROR([Cannot find libuuid uuid_generate nor libc uuid_create. Use [LDFLAGS]=-Ldir to specify their location.])
64 ])
65]
66)
67AM_CONDITIONAL([BABELTRACE_BUILD_WITH_LIBUUID], [test "x$have_libuuid" = "xyes"])
68AM_CONDITIONAL([BABELTRACE_BUILD_WITH_LIBC_UUID], [test "x$have_libc_uuid" = "xyes"])
69
70# Check for fmemopen
71AC_CHECK_LIB([c], [fmemopen],
72[
73 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_FMEMOPEN], 1, [Has fmemopen support.])
74]
75)
76
77# Check for open_memstream
78AC_CHECK_LIB([c], [open_memstream],
79[
80 AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_OPEN_MEMSTREAM], 1, [Has open_memstream support.])
81]
82)
83
84AC_CHECK_LIB([popt], [poptGetContext], [],
85 [AC_MSG_ERROR([Cannot find popt.])]
86)
87
88pkg_modules="gmodule-2.0 >= 2.0.0"
89PKG_CHECK_MODULES(GMODULE, [$pkg_modules])
90AC_SUBST(PACKAGE_LIBS)
91
92LIBS="$LIBS $GMODULE_LIBS"
93PACKAGE_CFLAGS="$GMODULE_CFLAGS -Wall -Wformat -include config.h"
94AC_SUBST(PACKAGE_CFLAGS)
95
96babeltraceincludedir="${includedir}/babeltrace"
97AC_SUBST(babeltraceincludedir)
98
99babeltracectfincludedir="${includedir}/babeltrace/ctf"
100AC_SUBST(babeltracectfincludedir)
101
102AC_CONFIG_FILES([
103 Makefile
104 types/Makefile
105 formats/Makefile
106 formats/ctf/Makefile
107 formats/ctf/types/Makefile
108 formats/ctf-text/Makefile
109 formats/ctf-text/types/Makefile
110 formats/ctf-metadata/Makefile
111 formats/bt-dummy/Makefile
112 formats/ctf/metadata/Makefile
113 converter/Makefile
114 doc/Makefile
115 lib/Makefile
116 lib/prio_heap/Makefile
117 include/Makefile
118 tests/Makefile
119 tests/lib/Makefile
120 extras/Makefile
121 extras/valgrind/Makefile
122 babeltrace.pc
123])
124AC_OUTPUT
This page took 0.022704 seconds and 4 git commands to generate.