improve finding cuddd.

This commit is contained in:
Vítor Santos Costa 2012-03-01 08:42:19 +00:00
parent 78fb13e651
commit 67cd8b303e
2 changed files with 14632 additions and 3962 deletions

18522
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -257,28 +257,58 @@ AC_ARG_WITH(minisat,
AC_ARG_WITH(cudd,
[ --with-cudd[=DIR] use CUDD package in DIR],
if test "$withval" = yes; then
if test "$prefix" = "NONE"; then
yap_cv_cudd=/usr/local/cudd
yap_cv_cudd="$withval"
if test "$withval" != no; then
oldlibs="$LIBS"
if test "$withval" != "yes"; then
CUDD_CPPFLAGS="-I $yap_cv_cudd/include"
cudd_dir="$withval"
elif test -e /usr/include/cudd; then
CUDD_CPPFLAGS="-I /usr/include/cudd"
cudd_dir="$withval"
elif test "$prefix" != "NONE"; then
CUDD_CPPFLAGS="-I $prefix/include"
cudd_dir="$prefix"
else
yap_cv_cudd=$prefix/cudd;
fi
CUDD_LDFLAGS="-L $yap_cv_cudd/lib -lcudd -lmtr -lst -lutil -lepd"
CUDD_CPPFLAGS="-I $yap_cv_cudd/include"
elif test "$withval" = no; then
yap_cv_cudd=no
elif test "$withval" = /opt/local; then
yap_cv_cudd=$with_cudd
CUDD_LDFLAGS="-L/opt/local/lib/cudd -lcudd"
CUDD_CPPFLAGS="-I /opt/local/include/cudd"
elif test "$withval" = /usr; then
yap_cv_cudd=$with_cudd
CUDD_LDFLAGS="-lcudd -lmtr -lcuddst -lcuddutil -lepd"
CUDD_CPPFLAGS="-I /usr/include/cudd"
else
yap_cv_cudd=$with_cudd
CUDD_LDFLAGS="$yap_cv_cudd/cudd/libcudd.a $yap_cv_cudd/mtr/libmtr.a $yap_cv_cudd/st/libst.a $yap_cv_cudd/util/libutil.a $yap_cv_cudd/epd/libepd.a"
CUDD_CPPFLAGS="-I $yap_cv_cudd/include"
cudd_dir=/usr/local
fi
dnl cudd can be most everywhere
if test -d "$cudd_dir/lib64" -a "$YAP_TARGET" = amd64; then
LIBS="$LIBS -L $cudd_dir/lib64"
elif test -d "$cudd_dir/lib"; then
LIBS="$LIBS -L $cudd_dir/lib"
fi
if test -d "$cudd_dir/util"; then
LIBS="$LIBS -L $cudd_dir/util"
fi
AC_SEARCH_LIBS(util_print_cpu_stats, [cuddutil util])
if test -d "$cudd_dir/st"; then
LIBS="$LIBS -L $cudd_dir/st"
fi
AC_SEARCH_LIBS(st_insert, [cuddst st])
if test -d "$cudd_dir/epd"; then
LIBS="$LIBS -L $cudd_dir/epd"
fi
AC_SEARCH_LIBS(EpdAdd, epd)
if test -d "$cudd_dir/mtr"; then
LIBS="$LIBS -L $cudd_dir/mtr"
fi
AC_SEARCH_LIBS(Mtr_InitTree, [mtr])
if test -d "$cudd_dir/cudd"; then
LIBS="$LIBS -L $cudd_dir/cudd"
fi
AC_SEARCH_LIBS(Cudd_Init, [cudd], [cudd_installed="yes"], [cudd_installed="no"])
if test "$cudd_installed" = yes; then
CUDD_LDFLAGS="$LIBS"
else
cat << EOF
##################################################################
# ERROR: Could not find cudd library. Either I don't have the
# correct path, or CUDD is installed in some strange way
##################################################################
EOF
fi
LIBS="$oldlibs"
fi,
[yap_cv_cudd=no])