Przeglądaj źródła

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.
master
Richard Nyberg 19 lat temu
rodzic
commit
aecad435f7
1 zmienionych plików z 21 dodań i 1 usunięć
  1. +21
    -1
      configure.ac

+ 21
- 1
configure.ac Wyświetl plik

@@ -9,7 +9,7 @@ AC_CONFIG_FILES([Makefile btpd/Makefile misc/Makefile cli/Makefile])
AC_PROG_CC AC_PROG_CC
AC_PROG_RANLIB AC_PROG_RANLIB


CFLAGS="$CFLAGS -std=c99 -Wall -Werror"
CFLAGS="$CFLAGS -std=c99"


case $target_os in case $target_os in
linux*) 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" old_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $event_LDFLAGS" LDFLAGS="$LDFLAGS $event_LDFLAGS"
AC_CHECK_LIB(event, event_init, :, echo Must have libevent; exit 1) AC_CHECK_LIB(event, event_init, :, echo Must have libevent; exit 1)


Ładowanie…
Anuluj
Zapisz