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