Added file which was being "recommended" by running make distdir
[geda-gaf/whiteaudio.git] / utils / autogen.sh
blobd94ffc36e034be39230b9a5bc842079891201060
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 # This file came from glade-2.0.0 with modifications for gEDA/gaf.
5 # Ales Hvezda 11/09/2003
7 srcdir=`dirname $0`
8 test -z "$srcdir" && srcdir=.
9 configure_script=configure.ac
11 DIE=0
13 (test -f $srcdir/$configure_script) || {
14 echo -n "**Error**: Directory [ $srcdir ] does not look like the"
15 echo " top-level package directory"
16 exit 1
19 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
20 echo
21 echo "**Error**: You must have \`autoconf' installed."
22 echo "Download the appropriate package for your distribution,"
23 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
24 DIE=1
27 (grep "^AM_PROG_LIBTOOL" $srcdir/$configure_script >/dev/null) && {
28 (libtool --version) < /dev/null > /dev/null 2>&1 || {
29 echo
30 echo "**Error**: You must have \`libtool' installed."
31 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
32 DIE=1
36 (grep "^AM_GNU_GETTEXT" $srcdir/$configure_script >/dev/null) && {
37 (grep "sed.*POTFILES" $srcdir/$configure_script) > /dev/null || \
38 (autopoint --version) < /dev/null > /dev/null 2>&1 || {
39 echo
40 echo "**Error**: You must have \`gettext' installed."
41 echo "You can get it from: http://www.gnu.org/software/gettext"
42 DIE=1
46 (automake --version) < /dev/null > /dev/null 2>&1 || {
47 echo
48 echo "**Error**: You must have \`automake' installed."
49 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
50 DIE=1
51 NO_AUTOMAKE=yes
55 # if no automake, don't bother testing for aclocal
56 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
57 echo
58 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
59 echo "installed doesn't appear recent enough."
60 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
61 DIE=1
64 if test "$DIE" -eq 1; then
65 exit 1
68 # Don't run configure automatically.
69 #if test -z "$*"; then
70 # echo "**Warning**: I am going to run \`configure' with no arguments."
71 # echo "If you wish to pass any to it, please specify them on the"
72 # echo \`$0\'" command line."
73 # echo
74 #fi
76 case $CC in
77 xlc )
78 am_opt=--include-deps;;
79 esac
81 for coin in $srcdir/$configure_script
82 do
83 dr=`dirname $coin`
84 if test -f $dr/NO-AUTO-GEN; then
85 echo skipping $dr -- flagged as no auto-gen
86 else
87 echo processing $dr
88 ( cd $dr
90 aclocalinclude="$ACLOCAL_FLAGS"
92 if grep "^AM_GNU_GETTEXT" $configure_script >/dev/null; then
93 echo "autogen.sh running: autopoint ..."
94 echo "no" | autopoint --force
95 #echo "Creating $dr/po/Makevars ..."
96 #mv -f $dr/po/Makevars.template $dr/po/Makevars
98 if grep "^IT_PROG_INTLTOOL" $configure_script >/dev/null; then
99 echo "autogen.sh running: intltoolize ..."
100 echo "no" | intltoolize --force --copy --automake
102 if grep "^AM_PROG_LIBTOOL" $configure_script >/dev/null; then
103 if test -z "$NO_LIBTOOLIZE" ; then
104 echo "autogen.sh running: libtoolize ..."
105 libtoolize --force --copy
108 echo "autogen.sh running: aclocal $aclocalinclude ..."
109 aclocal $aclocalinclude
110 if grep "^AM_CONFIG_HEADER" $configure_script >/dev/null; then
111 echo "autogen.sh running: autoheader ..."
112 autoheader
114 echo "autogen.sh running: automake $am_opt ..."
115 automake --copy --add-missing --gnu $am_opt
116 echo "autogen.sh running: autoconf ..."
117 autoconf
120 done
123 # Don't run configure.
124 #conf_flags="--enable-maintainer-mode"
126 #if test x$NOCONFIGURE = x; then
127 # echo Running $srcdir/configure $conf_flags "$@" ...
128 # $srcdir/configure $conf_flags "$@" \
129 # && echo Now type \`make\' to compile. || exit 1
130 #else
131 # echo Skipping configure process.