Mercurial > emacs
changeset 108382:b9b3b94979ee
Move LIBS_SYSTEM from cpp to configure.
* configure.in (LIBS_SYSTEM): New output variable, replacing cpp.
* lib-src/Makefile.in (LIBS_SYSTEM) [!MSDOS]: Set with configure, not cpp.
(LIBS_SYSTEM) [MSDOS]: Use MSDOS_LIBS_SYSTEM.
(NOT_C_CODE): Remove, no longer used.
(config.h) [!MSDOS]: No longer include.
(LOADLIBES): Use LIBS_SYSTEM as a variable.
* src/Makefile.in (LIBS_SYSTEM): Set using configure, not cpp.
(LIBS_SYSTEM) [MSDOS]: Reset with MSDOS_LIBS_SYSTEM.
(LIBES): Use LIBS_SYSTEM as a variable.
* src/s/msdos.h (LIBS_SYSTEM): Rename to MSDOS_LIBS_SYSTEM. Always define.
* src/s/aix4-2.h (LIBS_SYSTEM):
* src/s/freebsd.h (LIBS_SYSTEM):
* src/s/hpux10-20.h (LIBS_SYSTEM):
* src/s/sol2-6.h (LIBS_SYSTEM):
* src/s/unixware.h (LIBS_SYSTEM):
Move to configure.
* msdos/sed1v2.inp, msdos/sed3v2.inp (LIBS_SYSTEM): Edit to empty.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 09 May 2010 19:16:09 -0700 |
parents | aa05f2497948 |
children | 80a5bb784f32 |
files | ChangeLog configure.in lib-src/ChangeLog lib-src/Makefile.in msdos/ChangeLog msdos/sed1v2.inp msdos/sed3v2.inp src/ChangeLog src/Makefile.in src/s/aix4-2.h src/s/freebsd.h src/s/hpux10-20.h src/s/msdos.h src/s/sol2-6.h src/s/unixware.h |
diffstat | 15 files changed, 76 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun May 09 22:07:58 2010 -0400 +++ b/ChangeLog Sun May 09 19:16:09 2010 -0700 @@ -1,5 +1,7 @@ 2010-05-10 Glenn Morris <rgm@gnu.org> + * configure.in (LIBS_SYSTEM): New output variable, replacing cpp. + * configure.in (MAIL_USE_FLOCK, MAIL_USE_LOCKF): New AC_DEFINEs. (BLESSMAIL_TARGET): New output variable. @@ -155,7 +157,7 @@ * configure.in (REAL_CFLAGS, CFLAGS): Restore -g for gcc. -2010-04-22 Miles Bader <miles@gnu.org> +2010-04-22 Miles Bader <miles@gnu.org> * configure.in: Get rid of "unix" pre-defined macro when preprocessing Makefile. (Bug#5857)
--- a/configure.in Sun May 09 22:07:58 2010 -0400 +++ b/configure.in Sun May 09 19:16:09 2010 -0700 @@ -859,10 +859,6 @@ echo ' #include "'${srcdir}'/src/'${opsysfile}'" #include "'${srcdir}'/src/'${machfile}'" -#ifndef LIBS_SYSTEM -#define LIBS_SYSTEM -#endif -configure___ libsrc_libs=LIBS_SYSTEM configure___ LIBX=-lX11 @@ -1003,6 +999,23 @@ AC_SUBST(C_SWITCH_SYSTEM) +LIBS_SYSTEM= +case "$opsys" in + ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2. + aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;; + + freebsd) LIBS_SYSTEM="-lutil" ;; + + hpux*) LIBS_SYSTEM="-l:libdld.sl" ;; + + sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;; + + ## Motif needs -lgen. + unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;; +esac +AC_SUBST(LIBS_SYSTEM) + + ### Make sure subsequent tests use flags consistent with the build flags. if test x"${OVERRIDE_CPPFLAGS}" != x; then @@ -1586,7 +1599,7 @@ REL_ALLOC=no fi -LIBS="$libsrc_libs $LIBS" +LIBS="$LIBS_SYSTEM $LIBS" dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks, dnl and also adds -ldnet to LIBS, which Autoconf uses for checks. @@ -1600,6 +1613,18 @@ AC_CHECK_LIB(pthreads, cma_open) +## Note: when using cpp in s/aix4.2.h, this definition depended on +## HAVE_LIBPTHREADS. That was not defined earlier in configure when +## the system file was sourced. Hence the value of LIBS_SYSTEM +## added to LIBS in configure would never contain the pthreads part, +## but the value used in Makefiles might. FIXME? +## +## -lpthreads seems to be necessary for Xlib in X11R6, and should +## be harmless on older versions of X where it happens to exist. +test "$opsys" = "aix4-2" && \ + test $ac_cv_lib_pthreads_cma_open = yes && \ + LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads" + dnl Check for need for bigtoc support on IBM AIX case ${host_os} in
--- a/lib-src/ChangeLog Sun May 09 22:07:58 2010 -0400 +++ b/lib-src/ChangeLog Sun May 09 19:16:09 2010 -0700 @@ -1,5 +1,11 @@ 2010-05-10 Glenn Morris <rgm@gnu.org> + * Makefile.in (LIBS_SYSTEM): Set with configure, not cpp. + (LIBS_SYSTEM) [MSDOS]: Reset with MSDOS_LIBS_SYSTEM. + (NOT_C_CODE): Remove, no longer used. + (config.h) [!MSDOS]: No longer include. + (LOADLIBES): Use LIBS_SYSTEM as a variable. + * Makefile.in (BLESSMAIL_TARGET): Set with configure, not cpp. 2010-05-08 Christoph <cschol2112@googlemail.com> (tiny change)
--- a/lib-src/Makefile.in Sun May 09 22:07:58 2010 -0400 +++ b/lib-src/Makefile.in Sun May 09 19:16:09 2010 -0700 @@ -154,6 +154,9 @@ ## Extra libraries to use when linking movemail. LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) +## Some systems define this to request special libraries. +LIBS_SYSTEM = @LIBS_SYSTEM@ + # Those files shared with other GNU utilities need HAVE_CONFIG_H # defined before they know they can take advantage of the information # in ../src/config.h. @@ -164,14 +167,12 @@ # ========================== start of cpp stuff ======================= /* From here on, comments must be done in C syntax. */ -#define NOT_C_CODE +#ifdef MSDOS #include "../src/config.h" +LIBS_SYSTEM = MSDOS_LIBS_SYSTEM +#endif -/* Some s/SYSTEM.h files define this to request special libraries. */ -#ifndef LIBS_SYSTEM -#define LIBS_SYSTEM -#endif -LOADLIBES=LIBS_SYSTEM +LOADLIBES=$(LIBS_SYSTEM) .SUFFIXES: .m
--- a/msdos/ChangeLog Sun May 09 22:07:58 2010 -0400 +++ b/msdos/ChangeLog Sun May 09 19:16:09 2010 -0700 @@ -1,5 +1,7 @@ 2010-05-10 Glenn Morris <rgm@gnu.org> + * sed1v2.inp, sed3v2.inp (LIBS_SYSTEM): Edit to empty. + * sed3v2.inp (BLESSMAIL_TARGET): Edit to need-blessmail. 2010-05-07 Chong Yidong <cyd@stupidchicken.com>
--- a/msdos/sed1v2.inp Sun May 09 22:07:58 2010 -0400 +++ b/msdos/sed1v2.inp Sun May 09 19:16:09 2010 -0700 @@ -50,6 +50,7 @@ /^LD_SWITCH_X_SITE_AUX_RPATH *=/s/@LD_SWITCH_X_SITE_AUX_RPATH@// /^LD_SWITCH_SYSTEM *=/s/@LD_SWITCH_SYSTEM@// /^LD_SWITCH_SYSTEM_EXTRA *=/s/@LD_SWITCH_SYSTEM_EXTRA@// +/^LIBS_SYSTEM *=/s/@LIBS_SYSTEM@// /^LIBTIFF *=/s/@LIBTIFF@// /^LIBJPEG *=/s/@LIBJPEG@// /^LIBPNG *=/s/@LIBPNG@//
--- a/msdos/sed3v2.inp Sun May 09 22:07:58 2010 -0400 +++ b/msdos/sed3v2.inp Sun May 09 19:16:09 2010 -0700 @@ -35,6 +35,7 @@ /^LIBHESIOD *=/s/@[^@\n]*@//g /^LIBRESOLV *=/s/@[^@\n]*@//g /^LIBS_MAIL *=/s/@[^@\n]*@//g +/^LIBS_SYSTEM *=/s/@[^@\n]*@//g /^CFLAGS *=/s!=.*$!=-O2 -g! /^C_SWITCH_SYSTEM *=/s!=.*$!=-DMSDOS! /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@//
--- a/src/ChangeLog Sun May 09 22:07:58 2010 -0400 +++ b/src/ChangeLog Sun May 09 19:16:09 2010 -0700 @@ -1,5 +1,16 @@ 2010-05-10 Glenn Morris <rgm@gnu.org> + * Makefile.in (LIBS_SYSTEM): Set using configure, not cpp. + (LIBS_SYSTEM) [MSDOS]: Reset with MSDOS_LIBS_SYSTEM. + (LIBES): Use LIBS_SYSTEM as a variable. + * s/msdos.h (LIBS_SYSTEM): Rename to MSDOS_LIBS_SYSTEM. Always define. + * s/aix4-2.h (LIBS_SYSTEM): + * s/freebsd.h (LIBS_SYSTEM): + * s/hpux10-20.h (LIBS_SYSTEM): + * s/sol2-6.h (LIBS_SYSTEM): + * s/unixware.h (LIBS_SYSTEM): + Move to configure. + * s/aix4-2.h (MAIL_USE_LOCKF): * s/bsd-common.h (MAIL_USE_FLOCK): * s/darwin.h (MAIL_USE_FLOCK):
--- a/src/Makefile.in Sun May 09 22:07:58 2010 -0400 +++ b/src/Makefile.in Sun May 09 19:16:09 2010 -0700 @@ -88,6 +88,9 @@ ## Flags to pass to ld only for temacs. TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_EXTRA) $(LD_SWITCH_SYSTEM_TEMACS) +## Some systems define this to request special libraries. +LIBS_SYSTEM=@LIBS_SYSTEM@ + LIBTIFF=@LIBTIFF@ LIBJPEG=@LIBJPEG@ LIBPNG=@LIBPNG@ @@ -195,11 +198,6 @@ do not let it interfere with this file. */ #undef register -/* Some s/SYSTEM.h files define this to request special libraries. */ -#ifndef LIBS_SYSTEM -#define LIBS_SYSTEM -#endif - /* This macro is for switches specifically related to X Windows. */ #ifndef LD_SWITCH_X_SITE #define LD_SWITCH_X_SITE @@ -324,9 +322,9 @@ #endif #ifdef MSDOS +LIBS_SYSTEM = MSDOS_LIBS_SYSTEM #ifdef HAVE_X_WINDOWS MSDOS_OBJ = dosfns.o msdos.o -#define LIBS_SYSTEM -lxext -lsys #else MSDOS_OBJ = dosfns.o msdos.o w16select.o termcap.o #endif @@ -656,8 +654,8 @@ with GCC, we might need gnulib again after them. */ LIBES = $(LOADLIBES) $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ - $(RSVG_LIBS) $(DBUS_LIBS) @LIBGPM@ @LIBRESOLV@ LIBS_SYSTEM $(LIBS_TERMCAP) \ - $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \ + $(RSVG_LIBS) $(DBUS_LIBS) @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)
--- a/src/s/aix4-2.h Sun May 09 22:07:58 2010 -0400 +++ b/src/s/aix4-2.h Sun May 09 19:16:09 2010 -0700 @@ -87,15 +87,6 @@ #define LINKER cc #endif -/* -lpthreads seems to be necessary for Xlib in X11R6, and should be harmless - on older versions of X where it happens to exist. */ -#ifdef HAVE_LIBPTHREADS -#define LIBS_SYSTEM -lrts -lIM -liconv -lpthreads -#else -/* IBM's X11R5 use -lIM and -liconv in AIX 3.2.2. */ -#define LIBS_SYSTEM -lrts -lIM -liconv -#endif - /* The following definition seems to be needed in AIX version 3.1.6.8. It may not have been needed in certain earlier versions. */ #define HAVE_TCATTR
--- a/src/s/freebsd.h Sun May 09 22:07:58 2010 -0400 +++ b/src/s/freebsd.h Sun May 09 19:16:09 2010 -0700 @@ -30,8 +30,6 @@ #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) -#define LIBS_SYSTEM -lutil - #undef LIB_GCC #define LIB_GCC
--- a/src/s/hpux10-20.h Sun May 09 22:07:58 2010 -0400 +++ b/src/s/hpux10-20.h Sun May 09 19:16:09 2010 -0700 @@ -1,6 +1,7 @@ /* System description file for hpux version 10.20. - Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008, 2009, 2010 Free Software Foundation, Inc. + +Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, + 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -126,13 +127,10 @@ /* AlainF 20-Jul-1996 says this is right. */ #define KERNEL_FILE "/stand/vmunix" -#define LIBS_SYSTEM -l:libdld.sl - /* Rainer Malzbender <rainer@displaytech.com> says definining HAVE_XRMSETDATABASE allows Emacs to compile on HP-UX 10.20 using GCC. */ - #ifndef HAVE_XRMSETDATABASE #define HAVE_XRMSETDATABASE #endif
--- a/src/s/msdos.h Sun May 09 22:07:58 2010 -0400 +++ b/src/s/msdos.h Sun May 09 19:16:09 2010 -0700 @@ -1,7 +1,7 @@ /* System description file for MS-DOS - Copyright (C) 1993, 1996, 1997, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 1993, 1996, 1997, 2001, 2002, 2003, 2004, 2005, 2006, + 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -140,8 +140,9 @@ commentary below, in the non-X branch. The 140KB number was measured on GNU/Linux and on MS-WIndows. */ #define SYSTEM_PURESIZE_EXTRA (-170000+140000) -#define LIBS_SYSTEM -lxext -lsys +#define MSDOS_LIBS_SYSTEM -lxext -lsys #else +#define MSDOS_LIBS_SYSTEM /* We need a little extra space, see ../../lisp/loadup.el. As of 20091024, DOS-specific files use up 62KB of pure space. But overall, we end up wasting 130KB of pure space, because
--- a/src/s/sol2-6.h Sun May 09 22:07:58 2010 -0400 +++ b/src/s/sol2-6.h Sun May 09 19:16:09 2010 -0700 @@ -27,8 +27,6 @@ #define POSIX -#define LIBS_SYSTEM -lsocket -lnsl -lkstat - /* Prefer kstat over kvm in getloadavg.c, kstat doesn't require root. ghazi@caip.rutgers.edu, 7/21/97. Don't redefine if already defined (e.g., by config.h). */
--- a/src/s/unixware.h Sun May 09 22:07:58 2010 -0400 +++ b/src/s/unixware.h Sun May 09 19:16:09 2010 -0700 @@ -1,7 +1,7 @@ /* s/ file for Unixware. - Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008, 2009, 2010 Free Software Foundation, Inc. +Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, + 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -28,9 +28,6 @@ #undef HAVE_SYSV_SIGPAUSE -/* Motif needs -lgen. */ -#define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen - /* This is the same definition as in usg5-4.h, but with sigblock/sigunblock rather than sighold/sigrelse, which appear to be BSD4.1 specific. It may also be appropriate for SVR4.x