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