integrate autoconf for cplint with remaining code.t
This commit is contained in:
@@ -34,7 +34,7 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
||||
SHELL=/bin/sh
|
||||
RANLIB=@RANLIB@
|
||||
srcdir=@srcdir@
|
||||
SHLIB_SUFFIX=@SHLIB_SUFFIX@
|
||||
SO=@SO@
|
||||
CPLINT_CFLAGS=@CPLINT_CFLAGS@
|
||||
CPLINT_LDFLAGS=@CPLINT_LDFLAGS@
|
||||
CPLINT_LIBS=@CPLINT_LIBS@
|
||||
@@ -42,7 +42,7 @@ CPLINT_LIBS=@CPLINT_LIBS@
|
||||
CWD=$(PWD)
|
||||
#
|
||||
OBJS=cplint_yap.o cplint_Prob.o bddem.o
|
||||
SOBJS=cplint.@SHLIB_SUFFIX@ bddem.@SHLIB_SUFFIX@
|
||||
SOBJS=cplint.@SO@ bddem.@SO@
|
||||
|
||||
|
||||
|
||||
@@ -150,7 +150,6 @@ CPLINT_LEARNING_PROGRAMS=\
|
||||
$(CPLINT_SRCDIR)/slipcase \
|
||||
$(CPLINT_SRCDIR)/slipcover \
|
||||
$(CPLINT_SRCDIR)/lemur
|
||||
|
||||
|
||||
|
||||
all: $(SOBJS)
|
||||
@@ -165,11 +164,11 @@ bddem.o : $(srcdir)/slipcase/bddem.c
|
||||
$(CC) -c $(CFLAGS) $(CPLINT_CFLAGS) $(srcdir)/slipcase/bddem.c -o bddem.o
|
||||
|
||||
|
||||
@DO_SECOND_LD@cplint.@SHLIB_SUFFIX@: cplint_yap.o cplint_Prob.o
|
||||
@DO_SECOND_LD@ @CPLINT_SHLIB_LD@ -o cplint.@SHLIB_SUFFIX@ $(CPLINT_LDFLAGS) cplint_yap.o cplint_Prob.o $(CPLINT_LIBS) @EXTRA_LIBS_FOR_DLLS@
|
||||
@DO_SECOND_LD@cplint.@SO@: cplint_yap.o cplint_Prob.o
|
||||
@DO_SECOND_LD@ @CPLINT_SHLIB_LD@ -o cplint.@SO@ $(CPLINT_LDFLAGS) cplint_yap.o cplint_Prob.o $(CPLINT_LIBS) @EXTRA_LIBS_FOR_DLLS@
|
||||
|
||||
@DO_SECOND_LD@bddem.@SHLIB_SUFFIX@: bddem.o
|
||||
@DO_SECOND_LD@ @CPLINT_SHLIB_LD@ -o bddem.@SHLIB_SUFFIX@ $(CPLINT_LDFLAGS) bddem.o $(CPLINT_LIBS) @EXTRA_LIBS_FOR_DLLS@
|
||||
@DO_SECOND_LD@bddem.@SO@: bddem.o
|
||||
@DO_SECOND_LD@ @CPLINT_SHLIB_LD@ -o bddem.@SO@ $(CPLINT_LDFLAGS) bddem.o $(CPLINT_LIBS) @EXTRA_LIBS_FOR_DLLS@
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK
|
||||
|
||||
@@ -1,40 +1,62 @@
|
||||
dnl CPLINT
|
||||
dnl
|
||||
dnl CPLINT_LIBS=
|
||||
dnl CPLINT_LIBS=
|
||||
dnl CPLINT_LDFLAGS=
|
||||
dnl CPLINT_SHLIB_LD=
|
||||
dnl
|
||||
|
||||
found_cplint=false
|
||||
|
||||
AC_ARG_ENABLE(cplint,
|
||||
[ --enable-cplint[=DIR] enable the cplint library using the CUDD library in DIR/lib],
|
||||
yap_cv_cplint=$enableval, yap_cv_cplint=no)
|
||||
[ --enable-cplint[=DIR] enable the cplint library using the CUDD library in DIR/lib],
|
||||
yap_cv_cplint=$enableval, yap_cv_cplint=no)
|
||||
|
||||
|
||||
if test ! "$yap_cv_cplint" = "no"
|
||||
then
|
||||
if test ! "$yap_cv_cplint" = "yes"
|
||||
if test x"$yap_cv_cplint" = "xno"
|
||||
then
|
||||
PKG_CPLINT=""
|
||||
else
|
||||
if test x"$yap_cv_cplint" != "xyes"
|
||||
then
|
||||
CPLINT_LDFLAGS+=" -L${yap_cv_cplint}/cudd -L${yap_cv_cplint}/mtr -L${yap_cv_cplint}/st -L${yap_cv_cplint}/util -L${yap_cv_cplint}/epd "
|
||||
#typical of user-compiled cudd fi
|
||||
CPLINT_CFLAGS+=" -I${yap_cv_cplint}/include"
|
||||
CPLINT_LIBS="$LIBS"
|
||||
found_cplint=true
|
||||
fi
|
||||
# cudd has been probably just tested, so why try again?
|
||||
# cudd is available on fedora, and maybe other linux distributions
|
||||
if test -d "/usr/include/cudd" -a x"$CPLINT_CFLAGS" = x
|
||||
then
|
||||
CPLINT_CFLAGS=" -I/usr/include/cudd"
|
||||
CPLINT_LIBS="-lcudd -lmtr -lcuddst -lepd -lcuddutil -lm $LIBS"
|
||||
found_cplint=true
|
||||
elif test -d "/usr/local/include/cudd" -a x"$CPLINT_CFLAGS" = x
|
||||
then
|
||||
found_cplint=true
|
||||
CPLINT_CFLAGS=" -I/usr/local/include/cudd"
|
||||
CPLINT_LIBS+=" -L/usr/local/lib"
|
||||
fi
|
||||
if test "$found_cplint" = true
|
||||
then
|
||||
if test x"$CPLINT_LIBS" = x
|
||||
then
|
||||
CPLINT_LDFLAGS+=" -L${yap_cv_cplint}/cudd -L${yap_cv_cplint}/mtr -L${yap_cv_cplint}/st -L${yap_cv_cplint}/util -L${yap_cv_cplint}/epd "
|
||||
CPLINT_CFLAGS+=" -I${yap_cv_cplint}/include"
|
||||
CPLINT_LIBS="-lcudd -lmtr -lst -lepd -lutil -lm "$CPLINT_LIBS
|
||||
CPLINT_LIBS="-lcudd -lmtr -lst -lepd -lutil -lm $LIBS"
|
||||
fi
|
||||
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
|
||||
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
|
||||
then
|
||||
CPLINT_SHLIB_LD="gcc -shared ../../yap.dll"
|
||||
SHLIB_SUFFIX="dll"
|
||||
CPLINT_SHLIB_LD="gcc -shared ../../yap.dll"
|
||||
else
|
||||
CPLINT_SHLIB_LD=$SHLIB_LD
|
||||
SHLIB_SUFFIX="so"
|
||||
CPLINT_SHLIB_LD="$SHLIB_LD"
|
||||
fi
|
||||
PKG_CPLINT="packages/cplint packages/cplint/approx/simplecuddLPADs"
|
||||
PKG_CPLINT="packages/cplint/approx/simplecuddLPADs packages/cplint"
|
||||
AC_SUBST(CPLINT_LIBS)
|
||||
AC_SUBST(CPLINT_CFLAGS)
|
||||
AC_SUBST(CPLINT_LDFLAGS)
|
||||
AC_SUBST(CPLINT_SHLIB_LD)
|
||||
AC_SUBST(SHLIB_SUFFIX)
|
||||
else
|
||||
PKG_CPLINT=""
|
||||
else
|
||||
PKG_CPLINT=""
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(PKG_CPLINT)
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
:- set_prolog_flag(unknown,error).
|
||||
:- set_prolog_flag(profiling,on).
|
||||
:- set_prolog_flag(debug,on).
|
||||
:- set_prolog_flag(discontiguous_warnings,on).
|
||||
:- set_prolog_flag(single_var_warnings,on).
|
||||
:- set_prolog_flag(debug,true).
|
||||
:- set_prolog_flag(discontiguous_warnings,true).
|
||||
:- set_prolog_flag(single_var_warnings,true).
|
||||
:-source.
|
||||
%:- module(lpadclpbn, [p/1,
|
||||
% s/2,sc/3,s/6,sc/7,set/2,setting/2]).
|
||||
|
||||
Reference in New Issue
Block a user