Now compiles with wxMac
authorKevin Rosenberg <kevin@rosenberg.net>
Sun, 2 Aug 2009 01:22:20 +0000 (19:22 -0600)
committerKevin Rosenberg <kevin@rosenberg.net>
Sun, 2 Aug 2009 01:22:20 +0000 (19:22 -0600)
ChangeLog
configure.ac
debian/changelog

index 50587b8e2ac04b75b617f6896bc6795000a20de3..4fbd21784e833cac70d05caf311586d7335ed88b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Aug 1, 2009  Version 5.0.1
+       * missing: Update to latest automake version
+       * configure: make compatible with wxMac
+       * update few source files for non-unicode wxWidgets 2.8 compatibility
+
+Aug 1, 2009  Version 5.0.0
+       * Major revision of wxWidgets code to port from wx2.4 to wx2.8
+       Currently, code compiles without warnings, but there are
+       GUI visual problems at the momemt running with wx2.8
+
 Sep 17, 2007  Version 4.5.5
        * better cleaning in makefiles
        * use "const char" variables for string literals
index 230c87534c26949a1da72918722e8d6140471678..0f16b7a94fb41ef0289be5bcdaf76cd979b2a651 100644 (file)
@@ -12,10 +12,7 @@ AM_CONFIG_HEADER(config.h)
 CFLAGS=""
 CXXFLAGS=""
 
-AM_PATH_GLIB_2_0(2.0.0,,AC_MSG_ERROR(You should get glib 2.0.0 or better.))
-AM_PATH_GTK_2_0(2.0.0,havegtk=yes,havegtk=no)
-
-CFLAGS="${CFLAGS} ${GTK_CFLAGS} ${GLIB_CFLAGS}"
+CFLAGS="${CFLAGS}"
 
 dnl Checks for programs.
 AC_PROG_AWK
@@ -49,14 +46,26 @@ AC_CHECK_LIB(readline, main, [readline=true;
                  AC_DEFINE([HAVE_READLINE],1,[Readline library])],
                 [readline=false], [-lcurses])  
 wxwin=false
+AC_CHECK_LIB(gtk-x11-2.0, main, [hasx11gtk2=true], [])
+if test "x$hasx11gtk2" = "x" ; then
+  AC_MSG_NOTICE([Does not have X11 GTK2])
+  AC_DEFUN([AM_PATH_GLIB_2_0], [])
+  AC_DEFUN([AM_PATH_GTK_2_0], [])
+fi
+if test "$hasx11gtk2" = "true" ; then
+  AM_PATH_GLIB_2_0(2.0.0,,AC_MSG_ERROR(You should get glib 2.0.0 or better.))
+  AM_PATH_GTK_2_0(2.0.0,havegtk_am=yes,havegtk_am=no)
+  CFLAGS="${CFLAGS} ${g76GTK_CFLAGS} ${GLIB_CFLAGS}"
+fi
+
 AC_CHECK_LIB(wx_gtk2u_core-2.8, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])], [], [-L/usr/lib64 -L/usr/lib ${GTK_LIBS} ${GLIB_LIBS} ])
-AC_CHECK_LIB(wx_mac-2.8, main, [wxwin=true; wx_mac=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])])
+AC_CHECK_LIB(wx_mac_core-2.8, main, [wxwin=true; wx_mac=true; AC_DEFINE(HAVE_WXWINDOWS,1,[wxwindows library])])
 AC_CHECK_LIB(fftw3, fftw_malloc, [fftw=true; AC_DEFINE(HAVE_FFTW,1,[FFTW library])], [fftw=false], [-L/usr/lib64 -L/usr/lib])
 AC_CHECK_LIB(GL, main, [libgl=true], [libgl=false], [-L/usr/X11R6/lib -L/usr/X11R6/lib64])
 AC_CHECK_LIB(pthread, main, [pthread=true], [pthread=false])
 
 if test "$zlib" = "true" ; then
-  AC_CHECK_LIB(png, main, [png=true ; AC_DEFINE(HAVE_PNG,1,[PNG library])], [png=false], [-lz -lm])
+  AC_CHECK_LIB(png, main, [png=true ; AC_DEFINE(HAVE_PNG,1,[PNG library])], [png=false], [-L/opt/local/lib -lz -lm])
 fi
 
 dnl Checks for header files.
