Subject: bug#1230 closed by Glenn Morris <[email-masked]> (Re: bug#1230: `configure --with-ns' fails when the shell is not bash)

From: [email-masked] (Emacs bug Tracking System)

This is an automatic notification regarding your bug report
which was filed against the emacs,ns package:

#1230: `configure --with-ns' fails when the shell is not bash

It has been closed by Glenn Morris <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Glenn Morris <[email-masked]> by
replying to this email.

-- 
1230: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1230
Emacs Bug Tracking System
Contact [email-masked] with problems
>From [email-masked] Thu Oct 23 21:27:21 2008
From: Glenn Morris <[email-masked]>
To: [email-masked]
Subject: Re: bug#1230: `configure --with-ns' fails when the shell is not bash
Date: Fri, 24 Oct 2008 00:24:34 -0400

Thanks; applied.

>From [email-masked] Thu Oct 23 04:38:43 2008
Date: Thu, 23 Oct 2008 14:38:24 +0300
From: Yavor Doganov <[email-masked]>
To: [email-masked]
Organization: The GNU Emacs Church (Bulgarian eparchy)
Subject: `configure --with-ns' fails when the shell is not bash

Package: emacs,ns
Tags: patch

$ CONFIG_SHELL=3D/bin/dash /bin/dash ./configure --with-ns
...
checking for X... libraries , headers=20
./configure.lineno: 9373: source: not found
./configure.lineno: 9373: source: not found
./configure.lineno: 9373: source: not found
checking AppKit/AppKit.h usability... no
checking AppKit/AppKit.h presence... no
checking for AppKit/AppKit.h... no

That's because "source" is a bash feature.  But at this point one
would expect that configure should exit with an error.  However, it
continues, checks for GTK+ and finally fails for me because of missing
image librararies.  If I had them installed on this machine, it would
really configure Emacs for a GTK build.  This can't be right; if the
user says `--with-ns' he really means that.

The attached patch addresses both issues.

2008-10-23  Yavor Doganov  <[email-masked]>  (tiny change)

	* configure.in: Use `.' instead of `source' to source
	GNUstep.conf.  Exit with an error if `--with-ns' was specified but
	<AppKit/AppKit.h> is not found.

--- configure.in	23 =D0=BE=D0=BA=D1=82 2008 13:56:25 +0300	1.568
+++ configure.in	23 =D0=BE=D0=BA=D1=82 2008 14:13:27 +0300=09
@@ -1234,15 +1234,17 @@
      ns_appbindir=3D`pwd`/nextstep/Emacs.app
      ns_appresdir=3D`pwd`/nextstep/Emacs.app/Resources
      ns_appsrc=3D${srcdir}/nextstep/GNUstep/Emacs.base
-     GNUSTEP_MAKEFILES=3D"$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTE=
P_MAKEFILES)"
-     GNUSTEP_SYSTEM_HEADERS=3D"$(source /etc/GNUstep/GNUstep.conf; echo $G=
NUSTEP_SYSTEM_HEADERS)"
-     GNUSTEP_SYSTEM_LIBRARIES=3D"$(source /etc/GNUstep/GNUstep.conf; echo =
$GNUSTEP_SYSTEM_LIBRARIES)"
+     GNUSTEP_MAKEFILES=3D"$(. /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_MAK=
EFILES)"
+     GNUSTEP_SYSTEM_HEADERS=3D"$(. /etc/GNUstep/GNUstep.conf; echo $GNUSTE=
P_SYSTEM_HEADERS)"
+     GNUSTEP_SYSTEM_LIBRARIES=3D"$(. /etc/GNUstep/GNUstep.conf; echo $GNUS=
TEP_SYSTEM_LIBRARIES)"
      CPPFLAGS=3D"$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
      CFLAGS=3D"$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
      REAL_CFLAGS=3D"$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
      LDFLAGS=3D"$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
   fi
-  AC_CHECK_HEADER(AppKit/AppKit.h, HAVE_NS=3Dyes)
+  AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=3Dyes],
+  		  [AC_MSG_ERROR([`--with-ns' was specified, but the include
+  files are missing or cannot be compiled.])])
   NS_HAVE_NSINTEGER=3Dyes
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Foundation/NSObjCRuntime.h=
>],
                                      [NSInteger i;])],