diff --git a/configure b/configure index 5baf8dcb27c..20b9b40d9ab 100755 --- a/configure +++ b/configure @@ -13031,6 +13031,7 @@ fi if test "$sane_devel" != "no" -a "x$with_sane" != "xno" then ac_sane_incl="`$sane_devel --cflags`" + ac_sane_libs="`$sane_devel --ldflags`" ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $ac_sane_incl" if test "${ac_cv_header_sane_sane_h+set}" = set; then @@ -13170,7 +13171,7 @@ if test "${ac_cv_lib_soname_sane+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_soname_save_LIBS=$LIBS -LIBS="-lsane $LIBS" +LIBS="-lsane $ac_sane_libs $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF diff --git a/configure.ac b/configure.ac index a32bb733ada..23cff8159f3 100644 --- a/configure.ac +++ b/configure.ac @@ -920,10 +920,11 @@ AC_CHECK_PROG(sane_devel,sane-config,sane-config,no) if test "$sane_devel" != "no" -a "x$with_sane" != "xno" then ac_sane_incl="`$sane_devel --cflags`" + ac_sane_libs="`$sane_devel --ldflags`" ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $ac_sane_incl" AC_CHECK_HEADER(sane/sane.h, - [WINE_CHECK_SONAME(sane,sane_init,[AC_SUBST(SANEINCL,"$ac_sane_incl")])]) + [WINE_CHECK_SONAME(sane,sane_init,[AC_SUBST(SANEINCL,"$ac_sane_incl")],,[$ac_sane_libs])]) CPPFLAGS="$ac_save_CPPFLAGS" fi WINE_NOTICE_WITH(sane,[test "x$ac_cv_lib_soname_sane" = "x"],