Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3104 in orxonox.OLD for orxonox/branches/images/configure


Ignore:
Timestamp:
Dec 5, 2004, 5:16:43 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/images: better test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/images/configure

    r3098 r3104  
    53725372
    53735373
    5374 # checking for SDL-libs
     5374# checking for SDL-lib
    53755375    echo "$as_me:$LINENO: checking for main in -lSDL" >&5
    53765376echo $ECHO_N "checking for main in -lSDL... $ECHO_C" >&6
     
    54415441        echo "SDL library not found."
    54425442        echo "please install the SDL library, which can be found at http://www.libsdl.org"
     5443        echo "------------------"
     5444        exit -1
     5445     fi
     5446
     5447# checking for SDL_image-headers
     5448
     5449for ac_header in SDL/SDL_image.h
     5450do
     5451as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     5452if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5453  echo "$as_me:$LINENO: checking for $ac_header" >&5
     5454echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     5455if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5456  echo $ECHO_N "(cached) $ECHO_C" >&6
     5457fi
     5458echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     5459echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     5460else
     5461  # Is the header compilable?
     5462echo "$as_me:$LINENO: checking $ac_header usability" >&5
     5463echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     5464cat >conftest.$ac_ext <<_ACEOF
     5465/* confdefs.h.  */
     5466_ACEOF
     5467cat confdefs.h >>conftest.$ac_ext
     5468cat >>conftest.$ac_ext <<_ACEOF
     5469/* end confdefs.h.  */
     5470$ac_includes_default
     5471#include <$ac_header>
     5472_ACEOF
     5473rm -f conftest.$ac_objext
     5474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5475  (eval $ac_compile) 2>conftest.er1
     5476  ac_status=$?
     5477  grep -v '^ *+' conftest.er1 >conftest.err
     5478  rm -f conftest.er1
     5479  cat conftest.err >&5
     5480  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5481  (exit $ac_status); } &&
     5482         { ac_try='test -z "$ac_c_werror_flag"
     5483                         || test ! -s conftest.err'
     5484  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5485  (eval $ac_try) 2>&5
     5486  ac_status=$?
     5487  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5488  (exit $ac_status); }; } &&
     5489         { ac_try='test -s conftest.$ac_objext'
     5490  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5491  (eval $ac_try) 2>&5
     5492  ac_status=$?
     5493  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5494  (exit $ac_status); }; }; then
     5495  ac_header_compiler=yes
     5496else
     5497  echo "$as_me: failed program was:" >&5
     5498sed 's/^/| /' conftest.$ac_ext >&5
     5499
     5500ac_header_compiler=no
     5501fi
     5502rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5503echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5504echo "${ECHO_T}$ac_header_compiler" >&6
     5505
     5506# Is the header present?
     5507echo "$as_me:$LINENO: checking $ac_header presence" >&5
     5508echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     5509cat >conftest.$ac_ext <<_ACEOF
     5510/* confdefs.h.  */
     5511_ACEOF
     5512cat confdefs.h >>conftest.$ac_ext
     5513cat >>conftest.$ac_ext <<_ACEOF
     5514/* end confdefs.h.  */
     5515#include <$ac_header>
     5516_ACEOF
     5517if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     5518  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     5519  ac_status=$?
     5520  grep -v '^ *+' conftest.er1 >conftest.err
     5521  rm -f conftest.er1
     5522  cat conftest.err >&5
     5523  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5524  (exit $ac_status); } >/dev/null; then
     5525  if test -s conftest.err; then
     5526    ac_cpp_err=$ac_c_preproc_warn_flag
     5527    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     5528  else
     5529    ac_cpp_err=
     5530  fi
     5531else
     5532  ac_cpp_err=yes
     5533fi
     5534if test -z "$ac_cpp_err"; then
     5535  ac_header_preproc=yes
     5536else
     5537  echo "$as_me: failed program was:" >&5
     5538sed 's/^/| /' conftest.$ac_ext >&5
     5539
     5540  ac_header_preproc=no
     5541fi
     5542rm -f conftest.err conftest.$ac_ext
     5543echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5544echo "${ECHO_T}$ac_header_preproc" >&6
     5545
     5546# So?  What about this header?
     5547case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     5548  yes:no: )
     5549    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     5550echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5551    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     5552echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     5553    ac_header_preproc=yes
     5554    ;;
     5555  no:yes:* )
     5556    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     5557echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     5558    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     5559echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     5560    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     5561echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     5562    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     5563echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     5564    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     5565echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     5566    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     5567echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     5568    (
     5569      cat <<\_ASBOX
     5570## ------------------------------------------- ##
     5571## Report this to orxonox-dev@mail.datacore.ch ##
     5572## ------------------------------------------- ##
     5573_ASBOX
     5574    ) |
     5575      sed "s/^/$as_me: WARNING:     /" >&2
     5576    ;;
     5577esac
     5578echo "$as_me:$LINENO: checking for $ac_header" >&5
     5579echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     5580if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5581  echo $ECHO_N "(cached) $ECHO_C" >&6
     5582else
     5583  eval "$as_ac_Header=\$ac_header_preproc"
     5584fi
     5585echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     5586echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     5587
     5588fi
     5589if test `eval echo '${'$as_ac_Header'}'` = yes; then
     5590  cat >>confdefs.h <<_ACEOF
     5591#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     5592_ACEOF
     5593
     5594else
     5595  { { echo "$as_me:$LINENO: error: cannot find SDL_image headers" >&5
     5596echo "$as_me: error: cannot find SDL_image headers" >&2;}
     5597   { (exit 1); exit 1; }; }
     5598fi
     5599
     5600done
     5601
     5602# checking for SDL_image-lib
     5603  echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5
     5604echo $ECHO_N "checking for main in -lSDL_image... $ECHO_C" >&6
     5605if test "${ac_cv_lib_SDL_image_main+set}" = set; then
     5606  echo $ECHO_N "(cached) $ECHO_C" >&6
     5607else
     5608  ac_check_lib_save_LIBS=$LIBS
     5609LIBS="-lSDL_image  $LIBS"
     5610cat >conftest.$ac_ext <<_ACEOF
     5611/* confdefs.h.  */
     5612_ACEOF
     5613cat confdefs.h >>conftest.$ac_ext
     5614cat >>conftest.$ac_ext <<_ACEOF
     5615/* end confdefs.h.  */
     5616
     5617
     5618int
     5619main ()
     5620{
     5621main ();
     5622  ;
     5623  return 0;
     5624}
     5625_ACEOF
     5626rm -f conftest.$ac_objext conftest$ac_exeext
     5627if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     5628  (eval $ac_link) 2>conftest.er1
     5629  ac_status=$?
     5630  grep -v '^ *+' conftest.er1 >conftest.err
     5631  rm -f conftest.er1
     5632  cat conftest.err >&5
     5633  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5634  (exit $ac_status); } &&
     5635         { ac_try='test -z "$ac_c_werror_flag"
     5636                         || test ! -s conftest.err'
     5637  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5638  (eval $ac_try) 2>&5
     5639  ac_status=$?
     5640  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5641  (exit $ac_status); }; } &&
     5642         { ac_try='test -s conftest$ac_exeext'
     5643  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5644  (eval $ac_try) 2>&5
     5645  ac_status=$?
     5646  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5647  (exit $ac_status); }; }; then
     5648  ac_cv_lib_SDL_image_main=yes
     5649else
     5650  echo "$as_me: failed program was:" >&5
     5651sed 's/^/| /' conftest.$ac_ext >&5
     5652
     5653ac_cv_lib_SDL_image_main=no
     5654fi
     5655rm -f conftest.err conftest.$ac_objext \
     5656      conftest$ac_exeext conftest.$ac_ext
     5657LIBS=$ac_check_lib_save_LIBS
     5658fi
     5659echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_image_main" >&5
     5660echo "${ECHO_T}$ac_cv_lib_SDL_image_main" >&6
     5661if test $ac_cv_lib_SDL_image_main = yes; then
     5662  FOUND_SDL_image=yes
     5663fi
     5664
     5665     if test "$FOUND_SDL_image" = "yes" ; then
     5666       LIBS="$LIBS -lSDL_image"
     5667     else
     5668        echo "------------------"
     5669        echo "SDL_image library not found."
     5670        echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
    54435671        echo "------------------"
    54445672        exit -1
Note: See TracChangeset for help on using the changeset viewer.