sanskrit-iast/configure.ac

64 lines
1.5 KiB
Text
Raw Permalink 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])
2023-03-23 09:08:30 +01:00
AC_INIT([sanskrit-iast], [3.1.0], [vlastavesely@protonmail.ch])
AC_CONFIG_SRCDIR([transliteration.c])
2021-02-23 07:52:17 +01:00
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
2023-02-16 08:55:55 +01:00
AC_PROG_LN_S
2021-05-02 21:30:30 +02:00
AC_CHECK_TOOL([AR], [ar])
2021-02-23 07:52:17 +01:00
2023-02-16 10:22:58 +01:00
PKG_PROG_PKG_CONFIG
PKG_INSTALLDIR
2021-02-23 07:52:17 +01:00
# 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)
2023-02-16 10:22:58 +01:00
AC_CONFIG_FILES([Makefile iast.pc])
2021-02-23 07:52:17 +01:00
AC_OUTPUT