1
0
Fork 0

Clean up, and make more flexible and prevent unnesse

cary library includes
This commit is contained in:
ehofman 2003-07-06 17:14:04 +00:00
parent 7b778e859c
commit fa0c719c30

View file

@ -200,7 +200,7 @@ dnl Checks for libraries.
null_LIBS="$LIBS" null_LIBS="$LIBS"
AC_CHECK_LIB(m, cos) AC_SEARCH_LIBS(cos, m)
base_LIBS="$LIBS" base_LIBS="$LIBS"
@ -224,19 +224,10 @@ if test "x$ac_cv_lib_pthread_pthread_exit" != "xyes" \
LIBS=$save_LIBS LIBS=$save_LIBS
fi fi
case "${host}" in AC_SEARCH_LIBS(inet_addr, xnet)
*-*-irix*) AC_SEARCH_LIBS(socket, socket)
;; AC_SEARCH_LIBS(main, nsl)
*-*-solaris*) AC_SEARCH_LIBS(dlclose, dl)
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(dl, dlclose)
AC_CHECK_LIB(xnet,inet_addr)
AC_CHECK_LIB(socket, socket)
;;
*)
AC_CHECK_LIB(socket, socket)
;;
esac
dnl check for glut location dnl check for glut location
AC_CHECK_HEADER(GL/glut.h) AC_CHECK_HEADER(GL/glut.h)
@ -287,48 +278,32 @@ case "${host}" in
dnl Skip X11 library tests if requested. dnl Skip X11 library tests if requested.
if test "x$no_x" != "xyes"; then if test "x$no_x" != "xyes"; then
AC_CHECK_LIB(X11, XCreateWindow) AC_SEARCH_LIBS(XCreateWindow, X11)
AC_CHECK_LIB(Xext, XShmCreateImage) AC_SEARCH_LIBS(XShmCreateImage, Xext)
AC_CHECK_LIB(Xi, XGetExtensionVersion) AC_SEARCH_LIBS(XGetExtensionVersion, Xi)
AC_CHECK_LIB(ICE, IceOpenConnection) AC_SEARCH_LIBS(IceOpenConnection, ICE)
AC_CHECK_LIB(SM, SmcOpenConnection) AC_SEARCH_LIBS(SmcOpenConnection, SM)
AC_CHECK_LIB(Xt, XtMalloc) AC_SEARCH_LIBS(XtMalloc, Xt)
AC_CHECK_LIB(Xmu, XmuLookupStandardColormap) AC_SEARCH_LIBS(XmuLookupStandardColormap, Xmu)
fi fi
AC_CHECK_LIB(GLcore, glNewList) AC_SEARCH_LIBS(glNewList, [ GL GLcore MesaGL ])
if test "x$ac_cv_lib_GLcore_glNewList" = "xno" ; then if test "x$ac_cv_search_glNewList" = "x-lGLcore"; then
dnl if no GLcore, check for GL dnl if GLcore found, then also check for GL
AC_CHECK_LIB(GL, glNewList) AC_SEARCH_LIBS(glXCreateContext, GL)
if test "x$ac_cv_lib_GL_glNewList" = "xno" ; then
dnl if no GL, check for MesaGL
AC_CHECK_LIB(MesaGL, glNewList)
fi
else
dnl if GLcore found, then also check for GL
AC_CHECK_LIB(GL, glXCreateContext)
fi fi
dnl if using mesa, check for xmesa.h dnl if using mesa, check for xmesa.h
if test "x$ac_cv_lib_MesaGL_glNewList" = "xyes" ; then if test "x$ac_cv_search_glNewList" = "x-lMesaGL"; then
AC_CHECK_HEADER(GL/fxmesa.h) AC_CHECK_HEADER(GL/fxmesa.h)
if test "x$ac_cv_header_GL_fxmesa_h" = "xyes"; then if test "x$ac_cv_header_GL_fxmesa_h" = "xyes"; then
AC_DEFINE([XMESA], 1, [Define for fxmesa]) AC_DEFINE([XMESA], 1, [Define for fxmesa])
AC_DEFINE([FX], 1, [Define for fxmesa]) AC_DEFINE([FX], 1, [Define for fxmesa])
fi fi
fi fi
AC_CHECK_LIB(GLU, gluLookAt) AC_SEARCH_LIBS(gluLookAt, [ GLU MesaGLU ])
if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then AC_SEARCH_LIBS(glutGetModifiers, [ glut freeglut ])
dnl if no GLU, check for MesaGLU
AC_CHECK_LIB(MesaGLU, gluLookAt)
fi
AC_CHECK_LIB(glut, glutGetModifiers)
if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno" ; then
dnl if no "real" glut, check for freeglut
AC_CHECK_LIB(freeglut, glutGetModifiers)
fi
;; ;;
esac esac