;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; LUSH Lisp Universal Shell
;;;   Copyright (C) 2002 Leon Bottou, Yann Le Cun, AT&T Corp, NECI.
;;; Includes parts of TL3:
;;;   Copyright (C) 1987-1999 Leon Bottou and Neuristique.
;;; Includes selected parts of SN3.2:
;;;   Copyright (C) 1991-2001 AT&T Corp.
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; $Id: opengl-config.lsh,v 1.4 2002/08/21 19:26:14 leonb Exp $
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; REDHAT 7.3:
;;   Requires XFree86-devel, glut and glut-devel.
;;   Glut packages are not installed by default.

;; MANDRAKE:
;;   Requires all the devel packages of GL including 
;;   libMesaGLU1-devel and libMesaglut3-devel
;;   These are not installed by default.


(when (not opengl-cflags)
  (defvar opengl-cflags 
    (if (getconf "X_CFLAGS")
        (concat " " (getconf "X_CFLAGS"))
      "" ) ) )

(when (not opengl-libgl)
  (let ((lib (find-shared-or-static-library "libGL")))
    (if (and lib (filep lib))
	(defvar opengl-libgl lib)
      (printf "libGL.so could not be found.\n")
      (printf "please make sure OpenGL or libMesaGL1 is installed.\n")
      (printf "Both the library and the development packages are needed.\n")
      (printf "(see %s for more details)\n" file-being-loaded)
      (error "cannot configure OpenGL"))))

(when (not opengl-libglu)
  (let ((lib (find-shared-or-static-library "libGLU")))
    (if (and lib (filep lib))
	(defvar opengl-libglu lib)
      (printf "libGLU.so could not be found.\n")
      (printf "please make sure OpenGLU or libMesaGLU1 is installed.\n")
      (printf "Both the library and the development packages are needed.\n")
      (printf "(see %s for more details)\n" file-being-loaded)
      (error "cannot configure OpenGL"))))

(when (not opengl-libglut)
  (let ((lib (find-shared-or-static-library "libglut")))
    (if (and lib (filep lib))
	(defvar opengl-libglut lib)
      (printf "libglut.so could not be found.\n")
      (printf "please make sure GLUT or libMesaglut3 is installed.\n")
      (printf "Both the library and the development packages are needed.\n")
      (printf "(see %s for more details)\n" file-being-loaded)
      (error "cannot configure OpenGL"))))

