The following commit has been merged in the iwj branch:
commit bd68c36e458c7abe1c7ab0caaa8c43e69bb49275
Author: Ian Jackson <[EMAIL PROTECTED]>
Date:   Sun Mar 9 11:08:40 2008 +0000

    Use -I/usr/include/ncursesw when linking against ncursesw.
    
    Without this, the build fails in a clean chroot which has only
    ncursesw-dev.
    
    There are two approaches to fixing this: one is to add
    -I/usr/include/ncursesw which is not ideal if /usr/include turns out
    to move about (eg for cross-compiling); at least in this commit I have
    made it configurable.
    
    The alternative might be to replace
      #include <curses.h>
    with
      #include CURSES_INCLUDE_FILE
    and then generate the latter from the build system.  This is a rather
    unhealthy interdependency with the build system so I didn't do it;
    that interdependency can be alleviated with #ifdefs but that's not
    really any nicer.

diff --git a/debian/changelog b/debian/changelog
index cf59047..ac57eca 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -111,7 +111,7 @@ dpkg (1.15.0~~iwj) UNRELEASED; urgency=low
   * Add support for use of SHA1 and SHA256 checksums in .dsc and
     .changes files. Information will be available in Checksums-Sha{1,256}
     fields. .changes format version increased to 1.8.
-  * Link dselect against libncursesw. Closes: #466321
+  * Link dselect against libncursesw (using appropriate -I). Closes: #466321
   * Forward port a patch from the old changelog parser to the new
     one that got lost during the transition. '+' and '.' can now
     be used in distribution names yet again. Reported by dann frazier.
diff --git a/dselect/Makefile.am b/dselect/Makefile.am
index e433dfc..cbc6370 100644
--- a/dselect/Makefile.am
+++ b/dselect/Makefile.am
@@ -4,6 +4,7 @@ SUBDIRS = methods po
 
 localedir = $(datadir)/locale
 INCLUDES = \
+       $(CURSES_INCLUDES) \
        -DLOCALEDIR=\"$(localedir)\" \
        -DADMINDIR=\"$(admindir)\" -DLIBDIR=\"$(pkglibdir)\" \
        -idirafter $(top_srcdir)/libcompat \
@@ -47,7 +48,7 @@ CLEANFILES = curkeys.h
 curkeys.$(OBJEXT): curkeys.h
 curkeys.h: $(srcdir)/keyoverride $(srcdir)/mkcurkeys.pl
        cursesfile=`echo '#include <curses.h>' | \
-               $(CC) -E - | grep 'curses.h' | head -n 1 | \
+               $(CC) $(CURSES_INCLUDES) -E - | grep 'curses.h' | head -n 1 | \
                sed -e 's/^[^"]*"//; s/".*$$//'`; \
        if [ "$$cursesfile" = "" ]; then \
                echo "can't find curses file"; exit 1; \
diff --git a/m4/libs.m4 b/m4/libs.m4
index 1b3cb24..08d9791 100644
--- a/m4/libs.m4
+++ b/m4/libs.m4
@@ -93,7 +93,9 @@ fi
 # Check for curses library.
 AC_DEFUN([DPKG_LIB_CURSES],
 [AC_ARG_VAR([CURSES_LIBS], [linker flags for curses library])dnl
-AC_CHECK_LIB([ncursesw], [initscr], [CURSES_LIBS="${CURSES_LIBS:+$CURSES_LIBS 
}-lncursesw"],
+AC_ARG_VAR([CURSES_INCLUDES], [include path flags for curses library])dnl
+AC_CHECK_LIB([ncursesw], [initscr], [CURSES_LIBS="${CURSES_LIBS:+$CURSES_LIBS 
}-lncursesw"
+                                     
CURSES_INCLUDES="${CURSES_INCLUDES:+$CURSES_INCLUDES } 
-I/usr/include/ncursesw"],
        [AC_CHECK_LIB([ncurses], [initscr], 
[CURSES_LIBS="${CURSES_LIBS:+$CURSES_LIBS }-lncurses"],
                [AC_CHECK_LIB([curses], [initscr], 
[CURSES_LIBS="${CURSES_LIBS:+$CURSES_LIBS }-lcurses"],
                        [AC_MSG_WARN([no curses library found])])])])

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to