-
Notifications
You must be signed in to change notification settings - Fork 38
/
configure.ac
47 lines (37 loc) · 1.62 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
AC_PREREQ(2.69)
AC_INIT([parsleyc], [1.0], [[email protected]])
AM_INIT_AUTOMAKE([1.9 foreign])
LDFLAGS="$LDFLAGS -L/opt/local/lib -L/usr/local/lib"
CPPFLAGS="$CPPFLAGS -I/opt/local/include -I/usr/local/include"
AC_PROG_CC_C99
AM_PROG_LEX
AC_PROG_YACC
AC_PROG_LIBTOOL
AC_CHECK_HEADER(pcre.h, , AC_MSG_ERROR([could not find pcre.h]))
AC_CHECK_HEADER(argp.h, , AC_MSG_ERROR([could not find argp.h]))
AC_CHECK_HEADER(json-c/json.h, , AC_MSG_ERROR([could not find json.h]))
AC_CHECK_HEADER(json-c/printbuf.h, , AC_MSG_ERROR([could not find printbuf.h]))
AC_PATH_PROG(XML2_CONFIG, xml2-config, , [$PATH])
if test x$XML2_CONFIG = x ; then
AC_MSG_ERROR([libxml2 not present or not configured])
else
XML2_CFLAGS="`$XML2_CONFIG --cflags`"
XML2_LIBS="`$XML2_CONFIG --libs`"
fi
AC_PATH_PROG(XSLT_CONFIG, xslt-config, , [$PATH])
if test x$XSLT_CONFIG = x ; then
AC_MSG_ERROR([libxslt not present or not configured])
else
XSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
XSLT_LIBS="`$XSLT_CONFIG --libs`"
fi
CPPFLAGS="$CPPFLAGS $XML2_CFLAGS $XSLT_CFLAGS"
LIBS="$LIBS $XML2_LIBS $XSLT_LIBS"
AC_CHECK_LIB(pcre, pcre_compile, , AC_MSG_ERROR([could not find pcre]))
AC_CHECK_LIB(json-c, json_object_new_string, , AC_MSG_ERROR([could not find the json library]))
AC_CHECK_FUNC(argp_parse, , [AC_CHECK_LIB(argp, argp_parse, , AC_MSG_ERROR([could not find argp]))])
AC_CHECK_LIB(xslt, xsltApplyStylesheet, , AC_MSG_ERROR([could not find libxslt]))
AC_CHECK_LIB(xml2, htmlParseFile, , AC_MSG_ERROR([could not find libxml2 with html parsing]))
AC_CHECK_LIB(exslt, exsltRegisterAll, , AC_MSG_ERROR([could not find libexslt]))
AC_CONFIG_FILES([Makefile])
AC_OUTPUT