bug-ncurses
[Top][All Lists]
Advanced

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

ncurses not building on the GNU system


From: Alfred M\. Szmidt
Subject: ncurses not building on the GNU system
Date: Mon, 19 Sep 2005 14:34:51 +0200

Hi,

As of right now ncurses doesn't build on the GNU system since
configure doesn't define _GNU_SOURCE, it only gets defined when you
compile ncurses on GNU/Linux.  The proper way to see if $host_os
equals the GNU system or a variant (GNU/Linux or GNU/k*BSD) is to
check that it equals to `*gnu*'.

The attached patch fixes the above problem in two places. The patch
was tested on GNU, GNU/k*bsd and GNU/Linux, and is for ncurses 5.4.


There is also another minor problem in the whole build setup for
ncurses, namely that ncurses builds differently if prefix == /usr,
include files get then put in /usr/include/.  But if prefix != /usr
(when configuring programs on GNU, prefix is empty, see the GNU Coding
Standards), then header files get installed in /include/ncurses/.  In
other words, the standard include directory on GNU is /include, and
not /usr/include.  The simplest fix is to just remove the following
test from configure.in:

,----[ configure.in ]
| AC_MSG_CHECKING(where we will install curses.h)
| test "$with_overwrite" = no && \
| test "x$includedir" = 'x${prefix}/include' && \
|       includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
| AC_MSG_RESULT($includedir)
`----

but I don't know the consequenses of such a change.  ncurses should
get installed the same way no matter on what prefix one gives.

--- orig/aclocal.m4
+++ mod/aclocal.m4
@@ -1146,7 +1146,7 @@
 dnl the corresponding makefile to list the models that we'll generate.
 dnl
 dnl For shared libraries, make a list of symbolic links to construct when
-dnl generating each library.  The convention used for Linux is the simplest
+dnl generating each library.  The convention used for GNU is the simplest
 dnl one:
 dnl    lib<name>.so    ->
 dnl    lib<name>.so.<major>    ->
@@ -2671,7 +2671,7 @@
                MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename 
address@hidden -o address@hidden'
                cf_cv_rm_so_locs=yes
                ;;
-       linux*|gnu*|k*bsd*-gnu)
+       *gnu*)
                if test "$DFT_LWR_MODEL" = "shared" ; then
                        LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
@@ -3646,7 +3646,7 @@
 irix6.*) #(vi
        CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
        ;;
-linux*) #(vi
+*gnu*) #(vi
        CF_GNU_SOURCE
        ;;
 mirbsd*) #(vi


--- orig/configure
+++ mod/configure
@@ -4490,7 +4490,7 @@
                MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename 
address@hidden -o $@'
                cf_cv_rm_so_locs=yes
                ;;
-       linux*|gnu*|k*bsd*-gnu)
+       *gnu*)
                if test "$DFT_LWR_MODEL" = "shared" ; then
                        LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
@@ -6201,7 +6201,7 @@
 irix6.*) #(vi
        CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
        ;;
-linux*) #(vi
+*gnu*) #(vi
 
 echo "$as_me:6206: checking if we must define _GNU_SOURCE" >&5
 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6







reply via email to

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