r542: no message
[ctsim.git] / configure.in
index b6f6fa3cba13e651be438ed5c112de83aa750d69..7c0189c103aac5663994024f75d9a04767952709 100644 (file)
@@ -47,6 +47,7 @@ AC_CHECK_LIB(wx_gtk, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS)])
 AC_CHECK_LIB(wx, main, [wxwin=true; wx_msw=true; AC_DEFINE(HAVE_WXWINDOWS)])
 AC_CHECK_LIB(hdf5, main, [hdf5=true], [hdf5=false], -lz)
 AC_CHECK_LIB(fftw, fftw_one, [fftw=true; AC_DEFINE(HAVE_FFTW)], [fftw=false])
+AC_CHECK_LIB(GL, main, [libgl=true], [libgl=false])
 
 if test "$zlib" = "true" ; then
   AC_CHECK_LIB(png, main, [png=true ; AC_DEFINE(HAVE_PNG)], [png=false])
@@ -307,13 +308,16 @@ if test "$no_x" != "yes" ; then
   AM_CONDITIONAL(HAVE_SGP, test 1==1)
   AC_DEFINE(HAVE_X11)
   LDFLAGS="$LDFLAGS -L../libctgraphics -L/usr/X11R6/lib"
-  ctlibs_graphics="$ctlibs_base -lctgraphics"
+  ctlib_graphics="$ctlibs_base -lctgraphics"
   AC_MSG_RESULT(yes)
   if test "$g2" = "true" ; then
-  ctlibs_graphics="$ctlibs_graphics -lg2"
-  AC_DEFINE(HAVE_G2)
+    ctlib_graphics="$ctlib_graphics -lg2"
+    AC_DEFINE(HAVE_G2)
   fi   
-  ctlibs_graphics="$ctlibs_graphics $X_BASIC_LIBS $X_TOOLKIT_LIBS"
+  ctlib_graphics="$ctlib_graphics $X_BASIC_LIBS $X_TOOLKIT_LIBS"
+  if test "$libgl" = "true" ; then
+    ctlib_graphics="$ctlib_graphics -lwx_gtk_gl -lglut -lGL -lGLU"
+  fi
 else
   if test "$wxwin" = "true" ; then
     AC_DEFINE(HAVE_SGP)
@@ -364,7 +368,7 @@ if test "$wxwin" = "true" ; then
    wxlibs="-lwx -lglui -ljpeg -lxpm -lzlib -ltiff"
   fi
   CFLAGS="$CFLAGS -I../include $wxcflags"
-  ctlibs_graphics="$ctlibs_graphics $wxlibs"
+  ctlib_graphics="$ctlib_graphics $wxlibs"
   AM_CONDITIONAL(HAVE_WXWINDOWS, test 1==1 )
 fi
 AC_SUBST(wxcflags)
@@ -372,7 +376,7 @@ AC_SUBST(wxlibs)
 
 dnl Setting projet libraries and includes
 LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim" 
-ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools"
+ctlibs="$ctlibs_base -lctsim $ctlib_graphics -lctsupport $ctlibs_tools"
 AC_SUBST(ctlibs)
 
 if test -n "$lamdir" ; then
@@ -384,4 +388,4 @@ fi
 
 CXXFLAGS="$CFLAGS"
 
-AC_OUTPUT(Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile Makefile man/Makefile doc/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile tools/sample-ctsim.sh cgi-bin/ctsim.conf tools/Makefile src/Makefile doc/tex2rtf/Makefile)
+AC_OUTPUT(Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile Makefile man/Makefile doc/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile tools/sample-ctsim.sh cgi-bin/ctsim.conf tools/Makefile src/Makefile)