diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch) | |
tree | 5ac38a06f3dde268dc7927dc155896926aaf7012 /kate/part/configure.in.in | |
download | tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/part/configure.in.in')
-rw-r--r-- | kate/part/configure.in.in | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/kate/part/configure.in.in b/kate/part/configure.in.in new file mode 100644 index 000000000..faf0717e9 --- /dev/null +++ b/kate/part/configure.in.in @@ -0,0 +1,89 @@ +AC_DEFUN([AC_PATH_LUA], [ + +dnl Based on the lua check used by yzis-M3 + + HAVE_LUA="" + + AC_ARG_WITH([lua], + AC_HELP_STRING([--without-lua], [Build without Lua libraries (default: check)])) + + AC_ARG_WITH(lua-dir, + AC_HELP_STRING([--with-lua-dir=DIR],[where the root of Lua 5.x is installed]), + [ + LUA="$withval" + LUA_INCLUDES=-I"$withval"/include + LUA_LIBS="-L$withval/lib" ]) + + AC_ARG_WITH(lua-includes, + AC_HELP_STRING([--with-lua-includes=DIR],[where the Lua includes are]), + [ LUA_INCLUDES="-I$withval" ]) + + AC_ARG_WITH(lua-libraries, + AC_HELP_STRING([--with-lua-libraries=DIR],[where the Lua library is installed]), + [ + LUA_LIBS="-L$withval" ]) + + + if test "x$with_lua" = "xno"; then + AC_MSG_RESULT([Not using Lua]) + else + if ! test "x$LUA" = "x"; then + AC_MSG_RESULT(using Lua from $LUA) + fi + if ! test "x$LUA_LIBS" = "x"; then + AC_MSG_RESULT(using Lua libraries in $LUA_LIBS) + fi + if ! test "x$LUA_INCLUDES" = "x"; then + AC_MSG_RESULT(using Lua includes in $LUA_INCLUDES) + fi + + dnl checking some headers first + ac_save_CFLAGS="$CFLAGS" + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_LDFLAGS="$LDFLAGS" + CFLAGS="$LUA_INCLUDES $CFLAGS" + CPPFLAGS="$LUA_INCLUDES $CPPFLAGS" + LDFLAGS="$LUA_LIBS $LDFLAGS" + + LUAH_FOUND="" + AC_CHECK_HEADER(lua.h,LUAH_FOUND="true", + [ AC_MSG_RESULT([lua.h was not found or was not usable, Lua 5.0 headers are required !]) ] + ) + LUALIBH_FOUND="" + AC_CHECK_HEADER(lualib.h,LUALIBH_FOUND="true", + [ AC_MSG_RESULT([lualib.h was not found or was not usable, Lua 5.0 headers are required !]) ] + ) + + + dnl find the libs name + if test -z "$LUALIBH_FOUND" -o -z "$LUAH_FOUND"; then + LUA_LIBS="" + else + AC_CHECK_LIB(lua50,lua_version, LUA_LIBS="$LUA_LIBS -llua50 -llualib50", + AC_CHECK_LIB(lua,lua_version, LUA_LIBS="$LUA_LIBS -llua -llualib", + [LUA_LIBS="" + AC_MSG_RESULT([Lua 5.0 libraries were not found !]) ] + ) + ) + fi + CFLAGS="$ac_save_CFLAGS" + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS" + + + if test -z "$LUA_LIBS"; then + LUA="" + LUA_INCLUDES="" + LUA_LIBS="" + else + AC_DEFINE_UNQUOTED(HAVE_LUA, 1, [Define if you have LUA > 5.0]) + HAVE_LUA="yes" + fi + AC_SUBST(LUA) + AC_SUBST(LUA_INCLUDES) + AC_SUBST(LUA_LIBS) + fi + +]) + +AC_PATH_LUA |