Update configure script to support non-X platforms; currently just

CygWin, soon OSX too...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1688 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2001-11-17 15:55:36 +00:00
parent ab1e093308
commit 406404de72
3 changed files with 97 additions and 71 deletions

View File

@ -1,6 +1,8 @@
CHANGES IN FLTK 1.1.0b6
- Documentation updates...
- The configure script now works within the CygWin
environment.
- Implemented the Fl_File_Icon::load_png() method.
- The Fl_File_Icon::load_system_icons() method now
supports KDE 2.x icons.

View File

@ -1,7 +1,7 @@
dnl -*- sh -*-
dnl the "configure" script is made from this by running GNU "autoconf"
dnl
dnl "$Id: configure.in,v 1.33.2.31.2.21 2001/11/17 15:27:14 easysw Exp $"
dnl "$Id: configure.in,v 1.33.2.31.2.22 2001/11/17 15:55:36 easysw Exp $"
dnl
dnl Configuration script for the Fast Light Tool Kit (FLTK).
dnl
@ -208,79 +208,103 @@ AC_CHECK_HEADER(png.h,
dnl Restore original LIBS settings...
LIBS="$SAVELIBS"
dnl Check for X11...
AC_PATH_XTRA
if test x$no_x = xyes; then
AC_MSG_ERROR(Configure could not find required X11 libraries, aborting.)
fi
if test "x$X_PRE_LIBS" != x; then
AC_MSG_WARN(Ignoring libraries \"$X_PRE_LIBS\" requested by configure.)
fi
LIBS="$LIBS$X_LIBS"
CFLAGS="$CFLAGS$X_CFLAGS"
CXXFLAGS="$CXXFLAGS$X_CFLAGS"
if test "x$x_includes" != x; then
ac_cpp="$ac_cpp -I$x_includes"
fi
dnl Check for OpenGL unless disabled...
GLLIB=
if test x$enable_gl != xno; then
AC_CHECK_HEADER(GL/gl.h,
AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB="-lGL", \
AC_CHECK_LIB(MesaGL,glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lMesaGL",,\
-lX11 -lXext $X_EXTRA_LIBS -lm), \
-lX11 -lXext $X_EXTRA_LIBS -lm)
)
AC_CHECK_HEADER(GL/glu.h,
AC_DEFINE(HAVE_GL_GLU_H)
if test x$ac_cv_lib_GL_glXMakeCurrent = xyes; then
GLLIB="-lGLU $GLLIB"
fi
if test x$ac_cv_lib_MesaGL_glXMakeCurrent = xyes; then
GLLIB="-lMesaGLU $GLLIB"
fi
)
if test x$ac_cv_lib_GL_glXMakeCurrent = xno; then
case $uname in
CYGWIN*)
dnl Cygwin environment...
LIBS="$LIBS -lgdi32 -lwsock32"
CFLAGS="$CFLAGS -DWIN32"
CXXFLAGS="$CXXFLAGS -DWIN32"
if test x$enable_gl != xno; then
AC_CHECK_HEADER(GL/gl.h,
AC_DEFINE(HAVE_GL)
GLLIB="-lopengl32")
AC_CHECK_HEADER(GL/glu.h,
AC_DEFINE(HAVE_GL_GLU_H)
GLLIB="-lglu32 $GLLIB")
else
LINKFLTKGL=""
GLLIBNAME=""
GLDSONAME=""
GLDEMOS=""
fi
else
LINKFLTKGL=""
GLLIBNAME=""
GLDSONAME=""
GLDEMOS=""
fi
fi
;;
*)
dnl Check for X11...
AC_PATH_XTRA
if test x$no_x = xyes; then
AC_MSG_ERROR(Configure could not find required X11 libraries, aborting.)
fi
if test "x$X_PRE_LIBS" != x; then
AC_MSG_WARN(Ignoring libraries \"$X_PRE_LIBS\" requested by configure.)
fi
LIBS="$LIBS -lXext -lX11 $X_EXTRA_LIBS"
CFLAGS="$CFLAGS$X_CFLAGS"
CXXFLAGS="$CXXFLAGS$X_CFLAGS"
LDFLAGS="$X_LIBS $LDFLAGS"
if test "x$x_includes" != x; then
ac_cpp="$ac_cpp -I$x_includes"
fi
dnl Check for OpenGL unless disabled...
GLLIB=
if test x$enable_gl != xno; then
AC_CHECK_HEADER(GL/gl.h,
AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB="-lGL", \
AC_CHECK_LIB(MesaGL,glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lMesaGL",,\
-lm), \
-lm)
)
AC_CHECK_HEADER(GL/glu.h,
AC_DEFINE(HAVE_GL_GLU_H)
if test x$ac_cv_lib_GL_glXMakeCurrent = xyes; then
GLLIB="-lGLU $GLLIB"
fi
if test x$ac_cv_lib_MesaGL_glXMakeCurrent = xyes; then
GLLIB="-lMesaGLU $GLLIB"
fi
)
if test x$ac_cv_lib_GL_glXMakeCurrent = xno; then
LINKFLTKGL=""
GLLIBNAME=""
GLDSONAME=""
GLDEMOS=""
fi
else
LINKFLTKGL=""
GLLIBNAME=""
GLDSONAME=""
GLDEMOS=""
fi
dnl Check for the Xdbe extension...
AC_CHECK_HEADER(X11/extensions/Xdbe.h, \
if test "$uname" != "SunOS"; then
AC_DEFINE(HAVE_XDBE)
fi)
dnl Check for overlay visuals...
AC_CACHE_CHECK("for X overlay visuals", ac_cv_have_overlay,
if xprop -root 2>/dev/null | grep -c "SERVER_OVERLAY_VISUALS" >/dev/null; then
ac_cv_have_overlay=yes
else
ac_cv_have_overlay=no
fi)
if test x$ac_cv_have_overlay = xyes; then
AC_DEFINE(HAVE_OVERLAY)
fi
;;
esac
AC_SUBST(GLDEMOS)
AC_SUBST(GLLIB)
dnl Check for the Xdbe extension...
AC_CHECK_HEADER(X11/extensions/Xdbe.h, \
if test "$uname" != "SunOS"; then
AC_DEFINE(HAVE_XDBE)
fi)
dnl Check for overlay visuals...
AC_CACHE_CHECK("for X overlay visuals", ac_cv_have_overlay,
if xprop -root 2>/dev/null | grep -c "SERVER_OVERLAY_VISUALS" >/dev/null; then
ac_cv_have_overlay=yes
else
ac_cv_have_overlay=no
fi)
if test x$ac_cv_have_overlay = xyes; then
AC_DEFINE(HAVE_OVERLAY)
fi
dnl Figure out the appropriate formatted man page extension...
case "$uname" in
FreeBSD* | NetBSD* | OpenBSD*)
@ -494,5 +518,5 @@ AC_OUTPUT(makeinclude fltk-config)
chmod +x fltk-config
dnl
dnl End of "$Id: configure.in,v 1.33.2.31.2.21 2001/11/17 15:27:14 easysw Exp $".
dnl End of "$Id: configure.in,v 1.33.2.31.2.22 2001/11/17 15:55:36 easysw Exp $".
dnl

View File

@ -1,5 +1,5 @@
#
# "$Id: makeinclude.in,v 1.7.2.11.2.4 2001/10/27 03:33:25 easysw Exp $"
# "$Id: makeinclude.in,v 1.7.2.11.2.5 2001/11/17 15:55:36 easysw Exp $"
#
# Make include file for the Fast Light Tool Kit (FLTK).
# @configure_input@
@ -58,8 +58,8 @@ GLDSONAME =@DSONAME@
DSOCOMMAND =@DSOCOMMAND@
# libraries to link with:
LDLIBS =@LDFLAGS@ @LIBS@ -lX11 -lXext @X_EXTRA_LIBS@ -lm
GLDLIBS =@LDFLAGS@ @LIBS@ @GLLIB@ -lX11 -lXext @X_EXTRA_LIBS@ -lm
LDLIBS =@LDFLAGS@ @LIBS@ -lm
GLDLIBS =@LDFLAGS@ @GLLIB@ @LIBS@ -lm
LINKFLTK =-L../lib @LINKFLTK@
LINKFLTKGL =-L../lib @LINKFLTKGL@
IMAGELIBS =@IMAGELIBS@
@ -102,5 +102,5 @@ CAT3EXT =@CAT3EXT@
mv t.z $@
#
# End of "$Id: makeinclude.in,v 1.7.2.11.2.4 2001/10/27 03:33:25 easysw Exp $".
# End of "$Id: makeinclude.in,v 1.7.2.11.2.5 2001/11/17 15:55:36 easysw Exp $".
#