summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-03-10 08:41:33 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-03-10 08:41:33 +0000
commit4f9258a5a6751c1ad14a1d28198bd9e1270ba98d (patch)
treeb6fb444d44d2506943190425d9ec92351212e33a
parentd5c1c39051c6ce87b25c42e170dc0216b80936bd (diff)
libs/luajit: Do not fail when not building the libray
git-svn-id: svn://tug.org/texlive/trunk@33140 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/libs/luajit/ChangeLog5
-rw-r--r--Build/source/libs/luajit/Makefile.am10
-rw-r--r--Build/source/libs/luajit/Makefile.in28
-rwxr-xr-xBuild/source/libs/luajit/configure42
-rw-r--r--Build/source/libs/luajit/configure.ac16
-rw-r--r--Build/source/libs/luajit/m4/lj-system.m410
6 files changed, 78 insertions, 33 deletions
diff --git a/Build/source/libs/luajit/ChangeLog b/Build/source/libs/luajit/ChangeLog
index 27f70cdd773..883a9d96eb2 100644
--- a/Build/source/libs/luajit/ChangeLog
+++ b/Build/source/libs/luajit/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am, configure.ac, m4/lj-system.m4: Do not fail when
+ not building the library.
+
2014-03-03 Peter Breitenlohner <peb@mppmu.mpg.de>
* luajiterr.test (new): Shell script to test error handling.
diff --git a/Build/source/libs/luajit/Makefile.am b/Build/source/libs/luajit/Makefile.am
index 3b4af238c0d..5d789193937 100644
--- a/Build/source/libs/luajit/Makefile.am
+++ b/Build/source/libs/luajit/Makefile.am
@@ -19,7 +19,7 @@ dist-hook:
AM_CPPFLAGS = -I$(srcdir)/$(LUAJIT_TREE)/src $(LUAJIT_DEFINES)
AM_CFLAGS = -Wall
-SUBDIRS = native . include
+SUBDIRS = . include
noinst_LIBRARIES = libluajit.a
@@ -124,7 +124,7 @@ lj_folddef.h: native/buildvm-stamp $(LUAJIT_TREE)/src/lj_opt_fold.c
lj_vm_obj.o lj_vm_asm.s: native/buildvm-stamp
$(AM_V_GEN)native/buildvm -m $(LJVM_MODE) -o $@
-$(ljlib_sources):
+$(ljlib_sources): config.force
@test -f $@ || { rm -f $@; \
if $(AM_V_P); then echo "$(LN_S) $(srcdir)/$(LUAJIT_TREE)/src/$@ $@"; \
else echo " LINK $@"; fi; \
@@ -153,6 +153,12 @@ LDADD = libluajit.a
EXTRA_DIST += jiterr.exp
CLEANFILES += jiterr.out jiterr.tmp
+# Reconfig
+reconfig_prereq =
+DISTCLEANFILES =
+
+include $(srcdir)/../../am/reconfig.am
+
# Rebuild
rebuild_prereq =
rebuild_target = all
diff --git a/Build/source/libs/luajit/Makefile.in b/Build/source/libs/luajit/Makefile.in
index 0f1704c3a25..046172dcab1 100644
--- a/Build/source/libs/luajit/Makefile.in
+++ b/Build/source/libs/luajit/Makefile.in
@@ -80,7 +80,8 @@ build_triplet = @build@
host_triplet = @host@
@PEOBJ_FALSE@am__append_1 = lj_vm_asm.s
@build_TRUE@check_PROGRAMS = jittest$(EXEEXT) luajittry$(EXEEXT)
-DIST_COMMON = $(srcdir)/../../am/rebuild.am $(srcdir)/Makefile.in \
+DIST_COMMON = $(srcdir)/../../am/reconfig.am \
+ $(srcdir)/../../am/rebuild.am $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(srcdir)/config.h.in \
$(am__dist_check_SCRIPTS_DIST) \
@@ -625,7 +626,7 @@ top_srcdir = @top_srcdir@
EXTRA_DIST = $(LUAJIT_TREE) $(LUAJIT_TREE)-PATCHES jiterr.exp
AM_CPPFLAGS = -I$(srcdir)/$(LUAJIT_TREE)/src $(LUAJIT_DEFINES)
AM_CFLAGS = -Wall
-SUBDIRS = native . include
+SUBDIRS = . include
noinst_LIBRARIES = libluajit.a
nodist_libluajit_a_SOURCES = $(ljlib_sources) \
@LUAJIT_TREE@/src/lbitlib.c @LUAJIT_TREE@/src/lib_aux.c \
@@ -682,6 +683,10 @@ nodist_luajittry_SOURCES = @LUAJIT_TREE@/src/luajit.c
luajittry_CPPFLAGS = -Iinclude
LDADD = libluajit.a
+# Reconfig
+reconfig_prereq =
+DISTCLEANFILES = config.force
+
# Rebuild
rebuild_prereq =
rebuild_target = all
@@ -692,7 +697,7 @@ all: config.h
.SUFFIXES: .c .log .o .obj .s .test .test$(EXEEXT) .trs
am--refresh: Makefile
@:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../am/rebuild.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../am/reconfig.am $(srcdir)/../../am/rebuild.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -715,7 +720,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
-$(srcdir)/../../am/rebuild.am:
+$(srcdir)/../../am/reconfig.am $(srcdir)/../../am/rebuild.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
@@ -1526,6 +1531,7 @@ distclean-generic:
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-rm -f @LUAJIT_TREE@/src/$(DEPDIR)/$(am__dirstamp)
-rm -f @LUAJIT_TREE@/src/$(am__dirstamp)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -1653,11 +1659,23 @@ lj_folddef.h: native/buildvm-stamp $(LUAJIT_TREE)/src/lj_opt_fold.c
lj_vm_obj.o lj_vm_asm.s: native/buildvm-stamp
$(AM_V_GEN)native/buildvm -m $(LJVM_MODE) -o $@
-$(ljlib_sources):
+$(ljlib_sources): config.force
@test -f $@ || { rm -f $@; \
if $(AM_V_P); then echo "$(LN_S) $(srcdir)/$(LUAJIT_TREE)/src/$@ $@"; \
else echo " LINK $@"; fi; \
$(LN_S) $(srcdir)/$(LUAJIT_TREE)/src/$@ $@; } || exit 1
+config.force: $(reconfig_prereq)
+ @if test -f $@; then :; else \
+ trap 'rm -rf reconfig.lock' 1 2 13 15; \
+ if mkdir reconfig.lock 2>/dev/null; then \
+ echo timestamp >$@; \
+ $(SHELL) ./config.status --recheck; \
+ rmdir reconfig.lock; \
+ else \
+ while test -d rebuild.lock && test -z "$$dry"; do sleep 1; done; \
+ test -f $@; \
+ fi; \
+ fi
rebuild.stamp: $(rebuild_target)
echo timestamp >$@
diff --git a/Build/source/libs/luajit/configure b/Build/source/libs/luajit/configure
index 3ffba5ea138..329f141d7f3 100755
--- a/Build/source/libs/luajit/configure
+++ b/Build/source/libs/luajit/configure
@@ -595,11 +595,11 @@ LUAJIT_TREE
build_FALSE
build_TRUE
LJVM_MODE
+LJHOST
PEOBJ_FALSE
PEOBJ_TRUE
DASM_ARCH
LJARCH
-LJHOST
CPP
LUAJIT_DEFINES
LN_S
@@ -5137,6 +5137,18 @@ case $ac_cv_sys_largefile_source in #(
esac
+case $host_os in #(
+ cygwin* | mingw* | msys*) :
+ LJHOST='Windows' ;; #(
+ darwin*) :
+ LJHOST='Darwin' ;; #(
+ solaris* | sunos*) :
+ LJHOST='SunOS' ;; #(
+ linux*) :
+ LJHOST='Linux' ;; #(
+ *) :
+ LJHOST='Other' ;;
+esac
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5275,18 +5287,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-case $host_os in #(
- cygwin* | mingw* | msys*) :
- LJHOST='Windows' ;; #(
- darwin*) :
- LJHOST='Darwin' ;; #(
- solaris* | sunos*) :
- LJHOST='SunOS' ;; #(
- linux*) :
- LJHOST='Linux' ;; #(
- *) :
- LJHOST='Other' ;;
-esac
lj_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$srcdir/LuaJIT-2.0.2/src $LUAJIT_DEFINES -dM"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5294,7 +5294,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#include <lj_arch.h>
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
- rm -f dynasm_flags native_flags
+ lj_cpp=ok; rm -f dynasm_flags native_flags
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for architecture" >&5
$as_echo_n "checking for architecture... " >&6; }
if grep 'LJ_TARGET_X64 ' conftest.i >/dev/null 2>&1; then :
@@ -5401,15 +5401,12 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LJHOST $LJARCH $DASM_ARCH" >&5
$as_echo "$LJHOST $LJARCH $DASM_ARCH" >&6; }
-else
- as_fn_error $? "Sorry, can not preprocess <lj_arch.h>" "$LINENO" 5
fi
rm -f conftest.err conftest.i conftest.$ac_ext
CPPFLAGS=$lj_save_CPPFLAGS
-
case $LJHOST in #(
Windows) :
LJVM_MODE=peobj
@@ -5429,6 +5426,8 @@ fi
+
+
if test "x$enable_build" != xno; then
build_TRUE=
build_FALSE='#'
@@ -5438,6 +5437,15 @@ else
fi
+if test "x$enable_build" != xno || test -f config.force; then
+
+if test "x$lj_cpp" != xok; then :
+ as_fn_error $? "Sorry, can not preprocess <lj_arch.h>" "$LINENO" 5
+fi
+
+echo timestamp >config.force
+fi
+
LUAJIT_TREE=LuaJIT-2.0.2
diff --git a/Build/source/libs/luajit/configure.ac b/Build/source/libs/luajit/configure.ac
index f8ecce6d473..38ba43f560e 100644
--- a/Build/source/libs/luajit/configure.ac
+++ b/Build/source/libs/luajit/configure.ac
@@ -28,6 +28,12 @@ AC_SEARCH_LIBS([dlopen], [dl])
KPSE_LUAJIT_DEFINES
KPSE_LARGEFILE([LUAJIT_DEFINES])
+AS_CASE([$host_os],
+ [cygwin* | mingw* | msys*], [LJHOST='Windows'],
+ [darwin*], [LJHOST='Darwin'],
+ [solaris* | sunos*], [LJHOST='SunOS'],
+ [linux*], [LJHOST='Linux'],
+ [LJHOST='Other'])
LJ_ARCH()
AS_CASE([$LJHOST],
[Windows], [LJVM_MODE=peobj
@@ -35,10 +41,20 @@ AS_CASE([$LJHOST],
[Darwin | iOS], [LJVM_MODE=machasm],
[LJVM_MODE=elfasm])
AM_CONDITIONAL([PEOBJ], [test "x$LJVM_MODE" = xpeobj])
+
+AC_SUBST([LJHOST])
AC_SUBST([LJVM_MODE])
AM_CONDITIONAL([build], [test "x$enable_build" != xno])
+if test "x$enable_build" != xno || test -f config.force; then
+
+AS_IF([test "x$lj_cpp" != xok],
+ [AC_MSG_ERROR([Sorry, can not preprocess <lj_arch.h>])])
+
+echo timestamp >config.force
+fi
+
AC_SUBST([LUAJIT_TREE], [LuaJIT-]luajit_version)
dnl Not used but avoids putting a zillion useless -D's on the command line.
diff --git a/Build/source/libs/luajit/m4/lj-system.m4 b/Build/source/libs/luajit/m4/lj-system.m4
index d119fad6d04..623180c3335 100644
--- a/Build/source/libs/luajit/m4/lj-system.m4
+++ b/Build/source/libs/luajit/m4/lj-system.m4
@@ -86,19 +86,11 @@ AC_MSG_RESULT([$LJHOST $LJARCH $DASM_ARCH])
# -------
# Determine host and build system characteristics.
AC_DEFUN([LJ_ARCH], [dnl
-AS_CASE([$host_os],
- [cygwin* | mingw* | msys*], [LJHOST='Windows'],
- [darwin*], [LJHOST='Darwin'],
- [solaris* | sunos*], [LJHOST='SunOS'],
- [linux*], [LJHOST='Linux'],
- [LJHOST='Other'])
lj_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$srcdir/LuaJIT-luajit_version/src $LUAJIT_DEFINES -dM"
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <lj_arch.h>]])],
- [_LJ_ARCH],
- [AC_MSG_ERROR([Sorry, can not preprocess <lj_arch.h>])])
+ [lj_cpp=ok; _LJ_ARCH])
CPPFLAGS=$lj_save_CPPFLAGS
-AC_SUBST([LJHOST])
AC_SUBST([LJARCH])
AC_SUBST([DASM_ARCH])
]) # LJ_ARCH