Dan Nicholson wrote:
On Sun, May 18, 2008 at 6:50 PM, David Jensen <[EMAIL PROTECTED]> wrote:
On Sun, 18 May 2008 23:00:42 +0200
Thomas Trepl <[EMAIL PROTECTED]> wrote:
Am Sonntag, 18. Mai 2008 17:10:03 schrieb David Jensen:
...
You will probably want to learn autoconf and friends, sigh...
hmm, any suggestions one that one? I started to look around a bit
but i found only very basic samples or too sophisticated things or
outdated ones...
Yes, it's a pain. As you said, a lot of examples are outdated.
Actually, I started with the original BLFS hint.
The autotools are really not that hard. The best way to learn it is
just to make a silly project. Here is a barebones project making use
of autoconf, automake and libtool:
cat > configure.ac << "EOF"
AC_INIT([foo],[0.1],[[EMAIL PROTECTED]])
dnl foreign is just so automake doesn't complain about missing COPYING, etc.
AM_INIT_AUTOMAKE([foreign])
AC_PROG_LIBTOOL
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF
cat > Makefile.am << "EOF"
# create a shared libary libbaz and a program foo linking to it
lib_LTLIBRARIES = libbaz.la
libbaz_la_SOURCES = baz.c baz.h
include_HEADERS = baz.h
bin_PROGRAMS = foo
foo_SOURCES = foo.c
foo_LDADD = libbaz.la
EOF
cat > baz.h << "EOF"
void jimmy(void);
EOF
cat > baz.c << "EOF"
void jimmy(void)
{
return;
}
EOF
cat > foo.c << "EOF"
#include "baz.h"
int main(void)
{
jimmy();
return 0;
}
EOF
Rebuild the autotools, configure, make
autoreconf -iv
./configure
make
And there is a ton of documentation on the autotools, with the
autobook being a great high level tutorial.
http://sourceware.org/autobook/autobook/autobook_toc.html
http://www.gnu.org/software/autoconf/manual/
http://www.gnu.org/software/automake/manual/
http://www.gnu.org/software/libtool/manual/
What I've also found useful is just to read some of the autoconf
macros. They're in m4, but not that difficult to understand without
knowing m4. Look in /usr/share/autoconf/autoconf and
/usr/share/aclocal. You'll probably want to be somewhat familiar with
the pkg-config macros in aclocal/pkg.m4.
--
Dan
BTW Im working on MTPDude a gui for MTP based players and its going
well. I think I may have succeeded in
deGnomeing it and now I'm cleaning up the calls based on the old
version of libmtp. Wish me luck and maybe
I can post a new easier to compile toy. And its true I don't need an
IDE to do this but one may still prove useful
in the future as a means of organizing things. Checked out the GTK+3
effort and agree 100% I think
they have the right idea about merging or eliminating the codebases I'd
complained about.
John
|
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page