Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3457 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Mar 5, 2005, 2:33:27 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: added new File glfont.c that will be modified, so it can display any ttf font

also included libSDL_ttf into configure. this enables the use of any ttf font as mentioned by konfuzzius in orxonox-dev mail 266.

Location:
orxonox/trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/config.h.in

    r3423 r3457  
    5959#undef HAVE_SDL_SDL_IMAGE_H
    6060
     61/* Define to 1 if you have the <SDL/SDL_ttf.h> header file. */
     62#undef HAVE_SDL_SDL_TTF_H
     63
    6164/* Define to 1 if you have the `sqrt' function. */
    6265#undef HAVE_SQRT
  • orxonox/trunk/configure

    r3433 r3457  
    62806280        echo "SDL_image library not found."
    62816281        echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
     6282        echo "------------------"
     6283        exit -1
     6284     fi
     6285fi
     6286
     6287#---------#
     6288# SDL_ttf #
     6289#---------#
     6290def_sdl_ttf=yes
     6291# checking for SDL_ttf-headers
     6292
     6293for ac_header in SDL/SDL_ttf.h
     6294do
     6295as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     6296if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6297  echo "$as_me:$LINENO: checking for $ac_header" >&5
     6298echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     6299if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6300  echo $ECHO_N "(cached) $ECHO_C" >&6
     6301fi
     6302echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     6303echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     6304else
     6305  # Is the header compilable?
     6306echo "$as_me:$LINENO: checking $ac_header usability" >&5
     6307echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     6308cat >conftest.$ac_ext <<_ACEOF
     6309/* confdefs.h.  */
     6310_ACEOF
     6311cat confdefs.h >>conftest.$ac_ext
     6312cat >>conftest.$ac_ext <<_ACEOF
     6313/* end confdefs.h.  */
     6314$ac_includes_default
     6315#include <$ac_header>
     6316_ACEOF
     6317rm -f conftest.$ac_objext
     6318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     6319  (eval $ac_compile) 2>conftest.er1
     6320  ac_status=$?
     6321  grep -v '^ *+' conftest.er1 >conftest.err
     6322  rm -f conftest.er1
     6323  cat conftest.err >&5
     6324  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6325  (exit $ac_status); } &&
     6326         { ac_try='test -z "$ac_c_werror_flag"
     6327                         || test ! -s conftest.err'
     6328  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6329  (eval $ac_try) 2>&5
     6330  ac_status=$?
     6331  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6332  (exit $ac_status); }; } &&
     6333         { ac_try='test -s conftest.$ac_objext'
     6334  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6335  (eval $ac_try) 2>&5
     6336  ac_status=$?
     6337  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6338  (exit $ac_status); }; }; then
     6339  ac_header_compiler=yes
     6340else
     6341  echo "$as_me: failed program was:" >&5
     6342sed 's/^/| /' conftest.$ac_ext >&5
     6343
     6344ac_header_compiler=no
     6345fi
     6346rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     6347echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     6348echo "${ECHO_T}$ac_header_compiler" >&6
     6349
     6350# Is the header present?
     6351echo "$as_me:$LINENO: checking $ac_header presence" >&5
     6352echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     6353cat >conftest.$ac_ext <<_ACEOF
     6354/* confdefs.h.  */
     6355_ACEOF
     6356cat confdefs.h >>conftest.$ac_ext
     6357cat >>conftest.$ac_ext <<_ACEOF
     6358/* end confdefs.h.  */
     6359#include <$ac_header>
     6360_ACEOF
     6361if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     6362  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     6363  ac_status=$?
     6364  grep -v '^ *+' conftest.er1 >conftest.err
     6365  rm -f conftest.er1
     6366  cat conftest.err >&5
     6367  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6368  (exit $ac_status); } >/dev/null; then
     6369  if test -s conftest.err; then
     6370    ac_cpp_err=$ac_c_preproc_warn_flag
     6371    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     6372  else
     6373    ac_cpp_err=
     6374  fi
     6375else
     6376  ac_cpp_err=yes
     6377fi
     6378if test -z "$ac_cpp_err"; then
     6379  ac_header_preproc=yes
     6380else
     6381  echo "$as_me: failed program was:" >&5
     6382sed 's/^/| /' conftest.$ac_ext >&5
     6383
     6384  ac_header_preproc=no
     6385fi
     6386rm -f conftest.err conftest.$ac_ext
     6387echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     6388echo "${ECHO_T}$ac_header_preproc" >&6
     6389
     6390# So?  What about this header?
     6391case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     6392  yes:no: )
     6393    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     6394echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     6395    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     6396echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     6397    ac_header_preproc=yes
     6398    ;;
     6399  no:yes:* )
     6400    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     6401echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     6402    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     6403echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     6404    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     6405echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     6406    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     6407echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     6408    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     6409echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     6410    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     6411echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     6412    (
     6413      cat <<\_ASBOX
     6414## ---------------------------------------------- ##
     6415## Report this to orxonox-dev at mail.datacore.ch ##
     6416## ---------------------------------------------- ##
     6417_ASBOX
     6418    ) |
     6419      sed "s/^/$as_me: WARNING:     /" >&2
     6420    ;;
     6421esac
     6422echo "$as_me:$LINENO: checking for $ac_header" >&5
     6423echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     6424if eval "test \"\${$as_ac_Header+set}\" = set"; then
     6425  echo $ECHO_N "(cached) $ECHO_C" >&6
     6426else
     6427  eval "$as_ac_Header=\$ac_header_preproc"
     6428fi
     6429echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     6430echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     6431
     6432fi
     6433if test `eval echo '${'$as_ac_Header'}'` = yes; then
     6434  cat >>confdefs.h <<_ACEOF
     6435#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     6436_ACEOF
     6437
     6438else
     6439  echo "sdl_ttf not found."; def_sdl_ttf=no
     6440fi
     6441
     6442done
     6443
     6444
     6445if test x$def_sdl_ttf = xyes; then
     6446# checking for SDL_ttf-lib
     6447  echo "$as_me:$LINENO: checking for main in -lSDL_ttf" >&5
     6448echo $ECHO_N "checking for main in -lSDL_ttf... $ECHO_C" >&6
     6449if test "${ac_cv_lib_SDL_ttf_main+set}" = set; then
     6450  echo $ECHO_N "(cached) $ECHO_C" >&6
     6451else
     6452  ac_check_lib_save_LIBS=$LIBS
     6453LIBS="-lSDL_ttf  $LIBS"
     6454cat >conftest.$ac_ext <<_ACEOF
     6455/* confdefs.h.  */
     6456_ACEOF
     6457cat confdefs.h >>conftest.$ac_ext
     6458cat >>conftest.$ac_ext <<_ACEOF
     6459/* end confdefs.h.  */
     6460
     6461
     6462int
     6463main ()
     6464{
     6465main ();
     6466  ;
     6467  return 0;
     6468}
     6469_ACEOF
     6470rm -f conftest.$ac_objext conftest$ac_exeext
     6471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     6472  (eval $ac_link) 2>conftest.er1
     6473  ac_status=$?
     6474  grep -v '^ *+' conftest.er1 >conftest.err
     6475  rm -f conftest.er1
     6476  cat conftest.err >&5
     6477  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6478  (exit $ac_status); } &&
     6479         { ac_try='test -z "$ac_c_werror_flag"
     6480                         || test ! -s conftest.err'
     6481  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6482  (eval $ac_try) 2>&5
     6483  ac_status=$?
     6484  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6485  (exit $ac_status); }; } &&
     6486         { ac_try='test -s conftest$ac_exeext'
     6487  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     6488  (eval $ac_try) 2>&5
     6489  ac_status=$?
     6490  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     6491  (exit $ac_status); }; }; then
     6492  ac_cv_lib_SDL_ttf_main=yes
     6493else
     6494  echo "$as_me: failed program was:" >&5
     6495sed 's/^/| /' conftest.$ac_ext >&5
     6496
     6497ac_cv_lib_SDL_ttf_main=no
     6498fi
     6499rm -f conftest.err conftest.$ac_objext \
     6500      conftest$ac_exeext conftest.$ac_ext
     6501LIBS=$ac_check_lib_save_LIBS
     6502fi
     6503echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_ttf_main" >&5
     6504echo "${ECHO_T}$ac_cv_lib_SDL_ttf_main" >&6
     6505if test $ac_cv_lib_SDL_ttf_main = yes; then
     6506  FOUND_SDL_ttf=yes
     6507fi
     6508
     6509     if test x$FOUND_SDL_ttf = xyes ; then
     6510       LIBS="$LIBS -lSDL_ttf"
     6511     else
     6512        echo "------------------"
     6513        echo "SDL_ttf library not found."
     6514        echo "please install the SDL_ttf library, which can be found at http://www.libsdl.org/projects/SDL_ttf/"
    62826515        echo "------------------"
    62836516        exit -1
  • orxonox/trunk/configure.ac

    r3425 r3457  
    388388fi
    389389
     390#---------#
     391# SDL_ttf #
     392#---------#
     393def_sdl_ttf=yes
     394# checking for SDL_ttf-headers
     395  AC_CHECK_HEADERS([SDL/SDL_ttf.h] ,,
     396      [echo "sdl_ttf not found."; def_sdl_ttf=no ])
     397
     398if test x$def_sdl_ttf = xyes; then
     399# checking for SDL_ttf-lib
     400  AC_CHECK_LIB([SDL_ttf], [main], [FOUND_SDL_ttf=yes])
     401     if test x$FOUND_SDL_ttf = xyes ; then
     402       LIBS="$LIBS -lSDL_ttf"
     403     else
     404        echo "------------------"
     405        echo "SDL_ttf library not found."
     406        echo "please install the SDL_ttf library, which can be found at http://www.libsdl.org/projects/SDL_ttf/"
     407        echo "------------------"
     408        exit -1
     409     fi   
     410fi
     411
    390412## case no SDL-image:
    391413if test x$def_sdl_image = xno; then
  • orxonox/trunk/src/Makefile.am

    r3456 r3457  
    3939                 skysphere.cc \
    4040                 light.cc \
    41                  sfont/fontset.cc
     41                 sfont/fontset.cc \
     42                 sfont/glfont.c
    4243
    4344noinst_HEADERS = ability.h \
  • orxonox/trunk/src/Makefile.in

    r3456 r3457  
    6464        helper_parent.$(OBJEXT) track_manager.$(OBJEXT) \
    6565        matrix.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \
    66         skysphere.$(OBJEXT) light.$(OBJEXT) fontset.$(OBJEXT)
     66        skysphere.$(OBJEXT) light.$(OBJEXT) fontset.$(OBJEXT) \
     67        glfont.$(OBJEXT)
    6768orxonox_OBJECTS = $(am_orxonox_OBJECTS)
    6869orxonox_LDADD = $(LDADD)
     
    7778@AMDEP_TRUE@    ./$(DEPDIR)/data_tank.Po \
    7879@AMDEP_TRUE@    ./$(DEPDIR)/environment.Po ./$(DEPDIR)/fontset.Po \
    79 @AMDEP_TRUE@    ./$(DEPDIR)/game_loader.Po \
     80@AMDEP_TRUE@    ./$(DEPDIR)/game_loader.Po ./$(DEPDIR)/glfont.Po \
    8081@AMDEP_TRUE@    ./$(DEPDIR)/glmenu_imagescreen.Po \
    8182@AMDEP_TRUE@    ./$(DEPDIR)/helper_parent.Po \
     
    9091@AMDEP_TRUE@    ./$(DEPDIR)/track_manager.Po ./$(DEPDIR)/vector.Po \
    9192@AMDEP_TRUE@    ./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po
     93COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
     94        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
     95CCLD = $(CC)
     96LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
    9297CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    9398        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    249254                 skysphere.cc \
    250255                 light.cc \
    251                  sfont/fontset.cc
     256                 sfont/fontset.cc \
     257                 sfont/glfont.c
    252258
    253259noinst_HEADERS = ability.h \
     
    311317
    312318.SUFFIXES:
    313 .SUFFIXES: .cc .o .obj
     319.SUFFIXES: .c .cc .o .obj
    314320$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
    315321        @for dep in $?; do \
     
    386392@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontset.Po@am__quote@
    387393@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/game_loader.Po@am__quote@
     394@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glfont.Po@am__quote@
    388395@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glmenu_imagescreen.Po@am__quote@
    389396@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper_parent.Po@am__quote@
     
    407414@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world.Po@am__quote@
    408415@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/world_entity.Po@am__quote@
     416
     417.c.o:
     418@am__fastdepCC_TRUE@    if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
     419@am__fastdepCC_TRUE@    then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
     420@AMDEP_TRUE@@am__fastdepCC_FALSE@       source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     421@AMDEP_TRUE@@am__fastdepCC_FALSE@       depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
     422@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     423@am__fastdepCC_FALSE@   $(COMPILE) -c $<
     424
     425.c.obj:
     426@am__fastdepCC_TRUE@    if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
     427@am__fastdepCC_TRUE@    then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
     428@AMDEP_TRUE@@am__fastdepCC_FALSE@       source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     429@AMDEP_TRUE@@am__fastdepCC_FALSE@       depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
     430@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     431@am__fastdepCC_FALSE@   $(COMPILE) -c `$(CYGPATH_W) '$<'`
     432
     433glfont.o: sfont/glfont.c
     434@am__fastdepCC_TRUE@    if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT glfont.o -MD -MP -MF "$(DEPDIR)/glfont.Tpo" -c -o glfont.o `test -f 'sfont/glfont.c' || echo '$(srcdir)/'`sfont/glfont.c; \
     435@am__fastdepCC_TRUE@    then mv -f "$(DEPDIR)/glfont.Tpo" "$(DEPDIR)/glfont.Po"; else rm -f "$(DEPDIR)/glfont.Tpo"; exit 1; fi
     436@AMDEP_TRUE@@am__fastdepCC_FALSE@       source='sfont/glfont.c' object='glfont.o' libtool=no @AMDEPBACKSLASH@
     437@AMDEP_TRUE@@am__fastdepCC_FALSE@       depfile='$(DEPDIR)/glfont.Po' tmpdepfile='$(DEPDIR)/glfont.TPo' @AMDEPBACKSLASH@
     438@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     439@am__fastdepCC_FALSE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o glfont.o `test -f 'sfont/glfont.c' || echo '$(srcdir)/'`sfont/glfont.c
     440
     441glfont.obj: sfont/glfont.c
     442@am__fastdepCC_TRUE@    if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT glfont.obj -MD -MP -MF "$(DEPDIR)/glfont.Tpo" -c -o glfont.obj `if test -f 'sfont/glfont.c'; then $(CYGPATH_W) 'sfont/glfont.c'; else $(CYGPATH_W) '$(srcdir)/sfont/glfont.c'; fi`; \
     443@am__fastdepCC_TRUE@    then mv -f "$(DEPDIR)/glfont.Tpo" "$(DEPDIR)/glfont.Po"; else rm -f "$(DEPDIR)/glfont.Tpo"; exit 1; fi
     444@AMDEP_TRUE@@am__fastdepCC_FALSE@       source='sfont/glfont.c' object='glfont.obj' libtool=no @AMDEPBACKSLASH@
     445@AMDEP_TRUE@@am__fastdepCC_FALSE@       depfile='$(DEPDIR)/glfont.Po' tmpdepfile='$(DEPDIR)/glfont.TPo' @AMDEPBACKSLASH@
     446@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     447@am__fastdepCC_FALSE@   $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o glfont.obj `if test -f 'sfont/glfont.c'; then $(CYGPATH_W) 'sfont/glfont.c'; else $(CYGPATH_W) '$(srcdir)/sfont/glfont.c'; fi`
    409448
    410449.cc.o:
Note: See TracChangeset for help on using the changeset viewer.