-rw-r--r-- | configure.ac | 4 |
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 @@ | |||
1 | AC_INIT([napkin], [0.0], [napkin-bugs@klever.net]) | 1 | AC_INIT([napkin], [0.0], [napkin-bugs@klever.net]) |
2 | AC_CONFIG_AUX_DIR([aux.d]) | 2 | AC_CONFIG_AUX_DIR([aux.d]) |
3 | AC_CONFIG_SRCDIR([src/napkin.cc]) | 3 | AC_CONFIG_SRCDIR([src/napkin.cc]) |
4 | AC_CONFIG_HEADERS([config.h]) | 4 | AC_CONFIG_HEADERS([config.h]) |
5 | AM_INIT_AUTOMAKE([dist-bzip2]) | 5 | AM_INIT_AUTOMAKE([dist-bzip2]) |
6 | 6 | ||
7 | AC_PROG_INSTALL | 7 | AC_PROG_INSTALL |
8 | AC_PROG_CXX | 8 | AC_PROG_CXX |
9 | AC_PROG_CC | 9 | AC_PROG_CC |
10 | AC_PROG_LIBTOOL | 10 | AC_PROG_LIBTOOL |
11 | PKG_PROG_PKG_CONFIG | 11 | PKG_PROG_PKG_CONFIG |
12 | 12 | ||
13 | onegetcwd=false | ||
14 | AC_CHECK_FUNCS([get_current_dir_name getcwd],[onegetcwd=true;break]) | ||
15 | $onegetcwd || AC_MSG_ERROR([no function to get current directory found. weird.]) | ||
16 | |||
13 | AC_HEADER_STDC | 17 | AC_HEADER_STDC |
14 | 18 | ||
15 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) | 19 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) |
16 | 20 | ||
17 | PKG_CHECK_MODULES([MODULES],[gtkmm-2.4 sqlite3],,[ | 21 | PKG_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 | ||
21 | AC_MSG_CHECKING([whether to enable debugging code]) | 25 | AC_MSG_CHECKING([whether to enable debugging code]) |
22 | ndebug=true | 26 | ndebug=true |
23 | AC_ARG_ENABLE([debug], | 27 | AC_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 | ) |
27 | if $ndebug ; then | 31 | if $ndebug ; then |
28 | AC_MSG_RESULT([no]) | 32 | AC_MSG_RESULT([no]) |
29 | CPPFLAGS="${CPPFLAGS}-DNDEBUG" | 33 | CPPFLAGS="${CPPFLAGS}-DNDEBUG" |
30 | else | 34 | else |
31 | AC_MSG_RESULT([yes]) | 35 | AC_MSG_RESULT([yes]) |
32 | fi | 36 | fi |
33 | 37 | ||
34 | nitpick=false | 38 | nitpick=false |
35 | AC_MSG_CHECKING([whether to enable compiler nitpicking]) | 39 | AC_MSG_CHECKING([whether to enable compiler nitpicking]) |
36 | AC_ARG_ENABLE([nitpicking], | 40 | AC_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 | ) |
40 | if $nitpick ; then | 44 | if $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" |
52 | else | 56 | else |
53 | AC_MSG_RESULT([no]) | 57 | AC_MSG_RESULT([no]) |
54 | fi | 58 | fi |
55 | 59 | ||
56 | 60 | ||
57 | AC_CONFIG_FILES([ | 61 | AC_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 | ]) |
64 | AC_OUTPUT | 68 | AC_OUTPUT |
65 | 69 | ||
66 | dnl vim:set ft=m4 sw=1: | 70 | dnl vim:set ft=m4 sw=1: |