dnl
dnl $Id: configure.in,v 1.1 2002/01/18 12:35:49 felfert Exp $
dnl
dnl Process this file with autoconf to produce a configure script.
AC_INIT(lcrashd.c)
AM_INIT_AUTOMAKE(lcrashd,0.1)
AM_CONFIG_HEADER(config.h)

dnl Checks for programs.
AC_PROG_CC

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h syslog.h unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIGNAL
AC_TYPE_PID_T

dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(select socket strdup strtoul)

AC_MSG_CHECKING([for debugging build])
AC_ARG_ENABLE(
	debug,
	[  --enable-debug          enable debug build.],
	[
		case "$enableval" in
			yes)
				AC_DEFINE(DEBUG,1,
					[Define, if you want debugging output])
				AC_MSG_RESULT([full debugging])
				;;
			no)
				CFLAGS=`echo $CFLAGS | sed -e 's/-g//g'`
				LDFLAGS="$LDFLAGS -s"
				AC_MSG_RESULT([no debugging])
				;;
		esac
	],
	AC_MSG_RESULT([default debugging])
)

AC_OUTPUT(Makefile)
