Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove lua-keybinder and m4/ax_lua.m4

lkeybinder.c remains in the examples/ directory. With ax_lua.m4, we
remove the only remaining piece under GPL (GPLv3+) specifically, leaving
libkeybinder-3.0 as a pure X11 license user (and public domain examples).
  • Loading branch information...
commit 1194ed26766d186f9e6fbefc7e69c9ba824e989b 1 parent 686f766
engla authored
4 Makefile.am
... ... @@ -1,9 +1,5 @@
1 1 SUBDIRS = libkeybinder docs
2 2
3   -if HAVE_LUA
4   -SUBDIRS += lua-keybinder
5   -endif
6   -
7 3 EXTRA_DIST = \
8 4 examples/Makefile \
9 5 examples/README \
28 configure.ac
@@ -94,32 +94,6 @@ X_LDFLAGS="$X_LIBS"
94 94 AC_SUBST(X_CFLAGS)
95 95 AC_SUBST(X_LDFLAGS)
96 96
97   -AC_ARG_ENABLE(lua,
98   - AS_HELP_STRING([--disable-lua],
99   - [disable lua bindings [default=if found]]),
100   - [enable_lua=no],
101   - [enable_lua=yes])
102   -
103   -dnl ****************************************************************************
104   -dnl Check for Lua 5.1
105   -dnl ****************************************************************************
106   -
107   -if test "x$enable_lua" != "xno"; then
108   - AX_LUA_HEADERS
109   - if test "x$ac_cv_header_lua_h" = "xyes" ; then
110   - AX_LUA_LIB_VERSION([501], [502])
111   - LUA_VERSION=[5.1]
112   - AC_SUBST(LUA_VERSION)
113   - AC_SUBST(LUA_INCLUDE)
114   - have_lua="yes"
115   - else
116   - have_lua="no"
117   - fi
118   -else
119   - have_lua="no"
120   -fi
121   -AM_CONDITIONAL(HAVE_LUA, test "x$have_lua" = "xyes")
122   -
123 97 dnl ***
124 98 dnl * GTK DOC
125 99 dnl ***
@@ -133,7 +107,6 @@ AC_OUTPUT([
133 107 Makefile
134 108 libkeybinder/Makefile
135 109 libkeybinder/$PACKAGE_NAME.pc
136   -lua-keybinder/Makefile
137 110 docs/Makefile
138 111 docs/version.info
139 112 ])
@@ -147,7 +120,6 @@ echo GTK version ......... : $gtk_version
147 120 echo libkeybinder ........ : yes
148 121 echo gobject-introspection : $found_introspection
149 122 echo gtk-doc ............. : $enable_gtk_doc
150   -echo lua-keybinder ....... : $have_lua
151 123 echo
152 124
153 125 echo "Now type make to compile"
9 lua-keybinder/Makefile.am
... ... @@ -1,9 +0,0 @@
1   -INCLUDES = $(LUA_INCLUDE) $(GTK_CFLAGS) -I../libkeybinder
2   -
3   -AM_CFLAGS = -Wall
4   -
5   -luakeybinderdir = $(libdir)/lua/$(LUA_VERSION)
6   -luakeybinder_LTLIBRARIES = keybinder.la
7   -keybinder_la_LDFLAGS = -module -avoid-version
8   -keybinder_la_LIBADD = ../libkeybinder/libkeybinder.la $(LUA_LIB)
9   -keybinder_la_SOURCES = lkeybinder.c
197 m4/ax_lua.m4
... ... @@ -1,197 +0,0 @@
1   -# ===========================================================================
2   -# http://www.gnu.org/software/autoconf-archive/ax_lua.html
3   -# ===========================================================================
4   -#
5   -# SYNOPSIS
6   -#
7   -# AX_WITH_LUA
8   -# AX_LUA_VERSION (MIN-VERSION, [TOO-BIG-VERSION])
9   -# AX_LUA_HEADERS
10   -# AX_LUA_LIBS
11   -# AX_LUA_LIB_VERSION (MIN-VERSION, [TOO-BIG-VERSION])
12   -#
13   -# DESCRIPTION
14   -#
15   -# Detect Lua interpreter, headers and libraries, optionally enforcing a
16   -# particular range of versions.
17   -#
18   -# AX_WITH_LUA searches for Lua interpreter and defines LUA if found.
19   -#
20   -# AX_LUA_VERSION checks that the version of Lua is at least MIN-VERSION
21   -# and less than TOO-BIG-VERSION, if given.
22   -#
23   -# AX_LUA_HEADERS searches for Lua headers and defines HAVE_LUA_H and
24   -# HAVE_LUALIB_H if found, and defines LUA_INCLUDE to the preprocessor
25   -# flags needed, if any.
26   -#
27   -# AX_LUA_LIBS searches for Lua libraries and defines LUA_LIB if found.
28   -#
29   -# AX_LUA_LIB_VERSION checks that the Lua libraries' version is at least
30   -# MIN-VERSION, and less than TOO-BIG-VERSION, if given.
31   -#
32   -# Versions are specified as three-digit integers whose first digit is the
33   -# major version and last two are the minor version (the same format as
34   -# LUA_VERSION_NUM in lua.h); e.g. 501 for Lua 5.1. The revision (e.g. the
35   -# "3" in "5.1.3") is ignored.
36   -#
37   -# The following options are added by these macros:
38   -#
39   -# --with-lua-includes=DIR Lua include files are in DIR.
40   -# --with-lua-prefix=DIR Lua files are in DIR.
41   -# --with-lua-suffix=ARG Lua binaries and library files are
42   -# suffixed with ARG.
43   -#
44   -# LICENSE
45   -#
46   -# Copyright (c) 2009 Reuben Thomas <rrt@sc3d.org>
47   -# Copyright (c) 2009 Matthieu Moy <Matthieu.Moy@imag.fr>
48   -# Copyright (c) 2009 Tom Payne <twpayne@gmail.com>
49   -# Copyright (C) 2010 Ulrik Sverdrup
50   -#
51   -# This program is free software: you can redistribute it and/or modify it
52   -# under the terms of the GNU General Public License as published by the
53   -# Free Software Foundation, either version 3 of the License, or (at your
54   -# option) any later version.
55   -#
56   -# This program is distributed in the hope that it will be useful, but
57   -# WITHOUT ANY WARRANTY; without even the implied warranty of
58   -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
59   -# Public License for more details.
60   -#
61   -# You should have received a copy of the GNU General Public License along
62   -# with this program. If not, see <http://www.gnu.org/licenses/>.
63   -#
64   -# As a special exception, the respective Autoconf Macro's copyright owner
65   -# gives unlimited permission to copy, distribute and modify the configure
66   -# scripts that are the output of Autoconf when processing the Macro. You
67   -# need not follow the terms of the GNU General Public License when using
68   -# or distributing such scripts, even though portions of the text of the
69   -# Macro appear in them. The GNU General Public License (GPL) does govern
70   -# all other use of the material that constitutes the Autoconf Macro.
71   -#
72   -# This special exception to the GPL applies to versions of the Autoconf
73   -# Macro released by the Autoconf Archive. When you make and distribute a
74   -# modified version of the Autoconf Macro, you may extend this special
75   -# exception to the GPL to apply to your modified version as well.
76   -
77   -#serial 7.1
78   -
79   -dnl Helper function to declare extra options
80   -AC_DEFUN([_AX_LUA_OPTS],
81   - [AC_ARG_WITH([lua-prefix],
82   - [AS_HELP_STRING([--with-lua-prefix=DIR],
83   - [Lua files are in DIR])])
84   - AC_ARG_WITH([lua-includes],
85   - [AS_HELP_STRING([--with-lua-includes=DIR],
86   - [Lua files are in DIR])])
87   - AC_ARG_WITH([lua-suffix],
88   - [AS_HELP_STRING([--with-lua-suffix=ARG],
89   - [Lua binary and library files are suffixed with ARG])])])dnl
90   -
91   -AC_DEFUN([AX_WITH_LUA],
92   - [_AX_LUA_OPTS
93   - if test "x$with_lua_prefix" = x; then
94   - lua_search_path="$PATH"
95   - else
96   - lua_search_path="$with_lua_prefix/bin"
97   - fi
98   - if test "x$LUA" = x; then
99   - AC_PATH_PROG([LUA], [lua$with_lua_suffix], [], [$lua_search_path])
100   - fi])dnl
101   -
102   -dnl Helper function to parse minimum & maximum versions
103   -AC_DEFUN([_AX_LUA_VERSIONS],
104   - [lua_min_version=$1
105   - lua_max_version=$2
106   - if test "x$lua_min_version" = x; then
107   - lua_min_version=0
108   - fi
109   - if test "x$lua_max_version" = x; then
110   - lua_max_version=1000
111   - fi])
112   -
113   -AC_DEFUN([AX_LUA_VERSION],
114   - [_AX_LUA_OPTS
115   - AC_MSG_CHECKING([Lua version is in range $1 <= v < $2])
116   - _AX_LUA_VERSIONS($1, $2)
117   - if test "x$LUA" != x; then
118   - lua_text_version=$(LUA_INIT= $LUA -v 2>&1 | head -n 1 | cut -d' ' -f2)
119   - case $lua_text_version in
120   - 5.2*)
121   - lua_version=502
122   - ;;
123   - 5.1*)
124   - lua_version=501
125   - ;;
126   - 5.0*)
127   - lua_version=500
128   - ;;
129   - 4.0*)
130   - lua_version=400
131   - ;;
132   - *)
133   - lua_version=-1
134   - ;;
135   - esac
136   - if test $lua_version -ge "$lua_min_version" -a $lua_version -lt "$lua_max_version"; then
137   - AC_MSG_RESULT([yes])
138   - else
139   - AC_MSG_RESULT([no])
140   - AC_MSG_FAILURE([Lua version not in desired range.])
141   - fi
142   - else
143   - AC_MSG_RESULT([no])
144   - AC_MSG_FAILURE([Lua version not in desired range.])
145   - fi])dnl
146   -
147   -AC_DEFUN([AX_LUA_HEADERS],
148   - [_AX_LUA_OPTS
149   - if test "x$with_lua_prefix" != x; then
150   - LUA_INCLUDE="-I$with_lua_prefix/include"
151   - fi
152   - if test "x$with_lua_includes" != x; then
153   - LUA_INCLUDE="$LUA_INCLUDE -I$with_lua_includes"
154   - fi
155   - LUA_OLD_CPPFLAGS="$CPPFLAGS"
156   - CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
157   - AC_CHECK_HEADERS([lua.h lualib.h])
158   - CPPFLAGS="$LUA_OLD_CPPFLAGS"])dnl
159   -
160   -AC_DEFUN([AX_LUA_LIBS],
161   - [_AX_LUA_OPTS
162   - if test "x$with_lua_prefix" != x; then
163   - LUA_LIB="-L$with_lua_prefix/lib"
164   - fi
165   - AC_CHECK_LIB([m], [exp], [lua_extra_libs="$lua_extra_libs -lm"], [])
166   - AC_CHECK_LIB([dl], [dlopen], [lua_extra_libs="$lua_extra_libs -ldl"], [])
167   - AC_CHECK_LIB([lua$with_lua_suffix],
168   - [lua_call],
169   - [LUA_LIB="$LUA_LIB -llua$with_lua_suffix $lua_extra_libs"],
170   - [],
171   - [$LUA_LIB $lua_extra_libs])])dnl
172   -
173   -AC_DEFUN([AX_LUA_LIB_VERSION],
174   - [_AX_LUA_OPTS
175   - AC_MSG_CHECKING([liblua version is in range $1 <= v < $2])
176   - _AX_LUA_VERSIONS($1, $2)
177   - LUA_OLD_LIBS="$LIBS"
178   - LIBS="$LIBS $LUA_LIB"
179   - LUA_OLD_CPPFLAGS="$CPPFLAGS"
180   - CPPFLAGS="$CPPFLAGS $LUA_INCLUDE"
181   - AC_RUN_IFELSE([AC_LANG_SOURCE([[
182   -#include <lua.h>
183   -#include <stdlib.h>
184   -#include <stdio.h>
185   -int main()
186   -{
187   - printf("(found %s, %d)... ", LUA_VERSION, LUA_VERSION_NUM);
188   - if (LUA_VERSION_NUM >= $lua_min_version && LUA_VERSION_NUM < $lua_max_version)
189   - exit(EXIT_SUCCESS);
190   - exit(EXIT_FAILURE);
191   -}
192   -]])],
193   - [AC_MSG_RESULT([yes])],
194   - [AC_MSG_RESULT([no])
195   - AC_MSG_FAILURE([Lua libraries version not in desired range])])
196   - LIBS="$LUA_OLD_LIBS"
197   - CPPFLAGS="$LUA_OLD_CPPFLAGS"])dnl

0 comments on commit 1194ed2

Please sign in to comment.
Something went wrong with that request. Please try again.