diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-03-03 10:38:50 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-03-03 10:38:50 +0000 |
commit | ff09b3baf412d5e76069d928b3be7faf1f909a72 (patch) | |
tree | e497ea8ed4caa349ccd8ed1b399650d54f037026 /Build/source/libs | |
parent | 8a4e73b3b2f4ffef7bf105234e9b023f30cf2816 (diff) |
libs/lua52: New test checking error handling
libs/luajit: New test checking error handling
git-svn-id: svn://tug.org/texlive/trunk@33086 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
-rw-r--r-- | Build/source/libs/lua52/ChangeLog | 7 | ||||
-rw-r--r-- | Build/source/libs/lua52/Makefile.am | 14 | ||||
-rw-r--r-- | Build/source/libs/lua52/Makefile.in | 43 | ||||
-rwxr-xr-x | Build/source/libs/lua52/configure | 57 | ||||
-rw-r--r-- | Build/source/libs/lua52/configure.ac | 4 | ||||
-rw-r--r-- | Build/source/libs/lua52/error.exp | 5 | ||||
-rwxr-xr-x | Build/source/libs/lua52/luaerror.test | 11 | ||||
-rw-r--r-- | Build/source/libs/luajit/ChangeLog | 7 | ||||
-rw-r--r-- | Build/source/libs/luajit/Makefile.am | 14 | ||||
-rw-r--r-- | Build/source/libs/luajit/Makefile.in | 85 | ||||
-rwxr-xr-x | Build/source/libs/luajit/configure | 56 | ||||
-rw-r--r-- | Build/source/libs/luajit/configure.ac | 1 | ||||
-rw-r--r-- | Build/source/libs/luajit/jiterr.exp | 4 | ||||
-rwxr-xr-x | Build/source/libs/luajit/luajiterr.test | 13 |
14 files changed, 282 insertions, 39 deletions
diff --git a/Build/source/libs/lua52/ChangeLog b/Build/source/libs/lua52/ChangeLog index b4b0c66945c..97cb5ff06e8 100644 --- a/Build/source/libs/lua52/ChangeLog +++ b/Build/source/libs/lua52/ChangeLog @@ -1,3 +1,10 @@ +2014-03-03 Peter Breitenlohner <peb@mppmu.mpg.de> + + * luaerror.test (new): Shell script to test error handling. + * error.exp (new): Expected test output. + * Makefile.am: Add the new files. + * configure.ac: The test program requires sqrt(). + 2014-02-11 Peter Breitenlohner <peb@mppmu.mpg.de> * lua52.test (new): Shell script for a basic test. diff --git a/Build/source/libs/lua52/Makefile.am b/Build/source/libs/lua52/Makefile.am index 014598e1522..e8ef2795699 100644 --- a/Build/source/libs/lua52/Makefile.am +++ b/Build/source/libs/lua52/Makefile.am @@ -63,21 +63,27 @@ nodist_liblua52_a_SOURCES = \ @LUA52_TREE@/src/lzio.c if build -check_PROGRAMS = luatest -dist_check_SCRIPTS = lua52.test -TESTS = lua52.test +check_PROGRAMS = luatest luatry +dist_check_SCRIPTS = lua52.test luaerror.test +TESTS = lua52.test luaerror.test endif build luatest_SOURCES = luatest.c luatest_CPPFLAGS = -Iinclude +nodist_luatry_SOURCES = @LUA52_TREE@/src/lua.c + +luatry_CPPFLAGS = -Iinclude + LDADD = liblua52.a +EXTRA_DIST += error.exp +CLEANFILES = error.out + # Rebuild rebuild_prereq = rebuild_target = all -CLEANFILES = include $(srcdir)/../../am/rebuild.am diff --git a/Build/source/libs/lua52/Makefile.in b/Build/source/libs/lua52/Makefile.in index c8b385e7e2a..c7a26f2e7a3 100644 --- a/Build/source/libs/lua52/Makefile.in +++ b/Build/source/libs/lua52/Makefile.in @@ -76,7 +76,7 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -@build_TRUE@check_PROGRAMS = luatest$(EXEEXT) +@build_TRUE@check_PROGRAMS = luatest$(EXEEXT) luatry$(EXEEXT) DIST_COMMON = $(srcdir)/../../am/rebuild.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(srcdir)/config.h.in \ @@ -154,7 +154,11 @@ am_luatest_OBJECTS = luatest-luatest.$(OBJEXT) luatest_OBJECTS = $(am_luatest_OBJECTS) luatest_LDADD = $(LDADD) luatest_DEPENDENCIES = liblua52.a -am__dist_check_SCRIPTS_DIST = lua52.test +nodist_luatry_OBJECTS = @LUA52_TREE@/src/luatry-lua.$(OBJEXT) +luatry_OBJECTS = $(nodist_luatry_OBJECTS) +luatry_LDADD = $(LDADD) +luatry_DEPENDENCIES = liblua52.a +am__dist_check_SCRIPTS_DIST = lua52.test luaerror.test AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -187,7 +191,8 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(nodist_liblua52_a_SOURCES) $(luatest_SOURCES) +SOURCES = $(nodist_liblua52_a_SOURCES) $(luatest_SOURCES) \ + $(nodist_luatry_SOURCES) DIST_SOURCES = $(luatest_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ @@ -570,7 +575,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I ../../m4 -EXTRA_DIST = $(LUA52_TREE) $(LUA52_TREE)-PATCHES +EXTRA_DIST = $(LUA52_TREE) $(LUA52_TREE)-PATCHES error.exp SUBDIRS = . include AM_CPPFLAGS = -I$(top_srcdir)/$(LUA52_TREE)/src $(LUA52_DEFINES) AM_CFLAGS = $(WARNING_CFLAGS) @@ -610,16 +615,18 @@ nodist_liblua52_a_SOURCES = \ @LUA52_TREE@/src/lvm.c \ @LUA52_TREE@/src/lzio.c -@build_TRUE@dist_check_SCRIPTS = lua52.test -@build_TRUE@TESTS = lua52.test +@build_TRUE@dist_check_SCRIPTS = lua52.test luaerror.test +@build_TRUE@TESTS = lua52.test luaerror.test luatest_SOURCES = luatest.c luatest_CPPFLAGS = -Iinclude +nodist_luatry_SOURCES = @LUA52_TREE@/src/lua.c +luatry_CPPFLAGS = -Iinclude LDADD = liblua52.a +CLEANFILES = error.out rebuild.stamp # Rebuild rebuild_prereq = rebuild_target = all -CLEANFILES = rebuild.stamp all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -760,6 +767,13 @@ clean-checkPROGRAMS: luatest$(EXEEXT): $(luatest_OBJECTS) $(luatest_DEPENDENCIES) $(EXTRA_luatest_DEPENDENCIES) @rm -f luatest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(luatest_OBJECTS) $(luatest_LDADD) $(LIBS) +@LUA52_TREE@/src/luatry-lua.$(OBJEXT): \ + @LUA52_TREE@/src/$(am__dirstamp) \ + @LUA52_TREE@/src/$(DEPDIR)/$(am__dirstamp) + +luatry$(EXEEXT): $(luatry_OBJECTS) $(luatry_DEPENDENCIES) $(EXTRA_luatry_DEPENDENCIES) + @rm -f luatry$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(luatry_OBJECTS) $(luatry_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -798,6 +812,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@@LUA52_TREE@/src/$(DEPDIR)/ltable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@LUA52_TREE@/src/$(DEPDIR)/ltablib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@LUA52_TREE@/src/$(DEPDIR)/ltm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@@LUA52_TREE@/src/$(DEPDIR)/luatry-lua.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@LUA52_TREE@/src/$(DEPDIR)/lundump.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@LUA52_TREE@/src/$(DEPDIR)/lvm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@LUA52_TREE@/src/$(DEPDIR)/lzio.Po@am__quote@ @@ -832,6 +847,20 @@ luatest-luatest.obj: luatest.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luatest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o luatest-luatest.obj `if test -f 'luatest.c'; then $(CYGPATH_W) 'luatest.c'; else $(CYGPATH_W) '$(srcdir)/luatest.c'; fi` +@LUA52_TREE@/src/luatry-lua.o: @LUA52_TREE@/src/lua.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luatry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUA52_TREE@/src/luatry-lua.o -MD -MP -MF @LUA52_TREE@/src/$(DEPDIR)/luatry-lua.Tpo -c -o @LUA52_TREE@/src/luatry-lua.o `test -f '@LUA52_TREE@/src/lua.c' || echo '$(srcdir)/'`@LUA52_TREE@/src/lua.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @LUA52_TREE@/src/$(DEPDIR)/luatry-lua.Tpo @LUA52_TREE@/src/$(DEPDIR)/luatry-lua.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@LUA52_TREE@/src/lua.c' object='@LUA52_TREE@/src/luatry-lua.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luatry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUA52_TREE@/src/luatry-lua.o `test -f '@LUA52_TREE@/src/lua.c' || echo '$(srcdir)/'`@LUA52_TREE@/src/lua.c + +@LUA52_TREE@/src/luatry-lua.obj: @LUA52_TREE@/src/lua.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luatry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUA52_TREE@/src/luatry-lua.obj -MD -MP -MF @LUA52_TREE@/src/$(DEPDIR)/luatry-lua.Tpo -c -o @LUA52_TREE@/src/luatry-lua.obj `if test -f '@LUA52_TREE@/src/lua.c'; then $(CYGPATH_W) '@LUA52_TREE@/src/lua.c'; else $(CYGPATH_W) '$(srcdir)/@LUA52_TREE@/src/lua.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @LUA52_TREE@/src/$(DEPDIR)/luatry-lua.Tpo @LUA52_TREE@/src/$(DEPDIR)/luatry-lua.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@LUA52_TREE@/src/lua.c' object='@LUA52_TREE@/src/luatry-lua.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luatry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUA52_TREE@/src/luatry-lua.obj `if test -f '@LUA52_TREE@/src/lua.c'; then $(CYGPATH_W) '@LUA52_TREE@/src/lua.c'; else $(CYGPATH_W) '$(srcdir)/@LUA52_TREE@/src/lua.c'; fi` + # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, diff --git a/Build/source/libs/lua52/configure b/Build/source/libs/lua52/configure index fcb505b3efc..f80ec0715e9 100755 --- a/Build/source/libs/lua52/configure +++ b/Build/source/libs/lua52/configure @@ -4670,6 +4670,63 @@ else fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sqrt" >&5 +$as_echo_n "checking for library containing sqrt... " >&6; } +if ${ac_cv_search_sqrt+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrt (); +int +main () +{ +return sqrt (); + ; + return 0; +} +_ACEOF +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_sqrt=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_sqrt+:} false; then : + break +fi +done +if ${ac_cv_search_sqrt+:} false; then : + +else + ac_cv_search_sqrt=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sqrt" >&5 +$as_echo "$ac_cv_search_sqrt" >&6; } +ac_res=$ac_cv_search_sqrt +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native WIN32 or MINGW32" >&5 $as_echo_n "checking for native WIN32 or MINGW32... " >&6; } if ${kpse_cv_have_win32+:} false; then : diff --git a/Build/source/libs/lua52/configure.ac b/Build/source/libs/lua52/configure.ac index e93e4114728..727a7311672 100644 --- a/Build/source/libs/lua52/configure.ac +++ b/Build/source/libs/lua52/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl Copyright (C) 2013 Peter Breitenlohner <tex-live@tug.org> +dnl Copyright (C) 2013, 2014 Peter Breitenlohner <tex-live@tug.org> dnl dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, @@ -25,6 +25,8 @@ AC_CONFIG_HEADERS([config.h])[]dnl unused, to avoid zillions of -D's on command AM_CONDITIONAL([build], [test "x$enable_build" != xno]) +AC_SEARCH_LIBS([sqrt], [m]) + KPSE_LUA52_DEFINES KPSE_LARGEFILE([LUA52_DEFINES]) diff --git a/Build/source/libs/lua52/error.exp b/Build/source/libs/lua52/error.exp new file mode 100644 index 00000000000..6b84f091ddf --- /dev/null +++ b/Build/source/libs/lua52/error.exp @@ -0,0 +1,5 @@ +./luatry: (command line):1: test +stack traceback: + [C]: in function 'error' + (command line):1: in main chunk + [C]: in ? diff --git a/Build/source/libs/lua52/luaerror.test b/Build/source/libs/lua52/luaerror.test new file mode 100755 index 00000000000..2f6958b3a4c --- /dev/null +++ b/Build/source/libs/lua52/luaerror.test @@ -0,0 +1,11 @@ +#! /bin/sh + +# Copyright (C) 2014 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +./luatry -e "error('test')" 2>error.out && exit 1 + +diff $srcdir/error.exp error.out || exit 1 + + + diff --git a/Build/source/libs/luajit/ChangeLog b/Build/source/libs/luajit/ChangeLog index 179a931ebe4..27f70cdd773 100644 --- a/Build/source/libs/luajit/ChangeLog +++ b/Build/source/libs/luajit/ChangeLog @@ -1,3 +1,10 @@ +2014-03-03 Peter Breitenlohner <peb@mppmu.mpg.de> + + * luajiterr.test (new): Shell script to test error handling. + * jiterr.exp (new): Expected test output. + * Makefile.am: Add the new files. Add lbitlib.c. + * configure.ac: The test program requires dlopen(). + 2014-02-24 Peter Breitenlohner <peb@mppmu.mpg.de> * m4/lj-system.m4: Define LUAJIT_OS for native/buildvm. diff --git a/Build/source/libs/luajit/Makefile.am b/Build/source/libs/luajit/Makefile.am index d44b9d3185e..3b4af238c0d 100644 --- a/Build/source/libs/luajit/Makefile.am +++ b/Build/source/libs/luajit/Makefile.am @@ -25,6 +25,7 @@ noinst_LIBRARIES = libluajit.a nodist_libluajit_a_SOURCES = \ $(ljlib_sources) \ + @LUAJIT_TREE@/src/lbitlib.c \ @LUAJIT_TREE@/src/lib_aux.c \ @LUAJIT_TREE@/src/lib_init.c \ @LUAJIT_TREE@/src/lj_alloc.c \ @@ -134,17 +135,24 @@ CLEANFILES = $(HDRGEN) $(ljlib_sources) lj_vm_asm.s CONFIG_CLEAN_FILES = dynasm_flags native_flags if build -check_PROGRAMS = jittest -dist_check_SCRIPTS = luajit.test -TESTS = luajit.test +check_PROGRAMS = jittest luajittry +dist_check_SCRIPTS = luajit.test luajiterr.test +TESTS = luajit.test luajiterr.test endif build jittest_SOURCES = jittest.c jittest_CPPFLAGS = -Iinclude +nodist_luajittry_SOURCES = @LUAJIT_TREE@/src/luajit.c + +luajittry_CPPFLAGS = -Iinclude + LDADD = libluajit.a +EXTRA_DIST += jiterr.exp +CLEANFILES += jiterr.out jiterr.tmp + # Rebuild rebuild_prereq = rebuild_target = all diff --git a/Build/source/libs/luajit/Makefile.in b/Build/source/libs/luajit/Makefile.in index af3541e88d1..0f1704c3a25 100644 --- a/Build/source/libs/luajit/Makefile.in +++ b/Build/source/libs/luajit/Makefile.in @@ -79,7 +79,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @PEOBJ_FALSE@am__append_1 = lj_vm_asm.s -@build_TRUE@check_PROGRAMS = jittest$(EXEEXT) +@build_TRUE@check_PROGRAMS = jittest$(EXEEXT) luajittry$(EXEEXT) DIST_COMMON = $(srcdir)/../../am/rebuild.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(srcdir)/config.h.in \ @@ -127,6 +127,7 @@ am__objects_1 = lib_base.$(OBJEXT) lib_math.$(OBJEXT) \ am__dirstamp = $(am__leading_dot)dirstamp @PEOBJ_FALSE@am__objects_2 = lj_vm_asm.$(OBJEXT) nodist_libluajit_a_OBJECTS = $(am__objects_1) \ + @LUAJIT_TREE@/src/lbitlib.$(OBJEXT) \ @LUAJIT_TREE@/src/lib_aux.$(OBJEXT) \ @LUAJIT_TREE@/src/lib_init.$(OBJEXT) \ @LUAJIT_TREE@/src/lj_alloc.$(OBJEXT) \ @@ -182,7 +183,12 @@ am_jittest_OBJECTS = jittest-jittest.$(OBJEXT) jittest_OBJECTS = $(am_jittest_OBJECTS) jittest_LDADD = $(LDADD) jittest_DEPENDENCIES = libluajit.a -am__dist_check_SCRIPTS_DIST = luajit.test +nodist_luajittry_OBJECTS = \ + @LUAJIT_TREE@/src/luajittry-luajit.$(OBJEXT) +luajittry_OBJECTS = $(nodist_luajittry_OBJECTS) +luajittry_LDADD = $(LDADD) +luajittry_DEPENDENCIES = libluajit.a +am__dist_check_SCRIPTS_DIST = luajit.test luajiterr.test AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -220,7 +226,8 @@ AM_V_CCAS = $(am__v_CCAS_@AM_V@) am__v_CCAS_ = $(am__v_CCAS_@AM_DEFAULT_V@) am__v_CCAS_0 = @echo " CCAS " $@; am__v_CCAS_1 = -SOURCES = $(nodist_libluajit_a_SOURCES) $(jittest_SOURCES) +SOURCES = $(nodist_libluajit_a_SOURCES) $(jittest_SOURCES) \ + $(nodist_luajittry_SOURCES) DIST_SOURCES = $(jittest_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ @@ -615,29 +622,30 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = $(LUAJIT_TREE) $(LUAJIT_TREE)-PATCHES +EXTRA_DIST = $(LUAJIT_TREE) $(LUAJIT_TREE)-PATCHES jiterr.exp AM_CPPFLAGS = -I$(srcdir)/$(LUAJIT_TREE)/src $(LUAJIT_DEFINES) AM_CFLAGS = -Wall SUBDIRS = native . include noinst_LIBRARIES = libluajit.a nodist_libluajit_a_SOURCES = $(ljlib_sources) \ - @LUAJIT_TREE@/src/lib_aux.c @LUAJIT_TREE@/src/lib_init.c \ - @LUAJIT_TREE@/src/lj_alloc.c @LUAJIT_TREE@/src/lj_api.c \ - @LUAJIT_TREE@/src/lj_asm.c @LUAJIT_TREE@/src/lj_bc.c \ - @LUAJIT_TREE@/src/lj_bcread.c @LUAJIT_TREE@/src/lj_bcwrite.c \ - @LUAJIT_TREE@/src/lj_carith.c @LUAJIT_TREE@/src/lj_ccall.c \ - @LUAJIT_TREE@/src/lj_ccallback.c @LUAJIT_TREE@/src/lj_cconv.c \ - @LUAJIT_TREE@/src/lj_cdata.c @LUAJIT_TREE@/src/lj_char.c \ - @LUAJIT_TREE@/src/lj_clib.c @LUAJIT_TREE@/src/lj_cparse.c \ - @LUAJIT_TREE@/src/lj_crecord.c @LUAJIT_TREE@/src/lj_ctype.c \ - @LUAJIT_TREE@/src/lj_debug.c @LUAJIT_TREE@/src/lj_dispatch.c \ - @LUAJIT_TREE@/src/lj_err.c @LUAJIT_TREE@/src/lj_ffrecord.c \ - @LUAJIT_TREE@/src/lj_func.c @LUAJIT_TREE@/src/lj_gc.c \ - @LUAJIT_TREE@/src/lj_gdbjit.c @LUAJIT_TREE@/src/lj_ir.c \ - @LUAJIT_TREE@/src/lj_lex.c @LUAJIT_TREE@/src/lj_lib.c \ - @LUAJIT_TREE@/src/lj_load.c @LUAJIT_TREE@/src/lj_mcode.c \ - @LUAJIT_TREE@/src/lj_meta.c @LUAJIT_TREE@/src/lj_obj.c \ - @LUAJIT_TREE@/src/lj_opt_dce.c @LUAJIT_TREE@/src/lj_opt_fold.c \ + @LUAJIT_TREE@/src/lbitlib.c @LUAJIT_TREE@/src/lib_aux.c \ + @LUAJIT_TREE@/src/lib_init.c @LUAJIT_TREE@/src/lj_alloc.c \ + @LUAJIT_TREE@/src/lj_api.c @LUAJIT_TREE@/src/lj_asm.c \ + @LUAJIT_TREE@/src/lj_bc.c @LUAJIT_TREE@/src/lj_bcread.c \ + @LUAJIT_TREE@/src/lj_bcwrite.c @LUAJIT_TREE@/src/lj_carith.c \ + @LUAJIT_TREE@/src/lj_ccall.c @LUAJIT_TREE@/src/lj_ccallback.c \ + @LUAJIT_TREE@/src/lj_cconv.c @LUAJIT_TREE@/src/lj_cdata.c \ + @LUAJIT_TREE@/src/lj_char.c @LUAJIT_TREE@/src/lj_clib.c \ + @LUAJIT_TREE@/src/lj_cparse.c @LUAJIT_TREE@/src/lj_crecord.c \ + @LUAJIT_TREE@/src/lj_ctype.c @LUAJIT_TREE@/src/lj_debug.c \ + @LUAJIT_TREE@/src/lj_dispatch.c @LUAJIT_TREE@/src/lj_err.c \ + @LUAJIT_TREE@/src/lj_ffrecord.c @LUAJIT_TREE@/src/lj_func.c \ + @LUAJIT_TREE@/src/lj_gc.c @LUAJIT_TREE@/src/lj_gdbjit.c \ + @LUAJIT_TREE@/src/lj_ir.c @LUAJIT_TREE@/src/lj_lex.c \ + @LUAJIT_TREE@/src/lj_lib.c @LUAJIT_TREE@/src/lj_load.c \ + @LUAJIT_TREE@/src/lj_mcode.c @LUAJIT_TREE@/src/lj_meta.c \ + @LUAJIT_TREE@/src/lj_obj.c @LUAJIT_TREE@/src/lj_opt_dce.c \ + @LUAJIT_TREE@/src/lj_opt_fold.c \ @LUAJIT_TREE@/src/lj_opt_loop.c @LUAJIT_TREE@/src/lj_opt_mem.c \ @LUAJIT_TREE@/src/lj_opt_narrow.c \ @LUAJIT_TREE@/src/lj_opt_sink.c \ @@ -663,12 +671,15 @@ ljlib_sources = \ lib_ffi.c HDRGEN = lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h -CLEANFILES = $(HDRGEN) $(ljlib_sources) lj_vm_asm.s rebuild.stamp +CLEANFILES = $(HDRGEN) $(ljlib_sources) lj_vm_asm.s jiterr.out \ + jiterr.tmp rebuild.stamp CONFIG_CLEAN_FILES = dynasm_flags native_flags -@build_TRUE@dist_check_SCRIPTS = luajit.test -@build_TRUE@TESTS = luajit.test +@build_TRUE@dist_check_SCRIPTS = luajit.test luajiterr.test +@build_TRUE@TESTS = luajit.test luajiterr.test jittest_SOURCES = jittest.c jittest_CPPFLAGS = -Iinclude +nodist_luajittry_SOURCES = @LUAJIT_TREE@/src/luajit.c +luajittry_CPPFLAGS = -Iinclude LDADD = libluajit.a # Rebuild @@ -738,6 +749,9 @@ clean-noinstLIBRARIES: @LUAJIT_TREE@/src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @LUAJIT_TREE@/src/$(DEPDIR) @: > @LUAJIT_TREE@/src/$(DEPDIR)/$(am__dirstamp) +@LUAJIT_TREE@/src/lbitlib.$(OBJEXT): \ + @LUAJIT_TREE@/src/$(am__dirstamp) \ + @LUAJIT_TREE@/src/$(DEPDIR)/$(am__dirstamp) @LUAJIT_TREE@/src/lib_aux.$(OBJEXT): \ @LUAJIT_TREE@/src/$(am__dirstamp) \ @LUAJIT_TREE@/src/$(DEPDIR)/$(am__dirstamp) @@ -889,6 +903,13 @@ clean-checkPROGRAMS: jittest$(EXEEXT): $(jittest_OBJECTS) $(jittest_DEPENDENCIES) $(EXTRA_jittest_DEPENDENCIES) @rm -f jittest$(EXEEXT) $(AM_V_CCLD)$(LINK) $(jittest_OBJECTS) $(jittest_LDADD) $(LIBS) +@LUAJIT_TREE@/src/luajittry-luajit.$(OBJEXT): \ + @LUAJIT_TREE@/src/$(am__dirstamp) \ + @LUAJIT_TREE@/src/$(DEPDIR)/$(am__dirstamp) + +luajittry$(EXEEXT): $(luajittry_OBJECTS) $(luajittry_DEPENDENCIES) $(EXTRA_luajittry_DEPENDENCIES) + @rm -f luajittry$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(luajittry_OBJECTS) $(luajittry_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -909,6 +930,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_package.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_table.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lbitlib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lib_aux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lib_init.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lj_alloc.Po@am__quote@ @@ -959,6 +981,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lj_udata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lj_vmevent.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/lj_vmmath.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@@LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -990,6 +1013,20 @@ jittest-jittest.obj: jittest.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(jittest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o jittest-jittest.obj `if test -f 'jittest.c'; then $(CYGPATH_W) 'jittest.c'; else $(CYGPATH_W) '$(srcdir)/jittest.c'; fi` +@LUAJIT_TREE@/src/luajittry-luajit.o: @LUAJIT_TREE@/src/luajit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luajittry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/luajittry-luajit.o -MD -MP -MF @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Tpo -c -o @LUAJIT_TREE@/src/luajittry-luajit.o `test -f '@LUAJIT_TREE@/src/luajit.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/luajit.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Tpo @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@LUAJIT_TREE@/src/luajit.c' object='@LUAJIT_TREE@/src/luajittry-luajit.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luajittry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/luajittry-luajit.o `test -f '@LUAJIT_TREE@/src/luajit.c' || echo '$(srcdir)/'`@LUAJIT_TREE@/src/luajit.c + +@LUAJIT_TREE@/src/luajittry-luajit.obj: @LUAJIT_TREE@/src/luajit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luajittry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT @LUAJIT_TREE@/src/luajittry-luajit.obj -MD -MP -MF @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Tpo -c -o @LUAJIT_TREE@/src/luajittry-luajit.obj `if test -f '@LUAJIT_TREE@/src/luajit.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/luajit.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/luajit.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Tpo @LUAJIT_TREE@/src/$(DEPDIR)/luajittry-luajit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='@LUAJIT_TREE@/src/luajit.c' object='@LUAJIT_TREE@/src/luajittry-luajit.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(luajittry_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o @LUAJIT_TREE@/src/luajittry-luajit.obj `if test -f '@LUAJIT_TREE@/src/luajit.c'; then $(CYGPATH_W) '@LUAJIT_TREE@/src/luajit.c'; else $(CYGPATH_W) '$(srcdir)/@LUAJIT_TREE@/src/luajit.c'; fi` + .s.o: $(AM_V_CCAS)$(CCASCOMPILE) -c -o $@ $< diff --git a/Build/source/libs/luajit/configure b/Build/source/libs/luajit/configure index 1aa50311226..3ffba5ea138 100755 --- a/Build/source/libs/luajit/configure +++ b/Build/source/libs/luajit/configure @@ -4786,6 +4786,62 @@ if test "$ac_res" != no; then : fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 +$as_echo_n "checking for library containing dlopen... " >&6; } +if ${ac_cv_search_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_dlopen=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_dlopen+:} false; then : + break +fi +done +if ${ac_cv_search_dlopen+:} false; then : + +else + ac_cv_search_dlopen=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 +$as_echo "$ac_cv_search_dlopen" >&6; } +ac_res=$ac_cv_search_dlopen +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + LUAJIT_DEFINES=-DLUAJIT_ENABLE_LUA52COMPAT diff --git a/Build/source/libs/luajit/configure.ac b/Build/source/libs/luajit/configure.ac index 2bb7fe3a7c1..f8ecce6d473 100644 --- a/Build/source/libs/luajit/configure.ac +++ b/Build/source/libs/luajit/configure.ac @@ -23,6 +23,7 @@ AC_PROG_RANLIB AC_PROG_LN_S AC_SEARCH_LIBS([sqrt], [m]) +AC_SEARCH_LIBS([dlopen], [dl]) KPSE_LUAJIT_DEFINES KPSE_LARGEFILE([LUAJIT_DEFINES]) diff --git a/Build/source/libs/luajit/jiterr.exp b/Build/source/libs/luajit/jiterr.exp new file mode 100644 index 00000000000..117df1534c9 --- /dev/null +++ b/Build/source/libs/luajit/jiterr.exp @@ -0,0 +1,4 @@ +./luajittry: (command line):1: test +stack traceback: + [C]: in function 'error' + (command line):1: in main chunk diff --git a/Build/source/libs/luajit/luajiterr.test b/Build/source/libs/luajit/luajiterr.test new file mode 100755 index 00000000000..25783449aea --- /dev/null +++ b/Build/source/libs/luajit/luajiterr.test @@ -0,0 +1,13 @@ +#! /bin/sh + +# Copyright (C) 2014 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +./luajittry -e "error('test')" 2>jiterr.tmp && exit 1 + +sed -e '/\[C]: at 0x/d' jiterr.tmp >jiterr.out + +diff $srcdir/jiterr.exp jiterr.out || exit 1 + + + |