]> git.saurik.com Git - wxWidgets.git/blobdiff - wx-config.in
Allow setting default file name in wxMotif wxFileDialog.
[wxWidgets.git] / wx-config.in
index 7fd7a85af5aa383a55994a783f3da677422008b1..878c325284cc9c98048a98b8afec68d00fefbdd6 100755 (executable)
@@ -7,10 +7,29 @@ CC="@CC@"
 GCC="@GCC@"
 CXX="@CXX@"
 LD="@SHARED_LD@"
+srcdir=@top_srcdir@
+builddir=@top_builddir@
 cross_compiling=@cross_compiling@
 target=@host_alias@
 static_flag=@STATIC_FLAG@
 
+# return the absolute path prepending builddir to it if needed
+makeabs()
+{
+    path=$1
+    # TODO: this only works under Unix and even there it could be
+    #       enhanced to remove ".." and "."
+    if [ `echo $path | sed 's/^\(.\).*/\1/'` != "/" ]; then
+        if [ $path = "." ]; then
+            path=$builddir
+        else
+            path="$builddir/$path"
+        fi
+    fi
+
+    echo $path
+}
+
 usage()
 {
     cat <<EOF
@@ -88,6 +107,11 @@ while test $# -gt 0; do
   esac
 
   case $1 in
+    --inplace)
+      prefix=`makeabs $srcdir`
+      exec_prefix=`makeabs $builddir`
+      exec_prefix_set=yes
+      ;;
     --prefix=*)
       prefix=$optarg
       if test $exec_prefix_set = no ; then
@@ -123,7 +147,7 @@ while test $# -gt 0; do
       echo @LDFLAGS_EXE@
       ;;
     --rezflags)
-      echo @LIBWXMACRESWXCONFIG@
+      echo @MACRESWXCONFIG@
       ;;
     --libs)
       if test "@libdir@" != "/usr/lib" \