Index: acinclude.m4.in
===================================================================
RCS file: /home/kde/kde-common/admin/acinclude.m4.in,v
retrieving revision 2.438
diff -u -u -b -r2.438 acinclude.m4.in
--- acinclude.m4.in	20 Jan 2004 09:24:32 -0000	2.438
+++ acinclude.m4.in	23 Jan 2004 02:02:57 -0000
@@ -1438,6 +1438,9 @@
    qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
 done
 qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
+if test "x$kde_use_qt_mac" = "xyes"; then
+  qt_libdirs="~/Library/Frameworks /Library/Frameworks /System/Library/Frameworks $qt_libdirs"
+fi
 if test ! "$ac_qt_libraries" = "NO"; then
   qt_libdir=$ac_qt_libraries
 else
@@ -3572,6 +3575,13 @@
 ], [],
 	  ac_cv_have_gl="yes", ac_cv_have_gl="no")
     fi
+    if test "x$ac_cv_have_gl" = "xno"; then
+      LDFLAGS="$ac_save_ldflags -framework OpenGL $all_libraries"
+      AC_TRY_LINK([#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+], [],
+        ac_cv_have_gl="mac", ac_cv_have_gl="no")
+    fi
     AC_LANG_RESTORE
     LDFLAGS="$ac_save_ldflags"
     CXXFLAGS="$ac_save_cxxflags"
@@ -3587,12 +3597,16 @@
     if test "$GL_LDFLAGS" = ""; then
        if test "$ac_cv_have_gl" = "mesa"; then
           GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
+       elif test "$ac_cv_have_gl" = "mac"; then
+          GLLIB='-framework OpenGL'
        else
           GLLIB='-lGLU -lGL $(LIB_X11)'
        fi
     else
        if test "$ac_cv_have_gl" = "mesa"; then
           GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
+       elif test "$ac_cv_have_gl" = "mac"; then
+          GLLIB="$GL_LDFLAGS -framework OpenGL"
        else
           GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
        fi
