Skip site navigation (1) Skip section navigation (2)

SVN Commit by dpage: r4573 - trunk/pgadmin3

From: svn(at)pgadmin(dot)org
To: pgadmin-hackers(at)postgresql(dot)org
Subject: SVN Commit by dpage: r4573 - trunk/pgadmin3
Date: 2005-10-19 20:56:32
Message-ID: 200510192056.j9JKuWI7029626@developer.pgadmin.org (view raw or flat)
Thread:
Lists: pgadmin-hackers
Author: dpage
Date: 2005-10-19 21:56:32 +0100 (Wed, 19 Oct 2005)
New Revision: 4573

Modified:
   trunk/pgadmin3/acinclude.m4
   trunk/pgadmin3/configure.ac
Log:
Ensure we know what wxVersion we are building with. Allow the user to override the default (2.6) with the --with-wx-version=<major.minor> option. 
Per problem report from Bastiaan Wakkie


Modified: trunk/pgadmin3/acinclude.m4
===================================================================
--- trunk/pgadmin3/acinclude.m4	2005-10-19 08:43:55 UTC (rev 4572)
+++ trunk/pgadmin3/acinclude.m4	2005-10-19 20:56:32 UTC (rev 4573)
@@ -26,6 +26,29 @@
  AC_MSG_RESULT(yes)
 ])
 
+#############################
+# Override wxWidgets version #
+#############################
+AC_DEFUN([CHECK_WX_VERSION],
+[AC_MSG_CHECKING(the wxWidgets version)
+AC_ARG_WITH(wx-version,
+[  --with-wx-version=<version number>  the wxWidgets version in major.minor format (default: 2.6)],
+[if test "$withval" == yes; then
+    AC_MSG_RESULT(unspecified)
+    AC_MSG_ERROR([you must specify a version number when using --with-wx-version=<version number>])
+ else
+    if test -z "$withval"; then
+        AC_MSG_RESULT(unspecified)
+        AC_MSG_ERROR([you must specify a version number when using --with-wx-version=<version number>])
+	else
+	    wx_version="$withval"
+		AC_MSG_RESULT($wx_version)
+	fi
+ fi],
+[wx_version="2.6"
+AC_MSG_RESULT($wx_version)])
+])
+
 #########################################
 # Override PostgreSQL include directory #
 #########################################
@@ -251,12 +274,16 @@
 fi], [
     AC_MSG_RESULT(yes)
     WX_HOME=/usr/local/wx2
-    if test ! -f "${WX_HOME}/include/wx-2.5/wx/wx.h" -a ! -f "${WX_HOME}/include/wx-2.6/wx/wx.h"
+    if test ! -f "${WX_HOME}/include/wx-${wx_version}/wx/wx.h"
     then
         WX_HOME=/usr/local
-        if test ! -f "${WX_HOME}/include/wx-2.5/wx/wx.h" -a ! -f "${WX_HOME}/include/wx-2.6/wx/wx.h"
+        if test ! -f "${WX_HOME}/include/wx-${wx_version}/wx/wx.h"
         then
             WX_HOME=/usr
+            if test ! -f "${WX_HOME}/include/wx-${wx_version}/wx/wx.h"
+            then
+                AC_MSG_ERROR([Could not find your wxWidgets ${wx_version} installation. You might need to use the --with-wx=DIR configure option])
+            fi
         fi
     fi
 ])
@@ -297,18 +324,18 @@
 	
     if test "$pg_debug_build" == yes
     then
-        WX_NEW_CPPFLAGS=`${WX_CONFIG} --cppflags --unicode=yes --debug=yes`
+        WX_NEW_CPPFLAGS=`${WX_CONFIG} --cppflags --unicode=yes --debug=yes --version=${wx_version}`
         CPPFLAGS="$CPPFLAGS $WX_NEW_CPPFLAGS -g -O0"
 			
-        WX_NEW_LIBS=`${WX_CONFIG} ${WX_STATIC} --libs --unicode=yes --debug=yes`
-        WX_NEW_CONTRIB_LIBS=`${WX_CONFIG} ${WX_STATIC} --libs stc,ogl --unicode=yes --debug=yes`
+        WX_NEW_LIBS=`${WX_CONFIG} ${WX_STATIC} --libs --unicode=yes --debug=yes --version=${wx_version}`
+        WX_NEW_CONTRIB_LIBS=`${WX_CONFIG} ${WX_STATIC} --libs stc,ogl --unicode=yes --debug=yes --version=${wx_version}`
         LIBS="$LIBS $WX_NEW_LIBS $WX_NEW_CONTRIB_LIBS"
     else
-        WX_NEW_CPPFLAGS=`${WX_CONFIG} --cppflags --unicode=yes --debug=no`
+        WX_NEW_CPPFLAGS=`${WX_CONFIG} --cppflags --unicode=yes --debug=no --version=${wx_version}`
         CPPFLAGS="$CPPFLAGS $WX_NEW_CPPFLAGS -O2"
 		
-        WX_NEW_LIBS=`${WX_CONFIG} ${WX_STATIC} --libs --unicode=yes --debug=no`
-        WX_NEW_CONTRIB_LIBS=`${WX_CONFIG} ${WX_STATIC} --libs stc,ogl --unicode=yes --debug=no`
+        WX_NEW_LIBS=`${WX_CONFIG} ${WX_STATIC} --libs --unicode=yes --debug=no --version=${wx_version}`
+        WX_NEW_CONTRIB_LIBS=`${WX_CONFIG} ${WX_STATIC} --libs stc,ogl --unicode=yes --debug=no --version=${wx_version}`
         LIBS="$LIBS $WX_NEW_LIBS $WX_NEW_CONTRIB_LIBS"
     fi
 
@@ -331,6 +358,7 @@
 
 # Print a configuration summary
 echo
+echo "Using wxWidgets version:             $wx_version"
 if test "$pg_debug_build" == yes
 then
 	echo "Building a debug version of pgAdmin: Yes"

Modified: trunk/pgadmin3/configure.ac
===================================================================
--- trunk/pgadmin3/configure.ac	2005-10-19 08:43:55 UTC (rev 4572)
+++ trunk/pgadmin3/configure.ac	2005-10-19 20:56:32 UTC (rev 4573)
@@ -32,6 +32,7 @@
 # Custom checks
 ENABLE_APPBUNDLE
 AM_CONDITIONAL([APPBUNDLE], [test x$pg_appbundle = xyes])
+CHECK_WX_VERSION
 CHECK_WX_CONFIG_BINARY
 CHECK_PGSQL_INCLUDE
 ENABLE_DEBUG


pgadmin-hackers by date

Next:From: Bastiaan WakkieDate: 2005-10-19 22:01:16
Subject: Re: Beta 3 uploaded -> wx problem
Previous:From: Dave PageDate: 2005-10-19 19:57:20
Subject: Re: Beta 3 uploaded -> wx problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group