1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- # -*- Autoconf -*-
- # Process this file with autoconf to produce a configure script.
-
- AC_PREREQ([2.69])
- AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
- AM_INIT_AUTOMAKE([-Wall])
-
- AC_ARG_ENABLE([debug],[ --enable-debug turn on debugging],
- [case "${enableval}" in
- yes) debug=true ;;
- no) debug=false ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
- esac],[debug=false])
- AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
-
- 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
-
- AM_CONDITIONAL([HAVE_GCOV], [test -n "$GCOV"])
- AM_CONDITIONAL([HAVE_LCOV], [test -n "$LCOV"])
-
- # Checks for libraries.
-
- # 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])
-
- AC_CONFIG_FILES([Makefile tests/Makefile tests/samples/Makefile])
- AC_OUTPUT
|