Re: [gtk-list] Using autoconf with GTK



On Mon, Jul 26, 1999 at 09:05:00PM -0700, Arthur Jerijian wrote:
> Hi all,
> 
> I run the risk of posting a FAQ here, but....
> 
> What is the best way to begin using the autoconf and automake utilities with a
> GTK application? I remember finding some documentation somewhere, but I can't
> find any information in the GTK FAQ or tutorial.
> 
> Thanks,
> --Arthur
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null

First, inside of your source tree, try running autoscan - then take the 
configure.scan file and edit the hell out of it to fit your purposes.

www.gnu.org has a complete manual on autoconf with all the documentation you
need on different rules to put into your configure.in file (which you will
run autoconf on to produce a configure script)

Right off the top of my head, you might want to check into the AC_CHECK_LIB
stuff to put into your configure.in for checking for libraries.

What autoscan outputs is rarely completely sufficient for checking the 
dependancies on your app, but at least it helps some, and saves you having
to write the rules for things that are really common portability problems
between UNIXen and so on.

Some quick examples:

Check for a header:
AC_CHECK_HEADERS(unistd.h)

Check for a program:
AC_CHECK_PROG(INSTALL, install, `which install`, `which cp`)

And so on...see the www.gnu.org documentation.  Autoconf isn't too hard, but
you do have to do some reading to get it to do things the way you want it to
do them.

Hope it helps.
-- 
David Allen
http://opop.nols.com/
----------------------------------------
"Beware of the man who works hard to learn something, learns it, and
finds himself no wiser than before," Bokonon tells us.  "He is full of
murderous resentment of people who are ignorant without having come by
their ignorance the hard way."
-- Kurt Vonnegut, "Cat's Cradle"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]