hardware/intel/libva
Revision | babe42305fba10f1df8f3abef2d7ec0fe88406b5 (tree) |
---|---|
Zeit | 2012-09-28 16:55:47 |
Autor | Gwenole Beauchesne <gwenole.beauchesne@inte...> |
Commiter | Gwenole Beauchesne |
autogen: modernize configure script generator.
Make it possible to run autogen.sh from a different location from the
original source directory. Make execution of the configure' script
optional. i.e. don't run it by default if NO_CONFIGURE variable is set.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
@@ -1,3 +1,4 @@ | ||
1 | +#!/bin/sh | |
1 | 2 | # Copyright (c) 2007 Intel Corporation. All Rights Reserved. |
2 | 3 | # |
3 | 4 | # Permission is hereby granted, free of charge, to any person obtaining a |
@@ -20,6 +21,31 @@ | ||
20 | 21 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
21 | 22 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
22 | 23 | |
23 | -#! /bin/sh | |
24 | -autoreconf -v --install | |
25 | -./configure "$@" | |
24 | +PROJECT="libva" | |
25 | + | |
26 | +test -n "$srcdir" || srcdir="`dirname \"$0\"`" | |
27 | +test -n "$srcdir" || srcdir=. | |
28 | + | |
29 | +if ! test -f "$srcdir/configure.ac"; then | |
30 | + echo "Failed to find the top-level $PROJECT directory" | |
31 | + exit 1 | |
32 | +fi | |
33 | + | |
34 | +olddir="`pwd`" | |
35 | +cd "$srcdir" | |
36 | + | |
37 | +mkdir -p m4 | |
38 | + | |
39 | +AUTORECONF=`which autoreconf` | |
40 | +if test -z $AUTORECONF; then | |
41 | + echo "*** No autoreconf found ***" | |
42 | + exit 1 | |
43 | +else | |
44 | + autoreconf -v --install || exit $? | |
45 | +fi | |
46 | + | |
47 | +cd "$olddir" | |
48 | + | |
49 | +if test -z "$NO_CONFIGURE"; then | |
50 | + $srcdir/configure "$@" && echo "Now type 'make' to compile $PROJECT." | |
51 | +fi |