@@ -495,7 +495,7 @@ if test $shared -eq 1; then
495495 echo Checking for shared library support... | tee -a configure.log
496496 # we must test in two steps (cc then ld), required at least on SunOS 4.x
497497 if try $CC -c $SFLAGS $test .c &&
498- try $LDSHARED $SFLAGS -o $test$shared_ext $test .o; then
498+ try $LDSHARED $SFLAGS $LDFLAGS -o $test$shared_ext $test .o; then
499499 echo Building shared library $SHAREDLIBV with $CC . | tee -a configure.log
500500 elif test -z " $old_cc " -a -z " $old_cflags " ; then
501501 echo No shared library support. | tee -a configure.log
@@ -557,7 +557,7 @@ int main(void) {
557557}
558558EOF
559559 fi
560- if try $CC $CFLAGS -o $test $test .c; then
560+ if try $CC $CFLAGS $LDFLAGS -o $test $test .c; then
561561 sizet=` ./$test `
562562 echo " Checking for a pointer-size integer type..." $sizet " ." | tee -a configure.log
563563 CFLAGS=" ${CFLAGS} -DNO_SIZE_T=${sizet} "
@@ -591,7 +591,7 @@ int main(void) {
591591 return 0;
592592}
593593EOF
594- if try $CC $CFLAGS -o $test $test .c; then
594+ if try $CC $CFLAGS $LDFLAGS -o $test $test .c; then
595595 echo " Checking for fseeko... Yes." | tee -a configure.log
596596 else
597597 CFLAGS=" ${CFLAGS} -DNO_FSEEKO"
@@ -608,7 +608,7 @@ cat > $test.c <<EOF
608608#include <errno.h>
609609int main() { return strlen(strerror(errno)); }
610610EOF
611- if try $CC $CFLAGS -o $test $test .c; then
611+ if try $CC $CFLAGS $LDFLAGS -o $test $test .c; then
612612 echo " Checking for strerror... Yes." | tee -a configure.log
613613else
614614 CFLAGS=" ${CFLAGS} -DNO_STRERROR"
@@ -714,7 +714,7 @@ int main()
714714 return (mytest("Hello%d\n", 1));
715715}
716716EOF
717- if try $CC $CFLAGS -o $test $test .c; then
717+ if try $CC $CFLAGS $LDFLAGS -o $test $test .c; then
718718 echo " Checking for vsnprintf() in stdio.h... Yes." | tee -a configure.log
719719
720720 echo >> configure.log
@@ -807,7 +807,7 @@ int main()
807807}
808808EOF
809809
810- if try $CC $CFLAGS -o $test $test .c; then
810+ if try $CC $CFLAGS $LDFLAGS -o $test $test .c; then
811811 echo " Checking for snprintf() in stdio.h... Yes." | tee -a configure.log
812812
813813 echo >> configure.log
0 commit comments