autoconfiscated

This commit is contained in:
Michael Weber 2010-11-26 11:29:55 +01:00
parent be18a22bce
commit d8a101f54e
7 changed files with 184 additions and 42 deletions

41
.gitignore vendored Normal file
View file

@ -0,0 +1,41 @@
# ltl2ba
autotools/
ltl2ba
*.o
*.lo
*.la
ltl2ba-*.tar.gz
# editor
\#*\#
*~
# http://www.gnu.org/software/automake
TAGS
.deps/
Makefile
Makefile.in
# http://www.gnu.org/software/autoconf
/autom4te.cache
/aclocal.m4
/compile
/configure
/depcomp
/install-sh
/missing
/stamp-h1
config.h
config.h.in
config.log
config.lt
config.status
# libtool
/libtool
.libs/

View file

@ -1,42 +0,0 @@
# LTL2BA - Version 1.0 - October 2001
# Written by Denis Oddoux, LIAFA, France
# Copyright (c) 2001 Denis Oddoux
#
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Based on the translation algorithm by Gastin and Oddoux,
# presented at the CAV Conference, held in 2001, Paris, France 2001.
# Send bug-reports and/or questions to: Denis.Oddoux@liafa.jussieu.fr
# or to Denis Oddoux
# LIAFA, UMR 7089, case 7014
# Universite Paris 7
# 2, place Jussieu
# F-75251 Paris Cedex 05
# FRANCE
CC=gcc
CFLAGS= -O3 -ansi -DNXT
LTL2BA= parse.o lex.o main.o trans.o buchi.o set.o \
mem.o rewrt.o cache.o alternating.o generalized.o
ltl2ba: $(LTL2BA)
$(CC) $(CFLAGS) -o ltl2ba $(LTL2BA)
$(LTL2BA): ltl2ba.h
clean:
rm -f ltl2ba *.o core

24
Makefile.am Normal file
View file

@ -0,0 +1,24 @@
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -DNXT
bin_PROGRAMS = ltl2ba
noinst_LTLIBRARIES = libltl2ba.la
ltl2ba_SOURCES = main.c
ltl2ba_SOURCES += ltl2ba.h
ltl2ba_LDADD = libltl2ba.la
libltl2ba_la_SOURCES = parse.c
libltl2ba_la_SOURCES += lex.c
libltl2ba_la_SOURCES += trans.c
libltl2ba_la_SOURCES += buchi.c
libltl2ba_la_SOURCES += set.c
libltl2ba_la_SOURCES += mem.c
libltl2ba_la_SOURCES += rewrt.c
libltl2ba_la_SOURCES += cache.c
libltl2ba_la_SOURCES += alternating.c
libltl2ba_la_SOURCES += generalized.c
libltl2ba_la_SOURCES += ltl2ba.h
# make
.DELETE_ON_ERROR:

44
configure.ac Normal file
View file

@ -0,0 +1,44 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.60])
AC_INIT([ltl2ba], [1.1], [paul.gastin@lsv.ens-cachan.fr])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([autotools])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl Newer libtool allows this instead:
dnl LT_PREREQ(2.2)
dnl LT_INIT([disable-shared])
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
AC_PROG_RANLIB
AX_TRY_CFLAGS_IFELSE([-W -Wall])
AX_TRY_CFLAGS_IFELSE([-pipe])
AX_TRY_CFLAGS_IFELSE([-ansi])
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h sys/time.h])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memset])
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT

5
m4/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
libtool.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4

24
m4/ax_let.m4 Normal file
View file

@ -0,0 +1,24 @@
#serial 1
# Author: Michael Weber <michaelw@cs.utwente.nl>
#
# SYNOPSIS
#
# AX_LET(VAR1, EXPR1,
# [VAR2, EXPR2,]...
# BODY)
#
m4_define([AX_LET_counter_],0)
m4_define([AX_LET_AUX], [dnl
m4_if([$#], 2, [$1
$2], [dnl
ax_let_$2_[]AX_LET_counter_[]_tmp_=$3
AX_LET_AUX([m4_if([$1],[],[],[$1
])dnl
ax_let_$2_[]AX_LET_counter_="[$]$2"
$2="[$]ax_let_$2_[]AX_LET_counter_[]_tmp_"], m4_shiftn(3,$@))
$2="[$]ax_let_$2_[]AX_LET_counter_"])])dnl
AC_DEFUN([AX_LET],
[m4_define([AX_LET_counter_], m4_incr(AX_LET_counter_))dnl
# AX_LET
AX_LET_AUX([],$@)])

View file

@ -0,0 +1,46 @@
#serial 1
# Author: Michael Weber <michaelw@cs.utwente.nl>
#
# SYNOPSIS
#
# AX_TRY_CFLAGS_IFELSE(VAR, FLAGS...[, ACTION-IF-TRUE[, ACTION-IF-FALSE]])
#
AC_DEFUN([AX_TRY_CFLAGS_IFELSE],
[AX_LET([CFLAGS],["$CFLAGS $1"],
[AC_MSG_CHECKING([whether compiler accepts $1])
AC_LANG_PUSH(C)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
[ax_try_cflags_ifelse_res=yes],
[ax_try_cflags_ifelse_res=no])])
AC_LANG_POP(C)
AC_MSG_RESULT([$ax_try_cflags_ifelse_res])
AS_IF([test x"$ax_try_cflags_ifelse_res" = xyes],
[ifelse([$2],,
[AC_SUBST(CFLAGS, ["$CFLAGS $1"])],
[$2])
:]
[$3
:])
])
# SYNOPSIS
#
# AX_TRY_CXXFLAGS_IFELSE(VAR, FLAGS...[, ACTION-IF-TRUE[, ACTION-IF-FALSE]])
#
AC_DEFUN([AX_TRY_CXXFLAGS_IFELSE],
[AX_LET([CXXFLAGS],["$CXXFLAGS $1"],
[AC_MSG_CHECKING([whether compiler accepts $1])
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
[ax_try_cflags_ifelse_res=yes],
[ax_try_cflags_ifelse_res=no])
AC_LANG_POP(C++)])
AC_MSG_RESULT([$ax_try_cflags_ifelse_res])
AS_IF([test x"$ax_try_cflags_ifelse_res" = xyes],
[ifelse([$2],,
[AC_SUBST(CXXFLAGS, ["$CXXFLAGS $1"])],
[$2])
:]
[$3
:])
])