Commit ccd3ce49 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

merge trunk

parents 82ebc97b 50819706
2010-05-14 Glenn Morris <rgm@gnu.org>
* configure.in (cpp_undefs): Add mktime, register, X11.
* configure.in (GPM_MOUSE_SUPPORT): Remove.
(MOUSE_SUPPORT, TOOLTIP_SUPPORT, WINDOW_SUPPORT): New output variables.
(HAVE_WINDOW_SYSTEM, HAVE_MOUSE): Move out of AC_BOTTOM.
* configure.in (NS_IMPL_GNUSTEP_INC): New output variable.
(GNUSTEP_MAKEFILES): Do not output.
2010-05-13 Glenn Morris <rgm@gnu.org>
* configure.in: Fix some paren typos.
* configure.in (OLDXMENU, LIBXMENU): Set to empty if !HAVE_MENUS.
* configure.in (LD_SWITCH_X_SITE, C_SWITCH_X_SITE): Do not define.
2010-05-12 Glenn Morris <rgm@gnu.org>
* configure.in (LIB_SRC_EXTRA_INSTALLABLES): Remove, unused.
* configure.in (LIB_GCC): New output variable.
2010-05-11 Glenn Morris <rgm@gnu.org>
* make-dist (msdos): No more mainmake.
* configure.in: Generate lib-src/Makefile directly, do not run cpp.
* config.bat: Do not run cpp on lib-src/Makefile.in.
* config.bat [HAVE_X11]: Run sed3x.inp on lib-src/Makefile.
2010-05-10 Glenn Morris <rgm@gnu.org>
* configure.in (LIBS_SYSTEM): New output variable, replacing cpp.
......@@ -5864,7 +5898,7 @@
1994-05-09 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu)
* configure.in: Remove AC_LANG_C call. Not needed with Autoconf
version > 1.8.
version > 1.8.
1994-05-08 Morten Welinder (terra@diku.dk)
......
......@@ -22,7 +22,6 @@ NS_IMPL_GNUSTEP Compile support for GNUstep implementation of NS GUI API.
NS_IMPL_COCOA Compile support for Cocoa (Apple) implementation of NS GUI API.
HAVE_X11 Compile support for the X11 GUI.
HAVE_X_WINDOWS Compile support for X Window system
X11 ?? Makefile.in suggests it's equivalent to HAVE_X11
USE_LUCID Use the Lucid toolkit for menus&scrollbars. Requires HAVE_X11.
USE_MOTIF Use the Motif toolkit for menus&scrollbars. Requires HAVE_X11.
USE_GTK Use the Gtk toolkit for menus&scrollbars. Requires HAVE_X11.
......@@ -55,7 +54,6 @@ HAVE_PTYS
HAVE_TERMIO
HAVE_TERMIOS
INTERRUPT_INPUT
MAIL_USE_FLOCK
NARROWPROTO
SEPCHAR
SIGTYPE
......@@ -85,6 +83,9 @@ BCOPY_DOWNWARD_SAFE
BCOPY_UPWARD_SAFE
BITS_PER_EMACS_INT
BITS_PER_LONG
BITS_PER_CHAR
BITS_PER_SHORT
BITS_PER_INT
BROKEN_DATAGRAM_SOCKETS
BROKEN_FIONREAD
BROKEN_GET_CURRENT_DIR_NAME
......@@ -99,7 +100,6 @@ BSD4_2
BSD4_3
BSD_SYSTEM
CLASH_DETECTION
C_SWITCH_X_SYSTEM
DATA_SEG_BITS
DATA_START
DBL_MIN_REPLACEMENT
......@@ -115,7 +115,6 @@ EMACS_CONFIGURATION
EMACS_CONFIG_OPTIONS
EMACS_INT
EMACS_UINT
END_FILES_1
FILE_SYSTEM_CASE
FLOAT_CHECK_DOMAIN
FSCALE
......@@ -134,7 +133,6 @@ HAVE_BCMP
HAVE_BCOPY
HAVE_CBRT
HAVE_CLOSEDIR
HAVE_CRTIN
HAVE_DUP2
HAVE_EUIDACCESS
HAVE_FMOD
......@@ -155,9 +153,6 @@ HAVE_INDEX
HAVE_INET_SOCKETS
HAVE_INVERSE_HYPERBOLIC
HAVE_LIBKSTAT
HAVE_LIBNCURSES
HAVE_LIBPTHREADS
HAVE_LIBXMU
HAVE_LIMITS_H
HAVE_LINUX_VERSION_H
HAVE_LOGB
......@@ -220,6 +215,7 @@ LINUX_VERSION_CODE
LISP_FLOAT_TYPE
LNOFLSH
LOCALTIME_CACHE
MAIL_USE_FLOCK
MAIL_USE_LOCKF
MAIL_USE_POP
MAIL_USE_SYSTEM_LOCK
......@@ -266,8 +262,6 @@ SIGQUIT
SIGTRAP
SIGTYPE
SOLARIS2
START_FILES
START_FILES_1
STDC_HEADERS
SYMS_SYSTEM
SYSTEM_PURESIZE_EXTRA
......@@ -310,7 +304,6 @@ _WINSOCKAPI_
_WINSOCK_H
__ELF__
__FreeBSD__
__FreeBSD_version
__GNUC__
__GNU_LIBRARY__
__GNUC_MINOR__
......
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
lib-src/Makefile
into object files, but also for creating src/Makefile.
(delimited by comment "start of cpp stuff"). some cpp implementations
insert whitespace in between tokens.
......
......@@ -221,16 +221,17 @@ cd ..
rem ----------------------------------------------------------------------
Echo Configuring the library source directory...
cd lib-src
rem Create "makefile" from "makefile.in".
sed -e "1,/== start of cpp stuff ==/s@^##*[ ].*$@@" <Makefile.in >junk.c
gcc -E -traditional -I. -I../src junk.c | sed -e "s/^ / /" -e "/^#/d" -e "/^[ ]*$/d" >makefile.new
If "%DJGPP_VER%" == "2" goto libsrc-v2
sed -f ../msdos/sed3.inp <makefile.new >Makefile
sed -f ../msdos/sed3.inp <Makefile.in >Makefile
Goto libsrc2
:libsrc-v2
sed -f ../msdos/sed3v2.inp <makefile.new >Makefile
sed -f ../msdos/sed3v2.inp <Makefile.in >Makefile
:libsrc2
rm -f makefile.new junk.c
if "%X11%" == "" goto libsrc2a
mv Makefile makefile.tmp
sed -f ../msdos/sed3x.inp <makefile.tmp >Makefile
rm -f makefile.tmp
:libsrc2a
if "%nodebug%" == "" goto libsrc3
sed -e "/^CFLAGS *=/s/ *-gcoff//" <Makefile >makefile.tmp
sed -e "/^ALL_CFLAGS *=/s/=/= -s/" <makefile.tmp >Makefile
......
......@@ -717,6 +717,7 @@ SET_MAKE
XMKMF
LD_SWITCH_X_SITE_AUX
LD_SWITCH_X_SITE_AUX_RPATH
NS_IMPL_GNUSTEP_INC
NS_OBJ
NS_SUPPORT
LIB_STANDARD
......@@ -751,7 +752,6 @@ LIBPNG
LIBTIFF
LIBGIF
LIBGPM
GPM_MOUSE_SUPPORT
LIBXSM
ALLOCA
liblockfile
......@@ -796,11 +796,9 @@ ns_appdir
ns_appbindir
ns_appresdir
ns_appsrc
GNUSTEP_MAKEFILES
GNUSTEP_SYSTEM_HEADERS
GNUSTEP_SYSTEM_LIBRARIES
GNU_OBJC_CFLAGS
LIB_SRC_EXTRA_INSTALLABLES
OTHER_FILES
XMENU_OBJ
XOBJ
......@@ -815,6 +813,10 @@ PRE_ALLOC_OBJ
POST_ALLOC_OBJ
LD_SWITCH_SYSTEM_TEMACS
LD_SWITCH_SYSTEM_EXTRA
LIB_GCC
MOUSE_SUPPORT
TOOLTIP_SUPPORT
WINDOW_SUPPORT
LTLIBOBJS'
ac_subst_files=''
ac_user_opts='
......@@ -6484,7 +6486,7 @@ case $opsys in
START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
;;
netbsd | openbsd )
if test -f $(CRT_DIR)/crti.o; then
if test -f $CRT_DIR/crti.o; then
LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
else
......@@ -9929,6 +9931,7 @@ fi
HAVE_NS=no
NS_IMPL_COCOA=no
NS_IMPL_GNUSTEP=no
NS_IMPL_GNUSTEP_INC=
tmp_CPPFLAGS="$CPPFLAGS"
tmp_CFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS -x objective-c"
......@@ -9949,6 +9952,13 @@ if test "${with_ns}" != no; then
GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
## Pull in stuff from GNUstep-make.
NS_IMPL_GNUSTEP_INC="FOUNDATION_LIB=gnu
GUI_LIB=gnu
include $GNUSTEP_MAKEFILES/Additional/base.make
include $GNUSTEP_MAKEFILES/Additional/gui.make
shared=no
"
CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
......@@ -10141,6 +10151,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
fi
 
