build: remove the '--with-slang' configure option
This commit is contained in:
parent
7ebf5f52b8
commit
903942b4f0
195
configure.ac
195
configure.ac
@ -90,13 +90,6 @@ AC_CHECK_HEADERS(libintl.h limits.h pwd.h termios.h sys/param.h)
|
|||||||
|
|
||||||
dnl Checks for options.
|
dnl Checks for options.
|
||||||
|
|
||||||
if test "x$with_slang" = xyes; then
|
|
||||||
if test "x$enable_tiny" != xyes; then
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** --with-slang is supported only together with --enable-tiny])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(browser,
|
AC_ARG_ENABLE(browser,
|
||||||
AS_HELP_STRING([--disable-browser], [Disable the built-in file browser]))
|
AS_HELP_STRING([--disable-browser], [Disable the built-in file browser]))
|
||||||
if test "x$enable_tiny" = xyes; then
|
if test "x$enable_tiny" = xyes; then
|
||||||
@ -354,194 +347,6 @@ AS_HELP_STRING([--enable-altrcname], [Specify an alternate rcfile name (default:
|
|||||||
AC_DEFINE_UNQUOTED(RCFILE_NAME, "$enableval", [Specify an alternate rcfile name (default: .nanorc).]) rcfilename=$enableval
|
AC_DEFINE_UNQUOTED(RCFILE_NAME, "$enableval", [Specify an alternate rcfile name (default: .nanorc).]) rcfilename=$enableval
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to use slang])
|
|
||||||
CURSES_LIB_NAME=""
|
|
||||||
AC_ARG_WITH(slang,
|
|
||||||
AS_HELP_STRING([--with-slang[=DIR]], [Use the slang library instead of curses]),
|
|
||||||
[ case "$with_slang" in
|
|
||||||
no)
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
|
|
||||||
if test x$with_slang != xyes; then
|
|
||||||
# Add additional search path.
|
|
||||||
LDFLAGS="-L$with_slang/lib $LDFLAGS"
|
|
||||||
CPPFLAGS="-I$with_slang/include $CPPFLAGS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$enable_utf8" != xno; then
|
|
||||||
AC_CHECK_HEADER(slcurses.h,
|
|
||||||
AC_MSG_CHECKING([for SLutf8_enable in -lslang])
|
|
||||||
_libs=$LIBS
|
|
||||||
LIBS="$LIBS -lslang"
|
|
||||||
AC_TRY_RUN([
|
|
||||||
#include <slcurses.h>
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
SLutf8_enable(1);
|
|
||||||
return 0;
|
|
||||||
}],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
|
||||||
CURSES_LIB_WIDE=yes
|
|
||||||
if test x$with_slang != xyes; then
|
|
||||||
CURSES_LIB="-L${with_slang}/lib -lslang"
|
|
||||||
else
|
|
||||||
CURSES_LIB="-lslang"
|
|
||||||
fi
|
|
||||||
CURSES_LIB_NAME=slang],
|
|
||||||
[AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
# We might need the term library.
|
|
||||||
for termlib in ncurses curses termcap terminfo termlib; do
|
|
||||||
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
|
|
||||||
test -n "$tcap" && break
|
|
||||||
done
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([for SLutf8_enable in -lslang $tcap])
|
|
||||||
LIBS="$LIBS $tcap"
|
|
||||||
AC_TRY_RUN([
|
|
||||||
#include <slcurses.h>
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
SLutf8_enable(1);
|
|
||||||
return 0;
|
|
||||||
}],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
|
||||||
CURSES_LIB_WIDE=yes
|
|
||||||
if test x$with_slang != xyes; then
|
|
||||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
|
|
||||||
else
|
|
||||||
CURSES_LIB="-lslang $tcap"
|
|
||||||
fi
|
|
||||||
CURSES_LIB_NAME=slang],
|
|
||||||
[AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
# We might need the math library.
|
|
||||||
AC_MSG_CHECKING([for SLutf8_enable in -lslang $tcap -lm])
|
|
||||||
LIBS="$LIBS -lm"
|
|
||||||
AC_TRY_RUN([
|
|
||||||
#include <slcurses.h>
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
SLutf8_enable(1);
|
|
||||||
return 0;
|
|
||||||
}],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
|
||||||
CURSES_LIB_WIDE=yes
|
|
||||||
if test x$with_slang != xyes; then
|
|
||||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
|
|
||||||
else
|
|
||||||
CURSES_LIB="-lslang $tcap -lm"
|
|
||||||
fi
|
|
||||||
CURSES_LIB_NAME=slang],
|
|
||||||
[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_ERROR([
|
|
||||||
*** The header file slcurses.h was not found. This header file
|
|
||||||
*** is required if you wish to use Slang support. Please either
|
|
||||||
*** install a version of Slang that includes the slcurses.h file
|
|
||||||
*** or do not call the configure script with --with-slang.]))
|
|
||||||
fi
|
|
||||||
|
|
||||||
if eval "test x$CURSES_LIB_NAME = x"; then
|
|
||||||
# Reset libs if the above slang tests failed.
|
|
||||||
if test "x$enable_utf8" != xno; then
|
|
||||||
LIBS=$_libs
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CHECK_HEADER(slcurses.h,
|
|
||||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang])
|
|
||||||
_libs=$LIBS
|
|
||||||
LIBS="$LIBS -lslang"
|
|
||||||
AC_TRY_RUN([
|
|
||||||
#include <slcurses.h>
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
SLtt_initialize(NULL);
|
|
||||||
return 0;
|
|
||||||
}],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
|
||||||
if test x$with_slang != xyes; then
|
|
||||||
CURSES_LIB="-L${with_slang}/lib -lslang"
|
|
||||||
else
|
|
||||||
CURSES_LIB="-lslang"
|
|
||||||
fi
|
|
||||||
CURSES_LIB_NAME=slang],
|
|
||||||
[AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
# We might need the term library.
|
|
||||||
for termlib in ncurses curses termcap terminfo termlib; do
|
|
||||||
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
|
|
||||||
test -n "$tcap" && break
|
|
||||||
done
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap])
|
|
||||||
LIBS="$LIBS $tcap"
|
|
||||||
AC_TRY_RUN([
|
|
||||||
#include <slcurses.h>
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
SLtt_initialize(NULL);
|
|
||||||
return 0;
|
|
||||||
}],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
|
||||||
if test x$with_slang != xyes; then
|
|
||||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
|
|
||||||
else
|
|
||||||
CURSES_LIB="-lslang $tcap"
|
|
||||||
fi
|
|
||||||
CURSES_LIB_NAME=slang],
|
|
||||||
[AC_MSG_RESULT(no)
|
|
||||||
|
|
||||||
# We might need the math library.
|
|
||||||
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap -lm])
|
|
||||||
LIBS="$LIBS -lm"
|
|
||||||
AC_TRY_RUN([
|
|
||||||
#include <slcurses.h>
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
SLtt_initialize(NULL);
|
|
||||||
return 0;
|
|
||||||
}],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(USE_SLANG, 1, [Define this to use the slang wrappers for curses instead of native curses.])
|
|
||||||
if test x$with_slang != xyes; then
|
|
||||||
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
|
|
||||||
else
|
|
||||||
CURSES_LIB="-lslang $tcap -lm"
|
|
||||||
fi
|
|
||||||
CURSES_LIB_NAME=slang],
|
|
||||||
[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_ERROR([
|
|
||||||
*** The header file slcurses.h was not found. This header file
|
|
||||||
*** is required if you wish to use Slang support. Please either
|
|
||||||
*** install a version of Slang that includes the slcurses.h file
|
|
||||||
*** or do not call the configure script with --with-slang.]))
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${_libs+set}" = "set"; then
|
|
||||||
LIBS=$_libs
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test x$with_slang != xyes; then
|
|
||||||
LDFLAGS=${_ldflags}
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac], [AC_MSG_RESULT(no)])
|
|
||||||
|
|
||||||
dnl Checks for functions.
|
dnl Checks for functions.
|
||||||
|
|
||||||
if test "x$enable_utf8" != xno; then
|
if test "x$enable_utf8" != xno; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user