Changeset 11622


Ignore:
Timestamp:
07/26/11 17:42:19 (13 years ago)
Author:
tbretz
Message:
Added checks for GL, GLU and QtOpenGL
Location:
trunk/FACT++
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/configure

    r11620 r11622  
    753753HAS_VIEWER_FALSE
    754754HAS_VIEWER_TRUE
     755HAS_GLU_FALSE
     756HAS_GLU_TRUE
     757HAS_GL_FALSE
     758HAS_GL_TRUE
    755759HAS_FITS_H_FALSE
    756760HAS_FITS_H_TRUE
     
    10421046with_zlib_include
    10431047with_zlib_libdir
     1048with_GL
     1049with_GL_include
     1050with_GL_libdir
     1051with_GLU
     1052with_GLU_include
     1053with_GLU_libdir
    10441054with_cfitsio
    10451055with_cfitsio_include
     
    10651075with_qt4_includes
    10661076with_qt4_libraries
     1077with_QGL
     1078with_QGL_include
     1079with_QGL_libdir
    10671080with_root
    10681081with_rootsys
     
    17501763  --with-zlib-libdir=DIR        specify exact library dir for zlib library (e.g. libz)
    17511764  --without-zlib        disables zlib usage completely
     1765  --with-GL=DIR root directory of GL installation
     1766  --with-GL-include=DIR        specify exact include dir for GL headers (e.g. GL/gl.h)
     1767  --with-GL-libdir=DIR        specify exact library dir for GL library (e.g. libGL)
     1768  --without-GL        disables GL usage completely
     1769  --with-GLU=DIR        root directory of GLU installation
     1770  --with-GLU-include=DIR        specify exact include dir for GLU headers (e.g. GL/glu.h)
     1771  --with-GLU-libdir=DIR        specify exact library dir for GLU library (e.g. libGLU)
     1772  --without-GLU        disables GLU usage completely
    17521773  --with-cfitsio=DIR    root directory of cfitsio installation
    17531774  --with-cfitsio-include=DIR        specify exact include dir for cfitsio headers (e.g. fitsio.h)
     
    18041825  --with-qt4-includes     where the Qt 4 includes are
    18051826  --with-qt4-libraries    where the Qt 4 library is installed
     1827  --with-QGL=DIR        root directory of QGL installation
     1828  --with-QGL-include=DIR        specify exact include dir for QGL headers (e.g. QtOpenGL/QGlWidget)
     1829  --with-QGL-libdir=DIR        specify exact library dir for QGL library (e.g. libQtOpenGL)
     1830  --without-QGL        disables QGL usage completely
    18061831  --without-root          Disable root, i.e. disable gui support.
    18071832  --with-rootsys          path to the ROOT executables or top ROOT
     
    48104835  lt_cv_nm_interface="BSD nm"
    48114836  echo "int some_variable = 0;" > conftest.$ac_ext
    4812   (eval echo "\"\$as_me:4812: $ac_compile\"" >&5)
     4837  (eval echo "\"\$as_me:4837: $ac_compile\"" >&5)
    48134838  (eval "$ac_compile" 2>conftest.err)
    48144839  cat conftest.err >&5
    4815   (eval echo "\"\$as_me:4815: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
     4840  (eval echo "\"\$as_me:4840: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    48164841  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
    48174842  cat conftest.err >&5
    4818   (eval echo "\"\$as_me:4818: output\"" >&5)
     4843  (eval echo "\"\$as_me:4843: output\"" >&5)
    48194844  cat conftest.out >&5
    48204845  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     
    60216046*-*-irix6*)
    60226047  # Find out which ABI we are using.
    6023   echo '#line 6023 "configure"' > conftest.$ac_ext
     6048  echo '#line 6048 "configure"' > conftest.$ac_ext
    60246049  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    60256050  (eval $ac_compile) 2>&5
     
    76827707   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    76837708   -e 's:$: $lt_compiler_flag:'`
    7684    (eval echo "\"\$as_me:7684: $lt_compile\"" >&5)
     7709   (eval echo "\"\$as_me:7709: $lt_compile\"" >&5)
    76857710   (eval "$lt_compile" 2>conftest.err)
    76867711   ac_status=$?
    76877712   cat conftest.err >&5
    7688    echo "$as_me:7688: \$? = $ac_status" >&5
     7713   echo "$as_me:7713: \$? = $ac_status" >&5
    76897714   if (exit $ac_status) && test -s "$ac_outfile"; then
    76907715     # The compiler can only warn and ignore the option if not recognized
     
    80218046   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    80228047   -e 's:$: $lt_compiler_flag:'`
    8023    (eval echo "\"\$as_me:8023: $lt_compile\"" >&5)
     8048   (eval echo "\"\$as_me:8048: $lt_compile\"" >&5)
    80248049   (eval "$lt_compile" 2>conftest.err)
    80258050   ac_status=$?
    80268051   cat conftest.err >&5
    8027    echo "$as_me:8027: \$? = $ac_status" >&5
     8052   echo "$as_me:8052: \$? = $ac_status" >&5
    80288053   if (exit $ac_status) && test -s "$ac_outfile"; then
    80298054     # The compiler can only warn and ignore the option if not recognized
     
    81268151   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    81278152   -e 's:$: $lt_compiler_flag:'`
    8128    (eval echo "\"\$as_me:8128: $lt_compile\"" >&5)
     8153   (eval echo "\"\$as_me:8153: $lt_compile\"" >&5)
    81298154   (eval "$lt_compile" 2>out/conftest.err)
    81308155   ac_status=$?
    81318156   cat out/conftest.err >&5
    8132    echo "$as_me:8132: \$? = $ac_status" >&5
     8157   echo "$as_me:8157: \$? = $ac_status" >&5
    81338158   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    81348159   then
     
    81818206   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    81828207   -e 's:$: $lt_compiler_flag:'`
    8183    (eval echo "\"\$as_me:8183: $lt_compile\"" >&5)
     8208   (eval echo "\"\$as_me:8208: $lt_compile\"" >&5)
    81848209   (eval "$lt_compile" 2>out/conftest.err)
    81858210   ac_status=$?
    81868211   cat out/conftest.err >&5
    8187    echo "$as_me:8187: \$? = $ac_status" >&5
     8212   echo "$as_me:8212: \$? = $ac_status" >&5
    81888213   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    81898214   then
     
    1056510590  lt_status=$lt_dlunknown
    1056610591  cat > conftest.$ac_ext <<_LT_EOF
    10567 #line 10567 "configure"
     10592#line 10592 "configure"
    1056810593#include "confdefs.h"
    1056910594
     
    1066110686  lt_status=$lt_dlunknown
    1066210687  cat > conftest.$ac_ext <<_LT_EOF
    10663 #line 10663 "configure"
     10688#line 10688 "configure"
    1066410689#include "confdefs.h"
    1066510690
     
    1261712642   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1261812643   -e 's:$: $lt_compiler_flag:'`
    12619    (eval echo "\"\$as_me:12619: $lt_compile\"" >&5)
     12644   (eval echo "\"\$as_me:12644: $lt_compile\"" >&5)
    1262012645   (eval "$lt_compile" 2>conftest.err)
    1262112646   ac_status=$?
    1262212647   cat conftest.err >&5
    12623    echo "$as_me:12623: \$? = $ac_status" >&5
     12648   echo "$as_me:12648: \$? = $ac_status" >&5
    1262412649   if (exit $ac_status) && test -s "$ac_outfile"; then
    1262512650     # The compiler can only warn and ignore the option if not recognized
     
    1271612741   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1271712742   -e 's:$: $lt_compiler_flag:'`
    12718    (eval echo "\"\$as_me:12718: $lt_compile\"" >&5)
     12743   (eval echo "\"\$as_me:12743: $lt_compile\"" >&5)
    1271912744   (eval "$lt_compile" 2>out/conftest.err)
    1272012745   ac_status=$?
    1272112746   cat out/conftest.err >&5
    12722    echo "$as_me:12722: \$? = $ac_status" >&5
     12747   echo "$as_me:12747: \$? = $ac_status" >&5
    1272312748   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1272412749   then
     
    1276812793   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1276912794   -e 's:$: $lt_compiler_flag:'`
    12770    (eval echo "\"\$as_me:12770: $lt_compile\"" >&5)
     12795   (eval echo "\"\$as_me:12795: $lt_compile\"" >&5)
    1277112796   (eval "$lt_compile" 2>out/conftest.err)
    1277212797   ac_status=$?
    1277312798   cat out/conftest.err >&5
    12774    echo "$as_me:12774: \$? = $ac_status" >&5
     12799   echo "$as_me:12799: \$? = $ac_status" >&5
    1277512800   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1277612801   then
     
    1834518370
    1834618371
     18372# Check for GL and GLU needed for the raw event viewer
     18373
     18374
     18375
     18376# Check whether --with-GL was given.
     18377if test "${with_GL+set}" = set; then :
     18378  withval=$with_GL; with_GL=$withval
     18379if test "${with_GL}" != yes; then
     18380        GL_include="$withval/include"
     18381        GL_libdir="$withval/lib"
     18382fi
     18383
     18384fi
     18385
     18386
     18387
     18388# Check whether --with-GL-include was given.
     18389if test "${with_GL_include+set}" = set; then :
     18390  withval=$with_GL_include; GL_include="$withval"
     18391fi
     18392
     18393
     18394
     18395# Check whether --with-GL-libdir was given.
     18396if test "${with_GL_libdir+set}" = set; then :
     18397  withval=$with_GL_libdir; GL_libdir="$withval"
     18398fi
     18399
     18400
     18401if test "${with_GL}" != no ; then
     18402        OLD_LIBS=$LIBS
     18403        OLD_LDFLAGS=$LDFLAGS
     18404        OLD_CFLAGS=$CFLAGS
     18405        OLD_CPPFLAGS=$CPPFLAGS
     18406
     18407        if test "${GL_libdir}" ; then
     18408                LDFLAGS="$LDFLAGS -L${GL_libdir}"
     18409        fi
     18410        if test "${GL_include}" ; then
     18411                CPPFLAGS="$CPPFLAGS -I${GL_include}"
     18412                CFLAGS="$CFLAGS -I${GL_include}"
     18413        fi
     18414
     18415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glLoadIdentity in -lGL" >&5
     18416$as_echo_n "checking for glLoadIdentity in -lGL... " >&6; }
     18417if test "${ac_cv_lib_GL_glLoadIdentity+set}" = set; then :
     18418  $as_echo_n "(cached) " >&6
     18419else
     18420  ac_check_lib_save_LIBS=$LIBS
     18421LIBS="-lGL  $LIBS"
     18422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     18423/* end confdefs.h.  */
     18424
     18425/* Override any GCC internal prototype to avoid an error.
     18426   Use char because int might match the return type of a GCC
     18427   builtin and then its argument prototype would still apply.  */
     18428#ifdef __cplusplus
     18429extern "C"
     18430#endif
     18431char glLoadIdentity ();
     18432int
     18433main ()
     18434{
     18435return glLoadIdentity ();
     18436  ;
     18437  return 0;
     18438}
     18439_ACEOF
     18440if ac_fn_c_try_link "$LINENO"; then :
     18441  ac_cv_lib_GL_glLoadIdentity=yes
     18442else
     18443  ac_cv_lib_GL_glLoadIdentity=no
     18444fi
     18445rm -f core conftest.err conftest.$ac_objext \
     18446    conftest$ac_exeext conftest.$ac_ext
     18447LIBS=$ac_check_lib_save_LIBS
     18448fi
     18449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glLoadIdentity" >&5
     18450$as_echo "$ac_cv_lib_GL_glLoadIdentity" >&6; }
     18451if test "x$ac_cv_lib_GL_glLoadIdentity" = x""yes; then :
     18452  cat >>confdefs.h <<_ACEOF
     18453#define HAVE_LIBGL 1
     18454_ACEOF
     18455
     18456  LIBS="-lGL $LIBS"
     18457
     18458else
     18459  no_good=yes
     18460fi
     18461
     18462        ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
     18463if test "x$ac_cv_header_GL_gl_h" = x""yes; then :
     18464
     18465else
     18466  no_good=yes
     18467fi
     18468
     18469
     18470        if test "$no_good" = yes; then
     18471                HAVE_GL=no
     18472
     18473                LIBS=$OLD_LIBS
     18474                LDFLAGS=$OLD_LDFLAGS
     18475                CPPFLAGS=$OLD_CPPFLAGS
     18476                CFLAGS=$OLD_CFLAGS
     18477        else
     18478                HAVE_GL=yes
     18479
     18480                $as_echo "#define HAVE_PKG_GL 1" >>confdefs.h
     18481
     18482        fi
     18483
     18484fi
     18485
     18486
     18487
     18488
     18489
     18490# Check whether --with-GLU was given.
     18491if test "${with_GLU+set}" = set; then :
     18492  withval=$with_GLU; with_GLU=$withval
     18493if test "${with_GLU}" != yes; then
     18494        GLU_include="$withval/include"
     18495        GLU_libdir="$withval/lib"
     18496fi
     18497
     18498fi
     18499
     18500
     18501
     18502# Check whether --with-GLU-include was given.
     18503if test "${with_GLU_include+set}" = set; then :
     18504  withval=$with_GLU_include; GLU_include="$withval"
     18505fi
     18506
     18507
     18508
     18509# Check whether --with-GLU-libdir was given.
     18510if test "${with_GLU_libdir+set}" = set; then :
     18511  withval=$with_GLU_libdir; GLU_libdir="$withval"
     18512fi
     18513
     18514
     18515if test "${with_GLU}" != no ; then
     18516        OLD_LIBS=$LIBS
     18517        OLD_LDFLAGS=$LDFLAGS
     18518        OLD_CFLAGS=$CFLAGS
     18519        OLD_CPPFLAGS=$CPPFLAGS
     18520
     18521        if test "${GLU_libdir}" ; then
     18522                LDFLAGS="$LDFLAGS -L${GLU_libdir}"
     18523        fi
     18524        if test "${GLU_include}" ; then
     18525                CPPFLAGS="$CPPFLAGS -I${GLU_include}"
     18526                CFLAGS="$CFLAGS -I${GLU_include}"
     18527        fi
     18528
     18529        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gluNewTess in -lGLU" >&5
     18530$as_echo_n "checking for gluNewTess in -lGLU... " >&6; }
     18531if test "${ac_cv_lib_GLU_gluNewTess+set}" = set; then :
     18532  $as_echo_n "(cached) " >&6
     18533else
     18534  ac_check_lib_save_LIBS=$LIBS
     18535LIBS="-lGLU  $LIBS"
     18536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     18537/* end confdefs.h.  */
     18538
     18539/* Override any GCC internal prototype to avoid an error.
     18540   Use char because int might match the return type of a GCC
     18541   builtin and then its argument prototype would still apply.  */
     18542#ifdef __cplusplus
     18543extern "C"
     18544#endif
     18545char gluNewTess ();
     18546int
     18547main ()
     18548{
     18549return gluNewTess ();
     18550  ;
     18551  return 0;
     18552}
     18553_ACEOF
     18554if ac_fn_c_try_link "$LINENO"; then :
     18555  ac_cv_lib_GLU_gluNewTess=yes
     18556else
     18557  ac_cv_lib_GLU_gluNewTess=no
     18558fi
     18559rm -f core conftest.err conftest.$ac_objext \
     18560    conftest$ac_exeext conftest.$ac_ext
     18561LIBS=$ac_check_lib_save_LIBS
     18562fi
     18563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLU_gluNewTess" >&5
     18564$as_echo "$ac_cv_lib_GLU_gluNewTess" >&6; }
     18565if test "x$ac_cv_lib_GLU_gluNewTess" = x""yes; then :
     18566  cat >>confdefs.h <<_ACEOF
     18567#define HAVE_LIBGLU 1
     18568_ACEOF
     18569
     18570  LIBS="-lGLU $LIBS"
     18571
     18572else
     18573  no_good=yes
     18574fi
     18575
     18576        ac_fn_c_check_header_mongrel "$LINENO" "GL/glu.h" "ac_cv_header_GL_glu_h" "$ac_includes_default"
     18577if test "x$ac_cv_header_GL_glu_h" = x""yes; then :
     18578
     18579else
     18580  no_good=yes
     18581fi
     18582
     18583
     18584        if test "$no_good" = yes; then
     18585                HAVE_GLU=no
     18586
     18587                LIBS=$OLD_LIBS
     18588                LDFLAGS=$OLD_LDFLAGS
     18589                CPPFLAGS=$OLD_CPPFLAGS
     18590                CFLAGS=$OLD_CFLAGS
     18591        else
     18592                HAVE_GLU=yes
     18593
     18594                $as_echo "#define HAVE_PKG_GLU 1" >>confdefs.h
     18595
     18596        fi
     18597
     18598fi
     18599
     18600
     18601
     18602# Taken from http://code.google.com/p/autoconf-gl-macros/
     18603#AX_CHECK_GL
     18604#AX_CHECK_GLU
     18605#AX_CHECK_GLUT
     18606
     18607# Check for the fits header and zstream support from MARS
    1834718608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gui/RawEventsViewer/izstream.h" >&5
    1834818609$as_echo_n "checking for gui/RawEventsViewer/izstream.h... " >&6; }
     
    2186022121
    2186122122                cat > conftest.$ac_ext <<EOF
    21862 #line 21862 "configure"
     22123#line 22123 "configure"
    2186322124#include "confdefs.h"
    2186422125#include <qglobal.h>
     
    2202322284
    2202422285
     22286
     22287
     22288
     22289# Check whether --with-QGL was given.
     22290if test "${with_QGL+set}" = set; then :
     22291  withval=$with_QGL; with_QGL=$withval
     22292if test "${with_QGL}" != yes; then
     22293        QGL_include="$withval/include"
     22294        QGL_libdir="$withval/lib"
     22295fi
     22296
     22297fi
     22298
     22299
     22300
     22301# Check whether --with-QGL-include was given.
     22302if test "${with_QGL_include+set}" = set; then :
     22303  withval=$with_QGL_include; QGL_include="$withval"
     22304fi
     22305
     22306
     22307
     22308# Check whether --with-QGL-libdir was given.
     22309if test "${with_QGL_libdir+set}" = set; then :
     22310  withval=$with_QGL_libdir; QGL_libdir="$withval"
     22311fi
     22312
     22313
     22314if test "${with_QGL}" != no ; then
     22315        OLD_LIBS=$LIBS
     22316        OLD_LDFLAGS=$LDFLAGS
     22317        OLD_CFLAGS=$CFLAGS
     22318        OLD_CPPFLAGS=$CPPFLAGS
     22319
     22320        if test "${QGL_libdir}" ; then
     22321                LDFLAGS="$LDFLAGS -L${QGL_libdir}"
     22322        fi
     22323        if test "${QGL_include}" ; then
     22324                CPPFLAGS="$CPPFLAGS -I${QGL_include}"
     22325                CFLAGS="$CFLAGS -I${QGL_include}"
     22326        fi
     22327
     22328        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lQtOpenGL" >&5
     22329$as_echo_n "checking for main in -lQtOpenGL... " >&6; }
     22330if test "${ac_cv_lib_QtOpenGL_main+set}" = set; then :
     22331  $as_echo_n "(cached) " >&6
     22332else
     22333  ac_check_lib_save_LIBS=$LIBS
     22334LIBS="-lQtOpenGL  $LIBS"
     22335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     22336/* end confdefs.h.  */
     22337
     22338
     22339int
     22340main ()
     22341{
     22342return main ();
     22343  ;
     22344  return 0;
     22345}
     22346_ACEOF
     22347if ac_fn_cxx_try_link "$LINENO"; then :
     22348  ac_cv_lib_QtOpenGL_main=yes
     22349else
     22350  ac_cv_lib_QtOpenGL_main=no
     22351fi
     22352rm -f core conftest.err conftest.$ac_objext \
     22353    conftest$ac_exeext conftest.$ac_ext
     22354LIBS=$ac_check_lib_save_LIBS
     22355fi
     22356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_QtOpenGL_main" >&5
     22357$as_echo "$ac_cv_lib_QtOpenGL_main" >&6; }
     22358if test "x$ac_cv_lib_QtOpenGL_main" = x""yes; then :
     22359  cat >>confdefs.h <<_ACEOF
     22360#define HAVE_LIBQTOPENGL 1
     22361_ACEOF
     22362
     22363  LIBS="-lQtOpenGL $LIBS"
     22364
     22365else
     22366  no_good=yes
     22367fi
     22368
     22369        ac_fn_cxx_check_header_mongrel "$LINENO" "QtOpenGL/QGlWidget" "ac_cv_header_QtOpenGL_QGlWidget" "$ac_includes_default"
     22370if test "x$ac_cv_header_QtOpenGL_QGlWidget" = x""yes; then :
     22371
     22372else
     22373  no_good=yes
     22374fi
     22375
     22376
     22377        if test "$no_good" = yes; then
     22378
     22379
     22380                LIBS=$OLD_LIBS
     22381                LDFLAGS=$OLD_LDFLAGS
     22382                CPPFLAGS=$OLD_CPPFLAGS
     22383                CFLAGS=$OLD_CFLAGS
     22384        else
     22385
     22386
     22387                $as_echo "#define HAVE_PKG_QGL 1" >>confdefs.h
     22388
     22389        fi
     22390
     22391fi
     22392
     22393
     22394
     22395
    2202522396######################################################################
    2202622397# ROOT SUPPORT
     
    2258522956fi
    2258622957
    22587 
    22588  if test "$HAVE_FITS_H" = yes; then
     22958 if test "$HAVE_GL" = yes; then
     22959  HAS_GL_TRUE=
     22960  HAS_GL_FALSE='#'
     22961else
     22962  HAS_GL_TRUE='#'
     22963  HAS_GL_FALSE=
     22964fi
     22965
     22966 if test "$HAVE_GLU" = yes; then
     22967  HAS_GLU_TRUE=
     22968  HAS_GLU_FALSE='#'
     22969else
     22970  HAS_GLU_TRUE='#'
     22971  HAS_GLU_FALSE=
     22972fi
     22973
     22974
     22975 if test "$QT4_VERSION" -a "$HAVE_FITS_H" = yes -a "$HAVE_GL" = yes -a "$HAVE_GLU" = yes; then
    2258922976  HAS_VIEWER_TRUE=
    2259022977  HAS_VIEWER_FALSE='#'
     
    2295523342if test -z "${HAS_FITS_H_TRUE}" && test -z "${HAS_FITS_H_FALSE}"; then
    2295623343  as_fn_error $? "conditional \"HAS_FITS_H\" was never defined.
     23344Usually this means the macro was only invoked conditionally." "$LINENO" 5
     23345fi
     23346if test -z "${HAS_GL_TRUE}" && test -z "${HAS_GL_FALSE}"; then
     23347  as_fn_error $? "conditional \"HAS_GL\" was never defined.
     23348Usually this means the macro was only invoked conditionally." "$LINENO" 5
     23349fi
     23350if test -z "${HAS_GLU_TRUE}" && test -z "${HAS_GLU_FALSE}"; then
     23351  as_fn_error $? "conditional \"HAS_GLU\" was never defined.
    2295723352Usually this means the macro was only invoked conditionally." "$LINENO" 5
    2295823353fi
     
    2535525750{ $as_echo "$as_me:${as_lineno-$LINENO}:  gui/RawEventsViewer/fits.h                 found: $HAVE_FITS_H" >&5
    2535625751$as_echo "$as_me:  gui/RawEventsViewer/fits.h                 found: $HAVE_FITS_H" >&6;}
     25752{ $as_echo "$as_me:${as_lineno-$LINENO}:  GL                     / GL/gl.h           found: $HAVE_GL" >&5
     25753$as_echo "$as_me:  GL                     / GL/gl.h           found: $HAVE_GL" >&6;}
     25754{ $as_echo "$as_me:${as_lineno-$LINENO}:  GLU                    / GL/glu.h          found: $HAVE_GLU" >&5
     25755$as_echo "$as_me:  GLU                    / GL/glu.h          found: $HAVE_GLU" >&6;}
    2535725756{ $as_echo "$as_me:${as_lineno-$LINENO}:  cfitsio                / 'fitsio.h'        found: $HAVE_CFITSIO" >&5
    2535825757$as_echo "$as_me:  cfitsio                / 'fitsio.h'        found: $HAVE_CFITSIO" >&6;}
     
    2556125960
    2556225961fi
     25962if test "$HAVE_GL" = yes; then
     25963  :
     25964else
     25965  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  GL not found - viewer will be disabled." >&5
     25966$as_echo "$as_me: WARNING:  GL not found - viewer will be disabled." >&2;}
     25967fi
     25968if test "$HAVE_GLU" = yes; then
     25969  :
     25970else
     25971  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  GLU not found - viewer will be disabled." >&5
     25972$as_echo "$as_me: WARNING:  GLU not found - viewer will be disabled." >&2;}
     25973fi
     25974
     25975if test -n "$QT4_VERSION"; then
     25976  :
     25977else
     25978  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  QT4 missing: fact and viewer GUI disabled!" >&5
     25979$as_echo "$as_me: WARNING:  QT4 missing: fact and viewer GUI disabled!" >&2;}
     25980
     25981fi
    2556325982if test "$QT4_VERSION" -a "$HAVE_ROOT_QT" = yes; then
    2556425983  :
    2556525984else
    25566   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  Either QT4 or qt-root is missing: GUIs disabled!" >&5
    25567 $as_echo "$as_me: WARNING:  Either QT4 or qt-root is missing: GUIs disabled!" >&2;}
     25985  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:  Either QT4 or qt-root is missing: fact GUI disabled!" >&5
     25986$as_echo "$as_me: WARNING:  Either QT4 or qt-root is missing: fact GUI disabled!" >&2;}
    2556825987
    2556925988fi
  • trunk/FACT++/configure.ac

    r11620 r11622  
    111111                 HAVE_ZLIB=yes, HAVE_ZLIB=no)
    112112
     113# Check for GL and GLU needed for the raw event viewer
     114AC_CHECK_PACKAGE(GL, glLoadIdentity, GL, GL/gl.h, HAVE_GL=yes, HAVE_GL=no)
     115AC_CHECK_PACKAGE(GLU, gluNewTess, GLU, GL/glu.h, HAVE_GLU=yes, HAVE_GLU=no)
     116
     117# Taken from http://code.google.com/p/autoconf-gl-macros/
     118#AX_CHECK_GL
     119#AX_CHECK_GLU
     120#AX_CHECK_GLUT
     121
     122# Check for the fits header and zstream support from MARS
    113123AC_CHECK_FILE(gui/RawEventsViewer/izstream.h,
    114124                HAVE_IZSTREAM_H=yes, HAVE_IZSTREAM_H=no)
     
    216226   [], [QT4_DO_IT_ALL])
    217227
     228AC_CHECK_PACKAGE(QGL, main, QtOpenGL, QtOpenGL/QGlWidget)
     229
     230
    218231######################################################################
    219232# ROOT SUPPORT
     
    294307AM_CONDITIONAL(HAS_IZSTREAM_H,[test "$HAVE_IZSTREAM_H" = yes])
    295308AM_CONDITIONAL(HAS_FITS_H,    [test "$HAVE_FITS_H" = yes])
    296 
    297 AM_CONDITIONAL(HAS_VIEWER,    [test "$HAVE_FITS_H" = yes])
     309AM_CONDITIONAL(HAS_GL,        [test "$HAVE_GL" = yes])
     310AM_CONDITIONAL(HAS_GLU,       [test "$HAVE_GLU" = yes])
     311
     312AM_CONDITIONAL(HAS_VIEWER,    [test "$QT4_VERSION" -a "$HAVE_FITS_H" = yes -a "$HAVE_GL" = yes -a "$HAVE_GLU" = yes])
    298313
    299314AM_CONDITIONAL(IS_FALSE,      [test "x" = "y"])
     
    359374AC_MSG_NOTICE([ gui/RawEventsViewer/izstream.h             found: $HAVE_IZSTREAM_H])
    360375AC_MSG_NOTICE([ gui/RawEventsViewer/fits.h                 found: $HAVE_FITS_H])
     376AC_MSG_NOTICE([ GL                     / GL/gl.h           found: $HAVE_GL])
     377AC_MSG_NOTICE([ GLU                    / GL/glu.h          found: $HAVE_GLU])
    361378AC_MSG_NOTICE([ cfitsio                / 'fitsio.h'        found: $HAVE_CFITSIO])
    362379AC_MSG_NOTICE([ CCfits                 / 'CCfits/CCfits'   found: $HAVE_CCFITS])
     
    461478   )]
    462479)
     480AM_COND_IF(HAS_GL,,  AC_MSG_WARN([ GL not found - viewer will be disabled.]))
     481AM_COND_IF(HAS_GLU,, AC_MSG_WARN([ GLU not found - viewer will be disabled.]))
     482
     483AM_COND_IF(HAS_QT4, [],
     484      AC_MSG_WARN([ QT4 missing: fact and viewer GUI disabled!])
     485)
    463486AM_COND_IF(HAS_GUI, [],
    464       AC_MSG_WARN([ Either QT4 or qt-root is missing: GUIs disabled!])
    465 )
    466 AC_MSG_NOTICE()
     487      AC_MSG_WARN([ Either QT4 or qt-root is missing: fact GUI disabled!])
     488)
     489AC_MSG_NOTICE()
Note: See TracChangeset for help on using the changeset viewer.