* 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.
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.
* 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)
echo '
#include "'${srcdir}'/src/'${opsysfile}'"
#include "'${srcdir}'/src/'${machfile}'"
-#ifndef LIBS_SYSTEM
-#define LIBS_SYSTEM
-#endif
-configure___ libsrc_libs=LIBS_SYSTEM
configure___ LIBX=-lX11
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
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.
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
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)
## 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.
# ========================== start of cpp stuff =======================
/* From here on, comments must be done in C syntax. */
-#define NOT_C_CODE
+#ifdef MSDOS
#include "../src/config.h"
-
-/* Some s/SYSTEM.h files define this to request special libraries. */
-#ifndef LIBS_SYSTEM
-#define LIBS_SYSTEM
+LIBS_SYSTEM = MSDOS_LIBS_SYSTEM
#endif
-LOADLIBES=LIBS_SYSTEM
+
+LOADLIBES=$(LIBS_SYSTEM)
\f
.SUFFIXES: .m
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>
/^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@//
/^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@//
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):
## 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@
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
#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
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)
#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
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
-#define LIBS_SYSTEM -lutil
-
#undef LIB_GCC
#define LIB_GCC
/* 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.
/* 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
/* 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.
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
#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). */
/* 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.
#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