[Tux4kids-commits] r932 - in tuxmath/trunk: . doc src

dbruce-guest at alioth.debian.org dbruce-guest at alioth.debian.org
Mon Mar 9 10:44:04 UTC 2009


Author: dbruce-guest
Date: 2009-03-09 10:44:03 +0000 (Mon, 09 Mar 2009)
New Revision: 932

Modified:
   tuxmath/trunk/configure
   tuxmath/trunk/configure.ac
   tuxmath/trunk/doc/changelog
   tuxmath/trunk/src/SDL_extras.c
   tuxmath/trunk/tuxmath.spec.in
   tuxmath/trunk/tuxmath_preview.spec.in
Log:
removed stray 'FNLEN' in SDL_extras.c, also some other pre-release updates


Modified: tuxmath/trunk/configure
===================================================================
--- tuxmath/trunk/configure	2009-03-08 13:00:15 UTC (rev 931)
+++ tuxmath/trunk/configure	2009-03-09 10:44:03 UTC (rev 932)
@@ -809,6 +809,7 @@
 with_sdl_prefix
 with_sdl_exec_prefix
 enable_sdltest
+with_sdlpango
 with_dll_directory
 '
       ac_precious_vars='build_alias
@@ -1475,6 +1476,7 @@
   --without-libintl-prefix     don't search for libintl in includedir and libdir
   --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)
   --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)
+  --without-sdlpango      don't use SDL_Pango even if available
   --with-dll-directory=path
                           set the path where dll for TuxMath are
                           $(NSI_DLL_DIR)
@@ -15047,13 +15049,24 @@
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for TTF_Init in -lSDL_ttf" >&5
-$as_echo_n "checking for TTF_Init in -lSDL_ttf... " >&6; }
-if test "${ac_cv_lib_SDL_ttf_TTF_Init+set}" = set; then
+
+# Check whether --with-sdlpango was given.
+if test "${with_sdlpango+set}" = set; then
+  withval=$with_sdlpango;
+else
+  with_sdlpango=yes
+fi
+
+
+if test "x$with_sdlpango" != xno; then
+
+{ $as_echo "$as_me:$LINENO: checking for SDLPango_Init in -lSDL_Pango" >&5
+$as_echo_n "checking for SDLPango_Init in -lSDL_Pango... " >&6; }
+if test "${ac_cv_lib_SDL_Pango_SDLPango_Init+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lSDL_ttf  $LIBS"
+LIBS="-lSDL_Pango  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -15067,11 +15080,11 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char TTF_Init ();
+char SDLPango_Init ();
 int
 main ()
 {
-return TTF_Init ();
+return SDLPango_Init ();
   ;
   return 0;
 }
@@ -15097,12 +15110,12 @@
 	 test "$cross_compiling" = yes ||
 	 $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_SDL_ttf_TTF_Init=yes
+  ac_cv_lib_SDL_Pango_SDLPango_Init=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_SDL_ttf_TTF_Init=no
+	ac_cv_lib_SDL_Pango_SDLPango_Init=no
 fi
 
 rm -rf conftest.dSYM
@@ -15110,32 +15123,37 @@
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_ttf_TTF_Init" >&5
-$as_echo "$ac_cv_lib_SDL_ttf_TTF_Init" >&6; }
-if test "x$ac_cv_lib_SDL_ttf_TTF_Init" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_Pango_SDLPango_Init" >&5
+$as_echo "$ac_cv_lib_SDL_Pango_SDLPango_Init" >&6; }
+if test "x$ac_cv_lib_SDL_Pango_SDLPango_Init" = x""yes; then
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSDL_TTF 1
+#define HAVE_LIBSDL_PANGO 1
 _ACEOF
 
-  LIBS="-lSDL_ttf $LIBS"
+  LIBS="-lSDL_Pango $LIBS"
 
 else
-  { { $as_echo "$as_me:$LINENO: error: SDL_ttf not found! http://www.libsdl.org/projects/SDL_ttf" >&5
-$as_echo "$as_me: error: SDL_ttf not found! http://www.libsdl.org/projects/SDL_ttf" >&2;}
-   { (exit 1); exit 1; }; }
+  with_sdlpango=no;
+              { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: SDL_Pango test failed (--without-sdlpango to disable)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: SDL_Pango test failed (--without-sdlpango to disable)
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
 fi
 
+fi
 
+if test "x$with_sdlpango" = xno; then
 
-
-
-{ $as_echo "$as_me:$LINENO: checking for SDLPango_Init in -lSDL_Pango" >&5
-$as_echo_n "checking for SDLPango_Init in -lSDL_Pango... " >&6; }
-if test "${ac_cv_lib_SDL_Pango_SDLPango_Init+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for TTF_Init in -lSDL_ttf" >&5
+$as_echo_n "checking for TTF_Init in -lSDL_ttf... " >&6; }
+if test "${ac_cv_lib_SDL_ttf_TTF_Init+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lSDL_Pango  $LIBS"
+LIBS="-lSDL_ttf  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -15149,11 +15167,11 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char SDLPango_Init ();
+char TTF_Init ();
 int
 main ()
 {
-return SDLPango_Init ();
+return TTF_Init ();
   ;
   return 0;
 }
