diff --git a/aclocal.m4 b/aclocal.m4 index f0bcf36..c1be111 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -222,8 +222,10 @@ AC_ARG_ENABLE(sanetest, [ --disable-sanetest Do not try to compile and run if test "x$enable_sanetest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" + ac_save_LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS $SANE_CFLAGS" LIBS="$LIBS $SANE_LIBS" + LDFLAGS="$LDFLAGS $SANE_LDFLAGS" dnl dnl Now check if the installed SANE is sufficiently new. (Also sanity dnl checks the results of sane-config to some extent @@ -278,6 +280,7 @@ main () return 1; } ],, no_sane=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + LDFLAGS="$ac_save_LDFLAGS" CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi diff --git a/sanei/Makefile.in b/sanei/Makefile.in index d13a25b..8e26c17 100644 --- a/sanei/Makefile.in +++ b/sanei/Makefile.in @@ -29,7 +29,7 @@ INSTALL_DATA = @INSTALL_DATA@ CC = @CC@ INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ @SANE_CFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ DEFS = @DEFS@