File:  [ELWIX - Embedded LightWeight unIX -] / tftpd / configure.in
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Mon Feb 17 14:28:29 2014 UTC (10 years, 8 months ago) by misho
Branches: MAIN
CVS tags: tftp0_3, TFTP0_2, HEAD
version 0.2

#
# $Author: misho $
# $Id: configure.in,v 1.2 2014/02/17 14:28:29 misho Exp $
#
AC_INIT(tftpd, 0.2, misho@elwix.org)
AC_CONFIG_SRCDIR([src/tftpd.c])
AC_CONFIG_HEADERS([inc/config.h])

ac_cv_func_malloc_0_nonnull="yes"
ac_cv_func_realloc_0_nonnull="yes"

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL

AC_CANONICAL_HOST
AC_CANONICAL_TARGET

AC_CHECK_TOOL(MKDEP, mkdep, no)
AC_SUBST(MKDEP)

CFLAGS="-Wall -O2 -fPIC ${CFLAGS}"
LDFLAGS="${LDFLAGS}"

# Checks for libraries.
AC_CHECK_LIB(aitcfg, cfgLoadConfig)
AC_CHECK_LIB(aitsched, schedRun)
AC_CHECK_LIB(elwix, rpack_create)

# Checks for header files.
AC_CHECK_HEADERS([fcntl.h paths.h stdlib.h string.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T

# Checks for library functions.
AC_FUNC_FORK
AC_CHECK_FUNCS([dup2 endpwent memset socket strcasecmp strtol])

DEBUG=no
AC_MSG_CHECKING(Debug Build)
AC_ARG_ENABLE(debug,
	[  --enable-debug          Build library with debug information and additional messages],
	[ DEBUG=$enableval
		case "$enableval" in
			yes)
				AC_DEFINE(__DEBUG,, [Build libraries with debug information and additional messages])
				CFLAGS="-g ${CFLAGS}"
				;;
			*)
				AC_DEFINE(NDEBUG,, [Turn off debug asserts])
				;;
		esac ], AC_DEFINE(NDEBUG,, [Turn off debug asserts]))
AC_MSG_RESULT($DEBUG)

AC_CONFIG_FILES([Makefile
                 bin/Makefile
                 inc/Makefile
                 src/Makefile])
AC_OUTPUT

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>