https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78698

Eric Gallager <egall at gwmail dot gwu.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egall at gwmail dot gwu.edu

--- Comment #2 from Eric Gallager <egall at gwmail dot gwu.edu> ---
(In reply to Matthias Klose from comment #1)
> didn't check a configuration with --disable-shared :-/  What about checking
> for a $bdw_lib_dir/libgc.la and in that case setting BDW_GC_LIBS to
> $bdw_lib_dir/libgc.la and skipping the compile and link tests? I assume we
> could do a file check for the header file as well for this case.
> 
> --- configure.ac      (revision 243108)
> +++ configure.ac      (working copy)
> @@ -290,10 +293,19 @@
>        AC_MSG_ERROR([no multilib path ($mldir) found in
> --with-target-bdw-gc-lib])
>      fi
>      BDW_GC_CFLAGS="-I$bdw_inc_dir"
> -    BDW_GC_LIBS="-L$bdw_lib_dir -lgc"
> +    if test -f $bdw_lib_dir/libgc.la; then
> +      BDW_GC_LIBS="$bdw_lib_dir/libgc.la"
> +    else
> +      BDW_GC_LIBS="-L$bdw_lib_dir -lgc"
> +    fi
>      AC_MSG_RESULT([found])
>    fi
>  
> +  case "$BDW_GC_LIBS" in
> +  *libgc.la)
> +    use_bdw_gc=yes
> +    ;;
> +  *)
>    AC_MSG_CHECKING([for system boehm-gc])
>    save_CFLAGS=$CFLAGS
>    save_LIBS=$LIBS
> @@ -329,6 +341,7 @@
>      use_bdw_gc=yes
>      AC_MSG_RESULT([found])
>    fi
> +  esac
>  esac
>  
>  if test "$use_bdw_gc" = no; then

Note that some package managers automatically delete .la files as part of the
installation process. I suppose it'd just fall through to the compile-and-link
tests in that case, though, which might still work...

Reply via email to