diff --git a/configure.ac b/configure.ac index 9a2b50ea7..0ae3d55b6 100644 --- a/configure.ac +++ b/configure.ac @@ -213,6 +213,9 @@ else fi fi +AC_ARG_ENABLE(osgdebug, [ --enable-osgdebug Use OSG debug libraries], [enable_osgdebug="$enableval"]) +AM_CONDITIONAL(USE_OSGDEBUG, test "x$enable_osgdebug" = "xyes") + dnl check for OpenGL related libraries case "${host}" in *-*-cygwin* | *-*-mingw32*) diff --git a/src/Main/Makefile.am b/src/Main/Makefile.am index 37838c9bc..f19702c2e 100644 --- a/src/Main/Makefile.am +++ b/src/Main/Makefile.am @@ -25,6 +25,12 @@ GFX_CODE = fg_os.cxx fg_os.hxx endif endif +if USE_OSGDEBUG +OSG_LIBS = -losgViewerd -losgGAd -losgTextd -losgFXd -losgUtild -losgDBd -losgSimd -losgd -lOpenThreadsd +else +OSG_LIBS = -losgViewer -losgGA -losgText -losgFX -losgUtil -losgDB -losgSim -losg -lOpenThreads +endif + JSBSIM_LIBS = \ $(top_builddir)/src/FDM/JSBSim/libJSBSim.a \ $(top_builddir)/src/FDM/JSBSim/initialization/libInit.a \ @@ -104,7 +110,7 @@ fgfs_LDADD = \ -lsgstructure -lsgenvironment \ -lplibpuaux -lplibpu -lplibfnt -lplibjs -lplibnet \ -lplibsg -lplibul \ - -losgViewer -losgGA -losgText -losgFX -losgUtil -losgDB -losgSim -losg -lOpenThreads \ + $(OSG_LIBS) \ $(THREAD_LIBS) \ $(network_LIBS) \ -lz \