-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
50 lines (45 loc) · 1.28 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT(faulty.lib, 0.0.1)
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
AC_CONFIG_SRCDIR([linker/ElfLoader.h])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CXX
AC_PROG_RANLIB
AC_LANG_CPLUSPLUS
if test -z "${BUILDCXX}"; then
if test "${build}" = "${host}"; then
BUILDCXX="${CXX}"
elif test -n "${build_alias}"; then
AC_CHECK_PROGS([BUILDCXX], [${build_alias}-g++])
else
AC_CHECK_PROGS([BUILDCXX], [g++])
fi
fi
if test -z "${BUILDCXX}"; then
AC_MSG_ERROR([C++ compiler for build not found.])
fi
AC_SUBST(BUILDCXXFLAGS)
case "$host" in
*-android*|*-linuxandroid*)
AC_DEFINE([ANDROID], 1, Define to 1 when building for Android)
LDFLAGS="${LDFLAGS} -llog"
;;
esac
LDFLAGS="${LDFLAGS} -ldl -pthread"
AC_CHECK_FUNCS([dladdr])
AC_CHECK_SIZEOF([void *])
if test "${ac_cv_sizeof_void_p}" = 8; then
AC_DEFINE([HAVE_64BIT_OS], 1, Define to 1 when building for 64-bit OS)
elif test "${ac_cv_sizeof_void_p}" != 4; then
AC_MSG_ERROR([Unsupported pointer size ${ac_cv_sizeof_void_p}])
fi
DEPTH=..
AC_SUBST(DEPTH)
AC_CONFIG_FILES([linker/Makefile
tests/Makefile
Makefile
config/autoconf.mk])
AC_OUTPUT