summaryrefslogtreecommitdiffabout
path: root/configure.ac
Unidiff
Diffstat (limited to 'configure.ac') (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3ca0b4e..fbf373b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,66 +1,70 @@
1AC_INIT([napkin], [0.0], [napkin-bugs@klever.net]) 1AC_INIT([napkin], [0.0], [napkin-bugs@klever.net])
2AC_CONFIG_AUX_DIR([aux.d]) 2AC_CONFIG_AUX_DIR([aux.d])
3AC_CONFIG_SRCDIR([src/napkin.cc]) 3AC_CONFIG_SRCDIR([src/napkin.cc])
4AC_CONFIG_HEADERS([config.h]) 4AC_CONFIG_HEADERS([config.h])
5AM_INIT_AUTOMAKE([dist-bzip2]) 5AM_INIT_AUTOMAKE([dist-bzip2])
6 6
7AC_PROG_INSTALL 7AC_PROG_INSTALL
8AC_PROG_CXX 8AC_PROG_CXX
9AC_PROG_CC 9AC_PROG_CC
10AC_PROG_LIBTOOL 10AC_PROG_LIBTOOL
11PKG_PROG_PKG_CONFIG 11PKG_PROG_PKG_CONFIG
12 12
13onegetcwd=false
14AC_CHECK_FUNCS([get_current_dir_name getcwd],[onegetcwd=true;break])
15$onegetcwd || AC_MSG_ERROR([no function to get current directory found. weird.])
16
13AC_HEADER_STDC 17AC_HEADER_STDC
14 18
15AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) 19AC_PATH_PROG([XSLTPROC],[xsltproc],[true])
16 20
17PKG_CHECK_MODULES([MODULES],[gtkmm-2.4 sqlite3],,[ 21PKG_CHECK_MODULES([MODULES],[gtkmm-2.4 sqlite3],,[
18 AC_MSG_ERROR([not all dependencies could be satisfied]) 22 AC_MSG_ERROR([not all dependencies could be satisfied])
19]) 23])
20 24
21AC_MSG_CHECKING([whether to enable debugging code]) 25AC_MSG_CHECKING([whether to enable debugging code])
22ndebug=true 26ndebug=true
23AC_ARG_ENABLE([debug], 27AC_ARG_ENABLE([debug],
24 AC_HELP_STRING([--enable-debug],[enable debugging/development code]), 28 AC_HELP_STRING([--enable-debug],[enable debugging/development code]),
25 [ test "$enableval" = "no" || ndebug=false ] 29 [ test "$enableval" = "no" || ndebug=false ]
26) 30)
27if $ndebug ; then 31if $ndebug ; then
28 AC_MSG_RESULT([no]) 32 AC_MSG_RESULT([no])
29 CPPFLAGS="${CPPFLAGS}-DNDEBUG" 33 CPPFLAGS="${CPPFLAGS}-DNDEBUG"
30else 34else
31 AC_MSG_RESULT([yes]) 35 AC_MSG_RESULT([yes])
32fi 36fi
33 37
34nitpick=false 38nitpick=false
35AC_MSG_CHECKING([whether to enable compiler nitpicking]) 39AC_MSG_CHECKING([whether to enable compiler nitpicking])
36AC_ARG_ENABLE([nitpicking], 40AC_ARG_ENABLE([nitpicking],
37 AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]), 41 AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]),
38 [ test "$enableval" = "no" || nitpick=true ] 42 [ test "$enableval" = "no" || nitpick=true ]
39) 43)
40if $nitpick ; then 44if $nitpick ; then
41 AC_MSG_RESULT([yes]) 45 AC_MSG_RESULT([yes])
42 CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \ 46 CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \
43 -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \ 47 -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \
44 -Wredundant-decls -ansi" 48 -Wredundant-decls -ansi"
45 # -Wlogical-op -Wmissing-noreturn 49 # -Wlogical-op -Wmissing-noreturn
46 C_NITPICK="$CPP_NITPICK" 50 C_NITPICK="$CPP_NITPICK"
47 CXX_NITPICK="$C_NITPICK" 51 CXX_NITPICK="$C_NITPICK"
48 52
49 CPPFLAGS="$CPPFLAGS $CPP_NITPICK" 53 CPPFLAGS="$CPPFLAGS $CPP_NITPICK"
50 CFLAGS="$CFLAGS $C_NITPICK" 54 CFLAGS="$CFLAGS $C_NITPICK"
51 CXXFLAGS="$CXXFLAGS $CXX_NITPICK" 55 CXXFLAGS="$CXXFLAGS $CXX_NITPICK"
52else 56else
53 AC_MSG_RESULT([no]) 57 AC_MSG_RESULT([no])
54fi 58fi
55 59
56 60
57AC_CONFIG_FILES([ 61AC_CONFIG_FILES([
58 Makefile 62 Makefile
59 include/Makefile 63 include/Makefile
60 lib/Makefile 64 lib/Makefile
61 src/Makefile 65 src/Makefile
62 test/Makefile 66 test/Makefile
63]) 67])
64AC_OUTPUT 68AC_OUTPUT
65 69
66dnl vim:set ft=m4 sw=1: 70dnl vim:set ft=m4 sw=1: