codecanalyzer: remove
[platform/upstream/gstreamer.git] / validate / autogen.sh
1 #!/bin/sh
2 #
3 # gst-validate autogen.sh
4 #
5 # Run this to generate all the initial makefiles, etc.
6 #
7 # This file has been generated from common/autogen.sh.in via common/update-autogen
8
9
10 test -n "$srcdir" || srcdir=`dirname "$0"`
11 test -n "$srcdir" || srcdir=.
12
13 olddir=`pwd`
14 cd "$srcdir"
15
16 DIE=0
17 package=gst-validate
18 srcfile=gst-validate.doap
19
20 # Make sure we have common
21 cd ../
22 if test ! -f validate/common/gst-autogen.sh;
23 then
24   echo "+ Setting up common submodule"
25   git submodule init
26 fi
27 git submodule update
28 cd validate/
29
30 # source helper functions
31 if test ! -f common/gst-autogen.sh;
32 then
33   echo There is something wrong with your source tree.
34   echo You are missing common/gst-autogen.sh
35   exit 1
36 fi
37 . common/gst-autogen.sh
38
39 # install pre-commit hook for doing clean commits
40 if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \);
41 then
42     rm -f ../.git/hooks/pre-commit
43     ln -s ../../validate/multi-pre-commit.hook ../.git/hooks/pre-commit
44 fi
45
46 # GNU gettext automake support doesn't get along with git.
47 # https://bugzilla.gnome.org/show_bug.cgi?id=661128
48 if test -d po ; then
49   touch -t 200001010000 po/gst-validate-1.0.pot
50 fi
51
52 CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
53
54 if test "x$package" = "xgstreamer"; then
55   CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --enable-docbook --enable-failing-tests --enable-poisoning"
56 fi
57
58 autogen_options $@
59
60 printf "+ check for build tools"
61 if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else  echo; fi
62 version_check "autoreconf" "autoreconf " \
63               "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 68 || DIE=1
64 version_check "pkg-config" "" \
65               "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
66
67 die_check $DIE
68
69 # if no arguments specified then this will be printed
70 if test -z "$*" && test -z "$NOCONFIGURE"; then
71   echo "+ checking for autogen.sh options"
72   echo "  This autogen script will automatically run ./configure as:"
73   echo "  ./configure $CONFIGURE_DEF_OPT"
74   echo "  To pass any additional options, please specify them on the $0"
75   echo "  command line."
76 fi
77
78 toplevel_check $srcfile
79
80 # autopoint
81 if test -d po ; then
82   tool_run "autopoint" "--force"
83 fi
84
85 # aclocal
86 if test -f acinclude.m4; then rm acinclude.m4; fi
87
88 autoreconf --force --install || exit 1
89
90 test -n "$NOCONFIGURE" && {
91   echo "+ skipping configure stage for package $package, as requested."
92   echo "+ autogen.sh done."
93   exit 0
94 }
95
96 cd "$olddir"
97
98 echo "+ running configure ... "
99 test ! -z "$CONFIGURE_DEF_OPT" && echo "  default flags:  $CONFIGURE_DEF_OPT"
100 test ! -z "$CONFIGURE_EXT_OPT" && echo "  external flags: $CONFIGURE_EXT_OPT"
101 echo
102
103 echo "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT
104 "$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT || {
105         echo "  configure failed"
106         exit 1
107 }
108
109 echo "Now type 'make' to compile $package."