{"action":"created","issue":{"url":"https://api.github.com/repos/snowleopard/shaking-up-ghc/issues/227","repository_url":"https://api.github.com/repos/snowleopard/shaking-up-ghc","labels_url":"https://api.github.com/repos/snowleopard/shaking-up-ghc/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/snowleopard/shaking-up-ghc/issues/227/comments","events_url":"https://api.github.com/repos/snowleopard/shaking-up-ghc/issues/227/events","html_url":"https://github.com/snowleopard/shaking-up-ghc/issues/227","id":148979668,"number":227,"title":"Demystifying Autoconf","user":{"login":"snowleopard","id":675286,"avatar_url":"https://avatars.githubusercontent.com/u/675286?v=3","gravatar_id":"","url":"https://api.github.com/users/snowleopard","html_url":"https://github.com/snowleopard","followers_url":"https://api.github.com/users/snowleopard/followers","following_url":"https://api.github.com/users/snowleopard/following{/other_user}","gists_url":"https://api.github.com/users/snowleopard/gists{/gist_id}","starred_url":"https://api.github.com/users/snowleopard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowleopard/subscriptions","organizations_url":"https://api.github.com/users/snowleopard/orgs","repos_url":"https://api.github.com/users/snowleopard/repos","events_url":"https://api.github.com/users/snowleopard/events{/privacy}","received_events_url":"https://api.github.com/users/snowleopard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/snowleopard/shaking-up-ghc/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/snowleopard/shaking-up-ghc/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2016-04-17T18:33:01Z","updated_at":"2016-04-19T07:11:56Z","closed_at":null,"body":"I've been told a number of times that Autoconf is a sacred gift, which we should all love and live with until the end of time. I also heard people whispering heretic thoughts about getting rid of it. Not now, but maybe some day. I admit that Autoconf is a mystery for me: I don't know what exactly it does, which makes it difficult for me to take sides in this matter.\r\n\r\nCan we try to demystify Autoconf here? What exactly does it do? Please try to be specific, i.e., it computes setting `foo` stored in file `bar`, which is difficult to get right on all platforms, because `baz`.\r\n\r\nWhen I look at `system.config.in`, I don't see anything magic. Most of the settings could be obtained in a relatively straightforward way. But this is, of course, only part of what Autoconf and friends do. Several GHC packages have non-trivial `configure` scripts.\r\n\r\nIn any case, it seems logical to at least move the parts which are easy to compute into the new build system. For example:\r\n```\r\nghc-version           = @GhcVersion@\r\nghc-major-version     = @GhcMajVersion@\r\nghc-minor-version     = @GhcMinVersion@\r\nghc-patch-level       = @GhcPatchLevel@\r\n```\r\n\r\nWe can easily add a build rule to query GHC version, so why keep this in the incomprehensible and unmaintainable (to mere mortals like me) Autoconf codebase?"},"comment":{"url":"https://api.github.com/repos/snowleopard/shaking-up-ghc/issues/comments/211765192","html_url":"https://github.com/snowleopard/shaking-up-ghc/issues/227#issuecomment-211765192","issue_url":"https://api.github.com/repos/snowleopard/shaking-up-ghc/issues/227","id":211765192,"user":{"login":"hvr","id":285533,"avatar_url":"https://avatars.githubusercontent.com/u/285533?v=3","gravatar_id":"","url":"https://api.github.com/users/hvr","html_url":"https://github.com/hvr","followers_url":"https://api.github.com/users/hvr/followers","following_url":"https://api.github.com/users/hvr/following{/other_user}","gists_url":"https://api.github.com/users/hvr/gists{/gist_id}","starred_url":"https://api.github.com/users/hvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvr/subscriptions","organizations_url":"https://api.github.com/users/hvr/orgs","repos_url":"https://api.github.com/users/hvr/repos","events_url":"https://api.github.com/users/hvr/events{/privacy}","received_events_url":"https://api.github.com/users/hvr/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T07:11:56Z","updated_at":"2016-04-19T07:11:56Z","body":"Just to give some perspective, here's the history of things currently touching the autoconf-code:\r\n\r\n - http://git.haskell.org/ghc.git/history/HEAD:/aclocal.m4\r\n - http://git.haskell.org/ghc.git/history/HEAD:/configure.ac\r\n\r\nYou may notice I'm looking for opportunities to refactor/cleanup/simplify the current Autoconf code to get rid of some technical-debt. Ironically, the work I'm doing to improve our Autoconf script may end up making it easier to get rid of Autoconf ;-)"}}