Re: [gtk-list] Re: The Programmer's FAQ ? (was : Re: alignment oddity)
- From: Erik Mouw <J A K Mouw its tudelft nl>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: The Programmer's FAQ ? (was : Re: alignment oddity)
- Date: Thu, 3 Jun 99 17:06:35 +0200
On Thu, 03 Jun 1999 08:08:36 -0600, gtk-list@redhat.com (Joe Pfeiffer) wrote:
>
> 4. A simple autoconf+automake example for GTK programs (been there, done
> that, have the T-shirt).
>
> Here's a contribution (actually for Gtk--). I figure FAQ answers
> should be of the ``do this'' variety, and if they want to know what
> any of the commands do they should look at the docs.
>
> % autoscan
> % cp configure.scan configure.in
>
> add macroes to configure.in:
> AM_INIT_AUTOMAKE(xdl, 0.1)
> AC_PROG_CXX
Also edit configure.in and remove macros that deal with ANSI C tests
because you're using C++ which is a superset of ANSI C++. If you're using
C++, consider using AC_LANG_CPLUSPLUS. Remove all macros that deal with
finding gtk headers or libraries and use
"AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(xdl 0.1 needs GTK))" instead. I don't
know if there is an autoconf macro for Gtk--, if there is, put it in.
> % aclocal
> % autoconf
> % automake --foreign --add-missing Makefile
Or for non-gcc compilers that don't have the automatic dependency
generating option:
automake --foreign --include-deps --add-missing Makefile
> % ./configure
> % make
To complete your example, the Makefile.am looks like:
bin_PROGRAMS = xdl
xdl_SOURCES = xdl.cc foo.cc bar.cc
INCLUDES = @GTK_CFLAGS@
xdl_LDADD = @GTK_LIBS@
CLEANFILES = *~
DISTCLEANFILES = .deps/*.P
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2785859 Fax: +31-15-2781843 Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]