remove need for nextstep/compile for NS build; also, add NEWS entry about the port

This commit is contained in:
Adrian Robert 2008-07-17 17:44:41 +00:00
parent e5744c6666
commit 06b627700d
7 changed files with 144 additions and 76 deletions

View file

@ -169,6 +169,8 @@ carbon_appdir=@carbon_appdir@
# Location to install Emacs.app under NeXT/Open/GNUstep / Cocoa
ns_appdir=@ns_appdir@
ns_appbindir=@ns_appbindir@
ns_appresdir=@ns_appresdir@
# Where the etc/emacs.desktop file is to be installed.
desktopdir=$(datarootdir)/applications
@ -415,13 +417,14 @@ install-arch-dep: mkdir
&& cat > /dev/null))) || exit 1; \
fi
if test "${ns_appdir}" != ""; then \
umask 022; mkdir -p ${ns_appdir}/Emacs.app; \
(cd nextstep/build/Emacs.app; (tar -chf - . | \
(cd ${ns_appdir}/Emacs.app; umask 022; tar -xvf - \
&& cat > /dev/null))) || exit 1; \
( cd site-lisp ; tar chf - . ) | \
( cd ${datadir}/$(EMACSFULL)/site-lisp ; tar xf - ) \
fi
( cd ${ns_appresdir} ; \
if test -d share/emacs ; then mv -f share/emacs/*/* . ; fi ; \
if test -d info ; then mv -f share/info . ; fi ; \
rm -fr share ) ; \
( cd ${ns_appbindir}/libexec ; mv -f emacs/*/*/* . ; rm -fr emacs ) ; \
( cd ${ns_appbindir}/bin ; rm -f emacs emacs-23* ; \
ln -sf ../libexec/* .) ; \
else true ; fi
## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html
## Needs to be the user running install, so configure can't set it.

102
configure vendored
View file

@ -735,6 +735,9 @@ machfile
opsysfile
carbon_appdir
ns_appdir
ns_appbindir
ns_appresdir
ns_appsrc
GNUSTEP_MAKEFILES
LTLIBOBJS'
ac_subst_files=''
@ -1334,9 +1337,8 @@ Optional Features:
--enable-carbon-app[=DIR]
specify install directory for Emacs.app on Mac OS X
[DIR=/Application]
--enable-ns-app[=DIR] [DIR=/Applications]
specify install directory for Emacs.app under NS
--enable-cocoa-experimental-ctrl-g enable experimental improved ctrl-g recognition
--disable-ns-self-contained disable self contained build under NS
--enable-asserts compile code with asserts enabled
--enable-maintainer-mode
enable make rules and dependencies not useful (and
@ -2169,12 +2171,6 @@ if test "${enable_carbon_app+set}" = set; then
fi
# Check whether --enable-ns-app was given.
if test "${enable_ns_app+set}" = set; then
enableval=$enable_ns_app; ns_appdir_x=${enableval}
fi
# Check whether --enable-cocoa-experimental-ctrl-g was given.
if test "${enable_cocoa_experimental_ctrl_g+set}" = set; then
enableval=$enable_cocoa_experimental_ctrl_g; EN_COCOA_EXPERIMENTAL_CTRL_G=yes
@ -2183,6 +2179,14 @@ else
fi
# Check whether --enable-ns-self-contained was given.
if test "${enable_ns_self_contained+set}" = set; then
enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=no
else
EN_NS_SELF_CONTAINED=yes
fi
# Check whether --enable-asserts was given.
if test "${enable_asserts+set}" = set; then
enableval=$enable_asserts; USE_XASSERTS=$enableval
@ -9334,11 +9338,19 @@ CFLAGS="$CFLAGS -x objective-c"
if test "${with_ns}" != no; then
if test "${opsys}" = darwin; then
NS_IMPL_COCOA=yes
ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
elif test -f /etc/GNUstep/GNUstep.conf; then
NS_IMPL_GNUSTEP=yes
ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=`pwd`/nextstep/Emacs.app
ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
GNUSTEP_MAKEFILES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_MAKEFILES)"
GNUSTEP_SYSTEM_HEADERS="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_HEADERS)"
GNUSTEP_SYSTEM_LIBRARIES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_LIBRARIES)"
GNUSTEP_MAKEFILES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_MAKEFILES)"
CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
@ -9480,6 +9492,12 @@ if test "${HAVE_NS}" = yes; then
window_system=nextstep
with_xft=no
with_freetype=no
# set up packaging dirs
exec_prefix=${ns_appbindir}
libexecdir=${ns_appbindir}/libexec
if test "${EN_NS_SELF_CONTAINED}" = yes; then
prefix=${ns_appresdir}
fi
fi
CFLAGS="$tmp_CFLAGS"
CPPFLAGS="$tmp_CPPFLAGS"
@ -15129,14 +15147,6 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_NS 1
_ACEOF
## Specify the install directory
ns_appdir=
if test "${ns_appdir_x}" != ""; then
case ${ns_appdir_x} in
y | ye | yes) ns_appdir=/Applications ;;
* ) ns_appdir=${ns_appdir_x} ;;
esac
fi
if test "${NS_IMPL_COCOA}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
@ -16907,7 +16917,6 @@ cat >>conftest.$ac_ext <<_ACEOF
# endif
#endif
#include <limits.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
@ -17056,15 +17065,12 @@ main ()
isn't worth using anyway. */
alarm (60);
for (;;)
{
t = (time_t_max << 1) + 1;
if (t <= time_t_max)
break;
time_t_max = t;
}
time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
continue;
time_t_max--;
if ((time_t) -1 < 0)
for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
continue;
delta = time_t_max / 997; /* a suitable prime number */
for (i = 0; i < N_STRINGS; i++)
{
@ -17079,12 +17085,10 @@ main ()
&& mktime_test ((time_t) (60 * 60 * 24))))
return 1;
for (j = 1; ; j <<= 1)
for (j = 1; 0 < j; j *= 2)
if (! bigtime_test (j))
return 1;
else if (INT_MAX / 2 < j)
break;
if (! bigtime_test (INT_MAX))
if (! bigtime_test (j - 1))
return 1;
}
return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
@ -18993,13 +18997,11 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h> /* for off_t */
#include <stdio.h>
#include <stdio.h>
int
main ()
{
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@ -19039,13 +19041,11 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
#include <sys/types.h> /* for off_t */
#include <stdio.h>
#include <stdio.h>
int
main ()
{
int (*fp) (FILE *, off_t, int) = fseeko;
return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
;
return 0;
}
@ -24180,6 +24180,9 @@ fi
@ -24357,10 +24360,26 @@ if test "$HAVE_CARBON" = "yes"; then
echo
echo "Warning: The Mac Carbon port is currently unsupported and has
known problems. It is not recommended for use by non-developers.
The NeXTstep port (--with-ns) is an alternative.
Read the emacs-devel archives for more information."
echo
fi
if test "$HAVE_NS" = "yes"; then
echo
echo "You must run \"make install\" in order to test the built application.
The installed application will go to nextstep/Emacs.app and can be
run or moved from there."
if test "$EN_NS_SELF_CONTAINED" = "yes"; then
echo "The application will be fully self-contained."
else
echo "The lisp resources for the application will be installed under ${prefix}.
You may need to run \"make install\" with sudo. The application will fail
to run if these resources are not installed."
fi
echo
fi
if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
echo "D-Bus integration has been tested for GNU/Linux only."
echo
@ -25206,11 +25225,14 @@ machfile!$machfile$ac_delim
opsysfile!$opsysfile$ac_delim
carbon_appdir!$carbon_appdir$ac_delim
ns_appdir!$ns_appdir$ac_delim
ns_appbindir!$ns_appbindir$ac_delim
ns_appresdir!$ns_appresdir$ac_delim
ns_appsrc!$ns_appsrc$ac_delim
GNUSTEP_MAKEFILES!$GNUSTEP_MAKEFILES$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View file

@ -176,16 +176,16 @@ AC_ARG_ENABLE(carbon-app,
[DIR=/Application]])],
[ carbon_appdir_x=${enableval}])
AC_ARG_ENABLE(ns-app,
[[ --enable-ns-app[=DIR] [DIR=/Applications]
specify install directory for Emacs.app under NS]],
[ ns_appdir_x=${enableval}])
AC_ARG_ENABLE(cocoa-experimental-ctrl-g,
[ --enable-cocoa-experimental-ctrl-g enable experimental improved ctrl-g recognition],
EN_COCOA_EXPERIMENTAL_CTRL_G=yes,
EN_COCOA_EXPERIMENTAL_CTRL_G=no)
AC_ARG_ENABLE(ns-self-contained,
[ --disable-ns-self-contained disable self contained build under NS],
EN_NS_SELF_CONTAINED=no,
EN_NS_SELF_CONTAINED=yes)
AC_ARG_ENABLE(asserts,
[AS_HELP_STRING([--enable-asserts], [compile code with asserts enabled])],
USE_XASSERTS=$enableval,
@ -1230,11 +1230,19 @@ CFLAGS="$CFLAGS -x objective-c"
if test "${with_ns}" != no; then
if test "${opsys}" = darwin; then
NS_IMPL_COCOA=yes
ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
elif test -f /etc/GNUstep/GNUstep.conf; then
NS_IMPL_GNUSTEP=yes
ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=`pwd`/nextstep/Emacs.app
ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
GNUSTEP_MAKEFILES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_MAKEFILES)"
GNUSTEP_SYSTEM_HEADERS="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_HEADERS)"
GNUSTEP_SYSTEM_LIBRARIES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_LIBRARIES)"
GNUSTEP_MAKEFILES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_MAKEFILES)"
CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
@ -1247,6 +1255,12 @@ if test "${HAVE_NS}" = yes; then
window_system=nextstep
with_xft=no
with_freetype=no
# set up packaging dirs
exec_prefix=${ns_appbindir}
libexecdir=${ns_appbindir}/libexec
if test "${EN_NS_SELF_CONTAINED}" = yes; then
prefix=${ns_appresdir}
fi
fi
CFLAGS="$tmp_CFLAGS"
CPPFLAGS="$tmp_CPPFLAGS"
@ -2055,14 +2069,6 @@ fi
### Use NeXTstep API to implement GUI.
if test "${HAVE_NS}" = "yes"; then
AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.])
## Specify the install directory
ns_appdir=
if test "${ns_appdir_x}" != ""; then
case ${ns_appdir_x} in
y | ye | yes) ns_appdir=/Applications ;;
* ) ns_appdir=${ns_appdir_x} ;;
esac
fi
if test "${NS_IMPL_COCOA}" = "yes"; then
AC_DEFINE(NS_IMPL_COCOA, 1, [Define to 1 if you are using NS windowing under MacOS X.])
fi
@ -2472,6 +2478,9 @@ AC_SUBST(opsysfile)
AC_SUBST(GETLOADAVG_LIBS)
AC_SUBST(carbon_appdir)
AC_SUBST(ns_appdir)
AC_SUBST(ns_appbindir)
AC_SUBST(ns_appresdir)
AC_SUBST(ns_appsrc)
AC_SUBST(GNUSTEP_MAKEFILES)
AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}",
@ -2903,10 +2912,26 @@ if test "$HAVE_CARBON" = "yes"; then
echo
echo "Warning: The Mac Carbon port is currently unsupported and has
known problems. It is not recommended for use by non-developers.
The NeXTstep port (--with-ns) is an alternative.
Read the emacs-devel archives for more information."
echo
fi
if test "$HAVE_NS" = "yes"; then
echo
echo "You must run \"make install\" in order to test the built application.
The installed application will go to nextstep/Emacs.app and can be
run or moved from there."
if test "$EN_NS_SELF_CONTAINED" = "yes"; then
echo "The application will be fully self-contained."
else
echo "The lisp resources for the application will be installed under ${prefix}.
You may need to run \"make install\" with sudo. The application will fail
to run if these resources are not installed."
fi
echo
fi
if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
echo "D-Bus integration has been tested for GNU/Linux only."
echo

