X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:references :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=HDugdVvwQsn0TD/NjKoYbWJ/Ymd1+XTxBhyU41QKclhYUkGObxzRT rBQSVqXlSq7czqridaTsdrlcQllmVOIJMwM5Rijl2tF4SJY2qXQZc9tgNQzwAG15 rtz10pPTGBy4kOV3LlCFAB15oeYzX9Z1yiPW6IALlw80u7JKxk/Rrc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:references :mime-version:content-type:content-transfer-encoding; s=default; bh=M8gzIG9Vhi3L7GtTLmleUMXB7gg=; b=DF+Y2MIGGuGnrVVY2fIBnfBuXqCW 2nEKUuh77SAa2Ze41dabGEDvh6aSp1Cr6qRQksK/EXZKmQueSHLgu5UMcW7o4jNz lC1mW2qDAVIDeIwdn03BM2tFbkvxUVLa8C1OVUxtt1vTOqBqBH4deGW1nnt8Wkc4 y5Oouv5vkTBz//I= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 To: cygwin AT cygwin DOT com From: Andrew Schulman Subject: Re: pinfo configure problem - configure.ac (0/1) Date: Tue, 13 May 2014 15:19:52 -0400 Lines: 71 Message-ID: References: <05u3n9l6l8pgdeuidskcplb1930mmjtu05 AT 4ax DOT com> <20140513110518 DOT GN2436 AT calimero DOT vinschen DOT de> <20140513115410 DOT GP2436 AT calimero DOT vinschen DOT de> <537269E3 DOT 5080509 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive: encrypt X-IsSubscribed: yes > 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