msousa@353: # -*- Autoconf -*- msousa@353: # Process this file with autoconf to produce a configure script. msousa@353: msousa@353: AC_PREREQ([2.61]) msousa@363: AC_INIT([matiec], [0.1], [msousa@fe.up.pt, beremiz-devel@lists.sourceforge.net]) msousa@353: AC_CONFIG_HEADERS([config/config.h]) msousa@353: AC_CONFIG_AUX_DIR(config) msousa@353: msousa@353: AM_INIT_AUTOMAKE([foreign]) msousa@353: msousa@353: # Before checking for CXX and CC, set CFLAGS and CXXFLAGS because they msousa@353: # are otherwise initialized to contain -g -O2 msousa@353: if test "x$CFLAGS" = "x"; then msousa@353: CFLAGS= msousa@353: fi msousa@353: if test "x$CXXFLAGS" = "x"; then msousa@353: CXXFLAGS= msousa@353: fi msousa@353: msousa@353: # Checks for programs. msousa@353: AC_PROG_YACC msousa@353: AC_PROG_LEX msousa@353: AC_PROG_CXX msousa@353: AC_PROG_INSTALL msousa@353: AC_PROG_LN_S msousa@353: AC_PROG_MAKE_SET msousa@353: AC_PROG_RANLIB conti@622: AC_PROG_AWK conti@622: conti@622: # Check bison version, we need a version great or equal than 2.4 to build matiec. conti@622: [[[ $(bison --version) =~ ([0-9][.][0-9]*) ]]] && version_bison="${BASH_REMATCH[[1]]}" conti@622: conti@622: AS_IF([awk -v ver="$version_bison" 'BEGIN { if (ver < 2.4) exit 1; }'], conti@622: [have_bison_correct=yes], [have_bison_correct=no]) conti@622: conti@622: conti@622: if test "x${have_bison_correct}" = xno; then conti@622: echo "------------------------------------------" conti@622: echo " Wrong bison version: $version_bison < 2.4 " conti@622: echo "------------------------------------------" conti@622: (exit 1); exit 1; conti@622: fi msousa@353: msousa@353: # Checks for header files. msousa@353: AC_CHECK_HEADERS([float.h limits.h stdint.h stdlib.h string.h strings.h sys/timeb.h unistd.h]) msousa@353: msousa@353: # Checks for typedefs, structures, and compiler characteristics. msousa@353: AC_HEADER_STDBOOL msousa@353: AC_C_INLINE msousa@353: AC_TYPE_INT16_T msousa@353: AC_TYPE_INT32_T msousa@353: AC_TYPE_INT64_T msousa@353: AC_TYPE_INT8_T msousa@353: AC_TYPE_UINT16_T msousa@353: AC_TYPE_UINT32_T msousa@353: AC_TYPE_UINT64_T msousa@353: AC_TYPE_UINT8_T msousa@353: msousa@353: # Checks for library functions. msousa@353: AC_FUNC_MALLOC msousa@353: AC_FUNC_MKTIME msousa@353: AC_FUNC_REALLOC msousa@353: AC_CHECK_FUNCS([clock_gettime memset pow strcasecmp strdup strtoul strtoull]) msousa@353: conti@622: msousa@353: AC_CONFIG_MACRO_DIR([config]) msousa@353: msousa@353: AC_CONFIG_FILES([Makefile \ msousa@353: absyntax/Makefile \ msousa@353: absyntax_utils/Makefile \ msousa@353: stage1_2/Makefile \ msousa@353: stage3/Makefile \ Matteo@369: stage4/Makefile \ Matteo@369: stage4/generate_c/Makefile \ Matteo@369: stage4/generate_iec/Makefile]) msousa@353: AC_OUTPUT msousa@353: msousa@353: