X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dc5e3b9ec50104aca3b0c8f0c99f93b8d01ea041..d6a6b7443290f1e457f9e84257549b9f42da70ce:/wx-config.in?ds=sidebyside diff --git a/wx-config.in b/wx-config.in index 7fd7a85af5..74ba23e94d 100755 --- a/wx-config.in +++ b/wx-config.in @@ -7,15 +7,34 @@ CC="@CC@" GCC="@GCC@" CXX="@CXX@" LD="@SHARED_LD@" +srcdir=@top_srcdir@ +builddir=@top_builddir_wxconfig@ 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 <