VDKBuilder Tutorial
STEP 4
Return to Index

In this chapter we learn how to use automake/autoconf support.

In order to have this capability you need:
autoconf version >= 2.13
automake (GNU automake) version >= 1.4

Introduction

Looking into your dir your-home/vdkb-examples/ will see these files:

step3 step3.h step3.prj.opt step3_gui.o
step3.cc step3.o step3_gui.cc vdkbMakefile
step3.frm step3.prj step3_gui.h simpson1.xpm

those files are produced by VDKBuilder and are completely useful only if
another VDKBuilder can use them. In this case is enough if you tar-zip
these files and send them to another user.
Supposing that you want make a package that can be compiled without
VDKBuilder you can use autoconf/automake feature. it prepares a complete
package that can be used and compiled without VDKBuilder.

Preparing packages

- open your step3.prj saved in last session as in Tutorial step 3.

An extra step may be required because the package may need some files that
VDKBuilder doesn't care and aren't directly involved into automake/autoconf support.
In this case you may need to to write an "extra_dist.am" file where you have to list these files.
In the step3 project there is <simpson1.xpm> file that has to be distributed with sources
otherwise the pixmapped button does'n't work properly.

- choose File->New->Unit, clear unit.h and edit just a line:
simpson1.xpm
Tip: be sure to write almost a complete line with line-feed.

- save the file as extra_dist.am

- Choose menu item Autoconf/Automake -> Autogen

- You will see that VDKBUilder maker will open and begins packaging work:

**Warning**: I am going to run `configure' with no arguments.
If you wish to pass any to it, please specify them on the
`./autogen.sh' command line.

processing .
Running aclocal ...
Running autoheader...
Running automake --gnu ...
Running autoconf ...
Running ./configure --enable-maintainer-mode --enable-compile-warnings ...
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking host system type... i586-pc-linux-gnulibc1
checking for vdk-config... /usr/local/bin/vdk-config
checking for VDK - version >= 0.6.5... yes
checking for c++... c++
checking whether the C++ compiler (c++ ) works... yes
checking whether the C++ compiler (c++ ) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether c++ accepts -g... yes
checking how to run the C++ preprocessor... c++ -E
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h
Now type `make' to compile the package
DONE with result 0, at Sat Aug 21 18:09:13 1999

- Close VDKBuilder Maker

Looking into your dir your-home/vdkb-examples/ will see these files:
AUTHORS README config.log stamp-h step3.prj.opt
COPYING acconfig.h config.status* stamp-h.in step3_gui.cc
ChangeLog aclocal.m4 config.sub step3* step3_gui.h
INSTALL autogen.sh* configure* step3.cc step3_gui.o
Makefile config.cache configure.in step3.frm vdkbMakefile
Makefile.am config.guess install-sh step3.h simpson1.xpm
Makefile.in config.h missing step3.o extra_dist.am
NEWS config.h.in mkinstalldirs step3.prj

All these files are necessary for a standard GNU package. Someone is a dummy file,
like AUTHORS,COPYING,README and INSTALL. Writing these files is your job.
Others serve to users in order to compile step3 program.

- now choose menu item Autoconf/Automake -> Make Dist
a step3-0.0.1.tar.gz file will be produced containing all the package.

To check if the package is complete and working open a xterm and do:

$ cd vdkb-examples
$ mkdir tmp
$ cd tmp
$ cp ../step3-0.0.1.tar.gz .
$ tar xvzf step3-0.0.1.tar.gz
$ cd step3-0.0.1
$ ./configure
$ make
$ ./step3&

you should see step3 program compiled and working without VDKBuilder.
now you can delete tmp dir

$ cd ~/vdkb-examples
$ rm -r tmp/

Tip: version number is by default 0.0.1, to change this number use menu item
Project->Options and edit package version field.

- Close the VDKBuilder and rest