summaryrefslogtreecommitdiffabout
path: root/configure.ac
authorMichael Krelin <hacker@klever.net>2009-03-08 20:09:21 (UTC)
committer Michael Krelin <hacker@klever.net>2009-03-08 20:09:21 (UTC)
commitaadaa8b5d7eda23e72dbded9d6437b40358353f3 (patch) (unidiff)
tree0bff6fdde1e2b9be02b48aaf7d03f095604718e1 /configure.ac
downloadiii-aadaa8b5d7eda23e72dbded9d6437b40358353f3.zip
iii-aadaa8b5d7eda23e72dbded9d6437b40358353f3.tar.gz
iii-aadaa8b5d7eda23e72dbded9d6437b40358353f3.tar.bz2
Inital commit to public repository0.0
Diffstat (limited to 'configure.ac') (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac71
1 files changed, 71 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..7b1db54
--- a/dev/null
+++ b/configure.ac
@@ -0,0 +1,71 @@
1AC_INIT([iii], [0.0], [iii-bugs@klever.net])
2AC_CONFIG_SRCDIR([configure.ac])
3AC_CONFIG_HEADERS([config.h])
4AM_INIT_AUTOMAKE([dist-bzip2])
5
6AC_PROG_INSTALL
7AC_PROG_CXX
8AC_PROG_CC
9PKG_PROG_PKG_CONFIG
10
11AC_HEADER_STDC
12
13AC_PATH_PROG([XSLTPROC],[xsltproc],[true])
14
15PKG_CHECK_MODULES([MODULES],[gsoap++ openssl libconfuse],,[
16 AC_MSG_ERROR([one of the build dependencies isn't satisfied])
17])
18
19AC_PATH_PROG([SOAPCPP2],[soapcpp2],[false])
20test "$SOAPCPP2" = "false" && AC_MSG_ERROR([no soapcpp2 tool, part of gsoap package, found.])
21
22notfound=false
23AC_CHECK_HEADERS([archive.h],[
24 AC_CHECK_LIB([archive],[archive_read_new],,[notfound=true])
25],[notfound=true])
26$notfound && AC_MSG_ERROR([no required libarchive library found. get one from http://people.freebsd.org/~kientzle/libarchive/])
27
28notfound=false
29AC_LANG_PUSH([C++])
30AC_CHECK_HEADERS([autosprintf.h],[
31 AC_CHECK_LIB([asprintf],[main],,[notfound=true])
32],[notfound=true])
33$notfound && AC_MSG_ERROR([no autosprintf, part of gettext, found])
34AC_LANG_POP([C++])
35
36nitpick=false
37AC_ARG_ENABLE([nitpicking],
38 AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]),
39 [ test "$enableval" = "no" || nitpick=true ]
40)
41if $nitpick ; then
42 CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \
43 -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \
44 -Wredundant-decls -ansi -Wlogical-op -Wmissing-noreturn"
45 C_NITPICK="$CPP_NITPICK"
46 CXX_NITPICK="$C_NITPICK"
47
48 CPPFLAGS="$CPPFLAGS $CPP_NITPICK"
49 CFLAGS="$CFLAGS $C_NITPICK"
50 CXXFLAGS="$CXXFLAGS $CXX_NITPICK"
51fi
52
53ndebug=true
54AC_ARG_ENABLE([debug],
55 AC_HELP_STRING([--enable-debug],[enable debugginc code]),
56 [ test "$enableval" = "no" || ndebug=false ]
57)
58if $ndebug ; then
59 CPPFLAGS_DEBUG="-DNDEBUG"
60else
61 CPPFLAGS_DEBUG="-DDEBUG"
62fi
63AC_SUBST([CPPFLAGS_DEBUG])
64
65AC_CONFIG_FILES([
66 Makefile
67 src/Makefile
68 doc/Makefile
69 doc/iiid.8
70])
71AC_OUTPUT