dnl ## dnl ## Autoconf specification for ACT library dnl ## AC_PREREQ(2.12)dnl AC_REVISION($Revision: 1.6 $) AC_INIT(README) AC_HEADLINE(dnl ACT, Abstract Container Types, dnl ACT_VERSION, act_vers.c, dnl [Copyright (c) 1999-2002 Ralf S. Engelschall ]) AC_PREFIX_DEFAULT(/usr/local) AC_CONFIG_HEADER(act_cfg.h) 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 -ggdb3" CFLAGS="$CFLAGS -g -ggdb3" 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 dnl #include dnl #include dnl main() dnl { dnl long long n = 1; dnl if (sizeof(long long) >= 8) dnl dnl exit(0) dnl } dnl ], AC_OUTPUT(dnl Makefile dnl act.h dnl )dnl