ossp-pkg/act/configure.ac
dnl ##
dnl ## OSSP act - Abstract Container Types
dnl ## Copyright (c) 1999-2003 Ralf S. Engelschall <rse@engelschall.com>
dnl ## Copyright (c) 1999-2003 The OSSP Project <http://www.ossp.org/>
dnl ##
dnl ## This file is part of OSSP act, a abstract container type library
dnl ## which can be found at http://www.ossp.org/pkg/lib/act/.
dnl ##
dnl ## Permission to use, copy, modify, and distribute this software for
dnl ## any purpose with or without fee is hereby granted, provided that
dnl ## the above copyright notice and this permission notice appear in all
dnl ## copies.
dnl ##
dnl ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
dnl ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
dnl ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
dnl ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
dnl ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
dnl ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
dnl ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
dnl ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
dnl ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
dnl ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
dnl ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
dnl ## SUCH DAMAGE.
dnl ##
dnl ## configure.ac: Autoconf specification
dnl ##
AC_PREREQ(2.57)dnl
AC_INIT(README)
AC_HEADLINE(dnl
OSSP act, Abstract Container Types, dnl
ACT_VERSION, act_vers.c, dnl
[Copyright (c) 1999-2003 Ralf S. Engelschall <rse@engelschall.com>
Copyright (c) 1999-2003 The OSSP Project <http://www.ossp.org/>])
AC_SET_MAKE
AC_PROG_CC
AC_PROG_CPP
AC_CHECK_PROG(AR, ar, ar)
AC_PROG_RANLIB
AC_MSG_CHECKING(whether to build with debugging)
AC_ARG_ENABLE(debug,dnl
[ --enable-debug build with debugging (default=no)],
enable_debug="$enableval",
if test ".$enable_debug" = .; then
enable_debug=no
fi
)dnl
if test ".$enable_debug" = .yes; then
LDFLAGS="$LDFLAGS -g"
CFLAGS="$CFLAGS -g"
CFLAGS="$CFLAGS -pedantic"
CFLAGS="$CFLAGS -Wall -Wshadow -Wpointer-arith -Wcast-align"
CFLAGS="$CFLAGS -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline"
CFLAGS="$CFLAGS -Wno-long-long"
fi
AC_MSG_RESULT([$enable_debug])
AC_MSG_CHECKING(for compilation profile mode)
AC_ARG_ENABLE(profile,dnl
[ --enable-profile build for profiling (default=no)],
[dnl
if test ".$ac_cv_prog_gcc" = ".no"; then
AC_MSG_ERROR([profiling requires gcc and gprof])
fi
CFLAGS=`echo "$CFLAGS" | sed -e 's/-O2//g'`
CFLAGS="$CFLAGS -O0 -pg"
LDFLAGS="$LDFLAGS -pg"
msg="enabled"
],[
msg="disabled"
])dnl
AC_MSG_RESULT([$msg])
AC_HAVE_FUNCS(memset memmove memcmp)
AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(long long, 8)
HAVE_ACT_UINT8_T="#define HAVE_ACT_UINT8_T";
HAVE_ACT_UINT16_T="#define HAVE_ACT_UINT16_T";
HAVE_ACT_UINT32_T="#define HAVE_ACT_UINT32_T";
HAVE_ACT_UINT64_T="#define HAVE_ACT_UINT64_T";
HAVE_ACT_SIZE_T="#define HAVE_ACT_SIZE_T";
AC_SUBST(HAVE_ACT_UINT8_T)
AC_SUBST(HAVE_ACT_UINT16_T)
AC_SUBST(HAVE_ACT_UINT32_T)
AC_SUBST(HAVE_ACT_UINT64_T)
AC_SUBST(HAVE_ACT_SIZE_T)
ACT_UINT8_T="unsigned char";
ACT_UINT16_T="unsigned short";
ACT_UINT32_T="unsigned long";
ACT_UINT64_T="unsigned long long";
ACT_SIZE_T="unsigned int";
AC_SUBST(ACT_UINT8_T)
AC_SUBST(ACT_UINT16_T)
AC_SUBST(ACT_UINT32_T)
AC_SUBST(ACT_UINT64_T)
AC_SUBST(ACT_SIZE_T)
dnl AC_TRY_RUN([
dnl #include <unistd.h>
dnl #include <sys/types.h>
dnl #include <stdio.h>
dnl main()
dnl {
dnl long long n = 1;
dnl if (sizeof(long long) >= 8)
dnl
dnl exit(0)
dnl }
dnl ],
AC_CONFIG_HEADERS(act_cfg.h)
AC_CONFIG_FILES([Makefile act.h])
AC_OUTPUT