X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cadfae2b761cac8dcdb4964977ff36d9183d1d8f..b61d8079f54ee9fd67bd2a1e42970bc30031e20a:/wx-config.in diff --git a/wx-config.in b/wx-config.in index 7b4202d9a6..65b263f842 100755 --- a/wx-config.in +++ b/wx-config.in @@ -9,6 +9,7 @@ WX_MAJOR_VERSION_NUMBER="@WX_MAJOR_VERSION_NUMBER@" WX_MINOR_VERSION_NUMBER="@WX_MINOR_VERSION_NUMBER@" WX_RELEASE_NUMBER="@WX_RELEASE_NUMBER@" +WX_SUBRELEASE_NUMBER="@WX_SUBRELEASE_NUMBER@" release="@WX_MAJOR_VERSION_NUMBER@.@WX_MINOR_VERSION_NUMBER@" is_monolithic="@MONOLITHIC@" cross_compiling="@cross_compiling@" @@ -29,7 +30,6 @@ update_prefixes CC="@CC@" GCC="@GCC@" -GCC_SEARCHES_USR_LOCAL_INCLUDE="@GCC_SEARCHES_USR_LOCAL_INCLUDE@" CXX="@CXX@" LD="@SHARED_LD@" srcdir="@top_srcdir@" @@ -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@" @@ -143,31 +144,16 @@ get_ldflags_gui() echo $flags_to_ret } -# 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 <&2 fi + +# handle libraries list: + +libs_list="" + +for arg in $*; do + case "$arg" in + -*) + ;; + *) + libs_list="$libs_list `echo "$arg" | tr ',' ' '`" + ;; + esac +done + +if test "x$libs_list" = "x" ; then + if test "$is_monolithic" = "0" ; then + # link against all libs if none given explicitly: + libs_list="$CORE_GUI_LIBS $CORE_BASE_LIBS" + fi +else + # always add wxBase, any wxApp needs it: + libs_list="$libs_list base" +fi + +# determine if at least one gui lib was used: +if test "$is_monolithic" = "0" ; then + nogui_flag="yes" + for i in $libs_list; do + case $i in + base|net) + ;; + *) + nogui_flag="no" + ;; + esac + done +else + nogui_flag="no" +fi + + +# handle options: + while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; @@ -263,11 +274,7 @@ while test $# -gt 0; do case $1 in --inplace) - prefix=`makeabs $srcdir` - exec_prefix=`makeabs $builddir` - exec_prefix_set=yes inplace_flag=yes - update_prefixes ;; --prefix=*) prefix=$optarg @@ -290,6 +297,9 @@ while test $# -gt 0; do --version) echo ${WX_MAJOR_VERSION_NUMBER}.${WX_MINOR_VERSION_NUMBER}.${WX_RELEASE_NUMBER} ;; + --version-full) + echo ${WX_MAJOR_VERSION_NUMBER}.${WX_MINOR_VERSION_NUMBER}.${WX_RELEASE_NUMBER}.${WX_SUBRELEASE_NUMBER} + ;; --release) echo $release ;; @@ -315,19 +325,7 @@ while test $# -gt 0; do echo `eval echo ${MACRESWXCONFIG}` ;; - --libs*) - # find if the argument was --libs=list,of,libs or --libs: - if test "x$optarg" = "x" ; then - if test "$is_monolithic" = "0" ; then - # link against all libs if none given explicitly: - libs_list="$CORE_GUI_LIBS $CORE_BASE_LIBS" - fi - else - libs_list=`echo "$optarg" | tr ',' ' '` - # always add wxBase, any wxApp needs it: - libs_list="$libs_list base" - fi - + --libs) # include install directory only if it is not default: if test "${libdir}" != "/usr/lib" \ -a \( "${cross_compiling}" != "yes" \ @@ -336,7 +334,7 @@ while test $# -gt 0; do libs="-L${libdir}" fi - # it's simpler to avoid handling "bae" itself at all as we add it in the + # it's simpler to avoid handling "base" itself at all as we add it in the # end to the list of libraries anyhow # in monolithic build, link against the main library: if test "$is_monolithic" = "1" ; then @@ -372,7 +370,7 @@ while test $# -gt 0; do # if we have std, we're going to add base anyhow, avoid # having it twice in the end if [ $hadstd = 0 ]; then - newlist="$newlist $i"; + newlist="$newlist $i" fi ;; @@ -405,7 +403,11 @@ while test $# -gt 0; do --ld) echo $LD ;; - *) + --help|-h) + usage 1 1>&2 + ;; + -*) + # unrecognized flag is error usage 1 1>&2 ;; esac