PageRenderTime 364ms CodeModel.GetById 161ms app.highlight 4ms RepoModel.GetById 178ms app.codeStats 0ms

/configure.ac

http://github.com/fizx/parsley
m4 | 47 lines | 37 code | 10 blank | 0 comment | 0 complexity | 3576d45ddd94749d8bc2f7ec64044e94 MD5 | raw file
 1AC_PREREQ(2.69)
 2
 3AC_INIT([parsleyc], [1.0], [kyle@kylemaxwell.com])
 4AM_INIT_AUTOMAKE([1.9 foreign])
 5
 6LDFLAGS="$LDFLAGS -L/opt/local/lib -L/usr/local/lib"
 7CPPFLAGS="$CPPFLAGS -I/opt/local/include -I/usr/local/include"
 8
 9AC_PROG_CC_C99
10AM_PROG_LEX
11AC_PROG_YACC
12AC_PROG_LIBTOOL
13AC_CHECK_HEADER(pcre.h, , AC_MSG_ERROR([could not find pcre.h]))
14AC_CHECK_HEADER(argp.h, , AC_MSG_ERROR([could not find argp.h]))
15AC_CHECK_HEADER(json-c/json.h, , AC_MSG_ERROR([could not find json.h]))
16AC_CHECK_HEADER(json-c/printbuf.h, , AC_MSG_ERROR([could not find printbuf.h]))
17
18AC_PATH_PROG(XML2_CONFIG, xml2-config, , [$PATH])
19if test x$XML2_CONFIG = x ; then
20  AC_MSG_ERROR([libxml2 not present or not configured])
21else
22  XML2_CFLAGS="`$XML2_CONFIG --cflags`"
23  XML2_LIBS="`$XML2_CONFIG --libs`"
24fi
25
26AC_PATH_PROG(XSLT_CONFIG, xslt-config, , [$PATH])
27if test x$XSLT_CONFIG = x ; then
28  AC_MSG_ERROR([libxslt not present or not configured])
29else
30  XSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
31  XSLT_LIBS="`$XSLT_CONFIG --libs`"
32fi
33
34CPPFLAGS="$CPPFLAGS $XML2_CFLAGS $XSLT_CFLAGS"
35LIBS="$LIBS $XML2_LIBS $XSLT_LIBS"
36
37AC_CHECK_LIB(pcre, pcre_compile, , AC_MSG_ERROR([could not find pcre]))
38
39AC_CHECK_LIB(json-c, json_object_new_string, , AC_MSG_ERROR([could not find the json library]))
40AC_CHECK_FUNC(argp_parse, , [AC_CHECK_LIB(argp, argp_parse, , AC_MSG_ERROR([could not find argp]))])
41
42AC_CHECK_LIB(xslt, xsltApplyStylesheet, , AC_MSG_ERROR([could not find libxslt]))
43AC_CHECK_LIB(xml2, htmlParseFile, , AC_MSG_ERROR([could not find libxml2 with html parsing]))
44AC_CHECK_LIB(exslt, exsltRegisterAll, , AC_MSG_ERROR([could not find libexslt]))
45
46AC_CONFIG_FILES([Makefile])
47AC_OUTPUT