]> cygwin.com Git - cygwin-apps/setup.git/blame_incremental - bootstrap.sh
Added dpiAwareness element to manifest
[cygwin-apps/setup.git] / bootstrap.sh
... / ...
CommitLineData
1#! /bin/bash
2# Used to setup the configure.in, autoheader and Makefile.in's if configure
3# has not been generated. This script is only needed for developers when
4# configure has not been run, or if a Makefile.am in a non-configured directory
5# has been updated
6
7builddir=`pwd`
8srcdir=`dirname "$0"`
9
10bootstrap() {
11 if "$@"; then
12 true # Everything OK
13 else
14 echo "$1 failed"
15 echo "Autotool bootstrapping failed. You will need to investigate and correct" ;
16 echo "before you can develop on this source tree"
17 exit 1
18 fi
19}
20
21cd "$srcdir"
22
23# Make sure we are running in the right directory
24if [ ! -f main.cc ]; then
25 echo "You must run this script from the directory containing it"
26 exit 1
27fi
28
29if [[ "$1" =~ "--host=" ]]; then
30 host="${1#--host=}"
31elif hash x86_64-w64-mingw32-g++ 2> /dev/null; then
32 host="x86_64-w64-mingw32"
33elif hash i686-w64-mingw32-g++ 2> /dev/null; then
34 host="i686-w64-mingw32"
35else
36 echo "mingw32 or mingw64 target g++ required for building setup"
37 exit 1
38fi
39
40export ACLOCAL_PATH=$($host-g++ --print-sysroot)/mingw/share/aclocal
41
42# Make sure cfgaux exists
43mkdir -p cfgaux
44
45# Bootstrap the autotool subsystems
46echo "bootstrapping in $srcdir"
47bootstrap aclocal
48# bootstrap autoheader
49bootstrap libtoolize --automake
50bootstrap autoconf
51bootstrap automake --foreign --add-missing
52
53# Run bootstrap in required subdirs, iff it has not yet been run
54echo "bootstrapping in $srcdir/libgetopt++"
55cd libgetopt++ && ./bootstrap.sh
56
57if test -n "$NOCONFIGURE"; then
58 echo "Skipping configure per request"
59 exit 0
60fi
61
62cd "$builddir"
63
64build=`$srcdir/cfgaux/config.guess`
65
66echo "running configure"
67$srcdir/configure -C --build=$build --host=$host "$@"
68
69exit $?
This page took 0.022202 seconds and 6 git commands to generate.