summarylogtreecommitdiffstats
path: root/mingw-configure.sh
blob: fabde2d41b9f322c0bfdd2358a396723158395ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

# check if last arg is a path to configure, else use parent
for last; do true; done
if test -x "${last}/configure"
then
  config_path="$last"
else
  config_path=".."
fi

export CC=/usr/bin/@TRIPLE@-cc
export CXX=/usr/bin/@TRIPLE@-c++
mingw_c_flags="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4"
LDFLAGS=""
export CFLAGS="$mingw_c_flags $CFLAGS"
export CXXFLAGS="$mingw_c_flags $CXXFLAGS"
${config_path}/configure --host=@TRIPLE@ --target=@TRIPLE@ --build="$CHOST" \
  --prefix=/usr/@TRIPLE@ --libdir=/usr/@TRIPLE@/lib --includedir=/usr/@TRIPLE@/include \
  --enable-shared --enable-static "$@"