Index: macros/opengl.m4 =================================================================== RCS file: /sources/gnash/gnash/macros/opengl.m4,v retrieving revision 1.8 diff -u -3 -p -u -r1.8 opengl.m4 --- macros/opengl.m4 3 Feb 2006 20:50:27 -0000 1.8 +++ macros/opengl.m4 18 Feb 2006 11:28:14 -0000 @@ -39,35 +39,37 @@ AC_DEFUN([AM_PATH_OPENGL], dnl If the include path hasn't been specified, go look for it. if test x"${ac_cv_path_opengl_includes}" = x; then + opengl_includes_found=no AC_CHECK_HEADERS(GL/gl.h, [ac_cv_path_opengl_includes=""],[ - if test x"${ac_cv_path_opengl_includes}" = x; then AC_MSG_CHECKING([for OpenGL headers]) incllist="/usr/include /usr/local/include /opt/include /usr/X11R6/include /usr/pkg/include .. ../.." for i in $incllist; do if test -f $i/GL/gl.h; then + opengl_includes_found=yes if test x"$i" != x"/usr/include"; then ac_cv_path_opengl_includes="-I$i" + AC_MSG_RESULT(${ac_cv_path_opengl_includes}) break else ac_cv_path_opengl_includes="" + AC_MSG_RESULT([yes]) break fi fi done - fi]) + if test $opengl_includes_found = 'no'; then + AC_MSG_RESULT([no]) + fi + ]) else - AC_MSG_RESULT(-I${ac_cv_path_opengl_includes}) - if test x"${ac_cv_path_opengl_includes}" != x"/usr/include"; then - ac_cv_path_opengl_includes="-I${ac_cv_path_opengl_includes}" - else - ac_cv_path_opengl_includes="" - fi + AC_MSG_CHECKING([for OpenGL headers]) + ac_cv_path_opengl_includes="-I${ac_cv_path_opengl_includes}" + AC_MSG_RESULT(${ac_cv_path_opengl_includes}) fi if test x"${ac_cv_path_opengl_includes}" != x ; then OPENGL_CFLAGS="${ac_cv_path_opengl_includes}" - AC_MSG_RESULT(${ac_cv_path_opengl_includes}) else OPENGL_CFLAGS="" fi @@ -88,27 +90,27 @@ AC_DEFUN([AM_PATH_OPENGL], if test x"${ac_cv_path_opengl_libraries}" = x; then AC_CHECK_LIB(GL, glBegin, [ac_cv_path_opengl_libraries="-lGL -lGLU"],[ AC_MSG_CHECKING([for libGL library]) - libslist="/usr/X11R6/lib /usr/lib /usr/local/lib /opt/lib /usr/pkg/lib .. ../.." + libslist="/usr/X11R6/lib64 /usr/lib64 /usr/local/lib64 /opt/lib64 /usr/pkg/lib64 /usr/X11R6/lib /usr/lib /usr/local/lib /opt/lib /usr/pkg/lib .. ../.." for i in $libslist; do if test -f $i/libGL.a -o -f $i/libGL.so; then - if test x"$i" != x"/usr/lib"; then - ac_cv_path_opengl_libraries="-L$i" + if test x"$i" != x"/usr/lib"; then + ac_cv_path_opengl_libraries="-L$i -lGL -lGLU" AC_MSG_RESULT(${ac_cv_path_opengl_libraries}) break else - ac_cv_path_opengl_libraries="" + ac_cv_path_opengl_libraries="-lGL -lGLU" AC_MSG_RESULT(yes) break fi fi - done]) + done + if test x"${ac_cv_path_opengl_libraries}" = x; then + AC_MSG_RESULT([no]) + fi + ]) else if test -f ${ac_cv_path_opengl_libraries}/libGL.a -o -f ${ac_cv_path_opengl_libraries}/libGL.so; then - if test x"${ac_cv_path_opengl_libraries}" != x"/usr/lib"; then - ac_cv_path_opengl_libraries="-L${ac_cv_path_opengl_libraries}" - else - ac_cv_path_opengl_libraries="" - fi + ac_cv_path_opengl_libraries="-L${ac_cv_path_opengl_libraries} -lGL -lGLU" fi fi @@ -119,9 +121,11 @@ AC_DEFUN([AM_PATH_OPENGL], fi fi - if test x"${ac_cv_path_opengl_libraries}" != x ; then - OPENGL_LIBS="${ac_cv_path_opengl_libraries}" - fi +dnl if test x"${ac_cv_path_opengl_libraries}" != x ; then +dnl OPENGL_LIBS="${ac_cv_path_opengl_libraries}" +dnl fi + +dnl we could also check that everything was found? AM_CONDITIONAL(opengl, [test x$opengl = xyes])