xref: /aosp_15_r20/external/libva/autogen.sh (revision 54e60f844a168e9a219354de272cd517ee8cd4b7)
1*54e60f84SAndroid Build Coastguard Worker#!/bin/sh
2*54e60f84SAndroid Build Coastguard Worker# Copyright (c) 2007 Intel Corporation. All Rights Reserved.
3*54e60f84SAndroid Build Coastguard Worker#
4*54e60f84SAndroid Build Coastguard Worker# Permission is hereby granted, free of charge, to any person obtaining a
5*54e60f84SAndroid Build Coastguard Worker# copy of this software and associated documentation files (the
6*54e60f84SAndroid Build Coastguard Worker# "Software"), to deal in the Software without restriction, including
7*54e60f84SAndroid Build Coastguard Worker# without limitation the rights to use, copy, modify, merge, publish,
8*54e60f84SAndroid Build Coastguard Worker# distribute, sub license, and/or sell copies of the Software, and to
9*54e60f84SAndroid Build Coastguard Worker# permit persons to whom the Software is furnished to do so, subject to
10*54e60f84SAndroid Build Coastguard Worker# the following conditions:
11*54e60f84SAndroid Build Coastguard Worker#
12*54e60f84SAndroid Build Coastguard Worker# The above copyright notice and this permission notice (including the
13*54e60f84SAndroid Build Coastguard Worker# next paragraph) shall be included in all copies or substantial portions
14*54e60f84SAndroid Build Coastguard Worker# of the Software.
15*54e60f84SAndroid Build Coastguard Worker#
16*54e60f84SAndroid Build Coastguard Worker# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17*54e60f84SAndroid Build Coastguard Worker# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18*54e60f84SAndroid Build Coastguard Worker# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19*54e60f84SAndroid Build Coastguard Worker# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20*54e60f84SAndroid Build Coastguard Worker# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21*54e60f84SAndroid Build Coastguard Worker# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22*54e60f84SAndroid Build Coastguard Worker# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23*54e60f84SAndroid Build Coastguard Worker
24*54e60f84SAndroid Build Coastguard WorkerPROJECT="libva"
25*54e60f84SAndroid Build Coastguard Worker
26*54e60f84SAndroid Build Coastguard Worker# for `meson dist`
27*54e60f84SAndroid Build Coastguard Workerif test -z "$srcdir"; then
28*54e60f84SAndroid Build Coastguard Worker    srcdir="$MESON_PROJECT_DIST_ROOT"
29*54e60f84SAndroid Build Coastguard Worker    test -n "$srcdir" || srcdir="$MESON_DIST_ROOT"
30*54e60f84SAndroid Build Coastguard Worker    test -n "$srcdir" && NOCONFIGURE=1
31*54e60f84SAndroid Build Coastguard Workerfi
32*54e60f84SAndroid Build Coastguard Worker
33*54e60f84SAndroid Build Coastguard Workertest -n "$srcdir" || srcdir="`dirname \"$0\"`"
34*54e60f84SAndroid Build Coastguard Workertest -n "$srcdir" || srcdir=.
35*54e60f84SAndroid Build Coastguard Worker
36*54e60f84SAndroid Build Coastguard Workerif ! test -f "$srcdir/configure.ac"; then
37*54e60f84SAndroid Build Coastguard Worker    echo "Failed to find the top-level $PROJECT directory"
38*54e60f84SAndroid Build Coastguard Worker    exit 1
39*54e60f84SAndroid Build Coastguard Workerfi
40*54e60f84SAndroid Build Coastguard Worker
41*54e60f84SAndroid Build Coastguard Workerolddir="`pwd`"
42*54e60f84SAndroid Build Coastguard Workercd "$srcdir"
43*54e60f84SAndroid Build Coastguard Worker
44*54e60f84SAndroid Build Coastguard Workermkdir -p m4
45*54e60f84SAndroid Build Coastguard Worker
46*54e60f84SAndroid Build Coastguard WorkerAUTORECONF=`command -v autoreconf`
47*54e60f84SAndroid Build Coastguard Workerif test -z $AUTORECONF; then
48*54e60f84SAndroid Build Coastguard Worker    echo "*** No autoreconf found ***"
49*54e60f84SAndroid Build Coastguard Worker    exit 1
50*54e60f84SAndroid Build Coastguard Workerelse
51*54e60f84SAndroid Build Coastguard Worker    autoreconf -v --install || exit $?
52*54e60f84SAndroid Build Coastguard Workerfi
53*54e60f84SAndroid Build Coastguard Worker
54*54e60f84SAndroid Build Coastguard Workercd "$olddir"
55*54e60f84SAndroid Build Coastguard Worker
56*54e60f84SAndroid Build Coastguard Workerif test -z "$NOCONFIGURE"; then
57*54e60f84SAndroid Build Coastguard Worker    $srcdir/configure "$@" && echo "Now type 'make' to compile $PROJECT."
58*54e60f84SAndroid Build Coastguard Workerfi
59