NS_OBJ=
NS_SUPPORT=
if test "${HAVE_NS}" = yes; then
......@@ -15991,7 +16002,7 @@ fi
### Use -lgpm if available, unless `--with-gpm=no'.
HAVE_GPM=no
LIBGPM=
GPM_MOUSE_SUPPORT=
MOUSE_SUPPORT=
if test "${with_gpm}" != "no"; then
if test "${ac_cv_header_gpm_h+set}" = set; then
{ $as_echo "$as_me:$LINENO: checking for gpm.h" >&5
......@@ -16201,12 +16212,12 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
 
LIBGPM=-lgpm
GPM_MOUSE_SUPPORT="\${lispsource}mouse.elc"
## May be reset below.
MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)"
fi
fi
 
 
if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
{ $as_echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
$as_echo_n "checking for malloc/malloc.h... " >&6; }
......@@ -26313,6 +26324,7 @@ fi
### Use configuration here uncanonicalized to avoid exceeding size limits.
 
 
## Unused?
 
 
 
......@@ -26334,6 +26346,9 @@ fi
 
 
 
## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
## end of LIBX_BASE, but nothing ever set it.
 
 
 
......@@ -26353,8 +26368,6 @@ fi
 
 
 
cat >>confdefs.h <<_ACEOF
#define EMACS_CONFIGURATION "${canonical}"
_ACEOF
......@@ -26375,16 +26388,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
 
 
cat >>confdefs.h <<_ACEOF
#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
_ACEOF
cat >>confdefs.h <<_ACEOF
#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
_ACEOF
XMENU_OBJ=
XOBJ=
if test "${HAVE_X_WINDOWS}" = "yes" ; then
......@@ -26481,7 +26484,7 @@ else
LIBX_OTHER=
fi
 
