tftp-hpa-google/configure.in
hpa 81822ea738 Fork before performing tcpwrappers check.
Don't rely on nonstandard bsd_signal() function, instead
 require that the platform has sigaction().  This is 2001,
 after all.  This may resolve some potential portability
 problems.

Log a message if memory allocation fails, instead of dying silently.

Clean up the main dispatch loop.

Use <sysexits.h> for exit codes, if it exists.

Reformat tftpd.c to match the other files.
2001-07-20 06:59:54 +00:00

71 lines
1.4 KiB
Text

dnl
dnl autoconf input file to generate MCONFIG
dnl
AC_INIT(MCONFIG.in)
AC_PROG_CC
AC_C_CONST
AC_C_INLINE
AC_CHECK_FUNCS(recvmsg)
AC_CHECK_FUNCS(setreuid)
AC_CHECK_FUNCS(setregid)
PA_MSGHDR_MSG_CONTROL
PA_STRUCT_IN_PKTINFO
PA_WITH_BOOL(tcpwrappers, 1,
[ --without-tcpwrappers Disable tcpwrapper permissions checking],
[
AC_SEARCH_LIBS(yp_get_default_domain, [nsl resolv])
PA_HAVE_TCPWRAPPERS
],:)
PA_WITH_BOOL(remap, 1,
[ --without-remap Disable regex-based filename remapping],
[
AC_CHECK_HEADER(regex.h,
[
AC_SEARCH_LIBS(regcomp, [regex rx],
[
AC_DEFINE(WITH_REGEX)
TFTPDOBJS="remap.o $TFTPDOBJS"
])
])
],:)
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)])
AC_CHECK_HEADERS(sysexits.h)
LIBXTRA=false
AC_SEARCH_LIBS(xmalloc, iberty, , LIBXTRA=true LIBOBJS="$LIBOBJS xmalloc.o")
AC_SEARCH_LIBS(xstrdup, iberty, , LIBXTRA=true LIBOBJS="$LIBOBJS xstrdup.o")
AC_SEARCH_LIBS(bsd_signal, bsd, , LIBXTRA=true LIBOBJS="$LIBOBJS bsdsignal.o")
if $LIBXTRA; then
LIBS="../lib/libxtra.a $LIBS"
fi
AC_SUBST(LIBOBJS)
AC_SUBST(TFTPDOBJS)
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_CONFIG_HEADER(config.h)
AC_OUTPUT(MCONFIG)