@@ -280,37 +289,37 @@ AC_ARG_WITH(webdata-url, [  --with-webdata-url=PATH Set URL path of webdata],
 AC_ARG_WITH(html-dir, [  --with-html-dir=PATH    Set directory of html files], 
 [ html_%dir=$withval ; AC_SUBST(htmldir) ] )
 
-if test -n "$cgibindir" -o -n "$cgibinurl" ; then
+if test "x$cgibindir" = "x" -o "x$cgibinurl" = "x" ; then
   cgiprograms="ctsim.cgi ctsim.conf"
   AC_SUBST(cgiprograms)
 fi
 
-if test -n "$html_dir" ; then
+if test "x$html_dir" = "x" ; then
   htmldata=simulate.html
   AC_SUBST(htmldata)
 fi
-AM_CONDITIONAL(USE_HTML, test -n "$html_dir")
+AM_CONDITIONAL(USE_HTML, test "x$html_dir" = "x")
 
-if test -n "$cgibindir" -o -n "$cgibinurl" -o -n "$webdatadir" -o -n "$webdataurl" -o -n "$html_dir" ; then
+if test "x$cgibindir" != "x" -o "x$cgibinurl" != "x" -o "x$webdatadir" != "x" -o "x$webdataurl" != "x" -o "x$html_dir" != "x" ; then
   webenabled=true
   AC_SUBST(webenabled)
   AC_MSG_RESULT([yes])
-  if test -z "$cgibindir" ; then
+  if test "x$cgibindir" = "x" ; then
     AC_MSG_ERROR([--with-cgibin-dir not set for web access])
-  elif test -z "$cgibinurl" ; then
+  elif test "x$cgibinurl" = "x" ; then
     AC_MSG_ERROR([--with-cgibin-url not set for web access])
-  elif test -z "$webdatadir" ; then
+  elif test "x$webdatadir" = "x" ; then
     AC_MSG_ERROR([--with-webdata-dir not set for web access])
-  elif test -z "$webdataurl" ; then
+  elif test "x$webdataurl" = "x" ; then
     AC_MSG_ERROR([--with-webdata-url not set for web access])
-  elif test -z "$html_dir" ; then
+  elif test "x$html_dir" = "x" ; then
     AC_MSG_ERROR([--with-html-dir not set for web access])
   fi
 else
   AC_MSG_RESULT([no])
 fi
 
-AM_CONDITIONAL(USE_LAM, test -n "$lamdir")
+AM_CONDITIONAL(USE_LAM, test "x$lamdir" != "x")
 
 AC_PATH_XTRA
 AC_SUBST(X_CFLAGS)
@@ -346,10 +355,10 @@ if test "$with_x" != "no" && test "$wxwin" = "true"; then
        if test "$debug" = "true"; then
          wxdebug="--debug"
        fi  
-      if [ "$wx_gtk" ]; then 
-       ctlib_graphics="$ctlib_graphics `$wxconfig $wxdebug --libs --version=2.8` -lwx_gtk2u_gl-2.8 ${GTK_LIBS} ${GLIB_LIBS}"
-      elif [ "$wx_mac" ]; then
-        ctlib_graphics="$ctlib_graphics -lwx_mac_gl-2.8"
+      if test "x$wx_gtk" != "x" ; then
+       ctlib_graphics="$ctlib_graphics `$wxconfig $wxdebug --version=2.8  --libs` -lwx_gtk2u_gl-2.8 ${GTK_LIBS} ${GLIB_LIBS}"
+      elif test "x$wx_mac" != "x" ; then
+        ctlib_graphics="$ctlib_graphics `$wxconfig $wxdebug --version=2.8 --libs` -lwx_macu_gl-2.8"
       fi
     fi
   fi
@@ -422,7 +431,7 @@ if test "$efence" = "true" -a "$useefence" = "true" ; then
 fi
 
 if test "$wxwin" = "true" ; then
-  if [ "$wx_gtk" = "true" ] || [ "$wx_mac" = "true" ] ; then   
+  if test "$wx_gtk" = "true"  -o "$wx_mac" = "true" ; then
     wxcflags=`$wxconfig $wxdebug --cxxflags --version=2.8`
     #wxlibs=`$wxconfig --libs`
   else
@@ -441,7 +450,7 @@ LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim"
 ctlibs="$ctlibs_base -lctsim $ctlib_graphics -lctsupport $ctlibs_tools"
 AC_SUBST(ctlibs)
 
-if test -n "$lamdir" ; then
+if test "x$lamdir" != "x" ; then
   lamprograms="ctsimtext-lam"
   AC_SUBST(lamprograms)
   lamdefs="$CFLAGS"
index 2d5630417b36bf27e56227459c6340bad9004533..290e26d30dc79e290d12012b4163f444767d991b 100644 (file)
@@ -1,3 +1,9 @@
+ctsim (5.0.1-1) unstable; urgency=low
+
+  * Minor changes to be compatible with non-unicode wx2.8
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Sat, 01 Aug 2009 18:58:25 -0600
+
 ctsim (5.0.0-1) unstable; urgency=low
 
   * New upstream, ported to wxwidgets 2.8 (closes:462189)