configure: fixes for building with an installed static libxbps.

This commit is contained in:
Juan RP 2011-01-19 14:45:58 +01:00
parent 274c8c432b
commit 8dc6926664
2 changed files with 17 additions and 15 deletions

31
configure vendored
View File

@ -368,6 +368,22 @@ else
echo yes
fi
#
# Check if external libfetch should be used.
#
if [ -z "$EXTERNAL_LIBFETCH" ]; then
EXTERNAL_LIBFETCH_VALUE="no (using internal copy)"
echo "CPPFLAGS += -I\$(TOPDIR)/lib/fetch" >>$CONFIG_MK
echo "PROG_LDFLAGS += -lxbps" >>$CONFIG_MK
echo "STATIC_LIBS = -lxbps" >>$CONFIG_MK
else
EXTERNAL_LIBFETCH_VALUE=yes
echo "USE_EXTERNAL_LIBFETCH = 1" >>$CONFIG_MK
echo "LDFLAGS += -lfetch" >>$CONFIG_MK
echo "PROG_LDFLAGS += -lxbps -lfetch" >>$CONFIG_MK
echo "STATIC_LIBS = -lxbps -lfetch" >>$CONFIG_MK
fi
#
# zlib with pkg-config support is required.
#
@ -379,7 +395,7 @@ else
echo "found version $($PKGCONFIG_BIN --modversion zlib)."
echo "CFLAGS += $($PKGCONFIG_BIN --cflags zlib)" >>$CONFIG_MK
echo "LDFLAGS += $($PKGCONFIG_BIN --libs zlib)" >>$CONFIG_MK
echo "STATIC_LIBS = $($PKGCONFIG_BIN --libs --static zlib)" \
echo "STATIC_LIBS += $($PKGCONFIG_BIN --libs --static zlib)" \
>>$CONFIG_MK
fi
@ -423,19 +439,6 @@ else
>>$CONFIG_MK
fi
#
# Check if external libfetch should be used.
#
if [ -z "$EXTERNAL_LIBFETCH" ]; then
EXTERNAL_LIBFETCH_VALUE="no (using internal copy)"
echo "CPPFLAGS += -I\$(TOPDIR)/lib/fetch" >>$CONFIG_MK
else
EXTERNAL_LIBFETCH_VALUE=yes
echo "USE_EXTERNAL_LIBFETCH = 1" >>$CONFIG_MK
echo "LDFLAGS += -lfetch" >>$CONFIG_MK
echo "STATIC_LIBS += -lfetch" >>$CONFIG_MK
fi
#
# OpenSSL libssl with pkg-config support is required.
#

View File

@ -2,7 +2,6 @@
OBJS ?= main.o
CFLAGS += $(PROG_CFLAGS)
LDFLAGS += -lxbps
.PHONY: all
all: $(BIN) $(BIN).static