]> git.saurik.com Git - wxWidgets.git/blobdiff - wx-config.in
Open files in binary mode to convert DOS to Unix
[wxWidgets.git] / wx-config.in
index 82b7a8aac6443438f9839fdfff0eebfda2cbcb33..0123a724cd9a27146aee3ea7c0d0d692e6a28ecc 100755 (executable)
@@ -14,7 +14,7 @@ is_monolithic="@MONOLITHIC@"
 cross_compiling="@cross_compiling@"
 target="@host_alias@"
 static_flag="@STATIC_FLAG@"
-
+inplace_flag="no"
 
 # Misc configuration variables:
 
@@ -48,6 +48,7 @@ TOOLCHAIN_DEFS="@TOOLCHAIN_DEFS@"
 TOOLCHAIN_DLL_DEFS="@TOOLCHAIN_DLL_DEFS@"
 WXCONFIG_INCLUDE="@WXCONFIG_INCLUDE@"
 WX_LARGEFILE_FLAGS="@WX_LARGEFILE_FLAGS@"
+GCC_PRAGMA_FLAGS="@GCC_PRAGMA_FLAGS@"
 CODE_GEN_FLAGS="@CODE_GEN_FLAGS@"
 CODE_GEN_FLAGS_CXX="@CODE_GEN_FLAGS_CXX@"
 LDFLAGS_EXE="@LDFLAGS_EXE@"
@@ -167,6 +168,7 @@ Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--release]
                  [--basename] [--static] [--libs[=LIBS]] [--gl-libs]
                  [--cppflags] [--cflags] [--cxxflags] [--ldflags] [--rezflags]
                  [--cc] [--cxx] [--ld]
+                 [--inplace]
 
 wx-config returns configuration information about the installed
 version of wxWidgets. It may be used to query its version and
@@ -195,6 +197,10 @@ in by default.
 
 --gl-libs option is deprecated, used --libs=gl instead.
 
+The --inplace flag allows wx-config to be used from the wxWindows
+build directory and output flags to use the uninstalled version of
+the headers and libs in the build directory.
+
 EOF
 
     exit $1
@@ -232,10 +238,17 @@ cppflags()
 
     includes="-I${libdir}/wx/include/${TOOLCHAIN_NAME}$includes"
 
+    # in inplace case we need to also add path to contrib headers -- do it
+    # unconditionally as they might be used and we have no way of knowing if
+    # they really are
+    if test $inplace_flag = yes ; then
+        includes="$includes -I${prefix}/contrib/include"
+    fi
+
     if test $static_flag = yes ; then
-        echo $includes ${WXDEBUG_DEFINE} ${TOOLCHAIN_DEFS} ${WXCONFIG_INCLUDE} ${WX_LARGEFILE_FLAGS}
+        echo $includes ${WXDEBUG_DEFINE} ${TOOLCHAIN_DEFS} ${WXCONFIG_INCLUDE} ${WX_LARGEFILE_FLAGS} ${GCC_PRAGMA_FLAGS}
     else
-        echo $includes ${WXDEBUG_DEFINE} ${TOOLCHAIN_DEFS} ${TOOLCHAIN_DLL_DEFS} ${WXCONFIG_INCLUDE} ${WX_LARGEFILE_FLAGS}
+        echo $includes ${WXDEBUG_DEFINE} ${TOOLCHAIN_DEFS} ${TOOLCHAIN_DLL_DEFS} ${WXCONFIG_INCLUDE} ${WX_LARGEFILE_FLAGS} ${GCC_PRAGMA_FLAGS}
     fi
 }
 
@@ -254,6 +267,7 @@ while test $# -gt 0; do
       prefix=`makeabs $srcdir`
       exec_prefix=`makeabs $builddir`
       exec_prefix_set=yes
+      inplace_flag=yes
       update_prefixes
       ;;
     --prefix=*)