Add project status to readme
[ltt-control.git] / 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.in) || {
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 (grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && {
24 (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
25 echo
26 echo "**Error**: You must have \`intltool' installed."
27 echo "You can get it from:"
28 echo " ftp://ftp.gnome.org/pub/GNOME/"
29 DIE=1
30 }
31 }
32
33 (grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && {
34 (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
35 echo
36 echo "**Error**: You must have \`xml-i18n-toolize' installed."
37 echo "You can get it from:"
38 echo " ftp://ftp.gnome.org/pub/GNOME/"
39 DIE=1
40 }
41 }
42
43 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
44 (libtool --version) < /dev/null > /dev/null 2>&1 || {
45 echo
46 echo "**Error**: You must have \`libtool' installed."
47 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
48 DIE=1
49 }
50 }
51
52 (grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && {
53 (grep "sed.*POTFILES" $srcdir/configure.in) > /dev/null || \
54 (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
55 echo
56 echo "**Error**: You must have \`glib' installed."
57 echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
58 DIE=1
59 }
60 }
61
62 (automake --version) < /dev/null > /dev/null 2>&1 || {
63 echo
64 echo "**Error**: You must have \`automake' installed."
65 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
66 DIE=1
67 NO_AUTOMAKE=yes
68 }
69
70
71 # if no automake, don't bother testing for aclocal
72 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
73 echo
74 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
75 echo "installed doesn't appear recent enough."
76 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
77 DIE=1
78 }
79
80 if test "$DIE" -eq 1; then
81 exit 1
82 fi
83
84 if test -z "$*"; then
85 echo "**Warning**: I am going to run \`configure' with no arguments."
86 echo "If you wish to pass any to it, please specify them on the"
87 echo \`$0\'" command line."
88 echo
89 fi
90
91 case $CC in
92 xlc )
93 am_opt=--include-deps;;
94 esac
95
96 for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.in -print`
97 do
98 dr=`dirname $coin`
99 if test -f $dr/NO-AUTO-GEN; then
100 echo skipping $dr -- flagged as no auto-gen
101 else
102 echo processing $dr
103 ( cd $dr
104
105 aclocalinclude="$ACLOCAL_FLAGS"
106
107 if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
108 echo "Creating $dr/aclocal.m4 ..."
109 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
110 echo "Running glib-gettextize... Ignore non-fatal messages."
111 echo "no" | glib-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 if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
116 echo "Running intltoolize..."
117 intltoolize --copy --force --automake
118 fi
119 if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then
120 echo "Running xml-i18n-toolize..."
121 xml-i18n-toolize --copy --force --automake
122 fi
123 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
124 if test -z "$NO_LIBTOOLIZE" ; then
125 echo "Running libtoolize..."
126 libtoolize --force --copy
127 fi
128 fi
129 echo "Running aclocal $aclocalinclude ..."
130 aclocal $aclocalinclude
131 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
132 echo "Running autoheader..."
133 autoheader
134 fi
135 echo "Running automake --gnu $am_opt ..."
136 automake --add-missing --gnu $am_opt
137 echo "Running autoconf ..."
138 autoconf
139 )
140 fi
141 done
142
143 conf_flags="--enable-maintainer-mode"
144
145
146 #if [ -a "$srcdir/include" ]; then
147 # echo -n Removing old system include behavior emulation...
148 # rm -rf $srcdir/include
149 # echo done.
150 #fi
151 #echo -n Creating the system include behavior emulation...
152 #mkdir $srcdir/include
153 #mkdir $srcdir/include/ltt
154 #ln -sf ../../LibLTT/ltt.h $srcdir/include/ltt/ltt.h
155 #mkdir $srcdir/include/lttv
156 #ln -sf ../../lttv/module.h $srcdir/include/lttv/module.h
157 #ln -sf ../../lttv/hook.h $srcdir/include/lttv/hook.h
158 #ln -sf ../../lttv/traceWindow.h $srcdir/include/lttv/traceWindow.h
159 #echo done.
160
161
162
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. || exit 1
167 else
168 echo Skipping configure process.
169 fi
This page took 0.032191 seconds and 4 git commands to generate.