if test "$HAVE_GTK" = "yes"; then
if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
OLDXMENU=
LIBXMENU=
fi
......@@ -26568,6 +26571,61 @@ fi
 
 
 
LIB_GCC=
if test "x$GCC" = "xyes"; then
case "$opsys" in
## cygwin: don't link against static libgcc.
cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
gnu-*)
## armin76@gentoo.org reported that the lgcc_s flag is necessary to
## build on ARM EABI under GNU/Linux. (Bug#5518)
## Note that m/arm.h never bothered to undefine LIB_GCC first.
if test "$machine" = "arm"; then
LIB_GCC="-lgcc_s"
else
## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
## immediately undefine it again and redefine it to empty.
## Was the C_SWITCH_X_SITE part really necessary?
## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
LIB_GCC=
fi
;;
## Ask GCC where to find libgcc.a.
*) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
esac
fi
TOOLTIP_SUPPORT=
WINDOW_SUPPORT=
## If we're using X11/GNUstep, define some consequences.
if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_WINDOW_SYSTEM 1
_ACEOF
cat >>confdefs.h <<\_ACEOF
#define HAVE_MOUSE 1
_ACEOF
MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
test "$HAVE_X_WINDOWS" = "yes" && \
WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)"
fi
 
 
 
......@@ -26664,7 +26722,7 @@ test "${exec_prefix}" != NONE &&
# 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.
cpp_undefs="`echo $srcdir $configuration $canonical unix |
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'`"
 
......@@ -26690,7 +26748,7 @@ fi
rm -f conftest*
 
 
ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in 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_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"
 
......@@ -27289,7 +27347,7 @@ do
case $ac_config_target in
"src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
"lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
"oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
"doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
"doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
......@@ -27934,22 +27992,6 @@ if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
CPPFLAGS="$CPPFLAGS -traditional"
fi
 
echo creating lib-src/Makefile
( cd lib-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
)
echo creating src/Makefile
( cd src
rm -f junk.c junk1.c junk2.c
......
......@@ -1094,7 +1094,7 @@ case $opsys in
START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
;;
netbsd | openbsd )
if test -f $(CRT_DIR)/crti.o; then
if test -f $CRT_DIR/crti.o; then
LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
else
......@@ -1452,6 +1452,7 @@ fi
HAVE_NS=no
NS_IMPL_COCOA=no
NS_IMPL_GNUSTEP=no
NS_IMPL_GNUSTEP_INC=
tmp_CPPFLAGS="$CPPFLAGS"
tmp_CFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS -x objective-c"
......@@ -1473,6 +1474,13 @@ if test "${with_ns}" != no; then
GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
## Pull in stuff from GNUstep-make.
NS_IMPL_GNUSTEP_INC="FOUNDATION_LIB=gnu
GUI_LIB=gnu
include $GNUSTEP_MAKEFILES/Additional/base.make
include $GNUSTEP_MAKEFILES/Additional/gui.make
shared=no
"
CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
......@@ -1491,6 +1499,7 @@ if test "${with_ns}" != no; then
NS_HAVE_NSINTEGER=no
fi
fi
AC_SUBST(NS_IMPL_GNUSTEP_INC)
NS_OBJ=
NS_SUPPORT=
......@@ -2391,7 +2400,7 @@ fi
### Use -lgpm if available, unless `--with-gpm=no'.
HAVE_GPM=no
LIBGPM=
GPM_MOUSE_SUPPORT=
MOUSE_SUPPORT=
if test "${with_gpm}" != "no"; then
AC_CHECK_HEADER(gpm.h,
[AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes)])
......@@ -2399,11 +2408,11 @@ if test "${with_gpm}" != "no"; then
if test "${HAVE_GPM}" = "yes"; then
AC_DEFINE(HAVE_GPM, 1, [Define to 1 if you have the gpm library (-lgpm).])
LIBGPM=-lgpm
GPM_MOUSE_SUPPORT="\${lispsource}mouse.elc"
## May be reset below.
MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)"
fi
fi
AC_SUBST(LIBGPM)
AC_SUBST(GPM_MOUSE_SUPPORT)
dnl Check for malloc/malloc.h on darwin
AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])])
......@@ -3012,6 +3021,7 @@ fi
### Use configuration here uncanonicalized to avoid exceeding size limits.
AC_SUBST(version)
AC_SUBST(configuration)
## Unused?
AC_SUBST(canonical)
AC_SUBST(srcdir)
AC_SUBST(prefix)
......@@ -3033,6 +3043,9 @@ AC_SUBST(bitmapdir)
AC_SUBST(gamedir)
AC_SUBST(gameuser)
AC_SUBST(unexec)
## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
## end of LIBX_BASE, but nothing ever set it.
AC_SUBST(LD_SWITCH_X_SITE)
AC_SUBST(C_SWITCH_X_SITE)
AC_SUBST(C_SWITCH_X_SYSTEM)
......@@ -3046,11 +3059,9 @@ AC_SUBST(ns_appdir)
AC_SUBST(ns_appbindir)
AC_SUBST(ns_appresdir)
AC_SUBST(ns_appsrc)
AC_SUBST(GNUSTEP_MAKEFILES)
AC_SUBST(GNUSTEP_SYSTEM_HEADERS)
AC_SUBST(GNUSTEP_SYSTEM_LIBRARIES)
AC_SUBST(GNU_OBJC_CFLAGS)
AC_SUBST(LIB_SRC_EXTRA_INSTALLABLES)
AC_SUBST(OTHER_FILES)
AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}",
......@@ -3061,18 +3072,6 @@ AC_DEFINE_UNQUOTED(config_machfile, "${machfile}",
[Define to the used machine dependent file.])
AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}",
[Define to the used os dependent file.])
AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE},
[Define LD_SWITCH_X_SITE to contain any special flags your loader
may need to deal with X Windows. For instance, if you've defined
HAVE_X_WINDOWS above and your X libraries aren't in a place that
your loader can find on its own, you might want to add "-L/..." or
something similar.])
AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE},
[Define C_SWITCH_X_SITE to contain any special flags your compiler
may need to deal with X Windows. For instance, if you've defined
HAVE_X_WINDOWS above and your X include files aren't in a place
that your compiler can find on its own, you might want to add
"-I/..." or something similar.])
XMENU_OBJ=
XOBJ=
......@@ -3153,7 +3152,7 @@ else
LIBX_OTHER=
fi
if test "$HAVE_GTK" = "yes"; then
if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
OLDXMENU=
LIBXMENU=
fi
......@@ -3234,6 +3233,54 @@ fi
AC_SUBST(LD_SWITCH_SYSTEM_EXTRA)
LIB_GCC=
if test "x$GCC" = "xyes"; then
case "$opsys" in
## cygwin: don't link against static libgcc.
cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
gnu-*)
## armin76@gentoo.org reported that the lgcc_s flag is necessary to
## build on ARM EABI under GNU/Linux. (Bug#5518)
## Note that m/arm.h never bothered to undefine LIB_GCC first.
if test "$machine" = "arm"; then
LIB_GCC="-lgcc_s"
else
## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
## immediately undefine it again and redefine it to empty.
## Was the C_SWITCH_X_SITE part really necessary?
## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
LIB_GCC=
fi
;;
## Ask GCC where to find libgcc.a.
*) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
esac
fi dnl if $GCC
AC_SUBST(LIB_GCC)
TOOLTIP_SUPPORT=
WINDOW_SUPPORT=
## If we're using X11/GNUstep, define some consequences.
if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.])
AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
test "$HAVE_X_WINDOWS" = "yes" && \
WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)"
fi
AC_SUBST(MOUSE_SUPPORT)
AC_SUBST(TOOLTIP_SUPPORT)
AC_SUBST(WINDOW_SUPPORT)
AH_TOP([/* GNU Emacs site configuration template file.
Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
......@@ -3262,12 +3309,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
])dnl
AH_BOTTOM([
/* If we're using X11/Carbon/GNUstep, define some consequences. */
#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS)
#define HAVE_WINDOW_SYSTEM
#define HAVE_MOUSE
#endif
/* Define AMPERSAND_FULL_NAME if you use the convention
that & in the full name stands for the login id. */
/* Turned on June 1996 supposing nobody will mind it. */
......@@ -3292,7 +3333,7 @@ AH_BOTTOM([
#endif
#endif /* __FreeBSD__ || __NetBSD__ || __linux__ */
/* If using GNU, then support inline function declarations. */
/* If using GNU, then support inline function declarations. */
/* Don't try to switch on inline handling as detected by AC_C_INLINE
generally, because even if non-gcc compilers accept `inline', they
may reject `extern inline'. */
......@@ -3317,7 +3358,7 @@ AH_BOTTOM([
/* Set up some defines, C and LD flags for NeXTstep interface on GNUstep.
(There is probably a better place to do this, but right now the Cocoa
side does this in s/darwin.h and we cannot
parallel this exactly since GNUstep is multi-OS. */
parallel this exactly since GNUstep is multi-OS. */
#ifdef HAVE_NS
# ifdef NS_IMPL_GNUSTEP
/* GNUstep needs a bit more pure memory. Of the existing knobs,
......@@ -3414,7 +3455,7 @@ extern char *getenv ();
#include "string.h"
#endif
#ifdef HAVE_STRINGS_H
#include "strings.h" /* May be needed for bcopy & al. */
#include "strings.h" /* May be needed for bcopy & al. */
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
......@@ -3581,7 +3622,10 @@ test "${exec_prefix}" != NONE &&
# 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.
[cpp_undefs="`echo $srcdir $configuration $canonical unix |
# 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'`"]
......@@ -3595,7 +3639,7 @@ AC_EGREP_CPP(yes..yes,
CPP_NEED_TRADITIONAL=no,
CPP_NEED_TRADITIONAL=yes)
AC_OUTPUT(Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
AC_OUTPUT(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, [
......@@ -3619,22 +3663,6 @@ if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
CPPFLAGS="$CPPFLAGS -traditional"
fi
echo creating lib-src/Makefile
( cd lib-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
)
echo creating src/Makefile
( cd src
rm -f junk.c junk1.c junk2.c
......