Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Dec 6, 2004, 12:13:50 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/images: configure.ac: made SDL_image check global

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/images/configure

    r3105 r3108  
    47794779    fi
    47804780
    4781     def_sdl_image=no;
    47824781    ;;
    47834782
     
    54805479     fi
    54815480
    5482 ## check for SDL_Image
    5483 if test "$def_sdl_image" = "yes"; then
    5484 # checking for SDL_image-headers
    5485 
    5486 for ac_header in SDL/SDL_image.h
     5481
     5482## checking for SDL
     5483#    SDL_VERSION=1.2.7
     5484#    AM_PATH_SDL($SDL_VERSION,
     5485#      :,
     5486#      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
     5487#      )
     5488#    CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
     5489#    LIBS="$LIBS $SDL_LIBS"
     5490    ;;
     5491
     5492### OS X ###
     5493 *darwin*)
     5494echo "OS X detected"
     5495
     5496 osX="yes"
     5497
     5498# checking gl header
     5499
     5500for ac_header in OpenGL/gl.h
    54875501do
    54885502as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    56305644
    56315645else
    5632   echo "sdl_image not found. falling back to other options"; def_sdl_image=no
     5646  { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
     5647echo "$as_me: error: cannot find opengl headers" >&2;}
     5648   { (exit 1); exit 1; }; }
    56335649fi
    56345650
    56355651done
    56365652
    5637 fi
    5638 if test "$def_sdl_image" = "yes"; then
    5639 # checking for SDL_image-lib
    5640   echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5
    5641 echo $ECHO_N "checking for main in -lSDL_image... $ECHO_C" >&6
    5642 if test "${ac_cv_lib_SDL_image_main+set}" = set; then
    5643   echo $ECHO_N "(cached) $ECHO_C" >&6
    5644 else
    5645   ac_check_lib_save_LIBS=$LIBS
    5646 LIBS="-lSDL_image  $LIBS"
    5647 cat >conftest.$ac_ext <<_ACEOF
    5648 /* confdefs.h.  */
    5649 _ACEOF
    5650 cat confdefs.h >>conftest.$ac_ext
    5651 cat >>conftest.$ac_ext <<_ACEOF
    5652 /* end confdefs.h.  */
    5653 
    5654 
    5655 int
    5656 main ()
    5657 {
    5658 main ();
    5659   ;
    5660   return 0;
    5661 }
    5662 _ACEOF
    5663 rm -f conftest.$ac_objext conftest$ac_exeext
    5664 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    5665   (eval $ac_link) 2>conftest.er1
    5666   ac_status=$?
    5667   grep -v '^ *+' conftest.er1 >conftest.err
    5668   rm -f conftest.er1
    5669   cat conftest.err >&5
    5670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5671   (exit $ac_status); } &&
    5672          { ac_try='test -z "$ac_c_werror_flag"
    5673                          || test ! -s conftest.err'
    5674   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5675   (eval $ac_try) 2>&5
    5676   ac_status=$?
    5677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5678   (exit $ac_status); }; } &&
    5679          { ac_try='test -s conftest$ac_exeext'
    5680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5681   (eval $ac_try) 2>&5
    5682   ac_status=$?
    5683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5684   (exit $ac_status); }; }; then
    5685   ac_cv_lib_SDL_image_main=yes
    5686 else
    5687   echo "$as_me: failed program was:" >&5
    5688 sed 's/^/| /' conftest.$ac_ext >&5
    5689 
    5690 ac_cv_lib_SDL_image_main=no
    5691 fi
    5692 rm -f conftest.err conftest.$ac_objext \
    5693       conftest$ac_exeext conftest.$ac_ext
    5694 LIBS=$ac_check_lib_save_LIBS
    5695 fi
    5696 echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_image_main" >&5
    5697 echo "${ECHO_T}$ac_cv_lib_SDL_image_main" >&6
    5698 if test $ac_cv_lib_SDL_image_main = yes; then
    5699   FOUND_SDL_image=yes
    5700 fi
    5701 
    5702      if test "$FOUND_SDL_image" = "yes" ; then
    5703        LIBS="$LIBS -lSDL_image"
    5704      else
    5705         echo "------------------"
    5706         echo "SDL_image library not found."
    5707         echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
    5708         echo "------------------"
    5709         exit -1
    5710      fi
    5711 fi
    5712 
    5713 ## checking for SDL
    5714 #    SDL_VERSION=1.2.7
    5715 #    AM_PATH_SDL($SDL_VERSION,
    5716 #      :,
    5717 #      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
    5718 #      )
    5719 #    CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    5720 #    LIBS="$LIBS $SDL_LIBS"
    5721     ;;
    5722 
    5723 ### OS X ###
    5724  *darwin*)
    5725 echo "OS X detected"
    5726 
    5727  osX="yes"
    5728 
    5729 # checking gl header
    5730 
    5731 for ac_header in OpenGL/gl.h
     5653# cheking for GLU-header
     5654
     5655for ac_header in OpenGL/glu.h
    57325656do
    57335657as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    58825806done
    58835807
    5884 # cheking for GLU-header
    5885 
    5886 for ac_header in OpenGL/glu.h
     5808
     5809   LIBS="$LIBS -framework OpenGL"
     5810
     5811# checking for SDL-headers
     5812#    AC_CHECK_HEADERS(SDL/SDL.h ,,
     5813#      [AC_MSG_ERROR([cannot find SDL headers]) ])
     5814
     5815## checking for SDL
     5816#    SDL_VERSION=1.2.7
     5817#    AM_PATH_SDL($SDL_VERSION,
     5818#      :,
     5819#      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
     5820#      )
     5821
     5822       SDL_CFLAGS=`sdl-config --cflags`
     5823       SDL_LIBS=`sdl-config --libs`
     5824       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
     5825       LIBS="$LIBS $SDL_LIBS"
     5826
     5827       def_sdl_image=no;
     5828    ;;
     5829
     5830  *)
     5831    ;;
     5832esac
     5833
     5834
     5835
     5836## check for SDL_Image
     5837if test "$def_sdl_image" = "yes"; then
     5838# checking for SDL_image-headers
     5839
     5840for ac_header in SDL/SDL_image.h
    58875841do
    58885842as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    60305984
    60315985else
    6032   { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
    6033 echo "$as_me: error: cannot find opengl headers" >&2;}
    6034    { (exit 1); exit 1; }; }
     5986  echo "sdl_image not found. falling back to other options"; def_sdl_image=no
    60355987fi
    60365988
    60375989done
    60385990
    6039 
    6040    LIBS="$LIBS -framework OpenGL"
    6041 
    6042 # checking for SDL-headers
    6043 #    AC_CHECK_HEADERS(SDL/SDL.h ,,
    6044 #      [AC_MSG_ERROR([cannot find SDL headers]) ])
    6045 
    6046 ## checking for SDL
    6047 #    SDL_VERSION=1.2.7
    6048 #    AM_PATH_SDL($SDL_VERSION,
    6049 #      :,
    6050 #      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
    6051 #      )
    6052 
    6053        SDL_CFLAGS=`sdl-config --cflags`
    6054        SDL_LIBS=`sdl-config --libs`
    6055        CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    6056        LIBS="$LIBS $SDL_LIBS"
    6057 
    6058        def_sdl_image=no;
    6059     ;;
    6060 
    6061   *)
    6062     ;;
    6063 esac
    6064 
     5991fi
     5992if test "$def_sdl_image" = "yes"; then
     5993# checking for SDL_image-lib
     5994  echo "$as_me:$LINENO: checking for main in -lSDL_image" >&5
     5995echo $ECHO_N "checking for main in -lSDL_image... $ECHO_C" >&6
     5996if test "${ac_cv_lib_SDL_image_main+set}" = set; then
     5997  echo $ECHO_N "(cached) $ECHO_C" >&6
     5998else
     5999  ac_check_lib_save_LIBS=$LIBS
     6000LIBS="-lSDL_image  $LIBS"
     6001cat >conftest.$ac_ext <<_ACEOF
     6002/* confdefs.h.  */
     6003_ACEOF
     6004cat confdefs.h >>conftest.$ac_ext
     6005cat >>conftest.$ac_ext <<_ACEOF
     6006/* end confdefs.h.  */
     6007
     6008
     6009int
     6010main ()
     6011{
     6012main ();
     6013  ;
     6014  return 0;
     6015}
     6016_ACEOF
     6017rm -f conftest.$ac_objext conftest$ac_exeext
     6018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     6019  (eval $ac_link) 2>conftest.er1
     6020  ac_status=$?
     6021  grep -v '^ *+' conftest.er1 >conftest.err
     6022  rm -f conftest.er1
     6023  cat conftest.err >&5
     6024  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6025  (exit $ac_status); } &&
     6026         { ac_try='test -z "$ac_c_werror_flag"
     6027                         || test ! -s conftest.err'
     6028  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6029  (eval $ac_try) 2>&5
     6030  ac_status=$?
     6031  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6032  (exit $ac_status); }; } &&
     6033         { ac_try='test -s conftest$ac_exeext'
     6034  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6035  (eval $ac_try) 2>&5
     6036  ac_status=$?
     6037  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6038  (exit $ac_status); }; }; then
     6039  ac_cv_lib_SDL_image_main=yes
     6040else
     6041  echo "$as_me: failed program was:" >&5
     6042sed 's/^/| /' conftest.$ac_ext >&5
     6043
     6044ac_cv_lib_SDL_image_main=no
     6045fi
     6046rm -f conftest.err conftest.$ac_objext \
     6047      conftest$ac_exeext conftest.$ac_ext
     6048LIBS=$ac_check_lib_save_LIBS
     6049fi
     6050echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_image_main" >&5
     6051echo "${ECHO_T}$ac_cv_lib_SDL_image_main" >&6
     6052if test $ac_cv_lib_SDL_image_main = yes; then
     6053  FOUND_SDL_image=yes
     6054fi
     6055
     6056     if test "$FOUND_SDL_image" = "yes" ; then
     6057       LIBS="$LIBS -lSDL_image"
     6058     else
     6059        echo "------------------"
     6060        echo "SDL_image library not found."
     6061        echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
     6062        echo "------------------"
     6063        exit -1
     6064     fi
     6065fi
    60656066
    60666067
Note: See TracChangeset for help on using the changeset viewer.