$OpenBSD: patch-configure_in,v 1.2 2001/06/07 02:28:25 matt Exp $ --- configure.in.orig Mon May 7 10:34:22 2001 +++ configure.in Wed Jun 6 22:14:02 2001 @@ -80,7 +80,7 @@ if eval "test x$enable_shared = xyes"; t ;; FreeBSD* | NetBSD* | OpenBSD*) DSONAME="libfltk.so.1" - DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ -shared \$(OPTIM) -o" + DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ -fPIC -shared \$(OPTIM) -o" ;; AIX*) PICFLAG=0 @@ -178,10 +178,10 @@ dnl Check for OpenGL unless disabled... GLLIB= if test x$enable_gl != xno; then + SAVE_ac_cpp=$ac_cpp + ac_cpp="$ac_cpp -I$x_includes" 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), \ + AC_CHECK_LIB(GLU, gluCylinder, AC_DEFINE(HAVE_GL) GLLIB="-lGL", \ -lX11 -lXext $X_EXTRA_LIBS -lm) ) AC_CHECK_HEADER(GL/glu.h, @@ -189,19 +189,20 @@ if test x$enable_gl != xno; then 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 ) + ac_cpp=$SAVE_ac_cpp fi AC_SUBST(GLLIB) dnl Check for the Xdbe extension... +SAVE_ac_cpp=$ac_cpp +ac_cpp="$ac_cpp -I$x_includes" AC_CHECK_HEADER(X11/extensions/Xdbe.h, \ if test "$uname" != "SunOS"; then AC_DEFINE(HAVE_XDBE) fi) +ac_cpp=$SAVE_ac_cpp dnl Check for overlay visuals... AC_CACHE_CHECK("for X overlay visuals", ac_cv_have_overlay, @@ -263,20 +264,6 @@ if test -n "$GXX"; then # Use gcc instead of c++ or g++, since we don't need the C++ # library to depend on... CXX="$CC" - CFLAGS="-Wall $CFLAGS" - CXXFLAGS="-Wall $CXXFLAGS" - if test -z "$DEBUGFLAG"; then - # - # Note: Can't use -fomit-frame-pointer - prevents tools like - # libsafe from working! - # - # Don't use -fforce-mem, -fforce-addr, or -fcaller-saves. - # They all seem to make either no difference or enlarge - # the code by a few hundred bytes. - # - CFLAGS="-O2 $CFLAGS" - CXXFLAGS="-O2 $CXXFLAGS" - fi if test $PICFLAG = 1; then CFLAGS="-fPIC $CFLAGS" CXXFLAGS="-fPIC $CXXFLAGS"