Branch: Tag:

2006-08-10

2006-08-10 09:58:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Attempt to extract the default lib path from gcc.

Rev: src/configure.in:1.995

1: - AC_REVISION("$Id: configure.in,v 1.994 2006/08/09 18:52:05 mast Exp $") + AC_REVISION("$Id: configure.in,v 1.995 2006/08/10 09:58:41 grubba Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
2295:    # MinGW system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.994 2006/08/09 18:52:05 mast Exp $. + # Automatically generated by $Id: configure.in,v 1.995 2006/08/10 09:58:41 grubba Exp $.   # MinGW-version. Do NOT edit.   posix_name="`cat`"   posix_prefix="/"
2333:    # Native POSIX system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.994 2006/08/09 18:52:05 mast Exp $. + # Automatically generated by $Id: configure.in,v 1.995 2006/08/10 09:58:41 grubba Exp $.   # POSIX-version. Do NOT edit.   cat   EOF
2342:    # rntcl-style    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.994 2006/08/09 18:52:05 mast Exp $. + # Automatically generated by $Id: configure.in,v 1.995 2006/08/10 09:58:41 grubba Exp $.   # RNTCL-version. Do NOT edit.   sed -e "$PIKE_PATH_TRANSLATE"   EOF
2377:   PIKE_INIT_REAL_DIRS      if test "x$with_lib_path" = "x"; then :; else +  if test "x$with_dynamic_modules" = "xno"; then :; else +  if test "x$GCC" = "xno"; then :; else +  # Extract the default library paths from gcc, +  # so that we can pass them along to ld later on. +  for dd in `$CC -print-search-dirs | sed -e '/^libraries:/s/^[^=]*=//p' -ed | sed -e 's/:/ /g'`; do +  if test -d "$dd"; then :; else continue; fi +  if test "$dd" = "/lib"; then continue; fi +  if test "$dd" = "/usr/lib"; then continue; fi +  for suff in $pike_cv_abi_suffixes; do +  d="$dd$suff" +  PIKE_CHECK_ABI_DIR($d, [ +  # NOTE: Don't add these to the run path. +  AC_MSG_CHECING([do we need to add it to LDFLAGS]) +  case " $LDFLAGS " in +  *\ -L$d\ *) +  AC_MSG_RESULT([no - already added]) +  ;; +  *) +  LDFLAGS="$LDFLAGS -L$d" +  AC_MSG_RESULT([yes - added]) +  ;; +  esac +  ]) +  done +  done +  fi +  fi    for dd in `echo $with_lib_path | sed -e 's/:/ /g'`; do    if test "$dd" = "/lib"; then continue; fi    if test "$dd" = "/usr/lib"; then continue; fi