From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16855 invoked by alias); 13 May 2014 19:20:14 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 16786 invoked by uid 89); 13 May 2014 19:20:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: plane.gmane.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 13 May 2014 19:20:12 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WkIFC-0006wI-JZ for cygwin@cygwin.com; Tue, 13 May 2014 21:20:06 +0200 Received: from c-69-140-37-22.hsd1.md.comcast.net ([69.140.37.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 May 2014 21:20:06 +0200 Received: from schulman.andrew by c-69-140-37-22.hsd1.md.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 May 2014 21:20:06 +0200 To: cygwin@cygwin.com From: Andrew Schulman Subject: Re: pinfo configure problem - configure.ac (0/1) Date: Tue, 13 May 2014 19:25:00 -0000 Message-ID: References: <05u3n9l6l8pgdeuidskcplb1930mmjtu05@4ax.com> <20140513110518.GN2436@calimero.vinschen.de> <20140513115410.GP2436@calimero.vinschen.de> <537269E3.5080509@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive: encrypt X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00288.txt.bz2 > On 05/13/2014 09:32 AM, Andrew Schulman wrote: > > >> autoreconf -f -i? > > > > Alas, no. > > > > Here's configure.ac, in case that's helpful. > > which contains: > > # curses > AC_CHECK_CURSES > if ! test "x$USE_CURSES" = "xtrue"; then > AC_MSG_ERROR([Curses not found. You need curses to compile pinfo]) > fi > > But without a definition for AC_CHECK_CURSES, I still don't know enough. > I hate packages that assume they can use the AC_ namespace for their > third-party macros. Can you find the definition of that macro in a .m4 > file that gets included? That's probably the place that's creating the > bogus command line. Thanks. Note that I did find a workaround, which is to set LIBS=-lncursesw. AC_CHECK_CURSES calls AC_CHECK_CURSES_COMPILE, which is the step that fails. I've included it below. The key step seems to be that it calls AC_LINK_IFELSE, with the curses libs (-lncursesw) appended to LDFLAGS. dnl dnl check if the curses header we found, works dnl AC_DEFUN([AC_CHECK_CURSES_COMPILE], [ dnl save CFLAGS and LDFLAGS and set new ones CFLAGS_OLD=$CFLAGS CFLAGS="$CFLAGS $curses_includes" LDFLAGS_OLD=$LDFLAGS LDFLAGS="$LDFLAGS $curses_libs" dnl do the compile test AC_MSG_CHECKING([if curses is usable]) AC_LINK_IFELSE([ AC_LANG_PROGRAM( [[ #include <$curses_h> ]], [[ initscr(); printw("Hello World !!!"); refresh(); getch(); endwin(); return 0; ]] )], [ curses_usable=true AC_MSG_RESULT([yes]) ], [ curses_usable=false AC_MSG_RESULT([no]) ] ) dnl restore variables CFLAGS=$CFLAGS_OLD LDFLAGS=$LDFLAGS_OLD ]) -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple