fix configure script to handle --prefix= and properly create Makefile.config

This also removes the Makefile.config from the repository, since it
shouldn't be kept in the repository and should be created by the
configure script.
This commit is contained in:
Jameson Graef Rollins 2009-11-28 18:22:58 -05:00
parent a2a522a758
commit cfa246272d
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +0,0 @@
prefix = /usr/local
bash_completion_dir = /etc/bash_completion.d
CFLAGS += -DHAVE_VALGRIND

12
configure vendored
View file

@ -1,5 +1,15 @@
#! /bin/sh #! /bin/sh
# defaults
PREFIX=/usr/local
# option parsing
for option; do
if [ "${option%=*}" = '--prefix' ] ; then
PREFIX="${option#*=}"
fi
done
cat <<EOF cat <<EOF
Welcome to Notmuch, a system for indexing, searching and tagging your email. Welcome to Notmuch, a system for indexing, searching and tagging your email.
@ -130,7 +140,7 @@ EOF
# construct the Makefile.config # construct the Makefile.config
cat > Makefile.config <<EOF cat > Makefile.config <<EOF
prefix = /usr/local prefix = $PREFIX
bash_completion_dir = /etc/bash_completion.d bash_completion_dir = /etc/bash_completion.d
CFLAGS += ${have_valgrind} CFLAGS += ${have_valgrind}
EOF EOF