I'm trying to compile Ruby and really understanding what's going on while doing so. I've used and written Makefiles before, but not autoconf's configure.in files, so maybe the result I'm getting is by design:$ git clone https://github.com/ruby/ruby.git...$ cd ruby$ git clean -fdx$ autoconf $ ./configure...checking for dot... nochecking for doxygen... nochecking for pkg-config... no...checking direct.h usability... nochecking direct.h presence... nochecking for direct.h... no...checking for daemon... (cached) noHowever, all of these are at least installed:$ dot -Vdot - graphviz version 2.26.3 (20100126.1600)$ doxygen --version1.7.4$ pkg-config --version0.26$ sudo updatedb$ locate /direct.h/usr/src/linux-headers-3.0.0-16-generic/include/config/pci/direct.h/usr/src/linux-headers-3.0.0-17-generic/include/config/pci/direct.h$ daemon --versiondaemon-0.6.4I realize there might be different causes for each of these, but why aren't they detected by the configure script?I'm running Ubuntu 11.10 with the latest patches.$ uname -aLinux username 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64 x86_64 x86_64 GNU/LinuxTried on another host. From config.log:configure:6408: checking for dotconfigure:6424: found /usr/bin/dotconfigure:6438: result: noconfigure:6445: checking for doxygenconfigure:6461: found /usr/bin/doxygenconfigure:6475: result: noconfigure:6483: checking for pkg-configconfigure:6504: found /usr/bin/pkg-configconfigure:6530: result: noWhat? They were found, but still no go?configure:11880: checking direct.h usabilityconfigure:11880: gcc -c  -O3 -ggdb    conftest.c >&5conftest.c:135:20: fatal error: direct.h: No such file or directorycompilation terminated.configure:11880: $? = 1configure: failed program was:| /* confdefs.h */| #define PACKAGE_NAME ...| #endif| #include <direct.h>configure:11880: result: noconfigure:11880: checking direct.h presenceconfigure:11880: gcc -E  conftest.cconftest.c:102:20: fatal error: direct.h: No such file or directorycompilation terminated.configure:11880: $? = 1configure: failed program was:| /* confdefs.h */| #define PACKAGE_NAME | /* end confdefs.h.  */| #include <direct.h>configure:11880: result: noconfigure:11880: checking for direct.hconfigure:11880: result: noFunky test script - Maybe it needs to be in a default path of some sort?configure:15175: checking for daemonconfigure:15175: result: noTurns out this is not checking for an executable, but for a C function using AC_CHECK_FUNCS.
Why doesn't Ruby's configure script detect my executables and header files?
compiling;ruby;configure
I know almost nothing about Ruby. I do, however know a fair amount about buildsystems. I'm gonna go way out on a limb here and suggest you've found abona-fide bug in the Ruby build system.Here's my reasoning:I get the same result you do, on completely differentsystems (even Cygwin/Windows 7), both with the git repoyou specify and the stock Ruby 1.9 sourcesThe reason you see found: /usr/bin/dot in your configure.logis because it genuinely found it on the path. This is easy to seein the generated configure script, especially if you modify itsfirst line to #!/bin/sh -x to get shell debug output:+ test -z /bin+ for ac_exec_ext in ''\'''\''' '$ac_executable_extensions'+ test -f /bin/dot+ test -x /bin/dot+ ac_cv_prog_DOT=+ printf '%s\n' 'configure:6424: found /bin/dot'+ break 2+ IFS='     The reason you see result: no is because, as you can see thesnippet above, ac_cv_prog_DOT was set to empty string, and thefollowing lines in configure simply reflect that missing value:+ DOT=+ test -n ''+ printf '%s\n' 'configure:6438: result: no'+ printf '%s\n' nonoThe reason that was set to empty string is (and this is the cruxof the matter) that configure.in specified empty string on line371:AC_CHECK_PROG(DOT, dot)AC_CHECK_PROG(DOXYGEN, doxygen)I belive that's a buggy invocation of the AC_CHECK_PROG macro, whichthe GNU Autoconf docs specify takes three required arguments, not two: Macro: AC_CHECK_PROG (variable, prog-to-check-for, value-if-found, [value-if-not-found], [path = $PATH], [reject])Check whether program prog-to-check-for exists in path. If itis found, set variable to value-if-found, otherwise tovalue-if-not-found, if given. Always pass over reject (anabsolute file name) even if it is the first found in the searchpath; in that case, set variable using the absolute file nameof the prog-to-check-for found that is not reject. If variablewas already set, do nothing. Calls AC_SUBST for variable. Theresult of this test can be overridden by setting the variablevariable or the cache variable ac_cv_prog_variable.There's no default value. Leaving it off effectively meansif you find dot, set DOT to empty stringI believe the reason this mistake was made was because theoriginal definition for that line used a different macro,AC_CHECK_TOOL, that only takes two arguments.From  checkin to svn.ruby-lang.org on Nov 11, 2010It's possible this may have been busted for a while, and someChangeLog comments seem to indicate that they've been havingtrouble with DOXYGEN, for example:Fri Mar 26 19:55:41 2010  Akinori MUSHA  <knu@iDaemons.org>    * Makefile.in (DOXYGEN): Define a missing variable DOXYGEN.  Build      has been failing when doxygen(1) is found by configure but the      variable is not defined by the system and make(1) does not allow      an empty command. (@$(DOXYGEN) was the cause)Finally, it's possible I have this all wrong. But I'm pretty sure thatconfigure is finding those tools, and it has been instructed toset the corresponding Makefile variables to empty string.Curious to hear what others think of this analysis.