summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/libs/luajit/Makefile.am4
-rw-r--r--Build/source/libs/luajit/Makefile.in5
-rw-r--r--Build/source/libs/luajit/config.h.in4
-rwxr-xr-xBuild/source/libs/luajit/configure71
-rw-r--r--Build/source/libs/luajit/configure.ac8
-rw-r--r--Build/source/libs/luajit/include/Makefile.in1
6 files changed, 89 insertions, 4 deletions
diff --git a/Build/source/libs/luajit/Makefile.am b/Build/source/libs/luajit/Makefile.am
index 85bc67428f4..a74eed38601 100644
--- a/Build/source/libs/luajit/Makefile.am
+++ b/Build/source/libs/luajit/Makefile.am
@@ -17,8 +17,8 @@ include $(srcdir)/../../am/dist_hook.am
NEVER_NAMES += $(NEVER_NAMES_SUB) $(NEVER_NAMES_LT)
AM_CPPFLAGS = -I$(srcdir)/$(LUAJIT_TREE)/src $(LUAJIT_DEFINES) -U_FORTIFY_SOURCE
-AM_CFLAGS = $(LUAJIT_CFLAGS) -Wall
-AM_CCASFLAGS = $(LUAJIT_CFLAGS)
+AM_CFLAGS = $(LUAJIT_CFLAGS) $(LUAJIT_HAS_NOT_LOG2) -Wall
+AM_CCASFLAGS = $(LUAJIT_CFLAGS) $(LUAJIT_HAS_NOT_LOG2)
SUBDIRS = . native include
diff --git a/Build/source/libs/luajit/Makefile.in b/Build/source/libs/luajit/Makefile.in
index 4b17b7b56c8..325dfea6a9f 100644
--- a/Build/source/libs/luajit/Makefile.in
+++ b/Build/source/libs/luajit/Makefile.in
@@ -589,6 +589,7 @@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
LUAJITVERSION = @LUAJITVERSION@
LUAJIT_CFLAGS = @LUAJIT_CFLAGS@
LUAJIT_DEFINES = @LUAJIT_DEFINES@
+LUAJIT_HAS_LOG2 = @LUAJIT_HAS_LOG2@
LUAJIT_LDEXTRA = @LUAJIT_LDEXTRA@
LUAJIT_LT_VERSINFO = @LUAJIT_LT_VERSINFO@
LUAJIT_TREE = @LUAJIT_TREE@
@@ -678,8 +679,8 @@ NEVER_NAMES = -name .svn $(NEVER_NAMES_SUB) $(NEVER_NAMES_LT)
NEVER_NAMES_SUB = -o -name .deps -o -name .dirstamp -o -name '*.$(OBJEXT)'
NEVER_NAMES_LT = -o -name .libs -o -name '*.lo'
AM_CPPFLAGS = -I$(srcdir)/$(LUAJIT_TREE)/src $(LUAJIT_DEFINES) -U_FORTIFY_SOURCE
-AM_CFLAGS = $(LUAJIT_CFLAGS) -Wall
-AM_CCASFLAGS = $(LUAJIT_CFLAGS)
+AM_CFLAGS = $(LUAJIT_CFLAGS) $(LUAJIT_HAS_LOG2) -Wall
+AM_CCASFLAGS = $(LUAJIT_CFLAGS) $(LUAJIT_HAS_LOG2)
SUBDIRS = . native include
lib_LTLIBRARIES = libtexluajit.la
libtexluajit_la_LDFLAGS = -bindir @bindir@ -no-undefined -version-info $(LUAJIT_LT_VERSINFO) $(LIBLUAJIT_LDEXTRA)
diff --git a/Build/source/libs/luajit/config.h.in b/Build/source/libs/luajit/config.h.in
index 0aa075a8fff..f2379f99460 100644
--- a/Build/source/libs/luajit/config.h.in
+++ b/Build/source/libs/luajit/config.h.in
@@ -1,5 +1,9 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+/* Define to 1 if you have the declaration of `log2', and to 0 if you don't.
+ */
+#undef HAVE_DECL_LOG2
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
diff --git a/Build/source/libs/luajit/configure b/Build/source/libs/luajit/configure
index a4b8e7a3b14..a159aa0d0e5 100755
--- a/Build/source/libs/luajit/configure
+++ b/Build/source/libs/luajit/configure
@@ -639,6 +639,7 @@ LTLIBOBJS
LIBOBJS
subdirs
LUAJIT_TREE
+LUAJIT_HAS_LOG2
build_FALSE
build_TRUE
LIBLUAJIT_LDEXTRA
@@ -1992,6 +1993,52 @@ rm -f conftest.val
as_fn_set_status $ac_retval
} # ac_fn_c_compute_int
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -14335,6 +14382,30 @@ fi
echo timestamp >config.force
fi
+# Check log2, on some systems is still not defined
+LUAJIT_HAS_LOG2=
+ac_fn_c_check_decl "$LINENO" "log2" "ac_cv_have_decl_log2" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_log2" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_LOG2 $ac_have_decl
+_ACEOF
+if test $ac_have_decl = 1; then :
+
+else
+ LUAJIT_HAS_LOG2=-DLUAJIT_NO_LOG2
+fi
+
+
+
+
+
+
LUAJIT_TREE=LuaJIT-src
diff --git a/Build/source/libs/luajit/configure.ac b/Build/source/libs/luajit/configure.ac
index a09398e3501..66cccbad459 100644
--- a/Build/source/libs/luajit/configure.ac
+++ b/Build/source/libs/luajit/configure.ac
@@ -77,6 +77,14 @@ AS_IF([test "x$lj_cpp" != xok],
echo timestamp >config.force
fi
+# Check log2, on some systems is still not defined
+LUAJIT_HAS_NOT_LOG2=
+AC_CHECK_DECLS([log2], [], [LUAJIT_HAS_NOT_LOG2=[-DLUAJIT_NO_LOG2]], [[#include <math.h>]])
+AC_SUBST([LUAJIT_HAS_NOT_LOG2])
+
+
+
+
AC_SUBST([LUAJIT_TREE], [LuaJIT-src])
dnl Not used but avoids putting a zillion useless -D's on the command line.
diff --git a/Build/source/libs/luajit/include/Makefile.in b/Build/source/libs/luajit/include/Makefile.in
index 654a48df59b..299168767fd 100644
--- a/Build/source/libs/luajit/include/Makefile.in
+++ b/Build/source/libs/luajit/include/Makefile.in
@@ -184,6 +184,7 @@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
LUAJITVERSION = @LUAJITVERSION@
LUAJIT_CFLAGS = @LUAJIT_CFLAGS@
LUAJIT_DEFINES = @LUAJIT_DEFINES@
+LUAJIT_HAS_LOG2 = @LUAJIT_HAS_LOG2@
LUAJIT_LDEXTRA = @LUAJIT_LDEXTRA@
LUAJIT_LT_VERSINFO = @LUAJIT_LT_VERSINFO@
LUAJIT_TREE = @LUAJIT_TREE@