Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5265 in orxonox.OLD for trunk/configure


Ignore:
Timestamp:
Sep 27, 2005, 1:07:08 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: configure now also checks for glew, and includes it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r5224 r5265  
    39623962fi;
    39633963if test x$SHARED_LIB_PATH != xno; then
    3964         echo "set to $SHARED_LIB_PATH"
     3964        echo "set to $SHARED_LIB_PATH"
    39653965else
    39663966        echo "no"
     
    55405540##LDFLAGS="-L/usr/lib $LDFLAGS"
    55415541if test x$SHARED_LIB_PATH != xno; then
    5542         echo "setting new LDFLAGS with $SHARED_LIB_PATH"
    5543         LDFLAGS="-Wl,-rpath,$SHARED_LIB_PATH -L$SHARED_LIB_PATH $LDFLAGS"
     5542        echo "setting new LDFLAGS with $SHARED_LIB_PATH"
     5543        LDFLAGS="-Wl,-rpath,$SHARED_LIB_PATH -L$SHARED_LIB_PATH $LDFLAGS"
    55445544fi
    55455545
     
    59395939#         exit -1
    59405940#    fi
     5941
     5942# checking for GLEW-headers
     5943
     5944for ac_header in GL/glew.h
     5945do
     5946as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     5947if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5948  echo "$as_me:$LINENO: checking for $ac_header" >&5
     5949echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     5950if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5951  echo $ECHO_N "(cached) $ECHO_C" >&6
     5952fi
     5953echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     5954echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     5955else
     5956  # Is the header compilable?
     5957echo "$as_me:$LINENO: checking $ac_header usability" >&5
     5958echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     5959cat >conftest.$ac_ext <<_ACEOF
     5960/* confdefs.h.  */
     5961_ACEOF
     5962cat confdefs.h >>conftest.$ac_ext
     5963cat >>conftest.$ac_ext <<_ACEOF
     5964/* end confdefs.h.  */
     5965$ac_includes_default
     5966#include <$ac_header>
     5967_ACEOF
     5968rm -f conftest.$ac_objext
     5969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5970  (eval $ac_compile) 2>conftest.er1
     5971  ac_status=$?
     5972  grep -v '^ *+' conftest.er1 >conftest.err
     5973  rm -f conftest.er1
     5974  cat conftest.err >&5
     5975  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5976  (exit $ac_status); } &&
     5977         { ac_try='test -z "$ac_c_werror_flag"
     5978                         || test ! -s conftest.err'
     5979  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5980  (eval $ac_try) 2>&5
     5981  ac_status=$?
     5982  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5983  (exit $ac_status); }; } &&
     5984         { ac_try='test -s conftest.$ac_objext'
     5985  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5986  (eval $ac_try) 2>&5
     5987  ac_status=$?
     5988  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5989  (exit $ac_status); }; }; then
     5990  ac_header_compiler=yes
     5991else
     5992  echo "$as_me: failed program was:" >&5
     5993sed 's/^/| /' conftest.$ac_ext >&5
     5994
     5995ac_header_compiler=no
     5996fi
     5997rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5998echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5999echo "${ECHO_T}$ac_header_compiler" >&6
     6000
     6001# Is the header present?
     6002echo "$as_me:$LINENO: checking $ac_header presence" >&5
     6003echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     6004cat >conftest.$ac_ext <<_ACEOF
     6005/* confdefs.h.  */
     6006_ACEOF
     6007cat confdefs.h >>conftest.$ac_ext
     6008cat >>conftest.$ac_ext <<_ACEOF
     6009/* end confdefs.h.  */
     6010#include <$ac_header>
     6011_ACEOF
     6012if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     6013  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     6014  ac_status=$?
     6015  grep -v '^ *+' conftest.er1 >conftest.err
     6016  rm -f conftest.er1
     6017  cat conftest.err >&5
     6018  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6019  (exit $ac_status); } >/dev/null; then
     6020  if test -s conftest.err; then
     6021    ac_cpp_err=$ac_c_preproc_warn_flag
     6022    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     6023  else
     6024    ac_cpp_err=
     6025  fi
     6026else
     6027  ac_cpp_err=yes
     6028fi
     6029if test -z "$ac_cpp_err"; then
     6030  ac_header_preproc=yes
     6031else
     6032  echo "$as_me: failed program was:" >&5
     6033sed 's/^/| /' conftest.$ac_ext >&5
     6034
     6035  ac_header_preproc=no
     6036fi
     6037rm -f conftest.err conftest.$ac_ext
     6038echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     6039echo "${ECHO_T}$ac_header_preproc" >&6
     6040
     6041# So?  What about this header?
     6042case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     6043  yes:no: )
     6044    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     6045echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     6046    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     6047echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     6048    ac_header_preproc=yes
     6049    ;;
     6050  no:yes:* )
     6051    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     6052echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     6053    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     6054echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     6055    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     6056echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     6057    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     6058echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     6059    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     6060echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     6061    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     6062echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     6063    (
     6064      cat <<\_ASBOX
     6065## ---------------------------------------------- ##
     6066## Report this to orxonox-dev at mail.datacore.ch ##
     6067## ---------------------------------------------- ##
     6068_ASBOX
     6069    ) |
     6070      sed "s/^/$as_me: WARNING:     /" >&2
     6071    ;;
     6072esac
     6073echo "$as_me:$LINENO: checking for $ac_header" >&5
     6074echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     6075if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6076  echo $ECHO_N "(cached) $ECHO_C" >&6
     6077else
     6078  eval "$as_ac_Header=\$ac_header_preproc"
     6079fi
     6080echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     6081echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     6082
     6083fi
     6084if test `eval echo '${'$as_ac_Header'}'` = yes; then
     6085  cat >>confdefs.h <<_ACEOF
     6086#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     6087_ACEOF
     6088
     6089else
     6090  { { echo "$as_me:$LINENO: error: cannot find glew headers" >&5
     6091echo "$as_me: error: cannot find glew headers" >&2;}
     6092   { (exit 1); exit 1; }; }
     6093fi
     6094
     6095done
     6096
     6097# checking for GLEW-lib
     6098  echo "$as_me:$LINENO: checking for main in -lGLEW" >&5
     6099echo $ECHO_N "checking for main in -lGLEW... $ECHO_C" >&6
     6100if test "${ac_cv_lib_GLEW_main+set}" = set; then
     6101  echo $ECHO_N "(cached) $ECHO_C" >&6
     6102else
     6103  ac_check_lib_save_LIBS=$LIBS
     6104LIBS="-lGLEW  $LIBS"
     6105cat >conftest.$ac_ext <<_ACEOF
     6106/* confdefs.h.  */
     6107_ACEOF
     6108cat confdefs.h >>conftest.$ac_ext
     6109cat >>conftest.$ac_ext <<_ACEOF
     6110/* end confdefs.h.  */
     6111
     6112
     6113int
     6114main ()
     6115{
     6116main ();
     6117  ;
     6118  return 0;
     6119}
     6120_ACEOF
     6121rm -f conftest.$ac_objext conftest$ac_exeext
     6122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     6123  (eval $ac_link) 2>conftest.er1
     6124  ac_status=$?
     6125  grep -v '^ *+' conftest.er1 >conftest.err
     6126  rm -f conftest.er1
     6127  cat conftest.err >&5
     6128  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6129  (exit $ac_status); } &&
     6130         { ac_try='test -z "$ac_c_werror_flag"
     6131                         || test ! -s conftest.err'
     6132  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6133  (eval $ac_try) 2>&5
     6134  ac_status=$?
     6135  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6136  (exit $ac_status); }; } &&
     6137         { ac_try='test -s conftest$ac_exeext'
     6138  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6139  (eval $ac_try) 2>&5
     6140  ac_status=$?
     6141  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6142  (exit $ac_status); }; }; then
     6143  ac_cv_lib_GLEW_main=yes
     6144else
     6145  echo "$as_me: failed program was:" >&5
     6146sed 's/^/| /' conftest.$ac_ext >&5
     6147
     6148ac_cv_lib_GLEW_main=no
     6149fi
     6150rm -f conftest.err conftest.$ac_objext \
     6151      conftest$ac_exeext conftest.$ac_ext
     6152LIBS=$ac_check_lib_save_LIBS
     6153fi
     6154echo "$as_me:$LINENO: result: $ac_cv_lib_GLEW_main" >&5
     6155echo "${ECHO_T}$ac_cv_lib_GLEW_main" >&6
     6156if test $ac_cv_lib_GLEW_main = yes; then
     6157  FOUND_GLEW=yes
     6158fi
     6159
     6160   if test x$FOUND_GLEW = xyes ; then
     6161     LIBS="$LIBS -lGLEW"
     6162   else
     6163         echo "------------------"
     6164         echo "glew not found."
     6165         echo "please install the glew package which can be found at http://glew.sourceforge.net"
     6166         echo "------------------"
     6167         exit -1
     6168   fi
    59416169
    59426170#--------#
Note: See TracChangeset for help on using the changeset viewer.