diff options
author | Miles Bader <miles@gnu.org> | 2011-06-17 02:50:21 +0900 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2011-06-17 02:50:21 +0900 |
commit | 0cca0a78a4ee6b761c2fd91ee5a6628f23e3368c (patch) | |
tree | 1185dce2173ce2fd2f400f19fa6bfb3ab6d62792 /configure.in | |
parent | 67222e1dfff23c792ecdd4995dd144c1b41027c9 (diff) | |
download | emacs-0cca0a78a4ee6b761c2fd91ee5a6628f23e3368c.tar.gz |
configure.in: Try to determine CRT_DIR automatically when using gcc
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 9e7ea8522b2..60b4d55be51 100644 --- a/configure.in +++ b/configure.in @@ -988,6 +988,21 @@ 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 |