@@ -15179,12 +15197,12 @@
 	 test "$cross_compiling" = yes ||
 	 $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_SDL_Pango_SDLPango_Init=yes
+  ac_cv_lib_SDL_ttf_TTF_Init=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_lib_SDL_Pango_SDLPango_Init=no
+	ac_cv_lib_SDL_ttf_TTF_Init=no
 fi
 
 rm -rf conftest.dSYM
@@ -15192,20 +15210,22 @@
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_Pango_SDLPango_Init" >&5
-$as_echo "$ac_cv_lib_SDL_Pango_SDLPango_Init" >&6; }
-if test "x$ac_cv_lib_SDL_Pango_SDLPango_Init" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_ttf_TTF_Init" >&5
+$as_echo "$ac_cv_lib_SDL_ttf_TTF_Init" >&6; }
+if test "x$ac_cv_lib_SDL_ttf_TTF_Init" = x""yes; then
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSDL_PANGO 1
+#define HAVE_LIBSDL_TTF 1
 _ACEOF
 
-  LIBS="-lSDL_Pango $LIBS"
+  LIBS="-lSDL_ttf $LIBS"
 
 else
-  { $as_echo "$as_me:$LINENO: WARNING: SDL_Pango not found http://sdlpango.sourceforge.net/" >&5
-$as_echo "$as_me: WARNING: SDL_Pango not found http://sdlpango.sourceforge.net/" >&2;}
+  { { $as_echo "$as_me:$LINENO: error: SDL_ttf not found! http://www.libsdl.org/projects/SDL_ttf" >&5
+$as_echo "$as_me: error: SDL_ttf not found! http://www.libsdl.org/projects/SDL_ttf" >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
+fi
 
 
 
@@ -15290,19 +15310,7 @@
 
 
 
-##dnl sdlpango support
-##have_sdlpango=no
 
-##AC_ARG_ENABLE(sdlpango, [  --enable-sdlpango    Enable SDL_Pango (default is  ##disabled)],have_sdlpango=yes)
-##if test $have_sdlpango = "yes"; then
-##	AC_CHECK_LIB([SDL_Pango],[SDLPango_Init],LIBS="$LIBS -lSDL_Pango",have_sdlpango=no)
-
-##fi
-##if test "$have_sdlpango" = "yes"; then
-##	AC_DEFINE([SDL_Pango],[],[Defined when SDL_Pango support is present and compiled])
-##fi
-
-
 # --------------------------------------------------------------------------------------
 # Checks for header files.
 # --------------------------------------------------------------------------------------

Modified: tuxmath/trunk/configure.ac
===================================================================
--- tuxmath/trunk/configure.ac	2009-03-08 13:00:15 UTC (rev 931)
+++ tuxmath/trunk/configure.ac	2009-03-09 10:44:03 UTC (rev 932)
@@ -88,22 +88,33 @@
              ,
              [AC_MSG_ERROR([SDL_mixer not found! http://www.libsdl.org/projects/SDL_mixer])])
 
-dnl Check for SDL_ttf:
-AC_CHECK_LIB([SDL_ttf],
-             [TTF_Init],
-             ,
-             [AC_MSG_ERROR([SDL_ttf not found! http://www.libsdl.org/projects/SDL_ttf])])
+dnl SDL_Pango is enabled by default.
+dnl If SDL_Pango disabled at configure time, or if we can't find it,
+dnl we look for SDL_ttf:
 
+AC_ARG_WITH([sdlpango],
+            [AS_HELP_STRING([--without-sdlpango],
+            [don't use SDL_Pango even if available])],
+            [],
+            [with_sdlpango=yes])
 
-
-dnl Check for SDL_Pango (should work out correct way to allow disabling arg)
-AC_CHECK_LIB([SDL_Pango], 
+if test "x$with_sdlpango" != xno; then
+AC_CHECK_LIB([SDL_Pango],
              [SDLPango_Init],
              ,
-             [AC_MSG_WARN(SDL_Pango not found http://sdlpango.sourceforge.net/)])
+             [with_sdlpango=no;
+              AC_MSG_FAILURE([SDL_Pango test failed (--without-sdlpango to disable)])])
+fi
 
+if [test "x$with_sdlpango" = xno]; then
+AC_CHECK_LIB([SDL_ttf],
+             [TTF_Init],
+             ,
+             [AC_MSG_ERROR([SDL_ttf not found! http://www.libsdl.org/projects/SDL_ttf])])
+fi
 
-dnl Check for complex math functions
+
+dnl Check for (somewhat) higher-level math functions - needed for SDL_extras
 AC_CHECK_LIB([m],
              [csin],
              ,
@@ -111,19 +122,7 @@
 
 
 
-##dnl sdlpango support
-##have_sdlpango=no
 
-##AC_ARG_ENABLE(sdlpango, [  --enable-sdlpango    Enable SDL_Pango (default is  ##disabled)],have_sdlpango=yes)
-##if test $have_sdlpango = "yes"; then
-##	AC_CHECK_LIB([SDL_Pango],[SDLPango_Init],LIBS="$LIBS -lSDL_Pango",have_sdlpango=no)
-
-##fi
-##if test "$have_sdlpango" = "yes"; then
-##	AC_DEFINE([SDL_Pango],[],[Defined when SDL_Pango support is present and compiled])
-##fi
-
-
 # --------------------------------------------------------------------------------------
 # Checks for header files.
 # --------------------------------------------------------------------------------------

Modified: tuxmath/trunk/doc/changelog
===================================================================
--- tuxmath/trunk/doc/changelog	2009-03-08 13:00:15 UTC (rev 931)
+++ tuxmath/trunk/doc/changelog	2009-03-09 10:44:03 UTC (rev 932)
@@ -1,4 +1,11 @@
-2009.Mar.03 (svn.debian.org/tux4kids - revision 922)
+2009.Mar.06 (svn.debian.org/tux4kids - revision 929)
+        Text drawing - SDL_extras revamp done, AFAIK - supports resetting of font
+        sizes and run-time changing of fonts (new field added to options struct
+        for current font name). 
+
+	David Bruce <davidstuartbruce at gmail.com>
+
+2009.Mar.04 (svn.debian.org/tux4kids - revision 922)
         Text drawing - implemented Set_SDL_Pango_Font_Size() in SDL_extras.c so
         that BlackOutline() e.g. now use the font size argument, albeit still with
         a slight hack.

Modified: tuxmath/trunk/src/SDL_extras.c
===================================================================
--- tuxmath/trunk/src/SDL_extras.c	2009-03-08 13:00:15 UTC (rev 931)
+++ tuxmath/trunk/src/SDL_extras.c	2009-03-09 10:44:03 UTC (rev 932)
@@ -1001,7 +1001,7 @@
   }
 
   /* If the font has changed, we need to wipe out the old ones: */
-  if (0 != strncmp(prev_font_name, Opts_FontName(), FNLEN))
+  if (0 != strncmp(prev_font_name, Opts_FontName(),sizeof(prev_font_name)))
   {
     free_font_list();
     strncpy(prev_font_name, Opts_FontName(), sizeof(prev_font_name));

Modified: tuxmath/trunk/tuxmath.spec.in
===================================================================
--- tuxmath/trunk/tuxmath.spec.in	2009-03-08 13:00:15 UTC (rev 931)
+++ tuxmath/trunk/tuxmath.spec.in	2009-03-09 10:44:03 UTC (rev 932)
@@ -23,7 +23,7 @@
 Vendor:         openSUSE-Education
 
 BuildRequires:  SDL_image-devel >= 1.2.2
-BuildRequires:  SDL_ttf-devel > 2.0.8
+#BuildRequires:  SDL_ttf-devel > 2.0.8
 BuildRequires:  SDL-devel
 BuildRequires:  SDL_mixer-devel
 BuildRequires:  SDL_Pango-devel

Modified: tuxmath/trunk/tuxmath_preview.spec.in
===================================================================
--- tuxmath/trunk/tuxmath_preview.spec.in	2009-03-08 13:00:15 UTC (rev 931)
+++ tuxmath/trunk/tuxmath_preview.spec.in	2009-03-09 10:44:03 UTC (rev 932)
@@ -30,7 +30,7 @@
 Vendor:         openSUSE-Education
 
 BuildRequires:  SDL_image-devel >= 1.2.2
-BuildRequires:  SDL_ttf-devel > 2.0.8
+#BuildRequires:  SDL_ttf-devel > 2.0.8
 BuildRequires:  SDL-devel
 BuildRequires:  SDL_mixer-devel
 BuildRequires:  SDL_Pango-devel




More information about the Tux4kids-commits mailing list