mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-01 07:04:10 +01:00
configure: Assimilate new getlinetest into recent configure conventions.
We're now using printf to print what we're checking before we check. We're also making variables such as HAVE_GETLINE available to both make and to the C pre-processor. With this, the local getline implementation is now only compiled if not available on the system.
This commit is contained in:
parent
3054bc462c
commit
650f6ac573
2 changed files with 13 additions and 9 deletions
11
Makefile
11
Makefile
|
@ -34,16 +34,17 @@ override LDFLAGS += \
|
||||||
|
|
||||||
all: notmuch notmuch.1.gz
|
all: notmuch notmuch.1.gz
|
||||||
|
|
||||||
include lib/Makefile.local
|
# Before including any other Makefile fragments, get settings from the
|
||||||
include compat/Makefile.local
|
# output of configure
|
||||||
include Makefile.local
|
|
||||||
|
|
||||||
# And get user settings from the output of configure
|
|
||||||
Makefile.config: configure
|
Makefile.config: configure
|
||||||
./configure
|
./configure
|
||||||
|
|
||||||
include Makefile.config
|
include Makefile.config
|
||||||
|
|
||||||
|
include lib/Makefile.local
|
||||||
|
include compat/Makefile.local
|
||||||
|
include Makefile.local
|
||||||
|
|
||||||
# The user has not set any verbosity, default to quiet mode and inform the
|
# The user has not set any verbosity, default to quiet mode and inform the
|
||||||
# user how to enable verbose compiles.
|
# user how to enable verbose compiles.
|
||||||
ifeq ($(V),)
|
ifeq ($(V),)
|
||||||
|
|
11
configure
vendored
11
configure
vendored
|
@ -126,12 +126,14 @@ EOF
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf "Checking for getline... "
|
||||||
if ! gcc -o getlinetest getlinetest.c > /dev/null 2>&1
|
if ! gcc -o getlinetest getlinetest.c > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "Checking for getline... No."
|
printf "No.\n"
|
||||||
getline=-Dgetline=_notmuch_getline
|
have_getline=0
|
||||||
else
|
else
|
||||||
echo "Checking for getline... Yes."
|
printf "Yes.\n"
|
||||||
|
have_getline=1
|
||||||
fi
|
fi
|
||||||
rm -f getlinetest
|
rm -f getlinetest
|
||||||
|
|
||||||
|
@ -148,5 +150,6 @@ EOF
|
||||||
# construct the Makefile.config
|
# construct the Makefile.config
|
||||||
cat > Makefile.config <<EOF
|
cat > Makefile.config <<EOF
|
||||||
prefix = /usr/local
|
prefix = /usr/local
|
||||||
override CFLAGS += -DHAVE_VALGRIND=${have_valgrind} ${valgrind_flags} ${getline}
|
HAVE_GETLINE = ${have_getline}
|
||||||
|
override CFLAGS += -DHAVE_VALGRIND=${have_valgrind} ${valgrind_flags} -DHAVE_GETLINE=\$(HAVE_GETLINE)
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue