Commit f6ef8365 authored by Paul Eggert's avatar Paul Eggert

Use gnustep-config if available

* configure.ac (--with-gnustep): Document this.
(NS_GNUSTEP_CONFIG): New variable, set if gnustep-config works.
If gnustep-config works, use 'gnustep-config --objc-flags' and
'gnustep-config --gui-libs' to compute GNUstep configuration
variables, instead of attempting to infer them individually.
* etc/NEWS: Document this.
* src/emacs.c [NS_IMPL_GNUSTEP]: Don't include <GNUstepBase/GSConfig.h>.
It doesn't appear to be needed, and the inclusion breaks on
Ubuntu 14.10 when 'configure' uses 'gnustep-config'.
Fixes: bug#19507
parent bce27d88
2015-01-25 Paul Eggert <eggert@cs.ucla.edu>
Use gnustep-config if available
* configure.ac (--with-gnustep): Document this.
(NS_GNUSTEP_CONFIG): New variable, set if gnustep-config works.
If gnustep-config works, use 'gnustep-config --objc-flags' and
'gnustep-config --gui-libs' to compute GNUstep configuration
variables, instead of attempting to infer them individually.
Fixes: bug#19507
2015-01-21 Ulrich Müller <ulm@gentoo.org> 2015-01-21 Ulrich Müller <ulm@gentoo.org>
* configure.ac (gamegroup): New AC_SUBST. * configure.ac (gamegroup): New AC_SUBST.
......
...@@ -414,7 +414,9 @@ esac ...@@ -414,7 +414,9 @@ esac
AC_ARG_WITH([gnustep-conf],dnl AC_ARG_WITH([gnustep-conf],dnl
[AS_HELP_STRING([--with-gnustep-conf=FILENAME], [AS_HELP_STRING([--with-gnustep-conf=FILENAME],
[name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])]) [name of GNUstep configuration file to use on systems where the command
'gnustep-config' does not work; default $GNUSTEP_CONFIG_FILE, or
/etc/GNUstep/GNUstep.conf])])
test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
GNUSTEP_CONFIG_FILE="${with_gnustep_conf}" GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
test "X$GNUSTEP_CONFIG_FILE" = "X" && \ test "X$GNUSTEP_CONFIG_FILE" = "X" && \
...@@ -1752,6 +1754,7 @@ else ...@@ -1752,6 +1754,7 @@ else
fi fi
HAVE_NS=no HAVE_NS=no
NS_GNUSTEP_CONFIG=no
NS_IMPL_COCOA=no NS_IMPL_COCOA=no
NS_IMPL_GNUSTEP=no NS_IMPL_GNUSTEP=no
tmp_CPPFLAGS="$CPPFLAGS" tmp_CPPFLAGS="$CPPFLAGS"
...@@ -1768,13 +1771,13 @@ if test "${with_ns}" != no; then ...@@ -1768,13 +1771,13 @@ if test "${with_ns}" != no; then
ns_appresdir=${ns_appdir}/Contents/Resources ns_appresdir=${ns_appdir}/Contents/Resources
ns_appsrc=Cocoa/Emacs.base ns_appsrc=Cocoa/Emacs.base
ns_fontfile=macfont.o ns_fontfile=macfont.o
elif flags=$( (gnustep-config --objc-flags) 2>/dev/null); then
NS_IMPL_GNUSTEP=yes
NS_GNUSTEP_CONFIG=yes
GNU_OBJC_CFLAGS=$flags
LIBS_GNUSTEP=$(gnustep-config --gui-libs) || exit
elif test -f $GNUSTEP_CONFIG_FILE; then elif test -f $GNUSTEP_CONFIG_FILE; then
NS_IMPL_GNUSTEP=yes NS_IMPL_GNUSTEP=yes
ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=${ns_appdir}
ns_appresdir=${ns_appdir}/Resources
ns_appsrc=GNUstep/Emacs.base
ns_fontfile=nsfont.o
dnl FIXME sourcing this several times in subshells seems inefficient. dnl FIXME sourcing this several times in subshells seems inefficient.
GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
...@@ -1807,8 +1810,16 @@ fail; ...@@ -1807,8 +1810,16 @@ fail;
GNU_OBJC_CFLAGS="-fobjc-exceptions" GNU_OBJC_CFLAGS="-fobjc-exceptions"
fi fi
fi fi
if test $NS_IMPL_GNUSTEP = yes; then
ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=${ns_appdir}
ns_appresdir=${ns_appdir}/Resources
ns_appsrc=GNUstep/Emacs.base
ns_fontfile=nsfont.o
fi
dnl This is only used while we test the NS headers, it gets reset below. dnl This is only used while we test the NS headers, it gets reset below.
CPPFLAGS="$CPPFLAGS $GNU_OBJC_CFLAGS"
CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS" CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes],
...@@ -3375,11 +3386,13 @@ if test "${HAVE_NS}" = "yes"; then ...@@ -3375,11 +3386,13 @@ if test "${HAVE_NS}" = "yes"; then
fi fi
if test "${NS_IMPL_GNUSTEP}" = "yes"; then if test "${NS_IMPL_GNUSTEP}" = "yes"; then
AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.]) AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.])
# See also .m.o rule in Makefile.in */ if test $NS_GNUSTEP_CONFIG != yes; then
# FIXME: are all these flags really needed? Document here why. */ # See also .m.o rule in src/Makefile.in. */
GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" # FIXME: are all these flags really needed? Document here why. */
## Extra CFLAGS applied to src/*.m files. GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" ## Extra CFLAGS applied to src/*.m files.
GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
fi
fi fi
OTHER_FILES=ns-app OTHER_FILES=ns-app
fi fi
......
2015-01-25 Paul Eggert <eggert@cs.ucla.edu>
Use gnustep-config if available
* NEWS: Document this.
2015-01-22 Paul Eggert <eggert@cs.ucla.edu> 2015-01-22 Paul Eggert <eggert@cs.ucla.edu>
Don't downcase system diagnostics' first letters Don't downcase system diagnostics' first letters
......
...@@ -36,6 +36,9 @@ should be able to work around the problem either by porting the Emacs ...@@ -36,6 +36,9 @@ should be able to work around the problem either by porting the Emacs
undumping code to GCC under IRIX, or by configuring --with-wide-int, undumping code to GCC under IRIX, or by configuring --with-wide-int,
or by sticking with Emacs 24.4. or by sticking with Emacs 24.4.
** 'configure' now prefers gnustep-config when configuring GNUstep.
If gnustep-config is not available, the old heuristics are used.
--- ---
** The configure option `--with-pkg-config-prog' has been removed. ** The configure option `--with-pkg-config-prog' has been removed.
Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to. Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to.
......
2015-01-25 Paul Eggert <eggert@cs.ucla.edu>
Use gnustep-config if available
* emacs.c [NS_IMPL_GNUSTEP]: Don't include <GNUstepBase/GSConfig.h>.
It doesn't appear to be needed, and the inclusion breaks on
Ubuntu 14.10 when 'configure' uses 'gnustep-config'.
2015-01-22 Eli Zaretskii <eliz@gnu.org> 2015-01-22 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (init_iterator): Restore a comment lost in transition. * xdisp.c (init_iterator): Restore a comment lost in transition.
......
...@@ -59,11 +59,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -59,11 +59,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include TERM_HEADER #include TERM_HEADER
#endif /* HAVE_WINDOW_SYSTEM */ #endif /* HAVE_WINDOW_SYSTEM */
#ifdef NS_IMPL_GNUSTEP
/* At least under Debian, GSConfig is in a subdirectory. --Stef */
#include <GNUstepBase/GSConfig.h>
#endif
#include "commands.h" #include "commands.h"
#include "intervals.h" #include "intervals.h"
#include "character.h" #include "character.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment