From 190d65a029262a4e7c511c780043025b8a1d56c9 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Fri, 31 May 2019 11:21:01 -0400 Subject: [PATCH 01/10] Return empty BsonObject in `bson_object_from_bytes` on failure --- src/bson_array.c | 5 ++++- src/bson_object.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bson_array.c b/src/bson_array.c index 7567441..db978da 100644 --- a/src/bson_array.c +++ b/src/bson_array.c @@ -144,7 +144,10 @@ BsonArray bson_array_from_bytes(uint8_t *data) { int32_t size = read_int32_le(&p); BsonArray array; - bson_array_from_bytes_len(&array, data, size); + size_t bytes = bson_array_from_bytes_len(&array, data, size); + if (bytes <= 0) { + bson_array_initialize(&array, 10); + } return array; } diff --git a/src/bson_object.c b/src/bson_object.c index d1fa21d..1c10a74 100644 --- a/src/bson_object.c +++ b/src/bson_object.c @@ -165,7 +165,10 @@ BsonObject bson_object_from_bytes(uint8_t *data) { int32_t size = read_int32_le(&p); BsonObject obj; - bson_object_from_bytes_len(&obj, data, size); + size_t bytes = bson_object_from_bytes_len(&obj, data, size); + if (bytes <= 0) { + bson_object_initialize_default(&obj); + } return obj; } From 17568b46359cc85fb2842e4c315a6c87cdf72e2a Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Thu, 20 Feb 2020 16:33:39 -0500 Subject: [PATCH 02/10] Fix lua wrapper installation --- Makefile.in | 15 +- README.md | 2 +- aclocal.m4 | 60 +++ config.h | 12 + config.h.in | 12 + configure | 1067 ++++++++++++++++++++++++++++++------- configure.ac | 5 +- lua/Makefile.am | 11 +- lua/Makefile.in | 119 +++-- src/Makefile.in | 30 +- src/emhashmap/Makefile.in | 30 +- test/Makefile.in | 71 ++- 12 files changed, 1147 insertions(+), 287 deletions(-) diff --git a/Makefile.in b/Makefile.in index 16a61d8..25e1c59 100644 --- a/Makefile.in +++ b/Makefile.in @@ -193,8 +193,8 @@ CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = src lua test am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/libbson.pc.in compile config.guess config.sub \ - install-sh ltmain.sh missing + $(srcdir)/libbson.pc.in ar-lib compile config.guess config.sub \ + depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -279,6 +279,13 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA = @LUA@ +LUA_EXEC_PREFIX = @LUA_EXEC_PREFIX@ +LUA_INCLUDE = @LUA_INCLUDE@ +LUA_PLATFORM = @LUA_PLATFORM@ +LUA_PREFIX = @LUA_PREFIX@ +LUA_SHORT_VERSION = @LUA_SHORT_VERSION@ +LUA_VERSION = @LUA_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -342,10 +349,14 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +luadir = @luadir@ +luaexecdir = @luaexecdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgluadir = @pkgluadir@ +pkgluaexecdir = @pkgluaexecdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ diff --git a/README.md b/README.md index 6704a11..5e794ec 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ sudo make install ### Install Dependencies ### ```bash -sudo apt-get install liblua5.2-dev +sudo apt-get install liblua5.2-dev autoconf-archive ``` ### Build Library ### diff --git a/aclocal.m4 b/aclocal.m4 index 89d3216..71d8815 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -332,6 +332,66 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +# Copyright (C) 2011-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_AR([ACT-IF-FAIL]) +# ------------------------- +# Try to determine the archiver interface, and trigger the ar-lib wrapper +# if it is needed. If the detection of archiver interface fails, run +# ACT-IF-FAIL (default is to abort configure with a proper error message). +AC_DEFUN([AM_PROG_AR], +[AC_BEFORE([$0], [LT_INIT])dnl +AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([ar-lib])dnl +AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) +: ${AR=ar} + +AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], + [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + ]) + AC_LANG_POP([C])]) + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + m4_default([$1], + [AC_MSG_ERROR([could not determine $AR interface])]) + ;; +esac +AC_SUBST([AR])dnl +]) + # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2017 Free Software Foundation, Inc. diff --git a/config.h b/config.h index 60f99aa..34d02bb 100644 --- a/config.h +++ b/config.h @@ -7,6 +7,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_LAUXLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LUACONF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LUALIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LUA_H 1 + /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #define HAVE_MALLOC 1 diff --git a/config.h.in b/config.h.in index ca89904..20e68ee 100644 --- a/config.h.in +++ b/config.h.in @@ -6,6 +6,18 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LAUXLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LUACONF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LUALIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LUA_H + /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC diff --git a/configure b/configure index 14cebb9..fcaaa1e 100755 --- a/configure +++ b/configure @@ -641,6 +641,17 @@ BUILD_TESTS_FALSE BUILD_TESTS_TRUE BUILD_LUA_FALSE BUILD_LUA_TRUE +LUA_INCLUDE +pkgluaexecdir +luaexecdir +pkgluadir +luadir +LUA_EXEC_PREFIX +LUA_PREFIX +LUA_PLATFORM +LUA_SHORT_VERSION +LUA_VERSION +LUA am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -654,8 +665,6 @@ NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB -ac_ct_AR -AR DLLTOOL OBJDUMP LN_S @@ -667,6 +676,15 @@ FGREP EGREP GREP SED +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -684,15 +702,8 @@ CPPFLAGS LDFLAGS CFLAGS CC -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -LIBTOOL +ac_ct_AR +AR AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V @@ -763,12 +774,12 @@ ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules +enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname -enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock @@ -785,6 +796,8 @@ LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP +LUA +LUA_INCLUDE PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR @@ -1421,14 +1434,14 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: @@ -1456,6 +1469,8 @@ Some influential environment variables: LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor + LUA The Lua interpreter, e.g. /usr/bin/lua5.1 + LUA_INCLUDE The Lua includes, e.g. -I/usr/include/lua5.1 PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path @@ -3041,171 +3056,6 @@ END fi -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -4229,20 +4079,357 @@ else am_cv_CC_dependencies_compiler_type=none fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar lib "link -lib" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar lib "link -lib" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +$as_echo_n "checking the archiver ($AR) interface... " >&6; } +if ${am_cv_ar_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + am_cv_ar_interface=ar + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int some_variable = 0; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 +$as_echo "$am_cv_ar_interface" >&6; } + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + as_fn_error $? "could not determine $AR interface" "$LINENO" 5 + ;; +esac + # see https://lists.gnu.org/archive/html/automake/2012-05/msg00014.html +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.6' +macro_revision='2.4.6' + + + + + + + + + + + + + +ltmain=$ac_aux_dir/ltmain.sh + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case $ECHO in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 @@ -5650,7 +5837,6 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - if test -n "$ac_tool_prefix"; then for ac_prog in ar do @@ -15179,6 +15365,332 @@ fi + + + + + + + + if test "x$LUA" != 'x'; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LUA is a Lua interpreter" >&5 +$as_echo_n "checking if $LUA is a Lua interpreter... " >&6; } + + _ax_lua_factorial=`$LUA 2>/dev/null -e ' + -- a simple factorial + function fact (n) + if n == 0 then + return 1 + else + return n * fact(n-1) + end + end + print("fact(5) is " .. fact(5))'` + if test "$_ax_lua_factorial" = 'fact(5) is 120'; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "not a Lua interpreter" "$LINENO" 5 + +fi + + _ax_check_text="whether $LUA version >= 5.1, < 5.4" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking $_ax_check_text" >&5 +$as_echo_n "checking $_ax_check_text... " >&6; } + + _ax_lua_good_version=`$LUA -e ' + -- a script to compare versions + function verstr2num(verstr) + local _, _, majorver, minorver = string.find(verstr, "^(%d+)%.(%d+)") + if majorver and minorver then + return tonumber(majorver) * 100 + tonumber(minorver) + end + end + local minver = verstr2num("5.1") + local _, _, trimver = string.find(_VERSION, "^Lua (.*)") + local ver = verstr2num(trimver) + local maxver = verstr2num("5.4") or 1e9 + if minver <= ver and ver < maxver then + print("yes") + else + print("no") + end'` + if test "x$_ax_lua_good_version" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "version is out of range for specified LUA" "$LINENO" 5 +fi + + ax_display_LUA=$LUA + +else + _ax_check_text="for a Lua interpreter with version >= 5.1, < 5.4" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking $_ax_check_text" >&5 +$as_echo_n "checking $_ax_check_text... " >&6; } +if ${ax_cv_pathless_LUA+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ax_cv_pathless_LUA in lua lua5.3 lua53 lua5.2 lua52 lua5.1 lua51 lua50 none; do + test "x$ax_cv_pathless_LUA" = 'xnone' && break + + _ax_lua_factorial=`$ax_cv_pathless_LUA 2>/dev/null -e ' + -- a simple factorial + function fact (n) + if n == 0 then + return 1 + else + return n * fact(n-1) + end + end + print("fact(5) is " .. fact(5))'` + if test "$_ax_lua_factorial" = 'fact(5) is 120'; then : + +else + continue +fi + + + _ax_lua_good_version=`$ax_cv_pathless_LUA -e ' + -- a script to compare versions + function verstr2num(verstr) + local _, _, majorver, minorver = string.find(verstr, "^(%d+)%.(%d+)") + if majorver and minorver then + return tonumber(majorver) * 100 + tonumber(minorver) + end + end + local minver = verstr2num("5.1") + local _, _, trimver = string.find(_VERSION, "^Lua (.*)") + local ver = verstr2num(trimver) + local maxver = verstr2num("5.4") or 1e9 + if minver <= ver and ver < maxver then + print("yes") + else + print("no") + end'` + if test "x$_ax_lua_good_version" = "xyes"; then : + break +fi + + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_pathless_LUA" >&5 +$as_echo "$ax_cv_pathless_LUA" >&6; } + if test "x$ax_cv_pathless_LUA" = 'xnone'; then : + LUA=':' +else + # Extract the first word of "$ax_cv_pathless_LUA", so it can be a program name with args. +set dummy $ax_cv_pathless_LUA; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_LUA+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $LUA in + [\\/]* | ?:[\\/]*) + ac_cv_path_LUA="$LUA" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_LUA="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +LUA=$ac_cv_path_LUA +if test -n "$LUA"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LUA" >&5 +$as_echo "$LUA" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi + ax_display_LUA=$ax_cv_pathless_LUA + +fi + + + if test "x$LUA" = 'x:'; then : + as_fn_error $? "cannot find suitable Lua interpreter" "$LINENO" 5 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA version" >&5 +$as_echo_n "checking for $ax_display_LUA version... " >&6; } +if ${ax_cv_lua_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_lua_version=`$LUA -e ' + -- return a version number in X.Y format + local _, _, ver = string.find(_VERSION, "^Lua (%d+%.%d+)") + print(ver)'` + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_version" >&5 +$as_echo "$ax_cv_lua_version" >&6; } + if test "x$ax_cv_lua_version" = 'x'; then : + as_fn_error $? "invalid Lua version number" "$LINENO" 5 +fi + LUA_VERSION=$ax_cv_lua_version + + LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'` + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA platform" >&5 +$as_echo_n "checking for $ax_display_LUA platform... " >&6; } +if ${ax_cv_lua_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_lua_platform=`$LUA -e 'print("unknown")'` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_platform" >&5 +$as_echo "$ax_cv_lua_platform" >&6; } + LUA_PLATFORM=$ax_cv_lua_platform + + + LUA_PREFIX='${prefix}' + + LUA_EXEC_PREFIX='${exec_prefix}' + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA script directory" >&5 +$as_echo_n "checking for $ax_display_LUA script directory... " >&6; } +if ${ax_cv_lua_luadir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = 'xNONE'; then : + ax_lua_prefix=$ac_default_prefix +else + ax_lua_prefix=$prefix +fi + + ax_cv_lua_luadir="$LUA_PREFIX/share/lua/$LUA_VERSION" + + + + ax_lua_prefixed_path=`$LUA -e ' + -- get the path based on search type + local searchtype = "script" + local paths = "" + if searchtype == "script" then + paths = (package and package.path) or LUA_PATH + elseif searchtype == "module" then + paths = (package and package.cpath) or LUA_CPATH + end + -- search for the prefix + local prefix = "'$ax_lua_prefix'" + local minpath = "" + local mindepth = 1e9 + string.gsub(paths, "([^;]+)", + function (path) + path = string.gsub(path, "%?.*$", "") + path = string.gsub(path, "/[^/]*$", "") + if string.find(path, prefix) then + local depth = string.len(string.gsub(path, "[^/]", "")) + if depth < mindepth then + minpath = path + mindepth = depth + end + end + end) + print(minpath)'` + + if test "x$ax_lua_prefixed_path" != 'x'; then : + _ax_strip_prefix=`echo "$ax_lua_prefix" | $SED 's|.|.|g'` + ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \ + $SED "s|^$_ax_strip_prefix|$LUA_PREFIX|"` + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_luadir" >&5 +$as_echo "$ax_cv_lua_luadir" >&6; } + luadir=$ax_cv_lua_luadir + + pkgluadir=\${luadir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA module directory" >&5 +$as_echo_n "checking for $ax_display_LUA module directory... " >&6; } +if ${ax_cv_lua_luaexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = 'xNONE'; then : + ax_lua_exec_prefix=$ax_lua_prefix +else + ax_lua_exec_prefix=$exec_prefix +fi + + ax_cv_lua_luaexecdir="$LUA_EXEC_PREFIX/lib/lua/$LUA_VERSION" + + + + ax_lua_prefixed_path=`$LUA -e ' + -- get the path based on search type + local searchtype = "module" + local paths = "" + if searchtype == "script" then + paths = (package and package.path) or LUA_PATH + elseif searchtype == "module" then + paths = (package and package.cpath) or LUA_CPATH + end + -- search for the prefix + local prefix = "'$ax_lua_exec_prefix'" + local minpath = "" + local mindepth = 1e9 + string.gsub(paths, "([^;]+)", + function (path) + path = string.gsub(path, "%?.*$", "") + path = string.gsub(path, "/[^/]*$", "") + if string.find(path, prefix) then + local depth = string.len(string.gsub(path, "[^/]", "")) + if depth < mindepth then + minpath = path + mindepth = depth + end + end + end) + print(minpath)'` + + if test "x$ax_lua_prefixed_path" != 'x'; then : + _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | $SED 's|.|.|g'` + ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \ + $SED "s|^$_ax_strip_prefix|$LUA_EXEC_PREFIX|"` + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_luaexecdir" >&5 +$as_echo "$ax_cv_lua_luaexecdir" >&6; } + luaexecdir=$ax_cv_lua_luaexecdir + + pkgluaexecdir=\${luaexecdir}/$PACKAGE + + + + +fi + + # Checks for libraries. # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : @@ -15252,6 +15764,171 @@ fi done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LUA_VERSION is defined" >&5 +$as_echo_n "checking if LUA_VERSION is defined... " >&6; } + if test "x$LUA_VERSION" != 'x'; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "cannot check Lua headers without knowing LUA_VERSION" "$LINENO" 5 + +fi + + + + LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'` + + + _ax_lua_saved_cppflags=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $LUA_INCLUDE" + for ac_header in lua.h lualib.h lauxlib.h luaconf.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + CPPFLAGS=$_ax_lua_saved_cppflags + + if test "x$LUA_INCLUDE" = 'x' && + test "x$ac_cv_header_lua_h" != 'xyes'; then : + for _ax_include_path in /usr/include/lua$LUA_VERSION \ + /usr/include/lua-$LUA_VERSION \ + /usr/include/lua/$LUA_VERSION \ + /usr/include/lua$LUA_SHORT_VERSION \ + /usr/local/include/lua$LUA_VERSION \ + /usr/local/include/lua-$LUA_VERSION \ + /usr/local/include/lua/$LUA_VERSION \ + /usr/local/include/lua$LUA_SHORT_VERSION \ + ; do + test ! -d "$_ax_include_path" && continue + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua headers in" >&5 +$as_echo_n "checking for Lua headers in... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_ax_include_path" >&5 +$as_echo "$_ax_include_path" >&6; } + + { ac_cv_header_lua_h=; unset ac_cv_header_lua_h;} + { ac_cv_header_lualib_h=; unset ac_cv_header_lualib_h;} + { ac_cv_header_lauxlib_h=; unset ac_cv_header_lauxlib_h;} + { ac_cv_header_luaconf_h=; unset ac_cv_header_luaconf_h;} + + _ax_lua_saved_cppflags=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$_ax_include_path" + for ac_header in lua.h lualib.h lauxlib.h luaconf.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + CPPFLAGS=$_ax_lua_saved_cppflags + + if test "x$ac_cv_header_lua_h" = 'xyes'; then : + LUA_INCLUDE="-I$_ax_include_path" + break + +fi + done + +fi + + if test "x$ac_cv_header_lua_h" = 'xyes'; then : + + if test "x$cross_compiling" != 'xyes'; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua header version" >&5 +$as_echo_n "checking for Lua header version... " >&6; } +if ${ax_cv_lua_header_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + _ax_lua_saved_cppflags=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $LUA_INCLUDE" + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +int main(int argc, char ** argv) +{ + if(argc > 1) printf("%s", LUA_VERSION); + exit(EXIT_SUCCESS); +} + + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ax_cv_lua_header_version=`./conftest$EXEEXT p | \ + $SED -n "s|^Lua \([0-9]\{1,\}\.[0-9]\{1,\}\).\{0,\}|\1|p"` + +else + ax_cv_lua_header_version='unknown' +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + CPPFLAGS=$_ax_lua_saved_cppflags + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_header_version" >&5 +$as_echo "$ax_cv_lua_header_version" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Lua header version matches $LUA_VERSION" >&5 +$as_echo_n "checking if Lua header version matches $LUA_VERSION... " >&6; } + if test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ax_header_version_match='yes' + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ax_header_version_match='no' + +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling so assuming header version number matches" >&5 +$as_echo "$as_me: WARNING: cross compiling so assuming header version number matches" >&2;} + ax_header_version_match='yes' + +fi + +fi + + if test "x$ax_header_version_match" != 'xyes' && + test "x$LUA_INCLUDE" != 'x'; then : + as_fn_error $? "cannot find headers for specified LUA_INCLUDE" "$LINENO" 5 +fi + + if test "x$ax_header_version_match" = 'xyes'; then : + +else + as_fn_error $? "cannot find Lua includes" "$LINENO" 5 +fi + + # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } diff --git a/configure.ac b/configure.ac index 11c710c..1841f3d 100644 --- a/configure.ac +++ b/configure.ac @@ -3,8 +3,9 @@ AC_PREREQ([2.69]) AC_INIT(bson_c_lib, 1.2.0, jacob@livio.io) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([subdir-objects foreign -Wall]) AC_CONFIG_MACRO_DIRS([m4]) +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) # see https://lists.gnu.org/archive/html/automake/2012-05/msg00014.html LT_INIT AC_CONFIG_SRCDIR([examples/sample.c]) AC_CONFIG_HEADERS([config.h]) @@ -13,6 +14,7 @@ AC_OUTPUT # Checks for programs. AC_PROG_CC +AX_PROG_LUA([5.1], [5.4]) # Checks for libraries. AC_ENABLE_SHARED @@ -20,6 +22,7 @@ AC_DISABLE_STATIC # Checks for header files. AC_CHECK_HEADERS([stddef.h stdint.h stdlib.h string.h]) +AX_LUA_HEADERS # Checks for typedefs, structures, and compiler characteristics. AC_CHECK_HEADER_STDBOOL diff --git a/lua/Makefile.am b/lua/Makefile.am index 1e02e7b..19e3c58 100644 --- a/lua/Makefile.am +++ b/lua/Makefile.am @@ -1,5 +1,8 @@ -AM_CFLAGS = -Wall +ACLOCAL_AMFLAGS = -I m4 --install -lib_LTLIBRARIES = libluabson.la -libluabson_la_SOURCES = bson_lua_wrapper.c -libluabson_la_LIBADD = ../src/libbson.la +AM_LDFLAGS = -export-symbols-regex '^luaopen_' -module -avoid-version + +luaexec_LTLIBRARIES = bson4lua.la +bson4lua_la_SOURCES = bson_lua_wrapper.c +bson4lua_la_LIBADD = ../src/libbson.la +bson4lua_la_CFLAGS = -I../src/ \ No newline at end of file diff --git a/lua/Makefile.in b/lua/Makefile.in index 44fc16c..10fee1d 100644 --- a/lua/Makefile.in +++ b/lua/Makefile.in @@ -128,15 +128,18 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(libdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libluabson_la_DEPENDENCIES = ../src/libbson.la -am_libluabson_la_OBJECTS = bson_lua_wrapper.lo -libluabson_la_OBJECTS = $(am_libluabson_la_OBJECTS) +am__installdirs = "$(DESTDIR)$(luaexecdir)" +LTLIBRARIES = $(luaexec_LTLIBRARIES) +bson4lua_la_DEPENDENCIES = ../src/libbson.la +am_bson4lua_la_OBJECTS = bson4lua_la-bson_lua_wrapper.lo +bson4lua_la_OBJECTS = $(am_bson4lua_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = +bson4lua_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(bson4lua_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -171,8 +174,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 = $(libluabson_la_SOURCES) -DIST_SOURCES = $(libluabson_la_SOURCES) +SOURCES = $(bson4lua_la_SOURCES) +DIST_SOURCES = $(bson4lua_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -241,6 +244,13 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA = @LUA@ +LUA_EXEC_PREFIX = @LUA_EXEC_PREFIX@ +LUA_INCLUDE = @LUA_INCLUDE@ +LUA_PLATFORM = @LUA_PLATFORM@ +LUA_PREFIX = @LUA_PREFIX@ +LUA_SHORT_VERSION = @LUA_SHORT_VERSION@ +LUA_VERSION = @LUA_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -304,10 +314,14 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +luadir = @luadir@ +luaexecdir = @luaexecdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgluadir = @pkgluadir@ +pkgluaexecdir = @pkgluaexecdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ @@ -320,10 +334,12 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CFLAGS = -Wall -lib_LTLIBRARIES = libluabson.la -libluabson_la_SOURCES = bson_lua_wrapper.c -libluabson_la_LIBADD = ../src/libbson.la +ACLOCAL_AMFLAGS = -I m4 --install +AM_LDFLAGS = -export-symbols-regex '^luaopen_' -module -avoid-version +luaexec_LTLIBRARIES = bson4lua.la +bson4lua_la_SOURCES = bson_lua_wrapper.c +bson4lua_la_LIBADD = ../src/libbson.la +bson4lua_la_CFLAGS = -I../src/ all: all-am .SUFFIXES: @@ -337,9 +353,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lua/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lua/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu lua/Makefile + $(AUTOMAKE) --foreign lua/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -358,33 +374,33 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -install-libLTLIBRARIES: $(lib_LTLIBRARIES) +install-luaexecLTLIBRARIES: $(luaexec_LTLIBRARIES) @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + @list='$(luaexec_LTLIBRARIES)'; test -n "$(luaexecdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + echo " $(MKDIR_P) '$(DESTDIR)$(luaexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(luaexecdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(luaexecdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(luaexecdir)"; \ } -uninstall-libLTLIBRARIES: +uninstall-luaexecLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + @list='$(luaexec_LTLIBRARIES)'; test -n "$(luaexecdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(luaexecdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(luaexecdir)/$$f"; \ done -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ +clean-luaexecLTLIBRARIES: + -test -z "$(luaexec_LTLIBRARIES)" || rm -f $(luaexec_LTLIBRARIES) + @list='$(luaexec_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ @@ -393,8 +409,8 @@ clean-libLTLIBRARIES: rm -f $${locs}; \ } -libluabson.la: $(libluabson_la_OBJECTS) $(libluabson_la_DEPENDENCIES) $(EXTRA_libluabson_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(libluabson_la_OBJECTS) $(libluabson_la_LIBADD) $(LIBS) +bson4lua.la: $(bson4lua_la_OBJECTS) $(bson4lua_la_DEPENDENCIES) $(EXTRA_bson4lua_la_DEPENDENCIES) + $(AM_V_CCLD)$(bson4lua_la_LINK) -rpath $(luaexecdir) $(bson4lua_la_OBJECTS) $(bson4lua_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -402,29 +418,39 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bson_lua_wrapper.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bson4lua_la-bson_lua_wrapper.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +bson4lua_la-bson_lua_wrapper.lo: bson_lua_wrapper.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson4lua_la_CFLAGS) $(CFLAGS) -MT bson4lua_la-bson_lua_wrapper.lo -MD -MP -MF $(DEPDIR)/bson4lua_la-bson_lua_wrapper.Tpo -c -o bson4lua_la-bson_lua_wrapper.lo `test -f 'bson_lua_wrapper.c' || echo '$(srcdir)/'`bson_lua_wrapper.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bson4lua_la-bson_lua_wrapper.Tpo $(DEPDIR)/bson4lua_la-bson_lua_wrapper.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bson_lua_wrapper.c' object='bson4lua_la-bson_lua_wrapper.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson4lua_la_CFLAGS) $(CFLAGS) -c -o bson4lua_la-bson_lua_wrapper.lo `test -f 'bson_lua_wrapper.c' || echo '$(srcdir)/'`bson_lua_wrapper.c + mostlyclean-libtool: -rm -f *.lo @@ -517,7 +543,7 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ + for dir in "$(DESTDIR)$(luaexecdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -552,7 +578,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ +clean-am: clean-generic clean-libtool clean-luaexecLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -579,7 +605,7 @@ install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-libLTLIBRARIES +install-exec-am: install-luaexecLTLIBRARIES install-html: install-html-am @@ -619,23 +645,24 @@ ps: ps-am ps-am: -uninstall-am: uninstall-libLTLIBRARIES +uninstall-am: uninstall-luaexecLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ + clean-libtool clean-luaexecLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES + install-info-am install-luaexecLTLIBRARIES install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-luaexecLTLIBRARIES .PRECIOUS: Makefile diff --git a/src/Makefile.in b/src/Makefile.in index 1eb3c27..ea7fc20 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -286,6 +286,13 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA = @LUA@ +LUA_EXEC_PREFIX = @LUA_EXEC_PREFIX@ +LUA_INCLUDE = @LUA_INCLUDE@ +LUA_PLATFORM = @LUA_PLATFORM@ +LUA_PREFIX = @LUA_PREFIX@ +LUA_SHORT_VERSION = @LUA_SHORT_VERSION@ +LUA_VERSION = @LUA_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -349,10 +356,14 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +luadir = @luadir@ +luaexecdir = @luaexecdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgluadir = @pkgluadir@ +pkgluaexecdir = @pkgluaexecdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ @@ -384,9 +395,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile + $(AUTOMAKE) --foreign src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -454,22 +465,25 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bson_util.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< diff --git a/src/emhashmap/Makefile.in b/src/emhashmap/Makefile.in index 402ae0c..5c9a647 100644 --- a/src/emhashmap/Makefile.in +++ b/src/emhashmap/Makefile.in @@ -244,6 +244,13 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA = @LUA@ +LUA_EXEC_PREFIX = @LUA_EXEC_PREFIX@ +LUA_INCLUDE = @LUA_INCLUDE@ +LUA_PLATFORM = @LUA_PLATFORM@ +LUA_PREFIX = @LUA_PREFIX@ +LUA_SHORT_VERSION = @LUA_SHORT_VERSION@ +LUA_VERSION = @LUA_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -307,10 +314,14 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +luadir = @luadir@ +luaexecdir = @luaexecdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgluadir = @pkgluadir@ +pkgluaexecdir = @pkgluaexecdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ @@ -341,9 +352,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/emhashmap/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/emhashmap/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/emhashmap/Makefile + $(AUTOMAKE) --foreign src/emhashmap/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -409,22 +420,25 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emhashmap.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< diff --git a/test/Makefile.in b/test/Makefile.in index 75cf0cc..95478c2 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -114,8 +114,9 @@ bson_object_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(bson_object_test_CFLAGS) $(CFLAGS) \ $(bson_object_test_LDFLAGS) $(LDFLAGS) -o $@ +am__dirstamp = $(am__leading_dot)dirstamp am_bson_util_test_OBJECTS = bson_util_test-bson_util_test.$(OBJEXT) \ - bson_util_test-bson_util.$(OBJEXT) + $(top_builddir)/src/bson_util_test-bson_util.$(OBJEXT) bson_util_test_OBJECTS = $(am_bson_util_test_OBJECTS) bson_util_test_DEPENDENCIES = bson_util_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @@ -431,6 +432,13 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA = @LUA@ +LUA_EXEC_PREFIX = @LUA_EXEC_PREFIX@ +LUA_INCLUDE = @LUA_INCLUDE@ +LUA_PLATFORM = @LUA_PLATFORM@ +LUA_PREFIX = @LUA_PREFIX@ +LUA_SHORT_VERSION = @LUA_SHORT_VERSION@ +LUA_VERSION = @LUA_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -494,10 +502,14 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +luadir = @luadir@ +luaexecdir = @luaexecdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgluadir = @pkgluadir@ +pkgluaexecdir = @pkgluaexecdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ @@ -530,9 +542,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu test/Makefile + $(AUTOMAKE) --foreign test/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -563,6 +575,15 @@ clean-checkPROGRAMS: bson_object_test$(EXEEXT): $(bson_object_test_OBJECTS) $(bson_object_test_DEPENDENCIES) $(EXTRA_bson_object_test_DEPENDENCIES) @rm -f bson_object_test$(EXEEXT) $(AM_V_CCLD)$(bson_object_test_LINK) $(bson_object_test_OBJECTS) $(bson_object_test_LDADD) $(LIBS) +$(top_builddir)/src/$(am__dirstamp): + @$(MKDIR_P) $(top_builddir)/src + @: > $(top_builddir)/src/$(am__dirstamp) +$(top_builddir)/src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) $(top_builddir)/src/$(DEPDIR) + @: > $(top_builddir)/src/$(DEPDIR)/$(am__dirstamp) +$(top_builddir)/src/bson_util_test-bson_util.$(OBJEXT): \ + $(top_builddir)/src/$(am__dirstamp) \ + $(top_builddir)/src/$(DEPDIR)/$(am__dirstamp) bson_util_test$(EXEEXT): $(bson_util_test_OBJECTS) $(bson_util_test_DEPENDENCIES) $(EXTRA_bson_util_test_DEPENDENCIES) @rm -f bson_util_test$(EXEEXT) @@ -570,31 +591,35 @@ bson_util_test$(EXEEXT): $(bson_util_test_OBJECTS) $(bson_util_test_DEPENDENCIES mostlyclean-compile: -rm -f *.$(OBJEXT) + -rm -f $(top_builddir)/src/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bson_object_test-bson_object_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bson_util_test-bson_util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bson_util_test-bson_util_test.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< @@ -627,19 +652,19 @@ bson_util_test-bson_util_test.obj: bson_util_test.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -c -o bson_util_test-bson_util_test.obj `if test -f 'bson_util_test.c'; then $(CYGPATH_W) 'bson_util_test.c'; else $(CYGPATH_W) '$(srcdir)/bson_util_test.c'; fi` -bson_util_test-bson_util.o: $(top_builddir)/src/bson_util.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -MT bson_util_test-bson_util.o -MD -MP -MF $(DEPDIR)/bson_util_test-bson_util.Tpo -c -o bson_util_test-bson_util.o `test -f '$(top_builddir)/src/bson_util.c' || echo '$(srcdir)/'`$(top_builddir)/src/bson_util.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bson_util_test-bson_util.Tpo $(DEPDIR)/bson_util_test-bson_util.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/src/bson_util.c' object='bson_util_test-bson_util.o' libtool=no @AMDEPBACKSLASH@ +$(top_builddir)/src/bson_util_test-bson_util.o: $(top_builddir)/src/bson_util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -MT $(top_builddir)/src/bson_util_test-bson_util.o -MD -MP -MF $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Tpo -c -o $(top_builddir)/src/bson_util_test-bson_util.o `test -f '$(top_builddir)/src/bson_util.c' || echo '$(srcdir)/'`$(top_builddir)/src/bson_util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Tpo $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/src/bson_util.c' object='$(top_builddir)/src/bson_util_test-bson_util.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) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -c -o bson_util_test-bson_util.o `test -f '$(top_builddir)/src/bson_util.c' || echo '$(srcdir)/'`$(top_builddir)/src/bson_util.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/src/bson_util_test-bson_util.o `test -f '$(top_builddir)/src/bson_util.c' || echo '$(srcdir)/'`$(top_builddir)/src/bson_util.c -bson_util_test-bson_util.obj: $(top_builddir)/src/bson_util.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -MT bson_util_test-bson_util.obj -MD -MP -MF $(DEPDIR)/bson_util_test-bson_util.Tpo -c -o bson_util_test-bson_util.obj `if test -f '$(top_builddir)/src/bson_util.c'; then $(CYGPATH_W) '$(top_builddir)/src/bson_util.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/src/bson_util.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bson_util_test-bson_util.Tpo $(DEPDIR)/bson_util_test-bson_util.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/src/bson_util.c' object='bson_util_test-bson_util.obj' libtool=no @AMDEPBACKSLASH@ +$(top_builddir)/src/bson_util_test-bson_util.obj: $(top_builddir)/src/bson_util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -MT $(top_builddir)/src/bson_util_test-bson_util.obj -MD -MP -MF $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Tpo -c -o $(top_builddir)/src/bson_util_test-bson_util.obj `if test -f '$(top_builddir)/src/bson_util.c'; then $(CYGPATH_W) '$(top_builddir)/src/bson_util.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/src/bson_util.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Tpo $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/src/bson_util.c' object='$(top_builddir)/src/bson_util_test-bson_util.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) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -c -o bson_util_test-bson_util.obj `if test -f '$(top_builddir)/src/bson_util.c'; then $(CYGPATH_W) '$(top_builddir)/src/bson_util.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/src/bson_util.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/src/bson_util_test-bson_util.obj `if test -f '$(top_builddir)/src/bson_util.c'; then $(CYGPATH_W) '$(top_builddir)/src/bson_util.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/src/bson_util.c'; fi` mostlyclean-libtool: -rm -f *.lo @@ -934,6 +959,8 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(top_builddir)/src/$(DEPDIR)/$(am__dirstamp)" || rm -f $(top_builddir)/src/$(DEPDIR)/$(am__dirstamp) + -test -z "$(top_builddir)/src/$(am__dirstamp)" || rm -f $(top_builddir)/src/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -944,7 +971,7 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -rf $(top_builddir)/src/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -990,7 +1017,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -rf $(top_builddir)/src/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic From 6a1af0006fd73e950eea4f81b4473556276153c4 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Mon, 2 Mar 2020 16:55:37 -0500 Subject: [PATCH 03/10] Updates to make building without lua wrapper work properly --- Makefile.in | 11 -- README.md | 9 +- config.h | 20 +- config.h.in | 12 -- configure | 513 +-------------------------------------------------- configure.ac | 9 +- 6 files changed, 26 insertions(+), 548 deletions(-) diff --git a/Makefile.in b/Makefile.in index 25e1c59..cdc690e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -279,13 +279,6 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -LUA = @LUA@ -LUA_EXEC_PREFIX = @LUA_EXEC_PREFIX@ -LUA_INCLUDE = @LUA_INCLUDE@ -LUA_PLATFORM = @LUA_PLATFORM@ -LUA_PREFIX = @LUA_PREFIX@ -LUA_SHORT_VERSION = @LUA_SHORT_VERSION@ -LUA_VERSION = @LUA_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -349,14 +342,10 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -luadir = @luadir@ -luaexecdir = @luaexecdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ -pkgluadir = @pkgluadir@ -pkgluaexecdir = @pkgluaexecdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ diff --git a/README.md b/README.md index 5e794ec..b717414 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,15 @@ # README # Library for converting to and from BSON + +## Install Dependencies ## +```bash +sudo apt-get install autoconf-archive automake +``` + ## Build library ## ```bash +automake --add-missing ./configure make ``` @@ -16,7 +23,7 @@ sudo make install ### Install Dependencies ### ```bash -sudo apt-get install liblua5.2-dev autoconf-archive +sudo apt-get install liblua5.2-dev ``` ### Build Library ### diff --git a/config.h b/config.h index 34d02bb..e14fc6f 100644 --- a/config.h +++ b/config.h @@ -7,30 +7,18 @@ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_LAUXLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LUACONF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LUALIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LUA_H 1 - /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ -#define HAVE_MALLOC 1 +/* #undef HAVE_MALLOC */ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 +/* #undef HAVE_MEMSET */ /* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 +/* #undef HAVE_STDDEF_H */ /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -54,7 +42,7 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 +/* #undef HAVE__BOOL */ /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" diff --git a/config.h.in b/config.h.in index 20e68ee..ca89904 100644 --- a/config.h.in +++ b/config.h.in @@ -6,18 +6,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the header file. */ -#undef HAVE_LAUXLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LUACONF_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LUALIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LUA_H - /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC diff --git a/configure b/configure index fcaaa1e..b40f3a4 100755 --- a/configure +++ b/configure @@ -641,17 +641,6 @@ BUILD_TESTS_FALSE BUILD_TESTS_TRUE BUILD_LUA_FALSE BUILD_LUA_TRUE -LUA_INCLUDE -pkgluaexecdir -luaexecdir -pkgluadir -luadir -LUA_EXEC_PREFIX -LUA_PREFIX -LUA_PLATFORM -LUA_SHORT_VERSION -LUA_VERSION -LUA am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -796,8 +785,6 @@ LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP -LUA -LUA_INCLUDE PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR @@ -1469,8 +1456,6 @@ Some influential environment variables: LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor - LUA The Lua interpreter, e.g. /usr/bin/lua5.1 - LUA_INCLUDE The Lua includes, e.g. -I/usr/include/lua5.1 PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path @@ -15365,332 +15350,6 @@ fi - - - - - - - - if test "x$LUA" != 'x'; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LUA is a Lua interpreter" >&5 -$as_echo_n "checking if $LUA is a Lua interpreter... " >&6; } - - _ax_lua_factorial=`$LUA 2>/dev/null -e ' - -- a simple factorial - function fact (n) - if n == 0 then - return 1 - else - return n * fact(n-1) - end - end - print("fact(5) is " .. fact(5))'` - if test "$_ax_lua_factorial" = 'fact(5) is 120'; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "not a Lua interpreter" "$LINENO" 5 - -fi - - _ax_check_text="whether $LUA version >= 5.1, < 5.4" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking $_ax_check_text" >&5 -$as_echo_n "checking $_ax_check_text... " >&6; } - - _ax_lua_good_version=`$LUA -e ' - -- a script to compare versions - function verstr2num(verstr) - local _, _, majorver, minorver = string.find(verstr, "^(%d+)%.(%d+)") - if majorver and minorver then - return tonumber(majorver) * 100 + tonumber(minorver) - end - end - local minver = verstr2num("5.1") - local _, _, trimver = string.find(_VERSION, "^Lua (.*)") - local ver = verstr2num(trimver) - local maxver = verstr2num("5.4") or 1e9 - if minver <= ver and ver < maxver then - print("yes") - else - print("no") - end'` - if test "x$_ax_lua_good_version" = "xyes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "version is out of range for specified LUA" "$LINENO" 5 -fi - - ax_display_LUA=$LUA - -else - _ax_check_text="for a Lua interpreter with version >= 5.1, < 5.4" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking $_ax_check_text" >&5 -$as_echo_n "checking $_ax_check_text... " >&6; } -if ${ax_cv_pathless_LUA+:} false; then : - $as_echo_n "(cached) " >&6 -else - for ax_cv_pathless_LUA in lua lua5.3 lua53 lua5.2 lua52 lua5.1 lua51 lua50 none; do - test "x$ax_cv_pathless_LUA" = 'xnone' && break - - _ax_lua_factorial=`$ax_cv_pathless_LUA 2>/dev/null -e ' - -- a simple factorial - function fact (n) - if n == 0 then - return 1 - else - return n * fact(n-1) - end - end - print("fact(5) is " .. fact(5))'` - if test "$_ax_lua_factorial" = 'fact(5) is 120'; then : - -else - continue -fi - - - _ax_lua_good_version=`$ax_cv_pathless_LUA -e ' - -- a script to compare versions - function verstr2num(verstr) - local _, _, majorver, minorver = string.find(verstr, "^(%d+)%.(%d+)") - if majorver and minorver then - return tonumber(majorver) * 100 + tonumber(minorver) - end - end - local minver = verstr2num("5.1") - local _, _, trimver = string.find(_VERSION, "^Lua (.*)") - local ver = verstr2num(trimver) - local maxver = verstr2num("5.4") or 1e9 - if minver <= ver and ver < maxver then - print("yes") - else - print("no") - end'` - if test "x$_ax_lua_good_version" = "xyes"; then : - break -fi - - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_pathless_LUA" >&5 -$as_echo "$ax_cv_pathless_LUA" >&6; } - if test "x$ax_cv_pathless_LUA" = 'xnone'; then : - LUA=':' -else - # Extract the first word of "$ax_cv_pathless_LUA", so it can be a program name with args. -set dummy $ax_cv_pathless_LUA; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_LUA+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $LUA in - [\\/]* | ?:[\\/]*) - ac_cv_path_LUA="$LUA" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_LUA="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -LUA=$ac_cv_path_LUA -if test -n "$LUA"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LUA" >&5 -$as_echo "$LUA" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi - ax_display_LUA=$ax_cv_pathless_LUA - -fi - - - if test "x$LUA" = 'x:'; then : - as_fn_error $? "cannot find suitable Lua interpreter" "$LINENO" 5 - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA version" >&5 -$as_echo_n "checking for $ax_display_LUA version... " >&6; } -if ${ax_cv_lua_version+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_lua_version=`$LUA -e ' - -- return a version number in X.Y format - local _, _, ver = string.find(_VERSION, "^Lua (%d+%.%d+)") - print(ver)'` - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_version" >&5 -$as_echo "$ax_cv_lua_version" >&6; } - if test "x$ax_cv_lua_version" = 'x'; then : - as_fn_error $? "invalid Lua version number" "$LINENO" 5 -fi - LUA_VERSION=$ax_cv_lua_version - - LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'` - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA platform" >&5 -$as_echo_n "checking for $ax_display_LUA platform... " >&6; } -if ${ax_cv_lua_platform+:} false; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_lua_platform=`$LUA -e 'print("unknown")'` -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_platform" >&5 -$as_echo "$ax_cv_lua_platform" >&6; } - LUA_PLATFORM=$ax_cv_lua_platform - - - LUA_PREFIX='${prefix}' - - LUA_EXEC_PREFIX='${exec_prefix}' - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA script directory" >&5 -$as_echo_n "checking for $ax_display_LUA script directory... " >&6; } -if ${ax_cv_lua_luadir+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$prefix" = 'xNONE'; then : - ax_lua_prefix=$ac_default_prefix -else - ax_lua_prefix=$prefix -fi - - ax_cv_lua_luadir="$LUA_PREFIX/share/lua/$LUA_VERSION" - - - - ax_lua_prefixed_path=`$LUA -e ' - -- get the path based on search type - local searchtype = "script" - local paths = "" - if searchtype == "script" then - paths = (package and package.path) or LUA_PATH - elseif searchtype == "module" then - paths = (package and package.cpath) or LUA_CPATH - end - -- search for the prefix - local prefix = "'$ax_lua_prefix'" - local minpath = "" - local mindepth = 1e9 - string.gsub(paths, "([^;]+)", - function (path) - path = string.gsub(path, "%?.*$", "") - path = string.gsub(path, "/[^/]*$", "") - if string.find(path, prefix) then - local depth = string.len(string.gsub(path, "[^/]", "")) - if depth < mindepth then - minpath = path - mindepth = depth - end - end - end) - print(minpath)'` - - if test "x$ax_lua_prefixed_path" != 'x'; then : - _ax_strip_prefix=`echo "$ax_lua_prefix" | $SED 's|.|.|g'` - ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \ - $SED "s|^$_ax_strip_prefix|$LUA_PREFIX|"` - -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_luadir" >&5 -$as_echo "$ax_cv_lua_luadir" >&6; } - luadir=$ax_cv_lua_luadir - - pkgluadir=\${luadir}/$PACKAGE - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA module directory" >&5 -$as_echo_n "checking for $ax_display_LUA module directory... " >&6; } -if ${ax_cv_lua_luaexecdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$exec_prefix" = 'xNONE'; then : - ax_lua_exec_prefix=$ax_lua_prefix -else - ax_lua_exec_prefix=$exec_prefix -fi - - ax_cv_lua_luaexecdir="$LUA_EXEC_PREFIX/lib/lua/$LUA_VERSION" - - - - ax_lua_prefixed_path=`$LUA -e ' - -- get the path based on search type - local searchtype = "module" - local paths = "" - if searchtype == "script" then - paths = (package and package.path) or LUA_PATH - elseif searchtype == "module" then - paths = (package and package.cpath) or LUA_CPATH - end - -- search for the prefix - local prefix = "'$ax_lua_exec_prefix'" - local minpath = "" - local mindepth = 1e9 - string.gsub(paths, "([^;]+)", - function (path) - path = string.gsub(path, "%?.*$", "") - path = string.gsub(path, "/[^/]*$", "") - if string.find(path, prefix) then - local depth = string.len(string.gsub(path, "[^/]", "")) - if depth < mindepth then - minpath = path - mindepth = depth - end - end - end) - print(minpath)'` - - if test "x$ax_lua_prefixed_path" != 'x'; then : - _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | $SED 's|.|.|g'` - ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \ - $SED "s|^$_ax_strip_prefix|$LUA_EXEC_PREFIX|"` - -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_luaexecdir" >&5 -$as_echo "$ax_cv_lua_luaexecdir" >&6; } - luaexecdir=$ax_cv_lua_luaexecdir - - pkgluaexecdir=\${luaexecdir}/$PACKAGE - - - - -fi - - # Checks for libraries. # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : @@ -15764,171 +15423,6 @@ fi done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LUA_VERSION is defined" >&5 -$as_echo_n "checking if LUA_VERSION is defined... " >&6; } - if test "x$LUA_VERSION" != 'x'; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "cannot check Lua headers without knowing LUA_VERSION" "$LINENO" 5 - -fi - - - - LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'` - - - _ax_lua_saved_cppflags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $LUA_INCLUDE" - for ac_header in lua.h lualib.h lauxlib.h luaconf.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - CPPFLAGS=$_ax_lua_saved_cppflags - - if test "x$LUA_INCLUDE" = 'x' && - test "x$ac_cv_header_lua_h" != 'xyes'; then : - for _ax_include_path in /usr/include/lua$LUA_VERSION \ - /usr/include/lua-$LUA_VERSION \ - /usr/include/lua/$LUA_VERSION \ - /usr/include/lua$LUA_SHORT_VERSION \ - /usr/local/include/lua$LUA_VERSION \ - /usr/local/include/lua-$LUA_VERSION \ - /usr/local/include/lua/$LUA_VERSION \ - /usr/local/include/lua$LUA_SHORT_VERSION \ - ; do - test ! -d "$_ax_include_path" && continue - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua headers in" >&5 -$as_echo_n "checking for Lua headers in... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_ax_include_path" >&5 -$as_echo "$_ax_include_path" >&6; } - - { ac_cv_header_lua_h=; unset ac_cv_header_lua_h;} - { ac_cv_header_lualib_h=; unset ac_cv_header_lualib_h;} - { ac_cv_header_lauxlib_h=; unset ac_cv_header_lauxlib_h;} - { ac_cv_header_luaconf_h=; unset ac_cv_header_luaconf_h;} - - _ax_lua_saved_cppflags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$_ax_include_path" - for ac_header in lua.h lualib.h lauxlib.h luaconf.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - CPPFLAGS=$_ax_lua_saved_cppflags - - if test "x$ac_cv_header_lua_h" = 'xyes'; then : - LUA_INCLUDE="-I$_ax_include_path" - break - -fi - done - -fi - - if test "x$ac_cv_header_lua_h" = 'xyes'; then : - - if test "x$cross_compiling" != 'xyes'; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua header version" >&5 -$as_echo_n "checking for Lua header version... " >&6; } -if ${ax_cv_lua_header_version+:} false; then : - $as_echo_n "(cached) " >&6 -else - _ax_lua_saved_cppflags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $LUA_INCLUDE" - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -int main(int argc, char ** argv) -{ - if(argc > 1) printf("%s", LUA_VERSION); - exit(EXIT_SUCCESS); -} - - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv_lua_header_version=`./conftest$EXEEXT p | \ - $SED -n "s|^Lua \([0-9]\{1,\}\.[0-9]\{1,\}\).\{0,\}|\1|p"` - -else - ax_cv_lua_header_version='unknown' -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - CPPFLAGS=$_ax_lua_saved_cppflags - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_header_version" >&5 -$as_echo "$ax_cv_lua_header_version" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Lua header version matches $LUA_VERSION" >&5 -$as_echo_n "checking if Lua header version matches $LUA_VERSION... " >&6; } - if test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ax_header_version_match='yes' - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ax_header_version_match='no' - -fi - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling so assuming header version number matches" >&5 -$as_echo "$as_me: WARNING: cross compiling so assuming header version number matches" >&2;} - ax_header_version_match='yes' - -fi - -fi - - if test "x$ax_header_version_match" != 'xyes' && - test "x$LUA_INCLUDE" != 'x'; then : - as_fn_error $? "cannot find headers for specified LUA_INCLUDE" "$LINENO" 5 -fi - - if test "x$ax_header_version_match" = 'xyes'; then : - -else - as_fn_error $? "cannot find Lua includes" "$LINENO" 5 -fi - - # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } @@ -16186,6 +15680,13 @@ else fi +if test -z "$BUILD_LUA_TRUE"; then : + AX_PROG_LUA(5.1, 5.4) +fi +if test -z "$BUILD_LUA_TRUE"; then : + AX_LUA_HEADERS +fi + # Check whether --with-tests was given. if test "${with_tests+set}" = set; then : diff --git a/configure.ac b/configure.ac index 1841f3d..5063dc3 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,6 @@ AC_OUTPUT # Checks for programs. AC_PROG_CC -AX_PROG_LUA([5.1], [5.4]) # Checks for libraries. AC_ENABLE_SHARED @@ -22,7 +21,6 @@ AC_DISABLE_STATIC # Checks for header files. AC_CHECK_HEADERS([stddef.h stdint.h stdlib.h string.h]) -AX_LUA_HEADERS # Checks for typedefs, structures, and compiler characteristics. AC_CHECK_HEADER_STDBOOL @@ -58,6 +56,13 @@ AM_CONDITIONAL( [BUILD_LUA], [test x$with_lua = xyes]) +AM_COND_IF( + [BUILD_LUA], + [AX_PROG_LUA([5.1], [5.4])]) +AM_COND_IF( + [BUILD_LUA], + [AX_LUA_HEADERS]) + AC_ARG_WITH( [tests], [AS_HELP_STRING( From c3c6ded576827566c78558b14ecf5a0e6b281cd2 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Tue, 3 Mar 2020 10:52:40 -0500 Subject: [PATCH 04/10] Fix issues with previous commit --- Makefile.in | 11 ++ config.h | 20 ++- config.h.in | 12 ++ configure | 508 +++++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 545 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index cdc690e..25e1c59 100644 --- a/Makefile.in +++ b/Makefile.in @@ -279,6 +279,13 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +LUA = @LUA@ +LUA_EXEC_PREFIX = @LUA_EXEC_PREFIX@ +LUA_INCLUDE = @LUA_INCLUDE@ +LUA_PLATFORM = @LUA_PLATFORM@ +LUA_PREFIX = @LUA_PREFIX@ +LUA_SHORT_VERSION = @LUA_SHORT_VERSION@ +LUA_VERSION = @LUA_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -342,10 +349,14 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +luadir = @luadir@ +luaexecdir = @luaexecdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ +pkgluadir = @pkgluadir@ +pkgluaexecdir = @pkgluaexecdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ diff --git a/config.h b/config.h index e14fc6f..9005537 100644 --- a/config.h +++ b/config.h @@ -7,18 +7,30 @@ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LAUXLIB_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LUACONF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LUALIB_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LUA_H */ + /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ -/* #undef HAVE_MALLOC */ +#define HAVE_MALLOC 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ -/* #undef HAVE_MEMSET */ +#define HAVE_MEMSET 1 /* Define to 1 if you have the header file. */ -/* #undef HAVE_STDDEF_H */ +#define HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 @@ -42,7 +54,7 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if the system has the type `_Bool'. */ -/* #undef HAVE__BOOL */ +#define HAVE__BOOL 1 /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" diff --git a/config.h.in b/config.h.in index ca89904..20e68ee 100644 --- a/config.h.in +++ b/config.h.in @@ -6,6 +6,18 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LAUXLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LUACONF_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LUALIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LUA_H + /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC diff --git a/configure b/configure index b40f3a4..7dc28f5 100755 --- a/configure +++ b/configure @@ -639,6 +639,17 @@ PKG_CONFIG_PATH PKG_CONFIG BUILD_TESTS_FALSE BUILD_TESTS_TRUE +LUA_INCLUDE +pkgluaexecdir +luaexecdir +pkgluadir +luadir +LUA_EXEC_PREFIX +LUA_PREFIX +LUA_PLATFORM +LUA_SHORT_VERSION +LUA_VERSION +LUA BUILD_LUA_FALSE BUILD_LUA_TRUE am__EXEEXT_FALSE @@ -785,6 +796,8 @@ LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP +LUA +LUA_INCLUDE PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR @@ -1456,6 +1469,8 @@ Some influential environment variables: LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor + LUA The Lua interpreter, e.g. /usr/bin/lua5.1 + LUA_INCLUDE The Lua includes, e.g. -I/usr/include/lua5.1 PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path @@ -15681,10 +15696,499 @@ fi if test -z "$BUILD_LUA_TRUE"; then : - AX_PROG_LUA(5.1, 5.4) + + + + + + + + + if test "x$LUA" != 'x'; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LUA is a Lua interpreter" >&5 +$as_echo_n "checking if $LUA is a Lua interpreter... " >&6; } + + _ax_lua_factorial=`$LUA 2>/dev/null -e ' + -- a simple factorial + function fact (n) + if n == 0 then + return 1 + else + return n * fact(n-1) + end + end + print("fact(5) is " .. fact(5))'` + if test "$_ax_lua_factorial" = 'fact(5) is 120'; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "not a Lua interpreter" "$LINENO" 5 + +fi + + _ax_check_text="whether $LUA version >= 5.1, < 5.4" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking $_ax_check_text" >&5 +$as_echo_n "checking $_ax_check_text... " >&6; } + + _ax_lua_good_version=`$LUA -e ' + -- a script to compare versions + function verstr2num(verstr) + local _, _, majorver, minorver = string.find(verstr, "^(%d+)%.(%d+)") + if majorver and minorver then + return tonumber(majorver) * 100 + tonumber(minorver) + end + end + local minver = verstr2num("5.1") + local _, _, trimver = string.find(_VERSION, "^Lua (.*)") + local ver = verstr2num(trimver) + local maxver = verstr2num("5.4") or 1e9 + if minver <= ver and ver < maxver then + print("yes") + else + print("no") + end'` + if test "x$_ax_lua_good_version" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "version is out of range for specified LUA" "$LINENO" 5 +fi + + ax_display_LUA=$LUA + +else + _ax_check_text="for a Lua interpreter with version >= 5.1, < 5.4" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking $_ax_check_text" >&5 +$as_echo_n "checking $_ax_check_text... " >&6; } +if ${ax_cv_pathless_LUA+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ax_cv_pathless_LUA in lua lua5.3 lua53 lua5.2 lua52 lua5.1 lua51 lua50 none; do + test "x$ax_cv_pathless_LUA" = 'xnone' && break + + _ax_lua_factorial=`$ax_cv_pathless_LUA 2>/dev/null -e ' + -- a simple factorial + function fact (n) + if n == 0 then + return 1 + else + return n * fact(n-1) + end + end + print("fact(5) is " .. fact(5))'` + if test "$_ax_lua_factorial" = 'fact(5) is 120'; then : + +else + continue +fi + + + _ax_lua_good_version=`$ax_cv_pathless_LUA -e ' + -- a script to compare versions + function verstr2num(verstr) + local _, _, majorver, minorver = string.find(verstr, "^(%d+)%.(%d+)") + if majorver and minorver then + return tonumber(majorver) * 100 + tonumber(minorver) + end + end + local minver = verstr2num("5.1") + local _, _, trimver = string.find(_VERSION, "^Lua (.*)") + local ver = verstr2num(trimver) + local maxver = verstr2num("5.4") or 1e9 + if minver <= ver and ver < maxver then + print("yes") + else + print("no") + end'` + if test "x$_ax_lua_good_version" = "xyes"; then : + break +fi + + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_pathless_LUA" >&5 +$as_echo "$ax_cv_pathless_LUA" >&6; } + if test "x$ax_cv_pathless_LUA" = 'xnone'; then : + LUA=':' +else + # Extract the first word of "$ax_cv_pathless_LUA", so it can be a program name with args. +set dummy $ax_cv_pathless_LUA; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_LUA+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $LUA in + [\\/]* | ?:[\\/]*) + ac_cv_path_LUA="$LUA" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_LUA="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +LUA=$ac_cv_path_LUA +if test -n "$LUA"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LUA" >&5 +$as_echo "$LUA" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi + ax_display_LUA=$ax_cv_pathless_LUA + +fi + + + if test "x$LUA" = 'x:'; then : + as_fn_error $? "cannot find suitable Lua interpreter" "$LINENO" 5 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA version" >&5 +$as_echo_n "checking for $ax_display_LUA version... " >&6; } +if ${ax_cv_lua_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_lua_version=`$LUA -e ' + -- return a version number in X.Y format + local _, _, ver = string.find(_VERSION, "^Lua (%d+%.%d+)") + print(ver)'` + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_version" >&5 +$as_echo "$ax_cv_lua_version" >&6; } + if test "x$ax_cv_lua_version" = 'x'; then : + as_fn_error $? "invalid Lua version number" "$LINENO" 5 +fi + LUA_VERSION=$ax_cv_lua_version + + LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'` + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA platform" >&5 +$as_echo_n "checking for $ax_display_LUA platform... " >&6; } +if ${ax_cv_lua_platform+:} false; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_lua_platform=`$LUA -e 'print("unknown")'` +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_platform" >&5 +$as_echo "$ax_cv_lua_platform" >&6; } + LUA_PLATFORM=$ax_cv_lua_platform + + + LUA_PREFIX='${prefix}' + + LUA_EXEC_PREFIX='${exec_prefix}' + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA script directory" >&5 +$as_echo_n "checking for $ax_display_LUA script directory... " >&6; } +if ${ax_cv_lua_luadir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$prefix" = 'xNONE'; then : + ax_lua_prefix=$ac_default_prefix +else + ax_lua_prefix=$prefix +fi + + ax_cv_lua_luadir="$LUA_PREFIX/share/lua/$LUA_VERSION" + + + + ax_lua_prefixed_path=`$LUA -e ' + -- get the path based on search type + local searchtype = "script" + local paths = "" + if searchtype == "script" then + paths = (package and package.path) or LUA_PATH + elseif searchtype == "module" then + paths = (package and package.cpath) or LUA_CPATH + end + -- search for the prefix + local prefix = "'$ax_lua_prefix'" + local minpath = "" + local mindepth = 1e9 + string.gsub(paths, "([^;]+)", + function (path) + path = string.gsub(path, "%?.*$", "") + path = string.gsub(path, "/[^/]*$", "") + if string.find(path, prefix) then + local depth = string.len(string.gsub(path, "[^/]", "")) + if depth < mindepth then + minpath = path + mindepth = depth + end + end + end) + print(minpath)'` + + if test "x$ax_lua_prefixed_path" != 'x'; then : + _ax_strip_prefix=`echo "$ax_lua_prefix" | $SED 's|.|.|g'` + ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \ + $SED "s|^$_ax_strip_prefix|$LUA_PREFIX|"` + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_luadir" >&5 +$as_echo "$ax_cv_lua_luadir" >&6; } + luadir=$ax_cv_lua_luadir + + pkgluadir=\${luadir}/$PACKAGE + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ax_display_LUA module directory" >&5 +$as_echo_n "checking for $ax_display_LUA module directory... " >&6; } +if ${ax_cv_lua_luaexecdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$exec_prefix" = 'xNONE'; then : + ax_lua_exec_prefix=$ax_lua_prefix +else + ax_lua_exec_prefix=$exec_prefix +fi + + ax_cv_lua_luaexecdir="$LUA_EXEC_PREFIX/lib/lua/$LUA_VERSION" + + + + ax_lua_prefixed_path=`$LUA -e ' + -- get the path based on search type + local searchtype = "module" + local paths = "" + if searchtype == "script" then + paths = (package and package.path) or LUA_PATH + elseif searchtype == "module" then + paths = (package and package.cpath) or LUA_CPATH + end + -- search for the prefix + local prefix = "'$ax_lua_exec_prefix'" + local minpath = "" + local mindepth = 1e9 + string.gsub(paths, "([^;]+)", + function (path) + path = string.gsub(path, "%?.*$", "") + path = string.gsub(path, "/[^/]*$", "") + if string.find(path, prefix) then + local depth = string.len(string.gsub(path, "[^/]", "")) + if depth < mindepth then + minpath = path + mindepth = depth + end + end + end) + print(minpath)'` + + if test "x$ax_lua_prefixed_path" != 'x'; then : + _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | $SED 's|.|.|g'` + ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \ + $SED "s|^$_ax_strip_prefix|$LUA_EXEC_PREFIX|"` + +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_luaexecdir" >&5 +$as_echo "$ax_cv_lua_luaexecdir" >&6; } + luaexecdir=$ax_cv_lua_luaexecdir + + pkgluaexecdir=\${luaexecdir}/$PACKAGE + + + + +fi + fi if test -z "$BUILD_LUA_TRUE"; then : - AX_LUA_HEADERS + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LUA_VERSION is defined" >&5 +$as_echo_n "checking if LUA_VERSION is defined... " >&6; } + if test "x$LUA_VERSION" != 'x'; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "cannot check Lua headers without knowing LUA_VERSION" "$LINENO" 5 + +fi + + + + LUA_SHORT_VERSION=`echo "$LUA_VERSION" | $SED 's|\.||'` + + + _ax_lua_saved_cppflags=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $LUA_INCLUDE" + for ac_header in lua.h lualib.h lauxlib.h luaconf.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + CPPFLAGS=$_ax_lua_saved_cppflags + + if test "x$LUA_INCLUDE" = 'x' && + test "x$ac_cv_header_lua_h" != 'xyes'; then : + for _ax_include_path in /usr/include/lua$LUA_VERSION \ + /usr/include/lua-$LUA_VERSION \ + /usr/include/lua/$LUA_VERSION \ + /usr/include/lua$LUA_SHORT_VERSION \ + /usr/local/include/lua$LUA_VERSION \ + /usr/local/include/lua-$LUA_VERSION \ + /usr/local/include/lua/$LUA_VERSION \ + /usr/local/include/lua$LUA_SHORT_VERSION \ + ; do + test ! -d "$_ax_include_path" && continue + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua headers in" >&5 +$as_echo_n "checking for Lua headers in... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_ax_include_path" >&5 +$as_echo "$_ax_include_path" >&6; } + + { ac_cv_header_lua_h=; unset ac_cv_header_lua_h;} + { ac_cv_header_lualib_h=; unset ac_cv_header_lualib_h;} + { ac_cv_header_lauxlib_h=; unset ac_cv_header_lauxlib_h;} + { ac_cv_header_luaconf_h=; unset ac_cv_header_luaconf_h;} + + _ax_lua_saved_cppflags=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$_ax_include_path" + for ac_header in lua.h lualib.h lauxlib.h luaconf.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + CPPFLAGS=$_ax_lua_saved_cppflags + + if test "x$ac_cv_header_lua_h" = 'xyes'; then : + LUA_INCLUDE="-I$_ax_include_path" + break + +fi + done + +fi + + if test "x$ac_cv_header_lua_h" = 'xyes'; then : + + if test "x$cross_compiling" != 'xyes'; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Lua header version" >&5 +$as_echo_n "checking for Lua header version... " >&6; } +if ${ax_cv_lua_header_version+:} false; then : + $as_echo_n "(cached) " >&6 +else + _ax_lua_saved_cppflags=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $LUA_INCLUDE" + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +int main(int argc, char ** argv) +{ + if(argc > 1) printf("%s", LUA_VERSION); + exit(EXIT_SUCCESS); +} + + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ax_cv_lua_header_version=`./conftest$EXEEXT p | \ + $SED -n "s|^Lua \([0-9]\{1,\}\.[0-9]\{1,\}\).\{0,\}|\1|p"` + +else + ax_cv_lua_header_version='unknown' +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + CPPFLAGS=$_ax_lua_saved_cppflags + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lua_header_version" >&5 +$as_echo "$ax_cv_lua_header_version" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Lua header version matches $LUA_VERSION" >&5 +$as_echo_n "checking if Lua header version matches $LUA_VERSION... " >&6; } + if test "x$ax_cv_lua_header_version" = "x$LUA_VERSION"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + ax_header_version_match='yes' + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ax_header_version_match='no' + +fi + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling so assuming header version number matches" >&5 +$as_echo "$as_me: WARNING: cross compiling so assuming header version number matches" >&2;} + ax_header_version_match='yes' + +fi + +fi + + if test "x$ax_header_version_match" != 'xyes' && + test "x$LUA_INCLUDE" != 'x'; then : + as_fn_error $? "cannot find headers for specified LUA_INCLUDE" "$LINENO" 5 +fi + + if test "x$ax_header_version_match" = 'xyes'; then : + +else + as_fn_error $? "cannot find Lua includes" "$LINENO" 5 +fi + fi From f4e36f754627f257ef8e178bf15b24b546758b47 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Tue, 3 Mar 2020 14:59:55 -0500 Subject: [PATCH 05/10] Remove outdated README updates --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index b717414..6704a11 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,8 @@ # README # Library for converting to and from BSON - -## Install Dependencies ## -```bash -sudo apt-get install autoconf-archive automake -``` - ## Build library ## ```bash -automake --add-missing ./configure make ``` From f57e1f545e592824c0ec6ba56b6f4e6efe239857 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Tue, 3 Mar 2020 15:15:45 -0500 Subject: [PATCH 06/10] Remove more outdated additions --- Makefile.in | 2 +- configure | 535 ++++++++++++++++++--------------------------------- configure.ac | 1 - 3 files changed, 183 insertions(+), 355 deletions(-) diff --git a/Makefile.in b/Makefile.in index 25e1c59..e331025 100644 --- a/Makefile.in +++ b/Makefile.in @@ -194,7 +194,7 @@ CSCOPE = cscope DIST_SUBDIRS = src lua test am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/libbson.pc.in ar-lib compile config.guess config.sub \ - depcomp install-sh ltmain.sh missing + install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) diff --git a/configure b/configure index 7dc28f5..486563b 100755 --- a/configure +++ b/configure @@ -665,6 +665,8 @@ NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB +ac_ct_AR +AR DLLTOOL OBJDUMP LN_S @@ -676,15 +678,6 @@ FGREP EGREP GREP SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -702,8 +695,15 @@ CPPFLAGS LDFLAGS CFLAGS CC -ac_ct_AR -AR +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +LIBTOOL AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V @@ -774,12 +774,12 @@ ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules -enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname +enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock @@ -1434,14 +1434,14 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") - --enable-dependency-tracking - do not reject slow dependency extractors - --disable-dependency-tracking - speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: @@ -3056,6 +3056,171 @@ END fi +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.6' +macro_revision='2.4.6' + + + + + + + + + + + + + +ltmain=$ac_aux_dir/ltmain.sh + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case $ECHO in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -4095,343 +4260,6 @@ else fi - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar lib "link -lib" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar lib "link -lib" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 -$as_echo_n "checking the archiver ($AR) interface... " >&6; } -if ${am_cv_ar_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - am_cv_ar_interface=ar - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int some_variable = 0; -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 - (eval $am_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - am_cv_ar_interface=ar - else - am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 - (eval $am_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - am_cv_ar_interface=lib - else - am_cv_ar_interface=unknown - fi - fi - rm -f conftest.lib libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 -$as_echo "$am_cv_ar_interface" >&6; } - -case $am_cv_ar_interface in -ar) - ;; -lib) - # Microsoft lib, so override with the ar-lib wrapper script. - # FIXME: It is wrong to rewrite AR. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__AR in this case, - # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something - # similar. - AR="$am_aux_dir/ar-lib $AR" - ;; -unknown) - as_fn_error $? "could not determine $AR interface" "$LINENO" 5 - ;; -esac - # see https://lists.gnu.org/archive/html/automake/2012-05/msg00014.html -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.6' -macro_revision='2.4.6' - - - - - - - - - - - - - -ltmain=$ac_aux_dir/ltmain.sh - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : @@ -5837,6 +5665,7 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + if test -n "$ac_tool_prefix"; then for ac_prog in ar do diff --git a/configure.ac b/configure.ac index 5063dc3..b86362b 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,6 @@ AC_PREREQ([2.69]) AC_INIT(bson_c_lib, 1.2.0, jacob@livio.io) AM_INIT_AUTOMAKE([subdir-objects foreign -Wall]) AC_CONFIG_MACRO_DIRS([m4]) -m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) # see https://lists.gnu.org/archive/html/automake/2012-05/msg00014.html LT_INIT AC_CONFIG_SRCDIR([examples/sample.c]) AC_CONFIG_HEADERS([config.h]) From aafff532e464a875fa33eaaa1ac0020cbc134b94 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Mon, 6 Apr 2020 16:09:29 -0400 Subject: [PATCH 07/10] Add tests for deprecated method --- test/bson_object_test.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/bson_object_test.c b/test/bson_object_test.c index 672b278..a0d7e1a 100644 --- a/test/bson_object_test.c +++ b/test/bson_object_test.c @@ -145,11 +145,16 @@ START_TEST(bson_object_from_bytes_corrupted_key) } memcpy(buf, test_data_corrupted, sizeof(test_data_corrupted)); + // Test normal method BsonObject output; size_t ret = bson_object_from_bytes_len(&output, buf, sizeof(test_data_corrupted)); + + // Test deprecated method + BsonObject deprecated_output = bson_object_from_bytes(buf); free(buf); ck_assert_uint_eq(ret, 0); + ck_assert_uint_eq(bson_object_size(&deprecated_output), 5); } END_TEST @@ -171,11 +176,16 @@ START_TEST(bson_object_from_bytes_corrupted_tag_length) } memcpy(buf, test_data_corrupted, sizeof(test_data_corrupted)); + // Test normal method BsonObject output; size_t ret = bson_object_from_bytes_len(&output, buf, sizeof(test_data_corrupted)); + + // Test deprecated method + BsonObject deprecated_output = bson_object_from_bytes(buf); free(buf); ck_assert_uint_eq(ret, 0); + ck_assert_uint_eq(bson_object_size(&deprecated_output), 5); } END_TEST @@ -197,11 +207,16 @@ START_TEST(bson_object_from_bytes_corrupted_string) } memcpy(buf, test_data_corrupted, sizeof(test_data_corrupted)); + // Test normal method BsonObject output; size_t ret = bson_object_from_bytes_len(&output, buf, sizeof(test_data_corrupted)); + + // Test deprecated method + BsonObject deprecated_output = bson_object_from_bytes(buf); free(buf); ck_assert_uint_eq(ret, 0); + ck_assert_uint_eq(bson_object_size(&deprecated_output), 5); } END_TEST @@ -223,11 +238,16 @@ START_TEST(bson_object_from_bytes_corrupted_integer) } memcpy(buf, test_data_corrupted, sizeof(test_data_corrupted)); + // Test normal method BsonObject output; size_t ret = bson_object_from_bytes_len(&output, buf, sizeof(test_data_corrupted)); + + // Test deprecated method + BsonObject deprecated_output = bson_object_from_bytes(buf); free(buf); ck_assert_uint_eq(ret, 0); + ck_assert_uint_eq(bson_object_size(&deprecated_output), 5); } END_TEST @@ -251,11 +271,16 @@ START_TEST(bson_object_from_bytes_corrupted_tag) } memcpy(buf, test_data_corrupted, sizeof(test_data_corrupted)); + // Test normal method BsonObject output; size_t ret = bson_object_from_bytes_len(&output, buf, sizeof(test_data_corrupted)); + + // Test deprecated method + BsonObject deprecated_output = bson_object_from_bytes(buf); free(buf); ck_assert_uint_eq(ret, 0); + ck_assert_uint_eq(bson_object_size(&deprecated_output), 5); } END_TEST From 77663195328e805e73118af5de2e42fe7f407310 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Thu, 9 Apr 2020 09:25:26 -0400 Subject: [PATCH 08/10] Fix test build --- lua/Makefile.am | 4 ++-- lua/Makefile.in | 6 +++--- test/Makefile.am | 2 +- test/Makefile.in | 53 ++++++++++++++++++++++++------------------------ 4 files changed, 32 insertions(+), 33 deletions(-) diff --git a/lua/Makefile.am b/lua/Makefile.am index 19e3c58..871ee30 100644 --- a/lua/Makefile.am +++ b/lua/Makefile.am @@ -4,5 +4,5 @@ AM_LDFLAGS = -export-symbols-regex '^luaopen_' -module -avoid-version luaexec_LTLIBRARIES = bson4lua.la bson4lua_la_SOURCES = bson_lua_wrapper.c -bson4lua_la_LIBADD = ../src/libbson.la -bson4lua_la_CFLAGS = -I../src/ \ No newline at end of file +bson4lua_la_LIBADD = $(top_builddir)/src/libbson.la +bson4lua_la_CFLAGS = -I$(top_builddir)/src/ \ No newline at end of file diff --git a/lua/Makefile.in b/lua/Makefile.in index 10fee1d..fb79e25 100644 --- a/lua/Makefile.in +++ b/lua/Makefile.in @@ -130,7 +130,7 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(luaexecdir)" LTLIBRARIES = $(luaexec_LTLIBRARIES) -bson4lua_la_DEPENDENCIES = ../src/libbson.la +bson4lua_la_DEPENDENCIES = $(top_builddir)/src/libbson.la am_bson4lua_la_OBJECTS = bson4lua_la-bson_lua_wrapper.lo bson4lua_la_OBJECTS = $(am_bson4lua_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -338,8 +338,8 @@ ACLOCAL_AMFLAGS = -I m4 --install AM_LDFLAGS = -export-symbols-regex '^luaopen_' -module -avoid-version luaexec_LTLIBRARIES = bson4lua.la bson4lua_la_SOURCES = bson_lua_wrapper.c -bson4lua_la_LIBADD = ../src/libbson.la -bson4lua_la_CFLAGS = -I../src/ +bson4lua_la_LIBADD = $(top_builddir)/src/libbson.la +bson4lua_la_CFLAGS = -I$(top_builddir)/src/ all: all-am .SUFFIXES: diff --git a/test/Makefile.am b/test/Makefile.am index 1ff31b2..b83e0b4 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,7 +1,7 @@ TESTS = bson_util_test bson_object_test check_PROGRAMS = bson_util_test bson_object_test -bson_util_test_SOURCES = bson_util_test.c $(top_builddir)/src/bson_util.c +bson_util_test_SOURCES = bson_util_test.c ../src/bson_util.c bson_util_test_CFLAGS = -Wall -I../src @CHECK_CFLAGS@ bson_util_test_LDADD = @CHECK_LIBS@ diff --git a/test/Makefile.in b/test/Makefile.in index 95478c2..7521ad3 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -116,7 +116,7 @@ bson_object_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(bson_object_test_LDFLAGS) $(LDFLAGS) -o $@ am__dirstamp = $(am__leading_dot)dirstamp am_bson_util_test_OBJECTS = bson_util_test-bson_util_test.$(OBJEXT) \ - $(top_builddir)/src/bson_util_test-bson_util.$(OBJEXT) + ../src/bson_util_test-bson_util.$(OBJEXT) bson_util_test_OBJECTS = $(am_bson_util_test_OBJECTS) bson_util_test_DEPENDENCIES = bson_util_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @@ -522,7 +522,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -bson_util_test_SOURCES = bson_util_test.c $(top_builddir)/src/bson_util.c +bson_util_test_SOURCES = bson_util_test.c ../src/bson_util.c bson_util_test_CFLAGS = -Wall -I../src @CHECK_CFLAGS@ bson_util_test_LDADD = @CHECK_LIBS@ bson_object_test_SOURCES = bson_object_test.c @@ -575,15 +575,14 @@ clean-checkPROGRAMS: bson_object_test$(EXEEXT): $(bson_object_test_OBJECTS) $(bson_object_test_DEPENDENCIES) $(EXTRA_bson_object_test_DEPENDENCIES) @rm -f bson_object_test$(EXEEXT) $(AM_V_CCLD)$(bson_object_test_LINK) $(bson_object_test_OBJECTS) $(bson_object_test_LDADD) $(LIBS) -$(top_builddir)/src/$(am__dirstamp): - @$(MKDIR_P) $(top_builddir)/src - @: > $(top_builddir)/src/$(am__dirstamp) -$(top_builddir)/src/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) $(top_builddir)/src/$(DEPDIR) - @: > $(top_builddir)/src/$(DEPDIR)/$(am__dirstamp) -$(top_builddir)/src/bson_util_test-bson_util.$(OBJEXT): \ - $(top_builddir)/src/$(am__dirstamp) \ - $(top_builddir)/src/$(DEPDIR)/$(am__dirstamp) +../src/$(am__dirstamp): + @$(MKDIR_P) ../src + @: > ../src/$(am__dirstamp) +../src/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../src/$(DEPDIR) + @: > ../src/$(DEPDIR)/$(am__dirstamp) +../src/bson_util_test-bson_util.$(OBJEXT): ../src/$(am__dirstamp) \ + ../src/$(DEPDIR)/$(am__dirstamp) bson_util_test$(EXEEXT): $(bson_util_test_OBJECTS) $(bson_util_test_DEPENDENCIES) $(EXTRA_bson_util_test_DEPENDENCIES) @rm -f bson_util_test$(EXEEXT) @@ -591,12 +590,12 @@ bson_util_test$(EXEEXT): $(bson_util_test_OBJECTS) $(bson_util_test_DEPENDENCIES mostlyclean-compile: -rm -f *.$(OBJEXT) - -rm -f $(top_builddir)/src/*.$(OBJEXT) + -rm -f ../src/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@$(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../src/$(DEPDIR)/bson_util_test-bson_util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bson_object_test-bson_object_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bson_util_test-bson_util_test.Po@am__quote@ @@ -652,19 +651,19 @@ bson_util_test-bson_util_test.obj: bson_util_test.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -c -o bson_util_test-bson_util_test.obj `if test -f 'bson_util_test.c'; then $(CYGPATH_W) 'bson_util_test.c'; else $(CYGPATH_W) '$(srcdir)/bson_util_test.c'; fi` -$(top_builddir)/src/bson_util_test-bson_util.o: $(top_builddir)/src/bson_util.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -MT $(top_builddir)/src/bson_util_test-bson_util.o -MD -MP -MF $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Tpo -c -o $(top_builddir)/src/bson_util_test-bson_util.o `test -f '$(top_builddir)/src/bson_util.c' || echo '$(srcdir)/'`$(top_builddir)/src/bson_util.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Tpo $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/src/bson_util.c' object='$(top_builddir)/src/bson_util_test-bson_util.o' libtool=no @AMDEPBACKSLASH@ +../src/bson_util_test-bson_util.o: ../src/bson_util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -MT ../src/bson_util_test-bson_util.o -MD -MP -MF ../src/$(DEPDIR)/bson_util_test-bson_util.Tpo -c -o ../src/bson_util_test-bson_util.o `test -f '../src/bson_util.c' || echo '$(srcdir)/'`../src/bson_util.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/bson_util_test-bson_util.Tpo ../src/$(DEPDIR)/bson_util_test-bson_util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../src/bson_util.c' object='../src/bson_util_test-bson_util.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) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/src/bson_util_test-bson_util.o `test -f '$(top_builddir)/src/bson_util.c' || echo '$(srcdir)/'`$(top_builddir)/src/bson_util.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -c -o ../src/bson_util_test-bson_util.o `test -f '../src/bson_util.c' || echo '$(srcdir)/'`../src/bson_util.c -$(top_builddir)/src/bson_util_test-bson_util.obj: $(top_builddir)/src/bson_util.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -MT $(top_builddir)/src/bson_util_test-bson_util.obj -MD -MP -MF $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Tpo -c -o $(top_builddir)/src/bson_util_test-bson_util.obj `if test -f '$(top_builddir)/src/bson_util.c'; then $(CYGPATH_W) '$(top_builddir)/src/bson_util.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/src/bson_util.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Tpo $(top_builddir)/src/$(DEPDIR)/bson_util_test-bson_util.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_builddir)/src/bson_util.c' object='$(top_builddir)/src/bson_util_test-bson_util.obj' libtool=no @AMDEPBACKSLASH@ +../src/bson_util_test-bson_util.obj: ../src/bson_util.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -MT ../src/bson_util_test-bson_util.obj -MD -MP -MF ../src/$(DEPDIR)/bson_util_test-bson_util.Tpo -c -o ../src/bson_util_test-bson_util.obj `if test -f '../src/bson_util.c'; then $(CYGPATH_W) '../src/bson_util.c'; else $(CYGPATH_W) '$(srcdir)/../src/bson_util.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../src/$(DEPDIR)/bson_util_test-bson_util.Tpo ../src/$(DEPDIR)/bson_util_test-bson_util.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../src/bson_util.c' object='../src/bson_util_test-bson_util.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) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -c -o $(top_builddir)/src/bson_util_test-bson_util.obj `if test -f '$(top_builddir)/src/bson_util.c'; then $(CYGPATH_W) '$(top_builddir)/src/bson_util.c'; else $(CYGPATH_W) '$(srcdir)/$(top_builddir)/src/bson_util.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bson_util_test_CFLAGS) $(CFLAGS) -c -o ../src/bson_util_test-bson_util.obj `if test -f '../src/bson_util.c'; then $(CYGPATH_W) '../src/bson_util.c'; else $(CYGPATH_W) '$(srcdir)/../src/bson_util.c'; fi` mostlyclean-libtool: -rm -f *.lo @@ -959,8 +958,8 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(top_builddir)/src/$(DEPDIR)/$(am__dirstamp)" || rm -f $(top_builddir)/src/$(DEPDIR)/$(am__dirstamp) - -test -z "$(top_builddir)/src/$(am__dirstamp)" || rm -f $(top_builddir)/src/$(am__dirstamp) + -rm -f ../src/$(DEPDIR)/$(am__dirstamp) + -rm -f ../src/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -971,7 +970,7 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am - -rm -rf $(top_builddir)/src/$(DEPDIR) ./$(DEPDIR) + -rm -rf ../src/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -1017,7 +1016,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf $(top_builddir)/src/$(DEPDIR) ./$(DEPDIR) + -rm -rf ../src/$(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic From 1cb23e124480bb1e46d385b7ecf5e7c06739e292 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Thu, 9 Apr 2020 10:59:59 -0400 Subject: [PATCH 09/10] Revert lua wrapper changes from previous commit --- lua/Makefile.am | 4 ++-- lua/Makefile.in | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/Makefile.am b/lua/Makefile.am index 871ee30..19e3c58 100644 --- a/lua/Makefile.am +++ b/lua/Makefile.am @@ -4,5 +4,5 @@ AM_LDFLAGS = -export-symbols-regex '^luaopen_' -module -avoid-version luaexec_LTLIBRARIES = bson4lua.la bson4lua_la_SOURCES = bson_lua_wrapper.c -bson4lua_la_LIBADD = $(top_builddir)/src/libbson.la -bson4lua_la_CFLAGS = -I$(top_builddir)/src/ \ No newline at end of file +bson4lua_la_LIBADD = ../src/libbson.la +bson4lua_la_CFLAGS = -I../src/ \ No newline at end of file diff --git a/lua/Makefile.in b/lua/Makefile.in index fb79e25..10fee1d 100644 --- a/lua/Makefile.in +++ b/lua/Makefile.in @@ -130,7 +130,7 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(luaexecdir)" LTLIBRARIES = $(luaexec_LTLIBRARIES) -bson4lua_la_DEPENDENCIES = $(top_builddir)/src/libbson.la +bson4lua_la_DEPENDENCIES = ../src/libbson.la am_bson4lua_la_OBJECTS = bson4lua_la-bson_lua_wrapper.lo bson4lua_la_OBJECTS = $(am_bson4lua_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) @@ -338,8 +338,8 @@ ACLOCAL_AMFLAGS = -I m4 --install AM_LDFLAGS = -export-symbols-regex '^luaopen_' -module -avoid-version luaexec_LTLIBRARIES = bson4lua.la bson4lua_la_SOURCES = bson_lua_wrapper.c -bson4lua_la_LIBADD = $(top_builddir)/src/libbson.la -bson4lua_la_CFLAGS = -I$(top_builddir)/src/ +bson4lua_la_LIBADD = ../src/libbson.la +bson4lua_la_CFLAGS = -I../src/ all: all-am .SUFFIXES: From 1cec877c6d241e0c4cb4fc5c655ced6f1713edc9 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Tue, 14 Apr 2020 15:30:45 -0400 Subject: [PATCH 10/10] Update version info to 1.2.1 --- BiSON.podspec | 2 +- BsonJavaPort/bson_java_port/build.gradle | 2 +- README.md | 2 +- config.h | 6 +++--- configure | 24 ++++++++++++------------ configure.ac | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/BiSON.podspec b/BiSON.podspec index 38d45d1..48f0909 100644 --- a/BiSON.podspec +++ b/BiSON.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # s.name = "BiSON" - s.version = "1.2.0" + s.version = "1.2.1" s.summary = "A portable BSON C library" diff --git a/BsonJavaPort/bson_java_port/build.gradle b/BsonJavaPort/bson_java_port/build.gradle index cd60fdc..7ba6fd7 100644 --- a/BsonJavaPort/bson_java_port/build.gradle +++ b/BsonJavaPort/bson_java_port/build.gradle @@ -7,7 +7,7 @@ android { minSdkVersion 8 targetSdkVersion 26 versionCode 2 - versionName "1.2.0" + versionName "1.2.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" ndk{ abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" diff --git a/README.md b/README.md index 6704a11..ebdbc99 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ There is a jCenter artifact for Android. Add the following to your `build.gradle ``` dependencies { - compile ('com.smartdevicelink:bson_java_port:1.2.0') + compile ('com.smartdevicelink:bson_java_port:1.2.1') } ``` diff --git a/config.h b/config.h index 9005537..7686dd7 100644 --- a/config.h +++ b/config.h @@ -69,7 +69,7 @@ #define PACKAGE_NAME "bson_c_lib" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "bson_c_lib 1.2.0" +#define PACKAGE_STRING "bson_c_lib 1.2.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "bson_c_lib" @@ -78,13 +78,13 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.2.0" +#define PACKAGE_VERSION "1.2.1" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.2.0" +#define VERSION "1.2.1" /* Define for Solaris 2.5.1 so the uint64_t typedef from , , or is not used. If the typedef were allowed, the diff --git a/configure b/configure index 486563b..c9d2166 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for bson_c_lib 1.2.0. +# Generated by GNU Autoconf 2.69 for bson_c_lib 1.2.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='bson_c_lib' PACKAGE_TARNAME='bson_c_lib' -PACKAGE_VERSION='1.2.0' -PACKAGE_STRING='bson_c_lib 1.2.0' +PACKAGE_VERSION='1.2.1' +PACKAGE_STRING='bson_c_lib 1.2.1' PACKAGE_BUGREPORT='jacob@livio.io' PACKAGE_URL='' @@ -1353,7 +1353,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bson_c_lib 1.2.0 to adapt to many kinds of systems. +\`configure' configures bson_c_lib 1.2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1424,7 +1424,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bson_c_lib 1.2.0:";; + short | recursive ) echo "Configuration of bson_c_lib 1.2.1:";; esac cat <<\_ACEOF @@ -1546,7 +1546,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bson_c_lib configure 1.2.0 +bson_c_lib configure 1.2.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2099,7 +2099,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bson_c_lib $as_me 1.2.0, which was +It was created by bson_c_lib $as_me 1.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2962,7 +2962,7 @@ fi # Define the identity of the package. PACKAGE='bson_c_lib' - VERSION='1.2.0' + VERSION='1.2.1' cat >>confdefs.h <<_ACEOF @@ -12715,7 +12715,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bson_c_lib $as_me 1.2.0, which was +This file was extended by bson_c_lib $as_me 1.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12781,7 +12781,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -bson_c_lib config.status 1.2.0 +bson_c_lib config.status 1.2.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -16810,7 +16810,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bson_c_lib $as_me 1.2.0, which was +This file was extended by bson_c_lib $as_me 1.2.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16876,7 +16876,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -bson_c_lib config.status 1.2.0 +bson_c_lib config.status 1.2.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index b86362b..14523c4 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT(bson_c_lib, 1.2.0, jacob@livio.io) +AC_INIT(bson_c_lib, 1.2.1, jacob@livio.io) AM_INIT_AUTOMAKE([subdir-objects foreign -Wall]) AC_CONFIG_MACRO_DIRS([m4]) LT_INIT