From 510756cdb78acd27a507dd350f67caee8228a968 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 26 Jun 2003 11:53:17 +0000 Subject: [PATCH] Distribute BuDDy. Compile and link with the included version if explicitely requested (--with-included-buddy) or if there is now stuitable version already installed. * buddy/: New directory. Contains a patched version of BuDDy 2.2. * m4/buddy.m4: Make sure the installed BuDDy supports bdd_mergepairs. Honor --with-included-buddy and --without-included-buddy. Define the BUDDY_LDFLAGS and BUDDY_CPPFLAGS output variables, and the WITH_INCLUDED_BUDDY Automake conditional * Makefile.am [WITH_INCLUDED_BUDDY] (MAYBE_SUBDIRS): New variable. (SUBDIRS): Prepend $(MAYBE_SUBDIRS). * src/Makefile.am (libspot_LDFLAGS): New variable. * src/tgba/Makefile.am (AM_CPPFLAGS): Add $(BUDDY_CPPFLAGS). * src/tgbaalgos/Makefile.am (AM_CPPFLAGS): Likewise. * src/tgbatest/Makefile.am (AM_CPPFLAGS): Likewise. --- ChangeLog | 18 ++++++++++++++++++ Makefile.am | 7 ++++++- m4/buddy.m4 | 31 ++++++++++++++++++++++++++++--- src/Makefile.am | 1 + src/tgba/Makefile.am | 2 +- src/tgbaalgos/Makefile.am | 2 +- src/tgbatest/Makefile.am | 2 +- 7 files changed, 56 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a295a7927..3cc4439d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2003-06-26 Alexandre Duret-Lutz + + Distribute BuDDy. Compile and link with the included version if + explicitely requested (--with-included-buddy) or if there is + now stuitable version already installed. + + * buddy/: New directory. Contains a patched version of BuDDy 2.2. + * m4/buddy.m4: Make sure the installed BuDDy supports bdd_mergepairs. + Honor --with-included-buddy and --without-included-buddy. Define + the BUDDY_LDFLAGS and BUDDY_CPPFLAGS output variables, and the + WITH_INCLUDED_BUDDY Automake conditional + * Makefile.am [WITH_INCLUDED_BUDDY] (MAYBE_SUBDIRS): New variable. + (SUBDIRS): Prepend $(MAYBE_SUBDIRS). + * src/Makefile.am (libspot_LDFLAGS): New variable. + * src/tgba/Makefile.am (AM_CPPFLAGS): Add $(BUDDY_CPPFLAGS). + * src/tgbaalgos/Makefile.am (AM_CPPFLAGS): Likewise. + * src/tgbatest/Makefile.am (AM_CPPFLAGS): Likewise. + 2003-06-25 Alexandre Duret-Lutz * src/tgba/succiterconcrete.cc (tgba_succ_iterator_concrete::next): diff --git a/Makefile.am b/Makefile.am index 20f839b67..0985aceb6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,8 @@ -SUBDIRS = doc src wrap +if WITH_INCLUDED_BUDDY + MAYBE_BUDDY = buddy +endif WITH_INCLUDED_BUDDY + +SUBDIRS = $(MAYBE_BUDDY) doc src wrap + ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = m4/gccwarn.m4 m4/pypath.m4 m4/buddy.m4 diff --git a/m4/buddy.m4 b/m4/buddy.m4 index 25fd401b4..00dbd4604 100644 --- a/m4/buddy.m4 +++ b/m4/buddy.m4 @@ -1,4 +1,29 @@ AC_DEFUN([AX_CHECK_BUDDY], [ - AC_CHECK_LIB([bdd], [bdd_init],, - [AC_MSG_ERROR([Could not link with BuDDy. Please install BuDDy first - or set CPPFLAGS/LDFLAGS appropriately.])])]) + AC_ARG_WITH([included-buddy], + [AC_HELP_STRING([--with-included-buddy], + [use the BuDDy library inclued here])]) + AC_CHECK_LIB([bdd], [bdd_mergepairs], + [need_included_buddy=no], + [need_included_buddy=yes]) + + if test "$need_included_buddy" = yes; then + if test "$with_included_buddy" = no; then + AC_MSG_ERROR([Could not link with BuDDy. Please install BuDDy first, + set CPPFLAGS/LDFLAGS appropriately, or configure with + --with-included-buddy]) + else + with_included_buddy=yes + fi + fi + + if test "$with_included_buddy" = yes; then + AC_CONFIG_SUBDIRS([buddy]) + BUDDY_LDFLAGS='$(top_srcdir)/buddy/src/bdd.la' + BUDDY_CPPFLAGS='-I$(top_srcdir)/buddy/src' + else + BUDDY_LDFLAGS='-lbdd' + fi + AM_CONDITIONAL([WITH_INCLUDED_BUDDY], [test "$with_included_buddy" = yes]) + AC_SUBST([BUDDY_LDFLAGS]) + AC_SUBST([BUDDY_CPPFLAGS]) +]) diff --git a/src/Makefile.am b/src/Makefile.am index 002395e44..7fd5d8473 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,6 +7,7 @@ SUBDIRS = misc ltlenv ltlast ltlvisit ltlparse tgba tgbaalgos tgbaparse . \ lib_LTLIBRARIES = libspot.la libspot_la_SOURCES = +libspot_la_LDFLAGS = $(BUDDY_LDFLAGS) libspot_la_LIBADD = \ ltlenv/libltlenv.la \ ltlparse/libltlparse.la \ diff --git a/src/tgba/Makefile.am b/src/tgba/Makefile.am index 531a75437..1f968410b 100644 --- a/src/tgba/Makefile.am +++ b/src/tgba/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(srcdir)/.. +AM_CPPFLAGS = -I$(srcdir)/.. $(BUDDY_CPPFLAGS) AM_CXXFLAGS = $(WARNING_CXXFLAGS) noinst_LTLIBRARIES = libtgba.la diff --git a/src/tgbaalgos/Makefile.am b/src/tgbaalgos/Makefile.am index 72a219153..95d9f612d 100644 --- a/src/tgbaalgos/Makefile.am +++ b/src/tgbaalgos/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(srcdir)/.. +AM_CPPFLAGS = -I$(srcdir)/.. $(BUDDY_CPPFLAGS) AM_CXXFLAGS = $(WARNING_CXXFLAGS) noinst_LTLIBRARIES = libtgbaalgos.la diff --git a/src/tgbatest/Makefile.am b/src/tgbatest/Makefile.am index 0e4fe37b3..cf55e370c 100644 --- a/src/tgbatest/Makefile.am +++ b/src/tgbatest/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I$(srcdir)/.. +AM_CPPFLAGS = -I$(srcdir)/.. $(BUDDY_CPPFLAGS) LDADD = ../libspot.la check_SCRIPTS = defs