Commit 283bca75 authored by Max Kellermann's avatar Max Kellermann

configure.ac: moved build options down

Initialize the CFLAGS (warnings, errors) after all the libraries, because some library checks may be broken with -Werror or -pedantic.
parent 0fb21e67
...@@ -106,29 +106,6 @@ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.4 gthread-2.0],, ...@@ -106,29 +106,6 @@ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.4 gthread-2.0],,
dnl dnl
dnl build options
dnl
AC_ARG_ENABLE(werror,
AS_HELP_STRING([--enable-werror],
[Treat warnings as errors (default: disabled)]),
ENABLE_WERROR=$enableval,
ENABLE_WERROR=no)
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[Enable debugging (default: disabled)]),
ENABLE_DEBUG=$enableval,
ENABLE_DEBUG=no)
AC_ARG_ENABLE(gprof,
AS_HELP_STRING([--enable-gprof],
[Enable profiling via gprof (default: disabled)]),
ENABLE_GPROF=$enableval,
ENABLE_GPROF=no)
dnl
dnl protocol options dnl protocol options
dnl dnl
...@@ -989,15 +966,33 @@ dnl ...@@ -989,15 +966,33 @@ dnl
dnl build options dnl build options
dnl dnl
AC_ARG_ENABLE(werror,
AS_HELP_STRING([--enable-werror],
[Treat warnings as errors (default: disabled)]),
ENABLE_WERROR=$enableval,
ENABLE_WERROR=no)
if test "x$ENABLE_WERROR" = xyes; then if test "x$ENABLE_WERROR" = xyes; then
MPD_CFLAGS="$MPD_CFLAGS -Werror -pedantic-errors" MPD_CFLAGS="$MPD_CFLAGS -Werror -pedantic-errors"
fi fi
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[Enable debugging (default: disabled)]),
ENABLE_DEBUG=$enableval,
ENABLE_DEBUG=no)
#if test "x$ENABLE_DEBUG" = xno; then #if test "x$ENABLE_DEBUG" = xno; then
# don't set NDEBUG for now, until MPD is stable # don't set NDEBUG for now, until MPD is stable
#MPD_CFLAGS="$MPD_CFLAGS -DNDEBUG" #MPD_CFLAGS="$MPD_CFLAGS -DNDEBUG"
#fi #fi
AC_ARG_ENABLE(gprof,
AS_HELP_STRING([--enable-gprof],
[Enable profiling via gprof (default: disabled)]),
ENABLE_GPROF=$enableval,
ENABLE_GPROF=no)
if test "x$ENABLE_GPROF" = xyes; then if test "x$ENABLE_GPROF" = xyes; then
MPD_CFLAGS="$MPD_CFLAGS -pg" MPD_CFLAGS="$MPD_CFLAGS -pg"
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment