check for a UTF-8-supporting version of slang
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2398 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
1fc55a268f
commit
ba1ab86db5
|
@ -328,9 +328,9 @@ CVS code -
|
||||||
as Pico does. (DLR)
|
as Pico does. (DLR)
|
||||||
- configure.ac:
|
- configure.ac:
|
||||||
- Remove specific references to control key shortcuts. (DLR)
|
- Remove specific references to control key shortcuts. (DLR)
|
||||||
- Check for the wide version of ncurses, without which multibyte
|
- Check for the wide versions of ncurses or slang, without which
|
||||||
strings don't seem to be displayed properly, and associated
|
multibyte strings don't seem to be displayed properly, and
|
||||||
wide character functions. (DLR)
|
associated multibyte/wide character functions. (DLR)
|
||||||
- Check for wchar.h, for those systems that need it for the
|
- Check for wchar.h, for those systems that need it for the
|
||||||
wcwidth() prototype. (DLR)
|
wcwidth() prototype. (DLR)
|
||||||
- Remove checks for all include files that we include
|
- Remove checks for all include files that we include
|
||||||
|
|
75
configure.ac
75
configure.ac
|
@ -59,9 +59,7 @@ int main(void)
|
||||||
AC_MSG_RESULT(no),
|
AC_MSG_RESULT(no),
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.]),
|
AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.]),
|
||||||
AC_MSG_RESULT([cross-compiling; assuming no])
|
AC_MSG_RESULT([cross-compiling; assuming no])))
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
dnl options
|
dnl options
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug,
|
||||||
|
@ -207,12 +205,31 @@ AC_ARG_WITH(slang,
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_HEADER(slcurses.h,
|
AC_CHECK_HEADER(slcurses.h,
|
||||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang])
|
AC_MSG_CHECKING([for SLutf8_enable in -lslang])
|
||||||
_libs=$LIBS
|
_libs=$LIBS
|
||||||
LIBS="$LIBS -lslang"
|
LIBS="$LIBS -lslang"
|
||||||
AC_TRY_RUN([
|
AC_TRY_RUN([
|
||||||
#include <slcurses.h>
|
#include <slcurses.h>
|
||||||
int main(void)
|
int main(void)
|
||||||
|
{
|
||||||
|
SLutf8_enable(TRUE);
|
||||||
|
return 0;
|
||||||
|
}],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||||
|
slang_support=yes
|
||||||
|
CURSES_LIB_WIDE=yes
|
||||||
|
if test "$with_slang" != "yes"; then
|
||||||
|
CURSES_LIB="-L${with_slang}/lib -lslang"
|
||||||
|
else
|
||||||
|
CURSES_LIB="-lslang"
|
||||||
|
fi
|
||||||
|
CURSES_LIB_NAME=slang],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_CHECKING([for SLtt_initialize in -lslang])
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <slcurses.h>
|
||||||
|
int main(void)
|
||||||
{
|
{
|
||||||
SLtt_initialize(NULL);
|
SLtt_initialize(NULL);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -227,17 +244,37 @@ int main(void)
|
||||||
fi
|
fi
|
||||||
CURSES_LIB_NAME=slang],
|
CURSES_LIB_NAME=slang],
|
||||||
[AC_MSG_RESULT(no)
|
[AC_MSG_RESULT(no)
|
||||||
|
|
||||||
# We might need the term library
|
# We might need the term library
|
||||||
for termlib in ncurses curses termcap terminfo termlib; do
|
for termlib in ncurses curses termcap terminfo termlib; do
|
||||||
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
|
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
|
||||||
test -n "$tcap" && break
|
test -n "$tcap" && break
|
||||||
done
|
done
|
||||||
|
|
||||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap])
|
AC_MSG_CHECKING([for SLutf8_enable in -lslang $tcap])
|
||||||
LIBS="$LIBS $tcap"
|
LIBS="$LIBS $tcap"
|
||||||
AC_TRY_RUN([
|
AC_TRY_RUN([
|
||||||
#include <slcurses.h>
|
#include <slcurses.h>
|
||||||
int main(void)
|
int main(void)
|
||||||
|
{
|
||||||
|
SLutf8_enable(TRUE);
|
||||||
|
return 0;
|
||||||
|
}],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||||
|
slang_support=yes
|
||||||
|
CURSES_LIB_WIDE=yes
|
||||||
|
if test "$with_slang" != "yes"; then
|
||||||
|
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
|
||||||
|
else
|
||||||
|
CURSES_LIB="-lslang $tcap"
|
||||||
|
fi
|
||||||
|
CURSES_LIB_NAME=slang],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap])
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <slcurses.h>
|
||||||
|
int main(void)
|
||||||
{
|
{
|
||||||
SLtt_initialize(NULL);
|
SLtt_initialize(NULL);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -250,14 +287,33 @@ int main(void)
|
||||||
else
|
else
|
||||||
CURSES_LIB="-lslang $tcap"
|
CURSES_LIB="-lslang $tcap"
|
||||||
fi
|
fi
|
||||||
CURSES_LIB_NAME=slang], [
|
CURSES_LIB_NAME=slang],
|
||||||
AC_MSG_RESULT(no)
|
[AC_MSG_RESULT(no)
|
||||||
|
|
||||||
# We might need the math library
|
# We might need the math library
|
||||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap -lm])
|
AC_MSG_CHECKING([for SLutf8_enable in -lslang $tcap -lm])
|
||||||
LIBS="$LIBS -lm"
|
LIBS="$LIBS -lm"
|
||||||
AC_TRY_RUN([
|
AC_TRY_RUN([
|
||||||
#include <slcurses.h>
|
#include <slcurses.h>
|
||||||
int main(void)
|
int main(void)
|
||||||
|
{
|
||||||
|
SLutf8_enable(TRUE);
|
||||||
|
return 0;
|
||||||
|
}],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||||
|
slang_support=yes
|
||||||
|
CURSES_LIB_WIDE=yes
|
||||||
|
if test "$with_slang" != "yes"; then
|
||||||
|
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
|
||||||
|
else
|
||||||
|
CURSES_LIB="-lslang $tcap -lm"
|
||||||
|
fi
|
||||||
|
CURSES_LIB_NAME=slang],
|
||||||
|
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap -lm])
|
||||||
|
AC_TRY_RUN([
|
||||||
|
#include <slcurses.h>
|
||||||
|
int main(void)
|
||||||
{
|
{
|
||||||
SLtt_initialize(NULL);
|
SLtt_initialize(NULL);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -274,6 +330,9 @@ int main(void)
|
||||||
[AC_MSG_RESULT(no)],
|
[AC_MSG_RESULT(no)],
|
||||||
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
||||||
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
||||||
|
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
||||||
|
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
|
||||||
|
AC_MSG_WARN([*** Can not use slang when cross-compiling])),
|
||||||
AC_MSG_WARN([*** Can not use slang when cross-compiling])),
|
AC_MSG_WARN([*** Can not use slang when cross-compiling])),
|
||||||
AC_MSG_ERROR([
|
AC_MSG_ERROR([
|
||||||
*** The header file slcurses.h was not found. If you wish to use
|
*** The header file slcurses.h was not found. If you wish to use
|
||||||
|
|
Loading…
Reference in New Issue