root/trunk/autogen.sh

Revision 1453, 1.7 kB (checked in by jtv, 2 months ago)

Still patching up 3.0.0-to-3.0 changes.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #! /bin/sh
2 # Run this to generate all the initial makefiles, etc.
3 # Set CONFIG_ARGS to the argument list you wish to pass to configure
4
5 set -e
6
7 # Optionally run in "dumb" locale to avoid performance overhead (and risk of
8 # bugs) involved in localization, encoding issues etc.  We only do ASCII here.
9 #export LC_ALL=C
10
11 latest_automake() {
12         for v in "-1.10" "-1.9" "-1.8" "-1.7" "-1.6" "" ; do
13                 if which "automake$v" >/dev/null ; then
14                         echo "$v"
15                         return
16                 fi
17         done
18 }
19
20 ver="`latest_automake`"
21
22 # The VERSION file defines our versioning
23 PQXXVERSION=`./tools/extract_version`
24 echo "libpqxx version $PQXXVERSION"
25
26 # Generate configure.ac based on current version numbers
27 sed -e "s/@PQXXVERSION@/$PQXXVERSION/g" configure.ac.in >configure.ac
28
29 # Generate Windows makefiles (adding carriage returns to make it MS-DOS format)
30 makewinmake() {
31         ./tools/template2mak.py "$1" | sed -e 's/$/\r/' >"$2"
32 }
33
34 if which python >/dev/null ; then
35         # Use templating system to generate various Makefiles
36         ./tools/template2mak.py test/Makefile.am.template test/Makefile.am
37         ./tools/template2mak.py test/unit/Makefile.am.template test/unit/Makefile.am
38         makewinmake win32/vc-libpqxx.mak.template win32/vc-libpqxx.mak
39         makewinmake win32/vc-test.mak.template win32/vc-test.mak
40         makewinmake win32/mingw.mak.template win32/MinGW.mak
41 else
42         echo "Python not available--not generating Visual C++ makefiles."
43 fi
44
45 autoheader
46
47 libtoolize --force --automake --copy
48 aclocal${ver} -I . -I config/m4
49 automake${ver} --verbose --add-missing --copy
50 autoconf
51
52 conf_flags="--enable-maintainer-mode $CONFIG_ARGS"
53 if test -z "$NOCONFIGURE" ; then
54         echo Running $srcdir/configure $conf_flags "$@" ...
55         ./configure $conf_flags "$@" \
56         && echo Now type \`make\' to compile $PKG_NAME || exit 1
57 else
58         echo Skipping configure process.
59 fi
60
Note: See TracBrowser for help on using the browser.