diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/configure.in b/configure.in index 60b4d55be51..ec0dd263b51 100644 --- a/configure.in +++ b/configure.in @@ -988,23 +988,20 @@ dnl Do this early because it can frob feature test macros for Unix-98 &c. AC_SYS_LARGEFILE -## If we're using gcc, and the user hasn't specified a crt-dir, try to -## determine it automatically by asking gcc. [If this doesn't work, -## CRT_DIR will remain empty and system-dependent code will be used -## below.] -## -if test "x${GCC}z$CRT_DIR" = xyesz; then - crt_file=`$CC 2>/dev/null --print-file-name=crt1.o` - case "$crt_file" in - */*) - CRT_DIR=`AS_DIRNAME(["$crt_file"])` - ;; - esac -fi - - ## If user specified a crt-dir, use that unconditionally. if test "X$CRT_DIR" = "X"; then + + ## If we're using gcc, and the user hasn't specified a crt-dir, try to + ## determine it automatically by asking gcc. [If this doesn't work, + ## CRT_DIR will remain empty and system-dependent code will be used below.] + if test "x${GCC}" = xyes; then + crt_file=`$CC --print-file-name=crt1.o 2>/dev/null` + case "$crt_file" in + */*) + CRT_DIR=`AS_DIRNAME(["$crt_file"])` + ;; + esac + fi case "$canonical" in x86_64-*-linux-gnu* | s390x-*-linux-gnu*) |