New (and again revised =) slang test code (Albert Chin-A-Young)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@178 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
13415991e8
commit
e5935973f9
|
@ -14,8 +14,7 @@ CVS code
|
|||
- Patch to handle $DESTDIR (orig by Dan Harnett contributed by
|
||||
Christian Weisgerber)
|
||||
- configure.in:
|
||||
- New slang test code (Albert Chin-A-Young)
|
||||
- Test for libm if --with-slang called.
|
||||
- New (and again revised =) slang test code (Albert Chin-A-Young)
|
||||
|
||||
nano-0.9.15 - 08/03/2000
|
||||
- Changed edit_update call to take arguments TOP, CENTER or BOTTOM.
|
||||
|
|
|
@ -172,9 +172,6 @@
|
|||
/* Define if you have the i library (-li). */
|
||||
#undef HAVE_LIBI
|
||||
|
||||
/* Define if you have the m library (-lm). */
|
||||
#undef HAVE_LIBM
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
|
|
72
configure.in
72
configure.in
|
@ -1,4 +1,4 @@
|
|||
dnl $Id$
|
||||
# $Id$
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(nano.c)
|
||||
AM_INIT_AUTOMAKE(nano, 0.9.15-cvs)
|
||||
|
@ -38,18 +38,12 @@ AC_ARG_WITH(slang,
|
|||
CPPFLAGS="-I$with_slang/include $CPPFLAGS"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(m, sin)
|
||||
if test "$ac_cv_lib_m_sin" != "yes"
|
||||
then
|
||||
AC_MSG_WARN([
|
||||
*** The libm library was not found. Some BSD systems require libm
|
||||
*** in order for slang to work. If nano fails to build, consider
|
||||
*** obtaining libm or running configure without the --with-slang option
|
||||
])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(slcurses.h,
|
||||
AC_CHECK_LIB(slang, SLcurses_newwin, [
|
||||
AC_MSG_CHECKING(for SLtt_initialize in -lslang)
|
||||
_libs=$LIBS
|
||||
LIBS="$LIBS -lslang"
|
||||
AC_TRY_RUN([int main () { SLtt_initialize (); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG)
|
||||
slang_support=yes
|
||||
if test "$with_slang" != "yes"; then
|
||||
|
@ -58,25 +52,40 @@ AC_ARG_WITH(slang,
|
|||
CURSES_LIB="-lslang"
|
||||
fi
|
||||
CURSES_LIB_NAME=slang], [
|
||||
# OpenBSD needs termcap library
|
||||
for termlib in ncurses curses termcap terminfo termlib; do
|
||||
AC_CHECK_LIB(${termlib}, tputs, [tcap="$tcap -l$termlib"])
|
||||
[case "$tcap" in
|
||||
*-l${termlib}*)
|
||||
break
|
||||
;;
|
||||
esac]
|
||||
done
|
||||
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_CHECK_LIB(slang, SLcurses_initscr, [
|
||||
AC_DEFINE(USE_SLANG)
|
||||
slang_support=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], , $tcap)]),
|
||||
AC_MSG_CHECKING(for SLtt_initialize in -lslang $tcap)
|
||||
LIBS="$LIBS $tcap"
|
||||
AC_TRY_RUN([int main () { SLtt_initialize (); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG)
|
||||
slang_support=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)
|
||||
# We might need the math library
|
||||
AC_MSG_CHECKING(for SLtt_initialize in -lslang $tcap -lm)
|
||||
LIBS="$LIBS -lm"
|
||||
AC_TRY_RUN([int main () { SLtt_initialize (); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG)
|
||||
slang_support=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_RESULT(no)])])]),
|
||||
AC_MSG_ERROR([
|
||||
*** The header file slcurses.h was not found. If you wish to use
|
||||
*** slang support this header file is required. Please either
|
||||
|
@ -84,6 +93,8 @@ AC_ARG_WITH(slang,
|
|||
*** do not call the configure script with --with-slang
|
||||
]))
|
||||
|
||||
test "${_libs+set}" = "set" && LIBS=$_libs
|
||||
|
||||
if test "$with_slang" != "yes"; then
|
||||
LDFLAGS=${_ldflags}
|
||||
fi
|
||||
|
@ -160,7 +171,6 @@ then
|
|||
LDFLAGS="$LDFLAGS $glib_libs"
|
||||
fi
|
||||
|
||||
|
||||
dnl i18n stuff - pretty incomplete for now
|
||||
AM_GNU_GETTEXT
|
||||
|
||||
|
|
Loading…
Reference in New Issue