Clarified that group chunks must have chunks in them
[iffl.git] / configure
blob08ef5b0d572775b249e4eee6c10feb92cd4d70de
1 #! /bin/bash
3 # This file is part of bsconf - a configure replacement.
4 # Copyright (C) 2005 by Mike Sharov <msharov@users.sourceforge.net>
5 # This file is free software, distributed under the MIT License.
7 if [ -z "$CC" ]; then
8 for i in gcc g++ cc c++ c89 c99; do
9 CC=`which $i 2> /dev/null` && break;
10 done;
12 if [ -z "$CC" ]; then
13 echo "No C compiler found" && exit;
16 PSTDDEF=`echo "#include <stddef.h>"|$CC -E -|grep stddef.h|head -n1|cut -d' ' -f3|cut -d\" -f2`
17 PINCDIR=`dirname $PSTDDEF`
18 PLIBDIR=`dirname $PINCDIR`
19 if [ -d $PLIBDIR/lib ]; then
20 PLIBDIR=$PLIBDIR/lib
22 if [ ! -z "$PINCDIR" ]; then
23 PPATHS="$PPATHS --gccincludedir=$PINCDIR"
25 if [ ! -z "$PLIBDIR" ]; then
26 PPATHS="$PPATHS --gcclibdir=$PLIBDIR"
28 if [ ! -x bsconf -o bsconf.c -nt bsconf -o bsconf.h -nt bsconf ]; then
29 $CC -o bsconf bsconf.c
31 if [ -x bsconf ]; then
32 ./bsconf $PPATHS $*;
33 else
34 echo "Configurator build failed";