2006-12-19 00:16:41 +01:00
|
|
|
Note that GCC 4.0 will optimize ceil (constant), we therefore
|
|
|
|
have to make the argument non-constant.
|
|
|
|
|
2007-02-15 18:13:22 +01:00
|
|
|
================================================================================
|
2013-04-16 13:33:36 +02:00
|
|
|
---
|
|
|
|
configure.ac.footer | 20 ++++++++++++++++++++
|
|
|
|
src/Makefile.in | 3 ++-
|
|
|
|
2 files changed, 22 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
Index: configure.ac.footer
|
2010-09-09 14:55:44 +02:00
|
|
|
===================================================================
|
2013-04-16 13:33:36 +02:00
|
|
|
--- configure.ac.footer.orig 2012-10-26 23:21:38.000000000 +0200
|
|
|
|
+++ configure.ac.footer 2013-04-16 12:21:01.350791832 +0200
|
|
|
|
@@ -112,6 +112,25 @@ fi
|
2006-12-19 00:16:41 +01:00
|
|
|
AC_CHECK_FUNCS(vsyslog syslog)
|
|
|
|
AC_FUNC_ALLOCA
|
|
|
|
|
|
|
|
+AC_MSG_CHECKING(for ceil)
|
|
|
|
+AC_TRY_LINK([#define __NO_MATH_INLINES 1
|
|
|
|
+ double d;],
|
|
|
|
+ [d = ceil(1.0*d);],
|
|
|
|
+ SYNLDFLAGS=""
|
|
|
|
+ AC_MSG_RESULT(yes),
|
|
|
|
+ SYNLDFLAGS=-lm
|
|
|
|
+ AC_MSG_RESULT(no))
|
2010-09-09 14:55:44 +02:00
|
|
|
+
|
2006-12-19 00:16:41 +01:00
|
|
|
+if test "$SYNLDFLAGS" = "-lm" ; then
|
|
|
|
+ SAVE_LIBS="$LIBS"
|
|
|
|
+ AC_CHECK_LIB(m,
|
|
|
|
+ ceil,
|
|
|
|
+ ,
|
|
|
|
+ echo "libmath.so is needed due the ceil function"
|
|
|
|
+ exit 1)
|
|
|
|
+ LIBS="$SAVE_LIBS"
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
case $with_curses in
|
|
|
|
No|no|N|n) SHARED_LIBS=-lc ;;
|
|
|
|
*)
|
2013-04-16 13:33:36 +02:00
|
|
|
@@ -142,6 +161,7 @@ AC_SUBST(ELISP)
|
2006-12-19 00:16:41 +01:00
|
|
|
AC_SUBST(SHLIB)
|
|
|
|
AC_SUBST(PICFLAGS)
|
|
|
|
AC_SUBST(SOLDFLAGS)
|
|
|
|
+AC_SUBST(SYNLDFLAGS)
|
2013-04-16 13:33:36 +02:00
|
|
|
AC_SUBST(LIBGPM_A)
|
2006-12-19 00:16:41 +01:00
|
|
|
AC_SUBST(CURSES_OBJS)
|
|
|
|
AC_SUBST(SHARED_LIBS)
|
2010-09-09 14:55:44 +02:00
|
|
|
Index: src/Makefile.in
|
|
|
|
===================================================================
|
2013-04-16 13:33:36 +02:00
|
|
|
--- src/Makefile.in.orig 2013-04-16 12:18:43.719054511 +0200
|
|
|
|
+++ src/Makefile.in 2013-04-16 12:18:43.762053491 +0200
|
|
|
|
@@ -166,7 +166,8 @@ lib/libgpm.a: $(LOBJ)
|
2006-12-19 00:16:41 +01:00
|
|
|
|
|
|
|
lib/libgpm.so.@abi_full@: $(PICS)
|
|
|
|
$(CC) @SOLDFLAGS@libgpm.so.@abi_lev@ \
|
|
|
|
- @LDFLAGS@ $(LDFLAGS) -o lib/libgpm.so.@abi_full@ $^ @LIBS@ @SHARED_LIBS@ $(LIBS)
|
2010-09-09 14:55:44 +02:00
|
|
|
+ @LDFLAGS@ $(LDFLAGS) -o lib/libgpm.so.@abi_full@ $^ @LIBS@ @SHARED_LIBS@ @SYNLDFLAGS@ $(LIBS)
|
|
|
|
+
|
|
|
|
lib/libgpm.so.@abi_lev@: lib/libgpm.so.@abi_full@
|
|
|
|
$(LN_S) -f libgpm.so.@abi_full@ lib/libgpm.so.@abi_lev@
|
|
|
|
# unneeded, isn't it?
|