X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=configure;h=488b3bd7965a57471c1fa187ffe7c4eb659a2e10;hp=92b6710fdef8ff020954e9e01709fca1efb23ee0;hb=c7f971e8c02524ee2435406f0c14791b75c10e20;hpb=a4d3f07e5162db4f9345f32f623ce94f5015c873 diff --git a/configure b/configure index 92b6710f..488b3bd7 100755 --- a/configure +++ b/configure @@ -1,5 +1,18 @@ #! /bin/sh +CC=${CC:-gcc} +CXX=${CXX:-g++} + +# defaults +PREFIX=/usr/local + +# option parsing +for option; do + if [ "${option%%=*}" = '--prefix' ] ; then + PREFIX="${option#*=}" + fi +done + cat < /dev/null 2>&1; then printf "Yes.\n" have_xapian=1 - cxxflags="${cxxflags} $(xapian-config --cxxflags)" - ldflags="${ldflags} $(xapian-config --libs)" + xapian_cxxflags=$(xapian-config --cxxflags) + xapian_ldflags=$(xapian-config --libs) else printf "No.\n" have_xapian=0 @@ -44,8 +57,8 @@ printf "Checking for GMime 2.4 development files... " if pkg-config --modversion gmime-2.4 > /dev/null 2>&1; then printf "Yes.\n" have_gmime=1 - cflags="${cflags} $(pkg-config --cflags gmime-2.4)" - ldflags="${ldflags} $(pkg-config --libs gmime-2.4)" + gmime_cflags=$(pkg-config --cflags gmime-2.4) + gmime_ldflags=$(pkg-config --libs gmime-2.4) else printf "No.\n" have_gmime=0 @@ -56,8 +69,8 @@ printf "Checking for talloc development files... " if pkg-config --modversion talloc > /dev/null 2>&1; then printf "Yes.\n" have_talloc=1 - cflags="${cflags} $(pkg-config --cflags talloc)" - ldflags="${ldflags} $(pkg-config --libs talloc)" + talloc_cflags=$(pkg-config --cflags talloc) + talloc_ldflags=$(pkg-config --libs talloc) else printf "No.\n" have_talloc=0 @@ -69,7 +82,7 @@ printf "Checking for valgrind development files... " if pkg-config --modversion valgrind > /dev/null 2>&1; then printf "Yes.\n" have_valgrind=1 - cflags="${cflags} $(pkg-config --cflags valgrind)" + valgrind_cflags=$(pkg-config --cflags valgrind) else printf "No (but that's fine).\n" have_valgrind=0 @@ -103,29 +116,37 @@ EOF fi cat < /dev/null 2>&1 +if ${CC} -o config/have_getline config/have_getline.c > /dev/null 2>&1 then printf "Yes.\n" have_getline=1 @@ -168,8 +189,14 @@ cat > Makefile.config <