File:  [ELWIX - Embedded LightWeight unIX -] / suX / configure.in
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Wed Apr 10 00:04:10 2013 UTC (11 years, 1 month ago) by misho
Branches: MAIN
CVS tags: sux3_2, SUX3_1, HEAD
version 3.1

#
# $Author: misho $
# $Id: configure.in,v 1.4 2013/04/10 00:04:10 misho Exp $
#
AC_INIT(suX, 3.1, misho@aitnet.org)
AC_CONFIG_SRCDIR([src/sux.c])
AC_CONFIG_HEADERS([inc/config.h])

# 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 -I/usr/local/include ${CFLAGS}"
LDFLAGS="-L/usr/local/lib ${LDFLAGS}"

# Checks for libraries.
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([util], [setusercontext])
AC_CHECK_LIB([elwix], [array_Args])
AC_CHECK_LIB([aitcfg], [cfgLoadConfig])

# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h sys/param.h syslog.h unistd.h])

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

# Checks for library functions.
AC_CHECK_FUNCS([endgrent endpwent getcwd strcasecmp strerror strrchr strtol])

STATIC=no
AC_MSG_CHECKING(Static build)
AC_ARG_ENABLE(static,
	[  --enable-static         Build static program ],
	[ STATIC=$enableval
		case "$enableval" in
			yes)
				LDFLAGS="-static ${LDFLAGS}"
				;;
			*)
				;;
		esac ],)
AC_MSG_RESULT($STATIC)

DEBUG=no
AC_MSG_CHECKING(Debug Build)
AC_ARG_ENABLE(debug,
	[  --enable-debug          Build program 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>