123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- # -*- Autoconf -*-
- # Process this file with autoconf to produce a configure script.
-
- AC_PREREQ([2.69])
- AC_INIT([asmsh], [0.0-dev], [yann.weber@member.fsf.org])
- AM_INIT_AUTOMAKE([-Wall])
-
- AC_ARG_ENABLE([check],[ --disable-check disable unit test support],
- [case "${enableval}" in
- yes) check=true ;;
- no) check=false ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-check]) ;;
- esac],[check=true])
- AM_CONDITIONAL([CHECK], [test x$check = xtrue])
-
-
- # Checks for libraries.
- if test "x$check" = "xtrue"
- then
- PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [],
- AC_MSG_FAILURE([Unable to locate (check unit test c framework).
- You can run ./configure --disable-check if you do not need unit tests.
- ]))
- AS_IF([test x$debug = xtrue], [CK_FORK=no],[])
- fi
-
-
-
- AC_CONFIG_SRCDIR([asmsh.c])
- AC_CONFIG_HEADERS([config.h])
-
-
-
- # Checks for programs.
- AC_GNU_SOURCE
- AC_C_CONST
- AC_C_INLINE
- AC_PROG_CC
- AC_PROG_RANLIB
-
- AM_PROG_AS
- AM_PROG_AR
-
- if test "x$check" = "xtrue"
- then
- AC_CHECK_PROGS([GCOV], [gcov])
- if test -z "$GCOV";
- then
- AC_MSG_WARN([gcov not found - continuing without coverage monitoring])
- else
- AC_CHECK_PROGS([LCOV], [lcov])
- if test -z "$LCOV";
- then
- AC_MSG_WARN([lcov not found - continuing without HTML coverage summary])
- fi
- fi
- fi
- AC_CHECK_PROGS([CPPCHECK], [cppcheck])
-
- AM_CONDITIONAL([HAVE_GCOV], [test -n "$GCOV"])
- AM_CONDITIONAL([HAVE_LCOV], [test -n "$LCOV"])
- AM_CONDITIONAL([HAVE_CPPCHECK], [test -n "$CPPCHECK"])
-
- # Checks for libraries.
- AC_CHECK_LIB(readline, readline)
-
- # Checks for header files.
- AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h unistd.h])
-
- # Checks for typedefs, structures, and compiler characteristics.
- AC_TYPE_PID_T
- AC_TYPE_SIZE_T
-
- # Checks for library functions.
- AC_FUNC_FORK
- AC_FUNC_MALLOC
- AC_FUNC_REALLOC
- AC_CHECK_FUNCS([bzero strtoull, gmtime_r, ptrace])
-
- AC_CONFIG_FILES([Makefile tests/Makefile tests/samples/Makefile])
- AC_OUTPUT
|