removed while porting to Gnome2
[gpiv.git] / macros / autogen.sh
blob18cfd60720c2e08cc275b08362820b281906e4b2
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 DIE=0
6 if [ -n "$GNOME2_PATH" ]; then
7 ACLOCAL_FLAGS="-I $GNOME2_PATH/share/aclocal $ACLOCAL_FLAGS"
8 PATH="$GNOME2_PATH/bin:$PATH"
9 export PATH
12 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
13 echo
14 echo "**Error**: You must have \`autoconf' installed to compile Gnome."
15 echo "Download the appropriate package for your distribution,"
16 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
17 DIE=1
20 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
21 (libtool --version) < /dev/null > /dev/null 2>&1 || {
22 echo
23 echo "**Error**: You must have \`libtool' installed to compile Gnome."
24 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
25 echo "(or a newer version if it is available)"
26 DIE=1
30 grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
31 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
32 (gettext --version) < /dev/null > /dev/null 2>&1 || {
33 echo
34 echo "**Error**: You must have \`gettext' installed to compile Gnome."
35 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
36 echo "(or a newer version if it is available)"
37 DIE=1
41 grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
42 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
43 (gettext --version) < /dev/null > /dev/null 2>&1 || {
44 echo
45 echo "**Error**: You must have \`gettext' installed to compile Gnome."
46 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
47 echo "(or a newer version if it is available)"
48 DIE=1
52 (automake --version) < /dev/null > /dev/null 2>&1 || {
53 echo
54 echo "**Error**: You must have \`automake' installed to compile Gnome."
55 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
56 echo "(or a newer version if it is available)"
57 DIE=1
58 NO_AUTOMAKE=yes
62 # if no automake, don't bother testing for aclocal
63 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
64 echo
65 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
66 echo "installed doesn't appear recent enough."
67 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
68 echo "(or a newer version if it is available)"
69 DIE=1
72 if test "$DIE" -eq 1; then
73 exit 1
76 if test -z "$*"; then
77 echo "**Warning**: I am going to run \`configure' with no arguments."
78 echo "If you wish to pass any to it, please specify them on the"
79 echo \`$0\'" command line."
80 echo
83 case $CC in
84 xlc )
85 am_opt=--include-deps;;
86 esac
88 for coin in `find $srcdir -name configure.in -print`
89 do
90 dr=`dirname $coin`
91 if test -f $dr/NO-AUTO-GEN; then
92 echo skipping $dr -- flagged as no auto-gen
93 else
94 echo processing $dr
95 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
96 ( cd $dr
97 macrosdir=`find . -name macros -print`
98 for i in $macrodirs; do
99 if test -f $i/gnome-gettext.m4; then
100 DELETEFILES="$DELETEFILES $i/gnome-gettext.m4"
102 done
104 echo "deletefiles is $DELETEFILES"
105 aclocalinclude="$ACLOCAL_FLAGS"
106 for k in $aclocalinclude; do
107 if test -d $k; then
108 if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then
109 rm -f $DELETEFILES
112 done
113 for k in $macrodirs; do
114 if test -d $k; then
115 aclocalinclude="$aclocalinclude -I $k"
116 if [ -f $k/gnome.m4 -a "$GNOME_INTERFACE_VERSION" = "1" ]; then
117 rm -f $DELETEFILES
120 done
121 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
122 if grep "sed.*POTFILES" configure.in >/dev/null; then
123 : do nothing -- we still have an old unmodified configure.in
124 else
125 echo "Creating $dr/aclocal.m4 ..."
126 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
127 echo "Running gettextize... Ignore non-fatal messages."
128 echo "no" | gettextize --force --copy
129 echo "Making $dr/aclocal.m4 writable ..."
130 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
133 if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
134 echo "Creating $dr/aclocal.m4 ..."
135 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
136 echo "Running gettextize... Ignore non-fatal messages."
137 echo "no" | gettextize --force --copy
138 echo "Making $dr/aclocal.m4 writable ..."
139 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
141 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
142 if test -z "$NO_LIBTOOLIZE" ; then
143 echo "Running libtoolize..."
144 libtoolize --force --copy
147 echo "Running aclocal $aclocalinclude ..."
148 aclocal $aclocalinclude
149 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
150 echo "Running autoheader..."
151 autoheader
153 echo "Running automake --gnu $am_opt ..."
154 automake --add-missing --gnu $am_opt
155 echo "Running autoconf ..."
156 autoconf
159 done
161 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
163 if test x$NOCONFIGURE = x; then
164 echo Running $srcdir/configure $conf_flags "$@" ...
165 $srcdir/configure $conf_flags "$@" \
166 && echo Now type \`make\' to compile $PKG_NAME || exit 1
167 else
168 echo Skipping configure process.