View file

@ -1,3 +1,7 @@
2008-07-17 Adrian Robert <Adrian.B.Robert@gmail.com>
* NEWS: Add entry about NS port.
2008-07-15 Adrian Robert <Adrian.B.Robert@gmail.com>
* Emacs.clr: New file, add support for X color names to NS display

View file

@ -83,6 +83,13 @@ The Emacs 22 icon is available as `emacs22.png' in the same location.
* Changes in Emacs 23.1
** Emacs can now be built under the Cocoa libraries on Mac OS X and GNUstep
libraries on other machines. Specify --with-ns to configure for this. By
default a self-contained app will be built (containing all lisp). To
install/share lisp with other emacsen (e.g. X11 build) use
--disable-ns-self-contained. Use 'info-ns-emacs' or first entry under Help
menu when running for more information.
** `where-is-preferred-modifier' can specify your favorite modifier.
** Improved X Window System support

View file

@ -1,3 +1,9 @@
2008-07-17 Adrian Robert <Adrian.B.Robert@gmail.com>
* Makefile.in: Replace emacsapp, emacsbindir, emacsappsrc variables
set here with ns_appdir, ns_appresdir, ns_appbindir, ns_appsrc) set
from configure.
2008-07-17 Dan Nicolaescu <dann@ics.uci.edu>
* s/sol2.h:

