Commit 9452ded1 authored by Dan Nicolaescu's avatar Dan Nicolaescu

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.
parent fcebfc6a
This diff is collapsed.
......@@ -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
......
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
......
......@@ -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)
......
......@@ -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
......
......@@ -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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment