Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2991 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Nov 26, 2004, 12:07:17 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: better configure, just works better on less configured systems like win32

Location:
orxonox/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/Makefile.in

    r2980 r2991  
    119119PATH_SEPARATOR = @PATH_SEPARATOR@
    120120PKG_CONFIG = @PKG_CONFIG@
    121 SDL_CFLAGS = @SDL_CFLAGS@
    122 SDL_CONFIG = @SDL_CONFIG@
    123 SDL_LIBS = @SDL_LIBS@
    124121SET_MAKE = @SET_MAKE@
    125122SHELL = @SHELL@
  • orxonox/trunk/aclocal.m4

    r2980 r2991  
    6969
    7070
    71 
    72 # Configure paths for SDL
    73 # Sam Lantinga 9/21/99
    74 # stolen from Manish Singh
    75 # stolen back from Frank Belew
    76 # stolen from Manish Singh
    77 # Shamelessly stolen from Owen Taylor
    78 
    79 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
    80 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
    81 dnl
    82 AC_DEFUN([AM_PATH_SDL],
    83 [dnl
    84 dnl Get the cflags and libraries from the sdl-config script
    85 dnl
    86 AC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],
    87             sdl_prefix="$withval", sdl_prefix="")
    88 AC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
    89             sdl_exec_prefix="$withval", sdl_exec_prefix="")
    90 AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],
    91                     , enable_sdltest=yes)
    92 
    93   if test x$sdl_exec_prefix != x ; then
    94      sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
    95      if test x${SDL_CONFIG+set} != xset ; then
    96         SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
    97      fi
    98   fi
    99   if test x$sdl_prefix != x ; then
    100      sdl_args="$sdl_args --prefix=$sdl_prefix"
    101      if test x${SDL_CONFIG+set} != xset ; then
    102         SDL_CONFIG=$sdl_prefix/bin/sdl-config
    103      fi
    104   fi
    105 
    106   AC_REQUIRE([AC_CANONICAL_TARGET])
    107   PATH="$prefix/bin:$prefix/usr/bin:$PATH"
    108   AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
    109   min_sdl_version=ifelse([$1], ,0.11.0,$1)
    110   AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
    111   no_sdl=""
    112   if test "$SDL_CONFIG" = "no" ; then
    113     no_sdl=yes
    114   else
    115     SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
    116     SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
    117 
    118     sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
    119            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
    120     sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
    121            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
    122     sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
    123            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
    124     if test "x$enable_sdltest" = "xyes" ; then
    125       ac_save_CFLAGS="$CFLAGS"
    126       ac_save_LIBS="$LIBS"
    127       CFLAGS="$CFLAGS $SDL_CFLAGS"
    128       LIBS="$LIBS $SDL_LIBS"
    129 dnl
    130 dnl Now check if the installed SDL is sufficiently new. (Also sanity
    131 dnl checks the results of sdl-config to some extent
    132 dnl
    133       rm -f conf.sdltest
    134       AC_TRY_RUN([
    135 #include <stdio.h>
    136 #include <stdlib.h>
    137 #include <string.h>
    138 #include "SDL.h"
    139 
    140 char*
    141 my_strdup (char *str)
    142 {
    143   char *new_str;
    144  
    145   if (str)
    146     {
    147       new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
    148       strcpy (new_str, str);
    149     }
    150   else
    151     new_str = NULL;
    152  
    153   return new_str;
    154 }
    155 
    156 int main (int argc, char *argv[])
    157 {
    158   int major, minor, micro;
    159   char *tmp_version;
    160 
    161   /* This hangs on some systems (?)
    162   system ("touch conf.sdltest");
    163   */
    164   { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
    165 
    166   /* HP/UX 9 (%@#!) writes to sscanf strings */
    167   tmp_version = my_strdup("$min_sdl_version");
    168   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
    169      printf("%s, bad version string\n", "$min_sdl_version");
    170      exit(1);
    171    }
    172 
    173    if (($sdl_major_version > major) ||
    174       (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
    175       (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
    176     {
    177       return 0;
    178     }
    179   else
    180     {
    181       printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
    182       printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
    183       printf("*** best to upgrade to the required version.\n");
    184       printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
    185       printf("*** to point to the correct copy of sdl-config, and remove the file\n");
    186       printf("*** config.cache before re-running configure\n");
    187       return 1;
    188     }
    189 }
    190 
    191 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
    192        CFLAGS="$ac_save_CFLAGS"
    193        LIBS="$ac_save_LIBS"
    194      fi
    195   fi
    196   if test "x$no_sdl" = x ; then
    197      AC_MSG_RESULT(yes)
    198      ifelse([$2], , :, [$2])     
    199   else
    200      AC_MSG_RESULT(no)
    201      if test "$SDL_CONFIG" = "no" ; then
    202        echo "*** The sdl-config script installed by SDL could not be found"
    203        echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
    204        echo "*** your path, or set the SDL_CONFIG environment variable to the"
    205        echo "*** full path to sdl-config."
    206      else
    207        if test -f conf.sdltest ; then
    208         :
    209        else
    210           echo "*** Could not run SDL test program, checking why..."
    211           CFLAGS="$CFLAGS $SDL_CFLAGS"
    212           LIBS="$LIBS $SDL_LIBS"
    213           AC_TRY_LINK([
    214 #include <stdio.h>
    215 #include "SDL.h"
    216 
    217 int main(int argc, char *argv[])
    218 { return 0; }
    219 #undef  main
    220 #define main K_and_R_C_main
    221 ],      [ return 0; ],
    222         [ echo "*** The test program compiled, but did not run. This usually means"
    223           echo "*** that the run-time linker is not finding SDL or finding the wrong"
    224           echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
    225           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
    226           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
    227           echo "*** is required on your system"
    228           echo "***"
    229           echo "*** If you have an old version installed, it is best to remove it, although"
    230           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
    231         [ echo "*** The test program failed to compile or link. See the file config.log for the"
    232           echo "*** exact error that occured. This usually means SDL was incorrectly installed"
    233           echo "*** or that you have moved SDL since it was installed. In the latter case, you"
    234           echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
    235           CFLAGS="$ac_save_CFLAGS"
    236           LIBS="$ac_save_LIBS"
    237        fi
    238      fi
    239      SDL_CFLAGS=""
    240      SDL_LIBS=""
    241      ifelse([$3], , :, [$3])
    242   fi
    243   AC_SUBST(SDL_CFLAGS)
    244   AC_SUBST(SDL_LIBS)
    245   rm -f conf.sdltest
    246 ])
    24771
    24872#                                                        -*- Autoconf -*-
  • orxonox/trunk/configure

    r2989 r2991  
    312312#endif"
    313313
    314 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP SDL_CONFIG SDL_CFLAGS SDL_LIBS MSBITFIELDS PKG_CONFIG GTK2_CFLAGS GTK2_LIBS HAVE_GTK2_TRUE HAVE_GTK2_FALSE LIBOBJS LTLIBOBJS'
     314ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP MSBITFIELDS PKG_CONFIG GTK2_CFLAGS GTK2_LIBS HAVE_GTK2_TRUE HAVE_GTK2_FALSE LIBOBJS LTLIBOBJS'
    315315ac_subst_files=''
    316316
     
    865865  --disable-dependency-tracking  speeds up one-time build
    866866  --enable-dependency-tracking   do not reject slow dependency extractors
    867   --disable-sdltest       Do not try to compile and run a test SDL program
    868 
    869 Optional Packages:
    870   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    871   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    872   --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)
    873   --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)
    874867
    875868Some influential environment variables:
     
    52225215         exit -1
    52235216    fi
    5224 
    5225 ## checking for SDL
    5226     SDL_VERSION=1.2.7
    5227 
    5228 # Check whether --with-sdl-prefix or --without-sdl-prefix was given.
    5229 if test "${with_sdl_prefix+set}" = set; then
    5230   withval="$with_sdl_prefix"
    5231   sdl_prefix="$withval"
    5232 else
    5233   sdl_prefix=""
    5234 fi;
    5235 
    5236 # Check whether --with-sdl-exec-prefix or --without-sdl-exec-prefix was given.
    5237 if test "${with_sdl_exec_prefix+set}" = set; then
    5238   withval="$with_sdl_exec_prefix"
    5239   sdl_exec_prefix="$withval"
    5240 else
    5241   sdl_exec_prefix=""
    5242 fi;
    5243 # Check whether --enable-sdltest or --disable-sdltest was given.
    5244 if test "${enable_sdltest+set}" = set; then
    5245   enableval="$enable_sdltest"
    5246 
    5247 else
    5248   enable_sdltest=yes
    5249 fi;
    5250 
    5251   if test x$sdl_exec_prefix != x ; then
    5252      sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
    5253      if test x${SDL_CONFIG+set} != xset ; then
    5254         SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
    5255      fi
    5256   fi
    5257   if test x$sdl_prefix != x ; then
    5258      sdl_args="$sdl_args --prefix=$sdl_prefix"
    5259      if test x${SDL_CONFIG+set} != xset ; then
    5260         SDL_CONFIG=$sdl_prefix/bin/sdl-config
    5261      fi
    5262   fi
    5263 
    5264 
    5265   PATH="$prefix/bin:$prefix/usr/bin:$PATH"
    5266   # Extract the first word of "sdl-config", so it can be a program name with args.
    5267 set dummy sdl-config; ac_word=$2
    5268 echo "$as_me:$LINENO: checking for $ac_word" >&5
    5269 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
    5270 if test "${ac_cv_path_SDL_CONFIG+set}" = set; then
     5217# checking for SDL-headers
     5218
     5219for ac_header in SDL/SDL.h
     5220do
     5221as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     5222if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5223  echo "$as_me:$LINENO: checking for $ac_header" >&5
     5224echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     5225if eval "test \"\${$as_ac_Header+set}\" = set"; then
    52715226  echo $ECHO_N "(cached) $ECHO_C" >&6
    5272 else
    5273   case $SDL_CONFIG in
    5274   [\\/]* | ?:[\\/]*)
    5275   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
    5276   ;;
    5277   *)
    5278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    5279 for as_dir in $PATH
    5280 do
    5281   IFS=$as_save_IFS
    5282   test -z "$as_dir" && as_dir=.
    5283   for ac_exec_ext in '' $ac_executable_extensions; do
    5284   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    5285     ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    5286     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    5287     break 2
    5288   fi
    5289 done
    5290 done
    5291 
    5292   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
    5293   ;;
    5294 esac
    5295 fi
    5296 SDL_CONFIG=$ac_cv_path_SDL_CONFIG
    5297 
    5298 if test -n "$SDL_CONFIG"; then
    5299   echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5
    5300 echo "${ECHO_T}$SDL_CONFIG" >&6
    5301 else
    5302   echo "$as_me:$LINENO: result: no" >&5
    5303 echo "${ECHO_T}no" >&6
    5304 fi
    5305 
    5306   min_sdl_version=$SDL_VERSION
    5307   echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5
    5308 echo $ECHO_N "checking for SDL - version >= $min_sdl_version... $ECHO_C" >&6
    5309   no_sdl=""
    5310   if test "$SDL_CONFIG" = "no" ; then
    5311     no_sdl=yes
    5312   else
    5313     SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
    5314     SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
    5315 
    5316     sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
    5317            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
    5318     sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
    5319            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
    5320     sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
    5321            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
    5322     if test "x$enable_sdltest" = "xyes" ; then
    5323       ac_save_CFLAGS="$CFLAGS"
    5324       ac_save_LIBS="$LIBS"
    5325       CFLAGS="$CFLAGS $SDL_CFLAGS"
    5326       LIBS="$LIBS $SDL_LIBS"
    5327       rm -f conf.sdltest
    5328       if test "$cross_compiling" = yes; then
    5329   echo $ac_n "cross compiling; assumed OK... $ac_c"
    5330 else
    5331   cat >conftest.$ac_ext <<_ACEOF
     5227fi
     5228echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     5229echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     5230else
     5231  # Is the header compilable?
     5232echo "$as_me:$LINENO: checking $ac_header usability" >&5
     5233echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     5234cat >conftest.$ac_ext <<_ACEOF
    53325235/* confdefs.h.  */
    53335236_ACEOF
     
    53355238cat >>conftest.$ac_ext <<_ACEOF
    53365239/* end confdefs.h.  */
    5337 
    5338 #include <stdio.h>
    5339 #include <stdlib.h>
    5340 #include <string.h>
    5341 #include "SDL.h"
    5342 
    5343 char*
    5344 my_strdup (char *str)
    5345 {
    5346   char *new_str;
    5347 
    5348   if (str)
    5349     {
    5350       new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
    5351       strcpy (new_str, str);
    5352     }
    5353   else
    5354     new_str = NULL;
    5355 
    5356   return new_str;
    5357 }
    5358 
    5359 int main (int argc, char *argv[])
    5360 {
    5361   int major, minor, micro;
    5362   char *tmp_version;
    5363 
    5364   /* This hangs on some systems (?)
    5365   system ("touch conf.sdltest");
    5366   */
    5367   { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
    5368 
    5369   /* HP/UX 9 (%@#!) writes to sscanf strings */
    5370   tmp_version = my_strdup("$min_sdl_version");
    5371   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
    5372      printf("%s, bad version string\n", "$min_sdl_version");
    5373      exit(1);
    5374    }
    5375 
    5376    if (($sdl_major_version > major) ||
    5377       (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
    5378       (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
    5379     {
    5380       return 0;
    5381     }
    5382   else
    5383     {
    5384       printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
    5385       printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
    5386       printf("*** best to upgrade to the required version.\n");
    5387       printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
    5388       printf("*** to point to the correct copy of sdl-config, and remove the file\n");
    5389       printf("*** config.cache before re-running configure\n");
    5390       return 1;
    5391     }
    5392 }
    5393 
    5394 
    5395 _ACEOF
    5396 rm -f conftest$ac_exeext
    5397 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    5398   (eval $ac_link) 2>&5
    5399   ac_status=$?
    5400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5401   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    5402   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    5403   (eval $ac_try) 2>&5
    5404   ac_status=$?
    5405   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    5406   (exit $ac_status); }; }; then
    5407   :
    5408 else
    5409   echo "$as_me: program exited with status $ac_status" >&5
    5410 echo "$as_me: failed program was:" >&5
    5411 sed 's/^/| /' conftest.$ac_ext >&5
    5412 
    5413 ( exit $ac_status )
    5414 no_sdl=yes
    5415 fi
    5416 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
    5417 fi
    5418        CFLAGS="$ac_save_CFLAGS"
    5419        LIBS="$ac_save_LIBS"
    5420      fi
    5421   fi
    5422   if test "x$no_sdl" = x ; then
    5423      echo "$as_me:$LINENO: result: yes" >&5
    5424 echo "${ECHO_T}yes" >&6
    5425      :
    5426   else
    5427      echo "$as_me:$LINENO: result: no" >&5
    5428 echo "${ECHO_T}no" >&6
    5429      if test "$SDL_CONFIG" = "no" ; then
    5430        echo "*** The sdl-config script installed by SDL could not be found"
    5431        echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
    5432        echo "*** your path, or set the SDL_CONFIG environment variable to the"
    5433        echo "*** full path to sdl-config."
    5434      else
    5435        if test -f conf.sdltest ; then
    5436         :
    5437        else
    5438           echo "*** Could not run SDL test program, checking why..."
    5439           CFLAGS="$CFLAGS $SDL_CFLAGS"
    5440           LIBS="$LIBS $SDL_LIBS"
    5441           cat >conftest.$ac_ext <<_ACEOF
    5442 /* confdefs.h.  */
    5443 _ACEOF
    5444 cat confdefs.h >>conftest.$ac_ext
    5445 cat >>conftest.$ac_ext <<_ACEOF
    5446 /* end confdefs.h.  */
    5447 
    5448 #include <stdio.h>
    5449 #include "SDL.h"
    5450 
    5451 int main(int argc, char *argv[])
    5452 { return 0; }
    5453 #undef  main
    5454 #define main K_and_R_C_main
    5455 
    5456 int
    5457 main ()
    5458 {
    5459  return 0;
    5460   ;
    5461   return 0;
    5462 }
    5463 _ACEOF
    5464 rm -f conftest.$ac_objext conftest$ac_exeext
    5465 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    5466   (eval $ac_link) 2>conftest.er1
     5240$ac_includes_default
     5241#include <$ac_header>
     5242_ACEOF
     5243rm -f conftest.$ac_objext
     5244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5245  (eval $ac_compile) 2>conftest.er1
    54675246  ac_status=$?
    54685247  grep -v '^ *+' conftest.er1 >conftest.err
     
    54785257  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    54795258  (exit $ac_status); }; } &&
     5259         { ac_try='test -s conftest.$ac_objext'
     5260  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5261  (eval $ac_try) 2>&5
     5262  ac_status=$?
     5263  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5264  (exit $ac_status); }; }; then
     5265  ac_header_compiler=yes
     5266else
     5267  echo "$as_me: failed program was:" >&5
     5268sed 's/^/| /' conftest.$ac_ext >&5
     5269
     5270ac_header_compiler=no
     5271fi
     5272rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5273echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5274echo "${ECHO_T}$ac_header_compiler" >&6
     5275
     5276# Is the header present?
     5277echo "$as_me:$LINENO: checking $ac_header presence" >&5
     5278echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     5279cat >conftest.$ac_ext <<_ACEOF
     5280/* confdefs.h.  */
     5281_ACEOF
     5282cat confdefs.h >>conftest.$ac_ext
     5283cat >>conftest.$ac_ext <<_ACEOF
     5284/* end confdefs.h.  */
     5285#include <$ac_header>
     5286_ACEOF
     5287if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     5288  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     5289  ac_status=$?
     5290  grep -v '^ *+' conftest.er1 >conftest.err
     5291  rm -f conftest.er1
     5292  cat conftest.err >&5
     5293  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5294  (exit $ac_status); } >/dev/null; then
     5295  if test -s conftest.err; then
     5296    ac_cpp_err=$ac_c_preproc_warn_flag
     5297    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     5298  else
     5299    ac_cpp_err=
     5300  fi
     5301else
     5302  ac_cpp_err=yes
     5303fi
     5304if test -z "$ac_cpp_err"; then
     5305  ac_header_preproc=yes
     5306else
     5307  echo "$as_me: failed program was:" >&5
     5308sed 's/^/| /' conftest.$ac_ext >&5
     5309
     5310  ac_header_preproc=no
     5311fi
     5312rm -f conftest.err conftest.$ac_ext
     5313echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5314echo "${ECHO_T}$ac_header_preproc" >&6
     5315
     5316# So?  What about this header?
     5317case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     5318  yes:no: )
     5319    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     5320echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5321    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     5322echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     5323    ac_header_preproc=yes
     5324    ;;
     5325  no:yes:* )
     5326    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     5327echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     5328    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     5329echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     5330    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     5331echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     5332    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     5333echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     5334    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     5335echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     5336    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     5337echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     5338    (
     5339      cat <<\_ASBOX
     5340## ------------------------------------------- ##
     5341## Report this to orxonox-dev@mail.datacore.ch ##
     5342## ------------------------------------------- ##
     5343_ASBOX
     5344    ) |
     5345      sed "s/^/$as_me: WARNING:     /" >&2
     5346    ;;
     5347esac
     5348echo "$as_me:$LINENO: checking for $ac_header" >&5
     5349echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     5350if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5351  echo $ECHO_N "(cached) $ECHO_C" >&6
     5352else
     5353  eval "$as_ac_Header=\$ac_header_preproc"
     5354fi
     5355echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     5356echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     5357
     5358fi
     5359if test `eval echo '${'$as_ac_Header'}'` = yes; then
     5360  cat >>confdefs.h <<_ACEOF
     5361#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     5362_ACEOF
     5363
     5364else
     5365  { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
     5366echo "$as_me: error: cannot find SDL headers" >&2;}
     5367   { (exit 1); exit 1; }; }
     5368fi
     5369
     5370done
     5371
     5372
     5373    echo "$as_me:$LINENO: checking for main in -lSDL" >&5
     5374echo $ECHO_N "checking for main in -lSDL... $ECHO_C" >&6
     5375if test "${ac_cv_lib_SDL_main+set}" = set; then
     5376  echo $ECHO_N "(cached) $ECHO_C" >&6
     5377else
     5378  ac_check_lib_save_LIBS=$LIBS
     5379LIBS="-lSDL  $LIBS"
     5380cat >conftest.$ac_ext <<_ACEOF
     5381/* confdefs.h.  */
     5382_ACEOF
     5383cat confdefs.h >>conftest.$ac_ext
     5384cat >>conftest.$ac_ext <<_ACEOF
     5385/* end confdefs.h.  */
     5386
     5387
     5388int
     5389main ()
     5390{
     5391main ();
     5392  ;
     5393  return 0;
     5394}
     5395_ACEOF
     5396rm -f conftest.$ac_objext conftest$ac_exeext
     5397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     5398  (eval $ac_link) 2>conftest.er1
     5399  ac_status=$?
     5400  grep -v '^ *+' conftest.er1 >conftest.err
     5401  rm -f conftest.er1
     5402  cat conftest.err >&5
     5403  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5404  (exit $ac_status); } &&
     5405         { ac_try='test -z "$ac_c_werror_flag"
     5406                         || test ! -s conftest.err'
     5407  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5408  (eval $ac_try) 2>&5
     5409  ac_status=$?
     5410  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5411  (exit $ac_status); }; } &&
    54805412         { ac_try='test -s conftest$ac_exeext'
    54815413  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     
    54845416  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    54855417  (exit $ac_status); }; }; then
    5486    echo "*** The test program compiled, but did not run. This usually means"
    5487           echo "*** that the run-time linker is not finding SDL or finding the wrong"
    5488           echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
    5489           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
    5490           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
    5491           echo "*** is required on your system"
    5492           echo "***"
    5493           echo "*** If you have an old version installed, it is best to remove it, although"
    5494           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
     5418  ac_cv_lib_SDL_main=yes
    54955419else
    54965420  echo "$as_me: failed program was:" >&5
    54975421sed 's/^/| /' conftest.$ac_ext >&5
    54985422
    5499  echo "*** The test program failed to compile or link. See the file config.log for the"
    5500           echo "*** exact error that occured. This usually means SDL was incorrectly installed"
    5501           echo "*** or that you have moved SDL since it was installed. In the latter case, you"
    5502           echo "*** may want to edit the sdl-config script: $SDL_CONFIG"
     5423ac_cv_lib_SDL_main=no
    55035424fi
    55045425rm -f conftest.err conftest.$ac_objext \
    55055426      conftest$ac_exeext conftest.$ac_ext
    5506           CFLAGS="$ac_save_CFLAGS"
    5507           LIBS="$ac_save_LIBS"
    5508        fi
     5427LIBS=$ac_check_lib_save_LIBS
     5428fi
     5429echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_main" >&5
     5430echo "${ECHO_T}$ac_cv_lib_SDL_main" >&6
     5431if test $ac_cv_lib_SDL_main = yes; then
     5432  FOUND_SDL=yes
     5433fi
     5434
     5435     if test "$FOUND_SDL" = "yes" ; then
     5436       LIBS="$LIBS -lSDL"
     5437     else
     5438        echo "------------------"
     5439        echo "SDL library not found."
     5440        echo "please install the SDL library, which can be found at http://www.libsdl.org"
     5441        echo "------------------"
     5442        exit -1
    55095443     fi
    5510      SDL_CFLAGS=""
    5511      SDL_LIBS=""
    5512      { { echo "$as_me:$LINENO: error: *** SDL version $SDL_VERSION not found!" >&5
    5513 echo "$as_me: error: *** SDL version $SDL_VERSION not found!" >&2;}
    5514    { (exit 1); exit 1; }; }
    5515 
    5516   fi
    5517 
    5518 
    5519   rm -f conf.sdltest
    5520 
    5521     CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    5522     LIBS="$LIBS $SDL_LIBS"
     5444
     5445## checking for SDL
     5446#    SDL_VERSION=1.2.7
     5447#    AM_PATH_SDL($SDL_VERSION,
     5448#      :,
     5449#      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
     5450#      )
     5451#    CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
     5452#    LIBS="$LIBS $SDL_LIBS"
    55235453    ;;
    55245454  *)
    5525     mingw="no"
    55265455    ;;
    55275456esac
     
    73107239s,@CPP@,$CPP,;t t
    73117240s,@EGREP@,$EGREP,;t t
    7312 s,@SDL_CONFIG@,$SDL_CONFIG,;t t
    7313 s,@SDL_CFLAGS@,$SDL_CFLAGS,;t t
    7314 s,@SDL_LIBS@,$SDL_LIBS,;t t
    73157241s,@MSBITFIELDS@,$MSBITFIELDS,;t t
    73167242s,@PKG_CONFIG@,$PKG_CONFIG,;t t
  • orxonox/trunk/configure.ac

    r2982 r2991  
    138138         exit -1
    139139    fi   
     140# checking for SDL-headers
     141    AC_CHECK_HEADERS(SDL/SDL.h ,,
     142      [AC_MSG_ERROR([cannot find SDL headers]) ])
     143
     144    AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
     145     if test "$FOUND_SDL" = "yes" ; then
     146       LIBS="$LIBS -lSDL"
     147     else
     148        echo "------------------"
     149        echo "SDL library not found."
     150        echo "please install the SDL library, which can be found at http://www.libsdl.org"
     151        echo "------------------"
     152        exit -1
     153     fi   
    140154
    141155## checking for SDL
    142     SDL_VERSION=1.2.7
    143     AM_PATH_SDL($SDL_VERSION,
    144       :,
    145       AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
    146       )
    147     CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
    148     LIBS="$LIBS $SDL_LIBS"
     156#    SDL_VERSION=1.2.7
     157#    AM_PATH_SDL($SDL_VERSION,
     158#      :,
     159#      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
     160#      )
     161#    CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
     162#    LIBS="$LIBS $SDL_LIBS"
    149163    ;;
    150164  *)
    151     mingw="no"
    152165    ;;
    153166esac
  • orxonox/trunk/console/Makefile.in

    r2989 r2991  
    122122PATH_SEPARATOR = @PATH_SEPARATOR@
    123123PKG_CONFIG = @PKG_CONFIG@
    124 SDL_CFLAGS = @SDL_CFLAGS@
    125 SDL_CONFIG = @SDL_CONFIG@
    126 SDL_LIBS = @SDL_LIBS@
    127124SET_MAKE = @SET_MAKE@
    128125SHELL = @SHELL@
  • orxonox/trunk/gui/Makefile.in

    r2989 r2991  
    128128PATH_SEPARATOR = @PATH_SEPARATOR@
    129129PKG_CONFIG = @PKG_CONFIG@
    130 SDL_CFLAGS = @SDL_CFLAGS@
    131 SDL_CONFIG = @SDL_CONFIG@
    132 SDL_LIBS = @SDL_LIBS@
    133130SET_MAKE = @SET_MAKE@
    134131SHELL = @SHELL@
  • orxonox/trunk/importer/Makefile.in

    r2980 r2991  
    122122PATH_SEPARATOR = @PATH_SEPARATOR@
    123123PKG_CONFIG = @PKG_CONFIG@
    124 SDL_CFLAGS = @SDL_CFLAGS@
    125 SDL_CONFIG = @SDL_CONFIG@
    126 SDL_LIBS = @SDL_LIBS@
    127124SET_MAKE = @SET_MAKE@
    128125SHELL = @SHELL@
  • orxonox/trunk/src/Makefile.in

    r2990 r2991  
    137137PATH_SEPARATOR = @PATH_SEPARATOR@
    138138PKG_CONFIG = @PKG_CONFIG@
    139 SDL_CFLAGS = @SDL_CFLAGS@
    140 SDL_CONFIG = @SDL_CONFIG@
    141 SDL_LIBS = @SDL_LIBS@
    142139SET_MAKE = @SET_MAKE@
    143140SHELL = @SHELL@
Note: See TracChangeset for help on using the changeset viewer.