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.

* configure.in (LIB_MATH): New output variable.  Set it for some systems.
This commit is contained in:
Dan Nicolaescu 2010-04-26 10:10:09 -07:00
parent fcebfc6a34
commit 9452ded131
6 changed files with 3291 additions and 15723 deletions

18982
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -828,6 +828,20 @@ AC_LINK_IFELSE([main(){return 0;}],
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

View file

@ -1,3 +1,11 @@
2010-04-26 Dan Nicolaescu <dann@ics.uci.edu>
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 <handa@m17n.org>
* composite.c (Ffind_composition_internal): Fix the return value

View file

@ -175,10 +175,6 @@ DEPFLAGS = -MMD -MF deps/$*.d
#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)))
@ -795,7 +791,7 @@ LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \
@LIBGPM@ @LIBRESOLV@ LIBS_SYSTEM LIBS_MACHINE 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)

View file

@ -137,7 +137,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Don't list system libs on link command line */
#define LIB_STANDARD
#define LIB_MATH
#define START_FILES ecrt0.o

View file

@ -205,9 +205,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* 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. */