title: OS X 10.9.2: checking whether the C compiler works... no
body: <p>I'm attempting to install texinfo 5.2, and I'm running into some issues during <code>./configure</code>, which I believe are related to the C compiler.  When I upgraded from Snow Leopard, I didn't perform a clean install, so perhaps that's part of the problem.  Anyway, here's what I've got:</p>
  
  <pre><code>ryansmacbook:texinfo-5.2 ryan$ sudo ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64"                  CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64"                  CPP="gcc -E" CXXCPP="g++ -E"
  Password:
  checking for a BSD-compatible install... /usr/local/bin/ginstall -c
  checking whether build environment is sane... yes
  checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
  checking for gawk... no
  checking for mawk... no
  checking for nawk... no
  checking for awk... awk
  checking whether make sets $(MAKE)... yes
  checking whether make supports nested variables... yes
  checking whether UID '0' is supported by ustar format... yes
  checking whether GID '0' is supported by ustar format... yes
  checking how to create a ustar tar archive... gnutar
  checking for perl... /usr/bin/perl
  checking Perl version and Encode module... yes
  checking for gawk... (cached) awk
  checking for gcc... gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64
  checking whether the C compiler works... no
  configure: error: in `/Users/ryan/Downloads/texinfo-5.2':
  configure: error: C compiler cannot create executables
  See `config.log' for more details
  </code></pre>
  
  <p>I've read some of the other questions related to this, so I attempted to install Command Line Tools.</p>
  
  <pre><code>ryansmacbook:~ ryan$ xcode-select -p
  /Applications/Xcode.app/Contents/Developer
  </code></pre>
  
  <p>So it seems they're not installed, although I'm running Xcode 5.1 installed from the App Store.  From what I've read, Command Line Tools <em>should</em> be installed, but I've tried</p>
  
  <pre><code>$ xcode-select --install
  </code></pre>
  
  <p>anyway, and when I tell it to install, a message pops up saying "Can't install software because it is not currently available from the Software Update server."</p>
  
  <p>I found what I thought might be a work-around at <a href="http://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/" rel="noreferrer">http://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/</a>, so I did the following:</p>
  
  <pre><code>ryansmacbook:Tools ryan$ brew install coreutils
  Warning: It appears you have MacPorts or Fink installed.
  Software installed with other package managers causes known problems for
  Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
  ==&gt; Downloading http://ftpmirror.gnu.org/coreutils/coreutils-8.22.tar.xz
  ######################################################################## 100.0%
  ==&gt; ./configure --prefix=/usr/local/Cellar/coreutils/8.22 --program-prefix=g --w
  ==&gt; make install
  ==&gt; Caveats
  All commands have been installed with the prefix 'g'.
  
  If you really need to use these commands with their normal names, you
  can add a "gnubin" directory to your PATH from your bashrc like:
  
      PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
  
  Additionally, you can access their man pages with normal names if you add
  the "gnuman" directory to your MANPATH from your bashrc as well:
  
      MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
  
  /usr/local/share/info/dir: Permission denied
  ==&gt; Summary
    /usr/local/Cellar/coreutils/8.22: 211 files, 10M, built in 2.4 minutes
  </code></pre>
  
  <p>But I still have the <code>./configure</code> issue.</p>
  
  <p>For reference,</p>
  
  <pre><code>$ gcc --version
  Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
  Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
  Target: x86_64-apple-darwin13.1.0
  Thread model: posix
  </code></pre>
  
  <p>Although I did attempt to install gcc-4.7 the other day, and it's currently living at</p>
  
  <pre><code>/usr/gcc-4.7.2/bin/gcc-4.7
  </code></pre>
  
  <p>I'm not quite sure how to get it to run as a command from the command line because</p>
  
  <pre><code>$ gcc-4.7 --version
  -bash: gcc-4.7: command not found
  </code></pre>
  
  <p>is what I'm getting now, but that may be neither here nor there.</p>
  
  <p>edit: Since this doesn't directly answer my question about checking whether the C compiler works, I'm not submitting this as an answer.  I just tried <code>brew install texinfo</code>, and that worked like a charm.  At this point, I can't really remember why I was trying to install <code>texinfo</code> from source nor can I remember what I needed it for (maybe something GNU Make-related or Emacs-related?).</p>