]> Dogcows Code - chaz/yoink/blobdiff - configure
optionally install man pages
[chaz/yoink] / configure
index d4435162569e366a992f552e31ac3cdaff3added..9f97b6424af101c05f87ef3c13a75cdd932b0b01 100755 (executable)
--- a/configure
+++ b/configure
@@ -71,8 +71,8 @@ end
 -- Setup a temporary file to collect error messages.
 --
 
-error_log = "config.log"
-os.remove(error_log)
+config_log = "config.log"
+os.remove(config_log)
 
 
 --
@@ -89,10 +89,10 @@ function die(...)
        for _,value in ipairs(arg) do
                print("fatal: "..tostring(value))
        end
-       if file_exists(error_log) then
+       if file_exists(config_log) then
                print()
                print("Look through the file `config.log' for more information:\n")
-               os.execute("tail "..error_log)
+               os.execute("tail "..config_log)
        end
        os.exit(1)
 end
@@ -100,7 +100,8 @@ end
 -- Execute a command and return its output or nil if the command failed to
 -- run.
 function backtick_run(command)
-       local fd = io.popen(command.." 2>>"..error_log)
+       os.execute("echo '# "..command.."' >>"..config_log)
+       local fd = io.popen(command.." 2>>"..config_log)
        if fd then
                local stdout = fd:read("*l")
                fd:close()
@@ -112,7 +113,8 @@ end
 -- Try to execute a command and return true if the command finished
 -- successfully (with an exit code of zero).
 function try_run(command)
-       return os.execute(command.." >/dev/null 2>>"..error_log) == 0
+       os.execute("echo '# "..command.."' >>"..config_log)
+       return os.execute(command.." >/dev/null 2>>"..config_log) == 0
 end
 
 -- Remove the whitespace surrounding a string.
@@ -388,7 +390,7 @@ else
 end
 
 -- Check for CXX.
-tmpname                        = os.tmpname()..".c"
+tmpname                        = os.tmpname()..".cpp"
 tmpfile, err   = io.open(tmpname, "w")
 if tmpfile then
        tmpfile:write([[
This page took 0.020155 seconds and 4 git commands to generate.