resources/RooUsage.txt
[app.Builder.js] / autogen.sh
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
9 (test -f $srcdir/configure.ac) || {
10     echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
11     echo " top-level package directory"
12     exit 1
13 }
14
15 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
16   echo
17   echo "**Error**: You must have \`autoconf' installed."
18   echo "Download the appropriate package for your distribution,"
19   echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
20   DIE=1
21 }
22
23 #?? needed??
24 (grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
25   (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
26     echo 
27     echo "**Error**: You must have \`intltool' installed."
28     echo "You can get it from:"
29     echo "  ftp://ftp.gnome.org/pub/GNOME/"
30     DIE=1
31   }
32 }
33  
34
35 (grep "^LT_INIT" $srcdir/configure.ac >/dev/null) && {
36   (libtool --version) < /dev/null > /dev/null 2>&1 || {
37     echo
38     echo "**Error**: You must have \`libtool' installed."
39     echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
40     DIE=1
41   }
42 }
43  
44 (automake --version) < /dev/null > /dev/null 2>&1 || {
45   echo
46   echo "**Error**: You must have \`automake' installed."
47   echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
48   DIE=1
49   NO_AUTOMAKE=yes
50 }
51
52
53 # if no automake, don't bother testing for aclocal
54 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
55   echo
56   echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
57   echo "installed doesn't appear recent enough."
58   echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
59   DIE=1
60 }
61
62 if test "$DIE" -eq 1; then
63   exit 1
64 fi
65
66 if test -z "$*"; then
67   echo "**Warning**: I am going to run \`configure' with no arguments."
68   echo "If you wish to pass any to it, please specify them on the"
69   echo \`$0\'" command line."
70   echo
71 fi
72
73 case $CC in
74 xlc )
75   am_opt=--include-deps;;
76 esac
77
78
79 dr=$srcdir
80 if test -f $dr/NO-AUTO-GEN; then
81     echo skipping $dr -- flagged as no auto-gen
82 else
83     echo processing $dr
84     ( cd $dr
85     
86       aclocalinclude="$ACLOCAL_FLAGS"
87     
88         if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
89           echo "Creating $dr/aclocal.m4 ..."
90           test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
91           
92           echo "Making $dr/aclocal.m4 writable ..."
93           test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
94         fi
95         
96         #  if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then
97         #    echo "Running intltoolize..."
98         #intltoolize --copy --force --automake
99         #  fi
100         #
101         if grep "^LT_INIT" configure.ac >/dev/null; then
102             if test -z "$NO_LIBTOOLIZE" ; then 
103               echo "Running libtoolize..."
104               libtoolize --force --copy
105             fi
106         fi
107         echo "Running aclocal $aclocalinclude ..."
108         aclocal $aclocalinclude
109         if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then
110             echo "Running autoheader..."
111             autoheader
112         fi
113         echo "Running automake  $am_opt ..."
114         automake --add-missing --copy  $am_opt
115         echo "Running autoconf ..."
116         autoconf
117     )
118 fi
119  
120
121 if test x$NOCONFIGURE = x; then
122   echo Running $srcdir/configure "$@" ...
123   $srcdir/configure "$@" \
124   && echo Now type \`make\' to compile. || exit 1
125 else
126   echo Skipping configure process.
127 fi