Mercurial > dropbear
diff configure.ac @ 1580:7f2be495dff6 coverity
merge coverity
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 04 Mar 2018 15:07:09 +0800 |
parents | ee7a546e3e6d |
children | 68abf717328d |
line wrap: on
line diff
--- a/configure.ac Mon Feb 26 22:43:12 2018 +0800 +++ b/configure.ac Sun Mar 04 15:07:09 2018 +0800 @@ -9,6 +9,13 @@ AC_INIT AC_CONFIG_SRCDIR(buffer.c) +# Record which revision is being built +if test -s "`which hg`" && test -d "$srcdir/.hg"; then + hgrev=`hg id -i -R "$srcdir"` + AC_MSG_NOTICE([Source directory Mercurial base revision $hgrev]) +fi + +ORIGCFLAGS="$CFLAGS" # Checks for programs. AC_PROG_CC @@ -29,7 +36,7 @@ }]) # set compile flags prior to other tests -if test -z "$OLDCFLAGS" && test "$GCC" = "yes"; then +if test -z "$ORIGCFLAGS" && test "$GCC" = "yes"; then AC_MSG_NOTICE(No \$CFLAGS set... using "-Os -W -Wall" for GCC) CFLAGS="-Os -W -Wall" fi @@ -315,14 +322,28 @@ AC_MSG_NOTICE(Using shadow passwords if available) ] ) - + +AC_ARG_ENABLE(fuzz, + [ --enable-fuzz Build fuzzing. Not recommended for deployment.], + [ + AC_DEFINE(DROPBEAR_FUZZ, 1, Fuzzing) + AC_MSG_NOTICE(Enabling fuzzing) + DROPBEAR_FUZZ=1 + ], + [ + AC_DEFINE(DROPBEAR_FUZZ, 0, Fuzzing) + DROPBEAR_FUZZ=0 + ] + +) +AC_SUBST(DROPBEAR_FUZZ) # Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h netinet/tcp.h stdlib.h \ - string.h sys/socket.h sys/time.h termios.h unistd.h crypt.h \ - pty.h ioctl.h libutil.h libgen.h inttypes.h stropts.h utmp.h \ +AC_CHECK_HEADERS([netinet/in.h netinet/tcp.h \ + crypt.h \ + pty.h libutil.h libgen.h inttypes.h stropts.h utmp.h \ utmpx.h lastlog.h paths.h util.h netdb.h security/pam_appl.h \ pam/pam_appl.h netinet/in_systm.h sys/uio.h linux/pkt_sched.h]) @@ -479,7 +500,6 @@ AC_CHECK_FUNCS(explicit_bzero memset_s) - AC_ARG_ENABLE(bundled-libtom, [ --enable-bundled-libtom Force using bundled libtomcrypt/libtommath even if a system version exists. --disable-bundled-libtom Force using system libtomcrypt/libtommath, fail if it does not exist. @@ -775,7 +795,9 @@ AC_PROG_GCC_TRADITIONAL AC_FUNC_MEMCMP AC_FUNC_SELECT_ARGTYPES -AC_CHECK_FUNCS([dup2 getpass getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty getaddrinfo freeaddrinfo getnameinfo fork writev]) +AC_CHECK_FUNCS([getpass getspnam getusershell putenv]) +AC_CHECK_FUNCS([clearenv strlcpy strlcat daemon basename _getpty getaddrinfo ]) +AC_CHECK_FUNCS([freeaddrinfo getnameinfo fork writev getgrouplist]) AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))