forked from philberty/vigilant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
76 lines (65 loc) · 1.66 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
64
65
66
67
68
69
70
71
72
73
74
75
76
AC_INIT(watchy, 0.2, https://github.com/redbrain/watchy)
AC_CONFIG_SRCDIR([src/test.c])
AC_CONFIG_HEADER([src/config.h])
dnl keep the autoconf generated stuff neatly in a folder
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AM_SANITY_CHECK
dnl Last slash shouldn't be stripped if prefix=/
if test "$prefix" != "/"; then
prefix=`echo "$prefix" | sed -e 's/\/$//g'`
fi
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_EXEEXT
AC_GNU_SOURCE
AC_PROG_INSTALL
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
AM_PROG_CC_C_O
AC_C_INLINE
AC_CANONICAL_HOST
# Figure out the platform for osdep-*.c and forkpty-*.c.
AC_MSG_CHECKING(platform)
case "$host_os" in
*darwin*)
AC_MSG_RESULT(darwin)
PLATFORM=darwin
;;
*linux*)
AC_MSG_RESULT(linux)
PLATFORM=linux
;;
*)
AC_MSG_RESULT(unknown)
PLATFORM=unknown
;;
esac
AC_SUBST(PLATFORM)
if test "x$PLATFORM" == "xunknown"; then
AC_MSG_ERROR("Host Platform $PLATFORM unknown")
fi
PKG_CHECK_MODULES([EV], [libevent])
AC_SUBST([EV_CFLAGS])
AC_SUBST([EV_LIBS])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile
src/Makefile
src/watchy.pc])
AC_OUTPUT
echo "---"
echo "Configuration summary for $PACKAGE_NAME version $VERSION"
echo ""
echo " * Installation prefix: $prefix"
echo " * Platform osdep: osdep-$PLATFORM.c"
echo " * C Compiler: $CC"
echo " * C Flags: $CFLAGS"
echo " * LD Flags: $LDFLAGS"
echo " * libevent CFLAGS: $EV_CFLAGS"
echo " * libevent LIBS: $EV_LIBS"
echo ""
echo "---"
dnl libtoolize scans configure.ac and needs to see some text
m4_define([LIBTOOLIZE_AC_INIT], [])