Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 151 lines (135 sloc) 4.673 kB
f64da64 Steven Johnson's build scripts.
andyv authored
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3 # Adapted from Gnome and Glade.
4
5 srcdir=`dirname $0`
6 test -z "$srcdir" && srcdir=.
7 PKG_NAME="g95"
8
9 DIE=0
10
11 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
12 echo
13 echo "**Error**: You must have \`autoconf' installed to compile ${PKG_NAME}."
14 echo "Download the appropriate package for your distribution,"
15 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
16 DIE=1
17 }
18
19 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
20 (libtool --version) < /dev/null > /dev/null 2>&1 || {
21 echo
22 echo "**Error**: You must have \`libtool' installed to compile ${PKG_NAME}."
23 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
24 echo "(or a newer version if it is available)"
25 DIE=1
26 }
27 }
28
29 grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
30 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
31 (gettext --version) < /dev/null > /dev/null 2>&1 || {
32 echo
33 echo "**Error**: You must have \`gettext' installed to compile ${PKG_NAME}."
34 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
35 echo "(or a newer version if it is available)"
36 DIE=1
37 }
38 }
39
40 grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
41 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
42 (gettext --version) < /dev/null > /dev/null 2>&1 || {
43 echo
44 echo "**Error**: You must have \`gettext' installed to compile ${PKG_NAME}."
45 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
46 echo "(or a newer version if it is available)"
47 DIE=1
48 }
49 }
50
51 (automake --version) < /dev/null > /dev/null 2>&1 || {
52 echo
53 echo "**Error**: You must have \`automake' installed to compile ${PKG_NAME}."
54 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
55 echo "(or a newer version if it is available)"
56 DIE=1
57 NO_AUTOMAKE=yes
58 }
59
60
61 # if no automake, don't bother testing for aclocal
62 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
63 echo
64 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
65 echo "installed doesn't appear recent enough."
66 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
67 echo "(or a newer version if it is available)"
68 DIE=1
69 }
70
71 if test "$DIE" -eq 1; then
72 exit 1
73 fi
74
75 if test -z "$*"; then
76 echo "**Warning**: I am going to run \`configure' with no arguments."
77 echo "If you wish to pass any to it, please specify them on the"
78 echo \`$0\'" command line."
79 echo
80 fi
81
82 case $CC in
83 xlc )
84 am_opt=--include-deps;;
85 esac
86
87 for coin in `find $srcdir -name configure.in -print`
88 do
89 dr=`dirname $coin`
90 if test -f $dr/NO-AUTO-GEN; then
91 echo skipping $dr -- flagged as no auto-gen
92 else
93 echo processing $dr
94 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
95 ( cd $dr
96 aclocalinclude="$ACLOCAL_FLAGS"
97 for k in $macrodirs; do
98 if test -d $k; then
99 aclocalinclude="$aclocalinclude -I $k"
100 ##else
101 ## echo "**Warning**: No such directory \`$k'. Ignored."
102 fi
103 done
104 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
105 if grep "sed.*POTFILES" configure.in >/dev/null; then
106 : do nothing -- we still have an old unmodified configure.in
107 else
108 echo "Creating $dr/aclocal.m4 ..."
109 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
110 echo "Running gettextize... Ignore non-fatal messages."
111 echo "no" | gettextize --force --copy
112 echo "Making $dr/aclocal.m4 writable ..."
113 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
114 fi
115 fi
116 if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
117 echo "Creating $dr/aclocal.m4 ..."
118 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
119 echo "Running gettextize... Ignore non-fatal messages."
120 echo "no" | gettextize --force --copy
121 echo "Making $dr/aclocal.m4 writable ..."
122 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
123 fi
124 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
125 echo "Running libtoolize..."
126 libtoolize --force --copy
127 fi
128 echo "Running aclocal $aclocalinclude ..."
129 aclocal $aclocalinclude
130 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
131 echo "Running autoheader..."
132 autoheader
133 fi
134 echo "Running automake --gnu $am_opt ..."
135 automake --add-missing --gnu $am_opt
136 echo "Running autoconf ..."
137 autoconf
138 )
139 fi
140 done
141
142 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
143
144 if test x$NOCONFIGURE = x; then
145 echo Running $srcdir/configure $conf_flags "$@" ...
146 $srcdir/configure $conf_flags "$@" \
147 && echo Now type \`make\' to compile $PKG_NAME || exit 1
148 else
149 echo Skipping configure process.
150 fi
Something went wrong with that request. Please try again.