sanskrit-iast/configure.ac

59 lines
1.5 KiB
Text
Raw Normal View History

2021-02-23 07:52:17 +01:00
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([sanskrit-iast], [2.0.0], [vlastavesely@protonmail.ch])
AC_CONFIG_SRCDIR([iast.c])
AC_CONFIG_HEADERS([config.h])
PROGNAME=iast
2021-03-11 18:43:53 +01:00
AC_SUBST([PROGNAME])
AC_DEFINE_UNQUOTED([PROGNAME], ["$PROGNAME"], [Name of the target binary])
2021-02-23 07:52:17 +01:00
# Checks for programs.
AC_PROG_CC
AC_PROG_MKDIR_P
AC_PROG_INSTALL
# Checks for libraries.
PKG_CHECK_MODULES(CHECK, check)
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memmove])
2021-02-25 09:48:38 +01:00
# Enable for gcov if option --enable-gcov is present.
USE_GCOV=no
AC_MSG_CHECKING([whether gcov should be enabled])
AC_ARG_ENABLE(gcov,
AS_HELP_STRING([--enable-gcov], [enable gcov code coverage analysis]), [
if test "x$enableval" != "xno" ; then
if test "$GCC" != "yes"; then
AC_MSG_ERROR([gcc is required for --enable-gcov])
fi
AC_MSG_RESULT(yes)
COVERAGE_CFLAGS="-O0 -g -fno-inline -fprofile-arcs -ftest-coverage"
COVERAGE_LFLAGS="-fprofile-arcs -lgcov"
USE_GCOV=yes
else
AC_MSG_RESULT(no)
COVERAGE_CFLAGS=""
COVERAGE_LFLAGS=""
USE_GCOV=no
fi
], [AC_MSG_RESULT(no)])
AC_SUBST(COVERAGE_CFLAGS)
AC_SUBST(COVERAGE_LFLAGS)
AC_SUBST(USE_GCOV)
2021-02-23 07:52:17 +01:00
AC_CONFIG_FILES([Makefile])
AC_OUTPUT