diff --git a/m4/moo-pygtk.m4 b/m4/moo-pygtk.m4 index a7bf0168..c35696e5 100644 --- a/m4/moo-pygtk.m4 +++ b/m4/moo-pygtk.m4 @@ -9,8 +9,12 @@ AC_DEFUN([_MOO_AC_CHECK_PYGTK_REAL],[ CPPFLAGS="$CPPFLAGS $PYGTK_CFLAGS $PYTHON_INCLUDES" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PYGTK_CFLAGS $PYTHON_INCLUDES" + save_LIBS="$LIBS" + LIBS="$LIBS $PYGTK_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS" + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $PYGTK_LDFLAGS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + AC_LINK_IFELSE([AC_LANG_SOURCE([[ #include #include int main () @@ -32,6 +36,8 @@ AC_DEFUN([_MOO_AC_CHECK_PYGTK_REAL],[ CFLAGS="$save_CFLAGS" CPPFLAGS="$save_CPPFLAGS" + LIBS="$save_LIBS" + LDFLAGS="$save_LDFLAGS" ],[ m4_if([$2],[],[:],[$2]) ])