configure.in: Make the pkg-config name of liblua configurable. ja/lua
authorFlorian Forster <octo@huhu.verplant.org>
Sat, 4 Dec 2010 08:36:05 +0000 (09:36 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Sat, 4 Dec 2010 08:36:05 +0000 (09:36 +0100)
configure.in

index 5f99eaa..267932e 100644 (file)
@@ -1983,9 +1983,15 @@ with_liblua_ldflags=""
 with_liblua_libs=""
 with_liblua="yes"
 
+AC_ARG_VAR([LIBLUA_PKG_CONFIG_NAME], [Name of liblua used by pkg-config])
+if test "x$LIBLUA_PKG_CONFIG_NAME" = "x"
+then
+       LIBLUA_PKG_CONFIG_NAME="lua5.1"
+fi
+
 if test "x$with_liblua" = "xyes"
 then
-       $PKG_CONFIG --exists lua5.1 2>/dev/null
+       $PKG_CONFIG --exists $LIBLUA_PKG_CONFIG_NAME 2>/dev/null
        lua_config_status=$?
 
        if test 0 -ne $lua_config_status
@@ -1996,9 +2002,9 @@ fi
 
 if test "x$with_liblua" = "xyes"
 then
-       with_liblua_cppflags=`$PKG_CONFIG --cflags-only-I lua5.1` || with_liblua="no"
-       with_liblua_ldflags=`$PKG_CONFIG --libs-only-L lua5.1` || with_liblua="no"
-       with_liblua_libs=`$PKG_CONFIG --libs-only-l lua5.1` || with_liblua="no"
+       with_liblua_cppflags=`$PKG_CONFIG --cflags-only-I $LIBLUA_PKG_CONFIG_NAME` || with_liblua="no"
+       with_liblua_ldflags=`$PKG_CONFIG --libs-only-L $LIBLUA_PKG_CONFIG_NAME` || with_liblua="no"
+       with_liblua_libs=`$PKG_CONFIG --libs-only-l $LIBLUA_PKG_CONFIG_NAME` || with_liblua="no"
 fi
 if test "x$with_liblua" = "xyes"
 then