autogen.sh: stop using deprecated gnome-autogen.sh
[platform/upstream/atk.git] / autogen.sh
1 # Run this to generate all the initial makefiles, etc.
2
3 srcdir=`dirname $0`
4 test -z "$srcdir" && srcdir=.
5
6 (test -f $srcdir/configure.ac) || {
7         echo "**Error**: Directory "\`$srcdir\'" does not look like the top-level project directory"
8         exit 1
9 }
10
11 PKG_NAME=`autoconf --trace "AC_INIT:$1" "$srcdir/configure.ac"`
12
13 if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
14         echo "**Warning**: I am going to run \`configure' with no arguments." >&2
15         echo "If you wish to pass any to it, please specify them on the" >&2
16         echo \`$0\'" command line." >&2
17         echo "" >&2
18 fi
19
20 # if the AC_CONFIG_MACRO_DIR() macro is used, create that directory
21 # This is a automake bug fixed in automake 1.13.2
22 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13514
23 m4dir=`autoconf --trace 'AC_CONFIG_MACRO_DIR:$1'`
24 if [ -n "$m4dir" ]; then
25         mkdir -p $m4dir
26 fi
27
28 set -x
29
30 glib-gettextize --force --copy || exit 1
31 gtkdocize --copy || exit 1
32 autoreconf --verbose --force --install -Wno-portability || exit 1
33
34 if [ "$NOCONFIGURE" = "" ]; then
35         $srcdir/configure "$@" || exit 1
36
37         if [ "$1" = "--help" ]; then exit 0 else
38                 echo "Now type \`make\' to compile $PKG_NAME" || exit 1
39         fi
40 else
41         echo "Skipping configure process."
42 fi
43
44 set +x