05.01.2013 Views

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

348<br />

CHAPTER 19 EXTENDING THE POWER OF DARWIN<br />

NOTE Again, occasionally things will go wrong. Unfortunately, an error during the build<br />

process is usually even more difficult to track down than during the configure stage. If you<br />

notice the build failing in a specific area of the build that you identify with a configure option,<br />

you may try not enabling (or disabling) that particular option. If you really aren’t using any<br />

strange options (or none at all) and this is a fairly popular program, then it’s likely someone<br />

else is having the same issues, and if enough people are having these issues, then it’s possible<br />

someone out there has a solution.<br />

Step 3: Install<br />

Usually, if you are dealing with a stable version of a popular application, things go smoothly and<br />

your configure and build stages happen without issue (or without major issues anyway), after<br />

which it comes time to install your program. This is also a very easy process; just type the following:<br />

sudo make install<br />

That should do it.<br />

Most software compiled this way will install software in the /usr/local/ directory. By<br />

default this directory doesn’t exist in <strong>Leopard</strong>, so you may want to create it. If, however, you<br />

want to install your software (or parts of it) somewhere else, this can usually be configured as a<br />

configure option.<br />

To sum up, the quick and easy way to compile a program you downloaded as source code is<br />

often as easy as this:<br />

./configure<br />

make<br />

sudo make install<br />

Summary<br />

We covered a whole lot of stuff in this chapter, from writing to shell scripts to compiling an<br />

application from source code. The point here wasn’t to make you an expert at any of these<br />

things, but more so to familiarize yourself with some of the power that Darwin brings to the<br />

<strong>Mac</strong> world. The most important parts of this chapter were the ones on <strong>Mac</strong>Ports and Fink,<br />

though, so pick one of these and install it. Then should you ever need to install and use something<br />

like, say, figlet, you’ll be just a few commands away from being able to do this:<br />

stich:~ scott$ figlet Neat huh?<br />

_ _ _ _ _ ___<br />

| \ | | ___ __ _| |_ | |__ _ _| |__|__ \<br />

| \| |/ _ \/ _` | __| | '_ \| | | | '_ \ / /<br />

| |\ | __/ (_| | |_ | | | | |_| | | | |_|<br />

|_| \_|\___|\__,_|\__| |_| |_|\__,_|_| |_(_)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!