View file

@ -532,17 +532,13 @@ emacsappsrc = ${srcdir}/../mac/Emacs.app/
#endif
#ifdef HAVE_NS
ns_appdir=@ns_appdir@/
ns_appbindir=@ns_appbindir@/
ns_appresdir=@ns_appresdir@/
ns_appsrc=@ns_appsrc@
/* Object files for NeXTstep */
NS_OBJ= nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
fontset.o fringe.o image.o
emacsapp = $(PWD)/../nextstep/build/Emacs.app/
#ifdef NS_IMPL_GNUSTEP
emacsappsrc = ${srcdir}/../nextstep/GNUstep/Emacs.base
emacsbindir = $(emacsapp)
#else
emacsappsrc = ${srcdir}/../nextstep/Cocoa/Emacs.base
emacsbindir = $(emacsapp)/Contents/MacOS/
#endif /* NS_IMPL_GNUSTEP */
#endif /* HAVE_NS */
#ifdef HAVE_WINDOW_SYSTEM
@ -1336,15 +1332,20 @@ nsselect.o: nsselect.m blockinput.h nsterm.h nsgui.h frame.h $(config_h)
nsimage.o: nsimage.m nsterm.h
nsfont.o: nsterm.h dispextern.h frame.h lisp.h $(config_h)
${emacsapp}: ${emacsappsrc}
mkdir -p ${emacsapp}
( cd ${emacsappsrc} ; tar cfh - . ) | ( cd ${emacsapp} ; tar xf - )
${ns_appdir}: ${ns_appsrc}
rm -fr ${ns_appdir}
mkdir -p ${ns_appdir}
( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; tar xf - )
( cd ${ns_appdir} ; for subdir in `find $${dest} -type d ! -name CVS -print` ; do \
chmod a+rx $${subdir} ; \
rm -rf $${subdir}/CVS ; \
rm -f $${subdir}/.cvsignore ; done ; )
${emacsbindir}Emacs: emacs${EXEEXT}
mkdir -p ${emacsbindir}
cp -f emacs${EXEEXT} ${emacsbindir}Emacs
${ns_appbindir}Emacs: emacs${EXEEXT}
mkdir -p ${ns_appbindir}
cp -f emacs${EXEEXT} ${ns_appbindir}Emacs
ns-app: ${emacsapp} ${emacsbindir}Emacs
ns-app: ${ns_appdir} ${ns_appbindir}Emacs
#endif /* HAVE_NS */