summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2005-08-03 00:20:15 +1000
committerDarren Tucker <dtucker@zip.com.au>2005-08-03 00:20:15 +1000
commit7da23cb5d307a98bb7a58445a845fab7abc35024 (patch)
tree087682756a9c1716b16e8fa678905c1494035794 /configure.ac
parentdd352b675be9af7571ea04635435bf138732f931 (diff)
- (dtucker) [configure.ac] Add a --with-Werror option to configure for
adding -Werror to CFLAGS when all of the configure tests are done. ok djm@
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 16 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 6e2f5c1f5..93297bbd8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.281 2005/08/02 07:21:29 dtucker Exp $ 1# $Id: configure.ac,v 1.282 2005/08/02 14:20:15 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -594,6 +594,17 @@ AC_ARG_WITH(libs,
594 fi 594 fi
595 ] 595 ]
596) 596)
597AC_ARG_WITH(Werror,
598 [ --with-Werror Build main code with -Werror],
599 [
600 if test -n "$withval" && test "x$withval" != "xno"; then
601 werror_flags="-Werror"
602 if "x${withval}" != "xyes"; then
603 werror_flags="$withval"
604 fi
605 fi
606 ]
607)
597 608
598AC_MSG_CHECKING(compiler and flags for sanity) 609AC_MSG_CHECKING(compiler and flags for sanity)
599AC_RUN_IFELSE( 610AC_RUN_IFELSE(
@@ -3358,6 +3369,10 @@ if test "$ac_cv_lib_pam_pam_set_item" = yes ; then
3358 LIBS=`echo $LIBS | sed 's/-ldl //'` 3369 LIBS=`echo $LIBS | sed 's/-ldl //'`
3359fi 3370fi
3360 3371
3372dnl Adding -Werror to CFLAGS early prevents configure tests from running.
3373dnl Add now.
3374CFLAGS="$CFLAGS $werror_flags"
3375
3361AC_EXEEXT 3376AC_EXEEXT
3362AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openbsd-compat/Makefile \ 3377AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openbsd-compat/Makefile \
3363 scard/Makefile ssh_prng_cmds survey.sh]) 3378 scard/Makefile ssh_prng_cmds survey.sh])