Really enable the compiler detected flags into its correct var.

This commit is contained in:
Juan RP 2011-01-15 10:41:35 +01:00
parent 33c1a33912
commit 4420bd9427
2 changed files with 20 additions and 23 deletions

41
configure vendored
View File

@ -241,20 +241,17 @@ done
#
# Check for some compiler flags.
#
check_compiler_flag stack-protector-all f
if [ $? -ne 0 ]; then
check_compiler_flag stack-protector f
fi
check_compiler_flag stack-protector-all f CFLAGS
if [ $? -eq 0 ]; then
if [ "$CC" = "gcc" ]; then
check_compiler_flag "param ssp-buffer-size=1" -
check_compiler_flag "param ssp-buffer-size=1" - CFLAGS
fi
fi
if [ $? -eq 0 ]; then
check_compiler_flag "_FORTIFY_SOURCE=2" D
check_compiler_flag "p,-D_FORTIFY_SOURCE=2" W
fi
check_compiler_flag "visibility=default" f SHAREDLIB_CFLAGS
check_compiler_flag "std=c99"
check_compiler_flag "std=c99" "" CFLAGS
check_compiler_flag "l,--as-needed" W LDFLAGS
#
@ -398,21 +395,6 @@ else
fi
fi
#
# OpenSSL libssl with pkg-config support is required.
#
printf "Checking for OpenSSL via pkg-config ... "
if ! $PKGCONFIG_BIN --exists libssl; then
echo "libssl.pc file not found, exiting."
exit 1
else
echo "found version $($PKGCONFIG_BIN --modversion libssl)."
echo "CFLAGS += $($PKGCONFIG_BIN --cflags libssl)" >>$CONFIG_MK
echo "LDFLAGS += $($PKGCONFIG_BIN --libs libssl)" >>$CONFIG_MK
echo "STATIC_LIBS += $($PKGCONFIG_BIN --libs --static libssl)" \
>>$CONFIG_MK
fi
#
# libarchive >= 2.8.0 with pkg-config support is required.
#
@ -441,6 +423,21 @@ else
echo "STATIC_LIBS += -lfetch" >>$CONFIG_MK
fi
#
# OpenSSL libssl with pkg-config support is required.
#
printf "Checking for OpenSSL via pkg-config ... "
if ! $PKGCONFIG_BIN --exists libssl; then
echo "libssl.pc file not found, exiting."
exit 1
else
echo "found version $($PKGCONFIG_BIN --modversion libssl)."
echo "CFLAGS += $($PKGCONFIG_BIN --cflags libssl)" >>$CONFIG_MK
echo "LDFLAGS += $($PKGCONFIG_BIN --libs libssl)" >>$CONFIG_MK
echo "STATIC_LIBS += $($PKGCONFIG_BIN --libs --static libssl)" \
>>$CONFIG_MK
fi
echo
echo " XBPS has been configured with the following options:"
echo

View File

@ -36,7 +36,7 @@ endif
$(BIN).static: $(OBJS)
@printf " [CCLD]\t\t$@\n"
@$(CC) -static $^ $(CPPFLAGS) $(CFLAGS) -lxbps $(STATIC_LIBS) -o $@
@$(CC) -static $^ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(STATIC_LIBS) -o $@
$(BIN): $(OBJS)
@printf " [CCLD]\t\t$@\n"