Blame SOURCES/graphviz-2.30.1-lua-5.2.patch

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