bug-ncurses
[Top][All Lists]
Advanced

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

ncurses 5.5.20061014: DESTDIR and ncurses5-config --cflags


From: Ralf S. Engelschall
Subject: ncurses 5.5.20061014: DESTDIR and ncurses5-config --cflags
Date: Sat, 21 Oct 2006 10:03:55 +0200
User-agent: Mutt/1.5.13 OpenPKG/CURRENT (2006-08-11)

In the latest ncurses 5.5.20061014 there is a new ncurses5-config
script. Good idea. But there are two issues:

1. The installation of the script does not honor DESTDIR which
   makes problems for packagers (like us in our OpenPKG project).

    Index: misc/Makefile.in
    --- misc/Makefile.in.orig   2006-10-21 09:50:43 +0200
    +++ misc/Makefile.in    2006-10-21 09:53:11 +0200
    @@ -104,7 +104,7 @@
     NCURSES_CONFIG = address@hidden@@address@hidden

     install.scripts :  ncurses-config
    -   $(INSTALL_PROG) ncurses-config $(bindir)/$(NCURSES_CONFIG)
    +   $(INSTALL_PROG) ncurses-config $(DESTDIR)$(bindir)/$(NCURSES_CONFIG)

     terminfo.tmp : run_tic.sed $(source)
        echo '** adjusting tabset paths'

2. The output of "ncurses5-config --cflags" shows on a FreeBSD box...

   -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=200112L
   -D_XOPEN_SOURCE=600 -I/openpkg-dev/include -I/openpkg-dev/include/ncurses

   ...although I expected just...

   -I/openpkg-dev/include -I/openpkg-dev/include/ncurses

   ...because the --cflags of a xxx-config script should output only
   those compiler flags which are absolutely necessary to build "an
   application against ncurses" (i.e. for the _USE_ of the ncurses API)
   and not those which "ncurses used to build against the system) (i.e.
   for the _build_ of ncurses itself). Here I think the -I options are
   fully sufficient and instead the additional defines (especially
   things like -D_POSIX_C_SOURCE=200112L or -D_XOPEN_SOURCE=600) can
   make big trouble for the build of an ncurses-based application as it
   (1) might be in conflict with the Autoconf stuff of the application
   and (2) usually always changes the system API the application sees.
   My recommendation is to leave only -I options (or -D options which
   are non-conflicting NCURSES-specific ones) in the --cflags output.

Yours,
                                       Ralf S. Engelschall
                                       address@hidden
                                       www.engelschall.com





reply via email to

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