configure: fix vasprintf test; cosmetics.

The vasprintf test was always failing because it needed stdarg.h.
Misc cosmetics: rename compat objs to COMPAT_OBJS.
This commit is contained in:
Juan RP 2019-04-22 15:30:02 +02:00
parent ca5a88e462
commit 0db5ace61d
2 changed files with 7 additions and 6 deletions

11
configure vendored
View File

@ -389,6 +389,7 @@ else
cat <<EOF >_$func.c
#define _GNU_SOURCE
#include <stdio.h>
#include <stdarg.h>
int main(void) {
va_list ap;
vasprintf(NULL, NULL, ap);
@ -407,7 +408,7 @@ fi
if test -n "$HAVE_VASPRINTF"; then
echo "CPPFLAGS += -DHAVE_VASPRINTF" >> $CONFIG_MK
else
echo "COMPAT_SRCS+= compat/vasprintf.o" >>$CONFIG_MK
echo "COMPAT_OBJS+= compat/vasprintf.o" >>$CONFIG_MK
fi
#
@ -430,7 +431,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then
echo "CPPFLAGS += -DHAVE_STRCASESTR" >>$CONFIG_MK
else
echo no.
echo "COMPAT_SRCS += compat/strcasestr.o" >>$CONFIG_MK
echo "COMPAT_OBJS += compat/strcasestr.o" >>$CONFIG_MK
fi
rm -f _$func _$func.c
@ -453,7 +454,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then
echo "CPPFLAGS += -DHAVE_STRLCPY" >> $CONFIG_MK
else
echo no.
echo "COMPAT_SRCS += compat/strlcpy.o" >>$CONFIG_MK
echo "COMPAT_OBJS += compat/strlcpy.o" >>$CONFIG_MK
fi
rm -f _$func.c _$func
@ -475,7 +476,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then
echo "CPPFLAGS += -DHAVE_STRLCAT" >>$CONFIG_MK
else
echo no.
echo "COMPAT_SRCS += compat/strlcat.o" >>$CONFIG_MK
echo "COMPAT_OBJS += compat/strlcat.o" >>$CONFIG_MK
fi
rm -f _$func.c _$func
@ -518,7 +519,7 @@ if $XCC _$func.c -lutil -o _$func 2>/dev/null; then
echo "CPPFLAGS+= -DHAVE_HUMANIZE_NUMBER" >>$CONFIG_MK
else
echo no.
echo "COMPAT_SRCS+= compat/humanize_number.o" >>$CONFIG_MK
echo "COMPAT_OBJS+= compat/humanize_number.o" >>$CONFIG_MK
fi
rm -f _$func.c _$func

View File

@ -44,7 +44,7 @@ OBJS += plist_remove.o plist_fetch.o util.o util_hash.o
OBJS += repo.o repo_pkgdeps.o repo_sync.o
OBJS += rpool.o cb_util.o proplib_wrapper.o
OBJS += package_alternatives.o
OBJS += $(EXTOBJS) $(COMPAT_SRCS)
OBJS += $(EXTOBJS) $(COMPAT_OBJS)
.PHONY: all
all: libxbps.so libxbps.a