X-Git-Url: http://git.squeep.com/?p=allocwithin;a=blobdiff_plain;f=configure.ac;fp=configure.ac;h=f30599094950050df5595a868ff44e39a78ee573;hp=0000000000000000000000000000000000000000;hb=62af9ffd1e795491f74b07db73ad240079a0e5af;hpb=966b5d9bd5be10b5a6095aeb649d442cd6c7c901 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f305990 --- /dev/null +++ b/configure.ac @@ -0,0 +1,63 @@ +# $Id$ + +AC_PREREQ([2.68]) +AC_INIT([region-bounded dynamic allocator], + [0.0], + [Justin Wind ], + [liballocwithin]) +AM_INIT_AUTOMAKE([foreign color-tests]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_SRCDIR(allocwithin.c) +AC_CONFIG_MACRO_DIR([m4]) + +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_INSTALL +AC_PROG_LN_S +LT_INIT + +AC_ARG_ENABLE([debug-output], + AS_HELP_STRING([--enable-debug-output], + [enable extra debugging output, default: no]), + [AS_IF([test "x${enableval}" != "xno"], + AC_DEFINE([PRINT_DEBUG],[1],[Define to enable extra debugging output.]))]) + +AC_MSG_CHECKING(for __attribute__) + AC_CACHE_VAL(ac_cv___attribute__, + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], [[int foo __attribute__ ((unused));]])], + [ac_cv___attribute__=yes], + [ac_cv___attribute__=no])]) + if test "$ac_cv___attribute__" = "yes"; then + AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__]) + fi + AC_MSG_RESULT($ac_cv___attribute__) + +AC_MSG_CHECKING([if __attribute__ format works on function pointers]) + AC_CACHE_VAL(ac_cv___attribute__fp, + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], [[static void (*foo)(char *fmt, ...) __attribute__((format(printf, 1, 2)));]])], + [ac_cv___attribute__fp=yes], + [ac_cv___attribute__fp=no])]) + if test "$ac_cv___attribute__fp" = "yes"; then + AC_DEFINE(HAVE___ATTRIBUTE__FP, 1, [define if your compiler supports __attribute__ format on function pointer variables]) + fi + AC_MSG_RESULT($ac_cv___attribute__fp) + +m4_include(m4/ax_pthread.m4) +AX_PTHREAD +LIBS="$PTHREAD_LIBS $LIBS" +CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +CC="$PTHREAD_CC" + +AC_CHECK_LIB(pthread, pthread_create) + +AC_CHECK_HEADERS([signal.h]) + +AC_TYPE_SIZE_T + +AC_SUBST([AM_CXXFLAGS]) +AC_SUBST([AM_LDFLAGS]) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT