# -l <logfile name>, default 'build_nmh.log', - for stdout/stderr
# Advanced/developer use:
# -c to run 'make distcheck' instead of 'make check'
-# -d to build nmh with asserts enabled and optimization disabled
+# -d to build nmh with optimization disabled
# -s to use 'make superclean': requires recent autoconf and automake,
# see docs/README.developers
# -r to build rpm
usage="usage:
[-b <branch>, only if downloading]
[-c to run 'make distcheck' instead of 'make check']
- [-d to build nmh with asserts enabled and optimization disabled]
+ [-d to build nmh with optimization disabled]
[-i to install nmh]
[-l <logfile name>, default '$logfile']
[-r to build rpm]
config_opts="$config_opts --with-smtpserver=$config_smtpserver"
[ "$config_sasl" = y ] && config_opts="$config_opts --with-cyrus-sasl"
[ "$config_tls" = y ] && config_opts="$config_opts --with-tls"
-[ $config_debug = y ] && config_opts="$config_opts --enable-assert"
#### dotlocking, the usual default, requires chgrp and chmod of inc.
installpriv=
if cc -dM -E - </dev/null 2>&1 | grep __GNUC__ >/dev/null; then
#### configure will supply -g -O2 with gcc, but only if CFLAGS
#### isn't defined.
- CFLAGS='-g -ansi -pedantic'
+ CFLAGS='-g -std=c99 -pedantic'
if [ "$config_debug" = n ]; then
- CFLAGS="$CFLAGS -O2"
+ CFLAGS="$CFLAGS -O2 -D_FORTIFY_SOURCE=2"
else
CFLAGS="$CFLAGS -O0"
fi
fi
printf "\n./configure ${CFLAGS:+CFLAGS=\"${CFLAGS}\" }$config_opts\n"
-./configure ${CFLAGS:+CFLAGS="${CFLAGS}" }$config_opts
+./configure ${CFLAGS:+CFLAGS="${CFLAGS}"" "}$config_opts
status=$?
if [ $status -eq 0 ]; then