-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
79 lines (65 loc) · 2.02 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
77
78
79
AC_PREREQ(2.68)
AC_INIT([baldepress], m4_esyscmd([build-aux/git-version-gen .tarball-version]),
[https://github.com/balde/baldepress], [baldepress],
[https://github.com/balde/baldepress])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
# code changed: REVISION++.
# interface changed: CURRENT++, REVISION=0.
# interface changed (backwards compatible): AGE++, else AGE=0.
CURRENT=0
AGE=0
REVISION=0
LT_VERSION_INFO="$CURRENT:$REVISION:$AGE"
AC_SUBST(LT_VERSION_INFO)
AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-xz subdir-objects])
AC_CONFIG_HEADERS([config.h])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
LT_INIT
AC_PROG_CC_C99
AS_IF([test "x$ac_cv_prog_cc_c99" = "xno"], [
AC_MSG_ERROR([no C99 compiler found, baldepress requires a C99 compiler.])
])
AC_SEARCH_LIBS([mkd_in], [markdown], ,
AC_MSG_ERROR([mkd_in not found. please install the discount markdown parser library.])
)
AC_ARG_WITH([valgrind], AS_HELP_STRING([--without-valgrind],
[ignore presence of valgrind]))
AS_IF([test "x$with_valgrind" != "xno"], [
AC_PATH_PROG([valgrind], [valgrind])
AS_IF([test "x$ac_cv_path_valgrind" = "x"], [
have_valgrind=no
], [
have_valgrind=yes
])
])
AS_IF([test "x$have_valgrind" = "xyes"], , [
AS_IF([test "x$with_valgrind" = "xyes"], [
AC_MSG_ERROR([valgrind requested but not found])
])
])
AM_CONDITIONAL([USE_VALGRIND], [test "x$have_valgrind" = "xyes"])
VALGRIND="$ac_cv_path_valgrind"
AC_SUBST(VALGRIND)
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.34])
PKG_CHECK_MODULES([LIBGIT2], [libgit2 >= 0.20.0])
PKG_CHECK_MODULES([BALDE], [balde >= 0.1.1])
AC_CONFIG_FILES([
Makefile
include/Makefile
include/baldepress/Makefile
libbaldepress/Makefile
tests/Makefile
])
AC_OUTPUT
AS_ECHO("
==== ${PACKAGE_STRING} ====
prefix: ${prefix}
exec_prefix: ${exec_prefix}
bindir: ${bindir}
compiler: ${CC}
cflags: ${CFLAGS}
ldflags: ${LDFLAGS}
valgrind: ${VALGRIND}
")