diff options
author | David Seifert <soap@gentoo.org> | 2023-07-16 11:44:12 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2023-07-16 11:44:12 +0200 |
commit | fe362b7cd94f1b2d60ebd4d02bb295d211586a69 (patch) | |
tree | 86db3aca3966fd904e174bd53c1776daa7d5dbd3 /configure.ac | |
parent | Add upstream tests (diff) | |
download | lua-patches-fe362b7cd94f1b2d60ebd4d02bb295d211586a69.tar.gz lua-patches-fe362b7cd94f1b2d60ebd4d02bb295d211586a69.tar.bz2 lua-patches-fe362b7cd94f1b2d60ebd4d02bb295d211586a69.zip |
Add Autotools5.4.6
* inspired by Fedora's patches, but mostly rewritten
for Gentoo's multi-versioned approach.
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..ab2a003 --- /dev/null +++ b/configure.ac @@ -0,0 +1,47 @@ +AC_PREREQ([2.69]) +AC_INIT([lua5.4], [5.4.6], [https://bugs.gentoo.org/], [lua], [http://www.lua.org]) + +AC_CONFIG_SRCDIR([src/lapi.c]) +AC_CONFIG_MACRO_DIR([m4]) + +AM_INIT_AUTOMAKE([1.15 foreign dist-xz no-dist-gzip serial-tests subdir-objects -Wall]) + +AC_PROG_CC +AC_PROG_SED +AM_PROG_AR +LT_INIT([disable-static]) +LT_LIB_M + +PKG_INSTALLDIR + +AC_ARG_WITH([readline], + [AS_HELP_STRING([--with-readline], [Use readline for interpreter input [default=yes]])]) + +# Check for readline +AS_IF([test "x$with_readline" != "xno"], [ + PKG_CHECK_MODULES([READLINE], [readline]) + AC_DEFINE([LUA_USE_READLINE], [1], [Building with readline support]) +]) + +AS_CASE([${host}], + [*-mingw*], [ + AC_DEFINE([LUA_BUILD_AS_DLL], [1], [Building a DLL under Win32]) + ], + [*-darwin*], [ + AC_DEFINE([LUA_USE_MACOSX], [1], [Use macOS routines]) + ], + [*-linux*], [ + AC_DEFINE([LUA_USE_LINUX], [1], [Use Linux routines]) + AC_SEARCH_LIBS([dlopen], [dl dld], [], [ + AC_MSG_ERROR([unable to find the dlopen() function]) + ]) + ], [ + AC_DEFINE([LUA_USE_POSIX], [1], [Use POSIX routines]) + AC_SEARCH_LIBS([dlopen], [dl dld], [], [ + AC_MSG_ERROR([unable to find the dlopen() function]) + ]) + ] +) + +AC_CONFIG_FILES([Makefile src/lua5.4.pc]) +AC_OUTPUT |