]> git.saurik.com Git - wxWidgets.git/blobdiff - wx-config-inplace.in
removed the workaround for our SetWindowStyleFlag() being called from base class...
[wxWidgets.git] / wx-config-inplace.in
index 54d6772a78b4d972a1f818c9d06e7635a8486a67..a95d45f30f1bdf5ba708622af43a072c2a85cf83 100644 (file)
@@ -3,7 +3,7 @@
 # Name:        wx-config-inplace
 # Purpose:     wx configuration in tree search and query tool
 # Author:      Ron <ron@debian.org>
-# Modified by:
+# Modified by: VZ on 2005-09-20 to make it work with Bourne shell
 # Created:     14/9/2004
 # RCS-ID:      $Id$
 # Copyright:   (c) 2004 Ron <ron@debian.org>
 # local tree by default and then source the real wx-config if it all still
 # looks sane.
 
-this_prefix=$( cd "@abs_top_builddir@" 2> /dev/null && pwd )
+check_dirname()
+{
+    if [ ! -d "$1" ]; then
+        printf "\n  *** Error: Directory '$1'\n"    1>&2
+        printf "             no longer exists.\n\n" 1>&2
+        exit 1
+    fi
+    ( cd $1 && pwd )
+}
 
-if [ -z "$this_prefix" ]; then
-    printf "\n  *** Error: Directory '@abs_top_builddir@'\n" 1>&2
-    printf "             no longer exists.\n\n"              1>&2
+# set the variables which allow the real wx-config to check if we're using it
+# in place or after installation
+this_prefix=`check_dirname "@abs_top_srcdir@"`
+if [ "x$this_prefix" = "x" ]; then
+    exit 1
+fi
+this_exec_prefix=`check_dirname "@abs_top_builddir@"`
+if [ "x$this_exec_prefix" = "x" ]; then
     exit 1
 fi
 
-. "$this_prefix/lib/wx/config/@TOOLCHAIN_FULLNAME@"
+. "$this_exec_prefix/lib/wx/config/@TOOLCHAIN_FULLNAME@"