forked from mirrors/tftp-hpa-google
Detect if IPPORT_TFTP is defined anywhere (may not be a macro, may be
an enum.)
This commit is contained in:
parent
68c0102aa6
commit
a0db7c057b
4 changed files with 45 additions and 13 deletions
25
aclocal.m4
vendored
25
aclocal.m4
vendored
|
@ -134,3 +134,28 @@ if test [$2] -ne 0; then
|
|||
else
|
||||
[$5]
|
||||
fi)])
|
||||
|
||||
dnl --------------------------------------------------------------------------
|
||||
dnl PA_HEADER_DEFINES
|
||||
dnl
|
||||
dnl PA_HEADER_DEFINES(headers, type, value)
|
||||
dnl --------------------------------------------------------------------------
|
||||
AC_DEFUN(PA_HEADER_DEFINES,
|
||||
[AC_MSG_CHECKING([for definition of $3])
|
||||
AC_TRY_COMPILE([$1],
|
||||
[
|
||||
int main()
|
||||
{
|
||||
$2 dummy = $3;
|
||||
return 0;
|
||||
}
|
||||
],
|
||||
[
|
||||
pa_header_define=`echo HAVE_$3_DEFINITION | tr '[a-z]' '[A-Z]'`
|
||||
AC_DEFINE_UNQUOTED($pa_header_define)
|
||||
AC_MSG_RESULT(yes)
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
])])
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#undef HAVE_SETREUID
|
||||
#undef HAVE_SETREGID
|
||||
#undef HAVE_SETSID
|
||||
#undef HAVE_IPPORT_TFTP_DEFINITION
|
||||
#undef HAVE_SYSEXITS_H
|
||||
#undef HAVE_STRINGS_H
|
||||
#undef HAVE_LIBGEN_H
|
||||
|
|
28
configure.in
28
configure.in
|
@ -9,6 +9,19 @@ AC_PROG_CC
|
|||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
|
||||
PA_ADD_CFLAGS(-Wall)
|
||||
PA_ADD_CFLAGS(-W)
|
||||
PA_ADD_CFLAGS(-Wpointer-arith)
|
||||
PA_ADD_CFLAGS(-Wbad-function-cast)
|
||||
PA_ADD_CFLAGS(-Wcast-equal)
|
||||
PA_ADD_CFLAGS(-Wstrict-prototypes)
|
||||
PA_ADD_CFLAGS(-Wmissing-prototypes)
|
||||
PA_ADD_CFLAGS(-Wmissing-declarations)
|
||||
PA_ADD_CFLAGS(-Wnested-externs)
|
||||
PA_ADD_CFLAGS(-Winline)
|
||||
PA_ADD_CFLAGS(-Wcast-align)
|
||||
PA_ADD_CFLAGS(-pipe)
|
||||
|
||||
AC_CHECK_HEADERS(sysexits.h)
|
||||
AC_CHECK_HEADERS(strings.h)
|
||||
AC_CHECK_HEADERS(libgen.h)
|
||||
|
@ -26,6 +39,8 @@ AC_CHECK_FUNCS(setregid)
|
|||
PA_MSGHDR_MSG_CONTROL
|
||||
PA_STRUCT_IN_PKTINFO
|
||||
|
||||
PA_HEADER_DEFINES([#include <netinet/in.h>], int, IPPORT_TFTP)
|
||||
|
||||
PA_WITH_BOOL(tcpwrappers, 1,
|
||||
[ --without-tcpwrappers Disable tcpwrapper permissions checking],
|
||||
[
|
||||
|
@ -46,19 +61,6 @@ PA_WITH_BOOL(remap, 1,
|
|||
])
|
||||
],:)
|
||||
|
||||
PA_ADD_CFLAGS(-Wall)
|
||||
PA_ADD_CFLAGS(-W)
|
||||
PA_ADD_CFLAGS(-Wpointer-arith)
|
||||
PA_ADD_CFLAGS(-Wbad-function-cast)
|
||||
PA_ADD_CFLAGS(-Wcast-equal)
|
||||
PA_ADD_CFLAGS(-Wstrict-prototypes)
|
||||
PA_ADD_CFLAGS(-Wmissing-prototypes)
|
||||
PA_ADD_CFLAGS(-Wmissing-declarations)
|
||||
PA_ADD_CFLAGS(-Wnested-externs)
|
||||
PA_ADD_CFLAGS(-Winline)
|
||||
PA_ADD_CFLAGS(-Wcast-align)
|
||||
PA_ADD_CFLAGS(-pipe)
|
||||
|
||||
PA_SIGSETJMP([AC_DEFINE(HAVE_SIGSETJMP)])
|
||||
|
||||
LIBXTRA=false
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
#include <setjmp.h>
|
||||
#include "../config.h"
|
||||
|
||||
#ifndef HAVE_IPPORT_TFTP_DEFINITION
|
||||
#define IPPORT_TFTP 69
|
||||
#endif
|
||||
|
||||
struct tftphdr;
|
||||
|
||||
struct tftphdr *r_init(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue