# HG changeset patch # User Kenichi Handa # Date 1272416438 -32400 # Node ID c6c7a71f6e16ab251a49de7e6bd19799ad9f9c12 # Parent fb2072139c8067644a4088865a91b7ae4c4aadcd# Parent c46b2d0614cb790ce656b085569b60abd74d5bb2 merge trunk diff -r fb2072139c80 -r c6c7a71f6e16 ChangeLog --- a/ChangeLog Mon Apr 26 21:02:08 2010 +0900 +++ b/ChangeLog Wed Apr 28 10:00:38 2010 +0900 @@ -1,3 +1,43 @@ +2010-04-27 Glenn Morris + + * configure.in (LIBXTR6): New output variable. Move unixware special + case here from src/s/unixware.h. + + * configure.in (LUCID_LIBW, MOTIF_LIBW): No longer substitute + in Makefiles. + (TOOLKIT_LIBW): New output variable, replacing LUCID_LIBW/MOTIF_LIBW. + + * configure.in (HAVE_MOTIF_2_1): Remove unused variable. + (LIBXP): No longer substitute in Makefiles. + (MOTIF_LIBW): New output variable. Move system-specific settings here + from src/s files. + +2010-04-27 Dan Nicolaescu + + Reduce CPP usage. + * configure.in (LIB_X11_LIB): Remove, inline in the only user. + (unexec): Define unconditionally, all platforms define + UNEXEC. AC_SUBST it. + (UNEXEC_SRC): Remove, unused. + (C_SWITCH_X_SYSTEM): Define using autoconf, not cpp. + +2010-04-27 Glenn Morris + + * configure.in (HAVE_MOTIF_2_1, HAVE_LIBXP): Remove unused AC_DEFINEs, + replaced by LIBXP. + + * configure.in (--with-crt-dir): Doc fix (now valid for all platforms). + (CRT_DIR): On (powerpc64|sparc64)-*-linux-gnu*, default to /usr/lib64. + On hpux10-20, default to /lib. + + * configure.in (LUCID_LIBW, LIBXP, WIDGET_OBJ): New output variables. + +2010-04-26 Dan Nicolaescu + + * configure.in (LIBS_MACHINE): Remove, unused. + + * configure.in (LIB_MATH): New output variable. Set it for some systems. + 2010-04-24 Glenn Morris * configure.in (CRT_DIR): New output variable. diff -r fb2072139c80 -r c6c7a71f6e16 admin/CPP-DEFINES --- a/admin/CPP-DEFINES Mon Apr 26 21:02:08 2010 +0900 +++ b/admin/CPP-DEFINES Wed Apr 28 10:00:38 2010 +0900 @@ -235,7 +235,6 @@ LIBXMU LIB_GCC LIB_MATH -LIB_MOTIF LIB_STANDARD LINKER LINUX_VERSION_CODE @@ -251,7 +250,6 @@ MUST_UNDEF__STDC__ NEED_BSDTTY NEED_ERRNO -NEED_LIBW NEED_UNISTD_H NLIST_STRUCT NOT_C_CODE diff -r fb2072139c80 -r c6c7a71f6e16 configure --- a/configure Mon Apr 26 21:02:08 2010 +0900 +++ b/configure Wed Apr 28 10:00:38 2010 +0900 @@ -702,6 +702,7 @@ INSTALL_INFO GZIP_PROG MAKEINFO +LIB_MATH CRT_DIR LIBSOUND PKG_CONFIG @@ -722,6 +723,7 @@ GCONF_CFLAGS GCONF_LIBS LIBSELINUX_LIBS +LIBXTR6 FONTCONFIG_CFLAGS FONTCONFIG_LIBS XFT_CFLAGS @@ -770,9 +772,11 @@ gameuser c_switch_system c_switch_machine +unexec LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE +C_SWITCH_X_SYSTEM X_TOOLKIT_TYPE machfile opsysfile @@ -788,6 +792,8 @@ OTHER_FILES XMENU_OBJ XOBJ +WIDGET_OBJ +TOOLKIT_LIBW LTLIBOBJS' ac_subst_files='' ac_user_opts=' @@ -1538,8 +1544,8 @@ --with-pkg-config-prog=PATH path to pkg-config for finding GTK and librsvg - --with-crt-dir=DIR directory containing crtn.o etc. This option is only - used on x86-64 and s390x GNU/Linux architectures. + --with-crt-dir=DIR directory containing crtn.o etc. The default is + /usr/lib, or /usr/lib64 on some platforms. --with-gnustep-conf=PATH path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf @@ -5737,6 +5743,20 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext +LIB_MATH=-lm + +case $opsys in + cygwin ) + LIB_MATH= + ;; + darwin ) + ## Adding -lm confuses the dynamic linker, so omit it. + LIB_MATH= + ;; +esac + + + #### Extract some information from the operating system and machine files. { $as_echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out @@ -5764,9 +5784,6 @@ echo ' #include "'${srcdir}'/src/'${opsysfile}'" #include "'${srcdir}'/src/'${machfile}'" -#ifndef LIBS_MACHINE -#define LIBS_MACHINE -#endif #ifndef LIBS_SYSTEM #define LIBS_SYSTEM #endif @@ -5776,21 +5793,13 @@ #ifndef C_SWITCH_MACHINE #define C_SWITCH_MACHINE #endif -configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM +configure___ libsrc_libs=LIBS_SYSTEM configure___ c_switch_system=C_SWITCH_SYSTEM configure___ c_switch_machine=C_SWITCH_MACHINE -#ifndef LIB_X11_LIB -#define LIB_X11_LIB -lX11 -#endif - -configure___ LIBX=LIB_X11_LIB - -#ifdef UNEXEC +configure___ LIBX=-lX11 + configure___ unexec=UNEXEC -#else -configure___ unexec=unexec.o -#endif #ifdef SYSTEM_MALLOC configure___ system_malloc=yes @@ -6237,31 +6246,42 @@ -## Note: at present CRT_DIR is only used for amdx86-64 and ibms390x. -## Other machine types hard-code the location in src/[ms]/*.h. -case "${canonical}" in - x86_64-*-linux-gnu* | s390x-*-linux-gnu* ) - - ## On x86-64 and s390x GNU/Linux distributions, the standard library - ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. - ## For anything else (eg /usr/lib32), it is up the user to specify - ## the location (bug#5655). - ## Test for crtn.o, not just the directory, because sometimes the - ## directory exists but does not have the relevant files (bug#1287). - ## If user specified a crt-dir, use that unconditionally. - if test "X$CRT_DIR" = "X"; then - CRT_DIR=/usr/lib - test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 - fi - - test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ - { { $as_echo "$as_me:$LINENO: error: crt*.o not found. Use --with-crt-dir to specify the location." >&5 -$as_echo "$as_me: error: crt*.o not found. Use --with-crt-dir to specify the location." >&2;} - { (exit 1); exit 1; }; } - ;; - -esac -test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib +## If user specified a crt-dir, use that unconditionally. +if test "X$CRT_DIR" = "X"; then + + case "$canonical" in + x86_64-*-linux-gnu* | s390x-*-linux-gnu*) + ## On x86-64 and s390x GNU/Linux distributions, the standard library + ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. + ## For anything else (eg /usr/lib32), it is up the user to specify + ## the location (bug#5655). + ## Test for crtn.o, not just the directory, because sometimes the + ## directory exists but does not have the relevant files (bug#1287). + ## FIXME better to test for binary compatibility somehow. + test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 + ;; + + powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; + esac + + case "$opsys" in + hpux10-20) CRT_DIR=/lib ;; + esac + + ## Default is /usr/lib. + test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib + +else + + ## Some platforms don't use any of these files, so it is not + ## appropriate to put this test outside the if block. + test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ + { { $as_echo "$as_me:$LINENO: error: crt*.o not found in specified location." >&5 +$as_echo "$as_me: error: crt*.o not found in specified location." >&2;} + { (exit 1); exit 1; }; } + +fi + @@ -12842,6 +12862,7 @@ HAVE_XAW3D=no +LUCID_LIBW= if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then if test "$with_xaw3d" != no; then { $as_echo "$as_me:$LINENO: checking for xaw3d" >&5 @@ -12908,6 +12929,7 @@ $as_echo "yes; using Lucid toolkit" >&6; } USE_X_TOOLKIT=LUCID HAVE_XAW3D=yes + LUCID_LIBW=-lXaw3d cat >>confdefs.h <<\_ACEOF #define HAVE_XAW3D 1 @@ -12976,6 +12998,7 @@ { $as_echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5 $as_echo "yes; using Lucid toolkit" >&6; } USE_X_TOOLKIT=LUCID + LUCID_LIBW=-lXaw elif test x"${USE_X_TOOLKIT}" = xLUCID; then { { $as_echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5 $as_echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;} @@ -12990,6 +13013,7 @@ X_TOOLKIT_TYPE=$USE_X_TOOLKIT +LIBXTR6= if test "${USE_X_TOOLKIT}" != "none"; then { $as_echo "$as_me:$LINENO: checking X11 toolkit version" >&5 $as_echo_n "checking X11 toolkit version... " >&6; } @@ -13057,6 +13081,11 @@ #define HAVE_X11XTR6 1 _ACEOF + LIBXTR6="-lSM -lICE" + case "$opsys" in + ## Use libw.a along with X11R6 Xt. + unixware) LIBXTR6="$LIBXTR6 -lw" ;; + esac else { $as_echo "$as_me:$LINENO: result: before 6" >&5 $as_echo "before 6" >&6; } @@ -13146,6 +13175,7 @@ test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" fi + # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. if test "${HAVE_X11}" = "yes"; then if test "${USE_X_TOOLKIT}" != "none"; then @@ -13227,6 +13257,7 @@ fi fi +LIBXP= if test "${USE_X_TOOLKIT}" = "MOTIF"; then { $as_echo "$as_me:$LINENO: checking for Motif version 2.1" >&5 $as_echo_n "checking for Motif version 2.1... " >&6; } @@ -13282,14 +13313,7 @@ fi { $as_echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5 $as_echo "$emacs_cv_motif_version_2_1" >&6; } - HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1 if test $emacs_cv_motif_version_2_1 = yes; then - HAVE_LIBXP=no - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MOTIF_2_1 1 -_ACEOF - { $as_echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then @@ -13356,16 +13380,9 @@ { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } if test $ac_cv_lib_Xp_XpCreateContext = yes; then - HAVE_LIBXP=yes -fi - - if test ${HAVE_LIBXP} = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBXP 1 -_ACEOF - - fi + LIBXP=-lXp +fi + else { $as_echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5 $as_echo_n "checking for LessTif where some systems put it... " >&6; } @@ -16068,6 +16085,7 @@ +C_SWITCH_X_SYSTEM= ### Use NeXTstep API to implement GUI. if test "${HAVE_NS}" = "yes"; then @@ -16089,6 +16107,9 @@ #define NS_IMPL_GNUSTEP 1 _ACEOF + # See also .m.o rule in Makefile.in */ + # FIXME: are all these flags really needed? Document here why. */ + C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" 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 if test "${NS_HAVE_NSINTEGER}" = "yes"; then @@ -25871,6 +25892,9 @@ +## Used in lwlib/Makefile.in. + + @@ -25920,11 +25944,6 @@ _ACEOF -cat >>confdefs.h <<_ACEOF -#define UNEXEC_SRC ${UNEXEC_SRC} -_ACEOF - - XMENU_OBJ= XOBJ= if test "${HAVE_X_WINDOWS}" = "yes" ; then @@ -25939,7 +25958,10 @@ +WIDGET_OBJ= +MOTIF_LIBW= if test "${USE_X_TOOLKIT}" != "none" ; then + WIDGET_OBJ=widget.o cat >>confdefs.h <<\_ACEOF #define USE_X_TOOLKIT 1 @@ -25957,8 +25979,36 @@ #define USE_MOTIF 1 _ACEOF - fi -fi + MOTIF_LIBW=-lXm + case "$opsys" in + gnu-linux) + ## Paul Abrahams says this is needed. + MOTIF_LIBW="$MOTIF_LIBW -lXpm" + ;; + + unixware) + ## Richard Anthony Ryan + ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. + MOTIF_LIBW="MOTIF_LIBW -lXimp" + ;; + + aix4-2) + ## olson@mcs.anl.gov says -li18n is needed by -lXm. + MOTIF_LIBW="$MOTIF_LIBW -li18n" + ;; + esac + MOTIF_LIBW="$MOTIF_LIBW $LIBXP" + fi +fi + + +case "$USE_X_TOOLKIT" in + MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; + LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; + *) TOOLKIT_LIBW= ;; +esac + + if test "${HAVE_X11}" = "yes" ; then cat >>confdefs.h <<\_ACEOF diff -r fb2072139c80 -r c6c7a71f6e16 configure.in --- a/configure.in Mon Apr 26 21:02:08 2010 +0900 +++ b/configure.in Wed Apr 28 10:00:38 2010 +0900 @@ -189,7 +189,7 @@ CRT_DIR= AC_ARG_WITH([crt-dir],dnl [AS_HELP_STRING([--with-crt-dir=DIR],[directory containing crtn.o etc. -This option is only used on x86-64 and s390x GNU/Linux architectures.])]) +The default is /usr/lib, or /usr/lib64 on some platforms.])]) CRT_DIR="${with_crt_dir}" AC_ARG_WITH([gnustep-conf],dnl @@ -828,6 +828,20 @@ LDFLAGS=$late_LDFLAGS [AC_MSG_RESULT(no)]) +LIB_MATH=-lm + +case $opsys in + cygwin ) + LIB_MATH= + ;; + darwin ) + ## Adding -lm confuses the dynamic linker, so omit it. + LIB_MATH= + ;; +esac + +AC_SUBST(LIB_MATH) + #### Extract some information from the operating system and machine files. AC_CHECKING([the machine- and system-dependent files to find out @@ -852,9 +866,6 @@ echo ' #include "'${srcdir}'/src/'${opsysfile}'" #include "'${srcdir}'/src/'${machfile}'" -#ifndef LIBS_MACHINE -#define LIBS_MACHINE -#endif #ifndef LIBS_SYSTEM #define LIBS_SYSTEM #endif @@ -864,21 +875,13 @@ #ifndef C_SWITCH_MACHINE #define C_SWITCH_MACHINE #endif -configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM +configure___ libsrc_libs=LIBS_SYSTEM configure___ c_switch_system=C_SWITCH_SYSTEM configure___ c_switch_machine=C_SWITCH_MACHINE -#ifndef LIB_X11_LIB -#define LIB_X11_LIB -lX11 -#endif - -configure___ LIBX=LIB_X11_LIB - -#ifdef UNEXEC +configure___ LIBX=-lX11 + configure___ unexec=UNEXEC -#else -configure___ unexec=unexec.o -#endif #ifdef SYSTEM_MALLOC configure___ system_malloc=yes @@ -972,29 +975,40 @@ AC_SYS_LARGEFILE -## Note: at present CRT_DIR is only used for amdx86-64 and ibms390x. -## Other machine types hard-code the location in src/[ms]/*.h. -case "${canonical}" in - x86_64-*-linux-gnu* | s390x-*-linux-gnu* ) - - ## On x86-64 and s390x GNU/Linux distributions, the standard library - ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. - ## For anything else (eg /usr/lib32), it is up the user to specify - ## the location (bug#5655). - ## Test for crtn.o, not just the directory, because sometimes the - ## directory exists but does not have the relevant files (bug#1287). - ## If user specified a crt-dir, use that unconditionally. - if test "X$CRT_DIR" = "X"; then - CRT_DIR=/usr/lib - test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 - fi - - test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ - AC_MSG_ERROR([crt*.o not found. Use --with-crt-dir to specify the location.]) - ;; - -esac -test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib +## If user specified a crt-dir, use that unconditionally. +if test "X$CRT_DIR" = "X"; then + + case "$canonical" in + x86_64-*-linux-gnu* | s390x-*-linux-gnu*) + ## On x86-64 and s390x GNU/Linux distributions, the standard library + ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. + ## For anything else (eg /usr/lib32), it is up the user to specify + ## the location (bug#5655). + ## Test for crtn.o, not just the directory, because sometimes the + ## directory exists but does not have the relevant files (bug#1287). + ## FIXME better to test for binary compatibility somehow. + test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 + ;; + + powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; + esac + + case "$opsys" in + hpux10-20) CRT_DIR=/lib ;; + esac + + ## Default is /usr/lib. + test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib + +else + + ## Some platforms don't use any of these files, so it is not + ## appropriate to put this test outside the if block. + test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ + AC_MSG_ERROR([crt*.o not found in specified location.]) + +fi + AC_SUBST(CRT_DIR) @@ -1773,6 +1787,7 @@ dnl Do not put whitespace before the #include statements below. dnl Older compilers (eg sunos4 cc) choke on it. HAVE_XAW3D=no +LUCID_LIBW= if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then if test "$with_xaw3d" != no; then AC_MSG_CHECKING(for xaw3d) @@ -1790,6 +1805,7 @@ AC_MSG_RESULT([yes; using Lucid toolkit]) USE_X_TOOLKIT=LUCID HAVE_XAW3D=yes + LUCID_LIBW=-lXaw3d AC_DEFINE(HAVE_XAW3D, 1, [Define to 1 if you have the Xaw3d library (-lXaw3d).]) else @@ -1805,6 +1821,7 @@ if test $emacs_cv_xaw = yes; then AC_MSG_RESULT([yes; using Lucid toolkit]) USE_X_TOOLKIT=LUCID + LUCID_LIBW=-lXaw elif test x"${USE_X_TOOLKIT}" = xLUCID; then AC_MSG_ERROR([Lucid toolkit requires X11/Xaw include files]) else @@ -1816,6 +1833,7 @@ X_TOOLKIT_TYPE=$USE_X_TOOLKIT +LIBXTR6= if test "${USE_X_TOOLKIT}" != "none"; then AC_MSG_CHECKING(X11 toolkit version) AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6, @@ -1829,6 +1847,11 @@ AC_MSG_RESULT(6 or newer) AC_DEFINE(HAVE_X11XTR6, 1, [Define to 1 if you have the X11R6 or newer version of Xt.]) + LIBXTR6="-lSM -lICE" + case "$opsys" in + ## Use libw.a along with X11R6 Xt. + unixware) LIBXTR6="$LIBXTR6 -lw" ;; + esac else AC_MSG_RESULT(before 6) fi @@ -1844,6 +1867,7 @@ AC_CHECK_LIB(Xmu, XmuConvertStandardSelection) test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" fi +AC_SUBST(LIBXTR6) # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. if test "${HAVE_X11}" = "yes"; then @@ -1852,6 +1876,7 @@ fi fi +LIBXP= if test "${USE_X_TOOLKIT}" = "MOTIF"; then AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, [AC_TRY_COMPILE([#include ], @@ -1861,16 +1886,8 @@ Motif version prior to 2.1. #endif], emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)]) - HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1 if test $emacs_cv_motif_version_2_1 = yes; then - HAVE_LIBXP=no - AC_DEFINE(HAVE_MOTIF_2_1, 1, - [Define to 1 if you have Motif 2.1 or newer.]) - AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes) - if test ${HAVE_LIBXP} = yes; then - AC_DEFINE(HAVE_LIBXP, 1, - [Define to 1 if you have the Xp library (-lXp).]) - fi + AC_CHECK_LIB(Xp, XpCreateContext, LIBXP=-lXp) else AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif, # We put this in CFLAGS temporarily to precede other -I options @@ -2247,6 +2264,7 @@ 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 header file.])]) +C_SWITCH_X_SYSTEM= ### 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.]) @@ -2256,6 +2274,9 @@ fi if test "${NS_IMPL_GNUSTEP}" = "yes"; then 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 */ + # FIXME: are all these flags really needed? Document here why. */ + C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing" 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 if test "${NS_HAVE_NSINTEGER}" = "yes"; then @@ -2746,10 +2767,13 @@ AC_SUBST(gameuser) AC_SUBST(c_switch_system) AC_SUBST(c_switch_machine) +AC_SUBST(unexec) AC_SUBST(LD_SWITCH_X_SITE) AC_SUBST(LD_SWITCH_X_SITE_AUX) AC_SUBST(C_SWITCH_X_SITE) +AC_SUBST(C_SWITCH_X_SYSTEM) AC_SUBST(CFLAGS) +## Used in lwlib/Makefile.in. AC_SUBST(X_TOOLKIT_TYPE) AC_SUBST(machfile) AC_SUBST(opsysfile) @@ -2788,8 +2812,6 @@ 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.]) -AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC}, - [Define to the unexec source file name.]) XMENU_OBJ= XOBJ= @@ -2802,14 +2824,45 @@ AC_SUBST(XMENU_OBJ) AC_SUBST(XOBJ) +WIDGET_OBJ= +MOTIF_LIBW= if test "${USE_X_TOOLKIT}" != "none" ; then + WIDGET_OBJ=widget.o AC_DEFINE(USE_X_TOOLKIT, 1, [Define to 1 if using an X toolkit.]) if test "${USE_X_TOOLKIT}" = "LUCID"; then AC_DEFINE(USE_LUCID, 1, [Define to 1 if using the Lucid X toolkit.]) elif test "${USE_X_TOOLKIT}" = "MOTIF"; then AC_DEFINE(USE_MOTIF, 1, [Define to 1 if using the Motif X toolkit.]) + MOTIF_LIBW=-lXm + case "$opsys" in + gnu-linux) + ## Paul Abrahams says this is needed. + MOTIF_LIBW="$MOTIF_LIBW -lXpm" + ;; + + unixware) + ## Richard Anthony Ryan + ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2. + MOTIF_LIBW="MOTIF_LIBW -lXimp" + ;; + + aix4-2) + ## olson@mcs.anl.gov says -li18n is needed by -lXm. + MOTIF_LIBW="$MOTIF_LIBW -li18n" + ;; + esac + MOTIF_LIBW="$MOTIF_LIBW $LIBXP" fi fi +AC_SUBST(WIDGET_OBJ) + +case "$USE_X_TOOLKIT" in + MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; + LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; + *) TOOLKIT_LIBW= ;; +esac +AC_SUBST(TOOLKIT_LIBW) + if test "${HAVE_X11}" = "yes" ; then AC_DEFINE(HAVE_X11, 1, [Define to 1 if you want to use version 11 of X windows. @@ -2918,9 +2971,6 @@ parallel this exactly since GNUstep is multi-OS. */ #ifdef HAVE_NS # ifdef NS_IMPL_GNUSTEP -/* See also .m.o rule in Makefile.in */ -/* FIXME: are all these flags really needed? Document here why. */ -# define C_SWITCH_X_SYSTEM -D_REENTRANT -fPIC -fno-strict-aliasing /* GNUstep needs a bit more pure memory. Of the existing knobs, SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ # define SYSTEM_PURESIZE_EXTRA 30000 diff -r fb2072139c80 -r c6c7a71f6e16 lib-src/ChangeLog --- a/lib-src/ChangeLog Mon Apr 26 21:02:08 2010 +0900 +++ b/lib-src/ChangeLog Wed Apr 28 10:00:38 2010 +0900 @@ -1,3 +1,7 @@ +2010-04-26 Dan Nicolaescu + + * Makefile.in (LIBS_MACHINE): Remove all uses, unused. + 2010-04-18 Juanma Barranquero Add stubs for Windows, required after CVE-2010-0825 change. diff -r fb2072139c80 -r c6c7a71f6e16 lib-src/Makefile.in --- a/lib-src/Makefile.in Mon Apr 26 21:02:08 2010 +0900 +++ b/lib-src/Makefile.in Wed Apr 28 10:00:38 2010 +0900 @@ -171,11 +171,6 @@ #define LIBS_SYSTEM #endif -/* Some m/MACHINE.h files define this to request special libraries. */ -#ifndef LIBS_MACHINE -#define LIBS_MACHINE -#endif - #undef MOVEMAIL_NEEDS_BLESSING #ifndef MAIL_USE_FLOCK #ifndef MAIL_USE_LOCKF @@ -189,7 +184,7 @@ #define BLESSMAIL #endif -LOADLIBES=LIBS_SYSTEM LIBS_MACHINE +LOADLIBES=LIBS_SYSTEM .SUFFIXES: .m diff -r fb2072139c80 -r c6c7a71f6e16 lisp/ChangeLog --- a/lisp/ChangeLog Mon Apr 26 21:02:08 2010 +0900 +++ b/lisp/ChangeLog Wed Apr 28 10:00:38 2010 +0900 @@ -1,3 +1,36 @@ +2010-04-27 Stefan Monnier + + * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): + Avoid re-enabling a minor mode after the user turned the minor mode + off if MODE-enable-in-buffers is run twice (typically once from + fundamental-mode's after-change-major-mode-hook and a second time from + run-mode-hook's own after-change-major-mode-hook). + + * emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully. + +2010-04-27 Sam Steingold + + * progmodes/bug-reference.el (bug-reference-url-format): Mark as + `safe-local-variable' if the value is a string or a function, as + documented and implemented on 2010-04-02. + +2010-04-27 Juanma Barranquero + + * ido.el (ido-buffer-internal): Bind `ido-use-virtual-buffers' to nil + when method is 'kill. + +2010-04-27 Agustín Martín + + * ispell.el (ispell-init-process): Fix personal dictionary condition + in default directory check. + (ispell-init-process,ispell-kill-ispell,kill-buffer-hook): + Kill ispell process when killing its associated buffer. + +2010-04-27 Jan Djärv + + * desktop.el (desktop-kill): ask-if-new: Ask if desktop file exists, + but we aren't using it. + 2010-04-25 Jan Djärv * tool-bar.el (tool-bar-local-item-from-menu): Revert unintended diff -r fb2072139c80 -r c6c7a71f6e16 lisp/desktop.el --- a/lisp/desktop.el Mon Apr 26 21:02:08 2010 +0900 +++ b/lisp/desktop.el Wed Apr 28 10:00:38 2010 +0900 @@ -620,7 +620,10 @@ (when (and desktop-save-mode (let ((exists (file-exists-p (desktop-full-file-name)))) (or (eq desktop-save t) - (and exists (memq desktop-save '(ask-if-new if-exists))) + (and exists (eq desktop-save 'if-exists)) + ;; If it exists, but we aren't using it, we are going + ;; to ask for a new directory below. + (and exists desktop-dirname (eq desktop-save 'ask-if-new)) (and (or (memq desktop-save '(ask ask-if-new)) (and exists (eq desktop-save 'ask-if-exists))) diff -r fb2072139c80 -r c6c7a71f6e16 lisp/emacs-lisp/easy-mmode.el --- a/lisp/emacs-lisp/easy-mmode.el Mon Apr 26 21:02:08 2010 +0900 +++ b/lisp/emacs-lisp/easy-mmode.el Wed Apr 28 10:00:38 2010 +0900 @@ -361,13 +361,14 @@ (dolist (buf ,MODE-buffers) (when (buffer-live-p buf) (with-current-buffer buf - (if ,mode - (unless (eq ,MODE-major-mode major-mode) - (,mode -1) - (,turn-on) - (setq ,MODE-major-mode major-mode)) - (,turn-on) - (setq ,MODE-major-mode major-mode)))))) + (unless (eq ,MODE-major-mode major-mode) + (if ,mode + (progn + (,mode -1) + (,turn-on) + (setq ,MODE-major-mode major-mode)) + (,turn-on) + (setq ,MODE-major-mode major-mode))))))) (put ',MODE-enable-in-buffers 'definition-name ',global-mode) (defun ,MODE-check-buffers () diff -r fb2072139c80 -r c6c7a71f6e16 lisp/emacs-lisp/lisp.el --- a/lisp/emacs-lisp/lisp.el Mon Apr 26 21:02:08 2010 +0900 +++ b/lisp/emacs-lisp/lisp.el Wed Apr 28 10:00:38 2010 +0900 @@ -624,9 +624,12 @@ (interactive) (let* ((data (lisp-completion-at-point predicate)) (plist (nthcdr 3 data))) - (let ((completion-annotate-function (plist-get plist :annotate-function))) - (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) - (plist-get plist :predicate))))) + (if (null data) + (minibuffer-message "Nothing to complete") + (let ((completion-annotate-function + (plist-get plist :annotate-function))) + (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) + (plist-get plist :predicate)))))) (defun lisp-completion-at-point (&optional predicate) diff -r fb2072139c80 -r c6c7a71f6e16 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Mon Apr 26 21:02:08 2010 +0900 +++ b/lisp/gnus/ChangeLog Wed Apr 28 10:00:38 2010 +0900 @@ -1,3 +1,7 @@ +2010-04-27 Katsumi Yamaoka + + * gnus-util.el: Don't load tm and apel XEmacs packages when compiling. + 2010-04-23 Stefan Monnier * mm-util.el (mm-find-buffer-file-coding-system): diff -r fb2072139c80 -r c6c7a71f6e16 lisp/gnus/gnus-util.el --- a/lisp/gnus/gnus-util.el Mon Apr 26 21:02:08 2010 +0900 +++ b/lisp/gnus/gnus-util.el Wed Apr 28 10:00:38 2010 +0900 @@ -1070,23 +1070,15 @@ ;;; Functions for saving to babyl/mail files. (eval-when-compile - (condition-case nil - (progn - (require 'rmail) - (autoload 'rmail-update-summary "rmailsum")) - (error - (define-compiler-macro rmail-select-summary (&rest body) - ;; Rmail of the XEmacs version is supplied by the package, and - ;; requires tm and apel packages. However, there may be those - ;; who haven't installed those packages. This macro helps such - ;; people even if they install those packages later. - `(eval '(rmail-select-summary ,@body))) - ;; If there's rmail but there's no tm (or there's apel of the - ;; mainstream, not the XEmacs version), loading rmail of the XEmacs - ;; version fails halfway, however it provides the rmail-select-summary - ;; macro which uses the following functions: - (autoload 'rmail-summary-displayed "rmail") - (autoload 'rmail-maybe-display-summary "rmail")))) + (if (featurep 'xemacs) + ;; Don't load tm and apel XEmacs packages that provide some + ;; Emacs emulating functions and variables. + (let ((features features)) + (provide 'tm-view) + (unless (fboundp 'set-alist) (defalias 'set-alist 'ignore)) + (require 'rmail)) ;; It requires tm-view that loads apel. + (require 'rmail)) + (autoload 'rmail-update-summary "rmailsum")) (defvar mm-text-coding-system) diff -r fb2072139c80 -r c6c7a71f6e16 lisp/ido.el --- a/lisp/ido.el Mon Apr 26 21:02:08 2010 +0900 +++ b/lisp/ido.el Wed Apr 28 10:00:38 2010 +0900 @@ -2183,7 +2183,9 @@ (ido-current-directory nil) (ido-directory-nonreadable nil) (ido-directory-too-big nil) - (ido-use-virtual-buffers ido-use-virtual-buffers) + (ido-use-virtual-buffers (if (eq method 'kill) + nil ;; Don't consider virtual buffers for killing + ido-use-virtual-buffers)) (require-match (confirm-nonexistent-file-or-buffer)) (buf (ido-read-internal 'buffer (or prompt "Buffer: ") 'ido-buffer-history default require-match initial)) diff -r fb2072139c80 -r c6c7a71f6e16 lisp/progmodes/bug-reference.el --- a/lisp/progmodes/bug-reference.el Mon Apr 26 21:02:08 2010 +0900 +++ b/lisp/progmodes/bug-reference.el Wed Apr 28 10:00:38 2010 +0900 @@ -51,7 +51,8 @@ There is no default setting for this, it must be set per file.") ;;;###autoload -(put 'bug-reference-url-format 'safe-local-variable 'stringp) +(put 'bug-reference-url-format 'safe-local-variable + (lambda (s) (or (stringp s) (functionp s)))) (defconst bug-reference-bug-regexp "\\([Bb]ug ?#\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z-+]+/\\)\\([0-9]+\\)" diff -r fb2072139c80 -r c6c7a71f6e16 lisp/textmodes/ispell.el --- a/lisp/textmodes/ispell.el Mon Apr 26 21:02:08 2010 +0900 +++ b/lisp/textmodes/ispell.el Wed Apr 28 10:00:38 2010 +0900 @@ -1334,6 +1334,9 @@ (defvar ispell-process-directory nil "The directory where `ispell-process' was started.") +(defvar ispell-process-buffer-name nil + "The buffer where `ispell-process' was started.") + (defvar ispell-filter nil "Output filter from piped calls to Ispell.") @@ -2614,9 +2617,11 @@ "Check status of Ispell process and start if necessary." (if (and ispell-process (eq (ispell-process-status) 'run) - ;; If we're using a personal dictionary, ensure - ;; we're in the same default directory! - (or (not ispell-personal-dictionary) + ;; Unless we are using an explicit personal dictionary, + ;; ensure we're in the same default directory! + ;; Restart check for personal dictionary is done in + ;; `ispell-internal-change-dictionary', called from `ispell-buffer-local-dict' + (or (or ispell-local-pdict ispell-personal-dictionary) (equal ispell-process-directory default-directory))) (setq ispell-filter nil ispell-filter-continue nil) ;; may need to restart to select new personal dictionary. @@ -2628,7 +2633,8 @@ ispell-process-directory default-directory ispell-process (ispell-start-process) ispell-filter nil - ispell-filter-continue nil) + ispell-filter-continue nil + ispell-process-buffer-name (buffer-name)) (if ispell-async-processp (set-process-filter ispell-process 'ispell-filter)) ;; protect against bogus binding of `enable-multibyte-characters' in XEmacs @@ -2689,10 +2695,16 @@ (kill-buffer ispell-session-buffer) (setq ispell-output-buffer nil ispell-session-buffer nil)) + (setq ispell-process-buffer-name nil) (setq ispell-process nil) (message "Ispell process killed") nil)) +;; Kill ispell process when killing its associated buffer +(add-hook 'kill-buffer-hook + '(lambda () + (if (equal ispell-process-buffer-name (buffer-name)) + (ispell-kill-ispell t)))) ;;; ispell-change-dictionary is set in some people's hooks. Maybe this should ;;; call ispell-init-process rather than wait for a spell checking command? diff -r fb2072139c80 -r c6c7a71f6e16 lwlib/ChangeLog --- a/lwlib/ChangeLog Mon Apr 26 21:02:08 2010 +0900 +++ b/lwlib/ChangeLog Wed Apr 28 10:00:38 2010 +0900 @@ -1,3 +1,7 @@ +2010-04-27 Dan Nicolaescu + + * Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf. + 2010-04-21 Jan Djärv * xlwmenu.c (expose_cb): diff -r fb2072139c80 -r c6c7a71f6e16 lwlib/Makefile.in --- a/lwlib/Makefile.in Mon Apr 26 21:02:08 2010 +0900 +++ b/lwlib/Makefile.in Wed Apr 28 10:00:38 2010 +0900 @@ -26,6 +26,7 @@ srcdir=@srcdir@ VPATH=@srcdir@ C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ +C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@ C_SWITCH_SYSTEM=@c_switch_system@ C_SWITCH_MACHINE=@c_switch_machine@ diff -r fb2072139c80 -r c6c7a71f6e16 oldXMenu/ChangeLog --- a/oldXMenu/ChangeLog Mon Apr 26 21:02:08 2010 +0900 +++ b/oldXMenu/ChangeLog Wed Apr 28 10:00:38 2010 +0900 @@ -1,3 +1,7 @@ +2010-04-27 Dan Nicolaescu + + * Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf. + 2010-04-23 Dan Nicolaescu * Makefile.in (ALL_CFLAGS): Remove C_SWITCH_X_MACHINE, unused. diff -r fb2072139c80 -r c6c7a71f6e16 oldXMenu/Makefile.in --- a/oldXMenu/Makefile.in Mon Apr 26 21:02:08 2010 +0900 +++ b/oldXMenu/Makefile.in Wed Apr 28 10:00:38 2010 +0900 @@ -46,6 +46,7 @@ srcdir=@srcdir@ VPATH=@srcdir@ C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ +C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@ C_SWITCH_SYSTEM=@c_switch_system@ C_SWITCH_MACHINE=@c_switch_machine@ diff -r fb2072139c80 -r c6c7a71f6e16 src/ChangeLog --- a/src/ChangeLog Mon Apr 26 21:02:08 2010 +0900 +++ b/src/ChangeLog Wed Apr 28 10:00:38 2010 +0900 @@ -1,3 +1,56 @@ +2010-04-27 Glenn Morris + + * Makefile.in (LIBXTR6): Set with configure, not cpp. + * s/unixware.h (NEED_LIBW): Remove definition. + + * Makefile.in (LUCID_LIBW, MOTIF_LIBW): Remove, replacing by... + (TOOLKIT_LIBW): New, set by configure. + (@X_TOOLKIT_TYPE@): No longer define it. + + * Makefile.in (LIBXP): Remove, since included in MOTIF_LIBW. + (MOTIF_LIBW): Set with configure, not cpp. + * s/aix4-2.h (LIB_MOTIF): + * s/gnu-linux.h (LIB_MOTIF): + * s/unixware.h (LIB_MOTIF): Move to configure.in. + +2010-04-27 Dan Nicolaescu + + Reduce CPP usage. + * Makefile.in (LIB_X11_LIB): Remove, inline in the only user. + (obj): Use autoconf for unexec instead of cpp. + (C_SWITCH_SYSTEM, C_SWITCH_MACHINE, C_SWITCH_X_SITE): Remove + definitions and undefs. Inline definitions in the only user. + (ALL_CFLAGS): Substitute C_SWITCH_X_SYSTEM using autoconf. + +2010-04-27 Glenn Morris + + * m/amdx86-64.h (START_FILES, LIB_STANDARD): Change the logic around, + since the defaults (set by the system file) are fine in most cases. + [GNU_LINUX, __OpenBSD__, __NetBSD__, __APPLE__]: Remove sections. + * m/ibms390x.h (START_FILES, LIB_STANDARD): + * m/macppc.h (START_FILES, LIB_STANDARD) [GNU_LINUX]: + * m/sparc.h (START_FILES, LIB_STANDARD) [__linux__]: + Remove definitions, since they are set correctly in s/gnu-linux.h. + * s/freebsd.h (START_FILES, LIB_STANDARD): + * s/gnu-linux.h (START_FILES, LIB_STANDARD): + * s/hpux10-20.h (START_FILES): + * s/netbsd.h (START_FILES, LIB_STANDARD, START_FILES_1, END_FILES_1): + Use $CRT_DIR in place of fixed /usr/lib, /lib directories. + + * Makefile.in (LIBXP, LUCID_LIBW, WIDGET_OBJ): Set via configure. + (MOTIF_LIBW): Use $LIBXP. + (otherobj): Use $WIDGET_OBJ. + +2010-04-26 Dan Nicolaescu + + * Makefile.in (LIBS_MACHINE): Remove, unused. + + Use autoconf instead of cpp for LIB_MATH. + * s/darwin.h (LIB_MATH): Do not define here, move to configure. + * s/cygwin.h (LIB_MATH): Likewise. + * Makefile.in (LIB_MATH): Do not define with cpp. + (LIBES): Use autoconf for LIB_MATH. + 2010-04-26 Kenichi Handa * composite.c (Ffind_composition_internal): Fix the return value diff -r fb2072139c80 -r c6c7a71f6e16 src/Makefile.in --- a/src/Makefile.in Mon Apr 26 21:02:08 2010 +0900 +++ b/src/Makefile.in Wed Apr 28 10:00:38 2010 +0900 @@ -68,7 +68,6 @@ OTHER_FILES = @OTHER_FILES@ -## Only used by amdx86-64 and ibms390x GNU/Linux. CRT_DIR=@CRT_DIR@ LIBTIFF=@LIBTIFF@ @@ -78,11 +77,6 @@ LIBXPM=@LIBXPM@ XFT_LIBS=@XFT_LIBS@ -C_SWITCH_SYSTEM=@c_switch_system@ -C_SWITCH_MACHINE=@c_switch_machine@ - -C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ - DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_OBJ = @DBUS_OBJ@ @@ -94,15 +88,22 @@ LIBXSM=@LIBXSM@ +LIBXTR6=@LIBXTR6@ + XMENU_OBJ=@XMENU_OBJ@ XOBJ=@XOBJ@ +TOOLKIT_LIBW=@TOOLKIT_LIBW@ + LIBSOUND= @LIBSOUND@ CFLAGS_SOUND= @CFLAGS_SOUND@ RSVG_LIBS= @RSVG_LIBS@ RSVG_CFLAGS= @RSVG_CFLAGS@ +## widget.o if USE_X_TOOLKIT, otherwise empty. +WIDGET_OBJ=@WIDGET_OBJ@ + LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ INTERVALS_H = dispextern.h intervals.h composite.h @@ -125,11 +126,6 @@ DEPFLAGS = -MMD -MF deps/$*.d #endif -/* Undefine until the user can be moved in the non-cpp section. */ -#undef C_SWITCH_SYSTEM -#undef C_SWITCH_MACHINE -#undef C_SWITCH_X_SITE - /* Do not let the file name mktime.c get messed up. */ #ifdef mktime #undef mktime @@ -170,15 +166,6 @@ #define LIBS_SYSTEM #endif -/* Some m/MACHINE.h files define this to request special libraries. */ -#ifndef LIBS_MACHINE -#define LIBS_MACHINE -#endif - -#ifndef LIB_MATH -# define LIB_MATH -lm -#endif /* LIB_MATH */ - /* Some s/SYSTEM.h files define this to request special switches in ld. */ #ifndef LD_SWITCH_SYSTEM #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) @@ -200,18 +187,10 @@ #endif /* These macros are for switches specifically related to X Windows. */ -#ifndef C_SWITCH_X_SYSTEM -#define C_SWITCH_X_SYSTEM -#endif - #ifndef LD_SWITCH_X_SITE #define LD_SWITCH_X_SITE #endif -#ifndef LD_SWITCH_X_DEFAULT -#define LD_SWITCH_X_DEFAULT -#endif - STARTFILES = START_FILES @@ -235,13 +214,9 @@ -DHAVE_CONFIG_H is needed for some other files to take advantage of the information in ``config.h''. */ -#undef C_SWITCH_MACHINE -#undef C_SWITCH_SYSTEM -#undef C_SWITCH_X_SITE - /* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM since it may have -I options that should override those two. */ -ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) C_SWITCH_X_SYSTEM ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS} +ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} @c_switch_machine@ @c_switch_system@ @C_SWITCH_X_SITE@ @C_SWITCH_X_SYSTEM@ ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS} ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@ .SUFFIXES: .m @@ -256,10 +231,6 @@ #endif $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $< -#ifndef LIB_X11_LIB -#define LIB_X11_LIB -lX11 -#endif - #ifdef HAVE_X_WINDOWS #ifdef HAVE_MENUS @@ -285,31 +256,7 @@ #endif /* not HAVE_MENUS */ #ifdef USE_X_TOOLKIT -# define @X_TOOLKIT_TYPE@ -# if HAVE_XAW3D -LUCID_LIBW= -lXaw3d -# else -LUCID_LIBW= -lXaw -# endif -# if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP) -# define LIB_MOTIF_EXTRA -lXp -# else -# define LIB_MOTIF_EXTRA -# endif -# ifdef LIB_MOTIF -MOTIF_LIBW= LIB_MOTIF LIB_MOTIF_EXTRA -# else -MOTIF_LIBW= -lXm LIB_MOTIF_EXTRA -# endif -LIBW=$(@X_TOOLKIT_TYPE@_LIBW) - -#ifdef HAVE_X11XTR6 -#ifdef NEED_LIBW -LIBXTR6 = -lSM -lICE -lw -#else -LIBXTR6 = -lSM -lICE -#endif -#endif +LIBW=$(TOOLKIT_LIBW) #ifndef LIBXMU #define LIBXMU -lXmu @@ -329,10 +276,8 @@ #endif /* not USE_X_TOOLKIT */ #ifdef HAVE_X11 -/* LD_SWITCH_X_DEFAULT comes after everything else that specifies - options for where to find X libraries, but before those libraries. */ -X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT -LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) $(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) LIB_X11_LIB $(XFT_LIBS) +X11_LDFLAGS = LD_SWITCH_X_SITE +LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) $(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) -lX11 $(XFT_LIBS) #else /* not HAVE_X11 */ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE #endif /* not HAVE_X11 */ @@ -452,7 +397,7 @@ cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \ alloc.o data.o doc.o editfns.o callint.o \ eval.o floatfns.o fns.o font.o print.o lread.o \ - syntax.o UNEXEC bytecode.o \ + syntax.o @unexec@ bytecode.o \ process.o callproc.o \ region-cache.o sound.o atimer.o \ doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \ @@ -499,20 +444,13 @@ #endif /* SYSTEM_MALLOC */ -#ifdef USE_X_TOOLKIT -widgetobj= widget.o -#else /* not USE_X_TOOLKIT */ -widgetobj= -#endif /* not USE_X_TOOLKIT */ - - /* define otherobj as list of object files that make-docfile should not be told about. */ #ifdef CYGWIN /* Cygwin differs because of its unexec(). */ -otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(widgetobj) $(LIBOBJS) +otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(WIDGET_OBJ) $(LIBOBJS) #else -otherobj= $(termcapobj) lastfile.o $(mallocobj) $(widgetobj) $(LIBOBJS) +otherobj= $(termcapobj) lastfile.o $(mallocobj) $(WIDGET_OBJ) $(LIBOBJS) #endif #ifdef HAVE_MOUSE @@ -792,10 +730,10 @@ with GCC, we might need gnulib again after them. */ LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \ - @LIBGPM@ @LIBRESOLV@ LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \ + @LIBGPM@ @LIBRESOLV@ LIBS_SYSTEM LIBS_TERMCAP \ $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \ @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \ - $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR) + $(GNULIB_VAR) @LIB_MATH@ LIB_STANDARD $(GNULIB_VAR) all: emacs${EXEEXT} $(OTHER_FILES) @@ -865,17 +803,12 @@ /* Supply an ordering for parallel make. */ ../src/$(OLDXMENU): ${OLDXMENU} -/* Encode the values of these two macros in Make variables, - so we can use $(...) to substitute their values within "...". */ -C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM - #ifdef USE_X_TOOLKIT $(OLDXMENU): really-lwlib really-lwlib: cd ${lwlibdir}; ${MAKE} ${MFLAGS} \ - CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \ - "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" + CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' @true /* make -t should not create really-lwlib. */ .PHONY: really-lwlib #else /* not USE_X_TOOLKIT */ @@ -883,8 +816,7 @@ really-oldXMenu: cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \ - CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \ - "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)" + CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' @true /* make -t should not create really-oldXMenu. */ .PHONY: really-oldXMenu #endif /* not USE_X_TOOLKIT */ diff -r fb2072139c80 -r c6c7a71f6e16 src/config.in --- a/src/config.in Mon Apr 26 21:02:08 2010 +0900 +++ b/src/config.in Wed Apr 28 10:00:38 2010 +0900 @@ -405,9 +405,6 @@ /* Define to 1 if you have the `Xmu' library (-lXmu). */ #undef HAVE_LIBXMU -/* Define to 1 if you have the Xp library (-lXp). */ -#undef HAVE_LIBXP - /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H @@ -488,9 +485,6 @@ /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP -/* Define to 1 if you have Motif 2.1 or newer. */ -#undef HAVE_MOTIF_2_1 - /* Define to 1 if you have the `mremap' function. */ #undef HAVE_MREMAP @@ -907,9 +901,6 @@ . */ #undef UMAX4_3 -/* Define to the unexec source file name. */ -#undef UNEXEC_SRC - /* Define to 1 if using GTK. */ #undef USE_GTK @@ -1075,9 +1066,6 @@ parallel this exactly since GNUstep is multi-OS. */ #ifdef HAVE_NS # ifdef NS_IMPL_GNUSTEP -/* See also .m.o rule in Makefile.in */ -/* FIXME: are all these flags really needed? Document here why. */ -# define C_SWITCH_X_SYSTEM -D_REENTRANT -fPIC -fno-strict-aliasing /* GNUstep needs a bit more pure memory. Of the existing knobs, SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ # define SYSTEM_PURESIZE_EXTRA 30000 diff -r fb2072139c80 -r c6c7a71f6e16 src/m/amdx86-64.h --- a/src/m/amdx86-64.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/m/amdx86-64.h Wed Apr 28 10:00:38 2010 +0900 @@ -67,34 +67,18 @@ /* Define XPNTR to avoid or'ing with DATA_SEG_BITS */ #undef DATA_SEG_BITS -#ifdef __OpenBSD__ -#undef START_FILES -#define START_FILES pre-crt0.o /usr/lib/crt0.o /usr/lib/crtbegin.o -#undef LIB_STANDARD -#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o - -#elif defined(__NetBSD__) - -/* LIB_STANDARD and START_FILES set correctly in s/netbsd.h */ - -#elif defined(SOLARIS2) - +/* For GNU_LINUX, __OpenBSD__, __NetBSD__, __APPLE__, things are set + correctly in s/gnu-linux.h, netbsd.h, darwin.h. */ +#ifdef SOLARIS2 #undef START_FILES #undef LIB_STANDARD - -#elif defined(__APPLE__) - -/* LIB_STANDARD and START_FILES set correctly in s/darwin.h */ - -#else /* !__OpenBSD__ && !__NetBSD__ && !SOLARIS2 && !__APPLE__ */ -/* CRT_DIR defaults to /usr/lib. On GNU/Linux, it may be /usr/lib64. - On FreeBSD, the libraries for binaries native to the build host's +#elif defined (__FreeBSD__) || (defined (DARWIN_OS) && !defined (__APPLE__)) +/* On FreeBSD, the libraries for binaries native to the build host's architecture are installed under /usr/lib, and the ones that need special paths are 32-bit compatibility libraries (installed under /usr/lib32). So to build a native binary of Emacs on FreeBSD/amd64 - we can just point to /usr/lib. - */ + we can just point to /usr/lib (the default $CRT_DIR). */ #undef START_FILES #define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o /* The duplicate -lgcc is intentional in the definition of LIB_STANDARD. @@ -105,7 +89,7 @@ #undef LIB_STANDARD #define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o -#endif /* __OpenBSD__ */ +#endif /* SOLARIS2 */ #endif /* !i386 */ /* arch-tag: 8a5e001d-e12e-4692-a3a6-0b15ba271c6e diff -r fb2072139c80 -r c6c7a71f6e16 src/m/ibms390x.h --- a/src/m/ibms390x.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/m/ibms390x.h Wed Apr 28 10:00:38 2010 +0900 @@ -85,11 +85,5 @@ #define XPNTR(a) XUINT (a) -#undef START_FILES -#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o - -#undef LIB_STANDARD -#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o - /* arch-tag: 4b87653c-6add-4663-8691-7d9dc17b5519 (do not change this comment) */ diff -r fb2072139c80 -r c6c7a71f6e16 src/m/macppc.h --- a/src/m/macppc.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/m/macppc.h Wed Apr 28 10:00:38 2010 +0900 @@ -39,12 +39,6 @@ #ifdef GNU_LINUX #define LINKER $(CC) -nostdlib -#ifdef _ARCH_PPC64 -#undef START_FILES -#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o -#undef LIB_STANDARD -#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o -#endif #endif #ifdef _ARCH_PPC64 diff -r fb2072139c80 -r c6c7a71f6e16 src/m/sparc.h --- a/src/m/sparc.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/m/sparc.h Wed Apr 28 10:00:38 2010 +0900 @@ -52,17 +52,6 @@ #ifdef __arch64__ /* GCC, 64-bit ABI. */ #define BITS_PER_LONG 64 -#ifdef __linux__ -#undef START_FILES -#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o - -/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD. - The reason is that some functions in libgcc.a call functions from libc.a, - and some libc.a functions need functions from libgcc.a. Since most - versions of ld are one-pass linkers, we need to mention -lgcc twice, - or else we risk getting unresolved externals. */ -#undef LIB_STANDARD -#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o #endif #ifndef _LP64 diff -r fb2072139c80 -r c6c7a71f6e16 src/s/aix4-2.h --- a/src/s/aix4-2.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/s/aix4-2.h Wed Apr 28 10:00:38 2010 +0900 @@ -135,9 +135,6 @@ #define POSIX_SIGNALS #undef sigmask -/* olson@mcs.anl.gov says -li18n is needed by -lXm. */ -#define LIB_MOTIF -lXm -li18n - #ifndef HAVE_LIBXMU #define LIBXMU @@ -148,7 +145,7 @@ /* On AIX Emacs uses the gmalloc.c malloc implementation. But given the way this system works, libc functions that return malloced memory use the libc malloc implementation. Calling xfree or - xrealloc on the results of such functions results in a crash. + xrealloc on the results of such functions results in a crash. One solution for this could be to define SYSTEM_MALLOC here, but that does not currently work on this system. diff -r fb2072139c80 -r c6c7a71f6e16 src/s/cygwin.h --- a/src/s/cygwin.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/s/cygwin.h Wed Apr 28 10:00:38 2010 +0900 @@ -137,7 +137,6 @@ /* Don't list system libs on link command line */ #define LIB_STANDARD -#define LIB_MATH #define START_FILES ecrt0.o diff -r fb2072139c80 -r c6c7a71f6e16 src/s/darwin.h --- a/src/s/darwin.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/s/darwin.h Wed Apr 28 10:00:38 2010 +0900 @@ -205,9 +205,6 @@ /* Link this program just by running cc. */ #define ORDINARY_LINK -/* Adding -lm confuses the dynamic linker, so omit it. */ -#define LIB_MATH - /* Define the following so emacs symbols will not conflict with those in the System framework. Otherwise -prebind will not work. */ diff -r fb2072139c80 -r c6c7a71f6e16 src/s/freebsd.h --- a/src/s/freebsd.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/s/freebsd.h Wed Apr 28 10:00:38 2010 +0900 @@ -46,8 +46,8 @@ there, contrary to what a stock GCC would do. */ #define LD_SWITCH_SYSTEM -L/usr/local/lib -#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o +#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o +#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o #undef LIB_GCC #define LIB_GCC diff -r fb2072139c80 -r c6c7a71f6e16 src/s/gnu-linux.h --- a/src/s/gnu-linux.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/s/gnu-linux.h Wed Apr 28 10:00:38 2010 +0900 @@ -168,7 +168,7 @@ /* Ask GCC where to find libgcc.a. */ #define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name` -#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o +#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o /* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option says where to find X windows at run time. */ @@ -190,16 +190,13 @@ #undef LIB_GCC #define LIB_GCC -#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o +#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o /* _BSD_SOURCE is redundant, at least in glibc2, since we define _GNU_SOURCE. Left in in case it's relevant to libc5 systems and anyone's still using Emacs on those. --fx 2002-12-14 */ /* #define C_SWITCH_SYSTEM -D_BSD_SOURCE */ -/* Paul Abrahams says this is needed. */ -#define LIB_MOTIF -lXm -lXpm - #ifdef HAVE_LIBNCURSES #define TERMINFO #define LIBS_TERMCAP -lncurses diff -r fb2072139c80 -r c6c7a71f6e16 src/s/hpux10-20.h --- a/src/s/hpux10-20.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/s/hpux10-20.h Wed Apr 28 10:00:38 2010 +0900 @@ -170,7 +170,7 @@ #define NO_REMAP -#define START_FILES pre-crt0.o /lib/crt0.o +#define START_FILES pre-crt0.o $(CRT_DIR)/crt0.o /* Define VIRT_ADDR_VARIES if the virtual addresses of pure and impure space as loaded can vary, and even their diff -r fb2072139c80 -r c6c7a71f6e16 src/s/netbsd.h --- a/src/s/netbsd.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/s/netbsd.h Wed Apr 28 10:00:38 2010 +0900 @@ -28,14 +28,14 @@ #define LIBS_TERMCAP -ltermcap -#define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o -#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1 +#define START_FILES pre-crt0.o $(CRT_DIR)/crt0.o START_FILES_1 $(CRT_DIR)/crtbegin.o +#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtend.o END_FILES_1 #undef LIB_GCC #define LIB_GCC #ifdef HAVE_CRTIN -#define START_FILES_1 /usr/lib/crti.o -#define END_FILES_1 /usr/lib/crtn.o +#define START_FILES_1 $(CRT_DIR)/crti.o +#define END_FILES_1 $(CRT_DIR)/crtn.o #else #define START_FILES_1 #define END_FILES_1 diff -r fb2072139c80 -r c6c7a71f6e16 src/s/unixware.h --- a/src/s/unixware.h Mon Apr 26 21:02:08 2010 +0900 +++ b/src/s/unixware.h Wed Apr 28 10:00:38 2010 +0900 @@ -56,17 +56,6 @@ pty_name[sizeof(pty_name) - 1] = 0; \ } -/* Use libw.a along with X11R6 Xt. */ -#define NEED_LIBW - -/* ryanr@ellingtn.ftc.nrcs.usda.gov (Richard Anthony Ryan) says -lXimp - is needed in UNIX_SV ... 4.2 1.1.2. */ -#define LIB_MOTIF -lXm -lXimp - -/* arch-tag: 9bbfcfc1-19be-45a1-9699-af57b87da2c6 - (do not change this comment) */ - - /* Data type of load average, as read out of kmem. */ #define LOAD_AVE_TYPE long