Blob Blame History Raw
diff -up graphviz-2.30.1/configure.ac.lua-52 graphviz-2.30.1/configure.ac
--- graphviz-2.30.1/configure.ac.lua-52	2013-05-15 14:55:05.523513480 -0400
+++ graphviz-2.30.1/configure.ac	2013-05-15 14:59:48.628517728 -0400
@@ -874,7 +874,7 @@ else
             if test "x$PKGCONFIG" != "x"; then
 	        AC_MSG_CHECKING(for Lua headers and libraries with pkg-config)
 	        echo
-	        for l in "$lua_suffix" "" "51" "5.1" "50" "5.0" ; do
+	        for l in "$lua_suffix" "" "52" "5.2" "51" "5.1" "50" "5.0" ; do
 	            pkgconfig_lua_found=`$PKGCONFIG --exists lua$l 2>/dev/null`
 	            if test "x$?" == "x0" ; then
 		        LUA_VERSION=`$PKGCONFIG --modversion lua$l`
@@ -895,7 +895,7 @@ else
     
         if test "x$LUA_INCLUDES" == "x" -o "x$LUA_LIBS" == "x" ; then
             LUACONFIG=""
-            AC_CHECK_PROGS(LUACONFIG, lua-config lua-config51 lua-config5.1 lua-config50 lua-config5.0)
+            AC_CHECK_PROGS(LUACONFIG, lua-config lua-config52 lua-config5.2 lua-config51 lua-config5.1 lua-config50 lua-config5.0)
             if test "x$LUACONFIG" != "x" ; then
                 AC_MSG_CHECKING(for Lua headers and libraries with lua-config)
 	        echo
@@ -914,39 +914,53 @@ else
             if test "x$ac_found_lua_header" == "xyes" -a "x$ac_found_liblua_header" == "xyes"; then
                 LUA_INCLUDES="$CFLAGS"
             fi
-            for l in "$lua_suffix" "" "51" "5.1" "50" "5.0" ; do
-                AC_CHECK_LIB(lua$l,lua_call,ac_found_lua_lib="yes",ac_found_lua_lib="no")
+            for l in "$lua_suffix" "" "52" "5.2" "51" "5.1" "50" "5.0" ; do
+                AC_CHECK_LIB(lua$l,lua_callk,ac_found_lua_lib="yes",ac_found_lua_lib="no")
                 if test "x$ac_found_lua_lib" == "xyes" ; then
-	            LUA_VERSION=">=5.1.0"
-    
-	            LUA_LIBS="$LDFLAGS -llua$l -lm"
-    
-		    ac2_save_LDFLAGS="$LDFLAGS"
-		    LDFLAGS="$LDFLAGS -llua$l -lm"
-    
-		    if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
-		       LDFLAGS="$LDFLAGS -ldl"
-		    fi
+                    LUA_VERSION=">=5.2.0"
+
+                    LUA_LIBS="$LDFLAGS -llua$l -lm"
+
+                    ac2_save_LDFLAGS="$LDFLAGS"
+                    LDFLAGS="$LDFLAGS -llua$l -lm"
+
+                    if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
+                       LDFLAGS="$LDFLAGS -ldl"
+                    fi
+
+                    AC_CHECK_LIB(lua$l,lua_call,ac_found_lua_lib="yes",ac_found_lua_lib="no")
+                    if test "x$ac_found_lua_lib" == "xyes" ; then
+	                LUA_VERSION=">=5.1.0"
     
-		    AC_CHECK_LIB(lualib$l,luaL_openlib,ac_found_liblua_lib="yes",ac_found_liblua_lib="no")
-		    if test "x$ac_found_liblua_lib" == "xyes" ; then
-		       LUA_VERSION="5.0.x"
+	                LUA_LIBS="$LDFLAGS -llua$l -lm"
     
-		       LUA_LIBS="$LUA_LFLAGS -llualib$l"
+		        ac2_save_LDFLAGS="$LDFLAGS"
+		        LDFLAGS="$LDFLAGS -llua$l -lm"
     
-		       if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
-		          LUA_LIBS="$LUA_LFLAGS -ldl"
-		       fi
-		    fi
+		        if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
+		           LDFLAGS="$LDFLAGS -ldl"
+		        fi
     
-		    LDFLAGS="$ac2_save_LDFLAGS"
-		    break
-	        fi
+		        AC_CHECK_LIB(lualib$l,luaL_openlib,ac_found_liblua_lib="yes",ac_found_liblua_lib="no")
+		        if test "x$ac_found_liblua_lib" == "xyes" ; then
+		           LUA_VERSION="5.0.x"
+    
+		           LUA_LIBS="$LUA_LFLAGS -llualib$l"
+    
+		           if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
+		              LUA_LIBS="$LUA_LFLAGS -ldl"
+		           fi
+   		        fi
+    
+		        LDFLAGS="$ac2_save_LDFLAGS"
+		        break
+	            fi
+                fi
             done
         fi
     
         AC_MSG_CHECKING(for Lua compiling and linking)
-        LUA_TEST=`LT=luatest.c ; echo "#include <lua.h>" > $LT;  echo "#include <lualib.h>" >> $LT; echo "int main() { luaopen_base((lua_State *)lua_open()); return 0; }" >> $LT ; $CC -Wall $LT -o $LT.out $LUA_INCLUDES $LUA_LIBS $CFLAGS $LDFLAGS 1>/dev/null 2>&1 ; echo $?; rm -f $LT $LT.out 1>/dev/null 2>&1`
+        LUA_TEST=`LT=luatest.c ; echo "#include <lua.h>" > $LT;  echo "#include <lualib.h>" >> $LT; echo "int main() { luaopen_base((lua_State *)luaL_newstate()); return 0; }" >> $LT ; $CC -Wall $LT -o $LT.out $LUA_INCLUDES $LUA_LIBS $CFLAGS $LDFLAGS 1>/dev/null 2>&1 ; echo $?; rm -f $LT $LT.out 1>/dev/null 2>&1`
         if test "x$LUA_TEST" != "x0" ; then
           AC_MSG_RESULT(no)
           AC_MSG_WARN([