]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/configure.in
ncurses 5.2
[ncurses.git] / test / configure.in
index d963022c0bfd9fa3fcafb715d3b0ea910b3e1831..d61d477d691c71934f84b68e480dbd06fe074a69 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 1998,1999 Free Software Foundation, Inc.                   *
+dnl Copyright (c) 1998,1999,2000 Free Software Foundation, Inc.              *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
 dnl copy of this software and associated documentation files (the            *
@@ -26,9 +26,9 @@ dnl sale, use or other dealings in this Software without prior written       *
 dnl authorization.                                                           *
 dnl***************************************************************************
 dnl
-dnl Author: Thomas E. Dickey <dickey@clark.net> 1996,1997,1998
+dnl Author: Thomas E. Dickey 1996,1997,1998,2000
 dnl
-dnl $Id: configure.in,v 1.27 1999/10/23 20:01:42 tom Exp $
+dnl $Id: configure.in,v 1.31 2000/10/15 18:46:17 tom Exp $
 dnl This is a simple configuration-script for the ncurses test programs that
 dnl allows the test-directory to be separately configured against a reference
 dnl system (i.e., sysvr4 curses)
@@ -36,8 +36,9 @@ dnl
 dnl If you're configuring ncurses, you shouldn't need to use this script.
 dnl It's only for testing purposes.
 dnl
-dnl dickey@clark.net (Thomas Dickey)
-AC_PREREQ(2.12)
+dnl See http://dickey.his.com/autoconf/ for additional information.
+dnl ---------------------------------------------------------------------------
+AC_PREREQ(2.13.20000819)
 AC_INIT(ncurses.c)
 AC_CONFIG_HEADER(ncurses_cfg.h:ncurses_tst.hin)
 
@@ -56,6 +57,7 @@ LD="ld"                                       AC_SUBST(LD)
 LDFLAGS_SHARED=""                      AC_SUBST(LDFLAGS_SHARED)
 LD_MODEL=""                            AC_SUBST(LD_MODEL)
 LD_SHARED_OPTS=""                      AC_SUBST(LD_SHARED_OPTS)
+LIBTOOL=""                             AC_SUBST(LIBTOOL)
 LIB_NAME=curses                                AC_SUBST(LIB_NAME)
 LIB_PREFIX="-l"                                AC_SUBST(LIB_PREFIX)
 LINK_TESTS=""                          AC_SUBST(LINK_TESTS)
@@ -86,6 +88,7 @@ AC_ARG_WITH(ncurses,
                if test -f $p/include/ncurses/curses.h
                then
                        CPPFLAGS="$CPPFLAGS -I$p/include/ncurses"
+                       test $p != /usr && CPPFLAGS="$CPPFLAGS -I$p/include"
                        test $p != /usr && LIBS="-L$p/lib $LIBS"
                        break
                elif test $p != /usr
@@ -129,14 +132,32 @@ unistd.h \
 )
 
 AC_CHECK_FUNCS( \
-curses_version \
 gettimeofday \
 napms \
 resizeterm \
 strdup \
+use_default_colors \
 vsscanf \
+wresize \
 )
 
+dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS.
+dnl It's a character string "SVR4", not documented.
+AC_CACHE_CHECK(for function curses_version, cf_cv_func_curses_version,[
+AC_TRY_RUN([
+#include <curses.h>
+int main()
+{
+       char temp[1024];
+       sprintf(temp, "%s\n", curses_version());
+       exit(0);
+}]
+,[cf_cv_func_curses_version=yes]
+,[cf_cv_func_curses_version=no]
+,[cf_cv_func_curses_version=unknown])
+rm -f core])
+test "$cf_cv_func_curses_version" = yes && AC_DEFINE(HAVE_CURSES_VERSION)
+
 dnl ---------------------------------------------------------------------------
 dnl [CF_SYS_TIME_SELECT]
 AC_MSG_CHECKING(if sys/time.h conflicts with sys/select.h)