-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·38 lines (30 loc) · 909 Bytes
/
autogen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
autogen_CMDLINE="$autogen_CMDLINE --prefix=$HOME/system/"
CFLAGS="-I$HOME/system/include $CFLAGS"
CPPFLAGS="-I$HOME/system/include $CPPFLAGS"
LDFLAGS="-L$HOME/system/lib $LDFLAGS"
for param in $@; do
case $param in
windows)
autogen_CMDLINE="$autogen_CMDLINE --build=i686-pc-mingw32 "
#we add -lgdi32 -lcomdlg32 which are added when gcc is run with the
# -mwindows parameter. We don't use -mwindows flag because we want
# to build a console application
export LDFLAGS="-L`pwd`/lib/i686-pc-mingw32 -lgdi32 -lcomdlg32"
;;
*)
;;
esac
done
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
echo "running: aclocal"
aclocal
echo "running: automake --add-missing"
automake --add-missing
echo "running: autoheader"
autoheader
echo "running: autoconf"
autoconf
echo "running: $srcdir/configure $*"
$srcdir/configure $*