giftcurs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[giFTcurs-commits] giFTcurs acinclude.m4 configure.in


From: Göran Weinholt
Subject: [giFTcurs-commits] giFTcurs acinclude.m4 configure.in
Date: Tue, 04 Nov 2003 18:38:17 -0500

CVSROOT:        /cvsroot/giftcurs
Module name:    giFTcurs
Branch:         
Changes by:     Göran Weinholt <address@hidden> 03/11/04 18:38:17

Modified files:
        .              : acinclude.m4 configure.in 

Log message:
        Move WIDE_NCURSES into config.h and define the xopen stuff there. Add a 
HAS_WIDE_CURSES automake conditional.

Patches:
Index: giFTcurs/acinclude.m4
diff -u giFTcurs/acinclude.m4:1.21 giFTcurs/acinclude.m4:1.22
--- giFTcurs/acinclude.m4:1.21  Mon Oct 13 15:50:49 2003
+++ giFTcurs/acinclude.m4       Tue Nov  4 18:38:17 2003
@@ -7,6 +7,8 @@
 dnl   trimmed the explanation below.
 dnl . Removed SCO references.
 dnl . Added a --with-ncursesw flag.
+dnl . Added the has_wide_curses variable.
+dnl . Removed ncurses version checking.
 dnl
 dnl What it does:
 dnl =============
@@ -62,6 +64,7 @@
        search_ncurses=true
        screen_manager=""
        has_curses=false
+       has_wide_curses=false
 
        CFLAGS=${CFLAGS--O}
 
@@ -112,11 +115,11 @@
        AC_ARG_WITH(ncursesw,
          [[  --with-ncursesw[=dir]   compile with ncursesw/locate base dir]],
          if test x$withval = xyes; then
-               AC_NCURSES(/usr/include/ncursesw, curses.h, -lncursesw, 
-I/usr/include/ncursesw -DRENAMED_NCURSES -DWIDE_NCURSES, renamed ncursesw on 
/usr/include/ncursesw)
+               AC_NCURSES(/usr/include/ncursesw, curses.h, -lncursesw, 
-I/usr/include/ncursesw -DRENAMED_NCURSES, renamed ncursesw on 
/usr/include/ncursesw)
            search_ncurses=false
          elif test x$withval != xyes ; then
                CURSES_LIBS="$LIBS -L$withval/lib -lncursesw"
-               CURSES_INCLUDEDIR="-I$withval/include -DWIDE_NCURSES"
+               CURSES_INCLUDEDIR="-I$withval/include"
                if test -f $withval/include/curses.h
                then
                        CURSES_INCLUDEDIR="$CURSES_INCLUDEDIR -DRENAMED_NCURSES"
@@ -134,11 +137,21 @@
                AC_SEARCH_NCURSES()
        fi
 
-       dnl Check for use_default_colors and resizeterm
+       dnl Check for some functions
        SAVED_LIBS="$LIBS"
        LIBS="$CURSES_LIBS"
-       AC_CHECK_FUNCS(use_default_colors resizeterm resize_term)
+       AC_CHECK_FUNCS(use_default_colors resizeterm resize_term add_wch)
        LIBS="$SAVED_LIBS"
+
+       if test $ac_cv_func_add_wch = yes; then
+               has_wide_curses=true
+               AH_VERBATIM([_XOPEN_SOURCE_EXTENDED],
+               [/* Enable X/Open Unix extensions */
+#ifndef _XOPEN_SOURCE_EXTENDED
+# define _XOPEN_SOURCE_EXTENDED
+#endif])
+               AC_DEFINE(WIDE_NCURSES, 1, [curses routines to work with wide 
chars are available])
+       fi
 ])
 
 
@@ -178,7 +191,7 @@
 ])
 
 dnl
-dnl Parameters: directory filename cureses_LIBS curses_INCLUDEDIR nicename
+dnl Parameters: directory filename curses_LIBS curses_INCLUDEDIR nicename
 dnl
 AC_DEFUN([AC_NCURSES], [
     if $search_ncurses
@@ -240,59 +253,19 @@
     dnl The flags USE_SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES
     dnl should be replaced by a more fine grained selection routine
     dnl
-    if $search_ncurses
-    then
-       if test -f /usr/5include/curses.h
-       then
-           AC_USE_SUNOS_CURSES
-        fi
-    else
-       # check for ncurses version, to properly ifdef mouse-fix
-       AC_MSG_CHECKING(for ncurses version)
-       ncurses_version=unknown
-cat > conftest.$ac_ext <<EOF
-[#]line __oline__ "configure"
-#include "confdefs.h"
-#ifdef RENAMED_NCURSES
-#include <curses.h>
-#else
-#include <ncurses.h>
-#endif
-#undef VERSION
-VERSION:NCURSES_VERSION
-EOF
-        if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
-  egrep "VERSION:" >conftest.out 2>&1; then
-changequote(,)dnl
-            ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 
's/".*//'`
-changequote([,])dnl
+       if $search_ncurses; then
+               if test -f /usr/5include/curses.h
+               then
+                       AC_USE_SUNOS_CURSES
+               fi
        fi
-       rm -rf conftest*
-        AC_MSG_RESULT($ncurses_version)
-       case "$ncurses_version" in
-changequote(,)dnl
-       4.[01])
-changequote([,])dnl
-            AC_DEFINE(NCURSES_970530,2,[Set to reflect version of ncurses
-  0 = version 1.
-  1 = version 1.9.9g 
-  2 = version 4.0/4.1])
-            ;;
-       1.9.9g)
-            AC_DEFINE(NCURSES_970530,1)
-            ;;
-       1*)
-            AC_DEFINE(NCURSES_970530,0)
-            ;;
-       esac
-    fi
 ])
 
 dnl Check if gcc accepts the -no-cpp-precomp flag. (Mac OS X thingee)
 dnl AC_NO_CPP_PRECOMP
 AC_DEFUN(AC_NO_CPP_PRECOMP,
 [
-       AC_CACHE_CHECK([whether $CC needs -no-cpp-precomp],
+       AC_CACHE_CHECK([if $CC needs -no-cpp-precomp],
                                   [ac_no_cpp_precomp],
                                   [echo "void f(){}" > conftest.c
                                        if test -z "`${CC} -no-cpp-precomp -c 
conftest.c 2>&1`"; then
Index: giFTcurs/configure.in
diff -u giFTcurs/configure.in:1.71 giFTcurs/configure.in:1.72
--- giFTcurs/configure.in:1.71  Sat Sep 13 16:49:32 2003
+++ giFTcurs/configure.in       Tue Nov  4 18:38:17 2003
@@ -2,8 +2,8 @@
 AC_INIT(configure.in)
 AM_CONFIG_HEADER(config.h)
 AC_PREREQ(2.52)
-AC_REVISION($Revision: 1.71 $)
-dnl AM_INIT_AUTOMAKE(giFTcurs, 0.5.7)
+AC_REVISION($Revision: 1.72 $)
+dnl AM_INIT_AUTOMAKE(giFTcurs, 0.6.1)
 AM_INIT_AUTOMAKE(giFTcurs, `date +%y%m%d`-cvs)
 
 dnl Checks for programs.
@@ -15,6 +15,7 @@
 if test "$has_curses" = false ; then
        AC_ERROR(You don't seem to have the curses headers installed)
 fi
+AM_CONDITIONAL(HAS_WIDE_CURSES, test "$has_wide_curses" = true)
 
 ALL_LINGUAS="ca da de es fr it nl pl pt_BR sv"
 AM_GNU_GETTEXT




reply via email to

[Prev in Thread] Current Thread [Next in Thread]