comparison 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
comparison
equal deleted inserted replaced
1545:0b991dec7ab9 1580:7f2be495dff6
7 7
8 AC_PREREQ(2.59) 8 AC_PREREQ(2.59)
9 AC_INIT 9 AC_INIT
10 AC_CONFIG_SRCDIR(buffer.c) 10 AC_CONFIG_SRCDIR(buffer.c)
11 11
12 # Record which revision is being built
13 if test -s "`which hg`" && test -d "$srcdir/.hg"; then
14 hgrev=`hg id -i -R "$srcdir"`
15 AC_MSG_NOTICE([Source directory Mercurial base revision $hgrev])
16 fi
17
18 ORIGCFLAGS="$CFLAGS"
12 # Checks for programs. 19 # Checks for programs.
13 AC_PROG_CC 20 AC_PROG_CC
14 21
15 if test -z "$LD" ; then 22 if test -z "$LD" ; then
16 LD=$CC 23 LD=$CC
27 [AC_MSG_NOTICE([Not setting $TESTFLAGS]); CFLAGS="$OLDFLAGS" ] 34 [AC_MSG_NOTICE([Not setting $TESTFLAGS]); CFLAGS="$OLDFLAGS" ]
28 ) 35 )
29 }]) 36 }])
30 37
31 # set compile flags prior to other tests 38 # set compile flags prior to other tests
32 if test -z "$OLDCFLAGS" && test "$GCC" = "yes"; then 39 if test -z "$ORIGCFLAGS" && test "$GCC" = "yes"; then
33 AC_MSG_NOTICE(No \$CFLAGS set... using "-Os -W -Wall" for GCC) 40 AC_MSG_NOTICE(No \$CFLAGS set... using "-Os -W -Wall" for GCC)
34 CFLAGS="-Os -W -Wall" 41 CFLAGS="-Os -W -Wall"
35 fi 42 fi
36 43
37 AC_MSG_NOTICE([Checking if compiler '$CC' supports -Wno-pointer-sign]) 44 AC_MSG_NOTICE([Checking if compiler '$CC' supports -Wno-pointer-sign])
313 [ 320 [
314 AC_CHECK_HEADERS([shadow.h]) 321 AC_CHECK_HEADERS([shadow.h])
315 AC_MSG_NOTICE(Using shadow passwords if available) 322 AC_MSG_NOTICE(Using shadow passwords if available)
316 ] 323 ]
317 ) 324 )
318 325
326 AC_ARG_ENABLE(fuzz,
327 [ --enable-fuzz Build fuzzing. Not recommended for deployment.],
328 [
329 AC_DEFINE(DROPBEAR_FUZZ, 1, Fuzzing)
330 AC_MSG_NOTICE(Enabling fuzzing)
331 DROPBEAR_FUZZ=1
332 ],
333 [
334 AC_DEFINE(DROPBEAR_FUZZ, 0, Fuzzing)
335 DROPBEAR_FUZZ=0
336 ]
337
338 )
339 AC_SUBST(DROPBEAR_FUZZ)
319 340
320 # Checks for header files. 341 # Checks for header files.
321 AC_HEADER_STDC 342 AC_HEADER_STDC
322 AC_HEADER_SYS_WAIT 343 AC_HEADER_SYS_WAIT
323 AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h netinet/tcp.h stdlib.h \ 344 AC_CHECK_HEADERS([netinet/in.h netinet/tcp.h \
324 string.h sys/socket.h sys/time.h termios.h unistd.h crypt.h \ 345 crypt.h \
325 pty.h ioctl.h libutil.h libgen.h inttypes.h stropts.h utmp.h \ 346 pty.h libutil.h libgen.h inttypes.h stropts.h utmp.h \
326 utmpx.h lastlog.h paths.h util.h netdb.h security/pam_appl.h \ 347 utmpx.h lastlog.h paths.h util.h netdb.h security/pam_appl.h \
327 pam/pam_appl.h netinet/in_systm.h sys/uio.h linux/pkt_sched.h]) 348 pam/pam_appl.h netinet/in_systm.h sys/uio.h linux/pkt_sched.h])
328 349
329 # Checks for typedefs, structures, and compiler characteristics. 350 # Checks for typedefs, structures, and compiler characteristics.
330 AC_C_CONST 351 AC_C_CONST
477 AC_CHECK_HEADERS([mach/mach_time.h]) 498 AC_CHECK_HEADERS([mach/mach_time.h])
478 AC_CHECK_FUNCS(mach_absolute_time) 499 AC_CHECK_FUNCS(mach_absolute_time)
479 500
480 AC_CHECK_FUNCS(explicit_bzero memset_s) 501 AC_CHECK_FUNCS(explicit_bzero memset_s)
481 502
482
483 AC_ARG_ENABLE(bundled-libtom, 503 AC_ARG_ENABLE(bundled-libtom,
484 [ --enable-bundled-libtom Force using bundled libtomcrypt/libtommath even if a system version exists. 504 [ --enable-bundled-libtom Force using bundled libtomcrypt/libtommath even if a system version exists.
485 --disable-bundled-libtom Force using system libtomcrypt/libtommath, fail if it does not exist. 505 --disable-bundled-libtom Force using system libtomcrypt/libtommath, fail if it does not exist.
486 Default is to use system if available, otherwise bundled.], 506 Default is to use system if available, otherwise bundled.],
487 [ 507 [
773 793
774 # Checks for library functions. 794 # Checks for library functions.
775 AC_PROG_GCC_TRADITIONAL 795 AC_PROG_GCC_TRADITIONAL
776 AC_FUNC_MEMCMP 796 AC_FUNC_MEMCMP
777 AC_FUNC_SELECT_ARGTYPES 797 AC_FUNC_SELECT_ARGTYPES
778 AC_CHECK_FUNCS([dup2 getpass getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty getaddrinfo freeaddrinfo getnameinfo fork writev]) 798 AC_CHECK_FUNCS([getpass getspnam getusershell putenv])
799 AC_CHECK_FUNCS([clearenv strlcpy strlcat daemon basename _getpty getaddrinfo ])
800 AC_CHECK_FUNCS([freeaddrinfo getnameinfo fork writev getgrouplist])
779 801
780 AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) 802 AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
781 803
782 # Solaris needs ptmx 804 # Solaris needs ptmx
783 if test -z "$no_ptmx_check" ; then 805 if test -z "$no_ptmx_check" ; then