1
0
Fork 0

make --enable-osgviewer the default

From Till Busch
This commit is contained in:
timoore 2008-04-25 21:29:03 +00:00
parent a04d4cbed6
commit de277df8b8
2 changed files with 22 additions and 17 deletions

View file

@ -197,20 +197,25 @@ AC_SEARCH_LIBS(dlclose, dl)
base_LIBS="$LIBS" base_LIBS="$LIBS"
dnl Check for SDL if enabled. dnl Check for SDL or glut if enabled.
AC_ARG_ENABLE(sdl, [ --enable-sdl Configure to use SDL instead of GLUT], [enable_sdl="$enableval"]) AC_ARG_ENABLE(osgviewer, [ --enable-osgviewer Configure to use osgViewer(default)], [enable_osgviewer="$enableval"])
AC_ARG_ENABLE(osgviewer, [ --enable-osgviewer Configure to use osgViewer], [enable_osgviewer="$enableval"]) AC_ARG_ENABLE(sdl, [ --enable-sdl Configure to use SDL], [enable_sdl="$enableval"])
AC_ARG_ENABLE(glut, [ --enable-glut Configure to use GLUT], [enable_glut="$enableval"])
AM_CONDITIONAL(USE_SDL, test "x$enable_sdl" = "xyes") AM_CONDITIONAL(USE_SDL, test "x$enable_sdl" = "xyes")
AM_CONDITIONAL(USE_OSGVIEWER, test "x$enable_osgviewer" = "xyes") AM_CONDITIONAL(USE_GLUT, test "x$enable_glut" = "xyes")
if test "x$enable_sdl" = "xyes"; then if test "x$enable_sdl" != "xyes" -a "x$enable_glut" != "xyes" -a "x$enable_osgviewer" != "xno"; then
AC_DEFINE([PU_USE_SDL], 1, [Define to use SDL]) enable_osgviewer="yes"
else fi
if test "x$enable_osgviewer" = "xyes"; then if test "x$enable_osgviewer" = "xyes"; then
AC_DEFINE([USE_OSGVIEWER], 1, [Define to use osgViewer in renderer])
AC_DEFINE([ENABLE_OSGVIEWER], 1, [Define to use osgViewer in renderer]) AC_DEFINE([ENABLE_OSGVIEWER], 1, [Define to use osgViewer in renderer])
AC_DEFINE([PU_USE_NATIVE], 1, [Define to use native system]) AC_DEFINE([PU_USE_NATIVE], 1, [Define to use native system])
else elif test "x$enable_sdl" = "xyes"; then
AC_DEFINE([PU_USE_SDL], 1, [Define to use SDL])
elif test "x$enable_glut" = "xyes"; then
AC_DEFINE([PU_USE_GLUT], 1, [Define to use glut]) AC_DEFINE([PU_USE_GLUT], 1, [Define to use glut])
fi else
AC_MSG_ERROR([One (and only one) of --enable-osgviewer, --enable-sdl, or --enable-glut must be supplied])
fi fi
AC_ARG_ENABLE(osgdebug, [ --enable-osgdebug Use OSG debug libraries], [enable_osgdebug="$enableval"]) AC_ARG_ENABLE(osgdebug, [ --enable-osgdebug Use OSG debug libraries], [enable_osgdebug="$enableval"])

View file

@ -19,10 +19,10 @@ GFX_COMMON = fg_os_common.cxx fg_os.hxx
if USE_SDL if USE_SDL
GFX_CODE = fg_os_sdl.cxx $(GFX_COMMON) GFX_CODE = fg_os_sdl.cxx $(GFX_COMMON)
else else
if USE_OSGVIEWER if USE_GLUT
GFX_CODE = fg_os_osgviewer.cxx $(GFX_COMMON)
else
GFX_CODE = fg_os.cxx $(GFX_COMMON) GFX_CODE = fg_os.cxx $(GFX_COMMON)
else
GFX_CODE = fg_os_osgviewer.cxx $(GFX_COMMON)
endif endif
endif endif