]> cygwin.com Git - cygwin-apps/setup.git/blame - bootstrap.sh
* main.cc (WinMain): Move call to nt_sec.setDefaultSecurity here so
[cygwin-apps/setup.git] / bootstrap.sh
CommitLineData
f6100b6f
RC
1#! /bin/sh
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
2d598be1
YS
7builddir=`pwd`
8srcdir=`dirname "$0"`
f6100b6f
RC
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
2d598be1
YS
21cd "$srcdir"
22
56c60dcc
MB
23# Make sure we are running in the right directory
24if [ ! -f cygpackage.cc ]; then
25 echo "You must run this script from the directory containing it"
26 exit 1
27fi
28
56c60dcc 29
f6100b6f
RC
30# Make sure cfgaux exists
31mkdir -p cfgaux
32
33# Bootstrap the autotool subsystems
2d598be1 34echo "bootstrapping in $srcdir"
f6100b6f
RC
35bootstrap aclocal
36# bootstrap autoheader
6908b7d7 37bootstrap libtoolize --automake
f6100b6f
RC
38bootstrap autoconf
39bootstrap automake --foreign --add-missing
40
644ca185 41# Run bootstrap in required subdirs, iff it has not yet been run
2d598be1 42echo "bootstrapping in $srcdir/libgetopt++"
644ca185
CF
43cd libgetopt++; ./bootstrap.sh
44
2d598be1
YS
45if test -n "$NOCONFIGURE"; then
46 echo "Skipping configure per request"
47 exit 0
48fi
49
50cd "$builddir"
51
52build=`$srcdir/cfgaux/config.guess`
53host="i686-pc-mingw32"
54
55if hash $host-g++ 2> /dev/null; then
56 CC="$host-gcc"
57 CXX="$host-g++"
58else
59 CC="gcc-3 -mno-cygwin"
60 CXX="g++-3 -mno-cygwin"
61fi
62
63echo "running configure"
64$srcdir/configure -C --enable-maintainer-mode \
65 --build=$build --host=$host CC="$CC" CXX="$CXX" \
66 "$@"
67
68exit $?
This page took 0.044886 seconds and 5 git commands to generate.