integrate autoconf for cplint with remaining code.t

This commit is contained in:
Vitor Santos Costa 2014-10-22 10:11:20 +01:00
parent 57f928c621
commit b2caf2da77
5 changed files with 102 additions and 84 deletions

102
configure vendored
View File

@ -884,8 +884,6 @@ enable_dynamic_loading
enable_static_compilation
enable_use_malloc
enable_condor
enable_chr
enable_clpqr
enable_april
enable_dlcompat
enable_horus
@ -1569,8 +1567,6 @@ Optional Features:
--enable-static-compilation compile YAP statically
--enable-use-malloc use malloc to allocate memory
--enable-condor allow YAP to be used from condor
--enable-chr install chr library
--enable-clpqr install clpqr library
--enable-april compile Yap to support April ILP system
--enable-dlcompat use dlcompat library for dynamic loading on Mac OS X
--enable-horus enable CLPBN HORUS library.
@ -1582,7 +1578,7 @@ Optional Features:
--enable-statistic-predicates support statistic predicates
--enable-mimecharset=charset Default MIME charset to set on new messages
--enable-bddlib dynamic bdd library
--enable-cplint=DIR enable the cplint library using the CUDD library in DIR/lib
--enable-cplint=DIR enable the cplint library using the CUDD library in DIR/lib
--enable-gecode install gecode library
Optional Packages:
@ -4532,21 +4528,6 @@ else
use_condor=no
fi
# Check whether --enable-chr was given.
if test "${enable_chr+set}" = set; then :
enableval=$enable_chr; use_chr="$enableval"
else
use_chr=yes
fi
# Check whether --enable-clpqr was given.
if test "${enable_clpqr+set}" = set; then :
enableval=$enable_clpqr; use_clpqr="$enableval"
else
use_clpqr=yes
fi
# Check whether --enable-april was given.
if test "${enable_april+set}" = set; then :
enableval=$enable_april; use_april="$enableval"
@ -12314,7 +12295,7 @@ if test "$PKG_ODBC" != ""; then
# Check whether --with-odbc was given.
if test "${with_odbc+set}" = set; then :
withval=$with_odbc; case $withval in
no|yes) echo 'Specify dir for XPM please';
no|yes) echo 'Specify dir for ODBC please';
exit 1 ;;
*) ODBC_DIR=${withval}
esac
@ -13332,6 +13313,8 @@ fi
found_cplint=false
# Check whether --enable-cplint was given.
if test "${enable_cplint+set}" = set; then :
enableval=$enable_cplint; yap_cv_cplint=$enableval
@ -13340,31 +13323,52 @@ else
fi
if test ! "$yap_cv_cplint" = "no"
then
if test ! "$yap_cv_cplint" = "yes"
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
fi
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
then
CPLINT_SHLIB_LD="gcc -shared ../../yap.dll"
SHLIB_SUFFIX="dll"
else
CPLINT_SHLIB_LD=$SHLIB_LD
SHLIB_SUFFIX="so"
fi
PKG_CPLINT="packages/cplint packages/cplint/approx/simplecuddLPADs"
if test x"$yap_cv_cplint" = "xno"
then
PKG_CPLINT=""
else
PKG_CPLINT=""
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_LIBS="-lcudd -lmtr -lst -lepd -lutil -lm $LIBS"
fi
if test "$target_os" = "cygwin" -o "$target_os" = "mingw32"
then
CPLINT_SHLIB_LD="gcc -shared ../../yap.dll"
else
CPLINT_SHLIB_LD="$SHLIB_LD"
fi
PKG_CPLINT="packages/cplint/approx/simplecuddLPADs packages/cplint"
else
PKG_CPLINT=""
fi
fi
@ -13900,7 +13904,7 @@ else
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
/* #line 13903 "configure" */
/* #line 13907 "configure" */
public class Test {
}
EOF
@ -14076,7 +14080,7 @@ EOF
if uudecode$EXEEXT Test.uue; then
ac_cv_prog_uudecode_base64=yes
else
echo "configure: 14079: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: 14083: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
echo "configure: failed file was:" >&5
cat Test.uue >&5
ac_cv_prog_uudecode_base64=no
@ -14207,7 +14211,7 @@ else
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
/* #line 14210 "configure" */
/* #line 14214 "configure" */
public class Test {
}
EOF
@ -14242,7 +14246,7 @@ JAVA_TEST=Test.java
CLASS_TEST=Test.class
TEST=Test
cat << \EOF > $JAVA_TEST
/* [#]line 14245 "configure" */
/* [#]line 14249 "configure" */
public class Test {
public static void main (String args[]) {
System.exit (0);

View File

@ -169,13 +169,6 @@ AC_ARG_ENABLE(use-malloc,
AC_ARG_ENABLE(condor,
[ --enable-condor allow YAP to be used from condor ],
use_condor="$enableval", use_condor=no)
AC_ARG_ENABLE(chr,
[ --enable-chr install chr library ],
use_chr="$enableval", use_chr=yes)
AC_ARG_ENABLE(clpqr,
[ --enable-clpqr install clpqr library ],
use_clpqr="$enableval", use_clpqr=yes)
AC_ARG_ENABLE(april,
[ --enable-april compile Yap to support April ILP system],
use_april="$enableval", use_april=no)

View File

@ -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

View File

@ -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)

View File

@ -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]).