diff --git a/configure.ac b/configure.ac index 62b9365..d366fa2 100644 --- a/configure.ac +++ b/configure.ac @@ -49,15 +49,14 @@ if test "${enable_conio}" != "no"; then fi if test "${enable_slang}" != "no"; then - AC_CHECK_HEADERS(slang.h, + AC_CHECK_HEADERS(slang.h slang/slang.h, + ac_cv_my_have_slang="no" [AC_CHECK_LIB(slang, SLkp_init, [ac_cv_my_have_slang="yes" AC_DEFINE(USE_SLANG, 1, Define to activate the slang backend driver) CPPFLAGS="${CPPFLAGS} -DOPTIMISE_SLANG_PALETTE=1" CACA_LIBS="${CACA_LIBS} -lslang" - CACA_DRIVERS="${CACA_DRIVERS} slang"], - [ac_cv_my_have_slang="no"])], - [ac_cv_my_have_slang="no"]) + CACA_DRIVERS="${CACA_DRIVERS} slang"])]) if test "${ac_cv_my_have_slang}" = "no" -a "${enable_slang}" = "yes"; then AC_MSG_ERROR([cannot find slang development files]) fi diff --git a/src/caca.c b/src/caca.c index 94f6666..77ea9be 100644 --- a/src/caca.c +++ b/src/caca.c @@ -32,7 +32,11 @@ #include "config.h" #if defined(USE_SLANG) -# include +# if defined(HAVE_SLANG_SLANG_H) +# include +# else +# include +# endif #endif #if defined(USE_NCURSES) # include diff --git a/src/graphics.c b/src/graphics.c index e2b798a..6f1f47d 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -30,7 +30,11 @@ #include "config.h" #if defined(USE_SLANG) -# include +# if defined(HAVE_SLANG_SLANG_H) +# include +# else +# include +# endif #endif #if defined(USE_NCURSES) # include diff --git a/src/io.c b/src/io.c index c1076c5..e189c8a 100644 --- a/src/io.c +++ b/src/io.c @@ -30,7 +30,11 @@ #include "config.h" #if defined(USE_SLANG) -# include +# if defined(HAVE_SLANG_SLANG_H) +# include +# else +# include +# endif #endif #if defined(USE_NCURSES) # include