configure.ac
author Mario de Sousa <msousa@fe.up.pt>
Wed, 26 Dec 2018 11:12:27 +0000
changeset 1078 81e2a100db14
parent 1066 29735e347716
permissions -rw-r--r--
Test for overflow when translating task periods/intervals to integer variable.
353
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     1
#                                               -*- Autoconf -*-
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     2
# Process this file with autoconf to produce a configure script.
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     3
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     4
AC_PREREQ([2.61])
363
a0fb5d224855 fix bug report email address.
Mario de Sousa <msousa@fe.up.pt>
parents: 353
diff changeset
     5
AC_INIT([matiec], [0.1], [msousa@fe.up.pt, beremiz-devel@lists.sourceforge.net])
353
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     6
AC_CONFIG_HEADERS([config/config.h])
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     7
AC_CONFIG_AUX_DIR(config)
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     8
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
     9
AM_INIT_AUTOMAKE([foreign])
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    10
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    11
# Before checking for CXX and CC, set CFLAGS and CXXFLAGS because they
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    12
# are otherwise initialized to contain -g -O2
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    13
if test "x$CFLAGS" = "x"; then
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    14
CFLAGS=
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    15
fi
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    16
if test "x$CXXFLAGS" = "x"; then
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    17
CXXFLAGS=
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    18
fi
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    19
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    20
# Checks for programs.
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    21
AC_PROG_YACC
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    22
AC_PROG_LEX
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    23
AC_PROG_CXX
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    24
AC_PROG_INSTALL
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    25
AC_PROG_LN_S
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    26
AC_PROG_MAKE_SET
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    27
AC_PROG_RANLIB
622
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    28
AC_PROG_AWK
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    29
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    30
# Check bison version, we need a version great or equal than 2.4 to build matiec.
1066
29735e347716 Fix method ./configure uses to determine bison version (did not work in bourne shell) (submitted by anonymous)"
Mario de Sousa <msousa@fe.up.pt>
parents: 1027
diff changeset
    31
version_bison="$(bison --version | sed q | cut -d' ' -f4 | cut -d'.' -f1,2 )"
622
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    32
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    33
AS_IF([awk -v ver="$version_bison" 'BEGIN { if (ver < 2.4) exit 1; }'],
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    34
	[have_bison_correct=yes], [have_bison_correct=no])
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    35
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    36
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    37
if test "x${have_bison_correct}" = xno; then
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    38
  echo "------------------------------------------"
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    39
  echo " Wrong bison version: $version_bison < 2.4 "
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    40
  echo "------------------------------------------"
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    41
  (exit 1); exit 1;
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    42
fi
353
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    43
1027
675ee2eeb3ff Check that flex is installed during ./configure
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 642
diff changeset
    44
if test "x$LEX" == "x:"; then
675ee2eeb3ff Check that flex is installed during ./configure
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 642
diff changeset
    45
   AC_MSG_ERROR("flex/lex is missing")
675ee2eeb3ff Check that flex is installed during ./configure
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 642
diff changeset
    46
fi
675ee2eeb3ff Check that flex is installed during ./configure
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 642
diff changeset
    47
353
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    48
# Checks for header files.
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    49
AC_CHECK_HEADERS([float.h limits.h stdint.h stdlib.h string.h strings.h sys/timeb.h unistd.h])
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    50
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    51
# Checks for typedefs, structures, and compiler characteristics.
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    52
AC_HEADER_STDBOOL
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    53
AC_C_INLINE
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    54
AC_TYPE_INT16_T
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    55
AC_TYPE_INT32_T
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    56
AC_TYPE_INT64_T
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    57
AC_TYPE_INT8_T
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    58
AC_TYPE_UINT16_T
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    59
AC_TYPE_UINT32_T
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    60
AC_TYPE_UINT64_T
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    61
AC_TYPE_UINT8_T
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    62
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    63
# Checks for library functions.
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    64
AC_FUNC_MALLOC
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    65
AC_FUNC_MKTIME
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    66
AC_FUNC_REALLOC
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    67
AC_CHECK_FUNCS([clock_gettime memset pow strcasecmp strdup strtoul strtoull])
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    68
622
eaa49b276e17 Add check bison version in configure.ac file.
Manuele Conti <conti.ma@alice.it>
parents: 369
diff changeset
    69
353
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    70
AC_CONFIG_MACRO_DIR([config])
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    71
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    72
AC_CONFIG_FILES([Makefile \
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    73
	absyntax/Makefile \
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    74
	absyntax_utils/Makefile \
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    75
	stage1_2/Makefile \
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    76
	stage3/Makefile \
369
569e7d9e2406 Add iec2iec building in the project Makefiles.
Matteo Facchinetti
parents: 363
diff changeset
    77
	stage4/Makefile \
569e7d9e2406 Add iec2iec building in the project Makefiles.
Matteo Facchinetti
parents: 363
diff changeset
    78
	stage4/generate_c/Makefile \
569e7d9e2406 Add iec2iec building in the project Makefiles.
Matteo Facchinetti
parents: 363
diff changeset
    79
	stage4/generate_iec/Makefile])
353
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    80
AC_OUTPUT
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    81
17bffb57a8c5 Building compiler with autoconf. Thanks go to Matteo of sirius-es.it
Mario de Sousa <msousa@fe.up.pt>
parents:
diff changeset
    82