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:
parent
ca5a88e462
commit
0db5ace61d
11
configure
vendored
11
configure
vendored
@ -389,6 +389,7 @@ else
|
|||||||
cat <<EOF >_$func.c
|
cat <<EOF >_$func.c
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
int main(void) {
|
int main(void) {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
vasprintf(NULL, NULL, ap);
|
vasprintf(NULL, NULL, ap);
|
||||||
@ -407,7 +408,7 @@ fi
|
|||||||
if test -n "$HAVE_VASPRINTF"; then
|
if test -n "$HAVE_VASPRINTF"; then
|
||||||
echo "CPPFLAGS += -DHAVE_VASPRINTF" >> $CONFIG_MK
|
echo "CPPFLAGS += -DHAVE_VASPRINTF" >> $CONFIG_MK
|
||||||
else
|
else
|
||||||
echo "COMPAT_SRCS+= compat/vasprintf.o" >>$CONFIG_MK
|
echo "COMPAT_OBJS+= compat/vasprintf.o" >>$CONFIG_MK
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -430,7 +431,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then
|
|||||||
echo "CPPFLAGS += -DHAVE_STRCASESTR" >>$CONFIG_MK
|
echo "CPPFLAGS += -DHAVE_STRCASESTR" >>$CONFIG_MK
|
||||||
else
|
else
|
||||||
echo no.
|
echo no.
|
||||||
echo "COMPAT_SRCS += compat/strcasestr.o" >>$CONFIG_MK
|
echo "COMPAT_OBJS += compat/strcasestr.o" >>$CONFIG_MK
|
||||||
fi
|
fi
|
||||||
rm -f _$func _$func.c
|
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
|
echo "CPPFLAGS += -DHAVE_STRLCPY" >> $CONFIG_MK
|
||||||
else
|
else
|
||||||
echo no.
|
echo no.
|
||||||
echo "COMPAT_SRCS += compat/strlcpy.o" >>$CONFIG_MK
|
echo "COMPAT_OBJS += compat/strlcpy.o" >>$CONFIG_MK
|
||||||
fi
|
fi
|
||||||
rm -f _$func.c _$func
|
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
|
echo "CPPFLAGS += -DHAVE_STRLCAT" >>$CONFIG_MK
|
||||||
else
|
else
|
||||||
echo no.
|
echo no.
|
||||||
echo "COMPAT_SRCS += compat/strlcat.o" >>$CONFIG_MK
|
echo "COMPAT_OBJS += compat/strlcat.o" >>$CONFIG_MK
|
||||||
fi
|
fi
|
||||||
rm -f _$func.c _$func
|
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
|
echo "CPPFLAGS+= -DHAVE_HUMANIZE_NUMBER" >>$CONFIG_MK
|
||||||
else
|
else
|
||||||
echo no.
|
echo no.
|
||||||
echo "COMPAT_SRCS+= compat/humanize_number.o" >>$CONFIG_MK
|
echo "COMPAT_OBJS+= compat/humanize_number.o" >>$CONFIG_MK
|
||||||
fi
|
fi
|
||||||
rm -f _$func.c _$func
|
rm -f _$func.c _$func
|
||||||
|
|
||||||
|
@ -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 += repo.o repo_pkgdeps.o repo_sync.o
|
||||||
OBJS += rpool.o cb_util.o proplib_wrapper.o
|
OBJS += rpool.o cb_util.o proplib_wrapper.o
|
||||||
OBJS += package_alternatives.o
|
OBJS += package_alternatives.o
|
||||||
OBJS += $(EXTOBJS) $(COMPAT_SRCS)
|
OBJS += $(EXTOBJS) $(COMPAT_OBJS)
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: libxbps.so libxbps.a
|
all: libxbps.so libxbps.a
|
||||||
|
Loading…
Reference in New Issue
Block a user