-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
63 lines (51 loc) · 1.39 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([meleak-checker], [0.0.1], [[email protected]])
# Load this so we can use $build_os
AC_CANONICAL_SYSTEM
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([config.h.in])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX(clang++ g++)
AC_PROG_CPP
AC_PROG_CC
AM_PROG_AR
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
# Checks for libraries.
AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([no suitable dl library found])])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h unistd.h])
# Add c++11 support and pthreads
case $build_os in
darwin*)
CXXFLAGS="$CXXFLAGS -std=gnu++11 -pthread"
LDFLAGS="$LDFLAGS -stdlib=libc++"
;;
*)
CXXFLAGS="$CXXFLAGS -std=gnu++11 -pthread -Wl,-no-as-needed"
;;
esac
# Init libtool
# Disable static because this library is not ment to be static (ass static it
# would probably not work correctly).
LT_INIT([disable-static dlopen])
AC_SUBST([LIBTOOL_DEPS])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CONFIG_FILES([
Makefile
malloc-lib/Makefile
test-app/Makefile
malloc-lib-posprocess/Makefile
])
AC_OUTPUT