]> git.draconx.ca Git - rarpd-dx.git/blob - configure.ac
Use gitlog-to-changelog w/ "make dist".
[rarpd-dx.git] / configure.ac
1 dnl Copyright © 2023 Nick Bowler
2 dnl
3 dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2.
4 dnl This is free software: you are free to do what the fuck you want to.
5 dnl There is NO WARRANTY, to the extent permitted by law.
6
7 AC_PREREQ([2.68])
8 AC_INIT([rarpd], [1], [nbowler@draconx.ca], [rarpd-dx])
9
10 AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects])
11 AM_SILENT_RULES([yes])
12
13 AC_PROG_CC
14
15 AC_CHECK_PROGS([XSLTPROC], [xsltproc], [not found])
16 AS_IF([test x"$XSLTPROC" != x"not found"],
17   [AC_CACHE_CHECK([whether $XSLTPROC works], [dx_cv_xsltproc_works],
18 [dx_cv_xsltproc_works=no
19 cat >conftest.xsl <<'EOF'
20 <?xml version='1.0' encoding='UTF-8' ?>
21 <xsl:stylesheet version='1.0'
22   xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
23 <xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl"/>
24 <xsl:output omit-xml-declaration='yes' />
25 <xsl:template match='/'><xsl:text>hello</xsl:text></xsl:template>
26 </xsl:stylesheet>
27 EOF
28 cat >conftest.xml <<'EOF'
29 <?xml version='1.0' encoding='UTF-8' ?>
30 <root />
31 EOF
32 $XSLTPROC --nonet conftest.xsl conftest.xml >conftest.out 2>&AS_MESSAGE_LOG_FD &&
33   { read var <conftest.out; test x"$var" = x"hello"; } &&
34   dx_cv_xsltproc_works=yes
35 rm -f conftest.xsl conftest.xml conftest.out])])
36 AM_CONDITIONAL([HAVE_XSLTPROC], [test x"$dx_cv_xsltproc_works" = x"yes"])
37
38 AC_CHECK_HEADERS_ONCE([error.h])
39
40 AC_CONFIG_FILES([Makefile])
41 AC_OUTPUT