# -*- coding: utf-8 -*-
# Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
# 2017 Laboratoire de Recherche et Développement de l'Epita (LRDE).
# Copyright (C) 2003, 2004, 2005, 2006, 2007 Laboratoire
# d'Informatique de Paris 6 (LIP6), département Systèmes Répartis
# Coopératifs (SRC), Université Pierre et Marie Curie.
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
AC_PREREQ([2.61])
AC_INIT([spot], [2.3.3.dev], [spot@lrde.epita.fr])
AC_CONFIG_AUX_DIR([tools])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 gnu tar-ustar color-tests parallel-tests])
AC_CONFIG_HEADERS([config.h])dnl Private config, not to be used in .hh files.
AX_PREFIX_CONFIG_H([spot/misc/_config.h])dnl Public config, for .hh files.
# If the user didn't supply a CFLAGS value,
# set an empty one to prevent autoconf to stick -O2 -g here.
test -z "$CFLAGS" && CFLAGS=
test -z "$CXXFLAGS" && CXXFLAGS=
adl_ENABLE_DEVEL
AC_PROG_CC
gl_EARLY
AM_PROG_CC_C_O
AC_PROG_CXX
AM_PROG_LEX
adl_CHECK_BISON
# Decrease verbosity when passing argument V=0
AM_SILENT_RULES([no])
# Option to activate C/C++14
AC_ARG_ENABLE([c++14],
[AC_HELP_STRING([--enable-c++14],
[Use C++14.])],
[enable_14=yes], [enable_14=no])
# Activate at C11 for gnulib tests
if test x"${enable_14}" = xyes; then
AX_CHECK_COMPILE_FLAG([-std=c14], [CFLAGS="$CFLAGS -std=c14"])
else
AX_CHECK_COMPILE_FLAG([-std=c11], [CFLAGS="$CFLAGS -std=c11"])
fi
gl_INIT
# Use -Werror since using -fvisibility under MinGW is only a warning.
# (The option is ignored anyway since this does not make sense under windows).
AX_CHECK_COMPILE_FLAG([-Werror -fvisibility=hidden],
[CFLAGS="$CFLAGS -fvisibility=hidden"])
AC_LANG(C++)
AX_CHECK_COMPILE_FLAG([-Werror -fvisibility=hidden],
[CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
AX_CHECK_COMPILE_FLAG([-fvisibility-inlines-hidden],
[CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"])])
CXXFLAGS="$CXXFLAGS -DSPOT_BUILD"
# Turn on C++11 support
m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody],
[AC_LANG_SOURCE([#include
#include
#include // fails with some installation of clang
#include