1 | #!/bin/sh
|
2 | #
|
3 | # This shell script sets up the software to be built using 'make'. In
|
4 | # order to perform a build from a fresh source tree, do the following:
|
5 | #
|
6 | # 1. ./build-setup
|
7 | # 2. make
|
8 | #
|
9 | # If you don't want ./configure to be run automatically, you can do
|
10 | # the following: ./build-setup -s
|
11 |
|
12 | # Process command line options
|
13 | SKIP_CONFIGURE=0
|
14 | for arg in "$*"
|
15 | do
|
16 | case $arg in
|
17 | "-s" | "--setup-only" ) SKIP_CONFIGURE=1 ;;
|
18 | esac
|
19 | done
|
20 |
|
21 | # Check and add potential aclocal dirs
|
22 | MAYBE_AC_DIRS="
|
23 | /usr/local/share/aclocal
|
24 | /opt/local/share/aclocal
|
25 | /sw/share/aclocal
|
26 | "
|
27 | ACDIRS="-I m4"
|
28 | for dir in $MAYBE_AC_DIRS; do
|
29 | if test -d $dir; then
|
30 | ACDIRS="$ACDIRS -I $dir"
|
31 | fi
|
32 | done
|
33 |
|
34 | # Run aclocal on the set of local ac scripts
|
35 | cd setup
|
36 | aclocal $ACDIRS
|
37 | # Generate the configure script
|
38 | autoconf && mv configure ..
|
39 | cd ..
|
40 |
|
41 | # Run the configure script if "-s" isn't a command line option
|
42 | if [ $SKIP_CONFIGURE -eq 0 ]; then
|
43 | # Run the configure script in default development mode
|
44 | ./configure $*
|
45 | fi
|
46 |
|