Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 102 lines (84 sloc) 2.746 kb
8cb2cf0 @eht16 Initial import
eht16 authored
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 srcdir=`dirname $0`
5 test -z "$srcdir" && srcdir=.
6
7 DIE=0
8
c07d448 @eht16 Rename configure.in to configure.ac.
eht16 authored
9 (test -f $srcdir/configure.ac) || {
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
10 echo "**Error**: Directory "\`$srcdir\'" does not look like the top-level package directory"
11 exit 1
8cb2cf0 @eht16 Initial import
eht16 authored
12 }
13
14 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
15 echo
16 echo "**Error**: You must have \`autoconf' installed."
17 echo "Download the appropriate package for your distribution,"
18 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
19 DIE=1
8cb2cf0 @eht16 Initial import
eht16 authored
20 }
21
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
22 (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
23 echo
24 echo "**Error**: You must have \`intltool' installed."
25 echo "You can get it from:"
26 echo " ftp://ftp.gnome.org/pub/GNOME/"
27 DIE=1
8cb2cf0 @eht16 Initial import
eht16 authored
28 }
29
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
30 (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
31 echo
32 echo "**Error**: You must have \`glib' installed."
33 echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
34 DIE=1
8cb2cf0 @eht16 Initial import
eht16 authored
35 }
36
2d6b0f8 @eht16 Add a check for 'libtoolize' (suggested by Greg Smith, thanks).
eht16 authored
37 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
38 (glibtoolize --version) < /dev/null > /dev/null 2>&1 || {
39 echo
40 echo "**Error**: You must have \`libtool' installed."
41 echo "You can get it from:"
42 echo " http://www.gnu.org/software/libtool/"
43 DIE=1
44 }
45 }
46
e5dc587 @frlan Applying a patch by Erik de Castro Lopo for checking against pkg-config ...
frlan authored
47 (pkg-config --version) < /dev/null > /dev/null 2>&1 || {
48 echo
49 echo "You must have pkg-config installed to compile $package."
50 echo "Download the appropriate package for your distribution."
51 result="no"
52 DIE=1
53 }
54
8cb2cf0 @eht16 Initial import
eht16 authored
55 (automake --version) < /dev/null > /dev/null 2>&1 || {
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
56 echo
84b5a63 @eht16 Require automake 1.7 or later.
eht16 authored
57 echo "**Error**: You must have \`automake' (1.7 or later) installed."
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
58 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
59 DIE=1
60 NO_AUTOMAKE=yes
8cb2cf0 @eht16 Initial import
eht16 authored
61 }
62
63
64 # if no automake, don't bother testing for aclocal
65 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
66 echo
67 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
68 echo "installed doesn't appear recent enough."
69 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
70 DIE=1
8cb2cf0 @eht16 Initial import
eht16 authored
71 }
72
73 if test "$DIE" -eq 1; then
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
74 exit 1
8cb2cf0 @eht16 Initial import
eht16 authored
75 fi
76
0249d3e @eht16 Don't warn about missing configure flags if configure shall be skipped
eht16 authored
77 if test -z "$*" -a "$NOCONFIGURE" != 1; then
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
78 echo "**Warning**: I am going to run \`configure' with no arguments."
79 echo "If you wish to pass any to it, please specify them on the"
80 echo \`$0\'" command line."
81 echo
8cb2cf0 @eht16 Initial import
eht16 authored
82 fi
83
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
84 echo "Processing configure.ac"
8cb2cf0 @eht16 Initial import
eht16 authored
85
4dd7092 @b4n Modernize configure.ac a bit
b4n authored
86 test -d build-aux || mkdir build-aux
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
87 echo "no" | glib-gettextize --force --copy
88 intltoolize --copy --force --automake
89 libtoolize --copy --force || glibtoolize --copy --force
680064b @b4n Move configure logic that checks for SVN revision to its own file
b4n authored
90 aclocal -I m4
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
91 autoheader
92 automake --add-missing --copy --gnu
93 autoconf
8cb2cf0 @eht16 Initial import
eht16 authored
94
1410403 @eht16 Allow skipping configure during autogen by setting NOCONFIGURE=1 (thanks...
eht16 authored
95 if [ "$NOCONFIGURE" = 1 ]; then
96 echo "Done. configure skipped."
97 exit 0;
98 fi
7f6d032 @eht16 Cleanup. Remove unnecessary checks and code.
eht16 authored
99 echo "Running $srcdir/configure $@ ..."
100 $srcdir/configure "$@" && echo "Now type 'make' to compile." || exit 1
8cb2cf0 @eht16 Initial import
eht16 authored
101
Something went wrong with that request. Please try again.