summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautogen.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/autogen.sh b/autogen.sh
index b4039f5..92c7655 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,6 +9,11 @@ aclocal -I m4 --force || exit 1
autoheader --force || exit 1
automake --add-missing --copy --force || exit 1
autoconf --force || exit 1
-export CFLAGS="-Wall -g -O0 -Wl,--no-undefined"
-export CXXFLAGS="$CFLAGS"
-./configure "$@" || exit 1
+
+if `echo "$@" | grep -q CFLAGS > /dev/null` ; then
+ ./configure "$@" || exit 1
+else
+ CFLAGS=${CFLAGS-"-Wall -Werror -Wformat -Werror=format-security"}
+ CXXFLAGS="$CFLAGS"
+ ./configure "$@" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" || exit 1
+fi