Changeset f60079b for configure


Ignore:
Timestamp:
2010-05-25T22:26:54Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
4af3050
Parents:
51a799e
Message:

Allow one to run the configure script from a different directory and put all
build files in there. I need this to properly make Debian package variants
(i.e. libpurple and native).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r51a799e rf60079b  
    124124EOF
    125125
     126srcdir="$(dirname $0)"
     127if [ "$srcdir" != "." ]; then
     128        echo
     129        echo "configure script run from a different directory. Will create some symlinks..."
     130        if [ ! -e Makefile -o -L Makefile ]; then
     131                mkdir -p $(cd "$srcdir"; find . -type d)
     132                find . -name Makefile -type l -print0 | xargs -0 rm 2> /dev/null
     133                dst="$PWD"
     134                cd "$srcdir"
     135                for i in $(find . -name Makefile); do
     136                        ln -s "$PWD${i#.}" "$dst/$i";
     137                done
     138                cd "$dst"
     139                rm -rf .bzr
     140        fi
     141       
     142        echo "SRCDIR=$srcdir/" >> Makefile.settings
     143        CFLAGS="$CFLAGS -I${dst}"
     144else
     145        srcdir=$PWD
     146fi
     147
    126148cat<<EOF>config.h
    127149/* BitlBee settings, generated by configure
     
    161183
    162184echo CFLAGS=$CFLAGS >> Makefile.settings
    163 echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings
     185echo CFLAGS+=-I${srcdir} -I${srcdir}/lib -I${srcdir}/protocols -I. >> Makefile.settings
    164186
    165187echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings
Note: See TracChangeset for help on using the changeset viewer.