Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4664 in orxonox.OLD for orxonox/trunk/configure


Ignore:
Timestamp:
Jun 23, 2005, 2:59:23 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: better check for SDL (on linux)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/configure

    r4662 r4664  
    56645664    fi
    56655665
    5666 # checking for SDL-headers
     5666# checking for SDL
     5667  echo "$as_me:$LINENO: checking for SDL-version" >&5
     5668echo $ECHO_N "checking for SDL-version... $ECHO_C" >&6
     5669  SDL_VERSION=`sdl-config --version`
     5670  echo $SDL_VERSION
     5671
     5672   CPPFLAGS="`sdl-config --cflags` $CPPFLAGS"
    56675673
    56685674for ac_header in SDL/SDL.h
     
    58125818
    58135819else
    5814   { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
    5815 echo "$as_me: error: cannot find SDL headers" >&2;}
    5816    { (exit 1); exit 1; }; }
    5817 fi
    5818 
    5819 done
    5820 
    5821 
    5822 # checking for SDL-lib
    5823     echo "$as_me:$LINENO: checking for main in -lSDL" >&5
    5824 echo $ECHO_N "checking for main in -lSDL... $ECHO_C" >&6
    5825 if test "${ac_cv_lib_SDL_main+set}" = set; then
     5820
     5821for ac_header in SDL.h
     5822do
     5823as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     5824if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5825  echo "$as_me:$LINENO: checking for $ac_header" >&5
     5826echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     5827if eval "test \"\${$as_ac_Header+set}\" = set"; then
    58265828  echo $ECHO_N "(cached) $ECHO_C" >&6
    5827 else
    5828   ac_check_lib_save_LIBS=$LIBS
    5829 LIBS="-lSDL  $LIBS"
     5829fi
     5830echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     5831echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     5832else
     5833  # Is the header compilable?
     5834echo "$as_me:$LINENO: checking $ac_header usability" >&5
     5835echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
    58305836cat >conftest.$ac_ext <<_ACEOF
    58315837/* confdefs.h.  */
     
    58345840cat >>conftest.$ac_ext <<_ACEOF
    58355841/* end confdefs.h.  */
    5836 
    5837 
    5838 int
    5839 main ()
    5840 {
    5841 main ();
    5842   ;
    5843   return 0;
    5844 }
    5845 _ACEOF
    5846 rm -f conftest.$ac_objext conftest$ac_exeext
    5847 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    5848   (eval $ac_link) 2>conftest.er1
     5842$ac_includes_default
     5843#include <$ac_header>
     5844_ACEOF
     5845rm -f conftest.$ac_objext
     5846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5847  (eval $ac_compile) 2>conftest.er1
    58495848  ac_status=$?
    58505849  grep -v '^ *+' conftest.er1 >conftest.err
     
    58605859  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    58615860  (exit $ac_status); }; } &&
    5862          { ac_try='test -s conftest$ac_exeext'
     5861         { ac_try='test -s conftest.$ac_objext'
    58635862  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    58645863  (eval $ac_try) 2>&5
     
    58665865  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    58675866  (exit $ac_status); }; }; then
    5868   ac_cv_lib_SDL_main=yes
     5867  ac_header_compiler=yes
    58695868else
    58705869  echo "$as_me: failed program was:" >&5
    58715870sed 's/^/| /' conftest.$ac_ext >&5
    58725871
    5873 ac_cv_lib_SDL_main=no
    5874 fi
    5875 rm -f conftest.err conftest.$ac_objext \
    5876       conftest$ac_exeext conftest.$ac_ext
    5877 LIBS=$ac_check_lib_save_LIBS
    5878 fi
    5879 echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_main" >&5
    5880 echo "${ECHO_T}$ac_cv_lib_SDL_main" >&6
    5881 if test $ac_cv_lib_SDL_main = yes; then
    5882   FOUND_SDL=yes
    5883 fi
    5884 
    5885      if test x$FOUND_SDL = xyes ; then
    5886        LIBS="$LIBS -lSDL"
    5887      else
    5888         echo "------------------"
    5889         echo "SDL library not found."
    5890         echo "please install the SDL library, which can be found at http://www.libsdl.org"
    5891         echo "------------------"
    5892         exit -1
    5893      fi
    5894 
    5895 
    5896 ## checking for SDL
    5897 #    SDL_VERSION=1.2.7
    5898 #    AM_PATH_SDL($SDL_VERSION,
    5899 #      :,
    5900 #      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
    5901 #      )
    5902 #    CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    5903 #    LIBS="$LIBS $SDL_LIBS"
     5872ac_header_compiler=no
     5873fi
     5874rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5875echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5876echo "${ECHO_T}$ac_header_compiler" >&6
     5877
     5878# Is the header present?
     5879echo "$as_me:$LINENO: checking $ac_header presence" >&5
     5880echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     5881cat >conftest.$ac_ext <<_ACEOF
     5882/* confdefs.h.  */
     5883_ACEOF
     5884cat confdefs.h >>conftest.$ac_ext
     5885cat >>conftest.$ac_ext <<_ACEOF
     5886/* end confdefs.h.  */
     5887#include <$ac_header>
     5888_ACEOF
     5889if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     5890  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     5891  ac_status=$?
     5892  grep -v '^ *+' conftest.er1 >conftest.err
     5893  rm -f conftest.er1
     5894  cat conftest.err >&5
     5895  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5896  (exit $ac_status); } >/dev/null; then
     5897  if test -s conftest.err; then
     5898    ac_cpp_err=$ac_c_preproc_warn_flag
     5899    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     5900  else
     5901    ac_cpp_err=
     5902  fi
     5903else
     5904  ac_cpp_err=yes
     5905fi
     5906if test -z "$ac_cpp_err"; then
     5907  ac_header_preproc=yes
     5908else
     5909  echo "$as_me: failed program was:" >&5
     5910sed 's/^/| /' conftest.$ac_ext >&5
     5911
     5912  ac_header_preproc=no
     5913fi
     5914rm -f conftest.err conftest.$ac_ext
     5915echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5916echo "${ECHO_T}$ac_header_preproc" >&6
     5917
     5918# So?  What about this header?
     5919case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     5920  yes:no: )
     5921    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     5922echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5923    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     5924echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     5925    ac_header_preproc=yes
    59045926    ;;
     5927  no:yes:* )
     5928    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     5929echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     5930    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     5931echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     5932    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     5933echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     5934    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     5935echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     5936    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     5937echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     5938    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     5939echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     5940    (
     5941      cat <<\_ASBOX
     5942## ---------------------------------------------- ##
     5943## Report this to orxonox-dev at mail.datacore.ch ##
     5944## ---------------------------------------------- ##
     5945_ASBOX
     5946    ) |
     5947      sed "s/^/$as_me: WARNING:     /" >&2
     5948    ;;
     5949esac
     5950echo "$as_me:$LINENO: checking for $ac_header" >&5
     5951echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     5952if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5953  echo $ECHO_N "(cached) $ECHO_C" >&6
     5954else
     5955  eval "$as_ac_Header=\$ac_header_preproc"
     5956fi
     5957echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     5958echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     5959
     5960fi
     5961if test `eval echo '${'$as_ac_Header'}'` = yes; then
     5962  cat >>confdefs.h <<_ACEOF
     5963#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     5964_ACEOF
     5965
     5966else
     5967  { { echo "$as_me:$LINENO: error: cannot find SDL header. please download from libsdl.org" >&5
     5968echo "$as_me: error: cannot find SDL header. please download from libsdl.org" >&2;}
     5969   { (exit 1); exit 1; }; }
     5970fi
     5971
     5972done
     5973
     5974fi
     5975
     5976done
     5977
     5978
     5979   LIBS="`sdl-config --libs` $LIBS"
     5980    ;;
     5981
    59055982#-----------#
    59065983# MAC -OS X #
Note: See TracChangeset for help on using the changeset viewer.