Commit 478ebb73 authored by Kenichi Handa's avatar Kenichi Handa

merge trunk

parents 2b25da45 b7bd8478
2010-05-27 Glenn Morris <rgm@gnu.org>
* config.bat: Do not preprocess src/Makefile.in.
* configure.in: Do not preprocess src/Makefile.in.
(cpp_undefs, CPP_NEED_TRADITIONAL): Remove.
(AC_EGREP_CPP): Test no longer needed.
* make-dist: No more Makefile.c files.
2010-05-26 Glenn Morris <rgm@gnu.org>
* configure.in (YMF_PASS_LDFLAGS): Remove.
(PRE_EDIT_LDFLAGS, POST_EDIT_LDFLAGS): New output variables.
* configure.in (CPPFLAGS, CFLAGS, REAL_CFLAGS):
Add $GNUSTEP_LOCAL_HEADERS.
(LDFLAGS, LD_SWITCH_SYSTEM_TEMACS): Add $GNUSTEP_LOCAL_LIBRARIES.
* configure.in (NS_IMPL_GNUSTEP_INC, NS_IMPL_GNUSTEP_TEMACS_LDFLAGS)
(GNUSTEP_MAKEFILES): Remove.
(LD_SWITCH_SYSTEM_TEMACS): Move NS_IMPL_GNUSTEP_TEMACS_LDFLAGS
stuff to here.
2010-05-25 Glenn Morris <rgm@gnu.org> 2010-05-25 Glenn Morris <rgm@gnu.org>
* configure.in (LD_SWITCH_SYSTEM): Move some gnu-linux stuff... * configure.in (LD_SWITCH_SYSTEM): Move some gnu-linux stuff...
......
GNU Emacs Installation Guide GNU Emacs Installation Guide
Copyright (C) 1992, 1994, 1996, 1997, 2000, 2001, 2002, 2003, 2004, Copyright (C) 1992, 1994, 1996, 1997, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
See the end of the file for license conditions. See the end of the file for license conditions.
...@@ -686,8 +687,8 @@ when running make in the subdirectories. ...@@ -686,8 +687,8 @@ when running make in the subdirectories.
CONFIGURATION BY HAND CONFIGURATION BY HAND
Instead of running the `configure' program, you have to perform the This should not be necessary and is not recommended. Instead of
following steps. running the `configure' program, you have to perform the following steps.
1) Copy `./src/config.in' to `./src/config.h'. 1) Copy `./src/config.in' to `./src/config.h'.
...@@ -701,22 +702,15 @@ the appropriate system and architecture description files. ...@@ -701,22 +702,15 @@ the appropriate system and architecture description files.
2) Edit `./src/config.h' to set the right options for your system. If 2) Edit `./src/config.h' to set the right options for your system. If
you need to override any of the definitions in the s/*.h and m/*.h you need to override any of the definitions in the s/*.h and m/*.h
files for your system and machine, do so by editing config.h, not by files for your system and machine, do so by editing config.h, not by
changing the s/*.h and m/*.h files. Occasionally you may need to changing the s/*.h and m/*.h files.
redefine parameters used in `./lib-src/movemail.c'.
3) Create src/Makefile and lib-src/Makefile from the corresponding 3) Create `Makefile' files in various directories from the
`Makefile.in' files. First copy `Makefile.in' to `Makefile.c', corresponding `Makefile.in' files. This isn't so hard, just a matter
then edit in appropriate substitutions for the @...@ constructs, of editing in appropriate substitutions for the @...@ constructs.
and then copy the shell commands near the end of `configure'
that run cpp to construct `Makefile'.
4) Create `Makefile' files in various other directories
from the corresponding `Makefile.in' files. This isn't so hard,
just a matter of substitution.
The `configure' script is built from `configure.in' by the `autoconf' The `configure' script is built from `configure.in' by the `autoconf'
program. You need version 2.51 or newer of `autoconf' to rebuild program. You need at least the version of autoconf specified in the
`configure'. AC_PREREQ(...) command to rebuild `configure' from `configure.in'.
BUILDING GNU EMACS BY HAND BUILDING GNU EMACS BY HAND
......
2010-05-27 Glenn Morris <rgm@gnu.org>
* quick-install-emacs (AVOID): No more Makefile.c files.
* notes/cpp: Remove file.
2010-05-15 Ken Raeburn <raeburn@raeburn.org> 2010-05-15 Ken Raeburn <raeburn@raeburn.org>
* admin.el (set-version, set-copyright): Update emacs.c instead of * admin.el (set-version, set-copyright): Update emacs.c instead of
......
ttn 2003-04-09
we use a C preprocesor not only in the normal compilation of .c files
into object files, but also for creating src/Makefile.
(delimited by comment "start of cpp stuff"). some cpp implementations
insert whitespace in between tokens.
during makefile creation, the preprocessor symbol NOT_C_CODE is defined.
this should not be defined for normal .c file compilation.
there has been discussion on eliminating this use of cpp and relying
solely on autoconf processing. rms says to leave it be.
;;; arch-tag: d654291e-9fc8-41b7-ab0c-d3cde842a8e0
#!/bin/sh #!/bin/sh
### quick-install-emacs --- do a halfway-decent job of installing emacs quickly ### quick-install-emacs --- do a halfway-decent job of installing emacs quickly
## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
## Free Software Foundation, Inc. ## 2010 Free Software Foundation, Inc.
## Author: Miles Bader <miles@gnu.org> ## Author: Miles Bader <miles@gnu.org>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse' PUBLIC_LIBSRC_BINARIES='b2m emacsclient etags ctags ebrowse'
PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin' PUBLIC_LIBSRC_SCRIPTS='grep-changelog rcs-checkin'
AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile$ Makefile.in$ Makefile.c$ makefile$ makefile.w32-in$ stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib" AVOID="CVS -DIC README COPYING ChangeLog ~ [.]orig$ [.]rej$ Makefile$ Makefile.in$ makefile$ makefile.w32-in$ stamp-subdir [.]cvsignore [.]arch-ids [{]arch[}] [.][cho]$ make-docfile testfile test-distrib"
# Prune old binaries lying around in the source tree # Prune old binaries lying around in the source tree
PRUNE=no PRUNE=no
......
...@@ -190,11 +190,10 @@ rem On my system dir.h gets in the way. It's a VMS file so who cares. ...@@ -190,11 +190,10 @@ rem On my system dir.h gets in the way. It's a VMS file so who cares.
if exist dir.h ren dir.h vmsdir.h if exist dir.h ren dir.h vmsdir.h
rem Create "makefile" from "makefile.in". rem Create "makefile" from "makefile.in".
rm -f Makefile junk.c junk2.c rm -f Makefile makefile.tmp
sed -e "1,/== start of cpp stuff ==/s@^##*[ ].*$@@" <Makefile.in >junk.c copy Makefile.in + deps.mk makefile.tmp
copy junk.c + deps.mk junk2.c sed -f ../msdos/sed1v2.inp <makefile.tmp >Makefile
gcc -E -traditional junk2.c | sed -f ../msdos/sed1v2.inp >Makefile rm -f makefile.tmp
rm -f junk.c junk2.c
if "%X11%" == "" goto src5 if "%X11%" == "" goto src5
mv Makefile makefile.tmp mv Makefile makefile.tmp
......
...@@ -720,8 +720,6 @@ DEPFLAGS ...@@ -720,8 +720,6 @@ DEPFLAGS
XMKMF XMKMF
LD_SWITCH_X_SITE_AUX LD_SWITCH_X_SITE_AUX
LD_SWITCH_X_SITE_AUX_RPATH LD_SWITCH_X_SITE_AUX_RPATH
NS_IMPL_GNUSTEP_INC
NS_IMPL_GNUSTEP_TEMACS_LDFLAGS
TEMACS_LDFLAGS2 TEMACS_LDFLAGS2
NS_OBJ NS_OBJ
NS_SUPPORT NS_SUPPORT
...@@ -820,7 +818,8 @@ CYGWIN_OBJ ...@@ -820,7 +818,8 @@ CYGWIN_OBJ
PRE_ALLOC_OBJ PRE_ALLOC_OBJ
POST_ALLOC_OBJ POST_ALLOC_OBJ
LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_SYSTEM_TEMACS
YMF_PASS_LDFLAGS PRE_EDIT_LDFLAGS
POST_EDIT_LDFLAGS
LINKER LINKER
LIB_GCC LIB_GCC
MOUSE_SUPPORT MOUSE_SUPPORT
...@@ -9935,8 +9934,6 @@ fi ...@@ -9935,8 +9934,6 @@ fi
HAVE_NS=no HAVE_NS=no
NS_IMPL_COCOA=no NS_IMPL_COCOA=no
NS_IMPL_GNUSTEP=no NS_IMPL_GNUSTEP=no
NS_IMPL_GNUSTEP_INC=
NS_IMPL_GNUSTEP_TEMACS_LDFLAGS=
tmp_CPPFLAGS="$CPPFLAGS" tmp_CPPFLAGS="$CPPFLAGS"
tmp_CFLAGS="$CFLAGS" tmp_CFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS -x objective-c" CPPFLAGS="$CPPFLAGS -x objective-c"
...@@ -9955,22 +9952,18 @@ if test "${with_ns}" != no; then ...@@ -9955,22 +9952,18 @@ if test "${with_ns}" != no; then
ns_appbindir=${ns_appdir} ns_appbindir=${ns_appdir}
ns_appresdir=${ns_appdir}Resources ns_appresdir=${ns_appdir}Resources
ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)" 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)"
## Pull in stuff from GNUstep-make. GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
## FIXME? Cleaner to use AC_SUBST_FILE for this? GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
NS_IMPL_GNUSTEP_INC="FOUNDATION_LIB=gnu test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
GUI_LIB=gnu GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
include $GNUSTEP_MAKEFILES/Additional/base.make test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
include $GNUSTEP_MAKEFILES/Additional/gui.make GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
shared=no CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
" CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
NS_IMPL_GNUSTEP_TEMACS_LDFLAGS="-L${GNUSTEP_SYSTEM_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc \${CONFIG_SYSTEM_LIBS} -lpthread" REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
LIB_STANDARD= LIB_STANDARD=
START_FILES= START_FILES=
TEMACS_LDFLAGS2= TEMACS_LDFLAGS2=
...@@ -10162,8 +10155,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ...@@ -10162,8 +10155,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
ns_frag=/dev/null ns_frag=/dev/null
NS_OBJ= NS_OBJ=
NS_SUPPORT= NS_SUPPORT=
...@@ -26634,6 +26625,11 @@ case "$opsys" in ...@@ -26634,6 +26625,11 @@ case "$opsys" in
*) LD_SWITCH_SYSTEM_TEMACS= ;; *) LD_SWITCH_SYSTEM_TEMACS= ;;
esac esac
if test "$NS_IMPL_GNUSTEP" = "yes"; then
LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
fi
LINKER= LINKER=
...@@ -26660,11 +26656,9 @@ case "$opsys" in ...@@ -26660,11 +26656,9 @@ case "$opsys" in
;; ;;
esac esac
## A macro which other sections of Makefile can redefine to munge the
## flags before they are passed to LD. This is helpful if you have PRE_EDIT_LDFLAGS=
## redefined LD to something odd, like "gcc". POST_EDIT_LDFLAGS=
## (The YMF prefix is a holdover from the old name "ymakefile".)
YMF_PASS_LDFLAGS=flags
if test "x$ORDINARY_LINK" = "xyes"; then if test "x$ORDINARY_LINK" = "xyes"; then
LINKER="\$(CC)" LINKER="\$(CC)"
...@@ -26692,21 +26686,23 @@ elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then ...@@ -26692,21 +26686,23 @@ elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
## shell''s ``for'' construct. Note that sane people do not have '.' in ## shell''s ``for'' construct. Note that sane people do not have '.' in
## their paths, so we must use ./prefix-args. ## their paths, so we must use ./prefix-args.
## TODO either make prefix-args check ORDINARY_LINK internally, ## TODO either make prefix-args check ORDINARY_LINK internally,
## or remove it altogether (bug#6184), removing the need for this macro. ## or remove it altogether (bug#6184), removing the need for this hack.
YMF_PASS_LDFLAGS='`./prefix-args -Xlinker flags`' PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker'
POST_EDIT_LDFLAGS='`'
fi fi
test "x$LINKER" = "x" && LINKER=ld test "x$LINKER" = "x" && LINKER=ld
## FIXME? What setting of YMF_PASS_LDFLAGS should this have? ## FIXME? What setting of EDIT_LDFLAGS should this have?
test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic"
## FIXME? The logic here is not precisely the same as that above ## FIXME? The logic here is not precisely the same as that above.
## setting YMF_PASS_LDFLAGS. There is no check here for a pre-defined ## There is no check here for a pre-defined LINKER.
## LINKER. Should we only be setting LIB_GCC if LD ~ -nostdlib? ## Should we only be setting LIB_GCC if LD ~ -nostdlib?
LIB_GCC= LIB_GCC=
if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
...@@ -26852,42 +26848,7 @@ test "${prefix}" != NONE && ...@@ -26852,42 +26848,7 @@ test "${prefix}" != NONE &&
test "${exec_prefix}" != NONE && test "${exec_prefix}" != NONE &&
exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'` exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
# Now get this: Some word that is part of the ${srcdir} directory name ac_config_files="$ac_config_files Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile"
# or the ${configuration} value might, just might, happen to be an
# identifier like `sun4' or `i386' or something, and be predefined by
# the C preprocessor to some helpful value like 1, or maybe the empty
# string. Needless to say consequent macro substitutions are less
# than conducive to the makefile finding the correct directory.
# src/Makefile.in used to treat X11 as equivalent to HAVE_X11.
# But nothing in Emacs defines X11, and everywhere else uses HAVE_X11,
# so that cannot have been doing anything.
cpp_undefs="`echo $srcdir $configuration $canonical unix mktime register X11 |
sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
-e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
## Check if the C preprocessor will convert `..' to `. .'. If so, set
## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
## from Makefile.c can correctly provide the arg `-traditional' to the
## C preprocessor.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
yes..yes
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "yes..yes" >/dev/null 2>&1; then
CPP_NEED_TRADITIONAL=no
else
CPP_NEED_TRADITIONAL=yes
fi
rm -f conftest*
ac_config_files="$ac_config_files Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile.c:src/Makefile.in lwlib/Makefile lisp/Makefile leim/Makefile"
ac_config_commands="$ac_config_commands default" ac_config_commands="$ac_config_commands default"
...@@ -27474,7 +27435,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ...@@ -27474,7 +27435,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# #
# INIT-COMMANDS # INIT-COMMANDS
# #
GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs" GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"
_ACEOF _ACEOF
...@@ -27492,7 +27453,7 @@ do ...@@ -27492,7 +27453,7 @@ do
"doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;; "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
"doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;; "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
"doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;; "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
"src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;; "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
"lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
"leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
...@@ -28158,35 +28119,9 @@ for dir in etc lisp ; do ...@@ -28158,35 +28119,9 @@ for dir in etc lisp ; do
test -d ${dir} || mkdir ${dir} test -d ${dir} || mkdir ${dir}
done done
# Build src/Makefile from ${srcdir}/src/Makefile.c
# This must be done after src/config.h is built, since we rely on that file.
echo creating src/epaths.h echo creating src/epaths.h
${MAKE-make} epaths-force ${MAKE-make} epaths-force
# As of 2000-11-19, newest development versions of GNU cpp preprocess
# `..' to `. .' unless invoked with -traditional
if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
CPPFLAGS="$CPPFLAGS -traditional"
fi
echo creating src/Makefile
( cd src
rm -f junk.c junk1.c junk2.c
sed -e '/start of cpp stuff/q' \
< Makefile.c > junk1.c
sed -e '1,/start of cpp stuff/d'\
-e 's,/\*\*/#\(.*\)$,/* \1 */,' \
< Makefile.c > junk.c
$CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
cat junk1.c junk2.c > Makefile.new
rm -f junk.c junk1.c junk2.c
chmod 444 Makefile.new
mv -f Makefile.new Makefile
)
if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
echo creating src/.gdbinit echo creating src/.gdbinit
echo source $srcdir/src/.gdbinit > src/.gdbinit echo source $srcdir/src/.gdbinit > src/.gdbinit
......
...@@ -1468,8 +1468,6 @@ fi ...@@ -1468,8 +1468,6 @@ fi
HAVE_NS=no HAVE_NS=no
NS_IMPL_COCOA=no NS_IMPL_COCOA=no
NS_IMPL_GNUSTEP=no NS_IMPL_GNUSTEP=no
NS_IMPL_GNUSTEP_INC=
NS_IMPL_GNUSTEP_TEMACS_LDFLAGS=
tmp_CPPFLAGS="$CPPFLAGS" tmp_CPPFLAGS="$CPPFLAGS"
tmp_CFLAGS="$CFLAGS" tmp_CFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS -x objective-c" CPPFLAGS="$CPPFLAGS -x objective-c"
...@@ -1491,24 +1489,20 @@ if test "${with_ns}" != no; then ...@@ -1491,24 +1489,20 @@ if test "${with_ns}" != no; then
ns_appbindir=${ns_appdir} ns_appbindir=${ns_appdir}
ns_appresdir=${ns_appdir}Resources ns_appresdir=${ns_appdir}Resources
ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
dnl FIXME sourcing this 3 times in subshells seems inefficient. dnl FIXME sourcing this several times in subshells seems inefficient.
GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
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)"
## Pull in stuff from GNUstep-make. dnl I seemed to need these as well with GNUstep-startup 0.25.
## FIXME? Cleaner to use AC_SUBST_FILE for this? GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
NS_IMPL_GNUSTEP_INC="FOUNDATION_LIB=gnu GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
GUI_LIB=gnu test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
include $GNUSTEP_MAKEFILES/Additional/base.make GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
include $GNUSTEP_MAKEFILES/Additional/gui.make test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
shared=no GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
" CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
dnl Presumably ${CONFIG_SYSTEM_LIBS} is defined by above includes. CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
NS_IMPL_GNUSTEP_TEMACS_LDFLAGS="-L${GNUSTEP_SYSTEM_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc \${CONFIG_SYSTEM_LIBS} -lpthread" REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
LIB_STANDARD= LIB_STANDARD=
START_FILES= START_FILES=
TEMACS_LDFLAGS2= TEMACS_LDFLAGS2=
...@@ -1525,8 +1519,6 @@ shared=no ...@@ -1525,8 +1519,6 @@ shared=no
NS_HAVE_NSINTEGER=no NS_HAVE_NSINTEGER=no
fi fi
fi fi
AC_SUBST(NS_IMPL_GNUSTEP_INC)
AC_SUBST(NS_IMPL_GNUSTEP_TEMACS_LDFLAGS)
AC_SUBST(TEMACS_LDFLAGS2) AC_SUBST(TEMACS_LDFLAGS2)
ns_frag=/dev/null ns_frag=/dev/null
...@@ -3311,6 +3303,11 @@ case "$opsys" in ...@@ -3311,6 +3303,11 @@ case "$opsys" in
*) LD_SWITCH_SYSTEM_TEMACS= ;; *) LD_SWITCH_SYSTEM_TEMACS= ;;
esac esac
if test "$NS_IMPL_GNUSTEP" = "yes"; then
LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
fi
AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
...@@ -3338,11 +3335,9 @@ case "$opsys" in ...@@ -3338,11 +3335,9 @@ case "$opsys" in
;; ;;
esac esac
## A macro which other sections of Makefile can redefine to munge the
## flags before they are passed to LD. This is helpful if you have PRE_EDIT_LDFLAGS=
## redefined LD to something odd, like "gcc". POST_EDIT_LDFLAGS=
## (The YMF prefix is a holdover from the old name "ymakefile".)
YMF_PASS_LDFLAGS=flags
if test "x$ORDINARY_LINK" = "xyes"; then if test "x$ORDINARY_LINK" = "xyes"; then
LINKER="\$(CC)" LINKER="\$(CC)"
...@@ -3366,21 +3361,23 @@ elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then ...@@ -3366,21 +3361,23 @@ elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
## shell''s ``for'' construct. Note that sane people do not have '.' in ## shell''s ``for'' construct. Note that sane people do not have '.' in
## their paths, so we must use ./prefix-args. ## their paths, so we must use ./prefix-args.
## TODO either make prefix-args check ORDINARY_LINK internally, ## TODO either make prefix-args check ORDINARY_LINK internally,
## or remove it altogether (bug#6184), removing the need for this macro. ## or remove it altogether (bug#6184), removing the need for this hack.
YMF_PASS_LDFLAGS='`./prefix-args -Xlinker flags`' PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker'
POST_EDIT_LDFLAGS='`'
fi fi
AC_SUBST(YMF_PASS_LDFLAGS) AC_SUBST(PRE_EDIT_LDFLAGS)
AC_SUBST(POST_EDIT_LDFLAGS)
test "x$LINKER" = "x" && LINKER=ld test "x$LINKER" = "x" && LINKER=ld
## FIXME? What setting of YMF_PASS_LDFLAGS should this have? ## FIXME? What setting of EDIT_LDFLAGS should this have?
test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic"
AC_SUBST(LINKER) AC_SUBST(LINKER)
## FIXME? The logic here is not precisely the same as that above ## FIXME? The logic here is not precisely the same as that above.
## setting YMF_PASS_LDFLAGS. There is no check here for a pre-defined ## There is no check here for a pre-defined LINKER.
## LINKER. Should we only be setting LIB_GCC if LD ~ -nostdlib? ## Should we only be setting LIB_GCC if LD ~ -nostdlib?
LIB_GCC= LIB_GCC=
if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
...@@ -3758,32 +3755,9 @@ fi ...@@ -3758,32 +3755,9 @@ fi
test "${exec_prefix}" != NONE && test "${exec_prefix}" != NONE &&
exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`]
# Now get this: Some word that is part of the ${srcdir} directory name
# or the ${configuration} value might, just might, happen to be an
# identifier like `sun4' or `i386' or something, and be predefined by
# the C preprocessor to some helpful value like 1, or maybe the empty
# string. Needless to say consequent macro substitutions are less
# than conducive to the makefile finding the correct directory.
# src/Makefile.in used to treat X11 as equivalent to HAVE_X11.
# But nothing in Emacs defines X11, and everywhere else uses HAVE_X11,
# so that cannot have been doing anything.
[cpp_undefs="`echo $srcdir $configuration $canonical unix mktime register X11 |
sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
-e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"]
## Check if the C preprocessor will convert `..' to `. .'. If so, set
## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
## from Makefile.c can correctly provide the arg `-traditional' to the
## C preprocessor.
AC_EGREP_CPP(yes..yes,
[yes..yes],
CPP_NEED_TRADITIONAL=no,
CPP_NEED_TRADITIONAL=yes)
AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile \ AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile \
doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
doc/lispref/Makefile src/Makefile.c:src/Makefile.in \ doc/lispref/Makefile src/Makefile \
lwlib/Makefile lisp/Makefile leim/Makefile, [ lwlib/Makefile lisp/Makefile leim/Makefile, [
### Make the necessary directories, if they don't exist. ### Make the necessary directories, if they don't exist.
...@@ -3791,41 +3765,15 @@ for dir in etc lisp ; do ...@@ -3791,41 +3765,15 @@ for dir in etc lisp ; do
test -d ${dir} || mkdir ${dir} test -d ${dir} || mkdir ${dir}
done done
# Build src/Makefile from ${srcdir}/src/Makefile.c
# This must be done after src/config.h is built, since we rely on that file.
echo creating src/epaths.h echo creating src/epaths.h