configure.in: Try to determine CRT_DIR automatically when using gcc
This commit is contained in:
parent
67222e1dff
commit
0cca0a78a4
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-06-16 Miles Bader <miles@gnu.org>
|
||||
|
||||
* configure.in: Try to determine CRT_DIR automatically when
|
||||
using gcc.
|
||||
|
||||
2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* lib/ftoastr.c, lib/stdio.in.h, lib/verify.h:
|
||||
|
|
15
configure.in
15
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue