dnl ==========================================================================
dnl configure.in
dnl ==========================================================================
dnl configure script for parseopt
dnl --------------------------------------------------------------------------
dnl   AUTHOR:  Marco Pantaleoni         E-mail: panta@elasticworld.org
dnl
dnl   Created: 15 Nov 2000
dnl
dnl   $Id: configure.in,v 1.1.1.1 2001/04/03 10:18:55 antirez Exp $
dnl --------------------------------------------------------------------------
dnl    Copyright (C) 2000 Marco Pantaleoni. All rights reserved.
dnl
dnl  The contents of this file are subject to the elastiC License version 1.0
dnl  (the "elastiC License"); you may not use this file except in compliance
dnl  with the elastiC License. You may obtain a copy of the elastiC License at
dnl  http://www.elasticworld.org/LICENSE
dnl
dnl  IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTORS BE LIABLE TO ANY PARTY
dnl  FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
dnl  ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
dnl  DERIVATIVES THEREOF, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
dnl  POSSIBILITY OF SUCH DAMAGE.
dnl
dnl  THE AUTHOR AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
dnl  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
dnl  FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
dnl  IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHOR AND DISTRIBUTORS HAVE
dnl  NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
dnl  MODIFICATIONS.
dnl
dnl  See the elastiC License for the specific language governing rights and
dnl  limitations under the elastiC License.
dnl ==========================================================================

dnl Process this file with autoconf to produce a configure script.
AC_INIT(parseopt.h)

dnl Set VERSION so we only need to edit in here
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
VERSION=0.3
PACKAGE=parseopt

dnl Use autoconf/automake files from specied directory
AC_CONFIG_AUX_DIR(build)

dnl Determine host and target system type
AC_CANONICAL_SYSTEM

AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)

dnl Specify a configuration file
AM_CONFIG_HEADER(config.h)

dnl Optional features
AC_ARG_ENABLE(devel,          [  --enable-devel=[no/yes]                          - Enable developer mode [default=yes]],,enable_devel=yes)
AC_ARG_ENABLE(debug,          [  --enable-debug=[no/yes]                          - Enable compiling with debugging information [default=yes]],,enable_debug=yes)

AC_SUBST(CFLAGS)
AC_SUBST(CORE_CFLAGS)

if test "x$enable_devel" = "xyes"; then
  test "$cflags_set" = set || CORE_CFLAGS="-Wall -Winline -Wstrict-prototypes -Wno-protocols"
fi

if test "x$enable_debug" = "xyes"; then
  test "$cflags_set" = set || CORE_CFLAGS="$CORE_CFLAGS -g -O0 -DDEBUG"
fi

CFLAGS="$CORE_CFLAGS"

dnl Checks for programs.

AC_ARG_PROGRAM
AC_PROG_INSTALL
AC_PROG_MAKE_SET

AM_PROG_LIBTOOL

dnl Checks for header files.
AC_CHECK_HEADERS(string.h ctype.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_C_CONST

dnl Checks for library functions.
AC_HEADER_STDC

AC_CHECK_FUNCS(strncmp strcasecmp)

AC_OUTPUT(Makefile doc/Makefile doc/INSTALL.sdf)
