fix cudd finder.

This commit is contained in:
Vitor Santos Costa 2012-06-07 10:30:08 -05:00
parent 71bd1d9d1f
commit dba0a81b1c
2 changed files with 74 additions and 34 deletions

43
configure vendored
View File

@ -6289,13 +6289,49 @@ fi
if test "$yap_cv_readline" != "no" if test "$yap_cv_readline" != "no"
then then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lncurses" >&5
$as_echo_n "checking for main in -lncurses... " >&6; }
if ${ac_cv_lib_ncurses_main+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lncurses $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_ncurses_main=yes
else
ac_cv_lib_ncurses_main=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_main" >&5
$as_echo "$ac_cv_lib_ncurses_main" >&6; }
if test "x$ac_cv_lib_ncurses_main" = xyes; then :
LIBS="$LIBS -lncurses"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lreadline" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lreadline" >&5
$as_echo_n "checking for main in -lreadline... " >&6; } $as_echo_n "checking for main in -lreadline... " >&6; }
if ${ac_cv_lib_readline_main+:} false; then : if ${ac_cv_lib_readline_main+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
ac_check_lib_save_LIBS=$LIBS ac_check_lib_save_LIBS=$LIBS
LIBS="-lreadline -lncurses $LIBS" LIBS="-lreadline $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
@ -6324,7 +6360,7 @@ if test "x$ac_cv_lib_readline_main" = xyes; then :
$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
LIBS="$LIBS -lreadline -lncurses" LIBS="$LIBS -lreadline"
else else
if test "x$with_readline" != xcheck; then if test "x$with_readline" != xcheck; then
@ -6634,7 +6670,7 @@ fi
if test "$yap_cv_cudd" != no; then if test "$yap_cv_cudd" != no; then
oldlibs="$LIBS" oldlibs="$LIBS"
if test "$withval" != "yes"; then if test "$withval" = "yes"; then
if test -d "$yap_cv_cudd"/include/cudd; then if test -d "$yap_cv_cudd"/include/cudd; then
CUDD_CPPFLAGS="-I $yap_cv_cudd/include/cudd" CUDD_CPPFLAGS="-I $yap_cv_cudd/include/cudd"
else else
@ -6657,6 +6693,7 @@ if test "$yap_cv_cudd" != no; then
fi fi
cudd_dir=/usr/local cudd_dir=/usr/local
fi fi
echo $cudd_dir here
if test -d "$cudd_dir/lib64/cudd" -a "$YAP_TARGET" = amd64; then if test -d "$cudd_dir/lib64/cudd" -a "$YAP_TARGET" = amd64; then
LIBS="$LIBS -L $cudd_dir/lib64/cudd" LIBS="$LIBS -L $cudd_dir/lib64/cudd"
elif test -d "$cudd_dir/lib64" -a "$YAP_TARGET" = amd64; then elif test -d "$cudd_dir/lib64" -a "$YAP_TARGET" = amd64; then

View File

@ -724,15 +724,18 @@ fi
if test "$yap_cv_readline" != "no" if test "$yap_cv_readline" != "no"
then then
AC_CHECK_LIB([ncurses], [main],[
LIBS="$LIBS -lncurses"
])
AC_CHECK_LIB([readline], [main],[ AC_CHECK_LIB([readline], [main],[
AC_DEFINE([HAVE_LIBREADLINE], [1],[Define if you have libreadline]) AC_DEFINE([HAVE_LIBREADLINE], [1],[Define if you have libreadline])
LIBS="$LIBS -lreadline -lncurses" LIBS="$LIBS -lreadline"
], ],
[if test "x$with_readline" != xcheck; then [if test "x$with_readline" != xcheck; then
AC_MSG_FAILURE( AC_MSG_FAILURE(
[--with-readline was given, but test for readline failed]) [--with-readline was given, but test for readline failed])
fi fi
], -lncurses) ])
fi fi
if test "$yap_cv_gmp" != "no" if test "$yap_cv_gmp" != "no"
then then
@ -845,7 +848,7 @@ fi
if test "$yap_cv_cudd" != no; then if test "$yap_cv_cudd" != no; then
oldlibs="$LIBS" oldlibs="$LIBS"
if test "$withval" != "yes"; then if test "$withval" = "yes"; then
if test -d "$yap_cv_cudd"/include/cudd; then if test -d "$yap_cv_cudd"/include/cudd; then
CUDD_CPPFLAGS="-I $yap_cv_cudd/include/cudd" CUDD_CPPFLAGS="-I $yap_cv_cudd/include/cudd"
else else