File:  [ELWIX - Embedded LightWeight unIX -] / suX / configure.in
Revision 1.6: download - view: text, annotated - select for diffs - revision graph
Thu Jun 18 23:03:52 2015 UTC (8 years, 11 months ago) by misho
Branches: MAIN
CVS tags: sux3_4, SUX3_3, HEAD
version 3.3

    1: #
    2: # $Author: misho $
    3: # $Id: configure.in,v 1.6 2015/06/18 23:03:52 misho Exp $
    4: #
    5: AC_INIT(suX, 3.3, misho@aitnet.org)
    6: AC_CONFIG_SRCDIR([src/sux.c])
    7: AC_CONFIG_HEADERS([inc/config.h])
    8: 
    9: # Checks for programs.
   10: AC_PROG_CC
   11: AC_PROG_INSTALL
   12: 
   13: AC_CANONICAL_HOST
   14: AC_CANONICAL_TARGET
   15: 
   16: AC_CHECK_TOOL(MKDEP, mkdep, no)
   17: AC_SUBST(MKDEP)
   18: 
   19: CFLAGS="-Wall -O2 -fPIC -I/usr/local/include ${CFLAGS}"
   20: LDFLAGS="-L/usr/local/lib ${LDFLAGS}"
   21: 
   22: # Checks for libraries.
   23: AC_CHECK_LIB([pthread], [pthread_create])
   24: AC_CHECK_LIB([util], [setusercontext])
   25: AC_CHECK_LIB([elwix], [array_Args])
   26: AC_CHECK_LIB([aitcfg], [cfg_getAttribute])
   27: 
   28: # Checks for header files.
   29: AC_CHECK_HEADERS([stdlib.h string.h sys/param.h syslog.h unistd.h])
   30: 
   31: # Checks for typedefs, structures, and compiler characteristics.
   32: AC_C_INLINE
   33: 
   34: # Checks for library functions.
   35: AC_CHECK_FUNCS([endgrent endpwent getcwd strcasecmp strerror strrchr strtol])
   36: 
   37: STATIC=no
   38: AC_MSG_CHECKING(Static build)
   39: AC_ARG_ENABLE(static,
   40: 	[  --enable-static         Build static program ],
   41: 	[ STATIC=$enableval
   42: 		case "$enableval" in
   43: 			yes)
   44: 				LDFLAGS="-static ${LDFLAGS}"
   45: 				;;
   46: 			*)
   47: 				;;
   48: 		esac ],)
   49: AC_MSG_RESULT($STATIC)
   50: 
   51: DEBUG=no
   52: AC_MSG_CHECKING(Debug Build)
   53: AC_ARG_ENABLE(debug,
   54: 	[  --enable-debug          Build program with debug information and additional messages],
   55: 	[ DEBUG=$enableval
   56: 		case "$enableval" in
   57: 			yes)
   58: 				AC_DEFINE(__DEBUG,, [Build libraries with debug information and additional messages])
   59: 				CFLAGS="-g ${CFLAGS}"
   60: 				;;
   61: 			*)
   62: 				AC_DEFINE(NDEBUG,, [Turn off debug asserts])
   63: 				;;
   64: 		esac ], AC_DEFINE(NDEBUG,, [Turn off debug asserts]))
   65: AC_MSG_RESULT($DEBUG)
   66: 
   67: GROUP="www"
   68: AC_MSG_CHECKING(suX execution group)
   69: AC_ARG_WITH(group,
   70: 	[  --with-group=<user>      Permitted group for suX ],
   71: 	[ GROUP=$withval ],)
   72: AC_MSG_RESULT($GROUP)
   73: AC_SUBST(GROUP)
   74: 
   75: AC_CONFIG_FILES([Makefile
   76:                  bin/Makefile
   77:                  inc/Makefile
   78:                  src/Makefile])
   79: AC_OUTPUT

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