diff options
| author | Richard Nyberg <rnyberg@murmeldjur.se> | 2005-07-19 10:49:54 +0000 |
|---|---|---|
| committer | Richard Nyberg <rnyberg@murmeldjur.se> | 2005-07-19 10:49:54 +0000 |
| commit | aecad435f74c16769426b87528b7b9ae779d7ea9 (patch) | |
| tree | 2fd02ab3767211fc7d6ad9b3e43cb16c4508e611 | |
| parent | 614afd29cde018bfb021833b2bba132eca987b03 (diff) | |
| download | btpd-aecad435f74c16769426b87528b7b9ae779d7ea9.tar.gz btpd-aecad435f74c16769426b87528b7b9ae779d7ea9.zip | |
Remove -Wall -Werror from the default CFLAGS.
Add --with-warn option to configure, making it easy to select between a couple of predefined warning options. Having all warnings on and treated as errors wasn't so good, since different versions of gcc have different warnings. There's no need to make it harder than it should be to build btpd.
| -rw-r--r-- | configure.ac | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 7fddf8b..4f651ec 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ AC_CONFIG_FILES([Makefile btpd/Makefile misc/Makefile cli/Makefile]) AC_PROG_CC AC_PROG_RANLIB -CFLAGS="$CFLAGS -std=c99 -Wall -Werror" +CFLAGS="$CFLAGS -std=c99" case $target_os in linux*) @@ -40,6 +40,26 @@ AC_ARG_WITH(curlconf, ], []) +AC_ARG_WITH(warn, +[ --with-warn=level select warning preset (no,all,allerr)], +[ + case $withval in + no) + ;; + all) + CFLAGS="$CFLAGS -Wall" + ;; + allerr) + CFLAGS="$CFLAGS -Wall -Werror" + ;; + *) + echo "Warning preset \"$withval\" not recognized. See --help." + exit 1 + ;; + esac +], +[]) + old_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $event_LDFLAGS" AC_CHECK_LIB(event, event_init, :, echo Must have libevent; exit 1) |